Commit 210991ee authored by dcy's avatar dcy

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

parents 5f2aba03 e71dcb4a
......@@ -178,7 +178,8 @@ export default {
const { bookSeaInfo } = this.shipmentObj;
makeBillService({
orderId: row.orderId,
zgDate: bookSeaInfo.sailTime,
zgDate: '2022-09-27',
// zgDate: bookSeaInfo.sailTime,
}).then((res) => {
const { data } = res;
const { titleZh = "", contentZh = "" } = data?.ladingTemplate ?? {};
......
......@@ -159,8 +159,8 @@
v-model="form.openInvoice"
placeholder="请选择是否需要开票"
>
<el-option :value="1" label="需要"></el-option>
<el-option :value="0" label="不需要"></el-option>
<el-option :value="1" label=""></el-option>
<el-option :value="0" label=""></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
......@@ -377,7 +377,8 @@
</el-card>
</el-form>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(1)"> </el-button>
<el-button v-if="id==0" type="primary" :loading="saveBtnLoading" @click="submitForm(1)"> </el-button>
<el-button v-else type="primary" :loading="saveBtnLoading" @click="$store.dispatch('tagsView/delCurrentView')"> </el-button>
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id ? '修 改' : '新 增' }}</el-button>
</div>
<el-dialog
......@@ -596,7 +597,7 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="selectListRow.currencyId" />
</el-form-item>
<el-form-item label="优惠金额">
<el-input v-model="discountForm.discountTotal" style="width: 300px"></el-input>
<el-input v-model="discountForm.discountTotal" type="number" min="0" :max="selectListRow.totalAmount" @input="checkDiscount" style="width: 300px" ></el-input>
&nbsp;&nbsp;
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="selectListRow.currencyId" />
</el-form-item>
......@@ -698,6 +699,7 @@ export default {
let that = this;
if (that.$route.query.id) {
this.id = this.$route.query.id;
console.log(this.id)
getReceiptInfoByIds({ id: this.id }).then(res => {
res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
this.form = Object.assign({}, this.form, res.data)
......@@ -808,6 +810,12 @@ export default {
}
},
methods: {
checkDiscount(e){
console.log(e)
if(e>this.selectListRow.totalAmount){
this.discountForm.discountTotal = this.selectListRow.totalAmount
}
},
currencyIdChange(val, row, index) {
row.collectionCurrencyId = val
if (val == row.currencyId) row.collectionRate = 1
......@@ -819,7 +827,7 @@ export default {
if (row.currencyId == 3 && val == 1) row.collectionRate = this.NANtoUS()
if (row.currencyId == 3 && val == 2) row.collectionRate = this.NANtoRMB()
}
this.rateChange(row, index)
},
writeOffRateChange(row, index) {
......@@ -835,13 +843,13 @@ export default {
setTimeout(() => {
// 收款总计
const dollarList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 1)
const dollar = dollarList.reduce((total, currentValue) => NP.plus(total, NP.minus(currentValue.receivableAmount, currentValue.discountTotal || 0) || 0), 0)
const dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
const rmbList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 2)
const rmb = rmbList.reduce((total, currentValue) => NP.plus(total, NP.minus(currentValue.receivableAmount, currentValue.discountTotal || 0) || 0), 0)
const rmb = rmbList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
const nairaList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == 3)
const naira = nairaList.reduce((total, currentValue) => NP.plus(total, NP.minus(currentValue.receivableAmount, currentValue.discountTotal || 0) || 0), 0)
const naira = nairaList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0)
this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = [dollar, rmb, naira]
this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
......@@ -857,7 +865,7 @@ export default {
discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
const t = copyList.find(v => v.currencyId == 1)
this.form.receiptAccountList = [
{
{
discountTotal: discountDollar,
currencyId: 1,
receivableAmount: dollar,
......@@ -877,7 +885,7 @@ export default {
const t = copyList.find(v => v.currencyId == 2)
this.form.receiptAccountList = [
...this.form.receiptAccountList,
{
{
discountTotal: discountRmb,
currencyId: 2,
receivableAmount: rmb,
......@@ -897,7 +905,7 @@ export default {
const t = copyList.find(v => v.currencyId == 3)
this.form.receiptAccountList = [
...this.form.receiptAccountList,
{
{
discountTotal: discountNaira,
currencyId: 3,
receivableAmount: naira,
......@@ -996,7 +1004,7 @@ export default {
})
},
getReceivableListByIds() {
},
cancelDiscount() {
this.discountVisible = false
......
......@@ -15,7 +15,7 @@
<el-form-item label="柜号:">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
v-model="queryParams.containerNo"
placeholder="请输入柜号"
clearable
@keyup.enter.native="handleQuery"
......@@ -24,7 +24,7 @@
<el-form-item label="自编号:">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
v-model="queryParams.payableNo"
placeholder="请输入自编号"
clearable
@keyup.enter.native="handleQuery"
......@@ -37,6 +37,7 @@
<el-select
v-model="queryParams.departureId"
placeholder="请选择始发城市"
clearable
>
<el-option
v-for="item in expoerCityList"
......@@ -50,6 +51,7 @@
<el-select
v-model="queryParams.objectiveId"
placeholder="请选择目的城市"
clearable
>
<el-option
v-for="item in importCityList"
......@@ -64,6 +66,7 @@
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
clearable
/>
</el-form-item>
</el-row>
......
......@@ -42,6 +42,7 @@
<el-select
v-model="queryParams.departureId"
placeholder="请选择始发城市"
clearable
>
<el-option
v-for="item in expoerCityList"
......@@ -55,6 +56,7 @@
<el-select
v-model="queryParams.objectiveId"
placeholder="请选择目的城市"
clearable
>
<el-option
v-for="item in importCityList"
......@@ -69,12 +71,14 @@
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
clearable
/>
</el-form-item>
<el-form-item label="控货:">
<dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="queryParams.isCargoControl"
clearable
/>
</el-form-item>
</el-row>
......@@ -83,12 +87,14 @@
<dict-selector
:type="DICT_TYPE.ORDER_STATUS"
v-model="queryParams.status"
clearable
/>
</el-form-item>
<el-form-item label="报关方式:">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customsType"
clearable
/>
</el-form-item>
<el-form-item label="订单号:">
......@@ -133,12 +139,14 @@
<dict-selector
:type="DICT_TYPE.FEE_TYPE"
v-model="queryParams.feeType"
clearable
></dict-selector>
</el-form-item>
<el-form-item label="发货人:">
<customer-selector
v-model="queryParams.consignorNameOrPhone"
@change="consignor = $event"
clearable
/>
</el-form-item>
<!-- <el-form-item label="发货人:" >
......@@ -151,6 +159,7 @@
<customer-selector
v-model="queryParams.consigneeNameOrPhone"
@change="consignor = $event"
clearable
/>
</el-form-item>
<el-form-item label="自编号:">
......@@ -189,7 +198,7 @@
<el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="品名" align="center" prop="title">
<template slot-scope="scope">
{{ scope.row.titleZh + "(" + scope.row.titleEn + ")" }}
{{ scope.row.titleZh? (scope.row.titleZh + "(" + scope.row.titleEn + ")"):'' }}
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" />
......
......@@ -196,6 +196,7 @@ export default {
/** 查询列表 */
getList() {
this.loading = true;
this.list = []
// 处理查询参数
let params = {...this.queryParams}
// 执行查询
......@@ -203,7 +204,7 @@ export default {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
this.reset()
// this.reset()
});
},
/** 表单重置 */
......
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