huang_an %!s(int64=2) %!d(string=hai) anos
pai
achega
93a283b3b9
Modificáronse 1 ficheiros con 49 adicións e 11 borrados
  1. 49 11
      src/views/warehouseManagement/stockManagement/add.vue

+ 49 - 11
src/views/warehouseManagement/stockManagement/add.vue

@@ -78,6 +78,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
+            =={{ formData.bizType }}
             <el-form-item label="入库类型" prop="bizType">
               <el-select
                 filterable
@@ -269,6 +270,39 @@
                 width="150"
                 prop="assetName"
               ></el-table-column>
+
+              <el-table-column
+                label="客户编码"
+                align="center"
+                width="150"
+                prop="customCode"
+                v-if="formData.bizType == 1"
+              >
+                <template slot-scope="{ row, $index }">
+                  <el-form-item
+                    :prop="`warehousingMaterialList.${$index}.customCode`"
+                    required
+                  >
+                    <el-input v-model="row.customCode"> </el-input>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="供应商编码"
+                align="center"
+                width="150"
+                prop="customCode"
+                v-if="formData.bizType == 2"
+              >
+                <template slot-scope="{ row, $index }">
+                  <el-form-item
+                    :prop="`warehousingMaterialList.${$index}.supplierCode`"
+                    required
+                  >
+                    <el-input v-model="row.supplierCode"> </el-input>
+                  </el-form-item>
+                </template>
+              </el-table-column>
               <el-table-column
                 v-for="(item, index) in tableHeader"
                 :key="index"
@@ -1032,7 +1066,9 @@
           fileds.push(
             ...[
               `warehousingMaterialList.${index}.outInNum`,
-              `warehousingMaterialList.${index}.minPackingCount`
+              `warehousingMaterialList.${index}.minPackingCount`,
+              `warehousingMaterialList.${index}.customCode`,
+              `warehousingMaterialList.${index}.supplierCode`
             ]
           );
         } else if (
@@ -1346,7 +1382,9 @@
                 pathName: `${item.warehouseName},${item.areaName},${item.shelfCode},${item.cargoSpaceCode}`,
                 totalMoney:
                   item.outInNum * item.minPackingCount * item.univalence,
-                weightUnit: item.weightUnit
+                weightUnit: item.weightUnit,
+                customCode: item.customCode,
+                supplierCode: item.supplierCode
               };
             });
             arr.forEach((item) => {
@@ -1373,15 +1411,15 @@
 
             console.log('====>>', obj);
 
-            this.saveLoading = true;
-            try {
-              const res = await outin.save(obj);
-              if (res.code == 0) {
-                this.$message.success('保存成功!');
-              }
-            } catch (error) {}
-            this.saveLoading = false;
-            this.$router.push('/warehouseManagement/stockManagement');
+            // this.saveLoading = true;
+            // try {
+            //   const res = await outin.save(obj);
+            //   if (res.code == 0) {
+            //     this.$message.success('保存成功!');
+            //   }
+            // } catch (error) {}
+            // this.saveLoading = false;
+            // this.$router.push('/warehouseManagement/stockManagement');
           }
         });
       },