huang_an 2 سال پیش
والد
کامیت
eb4d560b02

+ 79 - 66
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -12,52 +12,6 @@
           <el-form-item label="出库单号" prop="bizNum">
             <el-input :value="formData.bizNum" disabled /></el-form-item
         ></el-col> -->
-          <el-col :span="8">
-            <el-form-item label="出库物品类型" prop="extInfo.assetType">
-              <!-- <DictSelection
-                dictName="类型用途"
-                :disabled="
-                  !!(warehousingMaterialList && warehousingMaterialList.length)
-                "
-                clearable
-                v-model="formData.extInfo.assetType"
-                @itemChange="handleChange"
-              /> -->
-              <!-- <el-select
-                :disabled="
-                  !!(warehousingMaterialList && warehousingMaterialList.length)
-                "
-                clearable
-                v-model="formData.extInfo.assetType"
-                @change="handleChanges"
-              >
-                <el-option
-                  v-for="(item, index) in codeList"
-                  :key="index"
-                  :label="item.dictValue"
-                  :value="item.dictCode"
-                ></el-option>
-              </el-select> -->
-              <selectTree
-                ref="tree"
-                class="form-ipt"
-                :isBindPlan="
-                  !!(warehousingMaterialList && warehousingMaterialList.length)
-                "
-                size="medium"
-                style="width: 100%"
-                clearable
-                :options="codeList"
-                :props="{
-                  value: 'id',
-                  label: 'name',
-                  children: 'children'
-                }"
-                @getValue="codeListValue"
-                :isAll="false"
-              />
-            </el-form-item>
-          </el-col>
           <el-col :span="8">
             <el-form-item label="出库场景" prop="bizType">
               <el-select
@@ -136,6 +90,53 @@
                 "
             /></el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="出库物品类型" prop="extInfo.assetType">
+              <!-- <DictSelection
+                dictName="类型用途"
+                :disabled="
+                  !!(warehousingMaterialList && warehousingMaterialList.length)
+                "
+                clearable
+                v-model="formData.extInfo.assetType"
+                @itemChange="handleChange"
+              /> -->
+              <!-- <el-select
+                :disabled="
+                  !!(warehousingMaterialList && warehousingMaterialList.length)
+                "
+                clearable
+                v-model="formData.extInfo.assetType"
+                @change="handleChanges"
+              >
+                <el-option
+                  v-for="(item, index) in codeList"
+                  :key="index"
+                  :label="item.dictValue"
+                  :value="item.dictCode"
+                ></el-option>
+              </el-select> -->
+              <selectTree
+                ref="tree"
+                class="form-ipt"
+                :isBindPlan="
+                  !!(warehousingMaterialList && warehousingMaterialList.length)
+                "
+                size="medium"
+                style="width: 100%"
+                clearable
+                :options="codeList"
+                :props="{
+                  value: 'id',
+                  label: 'name',
+                  children: 'children'
+                }"
+                @getValue="codeListValue"
+                :isAll="false"
+              />
+            </el-form-item>
+          </el-col>
+
           <el-col :span="8">
             <el-form-item label="权属部门" prop="deptName">
               <el-input
@@ -182,7 +183,11 @@
         ></el-col> -->
           <el-col :span="8">
             <el-form-item label="领料人" prop="fromUser">
-              <el-select v-model="formData.fromUser" filterable placeholder="">
+              <el-select
+                v-model="formData.fromUser"
+                filterable
+                placeholder="请选择领料人"
+              >
                 <el-option
                   v-for="item in fromUserList"
                   :key="item.id"
@@ -623,25 +628,30 @@
         row.tableData = [];
         this.formData.documentSource = row.code;
         for (const key in row.orderInfoList) {
-          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,
-              modelTyp: row.orderInfoList[key].bomDetailDTOS[i].model,
-              id: row.orderInfoList[key].bomDetailDTOS[i].categoryId
-            });
+          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
+              });
+            }
           }
-          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,
-              modelTyp: row.orderInfoList[key].bomDetailDTOS[j].model,
-              id: row.orderInfoList[key].bomDetailDTOS[j].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) => {
@@ -825,6 +835,9 @@
       //出库明细删除
       listDel(row, index) {
         this.warehousingMaterialList.splice(index, 1);
+        if (this.warehousingMaterialList.length == 0) {
+          this.formData.documentSource = '';
+        }
       },
       // 出库明细生成条码信息
       async createMaterialCode(row) {
@@ -975,9 +988,9 @@
         //   this.llList = [];
         // }
         // .concat(this.llList)
-        if (this.warehousingMaterialList.length != 0) {
-          val = this.warehousingMaterialList.concat(val);
-        }
+        // if (this.warehousingMaterialList.length != 0) {
+        //   val = this.warehousingMaterialList.concat(val);
+        // }
         this.onSelectTableDataVal = val;
         this.warehousingMaterialList = val.map((next) => {
           delete next.updateTime;

+ 2 - 2
src/views/warehouseManagement/outgoingManagement/components/eomEdit.vue

@@ -111,7 +111,7 @@
             align="center"
           >
           </el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             prop="singlePrice"
             label="单价"
             width="120"
@@ -124,7 +124,7 @@
             width="120"
             align="center"
           >
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             prop="deliveryDays"
             label="交期(天)"

+ 13 - 2
src/views/warehouseManagement/outgoingManagement/components/pickOrder.vue

@@ -5,6 +5,8 @@
       :visible.sync="dialogVisible"
       width="40%"
       :before-close="handleClose"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
     >
       <div class="main">
         <ele-pro-table
@@ -60,7 +62,8 @@
         dialogVisible: false,
         pages: {
           pageNum: 1,
-          size: 10
+          size: 10,
+          status: 1
         },
         total: 0,
         tableData: [],
@@ -113,6 +116,10 @@
         this.$refs.pickOrderEditRef.open(row);
       },
       handleMine() {
+        if (this.current == null) {
+          this.$message.warning('请先选择领料单!');
+          return;
+        }
         const current = this.current.orderInfoList;
         for (const key in current) {
           if (
@@ -127,9 +134,13 @@
         this.dialogVisible = false;
       },
       async open() {
+        const listParent = this.$parent.warehousingMaterialList;
+        if (listParent.length == 0) {
+          this.current = {};
+          this.radio = null;
+        }
         this.dialogVisible = true;
         const res = await pickOrderPage(this.pages);
-        console.log(res);
         this.tableData = res.data.list;
         this.total = res.data.count;
       },

+ 11 - 8
src/views/warehouseManagement/outgoingManagement/components/pickOrderEdit.vue

@@ -33,6 +33,13 @@
               align="center"
             >
             </el-table-column>
+            <el-table-column
+              prop="rootCategoryLevelName"
+              width="120"
+              label="物品类型"
+              align="center"
+            >
+            </el-table-column>
             <el-table-column
               prop="categoryCode"
               label="物品编码"
@@ -75,13 +82,7 @@
               align="center"
             >
             </el-table-column>
-            <el-table-column
-              prop="rootCategoryLevelName"
-              width="120"
-              label="物品分类名称"
-              align="center"
-            >
-            </el-table-column>
+
             <el-table-column
               prop="unit"
               label="单位"
@@ -144,7 +145,9 @@
         this.dialogVisible = true;
         console.log({ ...row });
       },
-      handleClose(done) {}
+      handleClose(done) {
+        this.dialogVisible = false;
+      }
     }
   };
 </script>