cz 2 gadi atpakaļ
vecāks
revīzija
7b00cf8882

+ 76 - 41
src/views/WDLY/outInBound/waitInBound/index.vue

@@ -22,7 +22,7 @@
       </byTable>
     </div>
     <el-dialog
-      :title="modalType == 'add' ? '添加仓库' : '编辑'"
+      title="入库"
       v-model="dialogVisible"
       width="800"
       v-loading="loading"
@@ -35,27 +35,23 @@
         ref="byform"
       >
         <template #detail>
-          <div style="width">
-            <el-table :data="formData.data.qualityDetailList">
+          <div style="width: 100%">
+            <el-table :data="formData.data.stockWaitDetailsList">
               <el-table-column prop="productCode" label="货品编码" />
               <el-table-column prop="productName" label="货品名称" />
-              <el-table-column prop="productSpec" label="采购数量" />
-              <el-table-column prop="productUnit" label="本次发货" />
-              <el-table-column prop="count" label="已入库" />
-              <el-table-column
-                prop="qualifiedCount"
-                label="本次入库"
-                min-width="150"
-              >
+              <el-table-column prop="purchaseQuantity" label="采购数量" />
+              <el-table-column prop="arrivalQuantity" label="本次发货" />
+              <el-table-column prop="receiptQuantity" label="已入库" />
+              <el-table-column prop="quantity" label="本次入库" min-width="150">
                 <template #default="{ row, $index }">
                   <el-form-item
-                    :prop="'qualityDetailList.' + $index + '.qualifiedCount'"
-                    :rules="rules.qualifiedCount"
+                    :prop="'stockWaitDetailsList.' + $index + '.quantity'"
+                    :rules="rules.quantity"
                     :inline-message="true"
                   >
                     <el-input-number
-                      v-model="row.qualifiedCount"
-                      :precision="4"
+                      v-model="row.quantity"
+                      :precision="2"
                       :controls="false"
                       :min="0"
                     />
@@ -97,6 +93,7 @@ const sourceList = ref({
     total: 3,
     pageNum: 1,
     pageSize: 10,
+    type: 1,
   },
 });
 let dialogVisible = ref(false);
