haoyahui
2023-11-20 025dafb9892a8ff8f8a855343660f837a0f231d3
库存管理前端
3个文件已添加
25个文件已修改
2475 ■■■■ 已修改文件
admin-web/public/static/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/api/baseSetting/finsystenant.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/api/stock/ledger.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/components/myTable/myTableV2.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/styles/store.scss 361 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/utils/settingIplatform.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/retDetails/index.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/returnNote/detail.vue 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/returnNote/edit.vue 436 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/returnNote/index.vue 530 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/ledgerquy/itemQuy/index.vue 173 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/ledgerquy/ledQuy/index.vue 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/foundation/store/person.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/accessStock/outbound/detail.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/accessStock/outbound/edit.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/accessStock/outboundDetails/index.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/index.scss 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/inventorytask/detail.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/inventorytask/edit.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/inventorycount/inventorytask/index.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/ledger/inventoryQuery/index.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/procure/purchaseOrder/detail.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/procure/purchaseOrder/edit.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/procure/purchaseOrder/index.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/transfer/transferApplication/detail.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/transfer/transferApplication/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/stock/transfer/transferissue/index.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/systemManger/server/user/edit.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/public/static/config.js
@@ -14,8 +14,8 @@
// 接口请求地址
// apiBaseURL: 'http://116.198.39.83:8082/progress', // 正式
  // apiBaseURL: 'http://172.16.60.90:8082/progress',//开发
  apiBaseURL: 'http://172.16.20.10:8083/lowConsum',//开发
  // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发
  // apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发
  apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发
// apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 测试,
  // socket连接
  wsSocketUrl: VUE_APP_WS_URL,
