Browse Source

货代增加付费申请和发票申请 2023-12-04

caojunjie 1 year ago
parent
commit
24892e36e7

+ 24 - 49
src/views/approveDataH/index.vue

@@ -16,47 +16,12 @@
         </el-select>
       </template>
       <template slot-scope="scope" slot="checkType">
-        <span v-if="scope.row.checkType == 'ffsq'">付费申请</span>
-        <span v-else-if="scope.row.checkType == 'xsqh'">销售请核</span>
-        <span v-else-if="scope.row.checkType == 'cgqh'">采购请核</span>
-        <span v-else-if="scope.row.checkType == 'xsgz'">小学部工资审批</span>
-        <span v-else-if="scope.row.checkType == 'czgz'">初中部工资审批</span>
-        <span v-else-if="scope.row.checkType == 'gzgz'">高中部工资审批</span>
-        <span v-else-if="scope.row.checkType == 'hqgz'">后勤工资审批</span>
-        <span v-else-if="scope.row.checkType == 'yrygz'">幼儿园工资审批</span>
-        <span v-else-if="scope.row.checkType == 'yryhqgz'">幼儿园后勤工资审批</span>
-        <span v-else-if="scope.row.checkType == 'ocg'">办公用品采购审批</span>
-        <span v-else-if="scope.row.checkType == 'oly'">办公用品领用审批</span>
-        <span v-else-if="scope.row.checkType == 'fybx'">费用报销审批</span>
-        <span v-else-if="scope.row.checkType == 'jjd'">交接单审批</span>
-        <span v-else-if="scope.row.checkType == 'xstpqh'">销售特批请核</span>
-        <span v-else-if="scope.row.checkType == 'dldd'">代理订单请核</span>
-        <span v-else-if="scope.row.checkType == 'xsjh'">销售机会请核</span>
-        <span v-else-if="scope.row.checkType == 'RK'">入库管理审核</span>
-        <span v-else-if="scope.row.checkType == 'CK'">出库管理审核</span>
-        <span v-else-if="scope.row.checkType == 'PD'">库内盘点审核</span>
-        <span v-else-if="scope.row.checkType == 'rzgl'">融资管理审核</span>
-        <span v-else-if="scope.row.checkType == 'BUY'">买箱审核</span>
-        <span v-else-if="scope.row.checkType == 'SELL'">卖箱审核</span>
-        <span v-else-if="scope.row.checkType == 'CKZY'">出口装运</span>
-        <span v-else-if="scope.row.checkType == 'JKFC'">进口返程</span>
-        <span v-else-if="scope.row.checkType == 'REPAIR'">修箱</span>
-        <span v-else-if="scope.row.checkType == 'WASH'">洗箱</span>
-        <span v-else-if="scope.row.checkType == 'BGJK'">报关进口</span>
-        <span v-else-if="scope.row.checkType == 'BGCK'">报关出口</span>
-        <span v-else-if="scope.row.checkType == 'YPJ-XS'">易配件销售</span>
-        <span v-else-if="scope.row.checkType == 'YPJ-CG'">易配件采购</span>
-        <span v-else-if="scope.row.checkType == 'YPJ-XSJH'">销售计划</span>
-        <span v-else-if="scope.row.checkType == 'ZR'">租入</span>
-        <span v-else-if="scope.row.checkType == 'ZC'">租出</span>
+        <span v-if="scope.row.checkType == 'HYCK-FFSQ'">付费申请</span>
         <span v-else-if="scope.row.checkType == 'HYCK-DJ'">海运出口</span>
         <span v-else-if="scope.row.checkType == 'HYCK-FY'">海运出口费用</span>
         <span v-else-if="scope.row.checkType == 'HYJK-DJ'">海运进口</span>
         <span v-else-if="scope.row.checkType == 'HYJK-FY'">海运进口费用</span>
-        <span v-else-if="scope.row.checkType == 'XSTD'">销售退单请核</span>
-        <span v-else-if="scope.row.checkType == 'YPJ-XSTH'">销售退款退货</span>
-        <span v-else-if="scope.row.checkType == 'PJTK'">售后</span>
-        <span v-else-if="scope.row.checkType == 'PJCG'">采购</span>
+
       </template>
         <template slot-scope="scope" slot="billNo">
             <span style="color: #1e9fff" @click="billNoDetails(scope.row)">{{scope.row.billNo}}</span>
@@ -70,12 +35,12 @@
 <!--        </el-button>-->
         <el-button type="text" size="small" :disabled="scope.row.operate" @click.stop="jumpPage(scope.row)">查看
         </el-button>
