Explorar o código

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui into master

qukaidi %!s(int64=4) %!d(string=hai) anos
pai
achega
b1ed62fc60

+ 112 - 37
src/views/finance/applyForInvoice/chargeInvoice/index.vue

@@ -81,7 +81,7 @@
             icon="el-icon-plus"
             size="mini"
             @click="handleAdd"
-            v-hasPermi="['finance:charge:add']"
+            v-hasPermi="['financial:invoiceApplyFor:add']"
           >新增
           </el-button>
         </el-col>
@@ -92,7 +92,7 @@
             size="mini"
             :disabled="single"
             @click="handleUpdate"
-            v-hasPermi="['finance:charge:edit']"
+            v-hasPermi="['financial:invoiceApplyFor:edit']"
           >修改
           </el-button>
         </el-col>
@@ -244,7 +244,7 @@
               type="text"
               icon="el-icon-view"
               @click="check(scope.row, 0)"
-              v-hasPermi="['finance:contrast:edit']"
+              v-hasPermi="['financial:invoiceApplyFor:edit']"
             >查看</el-button
             >
             <el-button
@@ -252,7 +252,7 @@
               type="text"
               icon="el-icon-view"
               @click="check(scope.row, 1)"
-              v-hasPermi="['finance:contrast:edit']"
+              v-hasPermi="['financial:invoiceApplyFor:edit']"
               v-if="
               scope.row.fBillstatus == '提交审核' ||
               scope.row.fBillstatus == '审核中'
@@ -264,7 +264,7 @@
               type="text"
               icon="el-icon-edit"
               @click="handleUpdate(scope.row)"
-              v-hasPermi="['finance:charge:edit']"
+              v-hasPermi="['financial:invoiceApplyFor:edit']"
               v-if="
               scope.row.fBillstatus == '保存' ||
               scope.row.fBillstatus == '暂存' ||
@@ -277,7 +277,7 @@
               type="text"
               icon="el-icon-delete"
               @click="handleDelete(scope.row)"
-              v-hasPermi="['finance:charge:remove']"
+              v-hasPermi="['financial:invoiceApplyFor:remove']"
               v-if="
               scope.row.fBillstatus == '保存' ||
               scope.row.fBillstatus == '暂存' ||
@@ -312,14 +312,14 @@
         @pagination="getList"
       />
     </div>
-    <div v-show="mainTable == true">
+    <div v-if="mainTable == true">
       <el-form
         :model="queryParams"
         :rules="ruless"
         ref="ruless"
         :inline="true"
         v-show="showSearch"
-        label-width="68px"
+        label-width="78px"
       >
         <el-form-item label="货权方" prop="fCtrlcorpid">
           <el-input
@@ -332,7 +332,7 @@
             @keyup.enter.native="handleQuery"
           />
         </el-form-item>
-        <el-form-item label="结算单位" label-width="78px" prop="fCorpid">
+        <el-form-item label="结算单位" prop="fCorpid">
           <el-select
             v-model="queryParams.fCorpid"
             filterable
@@ -353,7 +353,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="收费日期" label-width="78px" prop="fAccbilldate">
+        <el-form-item label="收费日期" prop="fAccbilldate">
           <el-date-picker
             clearable
             size="small"
@@ -455,6 +455,12 @@
       </el-form>
       <div style="width: 100%; display: flex; justify-content: space-between">
         <div style="display: flex">
+          <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === true" size="mini" @click="cancel"
+          >返回列表</el-button
+          >
+          <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === false" size="mini" @click="homePage"
+          >返回首页</el-button
+          >
           <el-button
             type="warning"
             size="mini"
@@ -505,12 +511,6 @@
           <el-button type="primary" @click="submitForm" size="mini" :disabled="notChange"
           >保 存</el-button
           >
-          <el-button v-if="cancelButton === true" size="mini" @click="cancel"
-          >返 回</el-button
-          >
-          <el-button v-if="cancelButton === false" size="mini" @click="homePage"
-          >返 回</el-button
-          >
           <el-button @click="addPage" size="mini">新 增</el-button>
         </div>
         <div style="margin: 0 12px">
@@ -527,6 +527,7 @@
         :visible.sync="feeInfo ? showSetting2 : showSetting3"
         width="700px"
         v-dialogDrag
+        :before-close="handleClose"
         append-to-body
       >
         <template slot="title">
@@ -555,7 +556,44 @@
         </div>
         <div style="padding: 4px; display: flex; justify-content: center">
           <draggable
-            v-model="feeInfo ? setRowList2 : setRowList3"
+            v-show="feeInfo == true"
+            v-model="setRowList2"
+            group="site"
+            animation="300"
+            @start="onStart"
+            @end="onEnd"
+            handle=".indraggable"
+          >
+            <transition-group>
+              <div
+                v-for="item in setRowList2"
+                :key="item.surface"
+                class="listStyle"
+              >
+                <div style="width: 500px" class="indraggable">
+                  <div class="progress" :style="{ width: item.width + 'px' }">
+                    <el-checkbox
+                      :label="item.name"
+                      v-model="item.checked"
+                      :true-label="0"
+                      :false-label="1"
+                    >{{ item.name }}
+                    </el-checkbox>
+                  </div>
+                </div>
+                <el-input-number
+                  v-model.number="item.width"
+                  controls-position="right"
+                  :min="1"
+                  :max="500"
+                  size="mini"
+                ></el-input-number>
+              </div>
+            </transition-group>
+          </draggable>
+          <draggable
+            v-show="feeInfo == false"
+            v-model="setRowList3"
             group="site"
             animation="300"
             @start="onStart"
@@ -564,7 +602,7 @@
           >
             <transition-group>
               <div
-                v-for="item in feeInfo ? setRowList2 : setRowList3"
+                v-for="item in setRowList3"
                 :key="item.surface"
                 class="listStyle"
               >
@@ -605,8 +643,8 @@
         active-text-color="#ffd04b"
         style="display: flex;float: left"
       >
-        <el-menu-item index="1">费用信息</el-menu-item>
-        <el-menu-item index="2">发票信息</el-menu-item>
+        <el-menu-item index='1'>费用信息</el-menu-item>
+        <el-menu-item index='2'>发票信息</el-menu-item>
       </el-menu>
       <el-button
         type="success"
@@ -614,9 +652,9 @@
         @click="addList"
         :disabled="notChange"
         style="float: right;margin-top: 10px"
-        v-if="invoiceInfo == true">新 行</el-button>
+        v-if="feeInfo == false">新 行</el-button>
       <el-table
-        v-if="feeInfo"
+        v-if="feeInfo == true"
         v-loading="loading"
         :data="increase_s"
         @selection-change="handleSelectionChange_s"
@@ -679,7 +717,7 @@
         </el-table-column>
       </el-table>
       <el-table
-        v-if="invoiceInfo"
+        v-if="feeInfo == false"
         v-loading="loading"
         :data="invoiceList"
         @selection-change="handleSelectionChange_s"
@@ -1162,9 +1200,8 @@ export default {
       unitOptions:[],
       fDNameOptions: [],
       invoiceList:[],
-      invoiceInfo:false,
       feeInfo:true,
-      activeIndex:"1",
+      activeIndex:'1',
       vesselOptions:[],
       mainTable:false,
       //全屏放大
@@ -1648,7 +1685,6 @@ export default {
         }
       });
     }
-
     this.getRow();
     this.getRow2();
     this.getRow3();
