huang_an 1 年間 前
コミット
4628b2f8c6

+ 8 - 0
src/api/warehouseManagement/index.js

@@ -169,5 +169,13 @@ export default {
     if (res.data.code == 0) {
       return res.data.data;
     }
+  },
+  // 动态表头
+  fieldModel: async (params) => {
+    const res = await request.get(`/main/fieldmodel/list`, { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
   }
 };

+ 1 - 0
src/views/bpm/handleTask/components/productionWarehousing/detailDialog.vue

@@ -70,6 +70,7 @@
         :form="form"
         :bizType="1"
         :sourceBizNo="form.code"
+        :detailList="form.detailList"
       ></add>
     </keep-alive>
   </div>

+ 28 - 3
src/views/bpm/outgoingManagement/components/AssetsDialog.vue

@@ -149,7 +149,15 @@
             label="规格"
             :show-overflow-tooltip="true"
           ></el-table-column>
-
+          <template v-if="dimension == 1">
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
+          </template>
           <el-table-column
             v-if="dimension == 1"
             label="出库数量"
@@ -288,6 +296,7 @@
     },
     data() {
       return {
+        newColumns: [], // 动态表头
         isShowTable: true,
         qualityResultOption: [
           {
@@ -328,11 +337,27 @@
         selectionList: [],
         materialType: '',
         warehouseList: [],
-        dimension: '1'
+        dimension: '4'
       };
     },
-    created() {},
+    created() {
+      this.getFieldModel();
+    },
     methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
       // 出库数量限制
       handleInput(row, value) {
         if (row.outboundNum <= row.measureQuantity) {

+ 23 - 0
src/views/bpm/outgoingManagement/details.vue

@@ -143,6 +143,13 @@
               prop="brandNum"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
             <el-table-column
               label="批次号"
               prop="batchNo"
@@ -449,6 +456,7 @@
     },
     data() {
       return {
+        newColumns: [], // 动态表头
         qualityStatus: {
           0: '未质检',
           1: '已质检'
@@ -527,11 +535,26 @@
       }
     },
     created() {
+      this.getFieldModel();
       this.requestDict('类型用途');
       this.getAllCategoryType();
       this._getInfo(this.businessId);
     },
     methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
       pickingHandleScroll() {
         console.log('---------pickingHandleScroll------------');
         if (this.showPackingList.length < this.packingList.length) {

+ 23 - 0
src/views/bpm/outgoingManagement/outbound.vue

@@ -181,6 +181,13 @@
                 prop="brandNum"
                 :show-overflow-tooltip="true"
               ></el-table-column>
+              <el-table-column
+                v-for="(item, index) in newColumns"
+                :label="item.label"
+                :align="item.align"
+                :prop="item.prop"
+                :show-overflow-tooltip="item.showOverflowTooltip"
+              ></el-table-column>
               <el-table-column
                 label="批次号"
                 prop="batchNo"
@@ -504,6 +511,7 @@
     },
     data() {
       return {
+        newColumns: [], // 动态表头
         goodsLists: [], // 商品列表
         qualityStatus: {
           0: '未质检',
@@ -571,11 +579,26 @@
       }
     },
     created() {
+      this.getFieldModel();
       this.getListItems();
       this.initUserInfo();
       this.initDeptData();
     },
     methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
       userSlected(data) {
         this.formData.fromId = data.id;
         this.formData.fromUser = data.name;

+ 0 - 2
src/views/bpm/stockManagement/components/selectType.vue

@@ -366,8 +366,6 @@
   }
   .search_box {
     overflow: hidden;
-    ::v-deep .el-input-group__append {
-    }
   }
   .select-btn {
     text-align: right;

+ 26 - 2
src/views/bpm/stockManagement/components/selectType_new.vue

@@ -69,6 +69,13 @@
               label="规格"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
             <el-table-column
               prop="measuringUnit"
               label="计量单位"
@@ -126,7 +133,7 @@
 <script>
   import AssetTree from './assetTree.vue';
   import { getList } from '@/api/classifyManage/itemInformation';
-
+  import storageApi from '@/api/warehouseManagement';
   export default {
     props: {
       visibleDialog: {
@@ -159,6 +166,7 @@
     components: { AssetTree },
     data() {
       return {
+        newColumns: [], // 动态表头
         value: '',
         treeType: '',
         treeList: [],
@@ -175,8 +183,24 @@
         memoSelection: []
       };
     },
-    created() {},
+    created() {
+      this.getFieldModel();
+    },
     methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
       handleSearch() {
         this.pages.pageNum = 1;
         this.initData();

+ 23 - 0
src/views/bpm/stockManagement/details.vue

@@ -156,6 +156,13 @@
               prop="brandNum"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
             <el-table-column
               label="批次号"
               prop="batchNo"
@@ -478,6 +485,7 @@
     },
     data() {
       return {
+        newColumns: [], // 动态表头
         qualityFile: [], // 回执附件
         qualityStatus: {
           0: '未质检',
@@ -535,11 +543,26 @@
     },
     created() {
       console.log('this.businessId----------', this.businessId);
+      this.getFieldModel();
       this.requestDict('类型用途');
       this.getAllCategoryType();
       this._getInfo(this.businessId);
     },
     methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
       //获取回执附件
       getQualityFile() {
         return { qualityFile: this.qualityFile, id: this.infoData.id };

+ 23 - 0
src/views/bpm/stockManagement/quality.vue

@@ -139,6 +139,13 @@
               prop="brandNum"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
             <el-table-column
               label="批次号"
               prop="batchNo"
@@ -505,6 +512,7 @@
     },
     data() {
       return {
+        newColumns: [], // 动态表头
         qualityFile: [], // 回执附件
         qualityResultsOptions: [
           {
@@ -596,11 +604,26 @@
       }
     },
     created() {
+      this.getFieldModel();
       this.requestDict('类型用途');
       this.getAllCategoryType();
       this._getInfo(this.businessId);
     },
     methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
       pickingHandleScroll() {
         console.log('---------pickingHandleScroll------------');
         if (this.showPackingList.length < this.packingList.length) {

+ 49 - 12
src/views/bpm/stockManagement/storage.vue

@@ -183,6 +183,13 @@
                 prop="brandNum"
                 :show-overflow-tooltip="true"
               ></el-table-column>
+              <el-table-column
+                v-for="(item, index) in newColumns"
+                :label="item.label"
+                :align="item.align"
+                :prop="item.prop"
+                :show-overflow-tooltip="item.showOverflowTooltip"
+              ></el-table-column>
               <el-table-column
                 label="批次号"
                 align="center"
@@ -889,6 +896,7 @@
     },
     data() {
       return {
+        newColumns: [], // 动态表头
         sceneState,
         saveLoading: false,
         dateVisible: false,
@@ -977,10 +985,25 @@
       }
     },
     created() {
+      this.getFieldModel();
       this.getListItems();
       this.initFormData();
     },
     methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
       // 初始化信息
       async initFormData() {
         this.formData.type = 1;
@@ -993,40 +1016,49 @@
         this.formData.sourceBizNo = this.sourceBizNo;
         this.formData.extInfo.supplierName = this.form.supplierName;
         this.formData.extInfo.supplierId = this.form.supplierId;
+        console.log('this.detailList---------', this.detailList);
         if (this.detailList?.length > 0) {
           let codeList = this.detailList.map((item) => {
-            return item.productCode;
+            return item.productCode || item.categoryCode;
           });
           console.log('codeList-----------', codeList);
           storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
             console.log(res);
             const batchNo = await getCode('lot_number_code');
             this.productList = res.map((item, index) => {
-              let warehouseId = this.detailList.filter(
-                (detailItem) => detailItem.productCode == item.code
-              )[0].warehouseId;
-              let warehouseName = this.detailList.filter(
-                (detailItem) => detailItem.productCode == item.code
-              )[0].warehouseName;
+              let filtersItem = this.detailList.filter(
+                (detailItem) =>
+                  (detailItem.productCode || detailItem.categoryCode) ==
+                  item.code
+              )[0];
+              console.log('filtersItem--------', filtersItem);
+              let warehouseId = filtersItem.warehouseId;
+              let warehouseName = filtersItem.warehouseName;
+              let minPackingQuantity =
+                filtersItem.totalCount || filtersItem.packingCount;
+              let measureQuantity =
+                filtersItem.totalCount || filtersItem.packingCount;
+              let packingQuantity = 1;
+              let price = filtersItem.singlePrice;
               return {
                 index: this.productList.length + index,
                 categoryId: item.id, // 物品id
                 categoryName: item.name, // 物品名称
                 categoryCode: item.code, // 物品编码
-                categoryModel: item.listSavemodelType, // 物品型号
+                categoryModel: item.modelType, // 物品型号
                 specification: item.specification, // 规格
                 brandNum: item.brandNum, // 牌号
                 batchNo: batchNo, // 批次号
-                minPackingQuantity: '', // 最小包装单元数量
-                packingQuantity: '', // 包装数量
+                minPackingQuantity: minPackingQuantity, // 最小包装单元数量
+                packingQuantity: packingQuantity, // 包装数量
                 packingUnit: item.packingUnit, // 包装单位
-                measureQuantity: 0, // 计量数量
+                measureQuantity: measureQuantity, // 计量数量
                 measureUnit: item.measuringUnit, // 计量单位
                 netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
                 weight: 0, // 重量
                 weightUnit: item.weightUnit, // 重量单位
                 totalMoney: '', // 总价
-                price: item.price, // 单价
+                price: item.price || price, // 单价
                 purpose: '', // 用途
                 isUnpack: item.isUnpack, // 是否允许拆包
                 warehouseId, // 仓库id
@@ -1035,6 +1067,9 @@
                 warehouseNames: [warehouseName]
               };
             });
+            this.$nextTick(() => {
+              this.listSaveArrs();
+            });
           });
         }
       },
@@ -1569,6 +1604,8 @@
             specification: item.specification, // 规格
             brandNum: item.brandNum, // 牌号
             batchNo: batchNo, // 批次号
+            approvalNumber: item.approvalNumber, // 批准文号
+            packingSpecification: item.packingSpecification, // 包装规格
             minPackingQuantity: '', // 最小包装单元数量
             packingQuantity: '', // 包装数量
             packingUnit: item.packingUnit, // 包装单位