Browse Source

修改出入库

caojunjie 2 years ago
parent
commit
babfc6a211

+ 22 - 1
src/api/warehouseBusiness/warehouseInStock.js

@@ -262,4 +262,25 @@ export function generate(data) {
     method: 'post',
     params: data
   })
-}
+}
+// 明细删除
+export function warehousebillsitems(fId){
+  return request({
+    url: `/warehouseBusiness/warehousebillsitems/${fId}`,
+    method: 'delete',
+  })
+}
+// 费用删除
+export function warehousebillsfees(fId){
+  return request({
+    url: `/warehouseBusiness/warehousebillsfees/${fId}`,
+    method: 'delete',
+  })
+}
+// 箱号删除
+export function warehousecntr(fId){
+  return request({
+    url: `/shipping/warehousecntr/${fId}`,
+    method: 'delete',
+  })
+}

+ 27 - 2
src/views/Warehousing/components/incomeMoney.vue

@@ -775,7 +775,7 @@ print_fyqr = false;
 
 <script>
 import { operationAgreement } from "@/api/agreement/agreement";
-import { feesCheck, revokefeeCheck } from "@/api/warehouseBusiness/warehouseInStock";
+import {feesCheck, revokefeeCheck, warehousebillsfees} from "@/api/warehouseBusiness/warehouseInStock";
 import print from "print-js";
 import Cookies from "js-cookie";
 import { addSet, resetModule, select } from '@/api/system/set';
@@ -1183,7 +1183,32 @@ export default {
       }
     },
     deleteRow(index, rows) {
-      rows.splice(index, 1);
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        if (rows[index].fId){
+          warehousebillsfees(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: '已取消删除'
+        });
+      });
     },
     // 变更计价单位
     changeFeeUnit(row) {

+ 27 - 2
src/views/Warehousing/components/payMoney.vue

@@ -691,7 +691,7 @@
 
 <script>
 import { operationAgreement } from "@/api/agreement/agreement";
-import { feesCheck, revokefeeCheck } from "@/api/warehouseBusiness/warehouseInStock";
+import {feesCheck, revokefeeCheck, warehousebillsfees} from "@/api/warehouseBusiness/warehouseInStock";
 import Cookies from "js-cookie";
 import { addSet, resetModule, select } from '@/api/system/set';
 import draggable from "vuedraggable";
@@ -1096,7 +1096,32 @@ export default {
       return sums;
     },
     deleteRow(index, rows) {
-      rows.splice(index, 1);
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        if (rows[index].fId){
+          warehousebillsfees(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: '已取消删除'
+        });
+      });
     },
     // 变更计价单位
     changeFeeUnit(row) {

+ 81 - 15
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -6476,7 +6476,10 @@ import {
   checkCode,
   queryClerkRoleList,
   pleaseCheck,
-  feesCheck, downloadTemplate, listElabelByfGPid, saveCode, deleteCode,generate
+  feesCheck, downloadTemplate, listElabelByfGPid, saveCode, deleteCode, generate,
+  warehousebillsitems,
+  warehousebillsfees,
+  warehousecntr
 } from '@/api/warehouseBusiness/warehouseInStock'
 import { operationAgreement } from '@/api/agreement/agreement'
 import { listCorps, getCorps } from '@/api/basicdata/corps'
@@ -9216,23 +9219,86 @@ export default {
       this.weightList = true
     },
     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: '删除成功!'
+          });
         }
-      })
-      if (this.detailList.length == 0) {
-        this.form.fProductName = ''
-        this.form.fMarks = ''
-        this.form.fNetweight = 0
-        this.form.fPlanvolumn = 0
-        this.form.fGrossweight = 0
-      }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
     },
     //付款信息新行
     addpayment() {

+ 106 - 20
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -1357,7 +1357,7 @@
           <!--          </el-table-column>-->
           <el-table-column header-align="center" align="center" label="操作" width="200px" fixed="right">
             <template slot-scope="scope">
-              <el-button @click.native.prevent="deleteRow(scope.$index, warehouseDrList)" size="small"
+              <el-button @click.native.prevent="deleteRowTwo(scope.$index, warehouseDrList)" size="small"
                 :disabled="browseStatus || scope.row.fBillstatus == 6">移除
               </el-button>
               <el-button size="small" @click="listCheck(scope.row)" v-if="scope.row.fBillstatus < 6"
@@ -1797,7 +1797,7 @@
           <el-table-column header-align="center" align="center" width="200px" label="操作" fixed="right">
             <template slot-scope="scope">
               <!-- <el-button size="small">审核费用</el-button> -->
-              <el-button @click.native.prevent="deleteRow(scope.$index, warehouseCrList)" size="small"
+              <el-button @click.native.prevent="deleteRowTwo(scope.$index, warehouseCrList)" size="small"
                 :disabled="browseStatus || scope.row.fBillstatus === 6">移除
               </el-button>
               <el-button size="small" @click="listCheck(scope.row)" v-if="scope.row.fBillstatus < 6"
@@ -3856,7 +3856,7 @@ import {
   importQueryBarcode,
   listElabelByfGPid,
   queryClerkRoleList,
-  saveCode
+  saveCode, warehousebillsfees, warehousebillsitems, warehousecntr
 } from '@/api/warehouseBusiness/warehouseInStock'
 import { listCharge } from '@/api/system/viewApproval'
 import { getDept } from '@/api/basicdata/dept'
@@ -7779,27 +7779,113 @@ export default {
       var obj = {}
       this.CntrTable.push(obj)
     },
+    deleteRowTwo(index, rows){
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        if (rows[index].fId){
+          warehousebillsfees(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: '已取消删除'
+        });
+      });
+    },
     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) {
-      if (this.warehouseDrList && this.warehouseDrList.length > 0) {
-        return this.$message.error('收款信息中存在数据,请删除仓储费明细后,继续操作')
-      }
-      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){
+          if (this.warehouseDrList && this.warehouseDrList.length > 0) {
+            return this.$message.error('收款信息中存在数据,请删除仓储费明细后,继续操作')
+          }
+          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
+            }
+          })
+        }else {
+          if (this.warehouseDrList && this.warehouseDrList.length > 0) {
+            return this.$message.error('收款信息中存在数据,请删除仓储费明细后,继续操作')
+          }
+          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
+          }
         }
-      })
-      if (this.detailList.length == 0) {
-        this.form.fProductName = ''
-        this.form.fMarks = ''
-        this.form.fNetweight = 0
-        this.form.fPlanvolumn = 0
-        this.form.fGrossweight = 0
-      }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
     },
     // 收款信息新行
     addCollection() {

+ 2 - 2
vue.config.js

@@ -57,9 +57,9 @@ module.exports = {
         // target: `https://hwc.tubaosoft.com/prod-api/`,
         // target: `https://zjxd.dhscs.net/prod-api/`,
         // target: `http://ck.huodaonar.com/prod-api/`,
-        target: `https://ck.hturing.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://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/`,