Browse Source

修改bug

Qukatie 1 year ago
parent
commit
a1d6156e2b

+ 32 - 1
src/components/tradeAgency/fee-info.vue

@@ -223,6 +223,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "提单号",
+                        prop: "mblno",
+                        width: '160',
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',
@@ -320,6 +326,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "提单号",
+                        prop: "mblno",
+                        width: '160',
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',
@@ -367,6 +379,20 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "优惠汇率",
+                        prop: "discountExrate",
+                        cell: true,
+                        type: 'number',
+                        controls: false,
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
+                        label: "利润",
+                        prop: "profit",
+                        overHidden: true,
+                    },
+                    {
                         label: "备注",
                         prop: "remarks",
                         cell: true,
@@ -412,7 +438,7 @@ export default {
         },
         countChange(row) {
             row.amount = _.multiply(Number(row.quantity ? row.quantity : 0), Number(row.price ? row.price : 0))
-            if (row.feeCnName == '首付款' || row.feeCnName == '尾款') {
+            if (row.feeCode== 'SFK' || row.feeCode == 'WK') {
                 row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.exrate ? row.exrate : 0))
             }
         },
@@ -498,6 +524,11 @@ export default {
                     })
                 }
                 if (type == 'C') {
+                    for (let index in this.form.feeCenterListC) {
+                        if (this.form.feeCenterListC[index].feeCnName == '首款' || this.form.feeCenterListC[index].feeCnName == '尾款') {
+                            if (!this.form.feeCenterListC[index].discountExrate) return this.$message.error("第" + (Number(index) + 1) + "行"+this.form.feeCenterListC[index].feeCnName+"费用优惠汇率不能为空");
+                        }
+                    }
                     this.form.feeCenterListC.forEach(e => {
                         this.$set(e, '$cellEdit', false)
                     })

+ 56 - 20
src/components/tradeAgency/fee-infosimple.vue

@@ -47,7 +47,7 @@
             </tempalte>
             <template slot="curCode" slot-scope="{ row }">
                 <dic-select v-if="row.$cellEdit" v-model="row.curCode" placeholder="币别" key="id" label="code"
-                    :url="'/blade-los/bcurrency/getExrate?date=' + form.contractDate + '&dc=' + row.dc" :filterable="true"
+                    :url="'/blade-los/bcurrency/getExrate?date=' + form.businessDate  + '&dc=' + row.dc" :filterable="true"
                     @selectChange="rowDicChange('curCode', $event, row)"></dic-select>
                 <span v-else>{{ row.curCode }}</span>
             </template>
@@ -119,7 +119,7 @@
             </tempalte>
             <template slot="curCode" slot-scope="{ row }">
                 <dic-select v-if="row.$cellEdit" v-model="row.curCode" placeholder="币别" key="id" label="code"
-                    :url="'/blade-los/bcurrency/getExrate?date=' + form.contractDate + '&dc=' + row.dc" :filterable="true"
+                    :url="'/blade-los/bcurrency/getExrate?date=' + form.businessDate + '&dc=' + row.dc" :filterable="true"
                     @selectChange="rowDicChange('curCode', $event, row)"></dic-select>
                 <span v-else>{{ row.curCode }}</span>
             </template>
@@ -129,7 +129,7 @@
                 <span v-else>{{ row.exrate }}</span>
             </tempalte>
             <tempalte slot="stlExrate" slot-scope="{ row }">
-                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row)" :controls="false"
+                <el-input-number v-if="row.$cellEdit" v-model="row.stlExrate" @change="countChange(row,'C')" :controls="false"
                     placeholder="请输入 结算汇率" size="small" style="width: 100%;"></el-input-number>
                 <span v-else>{{ row.stlExrate }}</span>
             </tempalte>
@@ -213,6 +213,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "提单号",
+                        prop: "mblno",
+                        width: '160',
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',
@@ -323,6 +329,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "提单号",
+                        prop: "mblno",
+                        width: '160',
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',
@@ -370,6 +382,20 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "优惠汇率",
+                        prop: "discountExrate",
+                        cell: true,
+                        type: 'number',
+                        controls: false,
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
+                        label: "利润",
+                        prop: "profit",
+                        overHidden: true,
+                    },
+                    {
                         label: "备注",
                         prop: "remarks",
                         cell: true,
@@ -401,10 +427,15 @@ export default {
                 })
             }
         },