@@ -1667,6 +1703,10 @@ export default {
 
   },
   methods: {
+    handleClose(done) {
+      this.showSetting2 = false
+      this.showSetting3 = false
+    },
     //发票信息新行
     addList(){
       this.invoiceList.push({
@@ -1719,12 +1759,11 @@ export default {
     },
     //sheet切换
     handleSelect(key, keyPath) {
+      console.log(typeof(key))
         if(key === '1') {
           this.feeInfo = true
-          this.invoiceInfo = false
         }else{
           this.feeInfo = false
-          this.invoiceInfo = true
         }
     },
     portRemthod(){
@@ -2019,6 +2058,7 @@ export default {
       revocation(data).then((data) => {
         if (data.code === 200) {
           this.$message.success("撤销成功");
+          this.mainTable = false
           this.open = false;
           this.getList();
         }
@@ -2150,10 +2190,17 @@ export default {
     immediateApproval() {
       this.addOrUpdateVisib = true;
       this.$nextTick(() => {
-        this.$refs.ApprovalComments.init(
-          this.approval.billId,
-          this.approval.actId
-        );
+        if(Cookies.get("sysType") == 3){
+          this.$refs.ApprovalComments.init(
+            this.approval.billId,
+            470
+          );
+        }else{
+          this.$refs.ApprovalComments.init(
+            this.approval.billId,
+            this.approval.actId
+          );
+        }
       });
     },
     // 查看审批流
@@ -2175,6 +2222,7 @@ export default {
       formDate.append("tFeeDo", JSON.stringify(this.increase_s));
       backCharge(formDate).then((response) => {
         this.open = false;
+        this.mainTable = false
         this.msgSuccess("操作成功");
         this.getList();
       });
@@ -2783,7 +2831,7 @@ export default {
               }
             }
           }
-          MessageBox.confirm("第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
+          MessageBox.confirm("选中的第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning'
@@ -2846,6 +2894,8 @@ export default {
             type: 'warning'
           }
         ).then(() => {
+          this.activeIndex = '1'
+          console.log('1')
           this.mainTable = false
           this.approve = false;
           this.getList();
@@ -3036,20 +3086,21 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+      console.log(this.activeIndex)
       this.notChange = false;
       this.doNot = false
       this.hide = true;
       this.reset();
-      (this.pass = {
+      this.pass = {
         fAmtdr: 0, //应收合计
         fAmtcr: 0, //应付合计
         fMblno: "", //提单号
         fName: "", //货权方
         fFeesName: "", //结算单位
         fCorpid: "", //结算单位ID
-      }),
-        // this.queryParams = []
-        (this.increase_s = []);
+      },
+      this.increase_s = [];
+      this.invoiceList = []
       this.queryParams = {
         pageNum: 1,
         pageSize: 10,
@@ -3309,6 +3360,28 @@ export default {
             }
           }
         });
+      }else if(Cookies.get("sysType") == 3){
+        delCharge_s(fIds).then((data) => {
+          switch (data.msg) {
+            case "0": {
+              this.$message.error("当前数据已被其他操作员操作请刷新页面");
+              break;
+            }
+            case "1": {
+              tips = "当前主表有数据从表无数据是否删除";
+              this.delete_S(fIds, tips);
+              break;
+            }
+            case "2": {
+              tips = "当前主表有数据从表有数据是否删除";
+              this.delete_S(fIds, tips);
+              break;
+            }
+            default: {
+              return this.$message.error("未知错误,无状态");
+            }
+          }
+        });
       }
     },
     delete_S(fIds, tips) {
@@ -3322,6 +3395,8 @@ export default {
             return delCharge(fIds);
           } else if (Cookies.get("sysType") == 2) {
             return delCharges(fIds);
+          }else if(Cookies.get("sysType") == 3){
+            return delCharge(fIds);
           }
         })
         .then(() => {

+ 32 - 6
src/views/finance/charge/index.vue

@@ -329,7 +329,7 @@
         @pagination="getList"
       />
     </div>
-    <div v-show="mainTable == true">
+    <div v-if="mainTable == true">
       <el-form
         :model="queryParams"
         :rules="ruless"
@@ -2321,6 +2321,7 @@ export default {
                     waterBillNo: null,
                 }
                 this.increase_s = []
+                this.doNot = false
               });
             }
           } else {
@@ -2518,7 +2519,7 @@ export default {
               }
             }
           }
-          MessageBox.confirm("第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
+          MessageBox.confirm("选中的第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning'
@@ -2837,7 +2838,7 @@ export default {
           this.fMblnoOptions = response.data.corps;
           this.mainTable = true
           this.title = "修改收费列表";
-          if (this.DzfeeList) {
+          if (this.increase_s.length != 0) {
             this.doNot = true;
           } else {
             this.doNot = false;
@@ -2868,7 +2869,7 @@ export default {
           this.fMblnoOptions = response.data.corps;
           this.mainTable = true
           this.title = "修改收费列表";
-          if (this.DzfeeList) {
+          if (this.increase_s.length != 0) {
             this.doNot = true;
           } else {
             this.doNot = false;
@@ -2897,8 +2898,9 @@ export default {
           this.fWbuOptions = response.data.feesList;
           this.fMblnoOptions = response.data.corps;
           this.mainTable = true
+          console.log("111")
           this.title = "修改收费列表";
-          if (this.DzfeeList) {
+          if (this.increase_s.length != 0) {
             this.doNot = true;
           } else {
             this.doNot = false;
@@ -3024,6 +3026,28 @@ export default {
             }
           }
         });
+      }else if(Cookies.get("sysType") == 3){
+        delCharge_s(fIds).then((data) => {
+          switch (data.msg) {
+            case "0": {
+              this.$message.error("当前数据已被其他操作员操作请刷新页面");
+              break;
+            }
+            case "1": {
+              tips = "当前主表有数据从表无数据是否删除";
+              this.delete_S(fIds, tips);
+              break;
+            }
+            case "2": {
+              tips = "当前主表有数据从表有数据是否删除";
+              this.delete_S(fIds, tips);
+              break;
+            }
+            default: {
+              return this.$message.error("未知错误,无状态");
+            }
+          }
+        });
       }
     },
     delete_S(fIds, tips) {
@@ -3037,6 +3061,8 @@ export default {
             return delCharge(fIds);
           } else if (Cookies.get("sysType") == 2) {
             return delCharges(fIds);
+          }else if(Cookies.get("sysType") == 3){
+            return delCharge(fIds);
           }
         })
         .then(() => {
@@ -3068,7 +3094,7 @@ export default {
         this.queryParams.fAmtcr += this.increase_s[item].fAmt;
         this.queryParams.fAmtdr += this.increase_s[item].fAmtdr;
       }
-      if (this.increase_s == 0) {
+      if (this.increase_s.length == 0) {
         console.log("111");
         this.doNot = false;
       } else {

+ 37 - 13
src/views/finance/contrast/index.vue

@@ -315,7 +315,7 @@
       />
     </div>
     <!--    新增修改页面-->
-    <div v-show="mainTable == true">
+    <div v-if="mainTable == true">
       <el-form
         ref="ruless"
         :model="queryParams"
@@ -417,6 +417,12 @@
         </el-form-item>
         <div style="width: 100%; display: flex; justify-content: space-between">
           <div style="display: flex">
+            <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === true" size="mini" @click="cancel"
+            >返回列表</el-button
+            >
+            <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === false" size="mini" @click="homePage"
+            >返回首页</el-button
+            >
             <el-button
               type="warning"
               size="mini"
@@ -466,12 +472,6 @@
               :disabled="notChange"
             >保 存</el-button
             >
-            <el-button v-if="cancelButton === true" size="mini" @click="cancel"
-            >返 回</el-button
-            >
-            <el-button v-if="cancelButton === false" size="mini" @click="homePage"
-            >返 回</el-button
-            >
             <el-button @click="addPage" size="mini">新 增</el-button>
           </div>
           <div style="margin: 0 12px">
@@ -564,6 +564,8 @@
         v-loading="loading"
         :data="DzfeeList"
         @selection-change="handleSelectionChange_s"
+        show-summary
+        :summary-method="listTotal"
       >
         <el-table-column label="行号" align="center" type="index" />
         <el-table-column
@@ -1664,8 +1666,7 @@ export default {
       resetModule(this.data).then((res) => {
         if (res.code == 200) {
           this.showSetting = false;
-          this.setRowList = this.tableDate;
-          this.getRowList = this.tableDate;
+          this.setRowList = this.getRowList = this.$options.data().tableDate
         }
       });
     },
@@ -1727,8 +1728,7 @@ export default {
       resetModule(this.data).then((res) => {
         if (res.code == 200) {
           this.showSetting2 = false;
-          this.setRowList2 = this.tableDate2;
-          this.getRowList2 = this.tableDate2;
+          this.setRowList2 = this.getRowList2 = this.$options.data().tableDate2
         }
       });
     },
@@ -1748,7 +1748,7 @@ export default {
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = "合计";
-        } else if (index === 7 || index === 8) {
+        } else if (column.label == '金额' || column.label == '对账金额' || column.label == '本次金额') {
           const values = data.map((item) => Number(item[column.property]));
           if (!values.every((value) => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
@@ -2257,7 +2257,7 @@ export default {
               }
             }
           }
-          MessageBox.confirm("第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
+          MessageBox.confirm("选中的第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning'
@@ -3166,6 +3166,28 @@ export default {
             }
           }
         });
+      }else if(Cookies.get("sysType") == 3){
+        detailFee(fIds).then((res) => {
+          switch (res.msg) {
+            case "0": {
+              this.$message.error("当前数据已被其他操作员操作,请刷新页面");
+              break;
+            }
+            case "1": {
+              tips = "当前主表有数据,从表无数据,确认是否删除?";
+              this.delete_s(fIds, tips);
+              break;
+            }
+            case "2": {
+              tips = "当前主表有数据,从表有数据,确认是否删除?";
+              this.delete_s(fIds, tips);
+              break;
+            }
+            default: {
+              return this.$message.error("未知错误,无状态");
+            }
+          }
+        });
       }
     },
     delete_s(fIds, tips) {
@@ -3179,6 +3201,8 @@ export default {
             return delFee(fIds);
           } else if (Cookies.get("sysType") == 2) {
             return delFleet(fIds);
+          }else if(Cookies.get("sysType") == 3){
+            return delFee(fIds);
           }
         })
         .then(() => {

+ 42 - 18
src/views/finance/payment/index.vue

@@ -314,7 +314,7 @@
       />
     </div>
     <!--    新增页面-->
-    <div v-show="mainTable == true">
+    <div v-if="mainTable == true">
       <template slot="title">
         <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
@@ -488,6 +488,12 @@
       </el-form>
       <div style="width: 100%; display: flex; justify-content: space-between">
         <div style="display: flex">
+          <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === true" size="mini" @click="cancel"
+          >返回列表</el-button
+          >
+          <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === false" size="mini" @click="homePage"
+          >返回首页</el-button
+          >
           <el-button
             type="warning"
             size="mini"
@@ -537,12 +543,6 @@
           <el-button type="primary" @click="submitForm" size="mini" :disabled="notChange"
           >保 存</el-button
           >
-          <el-button v-if="cancelButton === true" size="mini" @click="cancel"
-          >返 回</el-button
-          >
-          <el-button v-if="cancelButton === false" size="mini" @click="homePage"
-          >返 回</el-button
-          >
           <el-button @click="addPage" size="mini">新 增</el-button>
         </div>
         <div style="margin: 0 12px">
@@ -632,6 +632,8 @@
         v-loading="loading"
         :data="increase_s"
         @selection-change="handleSelectionChange_s"
+        show-summary
+        :summary-method="listTotal"
       >
         <!-- <el-table-column type="selection" width="55" align="center"/> -->
         <el-table-column label="序号" type="index" align="center" />
@@ -1922,14 +1924,14 @@ export default {
         {
           surface: "11",
           label: "fAmtdr",
-          name: "应合计",
+          name: "应合计",
           checked: 0,
           width: 100,
         },
         {
           surface: "12",
           label: "fAmtcr",
-          name: "实合计",
+          name: "实合计",
           checked: 0,
           width: 100,
         },
@@ -2304,8 +2306,7 @@ export default {
       resetModule(this.data).then((res) => {
         if (res.code == 200) {
           this.showSetting = false;
-          this.setRowList = this.tableDate;
-          this.getRowList = this.tableDate;
+          this.setRowList = this.getRowList = this.$options.data().tableDate
         }
       });
     },
@@ -2367,8 +2368,7 @@ export default {
       resetModule(this.data).then((res) => {
         if (res.code == 200) {
           this.showSetting2 = false;
-          this.setRowList2 = this.tableDate2;
-          this.getRowList2 = this.tableDate2;
+          this.setRowList2 = this.getRowList2 = this.$options.data().tableDate2
         }
       });
     },
@@ -2382,7 +2382,7 @@ export default {
     },
     //财务主取消
     signOut() {
-      if (this.increase_s == 0) {
+      if (this.increase_s.length == 0) {
         this.doNot = false;
       } else {
         this.doNot = true;
@@ -2397,7 +2397,7 @@ export default {
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = "合计";
-        } else if (index === 12 || index === 13 || index === 14) {
+        } else if (column.label == '应付合计' || column.label == '实付合计' || column.label == '金额' || column.label == '本次金额') {
           const values = data.map((item) => Number(item[column.property]));
           if (!values.every((value) => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
@@ -3056,6 +3056,7 @@ export default {
                     waterBillNo: null,
                 }
                 this.increase_s = []
+                this.doNot = false
               });
             }
           } else {
@@ -3197,7 +3198,6 @@ export default {
               for (let li in this.increase_s) {
                 if (this.selection[item].fSrcid !== this.increase_s[li].fSrcid) {
                   this.Fee = this.increase_s.concat(this.selection);
-                  console.log(this.Fee);
                   let result = [];
                   let obj = {};
                   for (let lis in this.Fee) {
@@ -3253,7 +3253,7 @@ export default {
               }
             }
           }
-          MessageBox.confirm("第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
+          MessageBox.confirm("选中的第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               type: 'warning'
@@ -3741,6 +3741,28 @@ export default {
             }
           }
         });
+      }else if(Cookies.get("sysType") == 3){
+        delCharge_s(fIds).then((data) => {
+          switch (data.msg) {
+            case "0": {
+              this.$message.error("当前数据已被其他操作员操作请刷新页面");
+              break;
+            }
+            case "1": {
+              tips = "当前主表有数据从表无数据是否删除";
+              this.delete_S(fIds, tips);
+              break;
+            }
+            case "2": {
+              tips = "当前主表有数据从表有数据是否删除";
+              this.delete_S(fIds, tips);
+              break;
+            }
+            default: {
+              return this.$message.error("未知错误,无状态");
+            }
+          }
+        });
       }
     },
     delete_S(fIds, tips) {
@@ -3754,6 +3776,8 @@ export default {
             return delCharge(fIds);
           } else if (Cookies.get("sysType") == 2) {
             return delCharges(fIds);
+          }else if(Cookies.get("sysType") == 3){
+            return delCharge(fIds);
           }
         })
         .then(() => {
@@ -3785,7 +3809,7 @@ export default {
         this.queryParams.fAmtcr += this.increase_s[item].fAmt;
         this.queryParams.fAmtdr += this.increase_s[item].fAmtdr;
       }
-      if (this.increase_s == 0) {
+      if (this.increase_s.length == 0) {
         this.doNot = false;
       } else {
         this.doNot = true;