@@ -106,7 +103,10 @@ let rules = ref({
   type: [
     { required: true, message: "请选择仓库类型", trigger: ["blur", "change"] },
   ],
-  name: [{ required: true, message: "请输入仓库名称", trigger: "blur" }],
+  warehouseId: [
+    { required: true, message: "请选择仓库名称", trigger: "change" },
+  ],
+  quantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
 });
 const { proxy } = getCurrentInstance();
 const selectConfig = reactive([
@@ -119,10 +119,14 @@ const selectConfig = reactive([
 const inboundType = ref([
   {
     label: "未入库",
-    value: "1",
+    value: "0",
   },
   {
     label: "部分入库",
+    value: "1",
+  },
+  {
+    label: "入库完成",
     value: "2",
   },
 ]);
@@ -131,50 +135,50 @@ const config = computed(() => {
     {
       attrs: {
         label: "数据来源",
-        prop: "name",
-      },
-      render(type) {
-        return proxy.dictDataEcho(type, warehouseType.value);
+        prop: "businessType",
       },
+      // render(type) {
+      //   return proxy.dictDataEcho(type, warehouseType.value);
+      // },
     },
     {
       attrs: {
         label: "单号",
-        prop: "type",
+        prop: "code",
       },
     },
 
     {
       attrs: {
         label: "物流/快递公司",
-        prop: "keeperName",
+        prop: "logisticsCompanyName",
       },
     },
     {
       attrs: {
         label: "仓库名称",
-        prop: "remark",
+        prop: "receiptWarehouseName",
       },
     },
     {
       attrs: {
         label: "操作人",
-        prop: "remark",
+        prop: "operatorName",
       },
     },
     {
       attrs: {
         label: "操作时间",
-        prop: "remark",
+        prop: "createTime",
       },
     },
     {
       attrs: {
         label: "入库状态",
-        prop: "name",
+        prop: "status",
       },
-      render(type) {
-        return proxy.dictDataEcho(type, inboundType.value);
+      render(status) {
+        return status == 0 ? "未入库" : status == 1 ? "部分入库" : "";
       },
     },
     {
@@ -191,6 +195,7 @@ const config = computed(() => {
               label: "入库",
               type: "primary",
               text: true,
+              disabled: row.status > 1,
             },
             el: "button",
             click() {
@@ -218,15 +223,16 @@ const treeData = ref([]);
 const formConfig = reactive([
   {
     type: "select",
-    prop: "type",
+    prop: "businessType",
     label: "入库类型",
     required: true,
+    disabled: true,
     itemWidth: 100,
     data: [],
   },
   {
     type: "select",
-    prop: "name",
+    prop: "warehouseId",
     label: "仓库名称",
     itemWidth: 33,
     isLoad: {
@@ -243,8 +249,9 @@ const formConfig = reactive([
   },
   {
     type: "input",
-    prop: "remark",
+    prop: "code",
     label: "物流信息",
+    disabled: true,
     itemWidth: 33,
   },
   {
@@ -257,10 +264,13 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy
-    .post("/abnormalInfo/page", sourceList.value.pagination)
+    .post("/stockWait/pageByWdly", sourceList.value.pagination)
     .then((message) => {
       console.log(message);
-      sourceList.value.data = message.rows;
+      sourceList.value.data = message.rows.map((x) => ({
+        ...x,
+        ...JSON.parse(x.victoriatouristJson),
+      }));
       sourceList.value.pagination.total = message.total;
       setTimeout(() => {
         loading.value = false;
@@ -274,13 +284,29 @@ const openModal = () => {
 };
 
 const submitForm = () => {
-  console.log(byform.value);
   byform.value.handleSubmit((valid) => {
+    const list = formData.data.stockWaitDetailsList;
+    const total = list.reduce((total, x) => (total += Number(x.quantity)), 0);
+    if (!(total > 0)) {
+      return ElMessage({
+        message: `本次入库不能为0!`,
+        type: "info",
+      });
+    }
+    for (let i = 0; i < list.length; i++) {
+      const e = list[i];
+      if (Number(e.receiptQuantity) + e.quantity > Number(e.purchaseQuantity)) {
+        return ElMessage({
+          message: "本次入库加已入库数量不可大于到货数量!",
+          type: "info",
+        });
+      }
+    }
     submitLoading.value = true;
-    proxy.post("/warehouse/" + modalType.value, formData.data).then(
+    proxy.post("/stockWait/addByWdly", formData.data).then(
       (res) => {
         ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          message: "操作成功",
           type: "success",
         });
         dialogVisible.value = false;
@@ -294,10 +320,19 @@ const submitForm = () => {
 
 const getDtl = (row) => {
   modalType.value = "edit";
-  proxy.post("/warehouse/detail", { id: row.id }).then((res) => {
-    res.type = res.type + "";
-    formData.data = res;
-    console.log(formData);
+  proxy.post("/stockWait/detailByWdly", { id: row.id }).then((res) => {
+    const json = JSON.parse(res.victoriatouristJson);
+    formData.data = {
+      type: "1",
+      businessType: res.businessType,
+      warehouseId: "",
+      code: json.code,
+      stockWaitDetailsList: res.stockWaitDetailsList.map((x) => ({
+        ...x,
+        arrivalQuantity: x.quantity,
+        quantity: 0,
+      })),
+    };
     dialogVisible.value = true;
   });
 };

+ 1 - 1
src/views/WDLY/purchaseManage/alreadyPurchase/index.vue

@@ -420,7 +420,7 @@ const submitForm = () => {
         (total, x) => (total += Number(x.deliverGoodsQuantity)),
         0
       );
-      if (total < 1) {
+      if (!(total > 0)) {
         return ElMessage({
           message: `本次发货不能为0!`,
           type: "info",

+ 3 - 2
src/views/WDLY/purchaseManage/subscribe/index.vue

@@ -236,7 +236,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "收货仓库",
-        prop: "receiptWarehouseId",
+        prop: "receiptWarehouseName",
       },
     },
     {
@@ -291,6 +291,7 @@ const config = computed(() => {
               label: "作废",
               type: "danger",
               text: true,
+              disabled: row.status != 30,
             },
             el: "button",
             click() {
@@ -386,7 +387,7 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy
-    .post("/subscribeDetail/page", sourceList.value.pagination)
+    .post("/subscribeDetail/pageByWdly  ", sourceList.value.pagination)
     .then((message) => {
       console.log(message);
       sourceList.value.data = message.rows.map((x) => ({

+ 50 - 10
src/views/process/processApproval/index.vue

@@ -2,18 +2,44 @@
   <div class="processApproval">
     <div class="left-card">
       <div class="top">
-        <div class="commons-title title">{{ route.query.flowName || "流程标题" }}</div>
-        <SendSubscribe ref="makeDom" v-if="flowForm.flowKey == 'subscribe_flow'"></SendSubscribe>
-        <SendPurchase ref="makeDom" v-else-if="flowForm.flowKey == 'purchase_flow'" :queryData="queryData.data"></SendPurchase>
-        <SendFunds ref="makeDom" v-else-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds>
-        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == '40'" :queryData="queryData.data"></ReturnGood>
-        <PurchaseRefund ref="makeDom" v-else-if="flowForm.flowKey == 'refund_flow'" :queryData="queryData.data"></PurchaseRefund>
+        <div class="commons-title title">
+          {{ route.query.flowName || "流程标题" }}
+        </div>
+        <SendSubscribe
+          ref="makeDom"
+          v-if="flowForm.flowKey == 'subscribe_flow'"
+        ></SendSubscribe>
+        <SendPurchase
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'purchase_flow'"
+          :queryData="queryData.data"
+        ></SendPurchase>
+        <SendFunds
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
+          :queryData="queryData.data"
+        ></SendFunds>
+        <ReturnGood
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == '40'"
+          :queryData="queryData.data"
+        ></ReturnGood>
+        <PurchaseRefund
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'refund_flow'"
+          :queryData="queryData.data"
+        ></PurchaseRefund>
       </div>
       <div class="bottom">
         <div class="commons-title title">处理意见</div>
         <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
           <el-form-item prop="remark" label-width="0px" label="">
-            <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
+            <el-input
+              type="textarea"
+              placeholder="请输入"
+              v-model="flowForm.remark"
+            >
+            </el-input>
           </el-form-item>
           <el-form-item>
             <el-button type="primary" @click="handleSubmit">提交</el-button>
@@ -48,8 +74,18 @@
   <el-dialog title="下一处理人" width="400" v-model="dialogVisible">
     <el-form :model="flowForm">
       <el-form-item prop="remark" label="处理人">
-        <el-select v-model="flowForm.handleUserId" placeholder="请选择" filterable style="width: 100%">
-          <el-option v-for="item in nextHandleUser" :label="item.name" :value="item.id"> </el-option>
+        <el-select
+          v-model="flowForm.handleUserId"
+          placeholder="请选择"
+          filterable
+          style="width: 100%"
+        >
+          <el-option
+            v-for="item in nextHandleUser"
+            :label="item.name"
+            :value="item.id"
+          >
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -140,7 +176,7 @@ const handleSubmit = async () => {
               amount: x.amount,
             }));
           } else if (flowForm.flowKey == "account_request_funds_flow") {
-          } else if (flowForm.flowKey == "40") {
+          } else if (flowForm.flowKey == "sales_return_flow") {
           } else if (flowForm.flowKey == "refund_flow") {
           }
           proxy
@@ -172,6 +208,10 @@ const skipPage = () => {
     router.replace({
       path: "/purchaseManage/purchaseManage/purchase",
     });
+  } else if (flowForm.flowKey == "sales_return_flow") {
+    router.replace({
+      path: "/purchaseManage/purchaseManage/returnGoods",
+    });
   } else if (flowForm.flowKey == "account_request_funds_flow") {
     router.replace({
       path: "/finance/fundManage/funds",

+ 1 - 1
src/views/publicModule/KDconfig/index.vue

@@ -15,7 +15,7 @@
         }"
         :action-list="[
           {
-            text: '添加数据',
+            text: '添加账号',
             action: () => openModal('add'),
           },
         ]"

+ 6 - 5
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -98,7 +98,7 @@
                 >
                   <el-input-number
                     v-model="row.count"
-                    :precision="4"
+                    :precision="2"
                     :controls="false"
                     :min="0"
                     @change="handleChangeAmount"
@@ -374,8 +374,8 @@ const submitForm = async () => {
   formDom.value.validate((vaild) => {
     if (vaild) {
       const list = formData.data.arrivalDetailList;
-      const total = list.reduce((total, x) => (total += Number(x.count)));
-      if (total < 1) {
+      const total = list.reduce((total, x) => (total += Number(x.count)), 0);
+      if (!(total > 0)) {
         return ElMessage({
           message: `本次到货不能为0!`,
           type: "info",
@@ -384,6 +384,7 @@ const submitForm = async () => {
       let sum = 0;
       for (let i = 0; i < list.length; i++) {
         const e = list[i];
+        delete e.id;
         if (
           Number(e.sumArrivalCount) + Number(e.count) >=
           Number(e.purchaseCount)
@@ -397,7 +398,7 @@ const submitForm = async () => {
           message: `操作成功!`,
           type: "success",
         });
-        dialogVisible.value = true;
+        dialogVisible.value = false;
         getList();
       });
     }
@@ -455,7 +456,7 @@ const handleArrival = (row) => {
         ...x,
         purchaseDetailId: x.id,
         purchaseCount: x.count,
-        count: 0,
+        count: Number(x.count) - Number(x.sumArrivalCount),
       })),
       arrivalStatus: "",
     };

+ 1 - 0
src/views/purchaseManage/purchaseManage/arrival/index.vue

@@ -357,6 +357,7 @@ const submitForm = () => {
     const list = formData.data.qualityDetailList;
     for (let i = 0; i < list.length; i++) {
       const e = list[i];
+      delete e.id;
       if (!(e.qualifiedCount + e.noQualifiedCount > 0)) {
         return ElMessage({
           message: "质检数量不能为0!",

+ 1 - 2
src/views/purchaseManage/purchaseManage/returnGoods/index.vue

@@ -465,8 +465,7 @@ const start = () => {
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
-      isSubscribe: "40",
-      ids: "",
+      flowKey: "sales_return_flow",
     },
   });
 };

+ 1 - 0
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -272,6 +272,7 @@ const config = computed(() => {
               label: "作废",
               type: "danger",
               text: true,
+              disabled: row.status != 30,
             },
             el: "button",
             click() {