Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/dev' into dev

liyuan 3 mesi fa
parent
commit
abb4d3572b

+ 6 - 6
src/views/iosBasicData/AirtransportExport/bills/assembly/feecenter.vue

@@ -150,17 +150,17 @@
                     <span>{{ row.isTax ? '是' : '否' }}</span>
                 </template>
                 <template slot="price" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.price" size="small" :min="1" placeholder="请输入"
+                    <el-input-number v-if="row.edit" v-model="row.price" size="small" placeholder="请输入"
                         @blur="priceinputfun($event, row)" :controls="false" style="width: 100%;"></el-input-number>
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <!-- <template slot="quantity" slot-scope="{ row }">
-                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" :min="1"
+                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small"
                         placeholder="请输入" @blur="quantityinputfun(row)"></el-input>
                     <span v-else>{{ row.quantity }}</span>
                 </template> -->
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1" :controls="false"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
                         :precision="3" placeholder="请输入" style="width: 100%;"
                         @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
@@ -301,17 +301,17 @@
                     <span>{{ row.isTax ? '是' : '否' }}</span>
                 </template>
                 <template slot="price" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.price" size="small" :min="1" placeholder="请输入"
+                    <el-input-number v-if="row.edit" v-model="row.price" size="small" placeholder="请输入"
                         @blur="priceinputfun($event, row)" :controls="false"></el-input-number>
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <!-- <template slot="quantity" slot-scope="{ row }">
-                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" :min="1"
+                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small"
                         placeholder="请输入" @blur="quantityinputfun(row)"></el-input>
                     <span v-else>{{ row.quantity }}</span>
                 </template> -->
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1" :controls="false"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
                         :precision="3" placeholder="请输入" style="width: 100%;"
                         @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>

+ 6 - 6
src/views/iosBasicData/AirtransportImport/bills/assembly/feecenter.vue

@@ -150,17 +150,17 @@
                     <span>{{ row.isTax ? '是' : '否' }}</span>
                 </template>
                 <template slot="price" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.price" size="small" :min="1" placeholder="请输入"
+                    <el-input-number v-if="row.edit" v-model="row.price" size="small"  placeholder="请输入"
                         @blur="priceinputfun($event, row)" :controls="false"></el-input-number>
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <!-- <template slot="quantity" slot-scope="{ row }">
-                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" :min="1"
+                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" 
                         placeholder="请输入" @blur="quantityinputfun(row)"></el-input>
                     <span v-else>{{ row.quantity }}</span>
                 </template> -->
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" 
                         :controls="false" :precision="3" placeholder="请输入" style="width: 100%;"
                         @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
@@ -301,17 +301,17 @@
                     <span>{{ row.isTax ? '是' : '否' }}</span>
                 </template>
                 <template slot="price" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.price" size="small" :min="1" placeholder="请输入"
+                    <el-input-number v-if="row.edit" v-model="row.price" size="small"  placeholder="请输入"
                         @blur="priceinputfun($event, row)" :controls="false"></el-input-number>
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <!-- <template slot="quantity" slot-scope="{ row }">
-                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" :min="1"
+                    <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" 
                         placeholder="请输入" @blur="quantityinputfun(row)"></el-input>
                     <span v-else>{{ row.quantity }}</span>
                 </template> -->
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" 
                         :controls="false" :precision="3" placeholder="请输入" style="width: 100%;"
                         @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>

+ 2 - 4
src/views/iosBasicData/ComputationCenter/index.vue

