Browse Source

修改调拨货转接口请求方式

caojunjie 2 years ago
parent
commit
ba5b37b074

+ 77 - 13
src/views/Warehousing/goodsTransfer/AddOrUpdate.vue

@@ -1452,6 +1452,7 @@ import draggable from "vuedraggable";
 import upLoad from "../components/upLoad";
 import incomeMoney from '../components/incomeMoney'
 import payMoney from '../components/payMoney'
+import {warehousebillsitems, warehousecntr} from "@/api/warehouseBusiness/warehouseInStock";
 export default {
   name: "inStock",
   props: {
@@ -3626,23 +3627,86 @@ export default {
       this.CntrTable.push(obj);
     },
     deleteRow(index, rows) {
-      rows.splice(index, 1);
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        if (rows[index].fId){
+          warehousecntr(rows[index].fId).then(res=>{
+            rows.splice(index, 1)
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            });
+          })
+        }else {
+          rows.splice(index, 1)
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
     },
     wDeleteRow(index, rows) {
-      rows.splice(index, 1);
-      this.sumMum = 0;
-      this.detailList.map((e) => {
-        if (e.fQty) {
-          this.sumMum += e.fQty;
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        if (rows[index].fId){
+          warehousebillsitems(rows[index].fId).then(res=>{
+            rows.splice(index, 1);
+            this.sumMum = 0;
+            this.detailList.map((e) => {
+              if (e.fQty) {
+                this.sumMum += e.fQty;
+              }
+            });
+            if (this.detailList.length == 0) {
+              this.form.fProductName = "";
+              this.form.fMarks = "";
+              this.form.fNetweight = 0;
+              this.form.fPlanvolumn = 0;
+              this.form.fGrossweight = 0;
+            }
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            });
+          })
+        }else {
+          rows.splice(index, 1);
+          this.sumMum = 0;
+          this.detailList.map((e) => {
+            if (e.fQty) {
+              this.sumMum += e.fQty;
+            }
+          });
+          if (this.detailList.length == 0) {
+            this.form.fProductName = "";
+            this.form.fMarks = "";
+            this.form.fNetweight = 0;
+            this.form.fPlanvolumn = 0;
+            this.form.fGrossweight = 0;
+          }
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
         }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
       });
-      if (this.detailList.length == 0) {
-        this.form.fProductName = "";
-        this.form.fMarks = "";
-        this.form.fNetweight = 0;
-        this.form.fPlanvolumn = 0;
-        this.form.fGrossweight = 0;
-      }
     },
     // 收款信息新行
     addCollection() {

+ 83 - 16
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -1450,8 +1450,7 @@
                   type="text"
                   @click.native.prevent="wDeleteRow(scope.$index, detailList)"
                   size="small"
-                  >移除</el-button
-                >
+                  >移除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -2989,7 +2988,12 @@ import { addSet, select, resetModule } from "@/api/system/set";
 import upLoad from "../components/upLoad";
 import draggable from "vuedraggable";
 import { getDept } from "@/api/basicdata/dept";
-import { listElabelByfGPid, queryClerkRoleList } from '@/api/warehouseBusiness/warehouseInStock'
+import {
+  listElabelByfGPid,
+  queryClerkRoleList,
+  warehousebillsfees, warehousebillsitems,
+  warehousecntr
+} from '@/api/warehouseBusiness/warehouseInStock'
 import incomeMoney from '../components/incomeMoney'
 import payMoney from '../components/payMoney'
 export default {
@@ -5547,23 +5551,86 @@ export default {
       this.CntrTable.push(obj);
     },
     deleteRow(index, rows) {
-      rows.splice(index, 1);
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        if (rows[index].fId){
+          warehousecntr(rows[index].fId).then(res=>{
+            rows.splice(index, 1)
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            });
+          })
+        }else {
+          rows.splice(index, 1)
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
     },
     wDeleteRow(index, rows) {
-      rows.splice(index, 1);
-      this.sumMum = 0;
-      this.detailList.map((e) => {
-        if (e.fQty) {
-          this.sumMum += e.fQty;
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        if (rows[index].fId){
+          warehousebillsitems(rows[index].fId).then(res=>{
+            rows.splice(index, 1);
+            this.sumMum = 0;
+            this.detailList.map((e) => {
+              if (e.fQty) {
+                this.sumMum += e.fQty;
+              }
+            });
+            if (this.detailList.length == 0) {
+              this.form.fProductName = "";
+              this.form.fMarks = "";
+              this.form.fNetweight = 0;
+              this.form.fPlanvolumn = 0;
+              this.form.fGrossweight = 0;
+            }
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            });
+          })
+        }else {
+          rows.splice(index, 1);
+          this.sumMum = 0;
+          this.detailList.map((e) => {
+            if (e.fQty) {
+              this.sumMum += e.fQty;
+            }
+          });
+          if (this.detailList.length == 0) {
+            this.form.fProductName = "";
+            this.form.fMarks = "";
+            this.form.fNetweight = 0;
+            this.form.fPlanvolumn = 0;
+            this.form.fGrossweight = 0;
+          }
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
         }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
       });
-      if (this.detailList.length == 0) {
-        this.form.fProductName = "";
-        this.form.fMarks = "";
-        this.form.fNetweight = 0;
-        this.form.fPlanvolumn = 0;
-        this.form.fGrossweight = 0;
-      }
     },
     // 收款信息新行
     addCollection() {

+ 2 - 2
vue.config.js

@@ -58,8 +58,8 @@ module.exports = {
         // target: `https://zjxd.dhscs.net/prod-api/`,
         // target: `http://ck.huodaonar.com/prod-api/`,
         // target: `https://ck.hturing.com/prod-api/`,
-        // target: `https://jingang.re-king.cn//prod-api/`,
-        target: `https://wms.hadexpress.com/prod-api/`,
+        target: `https://jingang.re-king.cn//prod-api/`,
+        // target: `https://wms.hadexpress.com/prod-api/`,
         // target: `https://jingrun.tubaosoft.com/prod-api/`,
         // target: `https://www.jingruntech.com/prod-api/`,
         // target: `https://ke.khzclogistics.com/prod-api/`,