Bladeren bron

货代bug 2024-1-27

caojunjie 1 jaar geleden
bovenliggende
commit
598e7fc0dc

+ 39 - 30
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -14,7 +14,7 @@
                            :loading="saveLoading" :disabled="!form.id" @click="DesignreportDialog = true" >报表设计
                 </el-button>
                 <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-if="form.status == '0' || form.status == '4'"
-                            :loading="saveLoading" @click="settlementApprovefun">提交申请
+                            :loading="saveLoading" @click="editCustomer('申请')">提交申请
                 </el-button>
                 <el-button  size="small" type="warning" plain  style="margin-right: 8px" :disabled="!form.id" v-if="form.status == '1'"
                             :loading="saveLoading" @click="revokeSettlementApprovefun">撤销申请
@@ -24,7 +24,7 @@
                             :loading="saveLoading" @click="editHandle">编 辑
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px" :disabled="!(form.status == '0' || form.status == '4')" v-else
-                            :loading="saveLoading" @click="editCustomer">保 存
+                            :loading="saveLoading" @click="editCustomer()">保 存
                 </el-button>
             </div>
         </div>
@@ -738,7 +738,7 @@
                 this.editSave = false
             },
             // 保存
-            editCustomer(){
+            editCustomer(type){
                 this.$refs.form.validate((valid) => {
                     if (!valid) return
                     if (!this.form.id) {
@@ -779,12 +779,27 @@
                         }
                         return item
                     })
-                    finstlbillsSubmit(this.form).then(res=>{
-                        this.saveLoading = false
-                        this.$message.success('操作成功');
-                        this.saveLoading = false // 关闭按钮动画
-                        this.finstlbillsDetailfun(res.data.data.id)
-                    })
+                    // 判断是直接保存还是提交申请
+                    if (type == '申请') {
+                        this.$confirm("确定进行申请操作?", {
+                            confirmButtonText: "确定",
+                            cancelButtonText: "取消",
+                            type: "warning"
+                        }).then(()=>{
+                            finstlbillsSubmit(this.form).then(res=>{
+                                this.form = res.data.data
+                                this.settlementApprovefun()
+                            })
+                        }).catch(()=>{
+                            this.saveLoading = false
+                        })
+                    }else {
+                        finstlbillsSubmit(this.form).then(res=>{
+                            this.$message.success('操作成功');
+                            this.saveLoading = false // 关闭按钮动画
+                            this.finstlbillsDetailfun(res.data.data.id)
+                        })
+                    }
                 })
             },
             // 详情接口
@@ -1013,28 +1028,22 @@
             },
             // 结算确认
             settlementApprovefun(){
-                this.$confirm("确定进行申请操作?", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning"
-                }).then(()=>{
-                    this.pageLoading = true
-                    this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
-                    this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null // 财务开始日期
-                    this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null // 财务开始日期
-                    this.form.estimatedTime = this.form.estimatedTime?this.form.estimatedTime.slice(0,10) + ' 00:00:00':null
-                    this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
-                    this.form.url = '/iosBasicData/PaymentApplication/index',
+                this.pageLoading = true
+                this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
+                this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null // 财务开始日期
+                this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null // 财务开始日期
+                this.form.estimatedTime = this.form.estimatedTime?this.form.estimatedTime.slice(0,10) + ' 00:00:00':null
+                this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
+                this.form.url = '/iosBasicData/PaymentApplication/index',
                     this.form.pageStatus = "this.$store.getters.paidapplication"
-                    this.form.pageLabel = "付费申请(F)"
-                    settlementApprove(this.form).then(res=>{
-                        this.pageLoading = false
-                        this.$message.success('操作成功');
-                        this.editSave = true
-                        this.finstlbillsDetailfun(res.data.data.id)
-                    }).catch(err=>{
-                        this.pageLoading = false
-                    })
+                this.form.pageLabel = "付费申请(F)"
+                settlementApprove(this.form).then(res=>{
+                    this.pageLoading = false
+                    this.$message.success('操作成功');
+                    this.editSave = true
+                    this.finstlbillsDetailfun(res.data.data.id)
+                }).catch(err=>{
+                    this.pageLoading = false
                 })
             },
             // 结算撤销

+ 67 - 46
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -20,13 +20,13 @@
                             :loading="saveLoading" @click="finstlbillsRevokeReconciliationfun">撤销对账
                 </el-button>
                 <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-else
-                            :loading="saveLoading" @click="finstlbillsConfirmReconciliationfun">确认对账
+                            :loading="saveLoading" @click="editCustomer('对账')">确认对账
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px" v-if="editSave" :disabled="submitType"
                             :loading="saveLoading" @click="editHandle">编 辑
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px" v-else :disabled="submitType"
-                            :loading="saveLoading" @click="editCustomer">保 存
+                            :loading="saveLoading" @click="editCustomer()">保 存
                 </el-button>
             </div>
         </div>
@@ -147,6 +147,19 @@
                                     </search-query>
                                 </el-form-item>
                             </el-col>
+                            <!--<el-col :span="4">-->
+                            <!--    <el-form-item label="对账" prop="isChecked" label-width="50px">-->
+                            <!--        <search-query :datalist="allyesnoData"-->
+                            <!--                      :selectValue="form.isChecked"-->
+                            <!--                      :clearable="true"-->
+                            <!--                      :disabled="editSave"-->
+                            <!--                      :buttonIf="false"-->
+                            <!--                      :forParameter="{ key:'dictKey', label:'dictValue', value:'dictKey'}"-->
+                            <!--                      @corpChange="corpChange($event,'isChecked')"-->
+                            <!--                      @corpFocus="allyesnoWorkDictsfun" >-->
+                            <!--        </search-query>-->
+                            <!--    </el-form-item>-->
+                            <!--</el-col>-->
                             <el-col :span="4">
                                 <el-form-item label="业务开始日期" prop="businessDateStart">
                                     <el-date-picker v-model="form.businessDateStart" clearable
@@ -821,17 +834,12 @@
                 this.editSave = false
             },
             // 保存
