Преглед на файлове

模块优化、bug解决

cz преди 2 години
родител
ревизия
cd4cea99bf

+ 10 - 2
src/components/inbound-outbound/addOutbound.vue

@@ -127,13 +127,15 @@
                   :inline-message="true"
                   label-width="0"
                 >
-                  <el-input
+                  <el-input-number
                     v-model="scope.row.changeQuantity"
                     placeholder="请输入"
                     size="mini"
+                    :controls="false"
+                    style="width: 100%"
                     @change="(val) => handleChange(val, scope.$index)"
                   >
-                  </el-input>
+                  </el-input-number>
                 </el-form-item>
               </template>
             </el-table-column>
@@ -276,6 +278,12 @@ export default {
     handleSubmit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
+          const sum = this.form.orderDetailsList.reduce((sum, x) => {
+            return sum + Number(x.changeQuantity);
+          }, 0);
+          if (sum < 1) {
+            return this.msgInfo("出库总数量不能小于0");
+          }
           this.loading = true;
           this.$emit("submit");
         }

+ 1 - 1
src/views/inbound-outbound/inbound/cgInbound/purchaseInbound.vue

@@ -171,7 +171,7 @@ export default {
             return sum + Number(x.changeQuantity);
           }, 0);
           if (sum < 1) {
-            return this.msgInfo("入库总数量不能0");
+            return this.msgInfo("入库总数量不能小于0");
           }
           this.loading = true;
           this.form.changeDetailsList = this.form.changeDetailsList.map(

+ 40 - 17
src/views/inbound-outbound/outbound/JDoutbound/index.vue

@@ -59,6 +59,7 @@ export default {
         },
       ],
       tableList: [],
+      total: 0,
       loading: false,
       titleText: "京东订单出库",
       open: false,
@@ -117,13 +118,14 @@ export default {
               productName: x.productName,
               notIssuedQuantity: x.notIssuedQuantity,
               specs: x.productSpecs,
-              changeQuantity: "",
+              changeQuantity: Number(x.notIssuedQuantity),
               productId: x.productId,
               orderDetailsId: x.id,
             }));
             this.form = {
               customerName: "京东",
               orderType: "京东",
+              type: "京东订单",
               orderId: row.id,
               warehouseId: "",
               logisticsCode: "",
@@ -179,12 +181,12 @@ export default {
 
 <template>
   <div class="box-card">
-    <el-card class="header">
+    <!-- <el-card class="header">
       <test :form-config="btnForm"></test>
-    </el-card>
+    </el-card> -->
     <el-card class="body-main">
       <query
-        :selectConfig="selectConfig"
+        :selectConfig="[]"
         :req="queryParams"
         :isShowMore="true"
         @handleQuery="handleQuery"
@@ -195,8 +197,8 @@ export default {
         "
       ></query>
       <el-table :data="tableList" v-loading="loading">
-        <el-table-column type="selection" width="50" align="left">
-        </el-table-column>
+        <!-- <el-table-column type="selection" width="50" align="left"> -->
+        <!-- </el-table-column> -->
         <el-table-column
           label="订单编号"
           align="left"
@@ -209,7 +211,16 @@ export default {
           prop="cityName"
           width="120"
         />
-        <el-table-column label="京东仓库" align="left" width="150" />
+        <el-table-column
+          label="出库仓库"
+          align="left"
+          width="150"
+          :formatter="
+            (row) => {
+              return '京东仓库';
+            }
+          "
+        />
         <el-table-column
           label="收货人"
           align="left"
@@ -231,6 +242,13 @@ export default {
           </template>
         </el-table-column>
       </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
     </el-card>
 
     <el-dialog
@@ -255,18 +273,23 @@ export default {
 
 
 <style lang="scss" scoped>
+// .box-card {
+//   height: calc(100vh - 110px);
+//   overflow-y: auto;
+//   display: flex;
+//   flex-direction: column;
+//   .header {
+//     // height: 100px;
+//     margin-bottom: 10px;
+//     box-sizing: border-box;
+//   }
+//   .body-main {
+//     flex: 1;
+//     overflow-y: auto;
+//   }
+// }
 .box-card {
   height: calc(100vh - 110px);
   overflow-y: auto;
-  display: flex;
-  flex-direction: column;
-  .header {
-    // height: 100px;
-    margin-bottom: 10px;
-    box-sizing: border-box;
-  }
-  .body-main {
-    flex: 1;
-  }
 }
 </style>

+ 1 - 1
src/views/inbound-outbound/outbound/salesOutbound/index.vue

@@ -111,7 +111,7 @@ export default {
               productName: x.productName,
               notIssuedQuantity: x.notIssuedQuantity,
               specs: x.productSpecs,
-              changeQuantity: "",
+              changeQuantity: Number(x.notIssuedQuantity),
               productId: x.productId,
               orderDetailsId: x.id,
             }));

+ 5 - 2
src/views/product-material/product/addProduct.vue

@@ -15,6 +15,7 @@
             :emitPath="false"
             :props="{ label: 'name', value: 'id' }"
             style="width: 100%"
+            @change="handleClassifyIdChange"
           ></el-cascader>
         </el-form-item>
         <el-form-item label="产品类型" prop="type">
@@ -411,8 +412,6 @@ export default {
       this.$refs.form.validate((valid) => {
         if (valid) {
           this.loading = true;
-          this.form.classifyId =
-            this.form.classifyId[this.form.classifyId.length - 1];
           const arr = [];
           arr.push(this.fileData);
           this.form.fileInfoList = arr;
@@ -476,6 +475,10 @@ export default {
         dom2.style.display = "none";
       });
     },
+    handleClassifyIdChange() {
+      this.form.classifyId =
+        this.form.classifyId[this.form.classifyId.length - 1];
+    },
   },
 };
 </script>

+ 1 - 1
src/views/product-material/product/index.vue

@@ -578,7 +578,7 @@ export default {
       this.open = true;
     },
     handleEdit(row) {
-      // console.log(row, "ss");
+      console.log(row, "ss");
       this.titleText = "edit";
       this.open = true;
       const data = { ...row };

+ 2 - 2
src/views/purchase-management/deliver-goods/sendGoods.vue

@@ -98,9 +98,9 @@
                   <el-input-number
                     v-model="scope.row.shipmentQuantity"
                     :controls="false"
+                    style="width: 100%"
                     placeholder="请输入"
                     size="mini"
-                    style="width: 100%"
                   >
                   </el-input-number>
                 </el-form-item>
@@ -181,7 +181,7 @@ export default {
             return sum + Number(x.shipmentQuantity);
           }, 0);
           if (sum < 1) {
-            return this.msgInfo("入库总数量不能为0");
+            return this.msgInfo("发货总数量不能小于0");
           }
           this.loading = true;
           this.$emit("submit");