瀏覽代碼

部分功能完善

cz 1 年之前
父節點
當前提交
829005f3c9

+ 1 - 1
src/views/customer/file/index.vue

@@ -95,6 +95,6 @@ const listConfig = ref([
 
 <style lang="scss" scoped>
 .list {
-  min-height: 70vh;
+  min-height: 100%;
 }
 </style>

+ 31 - 22
src/views/purchase-sales/inbound-outbound/waitInbound/add.vue

@@ -9,11 +9,12 @@
       <van-tab title="基本信息" :name="1" />
     </van-tabs>
 
-    <van-form @submit="onSubmit" @failed="onFailed" label-align="top" style="margin-top: 20px">
+    <van-form @failed="onFailed" label-align="top" style="margin-top: 20px" ref="formDom">
       <van-cell-group inset v-show="active==1">
         <van-field v-model="formData.businessTypeName" readonly :label="$t('waitInbound.dataSource')" />
         <van-field v-model="formData.businessCode" readonly label="入库单号" />
         <van-field v-model="formData.code" readonly label="物流信息" />
+        <van-field v-model="formData.subCode" readonly label="物流副单号" />
         <van-field v-model="formData.warehouseName" is-link label="仓库名称" readonly :placeholder="'请选择仓库名称'" @click="typeModal = true"
                    :rules="[{ required: true, message: '请选择仓库名称'}]" required />
         <van-field v-model="formData.arrivalRemark" label="到货物流备注" type="textarea" />
@@ -72,7 +73,8 @@
                     </div>
                     <div v-show="row.isArrow" style="margin-top:5px;margin-bottom:10px">
                       <div style="display:flex;margin-bottom:8px ;align-items:center">
-                        <van-field v-model="row.addQuantity" type="digit" label="" placeholder="请输入临时清点数量" style="background-color:#f7f7f7;" />
+                        <van-field v-model="row.addQuantity" type="digit" label="" placeholder="请输入临时清点数量" style="background-color:#f7f7f7;"
+                                   @keyup.enter="handleStag(row,index)" />
                         <van-button type="success" size="small" style="width:60px;margin-left:10px" @click="handleStag(row,index)">暂存</van-button>
                       </div>
                       <div>
@@ -142,7 +144,8 @@
                     </div>
                     <div v-show="row.isArrow" style="margin-top:5px;margin-bottom:10px">
                       <div style="display:flex;margin-bottom:8px ;align-items:center">
-                        <van-field v-model="row.addQuantity" type="digit" label="" placeholder="请输入临时清点数量" style="background-color:#f7f7f7;" />
+                        <van-field v-model="row.addQuantity" type="digit" label="" placeholder="请输入临时清点数量" style="background-color:#f7f7f7;"
+                                   @keyup.enter="handleStag(row,index)" />
                         <van-button type="success" size="small" style="width:60px;margin-left:10px" @click="handleStag(row,index)">暂存</van-button>
                       </div>
                       <div>
@@ -181,14 +184,12 @@
           </table>
         </div>
       </van-cell-group>
-
-      <div style="margin-top: 5px">
-        <van-button round block type="primary" native-type="submit" style="height:30px">
-          {{$t('common.submit')}}
-        </van-button>
-      </div>
-
     </van-form>
+    <div style="margin-top: 5px">
+      <van-button round block type="primary" style="height:30px" @click="onSubmit">
+        {{$t('common.submit')}}
+      </van-button>
+    </div>
   </div>
 </template>
 
@@ -232,22 +233,29 @@ const onConfirm = ({ selectedOptions }) => {
 };
 
 const onClickLeft = () => history.back();
-
+const formDom = ref(null);
 const onSubmit = () => {
-  const list = formData.value.stockWaitDetailsList;
-  const total = list.reduce((total, x) => (total += Number(x.quantity)), 0);
-  if (!(total > 0)) {
-    return showFailToast("清点累计不能为0");
-  }
-  proxy.post("/stockWait/addByWdly", formData.value).then(
+  formDom.value.validate().then(
     (res) => {
-      setTimeout(() => {
-        showSuccessToast(proxy.$t("manualInbound.warehousingSuccess"));
-        proxy.$router.push("/main/waitInbound");
-      }, 500);
+      const list = formData.value.stockWaitDetailsList;
+      const total = list.reduce((total, x) => (total += Number(x.quantity)), 0);
+      if (!(total > 0)) {
+        return showFailToast("清点累计不能为0");
+      }
+      proxy.post("/stockWait/addByWdly", formData.value).then(
+        (res) => {
+          showSuccessToast("操作成功");
+          setTimeout(() => {
+            proxy.$router.push("/main/waitInbound");
+          }, 500);
+        },
+        (err) => {
+          return showFailToast(err.message);
+        }
+      );
     },
     (err) => {
-      return showFailToast(err.message);
+      return showFailToast("数据未填完整");
     }
   );
 };
@@ -282,6 +290,7 @@ onMounted(() => {
           ),
           warehouseId: "",
           code: json.logisticsCompanyName + "( " + json.code + " )",
+          subCode: json.subCode,
           stockWaitDetailsList: res.stockWaitDetailsList.map((x) => ({
             ...x,
             arrivalQuantity: x.quantity,

+ 4 - 0
src/views/purchase-sales/inbound-outbound/waitInbound/index.vue

@@ -76,6 +76,10 @@ const listConfig = ref([
     label: "物流信息",
   },
   {
+    label: "物流副单号",
+    prop: "subCode",
+  },
+  {
     label: "仓库名称",
     prop: "receiptWarehouseName",
   },

+ 23 - 12
src/views/purchase-sales/inbound-outbound/waitInbound/manyGoods.vue

@@ -8,7 +8,7 @@
       <van-tab title="基本信息" :name="1" />
     </van-tabs> -->
 
-    <van-form @submit="onSubmit" @failed="onFailed" label-align="top" style="margin-top: 20px">
+    <van-form @failed="onFailed" label-align="top" style="margin-top: 20px">
       <van-cell-group inset>
         <van-field v-model="formData.businessTypeName" readonly :label="$t('waitInbound.dataSource')" />
         <van-field v-model="formData.businessCode" readonly label="入库单号" />
@@ -75,7 +75,7 @@
                     <div v-show="row.isArrow" style="margin-top:5px;margin-bottom:10px">
                       <div style="display:flex;margin-bottom:8px ;align-items:center">
                         <van-field v-model="row.addQuantity" type="digit" label="" class="aa" placeholder="请输入临时登记数量"
-                                   style="background-color:#f7f7f7;" />
+                                   style="background-color:#f7f7f7;" @keyup.enter="handleStag(row,index)" />
                         <van-button type="success" size="small" style="width:60px;margin-left:10px" @click="handleStag(row,index)">暂存</van-button>
                       </div>
                       <div>
@@ -112,14 +112,12 @@
         </div>
 
       </van-cell-group>
-
-      <div style="margin-top: 5px;padding:0 5px">
-        <van-button round block type="primary" native-type="submit" style="height:30px">
-          {{$t('common.submit')}}
-        </van-button>
-      </div>
-
     </van-form>
+    <div style="margin-top: 5px;padding:0 5px">
+      <van-button round block type="primary" style="height:30px" @click="onSubmit">
+        {{$t('common.submit')}}
+      </van-button>
+    </div>
   </div>
 </template>
 
@@ -199,13 +197,15 @@ const businessType = ref([
   { label: "退货出库", value: "4" },
 ]);
 
-const getProductList = () => {
+const getProductList = (flag = false) => {
+  let arr = proxy.deepClone(formData.value.productList);
   proxy.post("/excessGoodsDetails/list", { stockWaitId: route.query.id }).then(
     (res) => {
       if (res && res.data && res.data.length > 0) {
         formData.value.productList = res.data.map((x) => ({
           ...x,
           productCode: x.productCustomCode,
+          isArrow: false,
           quantity: x.excessGoodsRegisterList
             ? x.excessGoodsRegisterList.reduce(
                 (total, y) => (total += Number(y.quantity)),
@@ -213,6 +213,17 @@ const getProductList = () => {
               )
             : 0,
         }));
+        if (
+          flag &&
+          arr &&
+          arr.length > 0 &&
+          arr.length == formData.value.productList.length
+        ) {
+          for (let i = 0; i < formData.value.productList.length; i++) {
+            const element = formData.value.productList[i];
+            element.isArrow = arr[i].isArrow || false;
+          }
+        }
         selectGoodStore.setGood(formData.value.productList);
       } else {
         formData.value.productList = [];
@@ -265,7 +276,7 @@ const handleStag = (row, index) => {
     proxy.post("/excessGoodsRegister/add", obj).then((res) => {
       row.addQuantity = "";
       // getSonList({ stockWaitId: formData.value.id }, index);
-      getProductList();
+      getProductList(true);
       return showSuccessToast("暂存成功");
     });
   } else {
@@ -289,7 +300,7 @@ const handleDeleteRow = (row, index) => {
 const handleDelete = (row, index, sonRow) => {
   proxy.post("/excessGoodsRegister/delete", { id: sonRow.id }).then((res) => {
     // getSonList({ stockWaitId: formData.value.id }, index);
-    getProductList();
+    getProductList(true);
     return showSuccessToast("删除成功");
   });
 };

+ 6 - 6
src/views/purchase-sales/inventory-management/Inventory/index.vue

@@ -71,8 +71,8 @@
                   </div>
                   <div v-show="row.isArrow" style="margin-top:5px;margin-bottom:10px">
                     <div style="display:flex;margin-bottom:8px ;align-items:center">
-                      <van-field v-model="row.addQuantity" type="digit" label="" class="aa" placeholder="请输入临时盘点数量"
-                                 style="background-color:#f7f7f7;" />
+                      <van-field v-model="row.addQuantity" type="digit" label="" class="aa" placeholder="请输入临时盘点数量" style="background-color:#f7f7f7;"
+                                 @keyup.enter="handleStag(row,index)" />
                       <van-button type="success" size="small" style="width:60px;margin-left:10px" @click="handleStag(row,index)">暂存</van-button>
                     </div>
                     <div>
@@ -233,9 +233,7 @@ const handleChangeTab = (val) => {
     requestUrl.value = "/stockCheck/page";
     req.value.isCheckRegister = "";
   }
-  req.value.pageNum = 1;
-  listData.value = [];
-  getList();
+  onRefresh();
 };
 
 const changeWarehouseId = (val) => {
@@ -311,7 +309,9 @@ const onSubmit = () => {
   proxy.post("/stockCheck/submitAll").then(
     (res) => {
       showSuccessToast("操作成功");
-      onRefresh();
+      setTimeout(() => {
+        onRefresh();
+      }, 500);
     },
     (err) => {
       return showFailToast(err.message);

+ 1 - 0
src/views/purchase-sales/inventory-management/inventoryQuery/index.vue

@@ -315,6 +315,7 @@ const handleChangeTab = (val) => {
     requestUrl.value = "/stock/pageByProductSpu";
     listConfig.value = listConfigSet[2];
   }
+  finished.value = false;
   req.value.pageNum = 1;
   listData.value = [];
   getList();