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