huang_an 2 жил өмнө
parent
commit
d225cffe70

+ 2 - 2
src/api/mes/index.js

@@ -26,14 +26,14 @@ export async function getCaptcha() {
 export async function pickOrderPage(params) {
   const res = await request.get(`/mes/pickorder/page`, { params });
   if (res.data.code == 0) {
-    return res.data;
+    return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
 export async function saleordersendrecordPage(params) {
   const res = await request.get(`/eom/saleordersendrecord/page`, { params });
   if (res.data.code == 0) {
-    return res.data;
+    return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }

+ 16 - 17
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -375,7 +375,7 @@
                     </el-col>
                     <el-col :span="6">
                       <el-button type="text" @click="handleSetting(row, $index)"
-                        >详情</el-button
+                        >出库明细选择</el-button
                       ></el-col
                     >
                   </el-row>
@@ -576,11 +576,11 @@
         },
 
         rules: {
-          'extInfo.assetType': {
-            required: true,
-            message: '请选择出库产品类型',
-            trigger: 'change'
-          },
+          // 'extInfo.assetType': {
+          //   required: true,
+          //   message: '请选择出库产品类型',
+          //   trigger: 'change'
+          // },
           bizType: {
             required: true,
             message: '请选择出库场景',
@@ -620,7 +620,6 @@
     methods: {
       eomSuccess(row) {
         this.formData.documentSource = row.orderNo;
-        console.log(row);
         this.onSelectTableData(row.tableData, 1);
         this.$forceUpdate();
       },
@@ -938,18 +937,18 @@
             // delete newObj.inOutAddPO.extInfo;
             console.log('2222', obj);
 
-            const res = await outin.save(obj);
-            if (res.code == 0) {
-              this.$message.success('保存成功!');
-            }
+            // const res = await outin.save(obj);
+            // if (res.code == 0) {
+            //   this.$message.success('保存成功!');
+            // }
 
-            this.saveLoading = false;
-            this.$router.push('/warehouseManagement/outgoingManagement');
+            // this.saveLoading = false;
+            // this.$router.push('/warehouseManagement/outgoingManagement');
 
-            if (res?.success) {
-              this.$message.success('保存成功!');
-              this.$router.go(-1);
-            }
+            // if (res?.success) {
+            //   this.$message.success('保存成功!');
+            //   this.$router.go(-1);
+            // }
           }
         });
       },

+ 78 - 5
src/views/warehouseManagement/outgoingManagement/components/eom.vue

@@ -5,6 +5,8 @@
       :visible.sync="dialogVisible"
       width="60%"
       :before-close="handleClose"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
     >
       <div class="main">
         <ele-pro-table
@@ -13,7 +15,7 @@
           :columns="columns"
           :current.sync="current"
           highlight-current-row
-          :datasource="tableData"
+          :datasource="datasource"
           tool-class="ele-toolbar-form"
           cache-key="systemOrgUserTable"
           @row-click="chooseRow"
@@ -62,6 +64,7 @@
     components: { eomEdit },
     data() {
       return {
+        dataSource: {},
         dialogVisible: false,
         pages: {
           pageNum: 1,
@@ -129,6 +132,51 @@
         this.$refs.eomEditRef.open(row);
       },
       async handleMine() {
+        const listParent = this.$parent.warehousingMaterialList;
+        if (this.current == null) {
+          // if (listParent.length != 0) {
+          //   this.$message.warning('当前已选择销售订单,请更换!');
+          // } else {
+          //   this.$message.warning('请先选择销售单!');
+          //   return;
+          // }
+          if (listParent.length != 0) {
+            this.dataSource.then((res) => {
+              const data = res.list;
+              let arr = [];
+              for (const key in listParent) {
+                for (const i in data) {
+                  if (
+                    listParent[key].orderNo == data[i].orderNo &&
+                    listParent[key].ids == data[i].id
+                  ) {
+                    arr.push({ ...data[i] });
+                  }
+                }
+              }
+              getById(arr[0].id).then((rep) => {
+                const obj = {
+                  ...arr[0],
+                  tableData: rep.data.productList.map((item) => {
+                    return {
+                      ...item,
+                      ids: arr[0].id,
+                      code: item.productCode,
+                      name: item.productName,
+                      contactCode: arr[0].contactCode
+                    };
+                  })
+                };
+                this.$emit('success', obj);
+                this.dialogVisible = false;
+              });
+            });
+            return;
+          } else {
+            this.$message.warning('请先选择销售单!');
+            return;
+          }
+        }
         // const current = this.current.orderInfoList;
         // for (const key in current) {
         //   if (
@@ -145,6 +193,7 @@
           tableData: res.data.productList.map((item) => {
             return {
               ...item,
+              ids: this.current.id,
               code: item.productCode,
               name: item.productName,
               contactCode: this.current.contactCode
@@ -154,12 +203,36 @@
         this.$emit('success', this.current);
         this.dialogVisible = false;
       },
+      datasource({ page, limit, where }) {
+        // const res = await pickOrderPage(this.pages);
+        // this.tableData = res.data.list;
+        // this.total = res.data.count;
+        const data = saleordersendrecordPage({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+        this.dataSource = data;
+        return data;
+      },
       async open() {
+        const listParent = this.$parent.warehousingMaterialList;
+        if (listParent.length == 0) {
+          this.current = null;
+          this.radio = null;
+        }
         this.dialogVisible = true;
-        const res = await saleordersendrecordPage(this.pages);
-        console.log(res);
-        this.tableData = res.data.list;
-        this.total = res.data.count;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10,
+            where: {}
+          });
+        });
+        // const res = await saleordersendrecordPage(this.pages);
+        // console.log(res);
+        // this.tableData = res.data.list;
+        // this.total = res.data.count;
       },
       chooseRow(row) {
         this.current = row;

+ 21 - 4
src/views/warehouseManagement/outgoingManagement/components/pickOrder.vue

@@ -15,7 +15,7 @@
           :columns="columns"
           :current.sync="current"
           highlight-current-row
-          :datasource="tableData"
+          :datasource="datasource"
           tool-class="ele-toolbar-form"
           cache-key="systemOrgUserTable"
           @row-click="chooseRow"
@@ -133,6 +133,17 @@
         this.$emit('success', this.current);
         this.dialogVisible = false;
       },
+      datasource({ page, limit, where }) {
+        // const res = await pickOrderPage(this.pages);
+        // this.tableData = res.data.list;
+        // this.total = res.data.count;
+        return pickOrderPage({
+          status: 1,
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
       async open() {
         const listParent = this.$parent.warehousingMaterialList;
         if (listParent.length == 0) {
@@ -140,9 +151,15 @@
           this.radio = null;
         }
         this.dialogVisible = true;
-        const res = await pickOrderPage(this.pages);
-        this.tableData = res.data.list;
-        this.total = res.data.count;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10,
+            where: {
+              status: 1
+            }
+          });
+        });
       },
       chooseRow(row) {
         this.current = row;

+ 3 - 1
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -37,7 +37,9 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="来源单据">
+                <el-form-item
+                  :label="infoData.bizType == 4 ? '领料单' : '来源单据'"
+                >
                   <span>{{ infoData.documentSource }}</span>
                 </el-form-item>
               </el-col>

+ 572 - 0
src/views/warehouseManagement/outgoingManagement/newFile.js

@@ -0,0 +1,572 @@
+import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+import { getTreeByGroup } from '@/api/classifyManage';
+import { tableHeader } from '../common';
+
+export default (await import('vue')).defineComponent({
+  components: {
+    pickOrder,
+    selectUpload,
+    selectTree,
+    AssetsDialog,
+    WareHouseDailog,
+    upload,
+    detailSelect,
+    // TurnToAsset,
+    outputType,
+    eom
+  },
+  data() {
+    return {
+      llList: [],
+      codeList: [],
+      materialType,
+      warehousingType,
+      outputSceneState,
+      emergencyState,
+      saveLoading: false,
+      title: '',
+      tableData2: [],
+      uploadList: [],
+      fromUserList: [], //人员数组
+      warehousingMaterialList: [],
+      activeName: 'a',
+      treeList: [],
+      staffList: [],
+      formData: {
+        extInfo: {
+          assetType: '', //物品类型
+          deptCode: '', //部门code
+          deptName: '', //部门名称
+          verifyDeptCode: '', //审核部门编码
+          verifyDeptName: '', //审核部门名称
+          deliveryName: '', //送货人名称
+          deliveryPhone: '', //送货人电话
+          documentSource: '', //销售订单
+          urgent: '', //紧急状态
+          supplierId: '', //供应商ID
+          supplierName: '', //供应商名称
+          createUserName: '', //创建人名字
+          contentImage: [] //图片数组
+        },
+        fromUser: '', //送货人
+        bizType: '', //物品类型
+        verifyId: '', //审核人Id
+        verifyName: '', //审核人名称
+
+        createUserId: '',
+        remark: ''
+      },
+
+      rules: {
+        // 'extInfo.assetType': {
+        //   required: true,
+        //   message: '请选择出库产品类型',
+        //   trigger: 'change'
+        // },
+        bizType: {
+          required: true,
+          message: '请选择出库场景',
+          trigger: 'change'
+        },
+        fromUser: {
+          required: true,
+          message: '请选择领料人',
+          trigger: 'change'
+        }
+      },
+      options: [],
+      loading: false,
+      onSelectTableDataVal: []
+    };
+  },
+  computed: {
+    tableHeader() {
+      return tableHeader(this.formData.extInfo.assetType);
+    },
+    // 条码信息
+    materialCodeReqList() {
+      console.log(
+        '===',
+        this.warehousingMaterialList
+          .map((i) => i.warehouseLedgerDetails || [])
+          .flat()
+      );
+      return this.warehousingMaterialList
+        .map((i) => i.warehouseLedgerDetails || [])
+        .flat();
+    }
+  },
+  created() {
+    this.initData();
+  },
+  methods: {
+    eomSuccess(row) {
+      this.formData.documentSource = row.orderNo;
+      console.log(row);
+      this.onSelectTableData(row.tableData, 1);
+      this.$forceUpdate();
+    },
+    pickOrderRow(row) {
+      row.tableData = [];
+      this.formData.documentSource = row.code;
+      for (const key in row.orderInfoList) {
+        if (row.orderInfoList[key].bomDetailDTOS.length != 0) {
+          for (const i in row.orderInfoList[key].bomDetailDTOS) {
+            row.tableData.push({
+              ...row.orderInfoList[key].bomDetailDTOS[i],
+              code: row.orderInfoList[key].bomDetailDTOS[i].categoryCode,
+              name: row.orderInfoList[key].bomDetailDTOS[i].categoryName,
+              modelType: row.orderInfoList[key].bomDetailDTOS[i].model,
+              id: row.orderInfoList[key].bomDetailDTOS[i].categoryId
+            });
+          }
+        }
+        if (row.orderInfoList[key].instanceList.length != 0) {
+          for (const j in row.orderInfoList[key].instanceList) {
+            row.tableData.push({
+              ...row.orderInfoList[key].instanceList[j],
+              code: row.orderInfoList[key].instanceList[j].categoryCode,
+              name: row.orderInfoList[key].instanceList[j].categoryName,
+              modelType: row.orderInfoList[key].instanceList[j].model,
+              id: row.orderInfoList[key].instanceList[j].categoryId
+            });
+          }
+        }
+      }
+
+      const uniqueItems = [];
+      const uniqueIds = new Set();
+      row.tableData.forEach((item) => {
+        if (!uniqueIds.has(item.code)) {
+          uniqueIds.add(item.code);
+          uniqueItems.push(item);
+        }
+      });
+      row.tableData = uniqueItems;
+      console.log(row);
+      this.onSelectTableData(row.tableData, 1);
+      this.$forceUpdate();
+    },
+    handleEom() {
+      this.$refs.eomRef.open();
+    },
+    handlePickorder() {
+      this.$refs.pickOrderRef.open();
+    },
+    async handleDocumentSourceChange() {
+      if (!this.formData.documentSource) {
+        if (this.formData.bizType == 4) {
+          this.warehousingMaterialList = [];
+        }
+        return;
+      }
+
+      if (
+        !(this.formData.extInfo.assetType == 7 && this.formData.bizType == 4)
+      ) {
+        return;
+      }
+
+      const loading = this.$loading({ fullscreen: true });
+
+      const res = await getSparePartsInfo({
+        code: this.formData.documentSource
+      });
+      if (res?.success && res.data.length) {
+        const curMap = {
+          assetId: 'classificationId',
+          assetCode: 'informationCode', //编码
+          assetName: 'informationName', //名称
+          materialId: 'classificationId',
+          materialName: 'informationName',
+          batchNo: '', //批次号
+          unit: 'measuringUnit', //单位
+          minPackUnit: 'packingUnit' //最小包装单位
+        };
+
+        res.data.forEach((item) => {
+          let obj = {};
+          for (const key in curMap) {
+            obj[key] = curMap[key] ? item[curMap[key]] : '';
+          }
+          obj.curId =
+            obj.assetCode +
+            (obj.measurementUnit || '') +
+            (obj.minPackUnit || '') +
+            (obj.unit || '');
+          console.log(obj.curId);
+          const index = this.warehousingMaterialList.findIndex(
+            (i) => i.curId === obj.curId
+          );
+          if (index === -1) {
+            Object.assign(obj, item);
+            obj.sparePartsNum = item.num;
+
+            this.warehousingMaterialList.push(obj);
+          } else {
+            this.warehousingMaterialList[index].sparePartsNum = item.num;
+          }
+        });
+      }
+
+      loading.close();
+    },
+    // 备品备件来源单号
+    async remoteMethod(code) {
+      // if (code !== '') {
+      //   this.loading = true
+      const res = await getDocumentSource({ code });
+      if (res?.success) {
+        this.options = res.data;
+      }
+      //   this.loading = false
+      // } else {
+      //   this.options = []
+      // }
+    },
+    rowClass({ row, column, rowIndex, columnIndex }) {
+      if (rowIndex === 1) {
+        return {
+          display: 'none',
+          background: '#EEEEEE',
+          border: 'none'
+        };
+      }
+
+      return { background: '#EEEEEE', border: 'none' };
+    },
+    // 部门 点击事件
+    async auditorDeptClick(data) {
+      console.log(data);
+      this.formData.extInfo.verifyDeptCode = data?.id;
+      this.formData.extInfo.verifyDeptName = data?.name;
+      this.formData.verifyId = '';
+      this.formData.verifyName = '';
+
+      this.$refs.formName.validateField('verifyDeptName');
+      if (data) {
+        this.getStaffList(data);
+      }
+    },
+
+    async getStaffList(data) {
+      let res = await warehouseDefinition.getUserPage({
+        groupId: data.id,
+        size: 9999,
+        page: 1
+      });
+      this.staffList = res.list;
+    },
+    // // 转资产
+    // turnToAssets (row) {
+    //   this.$refs.turnToAssetRef
+    //     .open(row.transferCurVal)
+    //     .then(({ code, name }) => {
+    //       row.transferType = name
+    //       row.materialId = code
+    //       row.materialName = name.split('/').pop()
+    //       row.transferType = name
+    //       this.$set(row, 'transferCurVal', code)
+    //     })
+    // },
+    handleSetting(row) {
+      this.$refs.detailSelectRef
+        .open(row, row.warehouseLedgerDetails || [])
+        .then((res) => {
+          console.log(res);
+          console.log(row);
+          this.$set(
+            row,
+            'warehouseLedgerDetails',
+            (res || []).map((item) => {
+              delete item.updateTime;
+              delete item.createTime;
+              this.$set(item, 'isTransferAsset', false);
+              item.isUnpack = row.isUnpack;
+              return item;
+            })
+          );
+          this.$set(row, 'outInNum', res.length);
+          this.$set(row, 'minPackUnit', res[0].minPackUnit);
+          this.$set(
+            row,
+            'selfSum',
+            row.warehouseLedgerDetails.reduce((sum, pre) => {
+              if (row.isUnpack) {
+                return ++sum;
+              }
+              return sum + pre.measurementUnit;
+            }, 0)
+          );
+        });
+    },
+
+    // 仓库编辑
+    handleWareHouse(row) {
+      this.$refs.wareHouseDailogRef.open(row);
+    },
+    // 出库操作
+    listEdit(row) {
+      this.$set(row, 'isSave', false);
+    },
+
+    //出库明细删除
+    listDel(row, index) {
+      this.warehousingMaterialList.splice(index, 1);
+      if (this.warehousingMaterialList.length == 0) {
+        this.formData.documentSource = '';
+      }
+    },
+    // 出库明细生成条码信息
+    async createMaterialCode(row) {
+      let arr = [];
+      const res = await getAssetNum({
+        assetCode: row.assetCode,
+        num: row.outInNum || 1
+      });
+      if (res?.success) {
+        delete row.createTime;
+        arr = Array.from(new Array(res.data.length), (val, idx) => ({
+          ...row,
+          num: res.data[idx],
+          bizStatus: 2,
+          isTransferAsset: false
+        }));
+      }
+      return arr;
+    },
+
+    handleSave() {
+      this.$refs.formName.validate(async (valid) => {
+        if (valid) {
+          if (!this.warehousingMaterialList?.length) {
+            return this.$message.error('请添加出库明细!');
+          } else if (
+            this.warehousingMaterialList.some(
+              (item) => !item.warehouseLedgerDetails?.length
+            )
+          ) {
+            return this.$message.error('请完善出库明细数据!');
+          }
+          console.log('qqqq===>', this.warehousingMaterialList);
+          let arr = this.warehousingMaterialList.map((item) => {
+            return {
+              batchNo: item.batchNo,
+              categoryId: item.id,
+              count: item.outInNum,
+              num: item.outInNum,
+              minPackingCount: item.selfSum,
+              packingCount: item.outInNum,
+              outInDetailRecordAddPOList: item.warehouseLedgerDetails,
+              ...item
+            };
+          });
+          arr.forEach((item) => {
+            delete item.id;
+            delete item.warehouseLedgerDetails;
+            if (item.outInDetailRecordAddPOList.length > 0) {
+              let list = item.outInDetailRecordAddPOList.map((it) => {
+                return {
+                  positionId: it.positionId,
+                  code: it.sourceBizNo,
+                  dateType: it.dateType,
+                  dateValue: it.dateValue,
+                  minUnit: it.minUnit,
+                  batchNo: it.sourceBatchNo,
+                  position: it.pathName,
+                  // minPositionId: it.cargoSpaceId,
+                  minPositionId: it.minPositionId,
+                  name: it.name,
+                  pathIds: it.pathIds,
+                  unit: it.unit,
+                  packageNo: it.num
+                  // num: it.minPackingCount
+                };
+              });
+              item.outInDetailRecordAddPOList = list;
+            }
+          });
+          let obj = { ...this.formData, type: 2 };
+          for (const key in arr) {
+            arr[key].count = arr[key].outInNum;
+          }
+          obj.outInDetailAddPOList = arr;
+
+          this.saveLoading = true;
+
+          // console.log('明细', this.warehousingMaterialList);
+          // const categoryLevelId = this.$refs.assetsDialogRef.materialType;
+          // let newObj = {
+          //   inOutAddPO: {
+          //     ...this.formData,
+          //     ...this.formData.extInfo,
+          //     bizStatus: 2
+          //   },
+          //   warehouseLedgerInfos: this.handelArr(
+          //     this.warehousingMaterialList,
+          //     categoryLevelId
+          //   )
+          // };
+          // delete newObj.inOutAddPO.extInfo;
+          console.log('2222', obj);
+
+          // const res = await outin.save(obj);
+          // if (res.code == 0) {
+          //   this.$message.success('保存成功!');
+          // }
+          // this.saveLoading = false;
+          // this.$router.push('/warehouseManagement/outgoingManagement');
+          // if (res?.success) {
+          //   this.$message.success('保存成功!');
+          //   this.$router.go(-1);
+          // }
+        }
+      });
+    },
+    handelArr(arr, id) {
+      for (const key in arr) {
+        arr[key].inLedgerId = arr[key].id;
+        arr[key].categoryLevelId = id;
+        for (const k in arr[key].warehouseLedgerDetails) {
+          arr[key].warehouseLedgerDetails[k].ledgerDetailId =
+            arr[key].warehouseLedgerDetails[k].id;
+          arr[key].warehouseLedgerDetails[k].inDetailId = arr[key].inLedgerId;
+
+          arr[key].warehouseLedgerDetails[k].isTransferAsset = arr[key]
+            .warehouseLedgerDetails[k].isTransferAsset
+            ? 1
+            : 0;
+          arr[key].warehouseLedgerDetails[k].bizStatus = 2;
+        }
+      }
+      return arr;
+      // let newArr = arr.map((item) => {
+      //   return { ...item, ledgerId: item.id };
+      // });
+      // newArr.map((item) => {
+      //   item.warehouseLedgerDetails.map((ite) => {
+      //     return { ...ite, ledgerDetailId: ite.id, ledgerId: item.id };
+      //   });
+      // });
+      // return newArr;
+    },
+    //添加明细
+    onSelectTableData(val, e) {
+      // if (e == 1) {
+      //   this.llList = val;
+      // } else {
+      //   this.llList = [];
+      // }
+      // .concat(this.llList)
+      // if (this.warehousingMaterialList.length != 0) {
+      //   val = this.warehousingMaterialList.concat(val);
+      // }
+      this.onSelectTableDataVal = val;
+      this.warehousingMaterialList = val.map((next) => {
+        delete next.updateTime;
+        delete next.createTime;
+
+        return {
+          ...next,
+          realInventoryAmount: 0,
+          // cargoSpaceCode: '', //货位编码
+          // cargoSpaceId: '', //货位id
+          // shelfId: '', //货架id
+          // shelfCode: '', //货架名称
+          // areaId: '', //库区id
+          // areaName: '', //库区名称
+          // warehouseId: '', //仓库id
+          // warehouseName: '', //仓库名称
+          assetType: this.formData.extInfo.assetType,
+          outInNum: '',
+          assetCode: next.code,
+          assetName: next.name,
+          bizStatus: 2,
+          contactCode: next.contactCode
+        };
+      });
+      console.log('sasasasa===>>>', this.warehousingMaterialList);
+    },
+    codeListValue(val) {
+      console.log(val);
+      this.formData.extInfo.assetType = val.id;
+      this.$forceUpdate();
+      this.title = val?.name;
+      this.selectEquiType = val?.id;
+      console.log(this.title);
+    },
+    async initData() {
+      const { data } = await getTreeByGroup({ type: 1 });
+      this.codeList = data;
+      const res = await warehouseDefinition.tree();
+      this.treeList = this.$util.toTreeData({
+        data: res,
+        idField: 'id',
+        parentIdField: 'parentId'
+      });
+
+      let res22 = await warehouseDefinition.getUserPage({
+        size: -1,
+        page: 1
+      });
+      this.fromUserList = res22.list;
+
+      // /
+      // const res111 = await warehouseDefinition.list();
+      // this.warehouseList = res111.list;
+      const info = JSON.parse(localStorage.getItem('info'));
+      let obj = res.find((item) => item.id === info.deptId);
+      this.formData.extInfo.deptName = obj.name;
+      this.formData.extInfo.deptCode = obj.id;
+      this.formData.extInfo.createUserName = info.name;
+      this.formData.createUserId = info.id;
+    },
+    addStock() {
+      if (!this.title) return this.$message.error('请选择出库产品类型');
+      if (!this.formData.bizType && this.formData.bizType !== 0)
+        return this.$message.error('请选择出库场景');
+
+      if (this.formData.bizType == 4 && !this.formData.documentSource) {
+        return this.$message.error('请选择来源单据');
+      }
+
+      this.$refs.assetsDialogRef.open();
+    },
+    handleChange(data) {
+      this.title = data?.dictValue;
+      if (this.formData.bizType == 4) {
+        this.formData.documentSource = '';
+      }
+    },
+    handleChanges(code) {
+      const data = this.codeList.find((item) => item.dictCode == code);
+      this.title = data?.dictValue;
+      this.selectEquiType = data?.dictCode;
+      if (this.formData.bizType == 4) {
+        this.formData.documentSource = '';
+      }
+    },
+    handleBizSceneChange() {
+      if (this.formData.extInfo.assetType == 7) {
+        this.formData.extInfo.documentSource = '';
+      }
+    },
+    getSupplier() {
+      return new Promise((resolve, reject) => {
+        supplier.list({ page: 1, size: 999 }).then((res) => {
+          if (res.success) {
+            resolve(res);
+          }
+        });
+      });
+    },
+    upload(data) {
+      this.formData.contentImage = data;
+      this.$refs.formName.validateField('contentImage');
+    },
+    deptClick(data) {
+      this.formData.deptName = data?.name;
+      this.formData.deptCode = data?.code;
+    }
+  }
+});