-            editCustomer(){
+            editCustomer(type){
                 // 对账单位
                 if (!this.form.corpId) {
                     this.$message.warning('请选择对账单位');
                     return
                 }
-                // // 业务类型
-                // if (!this.form.businessTypes) {
-                //     this.$message.warning('请选择业务类型');
-                //     return
-                // }
                 if (!this.form.id) {
                     // 是否选择从表数据
                     if (this.handleSelectionData.length == 0) {
@@ -844,10 +852,6 @@
                         this.$message.warning('请选择本次结算币种');
                         return;
                     }
-                    // if (!item.currentStlAmount) {
-                    //     this.$message.warning('请选择本次结算金额');
-                    //     return;
-                    // }
                 }
                 this.saveLoading = true // 加载动画
                 this.pageLoading = true
@@ -890,14 +894,32 @@
                         return item
                     })
                 }
-                finstlbillsSubmit(this.form).then(res=>{
-                    this.saveLoading = false
-                    this.pageLoading = false
-                    this.$message.success('操作成功');
-                    this.finstlbillsDetailfun(res.data.data.id)
-                }).catch(err=>{
-                    this.pageLoading = false
-                })
+                // 判断是单独点击保存还是点击确认对账
+                if (type == '对账') {
+                    this.$confirm("确定进行对账操作?", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    }).then(()=>{
+                        finstlbillsSubmit(this.form).then(res=>{
+                            this.form = res.data.data
+                            this.finstlbillsConfirmReconciliationfun()
+                        })
+                    }).catch(err=>{
+                        this.pageLoading = false
+                        this.saveLoading = false
+                    })
+                }else {
+                    finstlbillsSubmit(this.form).then(res=>{
+                        this.saveLoading = false
+                        this.pageLoading = false
+                        this.$message.success('操作成功');
+                        this.finstlbillsDetailfun(res.data.data.id)
+                    }).catch(err=>{
+                        this.pageLoading = false
+                        this.saveLoading = false
+                    })
+                }
             },
             // 详情接口
             finstlbillsDetailfun(id){
@@ -1146,32 +1168,27 @@
             },
             // 对账确认
             finstlbillsConfirmReconciliationfun(){
-                this.$confirm("确定进行对账操作?", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning"
-                }).then(()=>{
-
-                    this.pageLoading = true
-                    this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
-                    this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
-                    this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
-                    this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
-                    this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
-                    this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
-                    this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
-                    this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
-                    this.form.url = '/iosBasicData/finstlbills/index',
+                this.pageLoading = true
+                this.saveLoading = true
+                this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
+                this.form.accountDateFrom = this.form.accountDateFrom?this.form.accountDateFrom.slice(0,10) + ' 00:00:00':null // 财务开始日期
+                this.form.accountDateTo = this.form.accountDateTo?this.form.accountDateTo.slice(0,10) + ' 00:00:00':null // 财务开始日期
+                this.form.auditDateFrom = this.form.auditDateFrom?this.form.auditDateFrom.slice(0,10) + ' 00:00:00':null
+                this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
+                this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null
+                this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null
+                this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
+                this.form.url = '/iosBasicData/finstlbills/index',
                     this.form.pageStatus = "this.$store.getters.paidapplication"
-                    this.form.pageLabel = "对账中心(F)"
-                    finstlbillsConfirmReconciliation(this.form).then(res=>{
-                        this.pageLoading = false
-                        this.$message.success('操作成功');
-                        this.editSave = true
-                        this.finstlbillsDetailfun(res.data.data.id)
-                    }).catch(err=>{
-                        this.pageLoading = false
-                    })
+                this.form.pageLabel = "对账中心(F)"
+                finstlbillsConfirmReconciliation(this.form).then(res=>{
+                    this.pageLoading = false
+                    this.saveLoading = false
+                    this.$message.success('操作成功');
+                    this.editSave = true
+                    this.finstlbillsDetailfun(res.data.data.id)
+                }).catch(err=>{
+                    this.pageLoading = false
                 })
             },
             // 对账撤销
@@ -1332,7 +1349,11 @@
             // 获取 全部是否 接口
             allyesnoWorkDictsfun(){
                 // 全部/是/否
-                getWorkDicts('all_yes_no').then(res=>{
+                // getWorkDicts('all_yes_no').then(res=>{
+                //     this.allyesnoData = res.data.data;
+                // })
+                // 对账字典
+                getWorkDicts('los_check_status').then(res=>{
                     this.allyesnoData = res.data.data;
                 })
                 // 销账(F)

+ 10 - 0
src/views/iosBasicData/finstlbills/index.vue

@@ -54,6 +54,10 @@
               <template slot-scope="{ row }" slot="billNo">
                   <span class="pointerClick" @click="editFun(row)" >{{row.billNo}}</span>
               </template>
+              <template slot-scope="{ row }" slot="billStatus">
+                  <span v-if="row.billStatus == 1" style="color: #7fbb41" >是</span>
+                  <span v-if="row.billStatus == 0" style="color: #d2983c" >否</span>
+              </template>
           </avue-crud>
       </basic-container>
 
@@ -427,6 +431,12 @@
                 overHidden:true,
             },
             {
+                label: "生成对账",
+                prop: "billStatus",
+                width: "100",
+                overHidden:true,
+            },
+            {
               label: "是否含税价计算",
               prop: "isTax",
                 dicData:[],