Browse Source

Merge remote-tracking branch 'origin/master'

maxianghua 4 years ago
parent
commit
c47bf938d2

+ 0 - 41
src/views/finance/charge/index.vue

@@ -698,9 +698,7 @@ export default {
         actId:this.contrastId,
         billId:this.queryParams.fId
       }
-      console.log(this.queryParams)
       revocation(data).then(data =>{
-        console.log(data)
         if (data.code === 200){
           this.$message.success('撤销成功');
           this.open = false
@@ -755,7 +753,6 @@ export default {
           fCorpid: ''     //结算单位ID
         }
         getCharge(this.approval.billId).then(response => {
-          console.log(response)
           this.Operator = response.data.tFee.createBy
           this.increase_s = response.data.feeDoList
           this.fWbuOptions = response.data.feesList
@@ -795,7 +792,6 @@ export default {
     },
     immediateApproval(){
       this.addOrUpdateVisib = true
-      console.log(this.approval)
       this.$nextTick(() => {
         this.$refs.ApprovalComments.init(this.approval.billId,this.approval.actId)
       })
@@ -806,7 +802,6 @@ export default {
       this.addOrUpdateVisib = false
       let id = '448'
       let actId = '110'
-      console.log(this.queryParams.fId)
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(this.queryParams.fId,this.contrastId)
       })
@@ -827,10 +822,8 @@ export default {
 
     // 查看按钮
     check(row,res){
-      console.log(row.fId)
       this.notChange = true
       getCharge(row.fId).then(response => {
-        console.log(response)
         this.Operator = response.data.tFee.createBy
         this.increase_s = response.data.feeDoList
         this.fWbuOptions = response.data.feesList
@@ -839,8 +832,6 @@ export default {
         this.fMblnoOptions = response.data.corps
         this.open = true
         this.title = '收费列表'
-        console.log(this.Lander)
-        console.log(this.Operator)
         this.tablefilter = true
         if (res == 1){
           this.notChange = true
@@ -856,9 +847,7 @@ export default {
               fCorpid: ''     //结算单位ID
             }
             const fId = row.fId || this.ids
-            console.log(fId)
             getCharge(fId).then(response => {
-              console.log(response)
               this.increase_s = response.data.feeDoList
               this.fWbuOptions = response.data.feesList
               this.queryParams = response.data.tFee
@@ -882,9 +871,7 @@ export default {
             fCorpid: ''     //结算单位ID
           }
           const fId = row.fId || this.ids
-          console.log(fId)
           getCharge(fId).then(response => {
-            console.log(response)
             this.increase_s = response.data.feeDoList
             this.fWbuOptions = response.data.feesList
             this.queryParams = response.data.tFee
@@ -906,7 +893,6 @@ export default {
     },
     //确认打印
     printSomething() {
-      console.log('22222')
       // 此处的style即为打印时的样式
       const style ='table tr td,th { border-collapse: collapse;padding:0px;border:.5px #000 solid;text-align:center;}'
       print({
@@ -929,7 +915,6 @@ export default {
     },
     // 确认收费
     confirmCharge() {
-      console.log(this.increase_s)
       this.$refs['ruless'].validate(valid => {
         if (valid) {
           if(this.increase_s.length){
@@ -938,7 +923,6 @@ export default {
             formDate.append('tFee', JSON.stringify(this.queryParams))
             formDate.append('tFeeDo', JSON.stringify(this.increase_s))
             collectFee(formDate).then(response => {
-              console.log(response)
               this.open = false
               this.msgSuccess('操作成功')
               this.getList()
@@ -972,7 +956,6 @@ export default {
       this.totAL = 0
       this.Ttime = 0
       this.selection = selection
-      console.log(selection)
       if(this.selection.length == 0){
         for (let item in this.chargeList_s){
           this.totAL += Number(this.chargeList_s[item].fAmt)
@@ -988,7 +971,6 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      console.log(selection)
       this.totAL = 0
       this.ids = selection.map(item => item.fId)
       this.single = selection.length !== 1
@@ -999,7 +981,6 @@ export default {
         this.$set(row, 'fAmt', row.fAmtdr)
         this.state_s = true
       }
-      console.log('数据:' + JSON.stringify(this.selection))
       if (this.selection.length !== 0){
         this.totAL = 0
         this.Ttime = 0
@@ -1019,7 +1000,6 @@ export default {
     //确认导入
     confirmImport() {
       this.hide = true
-      console.log(this.selection)
       for (let item in this.selection) {
         this.pass.fAmtcr += Number(this.selection[item].fAmt)
         this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2))
@@ -1029,7 +1009,6 @@ export default {
         if (this.selection.length == '0') {
           this.$message.error('未选择导入行')
         } else {
-          console.log(this.selection[0].fMblno)
           for (let item in this.selection) {
             this.empty.push(this.selection[item].fMblno)
             this.nothing.push(this.selection[item].fName)
@@ -1043,10 +1022,8 @@ export default {
 
           if (this.empty.length <= 1) {
             this.pass.fMblno = this.empty[0]
-            console.log(this.pass.fMblno)
           } else {
             this.pass.fMblno = this.empty[0] + '...'
-            console.log(this.pass.fMblno)
           }
           if (this.nothing.length <= 1) {
             this.pass.fName = this.nothing[0]
@@ -1059,7 +1036,6 @@ export default {
           this.queryParams.fCorpid = this.queryParameter.fToCorpid
           this.queryParams.fAmtcr = this.pass.fAmtcr
           this.queryParams.fAmtdr = this.pass.fAmtdr
-          console.log(this.queryParams)
           this.innerVisible = false
           this.chargeList_s = []
           this.queryParameter = {
@@ -1083,7 +1059,6 @@ export default {
         this.options = response.data
       })
       listCharge(this.tableFilter).then(response => {
-        console.log(response)
         this.chargeList = response.rows
         this.total = response.total
         this.loading = false
@@ -1125,8 +1100,6 @@ export default {
     },
     /** 导入搜索 */
     importSearch() {
-      console.log(this.queryParameter)
-      // console.log(this.queryParameter[0].fFeeid.join(','))
       // .join(',')
       this.chargeList_s = []
       if(this.queryParameter.fStatementNo){
@@ -1218,7 +1191,6 @@ export default {
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name }
       listFees(queryParams).then((response) => {
-        console.log(this.fWbuOptions)
         this.fWbuOptions = response.rows
       })
     },
@@ -1258,7 +1230,6 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      console.log(row)
       this.approve = false
       this.hide = false
       this.notChange = false
@@ -1272,9 +1243,7 @@ export default {
         fCorpid: ''     //结算单位ID
       }
       const fId = row.fId || this.ids
-      console.log(fId)
       getCharge(fId).then(response => {
-        console.log(response)
         this.Operator = response.data.tFee.createBy
         this.increase_s = response.data.feeDoList
         this.fWbuOptions = response.data.feesList
@@ -1287,12 +1256,9 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      console.log(this.queryParameter)
       this.$refs['ruless'].validate(valid => {
-        console.log(valid)
         if (valid) {
           if (this.queryParams.fId == null) {
-            console.log(this.queryParams)
             // this.chargeList.fBillstatus = '1'
             this.queryParams.fBillstatus = '1'
             let formData = new window.FormData()
@@ -1305,7 +1271,6 @@ export default {
               this.getList()
             })
           } else {
-            console.log(this.queryParams)
             this.queryParams.fBillstatus = '1'
             let formData = new window.FormData()
             formData.append('tFee', JSON.stringify(this.queryParams))
@@ -1323,10 +1288,8 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const fIds = row.fId || this.ids
-      console.log(fIds)
       let tips = ''
       delCharge_s(fIds).then(data => {
-        console.log(data)
         switch (data.msg) {
           case '0': {
             this.$message.error('当前数据已被其他操作员操作请刷新页面')
@@ -1379,13 +1342,9 @@ export default {
       this.queryParams.fAmtdr = 0
       rows.splice(index, 1)
       for (let item in this.increase_s) {
-        console.log(this.increase_s[item])
         this.queryParams.fAmtcr += this.increase_s[item].fAmt
         this.queryParams.fAmtdr += this.increase_s[item].fAmtdr
       }
-      console.log(this.queryParams.fAmtdr)
-      console.log(this.queryParams.fAmtcr)
-
     }
   }
 }

+ 0 - 15
src/views/finance/contrast/index.vue

@@ -1018,12 +1018,9 @@ export default {
     register() {
       queryUserVal().then((response)=>{
         this.Lander = response.user.userName
-      //   console.log(response)
       //   this.Lander = response.user.userName
       //   this.queryParams_s.createBy = response.user.userName
       // this.queryParams.createBy = response.user.userName
-      // console.log(this.DzfeeList.createBy)
-      // console.log(response.user.userName)
       })
     },
     // 合计
@@ -1045,7 +1042,6 @@ export default {
       if(this.selection.length == 0){
         for (let item in this.feeList){
           this.totAL += Number(this.feeList[item].fAmt)
-          console.log(this.feeList[item].fAmt)
           this.Ttime += Number(this.feeList[item].fAmtdr)
         }
       }else{
@@ -1100,8 +1096,6 @@ export default {
 
       }
       this.pass.fAmtcr.toFixed(2)
-      console.log(this.pass.fAmtdr)
-      console.log(this.pass.fAmtcr)
       if(this.state_s == true) {
         if (this.selection.length == '0') {
           this.$message.error('未选择导入行');
@@ -1156,10 +1150,8 @@ export default {
     },
     // imgChangeI(fAmtdr,fAmt){
     //   if (fAmt <= fAmtdr){
-    //     console.log("小了!")
     //     this.state_s = true
     //   }else if(fAmt > fAmtdr){
-    //     console.log("大了!")
     //     this.$message.error('本次金额不能大于原定金额');
     //     this.state_s = false
     //   }
@@ -1470,23 +1462,16 @@ export default {
             }
             this.queryParams.fAmtcr = Number(this.pass.fAmtcr.toFixed(2))
             this.queryParams.fAmtdr = Number(this.pass.fAmtdr.toFixed(2))
-            console.log(this.pass.fAmtcr)
-            console.log(this.pass.fAmtdr)
             this.pass.fAmtcr.toFixed(2)
             this.queryParams.fBillstatus = '1'
             let formData = new window.FormData()
             formData.append('tFee',JSON.stringify(this.queryParams))
             formData.append("tFeeDo", JSON.stringify(this.DzfeeList))
-            console.log(this.queryParams)
-            console.log(this.DzfeeList)
-            console.log(formData)
             addFee(formData).then(response => {
-              console.log(formData)
               this.msgSuccess("修改成功");
               // this.DzfeeList = []
               // this.open = false;
               this.getList();
-
             });
           }
         }

+ 0 - 44
src/views/finance/payment/index.vue

@@ -698,9 +698,7 @@ export default {
         actId:this.contrastId,
         billId:this.queryParams.fId
       }
-      console.log(this.queryParams)
       revocation(data).then(data =>{
-        console.log(data)
         if (data.code === 200){
           this.$message.success('撤销成功');
           this.open = false
@@ -755,7 +753,6 @@ export default {
           fCorpid: ''     //结算单位ID
         }
         getCharge(this.approval.billId).then(response => {
-          console.log(response)
           this.Operator = response.data.tFee.createBy
           this.increase_s = response.data.feeDoList
           this.fWbuOptions = response.data.feesList
@@ -795,7 +792,6 @@ export default {
     },
     immediateApproval(){
       this.addOrUpdateVisib = true
-      console.log(this.approval)
       this.$nextTick(() => {
         this.$refs.ApprovalComments.init(this.approval.billId,this.approval.actId)
       })
@@ -806,7 +802,6 @@ export default {
       this.addOrUpdateVisib = false
       let id = '448'
       let actId = '110'
-      console.log(this.queryParams.fId)
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(this.queryParams.fId,this.contrastId)
       })
@@ -827,10 +822,8 @@ export default {
 
     // 查看按钮
     check(row,res){
-      console.log(row.fId)
       this.notChange = true
       getCharge(row.fId).then(response => {
-        console.log(response)
         this.Operator = response.data.tFee.createBy
         this.increase_s = response.data.feeDoList
         this.fWbuOptions = response.data.feesList
@@ -839,8 +832,6 @@ export default {
         this.fMblnoOptions = response.data.corps
         this.open = true
         this.title = '付费列表'
-        console.log(this.Lander)
-        console.log(this.Operator)
         this.tablefilter = true
         if (res == 1){
           this.notChange = true
@@ -856,9 +847,7 @@ export default {
               fCorpid: ''     //结算单位ID
             }
             const fId = row.fId || this.ids
-            console.log(fId)
             getCharge(fId).then(response => {
-              console.log(response)
               this.increase_s = response.data.feeDoList
               this.fWbuOptions = response.data.feesList
               this.queryParams = response.data.tFee
@@ -882,9 +871,7 @@ export default {
             fCorpid: ''     //结算单位ID
           }
           const fId = row.fId || this.ids
-          console.log(fId)
           getCharge(fId).then(response => {
-            console.log(response)
             this.increase_s = response.data.feeDoList
             this.fWbuOptions = response.data.feesList
             this.queryParams = response.data.tFee
@@ -906,7 +893,6 @@ export default {
     },
     //确认打印
     printSomething() {
-      console.log('22222')
       // 此处的style即为打印时的样式
       const style ='table tr td,th { border-collapse: collapse;padding:0px;border:.5px #000 solid;text-align:center;}'
       print({
@@ -929,7 +915,6 @@ export default {
     },
     // 确认付费
     confirmCharge() {
-      console.log(this.increase_s)
       this.$refs['ruless'].validate(valid => {
         if (valid) {
           if(this.increase_s.length){
@@ -938,7 +923,6 @@ export default {
             formDate.append('tFee', JSON.stringify(this.queryParams))
             formDate.append('tFeeDo', JSON.stringify(this.increase_s))
             collectFee(formDate).then(response => {
-              console.log(response)
               this.open = false
               this.msgSuccess('操作成功')
               this.getList()
@@ -972,7 +956,6 @@ export default {
       this.totAL = 0
       this.Ttime = 0
       this.selection = selection
-      console.log(selection)
       if(this.selection.length == 0){
         for (let item in this.chargeList_s){
           this.totAL += Number(this.chargeList_s[item].fAmt)
@@ -988,7 +971,6 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      console.log(selection)
       this.totAL = 0
       this.ids = selection.map(item => item.fId)
       this.single = selection.length !== 1
@@ -999,7 +981,6 @@ export default {
         this.$set(row, 'fAmt', row.fAmtdr)
         this.state_s = true
       }
-      console.log('数据:' + JSON.stringify(this.selection))
       if (this.selection.length !== 0){
         this.totAL = 0
         this.Ttime = 0
@@ -1023,13 +1004,10 @@ export default {
         this.pass.fAmtcr += Number(this.selection[item].fAmt.toFixed(2))
         this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2))
       }
-      console.log(this.pass)
       if (this.state_s == true) {
         if (this.selection.length == '0') {
-          console.log('未选择')//写入提示
           this.$message.error('未选择导入行')
         } else {
-          console.log(this.selection[0].fMblno)
           for (let item in this.selection) {
             this.empty.push(this.selection[item].fMblno)
             this.nothing.push(this.selection[item].fName)
@@ -1043,10 +1021,8 @@ export default {
 
           if (this.empty.length <= 1) {
             this.pass.fMblno = this.empty[0]
-            console.log(this.pass.fMblno)
           } else {
             this.pass.fMblno = this.empty[0] + '...'
-            console.log(this.pass.fMblno)
           }
           if (this.nothing.length <= 1) {
             this.pass.fName = this.nothing[0]
@@ -1059,7 +1035,6 @@ export default {
           this.queryParams.fCorpid = this.queryParameter.fToCorpid
           this.queryParams.fAmtcr = this.pass.fAmtcr
           this.queryParams.fAmtdr = this.pass.fAmtdr
-          console.log(this.queryParams)
           this.innerVisible = false
           this.chargeList_s = []
           this.queryParameter = {
@@ -1083,7 +1058,6 @@ export default {
         this.options = response.data
       })
       listCharge(this.tableFilter).then(response => {
-        console.log(response)
         this.chargeList = response.rows
         this.total = response.total
         this.loading = false
@@ -1125,8 +1099,6 @@ export default {
     },
     /** 导入搜索 */
     importSearch() {
-      console.log(this.queryParameter)
-      // console.log(this.queryParameter[0].fFeeid.join(','))
       // .join(',')
       this.chargeList_s = []
       if(this.queryParameter.fStatementNo){
@@ -1218,7 +1190,6 @@ export default {
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name }
       listFees(queryParams).then((response) => {
-        console.log(this.fWbuOptions)
         this.fWbuOptions = response.rows
       })
     },
@@ -1258,7 +1229,6 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      console.log(row)
       this.approve = false
       this.hide = false
       this.notChange = false
@@ -1272,9 +1242,7 @@ export default {
         fCorpid: ''     //结算单位ID
       }
       const fId = row.fId || this.ids
-      console.log(fId)
       getCharge(fId).then(response => {
-        console.log(response)
         this.Operator = response.data.tFee.createBy
         this.increase_s = response.data.feeDoList
         this.fWbuOptions = response.data.feesList
@@ -1287,12 +1255,9 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      console.log(this.queryParameter)
       this.$refs['ruless'].validate(valid => {
-        console.log(valid)
         if (valid) {
           if (this.queryParams.fId == null) {
-            console.log(this.queryParams)
             // this.chargeList.fBillstatus = '1'
             this.queryParams.fBillstatus = '1'
             let formData = new window.FormData()
@@ -1313,11 +1278,8 @@ export default {
             }
             this.queryParams.fAmtcr = Number(this.pass.fAmtcr.toFixed(2))
             this.queryParams.fAmtdr = Number(this.pass.fAmtdr.toFixed(2))
-            console.log(this.pass.fAmtcr)
-            console.log(this.pass.fAmtdr)
             this.pass.fAmtcr.toFixed(2)
 
-            console.log(this.queryParams)
             this.queryParams.fBillstatus = '1'
             let formData = new window.FormData()
             formData.append('tFee', JSON.stringify(this.queryParams))
@@ -1335,10 +1297,8 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const fIds = row.fId || this.ids
-      console.log(fIds)
       let tips = ''
       delCharge_s(fIds).then(data => {
-        console.log(data)
         switch (data.msg) {
           case '0': {
             this.$message.error('当前数据已被其他操作员操作请刷新页面')
@@ -1391,13 +1351,9 @@ export default {
       this.queryParams.fAmtdr = 0
       rows.splice(index, 1)
       for (let item in this.increase_s) {
-        console.log(this.increase_s[item])
         this.queryParams.fAmtcr += this.increase_s[item].fAmt
         this.queryParams.fAmtdr += this.increase_s[item].fAmtdr
       }
-      console.log(this.queryParams.fAmtdr)
-      console.log(this.queryParams.fAmtcr)
-
     }
   }
 }

+ 123 - 40
src/views/warehouseBusiness/agreement/index.vue

@@ -178,7 +178,7 @@
             size="mini"
             type="text"
             icon="el-icon-view"
-            @click="check(scope.row,0)"
+            @click="check_s(scope.row,0)"
             v-hasPermi="['agreement:agreementStorage:edit']"
           >查看
           </el-button>
@@ -231,8 +231,8 @@
     />
 
     <!-- 添加或修改仓储费对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="65%" append-to-body :before-close="handleClose"
-               :close-on-click-modal="false" :show-close="false"
+    <el-dialog :title="title" :visible.sync="open" width="65%" append-to-body :show-close="colseButton"
+               :close-on-click-modal="false"
     >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px"
                style="display: flex;flex-wrap: wrap;"
@@ -297,7 +297,7 @@
           </el-select>
         </el-form-item>
       </el-form>
-      <el-button type="primary" @click="submit" :disabled="notChange" v-if="form.fBillstatus < 4">请 核</el-button>
+      <el-button type="primary" @click="submit" :disabled="notChange">请 核</el-button>
 
       <div class="dialogTableTitle flex a-center jlr">
         <h2>标题</h2>
@@ -430,8 +430,8 @@
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
         <el-button v-if="approve === true" @click="goApproval">审批</el-button>
-        <el-button type="danger" :disabled="disappear" @click="backApproval" v-if="form.fBillstatus == '4'">撤销审批</el-button>
-        <el-button type="info" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
+        <el-button type="danger" :disabled="disappear" @click="backApproval" v-if="form.fBillstatus == '4' && Operator == Lander">撤销审批</el-button>
+        <el-button type="info" v-if="form.fBillstatus >= 3" @click="addOrUpdateHandle()">查看审批流</el-button>
         <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
@@ -476,6 +476,7 @@ export default {
   },
   data() {
     return {
+      colseButton:true,
       cancelButton:true,
       // 审批状态
       approve:false,
@@ -567,6 +568,12 @@ export default {
         ],
         tPackages:[
           { required: true, message: ' ', trigger: 'blur' }
+        ],
+        fBegindate:[
+          { required: true, message: ' ', trigger: 'blur' }
+        ],
+        fEnddate:[
+          { required: true, message: ' ', trigger: 'blur' }
         ]
       }
     }
@@ -640,6 +647,7 @@ export default {
       if(this.approval) {
 
         this.approval = JSON.parse(this.approval)
+        this.colseButton = false
         this.hide = false
         this.open = true
         this.notChange = true
@@ -693,13 +701,74 @@ export default {
         this.Lander = response.user.userName
       })
     },
+    check_s(row, res) {
+      this.disappear = true
+      this.notChange = true
+      this.browseStatus = true
+      getAgreement(row.fId).then(response => {
+        this.Operator = response.data.corps.createBy
+        this.deptName = response.data.dept.deptName
+        this.form = response.data.tWarehouseAgreement
+        this.fMblnoOptions = response.data.corps
+        this.agreementitemsList = response.data.tWarehouseAgreementitems
+        for (let item in this.agreementitemsList) {
+          this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+          // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+        }
+        this.fWbuOptions = response.data.feesList
+        this.add = row
+        this.title = '修改仓储费'
+        // if (res == 1) {
+        //   this.notChange = true
+        //   if (this.Operator == this.Lander) {
+        //     this.disappear = false
+        //     this.reset()
+        //     // const fId = row.fId || this.ids
+        //     getAgreement(row.fId).then(response => {
+        //       this.deptName = response.data.dept.deptName
+        //       this.form = response.data.tWarehouseAgreement
+        //       this.fMblnoOptions = response.data.corps
+        //       this.agreementitemsList = response.data.tWarehouseAgreementitems
+        //       for (let item in this.agreementitemsList) {
+        //         this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+        //         // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+        //       }
+        //       this.fWbuOptions = response.data.feesList
+        //       this.add = row
+        //       this.open = true
+        //     })
+        //   }else {
+        //     this.notChange = true
+        //   }
+        // }else{
+        //   this.notChange = true
+        //   this.reset()
+        // }
+      })
+      const fId = row.fId || this.ids
+      getAgreement(row.fId).then(response => {
+        this.deptName = response.data.dept.deptName
+        this.form = response.data.tWarehouseAgreement
+        this.fMblnoOptions = response.data.corps
+        this.agreementitemsList = response.data.tWarehouseAgreementitems
+        for (let item in this.agreementitemsList) {
+          this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+          // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+        }
+        this.fWbuOptions = response.data.feesList
+        this.add = row
+        this.open = true
+      })
+    },
+
     // 查看按钮
     check(row, res) {
       this.disappear = false
       this.notChange = true
       this.browseStatus = true
       getAgreement(row.fId).then(response => {
-        this.Operator = response.data.corps.createBy
+        console.log(response.data.corps[0].createBy)
+        this.Operator = response.data.corps[0].createBy
         this.deptName = response.data.dept.deptName
         this.form = response.data.tWarehouseAgreement
         this.fMblnoOptions = response.data.corps
@@ -711,35 +780,36 @@ export default {
         this.fWbuOptions = response.data.feesList
         this.add = row
         this.title = '修改仓储费'
-        if (res == 1) {
-          this.notChange = true
-          if (this.Operator == this.Lander) {
-            this.disappear = false
-            this.reset()
-            // const fId = row.fId || this.ids
-            getAgreement(row.fId).then(response => {
-              this.deptName = response.data.dept.deptName
-              this.form = response.data.tWarehouseAgreement
-              this.fMblnoOptions = response.data.corps
-              this.agreementitemsList = response.data.tWarehouseAgreementitems
-              for (let item in this.agreementitemsList) {
-                this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
-                // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
-              }
-              this.fWbuOptions = response.data.feesList
-              this.add = row
-              this.open = true
-            })
-          }else {
-            this.notChange = true
-          }
-        }else{
-          this.notChange = true
-          this.reset()
-        }
+        // if (res == 1) {
+        //   this.notChange = true
+        //   if (this.Operator == this.Lander) {
+        //     this.disappear = false
+        //     this.reset()
+        //     // const fId = row.fId || this.ids
+        //     getAgreement(row.fId).then(response => {
+        //       this.deptName = response.data.dept.deptName
+        //       this.form = response.data.tWarehouseAgreement
+        //       this.fMblnoOptions = response.data.corps
+        //       this.agreementitemsList = response.data.tWarehouseAgreementitems
+        //       for (let item in this.agreementitemsList) {
+        //         this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+        //         // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+        //       }
+        //       this.fWbuOptions = response.data.feesList
+        //       this.add = row
+        //       this.open = true
+        //     })
+        //   }else {
+        //     this.notChange = true
+        //   }
+        // }else{
+        //   this.notChange = true
+        //   this.reset()
+        // }
       })
-      // const fId = row.fId || this.ids
+      const fId = row.fId || this.ids
       getAgreement(row.fId).then(response => {
+        console.log(response)
         this.deptName = response.data.dept.deptName
         this.form = response.data.tWarehouseAgreement
         this.fMblnoOptions = response.data.corps
@@ -924,7 +994,7 @@ export default {
         fFreedays: null,
         fBegindate: null,
         fEnddate: null,
-        fBillstatus: 'T',
+        fBillstatus: null,
         delFlag: null,
         createBy: null,
         createTime: null,
@@ -995,7 +1065,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset()
+      // this.reset()
       this.notChange = false
       this.browseStatus = false
       const fId = row.fId || this.ids
@@ -1025,6 +1095,18 @@ export default {
         this.KHblnoOptions = response.rows
       })
     },
+    debounce(fn, delay) {
+      console.log("防抖触发")
+      let timerId = null;
+      return function () {
+        let self = this;
+        let args = arguments;
+        timerId && clearTimeout(timerId);
+        timerId = setTimeout(function () {
+          fn.apply(self, args);
+        }, delay || 1000);
+      }
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs['form'].validate(valid => {
@@ -1037,9 +1119,9 @@ export default {
               formData.append('agreementitems', JSON.stringify(this.agreementitemsList))
               addAgreement(formData).then(response => {
                 this.msgSuccess('修改成功')
-                this.open = false
+                // this.open = false
                 this.getList()
-                this.agreementitemsList = []
+                // this.agreementitemsList = []
               })
             })
           } else {
@@ -1049,9 +1131,10 @@ export default {
             formData.append('agreementitems', JSON.stringify(this.agreementitemsList))
             addAgreement(formData).then(response => {
               this.msgSuccess('新增成功')
-              this.open = false
+              // this.open = false
+              this.form.fId  = response.data.tWarehouseAgreement.fId;
               this.getList()
-              this.agreementitemsList = []
+              // this.agreementitemsList = []
             })
           }
         }

+ 63 - 12
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -227,7 +227,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row, true)"
+            @click="handleUpdate_s(scope.row, true)"
             v-hasPermi="['warehouseBusiness:storageFeeCalculation:edit']"
           >查看
           </el-button>
@@ -826,7 +826,7 @@
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取 消</el-button>
-        <el-button type="danger" size="small" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
+        <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
         <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
         <el-button
           :disabled="browseStatus"
@@ -1339,9 +1339,55 @@
         this.relevantAttachments = [];
         this.title = "出库单";
       },
+      handleUpdate_s(row, status) {
+        this.disappear = true
+        this.notChange = true
+        this.browseStatus = status;
+        this.reset();
+        let data = row || this.ids;
+        getStorageFeeCalculation(data.fId).then((response) => {
+
+          this.fMblnoOptions = []
+          if (response.data.corps) {
+            this.fMblnoOptions.push(response.data.corps)
+          }
+          if (response.data.warehouse) {
+            this.form = response.data.warehouse
+            this.Operator = this.form.createBy
+            this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+            this.$set(this.form, 'fBillingDeadline', Date.parse(this.form.fBillingDeadline))
+          }
+          if (response.data.warehouseItemsList) {
+            this.dataList = response.data.warehouseItemsList
+            for (let li in this.dataList) {
+              this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
+              this.$set(this.dataList[li], 'fChargedate', Date.parse(this.dataList[li].fChargedate))
+              this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
+              this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
+            }
+            console.log(this.dataList)
+          }
+          if (response.data.warehouseFeesList) {
+            this.warehouseDrList = response.data.warehouseFeesList
+          }
+          if (response.data.goodsList) {
+            this.goodsOptions = response.data.goodsList
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList
+          }
+          this.userOptions = response.data.sysUser;
+          this.open = true;
+          this.title = "编辑仓储费计算";
+          console.log(this.Operator)
+          console.log(this.Lander)
+        });
+
+      },
 
       /** 修改按钮操作 */
       handleUpdate(row, status) {
+        this.disappear = false
         this.notChange = true
         this.browseStatus = status;
         this.reset();
@@ -1499,17 +1545,22 @@
       },
       handleExportItems() {
         const fIds = this.form.fId
-        this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(function () {
-            return exportWarehousebillsitems(fIds);
+        if(fIds !== null){
+          this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
           })
-          .then((response) => {
-            this.download(response.msg);
-          });
+            .then(function () {
+              return exportWarehousebillsitems(fIds);
+            })
+            .then((response) => {
+              this.download(response.msg);
+            });
+        }else{
+          this.$message("请先保存")
+        }
+
       },
       deleteRow(index, rows) {
         rows.splice(index, 1);