-          <!--<el-button type="text" size="small" :disabled="scope.row.auditStatus != 'S'" @click.stop="openCheck(scope.row)">-->
-          <!--    审批-->
-          <!--</el-button>-->
-        <el-button type="text" size="small" :disabled="scope.row.auditStatus != 'S'" @click.stop="handleReportPreview(scope.row.url,scope.row)">
-          审批
-        </el-button>
+          <el-button type="text" size="small" v-if="scope.row.checkType == 'HYCK-DJ'" :disabled="scope.row.auditStatus != 'S'" @click.stop="handleReportPreview(scope.row.url,scope.row)">
+              审批
+          </el-button>
+          <el-button type="text" size="small" v-else :disabled="scope.row.auditStatus != 'S'" @click.stop="openCheck(scope.row)">
+              审批
+          </el-button>
         <el-button type="text" size="small" @click.stop="openCheckSchedule(scope.row)">审批流程
         </el-button>
       </template>
@@ -85,12 +50,13 @@
       <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
       </check-schedule>
     </el-dialog>
-    <!--<el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"-->
-    <!--  :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>-->
-    <!--  <check :checkData="checkData" :checkDetail="true" :idList="idList" @operationType="operationType"-->
-    <!--    @choceCheckFun="choceCheckFun">-->
-    <!--  </check>-->
-    <!--</el-dialog>-->
+
+    <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+      <check :checkData="checkData" :checkDetail="true" :idList="idList" @operationType="operationTypeFFSQ"
+        @choceCheckFun="choceCheckFFSQ">
+      </check>
+    </el-dialog>
     <reportContainerlos style="width: 100%; height: 100vh" ref="reportContainer">
         <check :checkData="checkData" :checkDetail="true" :idList="idList" @operationType="operationType"
                @choceCheckFun="choceCheckFun">
@@ -343,6 +309,11 @@ export default {
       this.refreshChange();
       this.idList = [];
     },