admin-web/src/api/baseSetting/finsystenant.js
@@ -186,4 +186,12 @@
    method: 'get',
    params,
  });
}
// 库存
export function tenantUserQueryUser(params) {
  return request({
    url: '/pc/fin/sys/tenant/user/query/user',
    method: 'get',
    params,
  });
}
admin-web/src/api/stock/ledger.js
New file
@@ -0,0 +1,11 @@
import request from '@/utils/request';
// 单据新增
export function doExport(params) {
  return request({
    url: '/pc/fin/warehouse/ledger/getListExport',
    responseType: 'blob', // 指定响应数据类型为Blob
    method: 'post',
    params,
  });
}
admin-web/src/components/myTable/myTableV2.vue
@@ -628,6 +628,8 @@
  color: #303133;
  font-weight: 700;
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.el-radio {
  margin-right: 10px;
admin-web/src/styles/store.scss
@@ -1,127 +1,127 @@
.stock-container {
    .ml-20 {
      margin-left: 20px;
    }
    .card,.list-item {
      display: flex;
      flex-wrap: wrap;
      margin: 0px !important;
  .ml-20 {
    margin-left: 20px;
  }
  .card,
  .list-item {
    display: flex;
    flex-wrap: wrap;
    margin: 0px !important;
    width: 100%;
    min-height: 100%;
    .cm-item {
      width: 100%;
      min-height: 100%;
      .cm-item {
        width: 100%;
      }
      .cm-item .el-card__body {
        padding-bottom: 5px;
      }
    }
    .card-data {
      width: 100%;
      position: relative;
      margin-top: 8px;
      .card-container {
        .card-header {
          height: 48px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          background: #f3f9fe;
          padding: 0 32px 0 15px;
          box-sizing: border-box;
    .cm-item .el-card__body {
      padding-bottom: 5px;
    }
  }
  .card-data {
    width: 100%;
    position: relative;
    margin-top: 8px;
    .card-container {
      .card-header {
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #f3f9fe;
        padding: 0 32px 0 15px;
        box-sizing: border-box;
      }
      .card-header-left {
        display: flex;
        align-items: center;
        color: #999999;
        font-family: 'Microsoft YaHei UI';
        font-size: 18px;
        font-weight: 700;
        .value {
          color: #3d3d3d;
        }
        .card-header-left {
          display: flex;
          align-items: center;
        .states {
          width: 54px;
          height: 22px;
          line-height: 22px;
          text-align: center;
          border-radius: 4px;
          border: 1px solid #f9675b99;
          background: rgba($color: #f9675b99, $alpha: 0.1);
          font-family: 'Microsoft YaHei';
          color: #f9675b;
          font-size: 13px;
          font-style: normal;
          font-weight: 400;
          margin-left: 8px;
        }
        .states-success {
          border: 1px solid #39ad6199;
          background: rgba($color: #39ad6199, $alpha: 0.1);
          color: #39ad61;
        }
        .states-info {
          border: 1px solid #999999;
          background: rgba($color: #999999, $alpha: 0.1);
          color: #999999;
          font-family: 'Microsoft YaHei UI';
          font-size: 18px;
          font-weight: 700;
          .value {
            color: #3d3d3d;
        }
        .states-warning {
          border: 1px solid #e6a23c;
          background: rgba($color: #e6a23c, $alpha: 0.1);
          color: #e6a23c;
        }
      }
      .one-hed {
        margin-top: 15px;
        padding: 0 32px 0 15px;
        box-sizing: border-box;
        .box {
          display: inline-block;
          margin-right: 20px;
        }
        .span-two {
          color: #83919e;
          font-size: 14px;
        }
      }
      .card-end {
        font-size: 14px;
        color: #3d3d3d;
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        font-family: 'Microsoft YaHei UI';
        padding: 0 16px;
        box-sizing: border-box;
        .item {
          width: 379px;
          height: 60px;
          padding: 8px 12px 9px 12px;
          box-sizing: border-box;
          align-items: center;
          gap: 8px;
          flex-shrink: 0;
          background: #f9f9f9;
          margin-right: 15px;
          margin-bottom: 15px;
          &:last-child {
            margin-right: 0;
          }
          .states {
            width: 54px;
          .name {
            height: 22px;
            line-height: 22px;
            text-align: center;
            border-radius: 4px;
            border: 1px solid #f9675b99;
            background: rgba($color:#f9675b99,$alpha:0.1);
            font-family: 'Microsoft YaHei';
            color: #f9675b;
            font-size: 13px;
            font-style: normal;
            font-weight: 400;
            margin-left: 8px;
          }
          .states-success {
            border: 1px solid #39ad6199;
            background: rgba($color:#39ad6199,$alpha:0.1);
            color: #39ad61;
          }
          .states-info {
            border: 1px solid #999999;
            background: rgba($color:#999999,$alpha:0.1);
            color: #999999;
          }
          .states-warning {
            border: 1px solid #e6a23c;
            background: rgba($color:#e6a23c,$alpha:0.1);
            color: #e6a23c;
          }
        }
        .one-hed {
          margin-top: 15px;
          padding: 0 32px 0 15px;
          box-sizing: border-box;
          .box {
            display: inline-block;
            margin-right: 20px;
          }
          .span-two {
            color: #83919e;
            font-size: 14px;
          }
        }
        .card-end {
          font-size: 14px;
          color: #3d3d3d;
          margin-top: 15px;
          display: flex;
          flex-wrap: wrap;
          font-family: 'Microsoft YaHei UI';
          padding: 0 16px;
          box-sizing: border-box;
          .item {
            width: 379px;
            height: 60px;
            padding: 8px 12px 9px 12px;
            box-sizing: border-box;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
            background: #f9f9f9;
            margin-right: 15px;
            margin-bottom: 15px;
            &:last-child {
              margin-right: 0;
            }
            .name {
              height: 22px;
              line-height: 22px;
            }
            .value-box {
              display: flex;
              .value-box-item {
                margin-right: 20px;
                .label {
                  color: #99999999;
                  line-height: 22px;
                }
                .value {
                  color: #ff3131;
                }
          .value-box {
            display: flex;
            .value-box-item {
              margin-right: 20px;
              .label {
                color: #99999999;
                line-height: 22px;
              }
              .value {
                color: #ff3131;
              }
            }
          }
@@ -129,73 +129,78 @@
      }
    }
  }
  .no-data{
    margin-top: 100px;
    text-align: center;
    color: #909399;
  .el-pagination {
    display: flex;
    justify-content: flex-end;
  }
  /*编辑*/
  .stock-edit{
    .main-w {
      width: 88%;
}
.no-data {
  margin-top: 100px;
  text-align: center;
  color: #909399;
}
/*编辑*/
.stock-edit {
  .main-w {
    width: 88%;
  }
  .goods-card {
    position: relative;
    background: #f6f6f6;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-top: 20px;
    &:nth-of-type(1) {
      margin-top: 0;
    }
    .goods-card {
      position: relative;
      background: #f6f6f6;
      padding: 20px;
      box-sizing: border-box;
      border-radius: 4px;
      background-color: #f9f9f9;
      margin-top: 20px;
      &:nth-of-type(1) {
        margin-top: 0;
      }
    }
    .btn-group {
      width: 80px;
      position: absolute;
      right: -94px;
      bottom: 0px;
      .el-button {
        margin-bottom: 10px;
        margin-left: 0;
        display: block;
        &:last-child {
          margin-bottom: 0;
        }
  }
  .btn-group {
    width: 80px;
    position: absolute;
    right: -94px;
    bottom: 0px;
    .el-button {
      margin-bottom: 10px;
      margin-left: 0;
      display: block;
      &:last-child {
        margin-bottom: 0;
      }
    }
  }
  /*详情*/
  .stock-detail{
    .img-row {
      display: flex;
      align-content: center;
}
/*详情*/
.stock-detail {
  .img-row {
    display: flex;
    align-content: center;
  }
  .img-box {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: #f9f9f9;
    margin-right: 20px;
    cursor: pointer;
    .img {
      width: 100%;
    }
    .img-box {
      display: inline-block;
      width: 80px;
      height: 80px;
      background: #f9f9f9;
      margin-right: 20px;
      cursor: pointer;
      .img {
        width: 100%;
      }
  }
  .goods-card {
    position: relative;
    background: #f6f6f6;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-top: 20px;
    &:nth-of-type(1) {
      margin-top: 0;
    }
    .goods-card {
      position: relative;
      background: #f6f6f6;
      padding: 20px;
      box-sizing: border-box;
      border-radius: 4px;
      background-color: #f9f9f9;
      margin-top: 20px;
      &:nth-of-type(1) {
        margin-top: 0;
      }
    }
  }
  }
}
admin-web/src/utils/settingIplatform.js
@@ -14,8 +14,8 @@
// apiBaseURL: 'http://116.198.39.83:8082/progress', // 正式
  // apiBaseURL: 'http://172.16.60.90:8082/progress',//开发
  // apiBaseURL: 'http://172.16.60.175:8083/lowConsum',//开发
  apiBaseURL: 'http://172.16.20.10:8083/lowConsum',//开发
  // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发
  // apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发
  apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发
// apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 测试,
  // socket连接
  wsSocketUrl: VUE_APP_WS_URL,
admin-web/src/views/departmentitem/itemret/retDetails/index.vue
@@ -13,16 +13,9 @@
              <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/>
            </el-col>
          </el-row>
          <!--添加/编辑弹窗-->
          <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/>
        </el-card>
      </el-container>
    </el-container>
    <my-import
      :import-setting="importSetting"
      :dialog-show="importSetting.dialogShow"
      :dialog-title="importSetting.dialogTitle"
    />
  </div>
</template>
@@ -30,14 +23,12 @@
import MyTableV2 from "@/components/myTable/myTableV2";
import MyButton from "@/components/myButton/myButton";
import SettingIplatform from '@/utils/settingIplatform';
import edit from './edit'
import * as finsystenant from '@/api/baseSetting/finsystenant'
import myImport from '@/views/components/myImport'
import {getBaseUrl} from '@/utils/base';
export default {
  name: "index",
  components: {MyButton, MyTableV2, edit, myImport},
  components: {MyButton, MyTableV2},
  data() {
    return {
      // 搜索框
@@ -90,24 +81,6 @@
        userPhone: null,
        status: 1
      },
      // 导入
      importSetting: {
          dialogTitle: '导入',
          dialogShow: false,
          fileSettings: {
              data: {},
              uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址
              accept: '.xls', // 格式
              type: 'text', // 回显形式
              loading: false // 导入效果
          },
          /* 模板下载 */
          templateSettings: {
              templateName: '导入模板.xls', // 名称
              templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址
          },
          onSuccess: null
      },
      editSetting: {
        title: '',
        id: '',
@@ -133,13 +106,12 @@
        },
        // 列信息
        columns: [
          {title: '类型', field: 'name', align: 'left',},
          {title: '单号', field: 'code', align: 'center'},
          {title: '物品名称', field: 'lv', align: 'center', },
          {title: '规格型号', field: 'lv', align: 'center', },
          {title: '出入库数量', field: 'summary', align: 'left',},
          {title: '金额', field: 'summary', align: 'left',},
          {title: '退还数量', field: 'summary', align: 'left',},
          {title: '所属机构', field: 'summary', align: 'left',},
          {title: '部门', field: 'summary', align: 'left',},
          {title: '创建人', field: 'summary', align: 'left',},
          {title: '操作时间', field: 'summary', align: 'left',},
        ],
@@ -170,94 +142,13 @@
    }
  },
  created() {
    // 获取机构树
    this.initTreeData()
  },
  methods: {
    //导入
    importOrg() {
        this.importSetting.dialogShow = true
        this.importSetting.onSuccess = (response, callBack) => {
            if (response.code===1){
              this.$message.success(response.msg)
              this.search(1)
            }else{
              this.$message.warning(response.msg)
            }
            callBack()
        }
    },
    // 左侧树初始化
    initTreeData() {
      finsystenant.getTree().then(res => {
        const content = res || []
        this.treeDataList.splice(0, this.treeDataList.length)
        this.treeDataList = content
        if (content.length > 0) {
          this.importSetting.fileSettings.data = {pid: content[0].id}
        }
      })
    },
    updState(row) {
      let vm = this
      let text = row.status == 0 ? "启用" : "禁用";
      vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () {
        let params = Object.assign({}, row)
        params.status = row.status == 1 ? 0 : 1
        finsystenant.edit(params).then(res => {
          if (res) {
            row.status = row.status === 1 ? 0 : 1
            vm.$modal.msgSuccess(text + "成功");
            vm.search()
          }
        })
      })
    },
    del(row) {
      this.$modal
        .confirm('是否确认删除名称为"' + row.name + '"的机构吗?')
        .then(function () {
          finsystenant.del({id: row.id}).then((res) => {
          });
        })
        .then((res) => {
          this.$message.success('删除成功!');
          this.search()
        })
        .catch(() => {
        });
    },
    showAdd() {
      // if (!this.editSetting.orgId) {
      //   this.$message.warning('请先选择左侧机构')
      // } else {
        this.editSetting.id = null;
        this.editSetting.info = null;
        this.editSetting.title = '新增';
        this.editSetting.show = true;
      // }
    },
    showAudit(row) {
      this.editSetting.id = row.id;
      this.editSetting.info = JSON.stringify(row);
      this.editSetting.title = '编辑';
      this.editSetting.show = true;
    },
    nodeClick(param) {
      param = param || {}
      this.p = Object.assign({}, {
        id: param.id,
        name: param.name
      })
      if (this.p.id != undefined && this.p.id != null) {
        this.filterFrom.tenantId = this.p.id
        this.editSetting.orgId = this.p.id
      } else {
        this.filterFrom.tenantId = null
        this.editSetting.orgId = null
      }
      this.importSetting.fileSettings.data = {pid: param.id}
      this.search(1)
    },
    // 查询table列表
    search(pageNum) {
admin-web/src/views/departmentitem/itemret/returnNote/detail.vue
New file
@@ -0,0 +1,120 @@
<template>
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'">
    <el-row :gutter="20">
      <el-col :span="8">
        <span>退回单号:</span>
        <span>{{ detail.businessFormCode }}</span>
      </el-col>
      <el-col :span="8">
        <span>退回仓库:</span>
        <span>{{ detail.warehouseName }}</span>
      </el-col>
      <el-col :span="8">
        <span>所属机构:</span>
        <span>{{ detail.agencyName }}</span>
      </el-col>
    </el-row>
    <el-row :gutter="20" style="margin-top: 20px">
      <el-col :span="8">
        <span>创建人:</span>
        <span>{{ detail.operatorName }}</span>
      </el-col>
      <el-col :span="8">
        <span>退回时间:</span>
        <span>{{ detail.dealTime | formatTime }}</span>
      </el-col>
    </el-row>
    <el-row v-if="detail.procureDoc" :gutter="20" style="margin-top: 20px">
      <el-col class="img-row" :span="24">
        <span>退回手续:</span>
        <div class="img-box"></div>
      </el-col>
    </el-row>
    <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.fromOutputGoods" :key="goodsIndex">
      <el-row :gutter="20">
        <el-col :span="8">
          <span>物品分类:</span>
          <span>{{ goodsItem.categoryName }}</span>
        </el-col>
        <el-col :span="8">
          <span>物品名称:</span>
          <span>{{ goodsItem.goodsName }}</span>
        </el-col>
      </el-row>
      <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px">
        <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center">
          <template slot-scope="scope">
            {{ scope.row.baseGoodsModelsName }}
          </template>
        </el-table-column>
        <el-table-column label="单位" align="center">
          <template slot-scope="scope">
            {{ scope.row.unit }}
          </template>
        </el-table-column>
        <el-table-column prop="counts" label="退回数量" align="center">
          <template slot-scope="scope">
            {{ scope.row.counts }}
          </template>
        </el-table-column>
        <el-table-column prop="counts" label="金额" align="center">
          <template slot-scope="scope">
            {{ scope.row.price * scope.row.counts | formatPrice}}
          </template>
        </el-table-column>
      </el-table>
    </div>
  </win-md>
</template>
<script>
import { outputDetail } from '@/api/stock/accessStock';
import winMd from '@/components/win/win-md';
import * as DateFormatter from '@/utils/DateFormatter';
export default {
  components: { winMd },
  props: {
    setting: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      detail: {
        categoryName: '',
        businessFormCode: '',
        goodsName: '',
        agencyId: '',
        agencyName: '',
        states: '',
        createName: '',
        fromOutputGoods: [],
      },
    };
  },
  filters: {
    formatTime(time) {
      if (!time) return;
      return DateFormatter.LongToDateTime(time);
    },
    formatPrice(price) {
      return price / 100
    }
  },
  created() {
    outputDetail({ id: this.setting.id }).then((res) => {
      this.detail = res;
    });
  },
  methods: {
    close() {
      this.$emit('close')
    },
  },
};
</script>
<style lang="scss" scoped>
@import url(../../../../styles/store.scss);
</style>
admin-web/src/views/departmentitem/itemret/returnNote/edit.vue
New file
@@ -0,0 +1,436 @@
<template>
  <win-md class="stock-edit" title="物品退回" @close="close" :width="'800px'">
    <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px">
      <div class="main-w">
        <el-row :gutter="24" class="headerHeight">
          <el-col :span="12">
            <el-form-item label="部门" prop="warehouseId">
              <el-input v-model="formData.departmentName" disabled></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="退回人" prop="createName">
              <el-input v-model="formData.createName" disabled></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="退回时间" prop="dealTime">
              <el-date-picker
                v-model="formData.dealTime"
                type="datetime"
                value="yyyy-MM-dd HH:mm:ss"
                value-format="yyyyMMddHHmmss"
                placeholder="请选择日期"
                style="width: 100%"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24" class="headerHeight">
          <el-col :span="24">
            <el-form-item label="退回手续" prop="procureDoc">
              <upload ref="uploadRef" :settings="uploadSettings" @on-change="uploadChange"></upload>
            </el-form-item>
          </el-col>
        </el-row>
        <div class="goods-card" v-for="(goodsItem, goodsIndex) in formData.goods" :key="goodsIndex">
          <el-row :gutter="24">
            <el-col :span="12">
              <el-form-item
                label="物品分类"
                :prop="`goods[${goodsIndex}].baseCategoryIds`"
                :rules="{
                  required: true,
                  message: '请选择',
                  trigger: 'change',
                }"
              >
                <el-cascader
                  v-model="goodsItem.baseCategoryIds"
                  :options="categoryOptions"
                  :props="{ value: 'id' }"
                  @change="categoryChange($event, goodsIndex)"
                  style="width: 100%"
                ></el-cascader>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item
                label="物品名称"
                :prop="`goods[${goodsIndex}].baseGoodsTemplateId`"
                :rules="rules.baseGoodsTemplateId"
              >
                <el-select
                  v-model="goodsItem.baseGoodsTemplateId"
                  placeholder="请先择物品分类"
                  filterable
                  :disabled="!goodsItem.baseCategoryId"
                  style="width: 100%"
                  @change="goodsTemplateChange($event, goodsIndex)"
                >
                  <el-option
                    v-for="item in goodsItem.goodsOptions"
                    :key="item.id"
                    :label="item.goodsName"
                    :value="item.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :span="12">
              <el-form-item label="选择分发单" :prop="`goods[${goodsIndex}].modelsIds`">
                <el-input v-if="!goodsItem.baseGoodsTemplateId" placeholder="请先择物品名称" readonly suffix-icon="el-icon-arrow-down" class="cursor-p"></el-input>
                <div v-else @click="fenfaSetting.show=true">
                  <el-input placeholder="请选择" readonly suffix-icon="el-icon-arrow-down" class="cursor-p"></el-input>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-table :data="goodsItem.models" :stripe="true">
            <el-table-column prop="baseGoodsModelsId" label="规格型号" align="center">
              <template slot-scope="scope">
                {{ getGoodsModelsName(scope.row.baseGoodsModelsId) }}
              </template>
            </el-table-column>
            <el-table-column label="单位" align="center">
              <template slot-scope="scope">
                {{ scope.row.unit }}
              </template>
            </el-table-column>
            <el-table-column prop="price" label="现有库存" align="center">
              <template slot-scope="scope">
                {{ scope.row.worehouseCount }}
              </template>
            </el-table-column>
            <el-table-column prop="counts" label="退回数量" align="center">
              <template slot-scope="scope">
                <el-form-item
                  label-width="0"
                  style="margin-bottom: 0"
                  :prop="`goods[${goodsIndex}].models[${scope.$index}].counts`"
                  :rules="rules.counts"
                >
                  <el-input
                    type="number"
                    v-model="scope.row.counts"
                    @change="countsChange($event, goodsIndex, scope.$index)"
                  ></el-input>
                </el-form-item>
              </template>
            </el-table-column>
          </el-table>
          <div class="btn-group">
            <el-button
              v-if="formData.goods.length > 1"
              name="移除"
              type="danger"
              plain
              size="mini"
              @click="removeGoods(goodsIndex)"
              >移除</el-button
            >
            <el-button
              v-if="formData.goods.length - 1 == goodsIndex"
              name="新增物品"
              type="primary"
              plain
              size="mini"
              @click="addGoods"
              >新增物品</el-button
            >
          </div>
        </div>
      </div>
    </el-form>
    <div slot="footer" align="center" class="dialog-footer">
      <my-button name="取消" site="form" @click="close" />
      <my-button name="保存" site="form" @click="handleSubmit" />
    </div>
    <div v-if="fenfaSetting.show">
      <win-sm title="选择分发单" @close="fenfaSetting.show=false" :width="'800px'">
      <el-table :data="fenfaData">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column label="分发单号" prop="businessFormCode"></el-table-column>
        <el-table-column label="物品名称" prop="modelName"></el-table-column>
        <el-table-column label="分发数量" prop="fenfaCount"></el-table-column>
        <el-table-column label="剩余数量" prop="count"></el-table-column>
        <el-table-column label="分发时间" prop="time"></el-table-column>
      </el-table>
      <div slot="footer" align="center" class="dialog-footer">
        <my-button name="取消" site="form" @click="fenfaSetting.show=false" />
        <my-button name="确定" site="form" @click="handleConfirm" />
      </div>
    </win-sm>
    </div>
  </win-md>
</template>
<script>
import {
  goodsTemplate,
  goodsModel,
  selectTenantWarehouse,
  warehouseSelectNumber,
} from '@/api/baseSetting/finsystenant';
import { outputAdd } from '@/api/stock/accessStock';
import { getTree } from '@/api/foudation/classification';
import MyButton from '@/components/myButton/myButton';
import winMd from '@/components/win/win-md';
import winSm from '@/components/win/win-sm';
import upload from '@/components/upload/index';
import { getUploadUrl } from '@/utils/base';
import { mapGetters } from 'vuex';
export default {
  components: { MyButton, winMd, winSm, upload },
  props: {
    setting: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    // 自定义校验
    // 物品重复校验
    var checkGoodsTemplateId = (rule, value, callback) => {
      if (!value) {
        return callback(new Error('请选择'));
      }
      let temp = this.formData.goods.filter((v) => v.baseGoodsTemplateId == value);
      if (!temp || temp.length != 1) {
        return callback(new Error('已选过此物品'));
      }
      callback();
    };
    return {
      loading: false,
      warehouseOptions: [], // 退回仓库列表
      categoryOptions: [], // 物品分类列表
      modelList: [], //型号列表
      fenfaSetting: {
        show: false,
        id: '',
      },
      fenfaData:[],
      formData: {
        warehouseId: '', // 退回仓库id
        dealTime: '', // 退回时间
        procureDoc: '',
        goods: [],
      },
      goodsItem: {
        baseCategoryIds: '', // 分类编号数组
        baseCategoryId: '', // 分类编号
        baseGoodsTemplateId: '', // 物品模版编号
        goodsTemplateName: '', // 物品模版名称
        goodsOptions: [], // 物品列表select
        modelsOptions: [], //规格型号select
        models: [], // 物品名称
        modelsIds: [], //规格型号
      },
      modelsItem: {
        baseGoodsModelsId: '', // 规格型号编号
        worehouseCount: 0,
        counts: null, // 操作数量
        unit: null, //单位
      },
      rules: {
        warehouseId: [{ required: true, message: '请选择', trigger: 'change' }],
        dealTime: [{ required: true, message: '请选择', trigger: 'change' }],
        buyType: [{ required: true, message: '请选择', trigger: 'change' }],
        baseCategoryIds: [{ required: true, message: '请选择', trigger: 'change' }],
        baseGoodsTemplateId: [{ validator: checkGoodsTemplateId, trigger: ['blur', 'change'] }],
        modelsIds: [{ required: true, message: '请选择', trigger: 'change' }],
        counts: [{ required: true, message: '请输入', trigger: 'change' }],
      },
      uploadSettings: {
        title: '上传',
        max: 20, // 最大大小,单位M
        num: 10, // 支持上传图片个数
        accept: '.jpg,.png', // 限制格式
        tip: '', // 提示 默认:`只能上传${this.defaultSettings.num}个${this.defaultSettings.accept}文件,且不超过${this.defaultSettings.max}kb`
        uploadUrl: getUploadUrl(), // 上传路径
        multiple: true, // 是否支持批量上传
        disabled: false, // 是否禁用
        type: 'picture', // text/picture
      },
    };
  },
  computed: {
    ...mapGetters(['userInfo']),
  },
  created() {
    this.init();
  },
  methods: {
    async init() {
      this.getWarehouseList();
      this.getgoodsTemplate();
      // 获取物品分类列表
      const treeRes = await getTree();
      this.categoryOptions = this.removeEmptyChildren(treeRes);
      this.formData.departmentName = this.userInfo.sysDeptName;
      this.formData.createName = this.userInfo.userName;
    },
    // 获取退回仓库列表
    getWarehouseList() {
      selectTenantWarehouse({ agencyId: this.userInfo.tenantId })
        .then((res) => {
          this.warehouseOptions = res;
          if (res.length) {
            this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem)));
          }
          if (this.warehouseOptions.length && !this.formData.warehouseId) {
            // 默认选中第一个仓库
            this.formData.warehouseId = this.warehouseOptions[0].id;
          }
        })
        .catch((err) => {
          console.log('err', err);
        });
    },
    removeEmptyChildren(arr) {
      arr.forEach((item) => {
        if (!item.children || !item.children.length) {
          delete item.children;
        } else {
          this.removeEmptyChildren(item.children);
        }
      });
      return arr;
    },
    // 获取物品名称列表
    getgoodsTemplate(id, index) {
      goodsTemplate({ categoryId: id || '' }).then((res) => {
        if (index || index == 0) {
          this.$set(this.formData.goods[index], 'goodsOptions', res);
        } else {
          this.goodsTemplatelAll = res;
        }
      });
    },
    // 根据物品名称id获取名字
    getGoodsTemplateName(id) {
      let item = this.goodsTemplatelAll.find((v) => v.id == id);
      if (item) {
        return item.goodsName;
      }
      return;
    },
    // 根据规格型号id获取名字
    getGoodsModelsName(id) {
      let item = this.goodsModelAll.find((v) => v.id == id);
      if (item) {
        return item.modelName;
      }
      return;
    },
    // 物品分类选择
    categoryChange(e, index) {
      this.formData.goods[index].goodsOptions = [];
      this.formData.goods[index].baseGoodsTemplateId = '';
      this.formData.goods[index].goodsTemplateName = '';
      this.formData.goods[index].modelsOptions = [];
      this.formData.goods[index].modelsIds = [];
      this.formData.goods[index].models = [];
      this.formData.goods[index].baseCategoryId = e[e.length - 1];
      // 根据选中分类请求物品名称列表
      this.getgoodsTemplate(e[e.length - 1], index);
    },
    // 物品名称列表选择
    goodsTemplateChange(e, index) {
      this.formData.goods[index].modelsOptions = [];
      this.formData.goods[index].modelsIds = [];
      this.formData.goods[index].models = [];
      this.formData.goods[index].goodsTemplateName = this.getGoodsTemplateName(e);
    },
    // 上传
    uploadChange() {
      let arr = this.$refs.uploadRef.fileList;
      this.formData.procureDoc = JSON.stringify(arr);
    },
    // 点击新增物品
    addGoods() {
      this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem)));
    },
    // 点击移除
    removeGoods(index) {
      this.formData.goods.splice(index, 1);
    },
    // 退回数量校验
    countsChange(e, goodsIndex, index) {
      const curItem = this.formData.goods[goodsIndex].models[index];
      const worehouseCount = curItem.worehouseCount;
      if (e == 0) {
        this.$message.warning('数额不能为0');
        curItem.counts = null;
      }
      if (e > worehouseCount) {
        this.$message.warning('数额超过现有库存');
        curItem.counts = worehouseCount > 0 ? worehouseCount : null;
      }
    },
    handleConfirm(){
    },
    // 提交
    handleSubmit() {
      this.$refs['ruleForm'].validate((valid) => {
        if (valid) {
          console.log('this.formData', this.formData);
          outputAdd(this.formData)
            .then((res) => {
              this.$message.success('保存成功!');
              this.close();
              this.$emit('search');
            })
            .catch((err) => {
              console.log('edit err', err);
              this.$message.error('保存失败');
            });
        } else {
          this.$message.error('校验未通过,请检查。');
        }
      });
    },
    close() {
      this.formData = {
        warehouseId: '', // 退回仓库id
        dealTime: '', // 退回时间
        goods: [],
      };
      this.$emit('close');
    },
  },
};
</script>
<style scoped lang="scss">
@import url(../../../../styles/store.scss);
.cursor-p {
  ::v-deep {
    .el-input__inner {
      cursor: pointer;
    }
  }
}
</style>
admin-web/src/views/departmentitem/itemret/returnNote/index.vue
@@ -1,449 +1,157 @@
<template>
  <div class="app-container">
  <div class="app-container stock-container">
    <el-container>
      <el-container>
        <el-card class="box-card" style="width: 100%" shadow="never">
          <!--搜索条件-->
          <div class="filter-container">
            <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search>
          </div>
          <el-row style="margin-top: 15px">
            <el-col>
              <!--列表-->
              <my-button name="新增" @click="addtable" site="form" />
              <div :style="{'overflow-y': 'auto', height:`${clientHeight - 320}px`}">
                    <el-row class="card"
                            :gutter="5">
                        <el-col v-for="(item, index) in proData" :key="index" class="cm-item">
                          <el-card class="card-data">
                            <div class="card-container">
                              <div class="hed-one">出库单号:{{ item.order_no }}</div>
                              <div class="one-hed">
                                <div class="box"><span class="span-two">机构:</span>{{ item.customer_name }}</div>
                                <div class="box"><span class="span-two">操作人:</span>{{ item.customer_name }}</div>
                                <div class="box"><span class="span-two">出库时间:</span>{{ item.customer_name }}</div>
                              </div>
                              <div class="card-end">
                                <div v-for="(just, index) in item.data" class="two-end">
                                  <div class="item"><span>{{ just.order_no }}:</span>{{ just.customer_name }}</div>
                                </div>
                              </div>
                            </div>
                            <div class="card-but">
                              <my-button name="查看详情"   site="form" />
                              <my-button name="导出出库单" site="form" />
                            </div>
                          </el-card>
                        </el-col>
                    </el-row>
              </div>
              <el-pagination
                :small="false"
                :current-page="1"
                :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]"
                :page-size="10"
                layout="total, sizes, prev, pager, next, jumper"
                :total="0"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
              />
            </el-col>
          </el-row>
          <!--添加/编辑弹窗-->
          <el-dialog title="新增出库"  :close-on-click-modal="false" :visible.sync="adddialog" width="60%" >
            <el-form ref="ruleForm" :model="formData" class="demo-ruleForm" label-width="100px">
              <el-row :gutter="24" class="headerHeight">
                  <el-col :span="12">
                    <el-form-item label="仓库名称" prop="name">
                      <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="仓库名称" prop="name">
                      <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="24" class="headerHeight">
                  <el-col :span="24">
                    <el-form-item label="出库手续" prop="name">
                      仅允许导入xls、xlsx格式文件
                    </el-form-item>
                  </el-col>
                </el-row>
                <div style="position: relative;">
                  <div style="background-color: #F9F9F9;width: 90%;">
                  <el-row :gutter="24" class="">
                    <el-col :span="12">
                      <el-form-item label="仓库名称" prop="name">
                        <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/>
                      </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item label="仓库名称" prop="name">
                        <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row :gutter="24" class="">
                    <el-col :span="12">
                      <el-form-item label="仓库名称" prop="name">
                        <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-table :data="formData.tableData" height="100%"  :stripe="true">
                    <el-table-column prop="projectName" label="规格型号" align="center"> </el-table-column>
                    <el-table-column prop="time1" label="单位"  align="center"> </el-table-column>
                    <el-table-column prop="unit" label="现有库存" align="center"> </el-table-column>
                    <el-table-column prop="time2" label="出库数量"  align="center"> </el-table-column>
                  </el-table>
                  </div>
                  <div style="position: absolute;right: 0;top: 152px;">
                    <my-button style="display: block;margin-left: 10px;margin-bottom: 5px;" name="移除" site="form"/>
                    <my-button name="新增物品" site="form"/>
                  </div>
                </div>
            </el-form>
            <div slot="footer" align="center" class="dialog-footer">
              <my-button name="确定" site="form" />
              <my-button name="取消" site="form" @click="adddialog = false"/>
      <el-card class="box-card" style="width: 100%" shadow="never">
        <!--搜索条件-->
        <div class="filter-container">
          <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search>
        </div>
        <el-row style="margin-top: 15px">
          <el-col>
            <!--列表-->
            <div class="table-tool-bar" style="margin-bottom: 15px;">
              <my-button name="新增" @click="handleAdd" site="tools" size="medium" />
            </div>
          </el-dialog>
        </el-card>
      </el-container>
            <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading">
              <el-row v-if="list.length" class="card" :gutter="5">
                <el-col v-for="(item, index) in list" :key="index" class="cm-item">
                  <el-card class="card-data">
                    <div class="card-container">
                      <div class="card-header">
                        <div class="card-header-left">
                          <span>退回单号:</span>
                          <span class="value">{{ item.businessFormCode }}</span>
                        </div>
                        <div class="card-header-right">
                            <el-button site="form" type="success" size="mini" @click="handleExport(item)"
                              >导出退回单</el-button
                            >
                          <el-button name="查看详情" site="form" type="info" size="mini" @click="handleDetail(item)"
                            >查看详情</el-button
                          >
                        </div>
                      </div>
                      <div class="one-hed">
                        <div class="box"><span class="span-two">部门:</span>{{ item.agencyName }}</div>
                        <div class="box"><span class="span-two">操作人:</span>{{ item.operatorName }}</div>
                        <div class="box">
                          <span class="span-two">退回时间:</span>{{ item.dealTime | formatTime }}
                        </div>
                      </div>
                      <div class="card-end">
                        <div v-for="(just, index) in item.formOutputTemplateInfoList" :key="index" class="item">
                          <div class="name">{{ just.goodsName }}</div>
                          <div class="value-box">
                            <div class="value-box-item">
                              <span class="label">数量:</span>
                              <span class="value">{{ just.count }}</span>
                              <span class="unit">{{ just.unit }}</span>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </el-card>
                </el-col>
              </el-row>
              <div class="no-data" v-else>暂无数据</div>
            </div>
            <el-pagination
              :small="false"
              :current-page="pageNum"
              :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]"
              :page-size="pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total"
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
            />
          </el-col>
        </el-row>
      </el-card>
    </el-container>
    <my-import
      :import-setting="importSetting"
      :dialog-show="importSetting.dialogShow"
      :dialog-title="importSetting.dialogTitle"
    />
    <!--添加/编辑弹窗-->
    <edit v-if="editSetting.show" :setting="editSetting" ref="editRef" @close="editSetting.show=false" @search="refreshData"></edit>
    <detail v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show=false" ref="detailRef"></detail>
  </div>
</template>
<script>
import MyButton from "@/components/myButton/myButton";
import SettingIplatform from '@/utils/settingIplatform';
import myImport from '@/views/components/myImport'
import {getBaseUrl} from '@/utils/base';
import { outputList } from '@/api/stock/accessStock';
import MyButton from '@/components/myButton/myButton';
import myImport from '@/views/components/myImport';
import edit from './edit';
import detail from './detail';
import listPage from '../../../mixins/listPage'
export default {
  name: "index",
  components: {MyButton, myImport},
  name: 'index',
  mixins: [listPage],
  components: { MyButton, myImport, edit, detail },
  data() {
    return {
      adddialog: false,
      formData:{
        tableData:[
          {
            projectName:'555'
          },
          {
            projectName:'444'
          }
        ],
      },
      list: [],
      // 搜索框
      items: [
        {
          type: 'text',
          dataIndex: 'name',
          label: '出库单号',
          dataIndex: 'businessFormCode',
          label: '退回单号',
          placeholder: '请输入',
          defaultValue: ''
          defaultValue: '',
        },
        {
          type: 'text',
          dataIndex: 'name',
          dataIndex: 'goodsName',
          label: '物品名称',
          placeholder: '可模糊搜索',
          defaultValue: ''
        },
        {
          type: 'text',
          dataIndex: 'name',
          label: '创建人',
          placeholder: '请输入',
          defaultValue: ''
          defaultValue: '',
        },
        {
          type: 'date-picker',
          dataIndex: 'val1',
          label: '出库时间',
          defaultValue: ''
          dataIndex: 'startTime',
          label: '退回时间',
          defaultValue: '',
        },
        {
          type: 'date-picker',
          dataIndex: 'val2',
          dataIndex: 'endTime',
          label: '至',
          defaultValue: ''
          defaultValue: '',
        },
        // {
        //   type: 'select',
        //   dataIndex: 'status',
        //   label: '状态',
        //   placeholder: '请选择',
        //   defaultValue: '1',
        //   options: [
        //     {
        //       label: '启用',
        //       value: '1'
        //     },
        //     {
        //       label: '禁用',
        //       value: '0'
        //     }
        //   ]
        // }
      ],
      proData: [
        {
          order_no:'55555',
          customer_name:'666',
          data:[
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'20件'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
          ]
        },
        {
          order_no:'55555',
          customer_name:'666',
          data:[
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
          ]
        },
        {
          order_no:'55555',
          customer_name:'666',
          data:[
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'20件'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
          ]
        },
        {
          order_no:'55555',
          customer_name:'666',
          data:[
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'20件'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
          ]
        },
        {
          order_no:'55555',
          customer_name:'666',
          data:[
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'20件'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
          ]
        },
        {
          order_no:'55555',
          customer_name:'666',
          data:[
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'20件'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
          ]
        },
        {
          order_no:'55555',
          customer_name:'666',
          data:[
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'20件'
            },
            {
              order_no:'石勒芬褐色碳粉',
              customer_name:'666'
            },
          ]
        }
      ],
      // 树数据
      treeDataList: [],
      // 搜索条件
      filterFrom: {
        tenantId: null,
        userName: null,
        userPhone: null,
        status: 1
      },
      // 导入
      importSetting: {
          dialogTitle: '导入',
          dialogShow: false,
          fileSettings: {
              data: {},
              uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址
              accept: '.xls', // 格式
              type: 'text', // 回显形式
              loading: false // 导入效果
          },
          /* 模板下载 */
          templateSettings: {
              templateName: '导入模板.xls', // 名称
              templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址
          },
          onSuccess: null
      },
      editSetting: {
        title: '',
        id: '',
        orgId: '',
        show: false,
      },
    }
  },
  computed: {
    clientHeight () {
      return document.documentElement.clientHeight
    },
  },
  created() {
    };
  },
  methods: {
    handleSizeChange(){},
    handleCurrentChange(){},
    //导入
    importOrg() {
        this.importSetting.dialogShow = true
        this.importSetting.onSuccess = (response, callBack) => {
            if (response.code===1){
              this.$message.success(response.msg)
              this.search(1)
            }else{
              this.$message.warning(response.msg)
            }
            callBack()
        }
    },
    addtable() {
      this.adddialog = true
    },
    // 查询table列表
    search(pageNum) {
      if (pageNum != undefined) {
        // this.$refs.myTable.search(pageNum)
      } else {
        // this.$refs.myTable.search()
      }
    fetchData() {
      this.loading = true;
      outputList({
        pageNum: this.pageNum,
        pageSize: this.pageSize,
        ...this.filterFrom,
      }).then((res) => {
        this.list = res.datas;
        this.total = res.totalRows;
        this.loading = false;
      });
    },
    fifterForm(params) {
      console.log(params,'555');
      this.filterFrom = Object.assign(this.filterFrom, params)
      this.search(1)
    }
  }
}
      this.filterFrom = Object.assign(this.filterFrom, params);
      if (this.filterFrom.startTime) {
        this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, '');
      }
      if (this.filterFrom.endTime) {
        this.filterFrom.endTime = this.filterFrom.endTime.replace(/\-/g, '');
      }
      if (this.filterFrom.agencyId&&this.filterFrom.agencyId.length) {
        this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1];
      }
      this.search(1);
    },
  },
};
</script>
<style scoped>
.card {
    display: flex;
    flex-wrap: wrap;
    margin: 0px !important;
    .cm-item {
        width: 100%;
    }
    .cm-item /deep/ .el-card__body {
        padding: 10px;
    }
}
.card-data{
  margin-top: 8px;
  .card-container{
    display: inline-block;
    width: 70%;
    .hed-one{
      color: #2298EE;
      font-size: 18px;
    }
    .one-hed{
      margin-top: 15px;
      .box{
        display: inline-block;
        margin-right: 20px;
      }
    }
    .span-two{
      color: #83919e;
      font-size: 14px;
    }
    .card-end{
      font-size: 14px;
      color: #3d3d3d;
      margin-top: 15px;
      display: flex;
      flex-wrap: wrap;
      .two-end{
        width: calc(33.33% - 20px);
        margin-bottom: 15px;
      }
    }
  }
  .card-but{
    display: inline-block;
  }
  .end{
    display: inline-block;
  }
}
<style scoped lang="scss">
@import url(../../../../styles/store.scss);
</style>
admin-web/src/views/departmentitem/ledgerquy/itemQuy/index.vue
@@ -13,16 +13,9 @@
              <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/>
            </el-col>
          </el-row>
          <!--添加/编辑弹窗-->
          <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/>
        </el-card>
      </el-container>
    </el-container>
    <my-import
      :import-setting="importSetting"
      :dialog-show="importSetting.dialogShow"
      :dialog-title="importSetting.dialogTitle"
    />
  </div>
</template>
@@ -30,41 +23,32 @@
import MyTableV2 from "@/components/myTable/myTableV2";
import MyButton from "@/components/myButton/myButton";
import SettingIplatform from '@/utils/settingIplatform';
import edit from './edit'
import * as finsystenant from '@/api/baseSetting/finsystenant'
import myImport from '@/views/components/myImport'
import {getBaseUrl} from '@/utils/base';
export default {
  name: "index",
  components: {MyButton, MyTableV2, edit, myImport},
  components: {MyButton, MyTableV2,},
  data() {
    return {
      // 搜索框
      items: [
        {
          type: 'text',
          dataIndex: 'name',
          label: '单号',
          placeholder: '请输入',
          defaultValue: ''
          type: 'cascader',
          dataIndex: 'agencyId',
          label: '机构',
          placeholder: '请选择',
          optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
          defaultValue: '',
          options: [],
        },
        {
          type: 'select',
          dataIndex: 'status',
          label: '类型',
          dataIndex: 'name',
          label: '部门',
          placeholder: '请选择',
          defaultValue: '1',
          options: [
            {
              label: '启用',
              value: '1'
            },
            {
              label: '禁用',
              value: '0'
            }
          ]
          defaultValue: '',
          options: [],
        },
        {
          type: 'text',
@@ -74,11 +58,20 @@
          defaultValue: ''
        },
        {
          type: 'text',
          type: 'select',
          dataIndex: 'name',
          label: '创建人',
          placeholder: '请输入',
          defaultValue: ''
          label: '分类',
          placeholder: '请选择',
          defaultValue: '',
          options: [],
        },
        {
          type: 'select',
          dataIndex: 'name',
          label: '类别',
          placeholder: '请选择',
          defaultValue: '',
          options: [],
        },
      ],
      // 树数据
@@ -89,24 +82,6 @@
        userName: null,
        userPhone: null,
        status: 1
      },
      // 导入
      importSetting: {
          dialogTitle: '导入',
          dialogShow: false,
          fileSettings: {
              data: {},
              uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址
              accept: '.xls', // 格式
              type: 'text', // 回显形式
              loading: false // 导入效果
          },
          /* 模板下载 */
          templateSettings: {
              templateName: '导入模板.xls', // 名称
              templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址
          },
          onSuccess: null
      },
      editSetting: {
        title: '',
@@ -133,15 +108,14 @@
        },
        // 列信息
        columns: [
          {title: '类型', field: 'name', align: 'left',},
          {title: '单号', field: 'code', align: 'center'},
          {title: '物品名称', field: 'lv', align: 'center', },
          {title: '规格型号', field: 'lv', align: 'center', },
          {title: '出入库数量', field: 'summary', align: 'left',},
          {title: '金额', field: 'summary', align: 'left',},
          {title: '所属机构', field: 'summary', align: 'left',},
          {title: '创建人', field: 'summary', align: 'left',},
          {title: '操作时间', field: 'summary', align: 'left',},
          {title: '机构', field: 'name', align: 'left',},
          {title: '部门', field: 'code', align: 'center'},
          {title: '分类', field: 'lv', align: 'center', },
          {title: '所属类别', field: 'lv', align: 'center', },
          {title: '物品名称', field: 'summary', align: 'left',},
          {title: '规格型号', field: 'summary', align: 'left',},
          {title: '单位', field: 'summary', align: 'left',},
          {title: '在用数量', field: 'summary', align: 'left',},
        ],
        // 操作信息
        operation: {
@@ -170,94 +144,13 @@
    }
  },
  created() {
    // 获取机构树
    this.initTreeData()
  },
  methods: {
    //导入
    importOrg() {
        this.importSetting.dialogShow = true
        this.importSetting.onSuccess = (response, callBack) => {
            if (response.code===1){
              this.$message.success(response.msg)
              this.search(1)
            }else{
              this.$message.warning(response.msg)
            }
            callBack()
        }
    },
    // 左侧树初始化
    initTreeData() {
      finsystenant.getTree().then(res => {
        const content = res || []
        this.treeDataList.splice(0, this.treeDataList.length)
        this.treeDataList = content
        if (content.length > 0) {
          this.importSetting.fileSettings.data = {pid: content[0].id}
        }
      })
    },
    updState(row) {
      let vm = this
      let text = row.status == 0 ? "启用" : "禁用";
      vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () {
        let params = Object.assign({}, row)
        params.status = row.status == 1 ? 0 : 1
        finsystenant.edit(params).then(res => {
          if (res) {
            row.status = row.status === 1 ? 0 : 1
            vm.$modal.msgSuccess(text + "成功");
            vm.search()
          }
        })
      })
    },
    del(row) {
      this.$modal
        .confirm('是否确认删除名称为"' + row.name + '"的机构吗?')
        .then(function () {
          finsystenant.del({id: row.id}).then((res) => {
          });
        })
        .then((res) => {
          this.$message.success('删除成功!');
          this.search()
        })
        .catch(() => {
        });
    },
    showAdd() {
      // if (!this.editSetting.orgId) {
      //   this.$message.warning('请先选择左侧机构')
      // } else {
        this.editSetting.id = null;
        this.editSetting.info = null;
        this.editSetting.title = '新增';
        this.editSetting.show = true;
      // }
    },
    showAudit(row) {
      this.editSetting.id = row.id;
      this.editSetting.info = JSON.stringify(row);
      this.editSetting.title = '编辑';
      this.editSetting.show = true;
    },
    nodeClick(param) {
      param = param || {}
      this.p = Object.assign({}, {
        id: param.id,
        name: param.name
      })
      if (this.p.id != undefined && this.p.id != null) {
        this.filterFrom.tenantId = this.p.id
        this.editSetting.orgId = this.p.id
      } else {
        this.filterFrom.tenantId = null
        this.editSetting.orgId = null
      }
      this.importSetting.fileSettings.data = {pid: param.id}
      this.search(1)
    },
    // 查询table列表
    search(pageNum) {
admin-web/src/views/departmentitem/ledgerquy/ledQuy/index.vue
@@ -10,44 +10,60 @@
          <el-row style="margin-top: 15px">
            <el-col>
              <!--列表-->
              <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/>
              <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" />
            </el-col>
          </el-row>
          <!--添加/编辑弹窗-->
          <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/>
        </el-card>
      </el-container>
    </el-container>
    <my-import
      :import-setting="importSetting"
      :dialog-show="importSetting.dialogShow"
      :dialog-title="importSetting.dialogTitle"
    />
  </div>
</template>
<script>
import MyTableV2 from "@/components/myTable/myTableV2";
import MyButton from "@/components/myButton/myButton";
import MyTableV2 from '@/components/myTable/myTableV2';
import MyButton from '@/components/myButton/myButton';
import SettingIplatform from '@/utils/settingIplatform';
import edit from './edit'
import * as finsystenant from '@/api/baseSetting/finsystenant'
import myImport from '@/views/components/myImport'
import {getBaseUrl} from '@/utils/base';
import * as finsystenant from '@/api/baseSetting/finsystenant';
import { getBaseUrl } from '@/utils/base';
export default {
  name: "index",
  components: {MyButton, MyTableV2, edit, myImport},
  name: 'index',
  components: { MyButton, MyTableV2 },
  data() {
    return {
      // 搜索框
      items: [
        {
          type: 'cascader',
          dataIndex: 'agencyId',
          label: '机构',
          placeholder: '请选择',
          optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
          defaultValue: '',
          options: [],
        },
        {
          type: 'select',
          dataIndex: 'name',
          label: '部门',
          placeholder: '请输入',
          defaultValue: '',
          options: [],
        },
        {
          type: 'text',
          dataIndex: 'name',
          label: '单号',
          label: '物品名称',
          placeholder: '请输入',
          defaultValue: ''
          defaultValue: '',
        },
        {
          type: 'select',
          dataIndex: 'name',
          label: '规格型号',
          placeholder: '请输入',
          defaultValue: '',
          options: [],
        },
        {
          type: 'select',
@@ -58,27 +74,39 @@
          options: [
            {
              label: '启用',
              value: '1'
              value: '1',
            },
            {
              label: '禁用',
              value: '0'
            }
          ]
              value: '0',
            },
          ],
        },
        {
          type: 'text',
          dataIndex: 'name',
          label: '物品名称',
          label: '单号',
          placeholder: '请输入',
          defaultValue: ''
          defaultValue: '',
        },
        {
          type: 'text',
          dataIndex: 'name',
          label: '创建人',
          label: '操作人',
          placeholder: '请输入',
          defaultValue: ''
          defaultValue: '',
        },
        {
          type: 'date-picker',
          dataIndex: 'dealTimeStart',
          label: '时间',
          defaultValue: '',
        },
        {
          type: 'date-picker',
          dataIndex: 'dealTimeEnd',
          label: '至',
          defaultValue: '',
        },
      ],
      // 树数据
@@ -88,25 +116,7 @@
        tenantId: null,
        userName: null,
        userPhone: null,
        status: 1
      },
      // 导入
      importSetting: {
          dialogTitle: '导入',
          dialogShow: false,
          fileSettings: {
              data: {},
              uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址
              accept: '.xls', // 格式
              type: 'text', // 回显形式
              loading: false // 导入效果
          },
          /* 模板下载 */
          templateSettings: {
              templateName: '导入模板.xls', // 名称
              templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址
          },
          onSuccess: null
        status: 1,
      },
      editSetting: {
        title: '',
@@ -121,27 +131,37 @@
        url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址
        // 工具条
        tools: {
          columnsCtrl: {// 列控制按钮
            show: false
          columnsCtrl: {
            // 列控制按钮
            show: false,
          },
          generalExport: {// 通用导出按钮
            show: false
          generalExport: {
            // 通用导出按钮
            show: false,
          },
          // 自定义工具条按钮
          custom: [
          ]
          custom: [],
        },
        // 列信息
        columns: [
          {title: '类型', field: 'name', align: 'left',},
          {title: '单号', field: 'code', align: 'center'},
          {title: '物品名称', field: 'lv', align: 'center', },
          {title: '规格型号', field: 'lv', align: 'center', },
          {title: '出入库数量', field: 'summary', align: 'left',},
          {title: '金额', field: 'summary', align: 'left',},
          {title: '所属机构', field: 'summary', align: 'left',},
          {title: '创建人', field: 'summary', align: 'left',},
          {title: '操作时间', field: 'summary', align: 'left',},
          { title: '机构', field: 'name', align: 'left' },
          { title: '部门', field: 'code', align: 'center' },
          { title: '物品名称', field: 'lv', align: 'center' },
          { title: '规格型号', field: 'lv', align: 'center' },
          { title: '类型', field: 'summary', align: 'left' },
          { title: '单号', field: 'summary', align: 'left' },
          { title: '数量', field: 'summary', align: 'left' },
          { title: '操作前数量', field: 'summary', align: 'left' },
          { title: '操作后数量', field: 'summary', align: 'left' },
          {
            title: '操作时间',
            field: 'summary',
            align: 'left',
            width: 160,
            formatter: (row) => {
              return { value: DateFormatter.LongToDateTime(row.procureTime) };
            },
          },
        ],
        // 操作信息
        operation: {
@@ -163,118 +183,34 @@
            small: false,
            pageNum: 1,
            pageSize: 10,
            total: 0
          }
        }
            total: 0,
          },
        },
      },
    }
    };
  },
  created() {
    // 获取机构树
    this.initTreeData()
  },
  created() {},
  methods: {
    //导入
    importOrg() {
        this.importSetting.dialogShow = true
        this.importSetting.onSuccess = (response, callBack) => {
            if (response.code===1){
              this.$message.success(response.msg)
              this.search(1)
            }else{
              this.$message.warning(response.msg)
            }
            callBack()
        }
    },
    // 左侧树初始化
    initTreeData() {
      finsystenant.getTree().then(res => {
        const content = res || []
        this.treeDataList.splice(0, this.treeDataList.length)
        this.treeDataList = content
        if (content.length > 0) {
          this.importSetting.fileSettings.data = {pid: content[0].id}
        }
      })
    },
    updState(row) {
      let vm = this
      let text = row.status == 0 ? "启用" : "禁用";
      vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () {
        let params = Object.assign({}, row)
        params.status = row.status == 1 ? 0 : 1
        finsystenant.edit(params).then(res => {
          if (res) {
            row.status = row.status === 1 ? 0 : 1
            vm.$modal.msgSuccess(text + "成功");
            vm.search()
          }
        })
      })
    },
    del(row) {
      this.$modal
        .confirm('是否确认删除名称为"' + row.name + '"的机构吗?')
        .then(function () {
          finsystenant.del({id: row.id}).then((res) => {
          });
        })
        .then((res) => {
          this.$message.success('删除成功!');
          this.search()
        })
        .catch(() => {
        });
    },
    showAdd() {
      // if (!this.editSetting.orgId) {
      //   this.$message.warning('请先选择左侧机构')
      // } else {
        this.editSetting.id = null;
        this.editSetting.info = null;
        this.editSetting.title = '新增';
        this.editSetting.show = true;
      // }
    },
    showAudit(row) {
      this.editSetting.id = row.id;
      this.editSetting.info = JSON.stringify(row);
      this.editSetting.title = '编辑';
      this.editSetting.show = true;
    },
    nodeClick(param) {
      param = param || {}
      this.p = Object.assign({}, {
        id: param.id,
        name: param.name
      })
      if (this.p.id != undefined && this.p.id != null) {
        this.filterFrom.tenantId = this.p.id
        this.editSetting.orgId = this.p.id
      } else {
        this.filterFrom.tenantId = null
        this.editSetting.orgId = null
      }
      this.importSetting.fileSettings.data = {pid: param.id}
      this.search(1)
    },
    // 查询table列表
    search(pageNum) {
      if (pageNum != undefined) {
        this.$refs.myTable.search(pageNum)
        this.$refs.myTable.search(pageNum);
      } else {
        this.$refs.myTable.search()
        this.$refs.myTable.search();
      }
    },
    fifterForm(params) {
      this.filterFrom = Object.assign(this.filterFrom, params)
      this.search(1)
    }
  }
}
      this.filterFrom = Object.assign(this.filterFrom, params);
      this.search(1);
    },
  },
};
</script>
<style scoped>
</style>
<style scoped></style>
admin-web/src/views/foundation/store/person.vue
@@ -1,5 +1,5 @@
<template>
  <win-md :title="setting.title" @close="close" :width="'800px'">
  <win-md :title="setting.title" @close="close" :width="'800px'" :loading="loading">
    <div class="section-container">
      <div class="section-left">
        <div class="header-row"><span class="title">选择人员:</span></div>
@@ -52,6 +52,8 @@
  },
  data() {
    return {
      loading:true,
      loadingText:'加载中',
      selectdSections: [],
      treeData: [],
      formData: {},
@@ -64,15 +66,10 @@
  },
  computed: {
    checkedKeys() {
      console.log(
        1111,
        this.selectdSections.map((v) => v.id),
      );
      return this.selectdSections.map((v) => v.id);
    },
  },
  created() {
    console.log(this.setting);
    if (this.setting.info) {
      this.formData = Object.assign({}, JSON.parse(this.setting.info));
    }
@@ -84,6 +81,7 @@
        return item;
      });
      this.key = Math.random();
    this.loading = false
    });
  },
  methods: {
@@ -145,12 +143,16 @@
          managerName: item.name,
        });
      });
      debugger;
      warehouseManagerAdd(params).then((res) => {
      setTimeout(()=>{
        this.$message.success('保存成功!');
        this.close();
        this.$emit('search');
      });
      },6000)
      // warehouseManagerAdd(params).then((res) => {
      //   this.$message.success('保存成功!');
      //   this.close();
      //   this.$emit('search');
      // });
    },
  },
};
admin-web/src/views/stock/accessStock/outbound/detail.vue
@@ -1,5 +1,5 @@
<template>
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'">
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'" :loading="loading">
    <el-row :gutter="20">
      <el-col :span="8">
        <span>出库单号:</span>
