Commit a823db0e authored by dcy's avatar dcy

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

parents 188c891a e892e5eb
......@@ -1088,6 +1088,7 @@ export default {
addDiscount(row, index) {
this.discountVisible = true
this.selectListRow = { ...row }
console.log(this.selectListRow)
this.selectListIndex = index
this.$set(this.discountForm, 'time', dayjs().format('YYYY-MM-DD HH:mm:ss'))
getReceivableDiscountLogById({ id: row.id }).then(res => {
......
......@@ -269,39 +269,41 @@
:inline="true"
label-width="80px"
>
<el-row>
<!-- <el-row> -->
<el-form-item :label="$t('供应商')">
<customer-selector
v-model="queryParams.supplierId"
@change="consignor = $event"
/>
</el-form-item>
<el-form-item :label="$t('始发城市')">
<el-select
v-model="queryParams.departureId"
:placeholder="$t('请选择始发地')"
>
<el-option
v-for="item in expoerCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')">
<el-select
v-model="queryParams.objectiveId"
:placeholder="$t('请选择始发地')"
>
<el-option
v-for="item in importCityList"
:label="item.titleZh"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('始发仓')">
<el-select
v-model="queryParams.departureId"
:placeholder="$t('请选择始发仓')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')">
<el-select
v-model="queryParams.objectiveId"
:placeholder="$t('请选择目的仓')"
clearable
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
......@@ -309,7 +311,8 @@
formatter="number"
/>
</el-form-item>
<el-form-item :label="$t('出货渠道')">
<!-- </el-row> -->
<!-- <el-form-item :label="$t('出货渠道')">
<el-select
v-model="queryParams.channelId"
:placeholder="$t('请选择出货渠道')"
......@@ -349,7 +352,7 @@
:placeholder="$t('请输入订单编号')"
clearable
/>
</el-form-item>
</el-form-item> -->
<el-form-item :label="$t('自编号')" prop="selfNo">
<el-input
......@@ -421,6 +424,8 @@ import { getSupplierPage,getSupplier } from "@/api/ecw/supplier";
import { getPayableList, getPayableInfoByIds, createPayment, getPaymentInfoByIds, getPaymentItem, updatePayment } from "@/api/ecw/financial"
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
import {getWarehouseList} from '@/api/ecw/warehouse'
export default {
name: "CreatPayment",
components: {
......@@ -455,10 +460,12 @@ export default {
tradeCityList: [],
allSupplier: [],
currencyList: [],
warehouseList:[],
};
},
async created() {
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getWarehouseList().then(res => this.warehouseList = res.data)
let that = this;
if (that.$route.query.payableId && that.$route.query.payableId !== '0') {
this.payableId = this.$route.query.payableId;
......@@ -478,7 +485,7 @@ export default {
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'),
invoiceStatus: String(res.data.invoiceStatus),
}
this.$set(this.form,'supplierBankAccount',res.data.supplierBankAccount)
console.log(this.form)
})
......@@ -522,6 +529,13 @@ export default {
importCityList() {
return this.tradeCityList.filter((item) => item.type == 1);
},
exportWarehouseList(){
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
},
methods: {
getCurrencyLabel(id){
......
......@@ -33,10 +33,10 @@
<!-- <el-form-item label="订单号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('始发城市')">
<el-form-item :label="$t('始发')">
<el-select
v-model="queryParams.departureId"
:placeholder="$t('请选择始发城市')"
:placeholder="$t('请选择始发')"
clearable
>
<el-option
......@@ -47,10 +47,10 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')">
<el-form-item :label="$t('目的')">
<el-select
v-model="queryParams.objectiveId"
:placeholder="$t('请选择目的城市')"
:placeholder="$t('请选择目的')"
clearable
>
<el-option
......
......@@ -517,11 +517,12 @@ export default {
let amountTotal = this.form.receiptAccountList.find(item=>item.type=='total').writeOffAmount
this.detailed.forEach(item => {
// if(item.status){
// amountTotal = NP.plus(amountTotal, item.writeOffAmount)
// }
total = NP.plus(total, item.writeOffAmount)
if(item.status){
total = NP.plus(total, item.writeOffAmount)
}
// total = NP.plus(total, item.writeOffAmount)
})
console.log(total);
let portion = NP.divide(total,amountTotal)
return (portion*100).toFixed(2)
}
......@@ -624,7 +625,7 @@ export default {
}else{
amountList.push({currencyName:item.titleZh,amount:dollar})
}
}
})
this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = amountList
......
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