+      operationTypeFFSQ() {
+          this.checkDialog = false;
+          this.refreshChange();
+          this.idList = [];
+      },
       // 业务编号跳转详情
       billNoDetails(row){
           this.$router.push({
@@ -423,6 +394,10 @@ export default {
         this.$refs.reportContainer.visible = false
       this.refreshChange();
     },
+      choceCheckFFSQ() {
+          this.checkDialog = false;
+          this.refreshChange();
+      },
     openCheckSchedule(row) {
       this.checkId = row.srcBillId;
       this.batchNo = row.batchNo;

+ 1 - 1
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -584,7 +584,7 @@
                     this.form = res.data.data
                     this.tableData = this.form.finStlBillsItemsList.map(item=>{
                         item.stlTtlAmountNet = Number(item.stlTtlAmount) - (Number(item.stlTtlAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
-                        // item.currentStlAmountNet = Number(item.unsettledAmount) - (Number(item.unsettledAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
+                        item.currentStlAmountNet = Number(item.unsettledAmount) - (Number(item.unsettledAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
                         if(item.curCode == 'CNY') {
                             this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
                             this.$set(item,'amountRMB',item.amount)

+ 42 - 21
src/views/iosBasicData/PaymentSettlement/assembly/finstlbillsitems.vue

@@ -97,7 +97,8 @@
                 label="本次结算币种"
                 prop="currentStlCurCode" width="130px">
                 <template slot-scope="{row}">
-                    <search-query :datalist="curCodeData"
+                    <span v-if="whetherAuditing == '1'">{{row.currentStlCurCode}}</span>
+                    <search-query v-else :datalist="curCodeData"
                                   :selectValue="row.currentStlCurCode"
                                   :filterable="true"
                                   :clearable="true"
@@ -109,6 +110,7 @@
                                   @corpFocus="getRateListfun">
                     </search-query>
                 </template>
+
             </el-table-column>
             <el-table-column label="本次结算金额(含税)">
                 <!--默认应结算 可以修改-->
@@ -117,22 +119,28 @@
                     prop="currentStlAmountRMB"
                     label="RMB" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
-                                  size="mini" autocomplete="off"
-                                  clearable placeholder="请输入USD" >
-                        </el-input>
-                        <span v-else>{{scope.row.currentStlAmountRMB}}</span>
+                        <span v-if="whetherAuditing == '1'">{{scope.row.currentStlAmountRMB}}</span>
+                        <div v-else>
+                            <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
+                                      size="mini" autocomplete="off"
+                                      clearable placeholder="请输入USD" >
+                            </el-input>
+                            <span v-else>{{scope.row.currentStlAmountRMB}}</span>
+                        </div>
                     </template>
                 </el-table-column>
                 <el-table-column
                     prop="currentStlAmountUSD"
                     label="USD" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
-                                  size="mini" autocomplete="off"
-                                  clearable placeholder="请输入USD" >
-                        </el-input>
-                        <span v-else>{{scope.row.currentStlAmountUSD}}</span>
+                        <span v-if="whetherAuditing == '1'">{{scope.row.currentStlAmountUSD}}</span>
+                        <div v-else>
+                            <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
+                                      size="mini" autocomplete="off"
+                                      clearable placeholder="请输入USD" >
+                            </el-input>
+                            <span v-else>{{scope.row.currentStlAmountUSD}}</span>
+                        </div>
                     </template>
                 </el-table-column>
             </el-table-column>
@@ -144,22 +152,28 @@
                     prop="currentStlAmountNetRMB"
                     label="RMB" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
-                                  size="mini" autocomplete="off"
-                                  clearable placeholder="请输入USD" >
-                        </el-input>
-                        <span v-else>{{scope.row.currentStlAmountRMB}}</span>
+                        <span v-if="whetherAuditing == '1'">{{scope.row.currentStlAmountRMB}}</span>
+                        <div v-else>
+                            <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
+                                      size="mini" autocomplete="off"
+                                      clearable placeholder="请输入USD" >
+                            </el-input>
+                            <span v-else>{{scope.row.currentStlAmountRMB}}</span>
+                        </div>
                     </template>
                 </el-table-column>
                 <el-table-column
                     prop="currentStlAmountNetUSD"
                     label="USD" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
-                                  size="mini" autocomplete="off"
-                                  clearable placeholder="请输入USD" >
-                        </el-input>
-                        <span v-else>{{scope.row.currentStlAmountUSD}}</span>
+                        <span v-if="whetherAuditing == '1'">{{scope.row.currentStlAmountUSD}}</span>
+                        <div v-else>
+                            <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
+                                      size="mini" autocomplete="off"
+                                      clearable placeholder="请输入USD" >
+                            </el-input>
+                            <span v-else>{{scope.row.currentStlAmountUSD}}</span>
+                        </div>
                     </template>
                 </el-table-column>
             </el-table-column>
@@ -297,6 +311,13 @@
             brfalse:{
                 type:Boolean,
                 default:true,
+            },
+            handleSelectionData:{
+                type:Array,
+                default:[]
+            },
+            whetherAuditing:{
+                type:String,
             }
         },
         data(){

+ 45 - 81
src/views/iosBasicData/PaymentSettlement/finstlbillsDetails.vue

@@ -410,6 +410,7 @@
                     <el-tab-pane label="核销明细" name="first">
                         <finstlbillsitems :tableData="tableData"
                                           :handleSelectionData="handleSelectionData"
+                                          :whetherAuditing="whetherAuditing"
                                           @handleSelectionChange="handleSelectionChange">
                         </finstlbillsitems>
                     </el-tab-pane>
@@ -436,7 +437,7 @@
         finstlbillsSubmit
     } from '@/api/iosBasicData/finstlbills'
     import expand from "@/components/basic-container/expand.vue";
-    import finstlbillsitems from "@/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue";
+    import finstlbillsitems from "@/views/iosBasicData/PaymentSettlement/assembly/finstlbillsitems.vue";
     import {isProcurement} from "@/api/basicData/configuration";
 
     export default {
@@ -547,46 +548,49 @@
                         return;
                     }
                 }
-                for (let item of this.handleSelectionData) {
-                    if (!item.currentStlCurCode) {
-                        this.$message.warning('请选择本次结算币种');
-                        return;
-                    }
-                    if (!item.currentStlAmount) {
-                        this.$message.warning('请选择本次结算金额');
-                        return;
-                    }
-                }
                 this.saveLoading = true // 加载动画
-                this.form.billNoFormat = 'HYDZ'
-                this.form.businessTypeCode = 'HYDZ'
+                this.form.billNoFormat = 'HYFF'
+                this.form.businessTypeCode = 'HYFF'
                 this.form.businessType = 'STL' // 结算单
                 this.form.dc = 'C' // 付
 
-                if (!this.form.id) {
-                    this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                        item.lineNo = index
-                        item.pType = item.businessType
-                        item.accBillId = item.id
-                        item.accBillNo = item.billNo
-                        item.accDate = item.billDate
-                        item.dc = item.accountDc // 收付
-                        if (item.currentStlCurCode == 'CNY') {
-                            item.currentStlAmount = item.currentStlAmountRMB
-                        }else {
-                            item.currentStlAmount = item.currentStlAmountUSD
+                if (this.whetherAuditing == '0') {
+                    for (let item of this.handleSelectionData) {
+                        if (!item.currentStlCurCode) {
+                            this.$message.warning('请选择本次结算币种');
+                            return;
                         }
-                        delete item.businessType
-                        if (!this.form.id) {
-                            delete item.id
+                        if (!item.currentStlAmount) {
+                            this.$message.warning('请选择本次结算金额');
+                            return;
                         }
-                        delete item.billNo
-                        delete item.billDate
-                        delete item.accountDc
-                        return item
-                    })
+                    }
+                    if (!this.form.id) {
+                        this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
+                            item.lineNo = index
+                            item.pType = item.businessType
+                            item.accBillId = item.id
+                            item.accBillNo = item.billNo
+                            item.accDate = item.billDate
+                            item.dc = item.accountDc // 收付
+                            if (item.currentStlCurCode == 'CNY') {
+                                item.currentStlAmount = item.currentStlAmountRMB
+                            }else {
+                                item.currentStlAmount = item.currentStlAmountUSD
+                            }
+                            delete item.businessType
+                            if (!this.form.id) {
+                                delete item.id
+                            }
+                            delete item.billNo
+                            delete item.billDate
+                            delete item.accountDc
+                            return item
+                        })
+                    }
+                }else {
+                    this.form.finStlBillsItemsList = this.handleSelectionData
                 }
-
                 finstlbillsSubmit(this.form).then(res=>{
                     this.saveLoading = false
                     this.$message.success('操作成功');
@@ -596,7 +600,11 @@
             // 申请单号
             approveDetailfun(billNo){
                 approveDetail({billNo}).then(res=>{
-                    console.log(res,587)
+                    this.tableData = res.data.data.finStlBillsItemsList.map(item=>{
+                        item.id = ''
+                        item.pid = ''
+                        return item
+                    })
                 })
             },
             // 判断检索
@@ -681,6 +689,7 @@
                 obj.receivableAdvance = this.form.receivableAdvance // 预收帐款
                 obj.voyageNo = this.form.voyageNo // 航次
                 obj.signforDateList = this.form.signforDateList // 签收日期
+                obj.billNo = this.form.billNo // 申请单号
                 // 审核期间
                 if (this.form.approvedDate) {
                     obj.approveTimeList = this.form.approvedDate
@@ -691,7 +700,7 @@
                 }
 
                 if (this.whetherAuditing == '1') {
-                    this.approveDetailfun()
+                    this.approveDetailfun(obj.billNo)
                 }else {
                     finstlbillslistAccBillV1(obj).then(res=>{
                         this.tableData = res.data.data.map(item=>{
@@ -765,51 +774,6 @@
                 this.$emit('goBack')
             },
             // 请求的接口
-            // 确认签收接口
-            finstlbillsConfirmSignForfun(){
-                this.form.billNoFormat = 'HYDZ'
-                this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'STL' // 结算单
-                // 保留id
-                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                    item.lineNo = index
-                    item.pType = item.businessType
-                    item.accBillId = item.id
-                    item.accBillNo = item.billNo
-                    item.accDate = item.billDate
-                    delete item.businessType
-                    delete item.billNo
-                    delete item.billDate
-                    return item
-                })
-                finstlbillsConfirmSignFor(this.form).then(res=>{
-                    this.$message.success('操作成功');
-                    this.finstlbillsDetailfun(res.data.data.id)
-                })
-            },
-            // 撤销签收接口
-            finstlbillsRevokeSignForfun(){
-                this.form.billNoFormat = 'HYDZ'
-                this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'STL' // 结算单
-
-                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                    item.lineNo = index
-                    item.pType = item.businessType
-                    item.accBillId = item.id
-                    item.accBillNo = item.billNo
-                    item.accDate = item.billDate
-                    delete item.businessType
-                    delete item.billNo
-                    delete item.billDate
-                    return item
-                })
-                finstlbillsRevokeSignFor(this.form).then(res=>{
-                    this.$message.success('操作成功');
-                    this.finstlbillsDetailfun(res.data.data.id)
-                })
-            },
-
             // 获取币别数据
             getRateListfun(cnName){
                 getRateList({current:1,size:10,cnName}).then(res=>{