@@ -561,17 +561,15 @@ export default {
         },
         // 多选回调
         selectionChange(list) {
+            this.amountSubSum = 0
+            this.amountSubUsdSum = 0
             if (list.length) {
                 list.forEach(e => {
                     this.amountSubSum += Number(e.amountSub)
                     this.amountSubUsdSum += Number(e.amountSubUsd)
                 })
-            } else {
-                this.amountSubSum = 0
-                this.amountSubUsdSum = 0
             }
             this.selectionList = list;
-
         },
         // 清空回调
         searchReset() {

+ 22 - 3
src/views/iosBasicData/ComputationCenter/settlementDetails.vue

@@ -233,6 +233,14 @@
                     </el-input>
                     <el-button style="margin-left: 10px" :disabled="editSave" size="small" type="primary"
                         @click="invoiceMatchingfun()">匹配金额</el-button>
+                    <span style="font-size: 18px;font-weight: 600;margin-left: 50px;">
+                        <span style="color: #67C23A;margin-right: 10px;">
+                            CNY:¥{{ amountSubSum }}元
+                        </span>
+                        <span style="color: #E6A23C;">
+                            USD:${{ amountSubUsdSum }}元
+                        </span>
+                    </span>
                 </div>
                 <finstlbillsitems ref="finstlbillsitems" :tableData="tableData" :editSave="editSave"
                     :settlementdistar="settlementdistar" :handleSelectionData="handleSelectionData"
@@ -353,6 +361,8 @@ export default {
     },
     data() {
         return {
+            amountSubSum: 0,
+            amountSubUsdSum: 0,
             retrievePopupsType: false, // 弹窗开启关闭
             retrievePopupsData: [], // 选择弹窗数据
             retrievePopupsOption: {
@@ -1162,7 +1172,7 @@ export default {
             finstlbillsConfirmSettlement(this.form).then(res => {
                 this.$message.success('操作成功');
                 this.finstlbillsDetailfun(res.data.data.id)
-                this.editSave=true
+                this.editSave = true
             }).finally(() => {
                 this.pageLoading = false
                 this.saveLoading = false
@@ -1218,8 +1228,17 @@ export default {
             this.editCustomer('选定行')
         },
         // 下面表格多选
-        handleSelectionChange(arr) {
-            this.handleSelectionData = arr
+        handleSelectionChange(list) {
+            console.log(list)
+            this.amountSubSum = 0
+            this.amountSubUsdSum = 0
+            if (list.length) {
+                list.forEach(e => {
+                    this.amountSubSum += Number(e.currentStlAmountRMB?e.currentStlAmountRMB:0)
+                    this.amountSubUsdSum += Number(e.currentStlAmountUSD?e.currentStlAmountUSD:0)
+                })
+            }
+            this.handleSelectionData = list
         },
         //返回列表
         backToList() {

+ 2 - 2
src/views/iosBasicData/OceanFreightImport/bills/assembly/feecenter.vue

@@ -152,7 +152,7 @@
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1" :controls="false"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>
@@ -286,7 +286,7 @@
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1" :controls="false"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>

+ 79 - 15
src/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue

@@ -16,13 +16,13 @@
             </el-table-column>
             <el-table-column prop="isCleared" label="核销" width="70px">
                 <template slot-scope="{ row }">
-                    <span v-if="row.isCleared==0 ">
+                    <span v-if="row.isCleared == 0">
                         未销账
                     </span>
-                    <span v-if="row.isCleared==3 ">
+                    <span v-if="row.isCleared == 3">
                         部分销账
                     </span>
-                    <span v-if="row.isCleared==9 ">
+                    <span v-if="row.isCleared == 9">
                         销账
                     </span>
                 </template>
@@ -220,29 +220,93 @@ export default {
     methods: {
         armbChange(row) {
             if (row.dc == 'C') {
-                if (Number(row.currentStlAmountRMB) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
-                    row.currentStlAmountRMB = 0
-                    return this.$message.error("本次对账金额不能大于未对账金额");
+                if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
+                    if (Number(row.currentStlAmountRMB) < 0) {
+                        row.currentStlAmountRMB = 0
+                        return this.$message.error("本次对账金额不能输入负数");
+                    }
+                    if (Number(row.currentStlAmountRMB) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+                        row.currentStlAmountRMB = 0
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
+                }
+                if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
+                    if (Number(row.currentStlAmountRMB) >= 0) {
+                        row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能输入非负数");
+                    }
+                    if (Number(row.currentStlAmountRMB) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+                        row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
                 }
             }
             if (row.dc == 'D') {
-                if (Number(row.currentStlAmountRMB) > Number(row.amount - row.stlTtlAmount)) {
-                    row.currentStlAmountRMB = 0
-                    return this.$message.error("本次对账金额不能大于未对账金额");
+                if (Number(row.amount - row.stlTtlAmount) > 0) {
+                    if (Number(row.currentStlAmountRMB) < 0) {
+                        row.currentStlAmountRMB = 0
+                        return this.$message.error("本次对账金额不能输入负数");
+                    }
+                    if (Number(row.currentStlAmountRMB) > Number(row.amount - row.stlTtlAmount)) {
+                        row.currentStlAmountRMB = 0
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
+                }
+                if (Number(row.amount - row.stlTtlAmount) < 0) {
+                    if (Number(row.currentStlAmountRMB) >= 0) {
+                        row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能输入非负数");
+                    }
+                    if (Number(row.currentStlAmountRMB) < Number(row.amount - row.stlTtlAmount)) {
+                        row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
                 }
             }
         },
         ausdChange(row) {
             if (row.dc == 'C') {
-                if (Number(row.currentStlAmountUSD) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
-                    row.currentStlAmountUSD = 0
-                    return this.$message.error("本次对账金额不能大于未对账金额");
+                if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
+                    if (Number(row.currentStlAmountUSD) < 0) {
+                        row.currentStlAmountUSD = 0
+                        return this.$message.error("本次对账金额不能输入负数");
+                    }
+                    if (Number(row.currentStlAmountUSD) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+                        row.currentStlAmountUSD = 0
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
+                }
+                if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
+                    if (Number(row.currentStlAmountUSD) >= 0) {
+                        row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能输入非负数");
+                    }
+                    if (Number(row.currentStlAmountUSD) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
+                        row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
                 }
             }
             if (row.dc == 'D') {
-                if (Number(row.currentStlAmountUSD) > Number(row.amount - row.stlTtlAmount)) {
-                    row.currentStlAmountUSD = 0
-                    return this.$message.error("本次对账金额不能大于未对账金额");
+                if (Number(row.amount - row.stlTtlAmount) > 0) {
+                    if (Number(row.currentStlAmountUSD) < 0) {
+                        row.currentStlAmountUSD = 0
+                        return this.$message.error("本次对账金额不能输入负数");
+                    }
+                    if (Number(row.currentStlAmountUSD) > Number(row.amount - row.stlTtlAmount)) {
+                        row.currentStlAmountUSD = 0
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
+                }
+                if (Number(row.amount - row.stlTtlAmount) < 0) {
+                    if (Number(row.currentStlAmountUSD) >= 0) {
+                        row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能输入非负数");
+                    }
+                    if (Number(row.currentStlAmountUSD) < Number(row.amount - row.stlTtlAmount)) {
+                        row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount)
+                        return this.$message.error("本次对账金额不能超过未对账金额");
+                    }
                 }
             }
         },

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -160,7 +160,7 @@
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1" :controls="false"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>
@@ -294,7 +294,7 @@
                     <span v-else>{{ row.price }}</span>
                 </template>
                 <template slot="quantity" slot-scope="{ row }">
-                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1" :controls="false"
+                    <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :controls="false"
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>

+ 43 - 9
src/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoicesitems.vue

@@ -36,11 +36,11 @@
             <!--</el-table-column>-->
             <el-table-column prop="currentAmountCNY" label="本次CNY" width="120px">
                 <template slot-scope="scope">
-                    <el-input-number style="width: 100%;" v-model="scope.row.currentAmountCNY" v-if="!editSave" min="0"
+                    <el-input style="width: 100%;" v-model="scope.row.currentAmountCNY" v-if="!editSave"
                         size="mini" autocomplete="off" :controls="false"
-                        :disabled="scope.row.curCode != 'CNY' || settlementdistar || !(form.status == '0' || form.status == '4'|| form.status == null)"
+                        :disabled="scope.row.curCode != 'CNY' || settlementdistar || !(form.status == '0' || form.status == '4' || form.status == null)"
                         clearable placeholder="请输入本次发票金额" @change="armbChange(scope.row)">
-                    </el-input-number>
+                    </el-input>
                     <span v-else>{{ scope.row.currentAmountCNY }}</span>
                 </template>
             </el-table-column>
@@ -147,16 +147,50 @@ export default {
     },
     methods: {
         armbChange(row) {
-            if (Number(row.currentAmountCNY) > Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)) {
-                row.currentAmountCNY = 0
-                return this.$message.error("本次对账金额不能大于未对账金额");
+            if (Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount) > 0) {
+                if (Number(row.currentAmountCNY) < 0) {
+                    row.currentAmountCNY = 0
+                    return this.$message.error("本次对账金额不能为负数");
+                }
+                if (Number(row.currentAmountCNY) > Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)) {
+                    row.currentAmountCNY = 0
+                    return this.$message.error("本次对账金额不能大于未对账金额");
+                }
             }
+            if (Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount) < 0) {
+                if (Number(row.currentAmountCNY) > 0) {
+                    row.currentAmountCNY = Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)
+                    return this.$message.error("本次对账金额不能为非负数");
+                }
+                if (Number(row.currentAmountCNY) < Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)) {
+                    row.currentAmountCNY = Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)
+                    return this.$message.error("本次对账金额不能大于未对账金额");
+                }
+            }
+
         },
         ausdChange(row) {
-            if (Number(row.currentAmountUSD) > Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)) {
-                row.currentAmountUSD = 0
-                return this.$message.error("本次对账金额不能大于未对账金额");
+            if (Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount) > 0) {
+                if (Number(row.currentAmountUSD) < 0) {
+                    row.currentAmountUSD = 0
+                    return this.$message.error("本次对账金额不能为负数");
+                }
+                if (Number(row.currentAmountUSD) > Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)) {
+                    row.currentAmountUSD = 0
+                    return this.$message.error("本次对账金额不能大于未对账金额");
+                }
+            }
+            if (Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount) < 0) {
+                if (Number(row.currentAmountUSD) > 0) {
+                    row.currentAmountUSD = Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)
+                    return this.$message.error("本次对账金额不能为非负数");
+                }
+                if (Number(row.currentAmountUSD) < Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)) {
+                    row.currentAmountUSD = Number(row.amount - row.appliedInvoiceAmount - row.appliedInvoiceAmountStl - row.uninvoicedAmount)
+                    return this.$message.error("本次对账金额不能大于未对账金额");
+                }
             }
+
         },
         // 明细删除
         deletefun(row, index) {

+ 12 - 3
src/views/iosBasicData/fininvoicesApplyfor/fininvoicesDetails.vue

@@ -510,6 +510,7 @@
 </template>
 
 <script>
+import { bcurexrateList } from "@/api/iosBasicData/rateManagement";
 import fininvoicesitems from "@/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoicesitems.vue";
 import fininvoiceitemdetail from "@/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoiceitemdetail.vue";
 import { getRateList } from "@/api/iosBasicData/rateManagement";
@@ -535,6 +536,7 @@ import reportContainer from "@/views/iosBasicData/report-container/report-contai
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import dicSelect from "@/components/dicSelect/main";
 import { finstlbillslistAccBillByCorp } from '@/api/iosBasicData/finstlbills'
+import { getMonthDate, getYearDate } from "@/util/date";
 export default {
     components: { checkSchedule, reportContainer, reportformsList, reports, SearchQuery, fininvoicesitems, fininvoiceitemdetail, dicSelect },
     data() {
@@ -675,13 +677,20 @@ export default {
         // 获取当前登录人个人信息
         this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
         if (!this.form.id) {
-            getRateList({ current: 1, size: 30 }).then(res => {
+            bcurexrateList({ current: 1, size: 35, type: '月汇率', code: 'USD', exrateYear: getYearDate() }).then(res => {
                 for (let item of res.data.data.records) {
-                    if (item.code == "USD") {
-                        this.$set(this.form, 'exrate', item.exrate)
+                    if (item.exrateMonth == getMonthDate()) {
+                        this.$set(this.form, 'exrate', item.exrateReceipts)
                     }
                 }
             })
+            // getRateList({ current: 1, size: 30 }).then(res => {
+            //     for (let item of res.data.data.records) {
+            //         if (item.code == "USD") {
+            //             this.$set(this.form, 'exrate', item.exrate)
+            //         }
+            //     }
+            // })
         }
         if (this.$route.query.mblno) {
             // console.log(111111)

+ 39 - 5
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -401,7 +401,7 @@
                     </div>
                 </trade-card>
                 <el-card style="margin-top: 10px">
-                    <el-tabs v-model="detailTabs" type="card">
+                    <el-tabs v-model="detailTabs" type="card" @tab-click="handleClick">
                         <el-tab-pane label="费用明细" name="first">
                             <div style="margin-bottom: 10px;display: flex;">
                                 <search-query :datalist="serverData" :selectValue="form.serverName" :clearable="true"
@@ -427,6 +427,14 @@
                                 </el-input>
                                 <el-button style="margin-left: 10px" :disabled="statusType" size="small" type="primary"
                                     @click="invoiceMatchingfun()">匹配金额</el-button>
+                                <span style="font-size: 18px;font-weight: 600;margin-left: 50px;">
+                                    <span style="color: #67C23A;margin-right: 10px;">
+                                        CNY:¥{{ amountSubSum }}元
+                                    </span>
+                                    <span style="color: #E6A23C;">
+                                        USD:${{ amountSubUsdSum }}元
+                                    </span>
+                                </span>
                             </div>
                             <fininvoicesitems ref="fininvoicesitems" :tableData="tableData"
                                 :handleSelectionData="handleSelectionData" :editSave="editSave" :form="form"
@@ -437,6 +445,11 @@
                             <div style="margin-bottom: 10px;display: flex;">
                                 <el-button size="small" :disabled="editSave" type="danger"
                                     @click="invoicingBatchDelete">一键删除</el-button>
+                                <span style="font-size: 18px;font-weight: 600;margin-left: 100px;">
+                                    <span style="color: #67C23A;">
+                                        CNY:¥{{ amountSubSum }}元
+                                    </span>
+                                </span>
                             </div>
                             <fininvoiceitemdetail :tableData="InvoicingList"
                                 :handleSelectionData="invoicingCheckboxData"
@@ -519,6 +532,8 @@ export default {
     components: { SearchQuery, fininvoicesitems, fininvoiceitemdetail, dicSelect },
     data() {
         return {
+            amountSubSum: 0,
+            amountSubUsdSum: 0,
             options: [
                 {
                     value: null,
@@ -666,6 +681,10 @@ export default {
         }
     },
     methods: {
+        handleClick() {
+            this.amountSubSum = 0
+            this.amountSubUsdSum = 0
+        },
         ResetFilter() {
             this.form = {
                 invCurCode: 'CNY',
@@ -996,12 +1015,27 @@ export default {
 
         },
         // 费用明细表格多选
-        handleSelectionChange(arr) {
-            this.handleSelectionData = arr
+        handleSelectionChange(list) {
+            this.amountSubSum = 0
+            this.amountSubUsdSum = 0
+            if (list.length) {
+                list.forEach(e => {
+                    this.amountSubSum += Number(e.currentAmountCNY?e.currentAmountCNY:0)
+                    this.amountSubUsdSum += Number(e.currentAmountUSD?e.currentAmountUSD:0)
+                })
+            }
+            this.handleSelectionData = list
         },
         // 开票明细表格多选
-        invoicingCheckboxChange(arr) {
-            this.invoicingCheckboxData = arr
+        invoicingCheckboxChange(list) {
+            this.amountSubSum = 0
+            this.amountSubUsdSum = 0
+            if (list.length) {
+                list.forEach(e => {
+                    this.amountSubSum += Number(e.amount?e.amount:0)
+                })
+            }
+            this.invoicingCheckboxData = list
         },
         // 编辑事件
         editHandle() {

+ 6 - 6
src/views/iosBasicData/fininvoicesOutput/index.vue

@@ -20,7 +20,7 @@
                 @saveColumn="saveColumnTwo('applyCrud', 'applyOption', 'applyOptionBack', 319)" @on-load="onLoad">
                 <template slot="menuLeft" slot-scope="{row}">
                     <el-button type="success" size="small" @click="multipleInvoicing">选择开票</el-button>
-                    <span style="font-size: 18px;">
+                    <span style="font-size: 24px;font-weight: 600;">
                         <span style="color: #67C23A;margin-right: 10px;">
                             CNY:¥{{ amountSubSum }}元
                         </span>
@@ -52,7 +52,7 @@
                     </el-button>
                     <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">一键删除
                     </el-button>
-                    <span style="font-size: 18px;">
+                    <span style="font-size: 24px;font-weight: 600;">
                         <span style="color: #67C23A;margin-right: 10px;">
                             CNY:¥{{ amountSubSum }}元
                         </span>
@@ -1050,7 +1050,8 @@ export default {
         },
         // tabs 切换
         handleClick() {
-
+            this.amountSubSum = 0
+            this.amountSubUsdSum = 0
             if (this.tabsValue == '申请') {
                 this.applyPage.currentPage = 1;
                 this.onLoad(this.applyPage);
@@ -1080,14 +1081,13 @@ export default {
         },
         // 多选反的数据
         selectionChange(list) {
+            this.amountSubSum = 0
+            this.amountSubUsdSum = 0
             if (list.length) {
                 list.forEach(e => {
                     this.amountSubSum += Number(e.amountSub)
                     this.amountSubUsdSum += Number(e.amountSubUsd)
                 })
-            } else {
-                this.amountSubSum = 0
-                this.amountSubUsdSum = 0
             }
             if (this.tabsValue == '申请') {
                 this.applySelectionList = list;

+ 46 - 13
src/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue

@@ -21,8 +21,8 @@
             </el-table-column>
             <el-table-column prop="dc" label="收付" width="50px">
                 <template slot-scope="{row}">
-                    <span v-if="row.dc=='D'">收</span>
-                    <span v-if="row.dc=='C'">付</span>
+                    <span v-if="row.dc == 'D'">收</span>
+                    <span v-if="row.dc == 'C'">付</span>
                 </template>
             </el-table-column>
             <el-table-column prop="isInvoice" label="开票状态" width="80px">
@@ -57,8 +57,8 @@
             <el-table-column prop="currentStlAmountRMB" label="本次对账CNY" width="100">
                 <template slot-scope="scope">
                     <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse" size="mini"
-                        autocomplete="off" :disabled="scope.row.currentStlCurCode != 'CNY'" clearable placeholder="请输入USD"
-                        @change="armbChange(scope.row)">
+                        autocomplete="off" :disabled="scope.row.currentStlCurCode != 'CNY'" clearable
+                        placeholder="请输入USD" @change="armbChange(scope.row)">
                     </el-input>
                     <span v-else>{{ scope.row.currentStlAmountRMB }}</span>
                     <!--<span>{{scope.row.currentStlAmountRMB}}</span>-->
@@ -67,9 +67,8 @@
             <el-table-column prop="currentStlAmountUSD" label="本次对账USD" width="100">
                 <template slot-scope="scope">
                     <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse" size="mini"
-                        autocomplete="off" :disabled="scope.row.currentStlCurCode != 'USD'" clearable placeholder="请输入USD"
-                         @change="ausdChange(scope.row)"
-                        >
+                        autocomplete="off" :disabled="scope.row.currentStlCurCode != 'USD'" clearable
+                        placeholder="请输入USD" @change="ausdChange(scope.row)">
                     </el-input>
                     <span v-else>{{ scope.row.currentStlAmountUSD }}</span>
                     <!--<span>{{scope.row.currentStlAmountUSD}}</span>-->
@@ -284,16 +283,50 @@ export default {
     },
     methods: {
         armbChange(row) {
-            if (Number(row.currentStlAmountRMB) > Number(row.amount - row.reconciliationAmount)) {
-                row.currentStlAmountRMB = 0
-                return this.$message.error("本次对账金额不能大于未对账金额");
+            if (Number(row.amount - row.reconciliationAmount) > 0) {
+                if (Number(row.currentStlAmountRMB)<0) {
+                    row.currentStlAmountRMB = 0
+                    return this.$message.error("本次对账金额不能输入负数");
+                }
+                if (Number(row.currentStlAmountRMB) > Number(row.amount - row.reconciliationAmount)) {
+                    row.currentStlAmountRMB = 0
+                    return this.$message.error("本次对账金额不能超过未对账金额");
+                }
+            }
+            if (Number(row.amount - row.reconciliationAmount) < 0) {
+                if(row.currentStlAmountRMB>=0){
+                    row.currentStlAmountRMB = Number(row.amount - row.reconciliationAmount)
+                    return this.$message.error("本次对账金额不能输入非负数");
+                }
+                if (Number(row.currentStlAmountRMB) < Number(row.amount - row.reconciliationAmount)) {
+                    row.currentStlAmountRMB = Number(row.amount - row.reconciliationAmount)
+                    return this.$message.error("本次对账金额不能超过未对账金额");
+                }
             }
+
         },
         ausdChange(row) {
-            if (Number(row.currentStlAmountUSD) > Number(row.amount - row.reconciliationAmount)) {
-                row.currentStlAmountUSD = 0
-                return this.$message.error("本次对账金额不能大于未对账金额");
+            if (Number(row.amount - row.reconciliationAmount) > 0) {
+                if (Number(row.currentStlAmountUSD)<0) {
+                    row.currentStlAmountUSD = 0
+                    return this.$message.error("本次对账金额不能输入负数");
+                }
+                if (Number(row.currentStlAmountUSD) > Number(row.amount - row.reconciliationAmount)) {
+                    row.currentStlAmountUSD = 0
+                    return this.$message.error("本次对账金额不能超过未对账金额");
+                }
+            }
+            if (Number(row.amount - row.reconciliationAmount) < 0) {
+                if(row.currentStlAmountUSD>=0){
+                    row.currentStlAmountUSD =  Number(row.amount - row.reconciliationAmount)
+                    return this.$message.error("本次对账金额不能输入非负数");
+                }
+                if (Number(row.currentStlAmountUSD) < Number(row.amount - row.reconciliationAmount)) {
+                    row.currentStlAmountUSD =  Number(row.amount - row.reconciliationAmount)
+                    return this.$message.error("本次对账金额不能超过未对账金额");
+                }
             }
+
         },
         // 币别选择监听
         corpChange(value, row) {

+ 2 - 2
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -818,7 +818,7 @@ export default {
     },
     check(row) {
       if (row.upAndDownShelves == 1) {
-        if (row.priceOne == 0 || row.priceTwo == 0 || row.priceThree == 0 || row.priceFour == 0) {
+        if (row.priceOne == 0 || row.priceTwo == 0) {
           row.upAndDownShelves = 0
           return this.$message.error("请维护所有售价");
         }
@@ -920,7 +920,7 @@ export default {
       }
       if (type === "up") {
         for (let item of this.selectionList) {
-          if (item.priceOne == 0 || item.priceTwo == 0 || item.priceThree == 0 || item.priceFour == 0) {
+          if (item.priceOne == 0 || item.priceTwo == 0) {
             return this.$message.error("请维护所有售价");
           }
         }

+ 75 - 10
src/views/tirePartsMall/basicData/sharedSales/detailsPage.vue

@@ -18,6 +18,19 @@
                     @click="getReturns">
                     销售退货
                 </el-button>
+                <el-dropdown style="padding: 0 6px;line-height: 0">
+                    <el-button v-show="form.id " type="danger" 
+                        :disabled="!form.id || !(form.status == '待确认'||form.status == '录入'||form.status == '退款请核')" size="small">
+                        售 后<i class="el-icon-arrow-down el-icon--right"></i>
+                    </el-button>
+                    <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item @click.native="applySettlement('申请')"   :disabled="!(form.status == '待确认'||form.status == '录入')">申请退款
+                        </el-dropdown-item>
+                        <el-dropdown-item @click.native="revocationRequest('撤销')" :disabled="form.status != '退款请核'">撤销请核
+                        </el-dropdown-item>
+                    </el-dropdown-menu>
+                </el-dropdown>
+                
                 <!-- <el-button v-if="form.status != '已发货'" class="el-button--small-yh" style="margin-left: 6px;"
                     type="success" size="small" :disabled="!form.id || editButton || form.businessSource == '外部销售'"
                     @click="confirm(1)">确认到货
@@ -35,12 +48,12 @@
                         <dic-select v-model="form.customerName" placeholder="客户" key="id" label="cname" res="records"
                             url="/blade-sales-part/corpsDesc/list?current=1&size=10&corpType=KH" :filterable="true"
                             :remote="true" dataName="cname" @selectChange="dicChange('customerName', $event)"
-                            :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0"></dic-select>
+                            :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0"></dic-select>
                     </tempalte>
                     <template slot-scope="{row,index}" slot="contacts">
                         <el-select v-model="form.contacts" placeholder="请选择" size="small" style="width:60%" clearable
                             filterable allow-create default-first-option @change="contactsChange($event)"
-                            :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0">
+                            :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售' || form.goodsTotalShipNum > 0">
                             <el-option v-for="item in contactsOption" :key="item.id" :label="item.contacts"
                                 :value="item.contacts" />
                         </el-select>
@@ -56,14 +69,14 @@
                             @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 434)">
                             <template slot-scope="{scope,row}" slot="menuLeft">
                                 <el-button type="primary" icon="el-icon-plus" size="small"
-                                    :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售'"
+                                    :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'"
                                     @click="rowAdd(row, 1)">添加商品</el-button>
                                 <el-button type="success" size="small"
-                                    :disabled="!form.id || editButton || form.status == '已发货' || form.businessSource == '外部销售'"
+                                    :disabled="!form.id || editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'"
                                     icon="el-icon-bottom" @click="excelDialogfun('名称')">按名称导入
                                 </el-button>
                                 <el-button type="success" size="small"
-                                    :disabled="!form.id || editButton || form.status == '已发货' || form.businessSource == '外部销售'"
+                                    :disabled="!form.id || editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'"
                                     icon="el-icon-bottom" @click="excelDialogfun('code')">按Code导入
                                 </el-button>
                                 <el-button type="primary" plain size="small" @click="quickCopy">快捷复制</el-button>
@@ -74,14 +87,14 @@
                                         :disabled="selectionMultilist.length != 1">查看库存</el-button>
                                 </el-popover>
                                 <el-button type="primary" plain size="small"
-                                    :disabled="selectionMultilist.length == 0 || editButton || form.status == '已发货' "
+                                    :disabled="selectionMultilist.length == 0 || editButton || form.status == '已发货'|| form.status == '已取消'"
                                     @click="allClick('派发销售单')">派发销售单</el-button>
                                 <el-button type="danger" plain size="small" @click="allClick('撤销派发')"
                                     :disabled="selectionMultilist.length == 0 || editButton || form.goodsTotalShipNum == 0">撤销派发</el-button>
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
                                 <el-button type="danger" plain size="small" @click="batchDelete"
-                                    :disabled="editButton || form.status == '已发货' || form.businessSource == '外部销售'">一键删除</el-button>
+                                    :disabled="editButton || form.status == '已发货'|| form.status == '已取消' || form.businessSource == '外部销售'">一键删除</el-button>
                             </template>
                             <template slot="goodsId" slot-scope="{ row }">
                                 {{ row.goodsName }}
@@ -108,7 +121,7 @@
                                 <span v-else>{{ row.dot }}</span>
                             </template>
                             <template slot="subTotalMoney" slot-scope="{ row }">{{ row.goodsNum * row.price
-                                }}</template>
+                            }}</template>
                             <template slot="remarks" slot-scope="{ row }">
                                 <el-input v-if="row.$cellEdit" size="small" v-model="row.remarks"
                                     style="width: 100%"></el-input>
@@ -116,14 +129,14 @@
                             </template>
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button v-if="!row.$cellEdit" :size="size"
-                                    :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'"
+                                    :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'|| form.status == '已取消'"
                                     :type="type" icon="el-icon-edit" @click="rowCell(row, index)">编辑
                                 </el-button>
                                 <el-button v-else :size="size" :disabled="editButton || row.sendNum > 0" :type="type"
                                     icon="el-icon-plus" @click="rowSave(row, index)">保存
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size"
-                                    :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'"
+                                    :disabled="editButton || row.sendNum > 0 || form.businessSource == '外部销售'|| form.status == '已取消'"
                                     :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
                                 </el-button>
                             </template>
@@ -1501,6 +1514,58 @@ export default {
             })
             this.dialogVisible = false
         },
+        //申请退款
+        applySettlement(type) {
+            this.$confirm("您确定申请退款吗?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                this.$refs["form"].validate((valid, done) => {
+                    done()
+                    if (valid) {
+                        const data = {
+                            id: this.form.id,
+                            url: '/tirePartsMall/basicData/sharedSales/index',
+                            pageStatus: "",
+                            pageLabel: "共享销售",
+                        }
+                        const loading = this.$loading({
+                            lock: true,
+                            text: '加载中',
+                            spinner: 'el-icon-loading',
+                            background: 'rgba(255,255,255,0.7)'
+                        });
+                        checkOrder({ ...data }).then((res) => {
+                            this.getDetail(res.data.data.id)
+                            this.$message.success('申请退款成功');
+                        }).finally(() => {
+                            loading.close();
+                        });
+                    }
+                })
+            })
+        },
+        //撤销请核
+        revocationRequest() {
+            this.$confirm("您确定撤回此次申请吗?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                revokeCheckOrder({ ...this.form }).then(res => {
+                    this.getDetail(res.data.data.id)
+                    this.$message.success('撤回成功')
+                    loading.close();
+                })
+            })
+        },
         //导入商品弹窗列表查询
         onLoad(page, params = {}) {
             this.loading = true;

+ 0 - 1
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -2844,7 +2844,6 @@ export default {
                             this.$message.success('申请退款成功');
                             this.isApplySettlement = !this.isApplySettlement
                             loading.close();
-                            console.log(res);
                         }).catch(() => { loading.close(); })
                     }
                 })