-        countChange(row) {
+        countChange(row,type) {
             row.amount = _.multiply(Number(row.quantity ? row.quantity : 0), Number(row.price ? row.price : 0))
-            if (row.feeCnName == '首付款' || row.feeCnName == '尾款') {
-                row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.exrate ? row.exrate : 0))
+            if (row.feeCode== 'SFK' || row.feeCode == 'WK') {
+                if(type=='C'){
+                    row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.stlExrate ? row.stlExrate : 0))
+                }else{
+                    row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.exrate ? row.exrate : 0))
+                }
+               
             }
         },
         selectionDChange(list) {
@@ -437,7 +468,7 @@ export default {
                     el.elementsCode = row.elementsCode
                     el.elementsCnName = row.accElementName
                     el.elementsEnName = row.elementsEnName
-                    bcurrencyGetExrate({ date: this.form.contractDate, dc: el.dc }).then(res => {
+                    bcurrencyGetExrate({ date: this.form.businessDate , dc: el.dc }).then(res => {
                         res.data.data.forEach(e => {
                             if (row.curNo == e.code) {
                                 this.$set(el, 'exrate', e.exrate)
@@ -457,7 +488,7 @@ export default {
             }
             if (name == 'curCode') {
                 if (row) {
-                    bcurrencyGetExrate({ date: this.form.contractDate, dc: el.dc }).then(res => {
+                    bcurrencyGetExrate({ date: this.form.businessDate , dc: el.dc }).then(res => {
                         res.data.data.forEach(e => {
                             if (el.curCode == e.code) {
                                 this.$set(el, 'exrate', e.exrate)
@@ -472,21 +503,26 @@ export default {
         allClick(name, type) {
             if (name == '一键保存') {
                 if (type == 'C') {
+                    for (let index in this.form.feeCenterListC) {
+                        if (this.form.feeCenterListC[index].feeCnName == '首款' || this.form.feeCenterListC[index].feeCnName == '尾款') {
+                            if (!this.form.feeCenterListC[index].discountExrate) return this.$message.error("第" + (Number(index) + 1) + "行"+this.form.feeCenterListC[index].feeCnName+"费用优惠汇率不能为空");
+                        }
+                    }
                     this.form.feeCenterListC.forEach(e => {
                         this.$set(e, '$cellEdit', false)
                     })
-                    const loading = this.$loading({
-                        lock: true,
-                        text: '加载中',
-                        spinner: 'el-icon-loading',
-                        background: 'rgba(255,255,255,0.7)'
-                    });
-                    submitListTrade(this.form.feeCenterListC).then(res => {
-                        this.form.feeCenterListC = res.data.data
-                        this.$message.success("保存成功");
-                    }).finally(() => {
-                        loading.close();
-                    })
+                    // const loading = this.$loading({
+                    //     lock: true,
+                    //     text: '加载中',
+                    //     spinner: 'el-icon-loading',
+                    //     background: 'rgba(255,255,255,0.7)'
+                    // });
+                    // submitListTrade(this.form.feeCenterListC).then(res => {
+                    //     this.form.feeCenterListC = res.data.data
+                    //     this.$message.success("保存成功");
+                    // }).finally(() => {
+                    //     loading.close();
+                    // })
                 }
             }
             if (name == '一键编辑') {

+ 13 - 1
src/components/tradeAgency/fee-oceanFreight.vue

@@ -229,6 +229,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "提单号",
+                        prop: "mblno",
+                        width: '160',
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',
@@ -341,6 +347,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "提单号",
+                        prop: "mblno",
+                        width: '160',
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',
@@ -448,7 +460,7 @@ export default {
         },
         countChange(row) {
             row.amount = _.multiply(Number(row.quantity ? row.quantity : 0), Number(row.price ? row.price : 0))
-            if (row.feeCnName == '首付款' || row.feeCnName == '尾款') {
+            if (row.feeCode== 'SFK' || row.feeCode == 'WK') {
                 row.amount = _.multiply(Number(row.amountLoc ? row.amountLoc : 0), Number(row.exrate ? row.exrate : 0))
             }
         },

+ 46 - 7
src/views/tradeAgency/exchangePurchasing/detailsPage.vue

@@ -8,7 +8,7 @@
             </div>
             <div class="add-customer-btn">
                 <el-button v-if="!editDisabled" class="el-button--small-yh" type="success" size="small"
-                    :disabled="isSaveBtn || form.firstStatus != '审核通过'||form.orderStatus=='已结算'" @click="submitFee">确认付款
+                    :disabled="isSaveBtn || form.firstStatus != '审核通过' || form.orderStatus == '已结算'" @click="submitFee">确认付款
                 </el-button>
                 <el-button v-if="!editDisabled" class="el-button--small-yh" type="danger" size="small"
                     :disabled="isSaveBtn || form.firstStatus != '审核通过'" @click="revokeApplication">撤销申请付款
@@ -81,18 +81,18 @@ export default {
             form: {},
             optionForm: {
                 menuBtn: false,
-                span: 8,
                 disabled: true,
+                span: 8,
                 column: [
                     {
                         label: '客户',
                         prop: "corpName",
-                        disabled: false
+                        disabled: true,
                     },
                     {
                         label: '业务号',
                         prop: "businessNo",
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: '业务日期',
@@ -100,7 +100,7 @@ export default {
                         type: "date",
                         format: "yyyy-MM-dd",
                         valueFormat: "yyyy-MM-dd 00:00:00",
-                        disabled: false,
+                        disabled: true,
                         rules: [{
                             required: true,
                             message: " ",
@@ -110,13 +110,43 @@ export default {
                     {
                         label: '金额',
                         prop: "goodsValue",
+                        disabled: true,
+                    },
+                    {
+                        label: '付汇美元金额',
+                        prop: "paymentInUsd",
+                        disabled: true,
+                    },
+                    {
+                        label: '当天汇率',
+                        prop: "exchangeRate",
+                        disabled: false,
+                    },
+                    {
+                        label: '实付金额',
+                        prop: "actualAmount",
+                        disabled: true,
+                    },
+                    {
+                        label: '邮电费',
+                        prop: "postElectricFee",
+                        disabled: true,
+                    },
+                    {
+                        label: '手续费',
+                        prop: "serviceCharge",
+                        disabled: true,
+                    },
+                    {
+                        label: '申报单号',
+                        prop: "declarationNumber",
                         disabled: false,
                     },
                     {
                         label: '备注',
                         prop: "remarks",
                         type: 'textarea',
-                        span: 24,
+                        span: 12,
                         disabled: false,
                         minRows: 2,
                     }
@@ -241,6 +271,7 @@ export default {
                 background: 'rgba(255,255,255,0.7)'
             });
             getDetail({ id: id }).then(res => {
+                if (res.data.data.firstStatus == '审核通过') this.optionForm.disabled = true
                 this.form = res.data.data
             }).finally(() => {
                 loading.close()
@@ -248,11 +279,19 @@ export default {
         },
         inEdit() {
             this.editDisabled = false
+            if (this.form.firstStatus != '审核通过') {
+                this.optionForm.disabled = false
+            }
         },
         submit() {
             this.$refs["form"].validate((valid, done) => {
                 done();
                 if (valid) {
+                    for (let index in this.form.feeCenterListC) {
+                        if (this.form.feeCenterListC[index].feeCnName == '首款' || this.form.feeCenterListC[index].feeCnName == '尾款') {
+                            if (!this.form.feeCenterListC[index].discountExrate) return this.$message.error("第" + (Number(index) + 1) + "行" + this.form.feeCenterListC[index].feeCnName + "费用优惠汇率不能为空");
+                        }
+                    }
                     const loading = this.$loading({
                         lock: true,
                         text: '加载中',
@@ -272,7 +311,7 @@ export default {
         },
         submitFee() {
             confirmReceived(this.form).then(res => {
-                this.$confirm(res.data.data+'?', '提示', {
+                this.$confirm(res.data.data + '?', '提示', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'

+ 40 - 6
src/views/tradeAgency/firstSettlement/detailsPage.vue

@@ -8,13 +8,13 @@
             </div>
             <div class="add-customer-btn">
                 <el-button v-if="!editDisabled" class="el-button--small-yh" type="success" size="small"
-                    :disabled="isSaveBtn||form.orderStatus=='已确认'" @click="submitFee">确认收款
+                    :disabled="isSaveBtn || form.orderStatus == '已确认'" @click="submitFee">确认收款
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
                     v-if="editDisabled" @click="inEdit">编 辑
                 </el-button>
                 <el-button v-if="!editDisabled" class="el-button--small-yh" style="margin-left: 6px;" type="primary"
-                    size="small" :disabled="isSaveBtn||form.orderStatus=='已确认'" @click="submit">保 存
+                    size="small" :disabled="isSaveBtn || form.orderStatus == '已确认'" @click="submit">保 存
                 </el-button>
             </div>
         </div>
@@ -61,12 +61,12 @@ export default {
                     {
                         label: '客户',
                         prop: "corpName",
-                        disabled: false
+                        disabled:true,
                     },
                     {
                         label: '业务号',
                         prop: "businessNo",
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: '业务日期',
@@ -74,7 +74,7 @@ export default {
                         type: "date",
                         format: "yyyy-MM-dd",
                         valueFormat: "yyyy-MM-dd 00:00:00",
-                        disabled: false,
+                        disabled: true,
                         rules: [{
                             required: true,
                             message: " ",
@@ -84,13 +84,43 @@ export default {
                     {
                         label: '金额',
                         prop: "goodsValue",
+                        disabled: true,
+                    },
+                    {
+                        label: '付汇美元金额',
+                        prop: "paymentInUsd",
+                        disabled: true,
+                    },
+                    {
+                        label: '当天汇率',
+                        prop: "exchangeRate",
+                        disabled: false,
+                    },
+                    {
+                        label: '实付金额',
+                        prop: "actualAmount",
+                        disabled: true,
+                    },
+                    {
+                        label: '邮电费',
+                        prop: "postElectricFee",
+                        disabled: true,
+                    },
+                    {
+                        label: '手续费',
+                        prop: "serviceCharge",
+                        disabled: true,
+                    },
+                    {
+                        label: '申报单号',
+                        prop: "declarationNumber",
                         disabled: false,
                     },
                     {
                         label: '备注',
                         prop: "remarks",
                         type: 'textarea',
-                        span: 24,
+                        span: 12,
                         disabled: false,
                         minRows: 2,
                     }
@@ -214,6 +244,7 @@ export default {
                 background: 'rgba(255,255,255,0.7)'
             });
             getDetail({ id: id }).then(res => {
+                if (res.data.data.orderStatus == '已确认') this.optionForm.disabled =true
                 this.form = res.data.data
             }).finally(() => {
                 loading.close()
@@ -221,6 +252,9 @@ export default {
         },
         inEdit() {
             this.editDisabled = false
+            if (this.form.orderStatus != '已确认') {
+                this.optionForm.disabled = false
+            }
         },
         submit() {
             this.$refs["form"].validate((valid, done) => {

+ 41 - 13
src/views/tradeAgency/tradeAgency/detailsPage.vue

@@ -211,21 +211,22 @@
             </trade-card>
             <trade-card title="记录信息">
                 <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-                    <el-tab-pane label="收款记录" name="1">
+                    <el-tab-pane label="付汇记录" name="1">
+                        <avue-crud :data="form.recordRateList" :option="option3"></avue-crud>
+                    </el-tab-pane>
+                    <el-tab-pane label="收款记录" name="2">
                         <avue-crud :data="form.recordListD" :option="option1"></avue-crud>
                     </el-tab-pane>
-                    <el-tab-pane label="付款记录" name="2">
+                    <el-tab-pane label="付款记录" name="3">
                         <avue-crud :data="form.recordListC" :option="option1"></avue-crud>
                     </el-tab-pane>
-                    <el-tab-pane label="开票记录" name="3">
+                    <el-tab-pane label="开票记录" name="4">
                         <avue-crud :data="form.recordInvoiceList" :option="option2"></avue-crud>
                     </el-tab-pane>
-                    <el-tab-pane label="付汇记录" name="4">
-                        <avue-crud :data="form.recordRateList" :option="option3"></avue-crud>
-                    </el-tab-pane>
-                    <el-tab-pane label="通关记录" name="5">
+
+                    <!-- <el-tab-pane label="通关记录" name="5">
                         <avue-crud :data="form.recordClearanceList" :option="option4"></avue-crud>
-                    </el-tab-pane>
+                    </el-tab-pane> -->
                 </el-tabs>
             </trade-card>
             <containerTitle title="上传附件"></containerTitle>
@@ -849,6 +850,9 @@ export default {
             this.optionForm.disabled = true
             this.getDetails(this.detailData.id)
         }
+        if (this.detailData.copyId) {
+            this.getCopydate(this.detailData.copyId)
+        }
     },
     methods: {
         dicChange(name, row) {
@@ -1004,16 +1008,16 @@ export default {
         selectHandle(selection, row) {
             // 取消其中一个选中的时候 默认取消同单号的选中
             if (!selection.includes(row)) {
-                this.pickUp(false,row.billNo);
+                this.pickUp(false, row.billNo);
             } else {
-                this.pickUp(true,row.billNo);
+                this.pickUp(true, row.billNo);
             }
         },
         // 需要默认勾选/取消的数据
-        pickUp(bool,billNo) {
+        pickUp(bool, billNo) {
             let arr = [];
-            this.form.agentItemsList.forEach(e=>{
-                if(billNo==e.billNo){
+            this.form.agentItemsList.forEach(e => {
+                if (billNo == e.billNo) {
                     arr.push(e)
                 }
             })
@@ -1050,6 +1054,25 @@ export default {
                 loading.close()
             })
         },
+        getCopydate(id) {
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            copyAgent({ id: id }).then(res => {
+                this.form = res.data.data
+                if (res.data.data.abroadConsignorId) {
+                    this.$refs.abankCode.IdGetDicData({ id: res.data.data.abroadConsignorId })
+                }
+                if (res.data.data.domesticConsigneeId) {
+                    this.$refs.dbankCode.IdGetDicData({ id: res.data.data.domesticConsigneeId })
+                }
+            }).finally(() => {
+                loading.close()
+            })
+        },
         inEdit() {
             this.editButton = false
             if (this.form.businessStatus == '录入') {
@@ -1279,6 +1302,11 @@ export default {
             this.$refs["form"].validate((valid, done) => {
                 done();
                 if (valid) {
+                    for (let index in this.form.feeCenterListC) {
+                        if (this.form.feeCenterListC[index].feeCnName == '首款' || this.form.feeCenterListC[index].feeCnName == '尾款') {
+                            if (!this.form.feeCenterListC[index].discountExrate) return this.$message.error("第" + (Number(index) + 1) + "行" + this.form.feeCenterListC[index].feeCnName + "费用优惠汇率不能为空");
+                        }
+                    }
                     const loading = this.$loading({
                         lock: true,
                         text: '加载中',

+ 24 - 5
src/views/tradeAgency/tradeAgency/index.vue

@@ -17,11 +17,13 @@
                 <template slot="menuLeft">
                     <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">新 增
                     </el-button>
-                    <el-button type="success" size="small" :disabled="selectionList.length == 0"
-                        @click="allClick('生成申请付款')">生成申请付款
-                    </el-button>
+                    <!-- <el-button type="success" size="small" icon="el-icon-plus" :disabled="selectionList.length != 1" @click="copyButton">复制订单
+                    </el-button> -->
                     <el-button type="info" size="small" :disabled="selectionList.length == 0"
-                        @click="allClick('生成申请收款')">生成申请收款
+                        @click="allClick('生成申请收款')">生成货款收款
+                    </el-button>
+                    <el-button type="warning" size="small" :disabled="selectionList.length == 0"
+                        @click="allClick('生成申请付款')">生成货款付款
                     </el-button>
                 </template>
                 <template slot="menu" slot-scope="{ row, index }">
@@ -35,7 +37,7 @@
             </avue-crud>
         </basic-container>
         <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
-        <el-dialog append-to-body title="申请费用" class="el-dialogDeep" :visible.sync="applyDialog" width="50%" top="30vh"
+        <el-dialog append-to-body title="申请费用" class="el-dialogDeep" :visible.sync="applyDialog" width="70%"
             :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @closed="applyClosed"
             v-dialog-drag>
             <avue-crud ref="applyCrud" :data="applyData" :option="applyOptionList" @selection-change="applySelectionChange"
@@ -73,6 +75,7 @@ export default {
                 menu: false,
                 selection: true,
                 align: 'center',
+                height:'450',
                 column: [
                     {
                         label: "往来单位",
@@ -80,6 +83,16 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "合同号",
+                        prop: "billNo",
+                        overHidden: true,
+                    },
+                    {
+                        label: "提单号",
+                        prop: "mblno",
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         overHidden: true,
@@ -526,6 +539,12 @@ export default {
         addButton() {
             this.isShow = false
         },
+        copyButton() {
+            this.isShow = false
+            this.detailData = {
+                copyId:this.selectionList[0].id
+            };
+        },
         allClick(name) {
             if (name == '生成申请付款') {
                 let ids = []