@@ -82,6 +82,7 @@
  },
  data() {
    return {
      loading:true,
      detail: {
        categoryName: '',
        businessFormCode: '',
@@ -106,6 +107,7 @@
  created() {
    outputDetail({ id: this.setting.id }).then((res) => {
      this.detail = res;
      this.loading = false
    });
  },
  methods: {
admin-web/src/views/stock/accessStock/outbound/edit.vue
@@ -169,7 +169,7 @@
    </el-form>
    <div slot="footer" align="center" class="dialog-footer">
      <my-button name="取消" site="form" @click="close" />
      <my-button name="保存" site="form" @click="handleSubmit" />
      <el-button name="保存" type="primary" size="medium" :loading="btnloading" @click="handleSubmit">保存</el-button>
    </div>
  </win-md>
</template>
@@ -211,6 +211,7 @@
    };
    return {
      loading: false,
      btnloading: false,
      warehouseOptions: [], // 出库仓库列表
      categoryOptions: [], // 物品分类列表
      modelList: [], //型号列表
@@ -432,19 +433,23 @@
    handleSubmit() {
      this.$refs['ruleForm'].validate((valid) => {
        if (valid) {
          this.btnloading = true;
          console.log('this.formData', this.formData);
          outputAdd(this.formData)
            .then((res) => {
              this.$message.success('保存成功!');
              this.btnloading = false;
              this.close();
              this.$emit('search');
            })
            .catch((err) => {
              console.log('edit err', err);
              this.btnloading = false;
              this.$message.error('保存失败');
            });
        } else {
          this.$message.error('校验未通过,请检查。');
          this.btnloading = false;
        }
      });
    },
admin-web/src/views/stock/accessStock/outboundDetails/index.vue
@@ -51,13 +51,16 @@
          label: '类型',
          placeholder: '请选择',
          defaultValue: '',
          options: [{
            label:'采购入库',
            value:1
          },{
            label:'退还入库',
            value:2
          }],
          options: [
            {
              label: '采购入库',
              value: 1,
            },
            {
              label: '退还入库',
              value: 2,
            },
          ],
        },
        {
          type: 'select',
@@ -152,7 +155,15 @@
          { title: '金额', field: 'totalPrice', align: 'left' },
          { title: '所属机构', field: 'agencyName', align: 'left' },
          { title: '创建人', field: 'createdName', align: 'left' },
          { title: '操作时间', field: 'dealTime', align: 'left' },
          {
            title: '操作时间',
            field: 'dealTime',
            align: 'center',
            width: 160,
            formatter: (row) => {
              return { value: DateFormatter.LongToDateTime(row.createTime) };
            },
          },
        ],
        // 操作信息
        operation: {
admin-web/src/views/stock/index.scss
@@ -2,7 +2,8 @@
  .ml-20 {
    margin-left: 20px;
  }
  .card,.list-item {
  .card,
  .list-item {
    display: flex;
    flex-wrap: wrap;
    margin: 0px !important;
@@ -47,7 +48,7 @@
          text-align: center;
          border-radius: 4px;
          border: 1px solid #f9675b99;
          background: rgba($color:#f9675b99,$alpha:0.1);
          background: rgba($color: #f9675b99, $alpha: 0.1);
          font-family: 'Microsoft YaHei';
          color: #f9675b;
          font-size: 13px;
@@ -57,17 +58,17 @@
        }
        .states-success {
          border: 1px solid #39ad6199;
          background: rgba($color:#39ad6199,$alpha:0.1);
          background: rgba($color: #39ad6199, $alpha: 0.1);
          color: #39ad61;
        }
        .states-info {
          border: 1px solid #999999;
          background: rgba($color:#999999,$alpha:0.1);
          background: rgba($color: #999999, $alpha: 0.1);
          color: #999999;
        }
        .states-warning {
          border: 1px solid #e6a23c;
          background: rgba($color:#e6a23c,$alpha:0.1);
          background: rgba($color: #e6a23c, $alpha: 0.1);
          color: #e6a23c;
        }
      }
@@ -128,15 +129,19 @@
      }
    }
  }
  .el-pagination {
    display: flex;
    justify-content: flex-end;
  }
}
.no-data{
.no-data {
  margin-top: 100px;
  text-align: center;
  color: #909399;
}
/*编辑*/
.stock-edit{
.stock-edit {
  .main-w {
    width: 88%;
  }
@@ -169,7 +174,7 @@
}
/*详情*/
.stock-detail{
.stock-detail {
  .img-row {
    display: flex;
    align-content: center;
@@ -185,7 +190,7 @@
      width: 100%;
    }
  }
  .goods-card {
    position: relative;
    background: #f6f6f6;
@@ -198,4 +203,4 @@
      margin-top: 0;
    }
  }
}
}
admin-web/src/views/stock/inventorycount/inventorytask/detail.vue
@@ -8,11 +8,6 @@
    <el-table v-loading="loading" :data="formData.tableData" height="100%" :stripe="true" class="the-table">
      <el-table-column prop="goodsTemplateName" label="物品名称"> </el-table-column>
      <el-table-column prop="baseGoodsModelsId" label="型号" align="center"> </el-table-column>
      <el-table-column prop="classification" label="购置日期"> </el-table-column>
      <el-table-column prop="unit" label="使用部门" align="center"> </el-table-column>
      <el-table-column prop="kc" label="使用人" align="center"> </el-table-column>
      <el-table-column prop="price" label="单价" align="center"> </el-table-column>
      <el-table-column prop="inventoryResult" label="金额" align="center"> </el-table-column>
      <el-table-column prop="inventoryCounts" label="应盘数量" align="center"></el-table-column>
      <el-table-column prop="inventoryCounts" label="实盘数量" align="center"></el-table-column>
      <el-table-column prop="inventoryCounts" label="状态" align="center"></el-table-column>
admin-web/src/views/stock/inventorycount/inventorytask/edit.vue
@@ -15,21 +15,21 @@
          <el-option v-for="item in warehouseOptions" :key="item.id" :label="item.warehouseName" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label="盘点人" prop="operatorId">
        <el-select v-model="formData.operatorId" placeholder="请选择" style="width: 100%">
          <el-option v-for="item in operatorOptions" :key="item.id" :label="item.warehouseName" :value="item.id" />
      <el-form-item label="盘点人" prop="operatorUserId">
        <el-select v-model="formData.operatorUserId" placeholder="请选择" style="width: 100%">
          <el-option v-for="item in operatorOptions" :key="item.id" :label="item.managerName" :value="item.managerId" />
        </el-select>
      </el-form-item>
      <el-form-item label="监盘人" prop="operatorId2">
        <el-select v-model="formData.operatorId2" placeholder="请选择" style="width: 100%">
          <el-option v-for="item in operatorOptions" :key="item.id" :label="item.warehouseName" :value="item.id" />
      <el-form-item label="监盘人" prop="monitorUserId">
        <el-select v-model="formData.monitorUserId" placeholder="请选择" style="width: 100%">
          <el-option v-for="item in operatorOptions2" :key="item.id" :label="item.userName" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label="备注" prop="beiz1">
      <el-form-item label="备注" prop="remark">
        <el-input
          type="textarea"
          placeholder="请输入内容"
          v-model="formData.beiz1"
          v-model="formData.remark"
          resize="none"
          maxlength="100"
          show-word-limit
@@ -44,11 +44,12 @@
</template>
<script>
import { selectTenantWarehouse } from '@/api/baseSetting/finsystenant';
import { selectTenantWarehouse, tenantUserQueryUser } from '@/api/baseSetting/finsystenant';
import { inventoryAdd, inventoryEdit } from '@/api/stock/inventory';
import { warehouseManagerList } from '@/api/foudation/store';
import winSm from '@/components/win/win-sm';
import myButton from '@/components/myButton/myButton';
import {formatDate} from '@/utils/DateFormatter'
import { formatDate } from '@/utils/DateFormatter';
import { mapGetters } from 'vuex';
export default {
@@ -64,35 +65,47 @@
      checkAll: false,
      checkedList: [],
      warehouseOptions: [], // 仓库列表
      operatorOptions:[],
      operatorOptions: [],
      operatorOptions2: [],
      formData: {},
      rules: {
        businessFormName: [{ required: true, message: '请输入', trigger: 'blur' }],
        warehouseId: [{ required: true, message: '请选择', trigger: 'blur' }],
        operatorId: [{ required: true, message: '请选择', trigger: 'blur' }],
        operatorId2: [{ required: true, message: '请选择', trigger: 'blur' }],
        operatorUserId: [{ required: true, message: '请选择', trigger: 'blur' }],
        monitorUserId: [{ required: true, message: '请选择', trigger: 'blur' }],
      },
    };
  },
  computed:{
    ...mapGetters(['userInfo'])
  computed: {
    ...mapGetters(['userInfo']),
  },
  created() {
    if (this.setting.info) {
      this.formData = Object.assign({}, JSON.parse(this.setting.info));
    }else {
      this.formData.businessFormName = formatDate(new Date(),'yyyy年MM月份盘点')
      // this.formData = Object.assign({}, JSON.parse(this.setting.info));
    } else {
      this.formData.businessFormName = formatDate(new Date(), 'yyyy年MM月份盘点');
    }
    this.handleSelectTenantWarehouse();
    let temp =
    this.formData.operatorId = '1109327915216504'
    this.formData.operatorId2 = '10990356630810'
    this.getPdr();
    this.getJpr();
  },
  methods: {
    // 获取仓库列表
    handleSelectTenantWarehouse() {
      selectTenantWarehouse({agencyId:this.userInfo.tenantId}).then((res) => {
      selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => {
        this.warehouseOptions = res;
      });
    },
    // 获取盘点人
    getPdr() {
      warehouseManagerList({ tenantId: this.userInfo.tenantId }).then((res) => {
        this.operatorOptions = res;
      });
    },
    // 获取监盘人
    getJpr() {
      tenantUserQueryUser({ tenantId: this.userInfo.tenantId }).then((res) => {
        this.operatorOptions2 = res;
      });
    },
    getEditInfo(id) {},
@@ -106,23 +119,15 @@
          if (this.setting.id) {
            // 编辑接口
            inventoryEdit(params).then((res) => {
              if (res) {
                this.$message.success('保存成功!');
                this.close();
                this.$emit('search');
              } else {
                this.$message.error('保存失败');
              }
              this.$message.success('保存成功!');
              this.close();
              this.$emit('search');
            });
          } else {
            inventoryAdd(params).then((res) => {
              if (res) {
                this.$message.success('保存成功!');
                this.close();
                this.$emit('search');
              } else {
                this.$message.error('保存失败');
              }
              this.$message.success('保存成功!');
              this.close();
              this.$emit('search');
            });
          }
        } else {
admin-web/src/views/stock/inventorycount/inventorytask/index.vue
@@ -42,7 +42,8 @@
import myImport from '@/views/components/myImport';
import { getBaseUrl } from '@/utils/base';
import { selectTenantWarehouse } from '@/api/baseSetting/finsystenant';
import {inventoryListApi} from '@/api/stock/inventory'
import { inventoryListApi } from '@/api/stock/inventory';
import * as DateFormatter from '@/utils/DateFormatter';
export default {
  name: 'index',
@@ -157,9 +158,36 @@
          { title: '盘点仓库', field: 'warehouseName', align: 'center' },
          { title: '盘点人', field: 'operatorName', align: 'center' },
          { title: '监盘人', field: 'operatorName2', align: 'left' },
          { title: '盘点时间', field: 'inventoryDate', align: 'left' },
          { title: '创建时间', field: 'createTime', align: 'left' },
          { title: '状态', field: 'states', align: 'left' },
          {
            title: '盘点时间',
            field: 'inventoryDate',
            align: 'center',
            width: 160,
            formatter: (row) => {
              return { value: row.inventoryDate ? DateFormatter.LongToDateTime(row.inventoryDate) : '-' };
            },
          },
          {
            title: '创建时间',
            field: 'createTime',
            align: 'center',
            width: 160,
            formatter: (row) => {
              return { value: DateFormatter.LongToDateTime(row.createTime) };
            },
          },
          {
            title: '状态',
            field: 'states',
            align: 'left',
            type: 'primary',
            formatter: (row) => {
              return {
                value: row.states == 0 ? '未开始' : row.states == 1 ? '进行中' : '已盘点',
                type: row.states == 0 ? 'danger' : row.states == 1 ? 'success' : 'primary',
              };
            },
          },
        ],
        // 操作信息
        operation: {
@@ -195,17 +223,17 @@
    };
  },
  created() {
    selectTenantWarehouse().then(res=>{
      this.items.forEach(v=>{
        if(v.label=='盘点仓库') {
          v.options = res.map(item=>{
            item.label=item.warehouseName
            item.vlaue=item.id
            return item
          })
    selectTenantWarehouse().then((res) => {
      this.items.forEach((v) => {
        if (v.label == '盘点仓库') {
          v.options = res.map((item) => {
            item.label = item.warehouseName;
            item.vlaue = item.id;
            return item;
          });
        }
      })
    })
      });
    });
  },
  methods: {
    //导入
admin-web/src/views/stock/ledger/inventoryQuery/index.vue
@@ -16,11 +16,7 @@
        </el-card>
      </el-container>
    </el-container>
    <my-import
      :import-setting="importSetting"
      :dialog-show="importSetting.dialogShow"
      :dialog-title="importSetting.dialogTitle"
    />
  </div>
</template>
@@ -29,14 +25,14 @@
import MyButton from '@/components/myButton/myButton';
import SettingIplatform from '@/utils/settingIplatform';
import * as finsystenant from '@/api/baseSetting/finsystenant';
import myImport from '@/views/components/myImport';
import { getBaseUrl } from '@/utils/base';
import { selectTenantWarehouse, getCategorySelectTree } from '@/api/baseSetting/finsystenant';
import { selectTenantWarehouse, getCategorySelectTree, treeList } from '@/api/baseSetting/finsystenant';
import { getDicts } from '@/api/system/dict/data';
import { doExport } from '@/api/stock/ledger';
export default {
  name: 'index',
  components: { MyButton, MyTableV2, myImport },
  components: { MyButton, MyTableV2 },
  data() {
    return {
      // 搜索框
@@ -60,15 +56,14 @@
        },
        {
          type: 'text',
          dataIndex: 'name',
          dataIndex: 'goodsTemplateName',
          label: '物品名称',
          placeholder: '请输入',
          defaultValue: '',
        },
        {
          type: 'select',
          dataIndex: 'modelsIds',
          multiple: true,
          dataIndex: 'categoryId',
          label: '分类',
          placeholder: '请选择',
          defaultValue: '',
@@ -76,7 +71,7 @@
        },
        {
          type: 'select',
          dataIndex: 'warehouseId',
          dataIndex: 'costType',
          label: '类别',
          placeholder: '请选择',
          defaultValue: '',
@@ -92,35 +87,11 @@
        userPhone: null,
        status: 1,
      },
      // 导入
      importSetting: {
        dialogTitle: '导入',
        dialogShow: false,
        fileSettings: {
          data: {},
          uploadUrl: getBaseUrl() + '/pc/fin/sys/tenant/import', // 上传地址
          accept: '.xls', // 格式
          type: 'text', // 回显形式
          loading: false, // 导入效果
        },
        /* 模板下载 */
        templateSettings: {
          templateName: '导入模板.xls', // 名称
          templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate', // 下载地址
        },
        onSuccess: null,
      },
      editSetting: {
        title: '',
        id: '',
        orgId: '',
        show: false,
      },
      // 表格数据
      table: {
        showIndex: true, // 是否显示序号
        expand: false, // 是否显示详情数据
        url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址
        url: SettingIplatform.apiBaseURL + '/pc/fin/warehouse/ledger/getList', // 请求地址
        // 工具条
        tools: {
          columnsCtrl: {
@@ -132,18 +103,26 @@
            show: false,
          },
          // 自定义工具条按钮
          custom: [],
          custom: [
            {
              name: '导出',
              icon: 'el-icon-download',
              click: () => {
                this.handleExport();
              },
            },
          ],
        },
        // 列信息
        columns: [
          { title: '类型', field: 'name', align: 'left' },
          { title: '仓库', field: 'code', align: 'center' },
          { title: '分类', field: 'lv', align: 'center' },
          { title: '所属类别', field: 'lv', align: 'center' },
          { title: '物品名称', field: 'summary', align: 'left' },
          { title: '规格型号', field: 'summary', align: 'left' },
          { title: '单位', field: 'summary', align: 'left' },
          { title: '当前库存', field: 'summary', align: 'left' },
          { title: '机构', field: 'agencyName', align: 'center' },
          { title: '仓库', field: 'warehouseName', align: 'center' },
          { title: '分类', field: 'categoryName', align: 'center' },
          { title: '所属类别', field: 'costType', align: 'center' },
          { title: '物品名称', field: 'goodsTemplateName', align: 'left' },
          { title: '规格型号', field: 'baseGoodsModelsName', align: 'left' },
          { title: '单位', field: 'unit', align: 'left' },
          { title: '当前库存', field: 'kucun', align: 'left' },
        ],
        paging: {
          show: true, // 显示分页
@@ -168,35 +147,79 @@
          if (v.label == '仓库') {
            v.options = res.map((item) => {
              item.label = item.warehouseName;
              item.vlaue = item.id;
              item.value = item.id;
              return item;
            });
          }
        });
        console.log('this.items', this.items);
      });
      getDicts('GOODS_PRICE').then((res) => {
        // 价值类型1A 2B 3C
        this.items.forEach((v) => {
          if (v.label == '类别') {
            v.options = res.map((v) => {
              v.label = v.dict_label;
              v.value = v.dict_value;
              if (v.dict_value == 'A') {
                v.value = 1;
              } else if (v.dict_value == 'B') {
                v.value = 2;
              } else {
                v.value = 3;
              }
              return v;
            });
          }
        });
      });
      getCategorySelectTree().then((res) => {
      treeList().then((res) => {
        this.items.forEach((v) => {
          if (v.label == '分类') {
            v.options = res.map((item) => {
              item.label = item.label;
              item.vlaue = item.id;
              item.label = item.categoryName;
              item.value = item.id;
              return item;
            });
          }
        });
      });
    },
    // 导出
    handleExport() {
      let loading = this.$loading({
        lock: true,
        text: '导出中,请稍候...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)',
      });
      // 判断总条数是否大于最大支持条数
      doExport({ ...this.filterFrom })
        .then((res) => {
          const blob = new Blob([res], { type: 'application/vnd.ms-excel' });
          const fileName = `库存查询.xls`;
          if ('download' in document.createElement('a')) {
            // 非IE下载
            const elink = document.createElement('a');
            elink.download = fileName;
            elink.style.display = 'none';
            elink.href = URL.createObjectURL(blob);
            document.body.appendChild(elink);
            elink.click();
            URL.revokeObjectURL(elink.href);
            document.body.removeChild(elink);
          } else {
            // IE10+下载
            navigator.msSaveBlob(blob, fileName);
          }
          this.$message.success('导出成功!');
          loading.close();
        })
        .catch(() => {
          loading.close();
        });
    },
    // 查询table列表
    search(pageNum) {
      if (pageNum != undefined) {
@@ -207,6 +230,9 @@
    },
    fifterForm(params) {
      this.filterFrom = Object.assign(this.filterFrom, params);
      if (params.agencyId && params.agencyId.length) {
        this.filterFrom.agencyId = params.agencyId[params.agencyId.length - 1];
      }
      this.search(1);
    },
  },
admin-web/src/views/stock/procure/purchaseOrder/detail.vue
@@ -1,5 +1,5 @@
<template>
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'">
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'" :loading="loading">
    <el-row :gutter="20">
      <el-col :span="8">
        <span>入库单号:</span>
@@ -119,6 +119,7 @@
  },
  data() {
    return {
      loading:true,
      fileList: [],
      detail: {
        baseCategoryName: '',
@@ -146,6 +147,7 @@
  },
  created() {
    procureDetail({ id: this.setting.id }).then((res) => {
      this.loading = false
      this.detail = res;
      this.fileList = this.detail.procureDoc ? JSON.parse(this.detail.procureDoc) : [];
      this.$nextTick(() => {
admin-web/src/views/stock/procure/purchaseOrder/edit.vue
@@ -1,5 +1,5 @@
<template>
  <win-md class="stock-edit" :title="`${setting.title}采购入库`" @close="close" :width="'800px'">
  <win-md class="stock-edit" :title="`${setting.title}采购入库`" @close="close" :width="'800px'" :loading="loading">
    <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px">
      <div class="main-w">
        <el-row :gutter="24" class="headerHeight">
@@ -256,7 +256,7 @@
      callback();
    };
    return {
      loading: false,
      loading: true,
      buyTypeOptions: [
        {
          label: '集采',
@@ -361,6 +361,7 @@
          return item;
        });
      }
      this.loading = false;
    },
    // 获取入库仓库列表
@@ -502,8 +503,8 @@
    handleSubmit() {
      this.$refs['ruleForm'].validate((valid) => {
        if (valid) {
          this.loading = true;
          console.log('formData', this.formData);
          debugger;
          if (!this.setting.id) {
            procureAdd(this.formData)
              .then((res) => {
@@ -513,6 +514,7 @@
              })
              .catch((err) => {
                console.log('create err', err);
                this.loading = false;
                this.$message.error('保存失败');
              });
          } else {
@@ -524,6 +526,7 @@
              })
              .catch((err) => {
                console.log('edit err', err);
                this.loading = false;
                this.$message.error('保存失败');
              });
          }
admin-web/src/views/stock/procure/purchaseOrder/index.vue
@@ -120,7 +120,7 @@
import edit from './edit';
import detail from './detail';
import { getBaseUrl } from '@/utils/base';
import listPage from '../../../mixins/listPage'
import listPage from '../../../mixins/listPage';
export default {
  name: 'index',
@@ -249,17 +249,29 @@
    },
    // 入库
    handleIncome(row) {
      this.$confirm(`您确定 单号:${row.businessFormCode}  入库吗?`, '采购入库').then(() => {
        procureIncome({ id: row.id })
          .then((res) => {
            this.$message.success('入库成功!');
            this.search();
          })
          .catch(() => {});
      this.$confirm(`您确定 单号:${row.businessFormCode}  入库吗?`, '采购入库', {
        beforeClose: (action, instance, done) => {
          if (action == 'confirm') {
            instance.confirmButtonLoading = true;
            instance.confirmButtonText = '执行中...';
            procureIncome({ id: row.id })
              .then((res) => {
                this.$message.success('入库成功!');
                done();
                instance.confirmButtonLoading = false;
                this.search();
              })
              .catch(() => {
                done();
              });
          } else {
            done();
          }
        },
      });
    },
    del(row) {
      this.$modal.confirm('是否确认删除入库单号为"' + row.businessFormCode + '"的数据吗?').then( () => {
      this.$modal.confirm('是否确认删除入库单号为"' + row.businessFormCode + '"的数据吗?').then(() => {
        procureDel({ id: row.id })
          .then((res) => {
            this.$message.success('删除成功!');
admin-web/src/views/stock/transfer/transferApplication/detail.vue
@@ -1,5 +1,5 @@
<template>
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'">
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'" :loading="loading">
    <div v-loading="loading">
      <el-row :gutter="20">
        <el-col :span="8">
@@ -91,7 +91,7 @@
  },
  data() {
    return {
      loading: false,
      loading: true,
      detail: {},
      fileList:[]
    };
@@ -103,7 +103,6 @@
    },
  },
  created() {
    this.loading = true;
    transferDetail({ id: this.setting.id }).then((res) => {
      this.detail = res;
      this.fileList = this.detail.procureDoc ? JSON.parse(this.detail.procureDoc) : [];
admin-web/src/views/stock/transfer/transferApplication/index.vue
@@ -220,11 +220,25 @@
    // 入库
    handleIncome(row) {
      this.$confirm(`您确定 单号:${row.businessFormCode}  接收入库吗?`, '接收入库').then(() => {
        transfeIncome({ id: row.id }).then((res) => {
          this.$message.success('接收入库成功!');
          this.search(1);
        });
      this.$confirm(`您确定 单号:${row.businessFormCode}  接收入库吗?`, '接收入库', {
        beforeClose: (action, instance, done) => {
          if (action == 'confirm') {
            instance.confirmButtonLoading = true;
            instance.confirmButtonText = '执行中...';
            transfeIncome({ id: row.id })
              .then((res) => {
                this.$message.success('接收入库成功!');
                done();
                instance.confirmButtonLoading = false;
                this.search(1);
              })
              .catch(() => {
                done();
              });
          } else {
            done();
          }
        },
      });
    },
admin-web/src/views/stock/transfer/transferissue/index.vue
@@ -24,11 +24,7 @@
                          <div v-if="item.states == 4" class="states states-info">已撤销</div>
                        </div>
                        <div class="card-header-right">
                          <el-button
                            v-if="item.states == 1"
                            site="form"
                            type="success"
                            size="mini"
                          <el-button v-if="item.states == 1" site="form" type="success" size="mini"
                            >导出调拨出库单</el-button
                          >
                          <el-button
@@ -39,11 +35,7 @@
                            @click="handleOutput(item)"
                            >出库</el-button
                          >
                          <el-button
                            v-if="item.states == 2"
                            site="form"
                            type="primary"
                            size="mini"
                          <el-button v-if="item.states == 2" site="form" type="primary" size="mini"
                            >导出调拨入库单</el-button
                          >
                          <el-button name="查看详情" site="form" type="info" size="mini" @click="handleDetail(item)"
@@ -110,7 +102,7 @@
</template>
<script>
import { transferList,transferOutput } from '@/api/stock/transfer';
import { transferList, transferOutput } from '@/api/stock/transfer';
import MyButton from '@/components/myButton/myButton';
import myImport from '@/views/components/myImport';
import detail from './detail';
@@ -214,12 +206,25 @@
      });
    },
    handleOutput(row) {
      this.$confirm(`您确定 单号:${row.businessFormCode}  调拨出库吗?`, '调拨出库').then(() => {
        transferOutput({ id: row.id })
          .then((res) => {
            this.$message.success('调拨出库成功!');
            this.search(1);
          })
      this.$confirm(`您确定 单号:${row.businessFormCode}  调拨出库吗?`, '调拨出库', {
        beforeClose: (action, instance, done) => {
          if (action == 'confirm') {
            instance.confirmButtonLoading = true;
            instance.confirmButtonText = '执行中...';
            transferOutput({ id: row.id })
              .then((res) => {
                this.$message.success('调拨出库成功!');
                done();
                instance.confirmButtonLoading = false;
                this.search(1);
              })
              .catch(() => {
                done();
              });
          } else {
            done();
          }
        },
      });
    },
    fifterForm(params) {
admin-web/src/views/systemManger/server/user/edit.vue
@@ -87,6 +87,7 @@
        },
        data() {
            return {
                deptmentOptions:[],
                checkAll: false,
                checkedList: [],
                roleList: [