Commit fa4510dc authored by dragondean@qq.com's avatar dragondean@qq.com
parents e08e8e15 449961c6
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span> {{ scope.row.discountTotal ? `${scope.row.discountTotal}`:0}}</span> <span> {{ scope.row.discountTotal ? `${scope.row.discountTotal}`:0}}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
<span>{{scope.row.discountRemark?('('+scope.row.discountRemark+')'): '' }}</span> <span v-if="scope.row.discountTotal">{{scope.row.discountRemark?('('+scope.row.discountRemark+')'): '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</el-table-column> </el-table-column>
<el-table-column label="应收金额" align="center" prop="receivableAmount"> <el-table-column label="应收金额" align="center" prop="receivableAmount">
<template slot-scope="scope" v-if="scope.row.type !== 'total'"> <template slot-scope="scope" v-if="scope.row.type !== 'total'">
{{ `${scope.row.receivableAmount - scope.row.discountTotal}(${scope.row.receivableAmount} - ${scope.row.discountTotal})` }} {{ `${NP.minus(scope.row.receivableAmount, scope.row.discountTotal)}${scope.row.discountTotal > 0 ? `(${scope.row.receivableAmount} - ${scope.row.discountTotal})` : ''}` }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="220"> <el-table-column align="center" width="220">
...@@ -648,6 +648,7 @@ export default { ...@@ -648,6 +648,7 @@ export default {
}, },
data() { data() {
return { return {
NP,
loadings: false, loadings: false,
loading1: false, loading1: false,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/app-api/file/upload", // 上传的图片服务器地址 uploadFileUrl: process.env.VUE_APP_BASE_API + "/app-api/file/upload", // 上传的图片服务器地址
...@@ -688,7 +689,8 @@ export default { ...@@ -688,7 +689,8 @@ export default {
discountVisible: false, discountVisible: false,
discountForm: {}, discountForm: {},
selectListRow: {}, selectListRow: {},
selectListIndex: 0 selectListIndex: 0,
flag: false
}; };
}, },
async created() { async created() {
...@@ -700,6 +702,7 @@ export default { ...@@ -700,6 +702,7 @@ export default {
let that = this; let that = this;
if (that.$route.query.id) { if (that.$route.query.id) {
this.flag = true
this.id = this.$route.query.id; this.id = this.$route.query.id;
console.log(this.id) console.log(this.id)
getReceiptInfoByIds({ id: this.id }).then(res => { getReceiptInfoByIds({ id: this.id }).then(res => {
...@@ -991,17 +994,21 @@ export default { ...@@ -991,17 +994,21 @@ export default {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6) return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6)
}, },
customerChange(value) { customerChange(value) {
if (this.flag) {
this.flag = false
return
}
this.form.customerName = value.name this.form.customerName = value.name
this.form.customerId && getCustomer(this.form.customerId).then(res => { this.form.customerId && getCustomer(this.form.customerId).then(res => {
this.form = { this.form = {
...this.form, ...this.form,
invoice: this.form.invoice || res.data.invoiceTitle, invoice: res.data.invoiceTitle,
taxpayer: this.form.taxpayer || res.data.licenseNumber, taxpayer: res.data.licenseNumber,
accountBank: this.form.accountBank || res.data.bank, accountBank: res.data.bank,
accountName: this.form.accountName || res.data.bankNumber, accountName: res.data.bankNumber,
projectName: this.form.projectName || res.data.project, projectName: res.data.project,
taxRate: this.form.taxRate || res.data.taxRate, taxRate: res.data.taxRate,
addressPhone: this.form.addressPhone || `${res.data.billingAddress || ''}/${res.data.billingTell || ''}`, addressPhone: `${res.data.billingAddress || ''}/${res.data.billingTell || ''}`,
} }
}) })
}, },
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</el-form> </el-form>
</el-card> </el-card>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitDraft">保 存</el-button> <!-- <el-button type="primary" @click="submitDraft">保 存</el-button> -->
<el-button type="primary" @click="submitForm">新 增</el-button> <el-button type="primary" @click="submitForm">新 增</el-button>
</div> </div>
<el-dialog <el-dialog
...@@ -416,6 +416,8 @@ import { listSimpleDepts } from "@/api/system/dept"; ...@@ -416,6 +416,8 @@ import { listSimpleDepts } from "@/api/system/dept";
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region";
import { getSupplierPage,getSupplier } from "@/api/ecw/supplier"; import { getSupplierPage,getSupplier } from "@/api/ecw/supplier";
import { getPayableList, getPayableInfoByIds, createPayment, getPaymentInfoByIds, getPaymentItem, updatePayment } from "@/api/ecw/financial" import { getPayableList, getPayableInfoByIds, createPayment, getPaymentInfoByIds, getPaymentItem, updatePayment } from "@/api/ecw/financial"
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default { export default {
name: "CreatPayment", name: "CreatPayment",
components: { components: {
...@@ -448,10 +450,12 @@ export default { ...@@ -448,10 +450,12 @@ export default {
}, },
multipleSelection: [], multipleSelection: [],
tradeCityList: [], tradeCityList: [],
allSupplier: [] allSupplier: [],
currencyList: [],
}; };
}, },
created() { async created() {
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
let that = this; let that = this;
if (that.$route.query.payableId && that.$route.query.payableId !== '0') { if (that.$route.query.payableId && that.$route.query.payableId !== '0') {
this.payableId = this.$route.query.payableId; this.payableId = this.$route.query.payableId;
...@@ -627,8 +631,18 @@ export default { ...@@ -627,8 +631,18 @@ export default {
// t && (this.bankData = t.bankList) // t && (this.bankData = t.bankList)
}, },
handleQuery() {}, handleQuery() {},
UStoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'USD').huilv, 100).toFixed(6)
},
NANtoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6)
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val.map(v => {
if(v.currencyId === 1) return Object.assign(v, { exchangeRate: this.UStoRMB() })
if(v.currencyId === 2) return Object.assign(v, { exchangeRate: 1 })
if(v.currencyId === 3) return Object.assign(v, { exchangeRate: this.NANtoRMB() })
});
}, },
hiddenDialog() { hiddenDialog() {
this.open = false; this.open = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment