Commit 65afad80 authored by 我在何方's avatar 我在何方

订单异常修复

parent 7028fab8
...@@ -8,12 +8,13 @@ ...@@ -8,12 +8,13 @@
label-width="120px" label-width="120px"
label-position="left" label-position="left"
> >
<el-descriptions :column="3" class="card" border> <div class="list_item">
<el-descriptions-item :label="$t('供应商')"> <!-- <el-descriptions :column="3" class="card" border>
<el-descriptions-item :label="$t('供应商')" :required="true"> -->
<el-form-item <el-form-item
label="" :label="$t('供应商')"
label-width="0" required
style="margin-bottom: 0" style="width:400px"
prop="supplierId" prop="supplierId"
:rules="{ required: true, trigger: ['blur', 'change'],message:$t('供应商不能为空') }" :rules="{ required: true, trigger: ['blur', 'change'],message:$t('供应商不能为空') }"
:error="$t('供应商不能为空')" :error="$t('供应商不能为空')"
...@@ -32,36 +33,34 @@ ...@@ -32,36 +33,34 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> <!-- </el-descriptions-item> -->
<el-descriptions-item :label="$t('部门')"> <!-- <el-descriptions-item :label="$t('部门')"> -->
<el-form-item <el-form-item
label="" :label="$t('部门')"
label-width="0" style="width:400px"
style="margin-bottom: 0"
prop="departmentId" prop="departmentId"
:rules="{required:true,message:$t('部门不能为空')}" :rules="{required:true,message:$t('部门不能为空')}"
:error="$t('部门不能为空')" :error="$t('部门不能为空')"
> >
<el-select <el-select
v-model="form.departmentId" v-model="form.departmentId"
style="width: 300px" style="max-width: 300px"
:placeholder="$t('请选择部门')" :placeholder="$t('请选择部门')"
> >
<el-option <el-option
@click.native="selslectVal('departmentName', item.name)" @click.native="selslectVal('departmentName', item.name)"
v-for="item in deptData" v-for="item in deptData"
:key="item.id" :key="item.id"
:label="item.named" :label="item.name"
:value="item.id" :value="parseInt(item.id)"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> <!-- </el-descriptions-item> -->
<el-descriptions-item :label="$t('业务员')"> <!-- <el-descriptions-item :label="$t('业务员')"> -->
<el-form-item <el-form-item
label="" :label="$t('业务员')"
label-width="0" style="width:400px"
style="margin-bottom: 0"
prop="salesmanName" prop="salesmanName"
:rules="{required:true,message:$t('业务员不能为空')}" :rules="{required:true,message:$t('业务员不能为空')}"
:error="$t('业务员不能为空')" :error="$t('业务员不能为空')"
...@@ -76,12 +75,13 @@ ...@@ -76,12 +75,13 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> </div>
<el-descriptions-item :label="$t('申请日期')"> <div class="list_item">
<!-- </el-descriptions-item> -->
<!-- <el-descriptions-item :label="$t('申请日期')"> -->
<el-form-item <el-form-item
label="" :label="$t('申请日期')"
label-width="0" style="width:400px"
style="margin-bottom: 0"
prop="applicationAt" prop="applicationAt"
:rules="{required:true,message:$t('申请日期不能为空')}" :rules="{required:true,message:$t('申请日期不能为空')}"
:error="$t('申请日期不能为空')" :error="$t('申请日期不能为空')"
...@@ -95,12 +95,11 @@ ...@@ -95,12 +95,11 @@
:placeholder="$t('选择申请日期')" :placeholder="$t('选择申请日期')"
/> />
</el-form-item> </el-form-item>
</el-descriptions-item> <!-- </el-descriptions-item> -->
<el-descriptions-item :label="$t('供应商银行账号')" style="width: 50%"> <!-- <el-descriptions-item :label="$t('供应商银行账号')" style="width: 50%"> -->
<el-form-item <el-form-item
label="" :label="$t('供应商银行账号')"
label-width="0" style="width:400px"
style="margin-bottom: 0"
prop="supplierBankAccount" prop="supplierBankAccount"
> >
<el-select v-model="form.supplierBankAccount" @change="selectChangeBank" :placeholder="$t('请选择收款账户')"> <el-select v-model="form.supplierBankAccount" @change="selectChangeBank" :placeholder="$t('请选择收款账户')">
...@@ -112,14 +111,15 @@ ...@@ -112,14 +111,15 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> <!-- </el-descriptions-item> -->
</el-descriptions> <!-- </el-descriptions> -->
<el-descriptions :column="3" class="card" border> </div>
<el-descriptions-item :label="$t('最后付款日期')"> <div class="list_item">
<!-- <el-descriptions :column="3" class="card" border> -->
<!-- <el-descriptions-item > -->
<el-form-item <el-form-item
label="" :label="$t('最后付款日期')"
label-width="0" style="width:400px"
style="margin-bottom: 0"
prop="latestPayAt" prop="latestPayAt"
:rules="{required:true,message:$t('最后付款不能为空')}" :rules="{required:true,message:$t('最后付款不能为空')}"
:error="$t('最后付款日期不能为空')" :error="$t('最后付款日期不能为空')"
...@@ -133,12 +133,11 @@ ...@@ -133,12 +133,11 @@
:placeholder="$t('选择最后付款日期')" :placeholder="$t('选择最后付款日期')"
/> />
</el-form-item> </el-form-item>
</el-descriptions-item> <!-- </el-descriptions-item> -->
<el-descriptions-item :label="$t('结算方式')"> <!-- <el-descriptions-item :label="$t('结算方式')"> -->
<el-form-item <el-form-item
label="" :label="$t('结算方式')"
label-width="0" style="width:400px"
style="margin-bottom: 0"
:rules="{required:true,message:$t('结算方式不能为空')}" :rules="{required:true,message:$t('结算方式不能为空')}"
:error="$t('选择结算方式')" :error="$t('选择结算方式')"
prop="settlementType" prop="settlementType"
...@@ -148,8 +147,9 @@ ...@@ -148,8 +147,9 @@
v-model="form.settlementType" v-model="form.settlementType"
/> />
</el-form-item> </el-form-item>
</el-descriptions-item> </div>
</el-descriptions> <!-- </el-descriptions-item> -->
<!-- </el-descriptions> -->
</el-form> </el-form>
</el-card> </el-card>
<el-card class="card"> <el-card class="card">
...@@ -212,12 +212,11 @@ ...@@ -212,12 +212,11 @@
label-position="left" label-position="left"
style="width: 50%" style="width: 50%"
> >
<el-descriptions :column="1" class="card" border> <!-- <el-descriptions :column="1" class="card" border> -->
<el-descriptions-item :label="$t('账单号')"> <!-- <el-descriptions-item :label="$t('账单号')"> -->
<el-form-item <el-form-item
label="" :label="$t('账单号')"
label-width="0" style="margin:20px 0"
style="margin-bottom: 0"
prop="accountNumber" prop="accountNumber"
:rules="[ :rules="[
{ required: true, message:$t('账单号不能为空'), trigger: 'blur' }, { required: true, message:$t('账单号不能为空'), trigger: 'blur' },
...@@ -228,11 +227,10 @@ ...@@ -228,11 +227,10 @@
:placeholder="$t('请输入账单号')" :placeholder="$t('请输入账单号')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> <!-- </el-descriptions-item> -->
<el-descriptions-item :label="$t('发票')"> <!-- <el-descriptions-item > -->
<el-form-item <el-form-item
label="" :label="$t('发票')"
label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="invoiceStatus" prop="invoiceStatus"
required required
...@@ -246,8 +244,8 @@ ...@@ -246,8 +244,8 @@
<el-option :label="$t('已开票')" value="1" /> <el-option :label="$t('已开票')" value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> <!-- </el-descriptions-item> -->
</el-descriptions> <!-- </el-descriptions> -->
</el-form> </el-form>
</el-card> </el-card>
<div slot="header" class="bpm-title">{{ $t('审核流程') }}</div> <div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
...@@ -441,7 +439,7 @@ ...@@ -441,7 +439,7 @@
</template> </template>
<script> <script>
import { listSimpleUsers } from "@/api/system/user"; import { listSimpleUsers,getUserProfile } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict"; import { DICT_TYPE } from "@/utils/dict";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { getChannelList } from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel";
...@@ -495,10 +493,12 @@ export default { ...@@ -495,10 +493,12 @@ export default {
selectedUsers:[], selectedUsers:[],
dialogVisible:false, dialogVisible:false,
rateList:[], rateList:[],
userInfo:null
}; };
}, },
activated(){ async activated(){
console.log(11) let that = this;
await getUserProfile().then(res => that.userInfo = res.data)
if (this.$route.query.payableId && this.$route.query.payableId != 0) { if (this.$route.query.payableId && this.$route.query.payableId != 0) {
this.payableId = this.$route.query.payableId; this.payableId = this.$route.query.payableId;
getPayableInfoByIds({ id: this.payableId }).then(res => { getPayableInfoByIds({ id: this.payableId }).then(res => {
...@@ -506,7 +506,12 @@ export default { ...@@ -506,7 +506,12 @@ export default {
this.list = this.multipleSelection this.list = this.multipleSelection
this.$set(this.form, 'supplierId', res.data.supplierId) this.$set(this.form, 'supplierId', res.data.supplierId)
this.selectChange(this.form.supplierId) this.selectChange(this.form.supplierId)
}) })
this.$set(this.form, 'departmentId', parseInt(this.userInfo.deptId))
this.$set(this.form, 'salesmanId', this.userInfo.id)
that.$set(that.form,'salesmanName',that.userInfo.nickname)
that.$set(that.form,'departmentName',that.userInfo.dept.name)
} }
if (this.$route.query.id && this.$route.query.id !== '0') { if (this.$route.query.id && this.$route.query.id !== '0') {
this.id = this.$route.query.id; this.id = this.$route.query.id;
...@@ -514,7 +519,7 @@ export default { ...@@ -514,7 +519,7 @@ export default {
this.form = { this.form = {
...res.data, ...res.data,
latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'), latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'),
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'), applicationAt: res.data.applicationAt?this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'):this.getYmd(),
invoiceStatus: String(res.data.invoiceStatus), invoiceStatus: String(res.data.invoiceStatus),
} }
...@@ -525,13 +530,17 @@ export default { ...@@ -525,13 +530,17 @@ export default {
this.list = [...res.data] this.list = [...res.data]
this.defaultList = [...res.data] this.defaultList = [...res.data]
}) })
}else{
this.$set(this.form,'applicationAt',this.getYmd())
} }
}, },
async created() { async created() {
let that = this;
await getUserProfile().then(res => that.userInfo = res.data)
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
await getExchangeRatePage({page:1,rows: 100}).then(res => this.rateList = res.data.list) await getExchangeRatePage({page:1,rows: 100}).then(res => this.rateList = res.data.list)
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then(res => this.warehouseList = res.data)
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;
getPayableInfoByIds({ id: this.payableId }).then(res => { getPayableInfoByIds({ id: this.payableId }).then(res => {
...@@ -540,6 +549,10 @@ export default { ...@@ -540,6 +549,10 @@ export default {
this.$set(this.form, 'supplierId', res.data.supplierId) this.$set(this.form, 'supplierId', res.data.supplierId)
this.selectChange(this.form.supplierId) this.selectChange(this.form.supplierId)
}) })
this.$set(this.form, 'departmentId', parseInt(this.userInfo.deptId))
this.$set(this.form, 'salesmanId', this.userInfo.id)
that.$set(that.form,'salesmanName',that.userInfo.nickname)
that.$set(that.form,'departmentName',that.userInfo.dept.name)
} }
if (that.$route.query.id && that.$route.query.id !== '0') { if (that.$route.query.id && that.$route.query.id !== '0') {
this.id = this.$route.query.id; this.id = this.$route.query.id;
...@@ -547,7 +560,7 @@ export default { ...@@ -547,7 +560,7 @@ export default {
this.form = { this.form = {
...res.data, ...res.data,
latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'), latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'),
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'), applicationAt: res.data.applicationAt?this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'):this.getYmd(),
invoiceStatus: String(res.data.invoiceStatus), invoiceStatus: String(res.data.invoiceStatus),
} }
...@@ -558,6 +571,8 @@ export default { ...@@ -558,6 +571,8 @@ export default {
this.list = [...res.data] this.list = [...res.data]
this.defaultList = [...res.data] this.defaultList = [...res.data]
}) })
}else{
this.$set(this.form,'applicationAt',this.getYmd())
} }
listSimpleUsers().then((res) => (that.creatorData = res.data)); listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data)); getChannelList().then((res) => (that.channelList = res.data));
...@@ -571,22 +586,23 @@ export default { ...@@ -571,22 +586,23 @@ export default {
this.selectChange(this.form.supplierId) this.selectChange(this.form.supplierId)
}); });
listSimpleDepts().then((res) => { listSimpleDepts().then((res) => {
res.data.forEach((item) => { that.deptData = res.data
if (item.parentId == 0) { // res.data.forEach((item) => {
that.deptArr.push(item); // if (item.parentId == 0) {
} else { // that.deptArr.push(item);
that.deptData.push(item); // } else {
} // that.deptData.push(item);
}); // }
// });
that.deptData.forEach((value) => { // that.deptData.forEach((value) => {
var dept = that.deptArr.filter((itt) => itt.id == value.parentId); // var dept = that.deptArr.filter((itt) => itt.id == value.parentId);
if (dept.length > 0) { // if (dept.length > 0) {
value.named = dept[0].name + " | " + value.name; // value.named = dept[0].name + " | " + value.name;
}else { // }else {
value.named = value.name; // value.named = value.name;
} // }
}); // });
}); });
}, },
computed: { computed: {
...@@ -722,7 +738,7 @@ export default { ...@@ -722,7 +738,7 @@ export default {
getSupplier(val).then((res)=>{ getSupplier(val).then((res)=>{
this.bankData = res.data.bankList this.bankData = res.data.bankList
var bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount) var bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount)
if(this.bankData.length==0||!bank) this.form.supplierBankAccount='' if(this.bankData.length==0||!bank) this.form.supplierBankAccount= this.bankData[0]['bankAccount']
}) })
} }
...@@ -888,6 +904,13 @@ export default { ...@@ -888,6 +904,13 @@ export default {
str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点 str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
// str = str.replace(/\.\d\d\d$/,'') // 小数点后只能输两位 // str = str.replace(/\.\d\d\d$/,'') // 小数点后只能输两位
return str return str
},
getYmd(){
let today = new Date();
let year = today.getFullYear();//获取年份
let month = today.getMonth() + 1;//获取月份
let day = today.getDate();//获取日期
return year + "-" + month + "-" + day;
} }
}, },
}; };
...@@ -910,4 +933,11 @@ export default { ...@@ -910,4 +933,11 @@ export default {
color:#666; color:#666;
margin:20px 0; margin:20px 0;
} }
.list_item{
display: flex;
align-items: center;
justify-content: start;
margin-bottom: 20px;
flex-wrap:wrap;
}
</style> </style>
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
<!-- v2.0空运专线,显示出货渠道 --> <!-- v2.0空运专线,显示出货渠道 -->
<span v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'" style="margin-left:10px">{{$t('出货渠道')}}:{{orderData.channelName}}</span> <!-- <span v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'" style="margin-left:10px">{{$t('出货渠道')}}:{{orderData.channelName}}</span> -->
</el-descriptions-item> </el-descriptions-item>
<!-- v2.0空运专线,显示出货渠道 --> <!-- v2.0空运专线,显示出货渠道 -->
<!-- <el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'"> <el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">
{{channelName}} {{orderData.channelName}}
</el-descriptions-item> --> </el-descriptions-item>
<el-descriptions-item :label="$t('始发地')"> <el-descriptions-item :label="$t('始发地')">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:$t('')}} {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:$t('')}}
</el-descriptions-item> </el-descriptions-item>
......
...@@ -359,21 +359,27 @@ ...@@ -359,21 +359,27 @@
<div v-if="row.charging ==1"> <div v-if="row.charging ==1">
<div v-if="orderExceptionData.orderExceptionStatus==0" class="price_list"> <div v-if="orderExceptionData.orderExceptionStatus==0" class="price_list">
<div style="width:80px">{{$t('全包价')}}:</div> <div class="price_label">{{$t('全包价')}}:</div>
<inputor default2="0" style="width:100px" v-model.number="row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor default2="0" style="width:100px" v-model.number="row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" />
<selector v-model="row.seaFreightCurrency" style="width:100px" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 /> <selector v-model="row.seaFreightCurrency" style="width:100px" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 />
/ <selector v-model="row.seaFreightVolume" style="width:100px" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 /> / <selector v-model="row.seaFreightVolume" style="width:100px" :options="unitList" :label-field="$l('title')" value-field="id" defaultable2 />
</div> </div>
<div v-else class="price_list"> <div v-else class="price_list">
<span v-if="!row.oneSeaFreight">{{$t('全包价')}}:{{$t('未报价')}}</span> <div v-if="!row.oneSeaFreight">
<span v-else>{{$t('全包价')}}:{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</span> <span class="price_label">{{$t('全包价')}}:</span>
<span>{{$t('未报价')}}</span>
</div>
<div v-else>
<span class="price_label">{{$t('全包价')}}:</span>
<span>{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</span>
</div>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<!-- <span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span> --> <!-- <span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span> -->
<div v-if="orderExceptionData.orderExceptionStatus==0"> <div v-if="orderExceptionData.orderExceptionStatus==0">
<div class="price_list"> <div class="price_list">
<div style="width:80px">{{$t('运费')}}:</div> <div class="price_label">{{$t('运费')}}:</div>
<div class="price_list"> <div class="price_list">
<inputor style="width:100px" default2="0" v-model.number="row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor style="width:100px" default2="0" v-model.number="row.oneSeaFreight" type="number" :placeholder="$t('整数或者两位小数')" />
<selector style="width:100px" v-model="row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 /> <selector style="width:100px" v-model="row.seaFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 />
...@@ -381,7 +387,7 @@ ...@@ -381,7 +387,7 @@
</div> </div>
</div> </div>
<div class="price_list"> <div class="price_list">
<div style="width:80px">{{$t('清关费')}}:</div> <div class="price_label">{{$t('清关费')}}:</div>
<div class="price_list"> <div class="price_list">
<inputor style="width:100px" default2="0" v-model.number="row.oneClearanceFreight" type="number" :placeholder="$t('整数或者两位小数')" /> <inputor style="width:100px" default2="0" v-model.number="row.oneClearanceFreight" type="number" :placeholder="$t('整数或者两位小数')" />
<selector style="width:100px" v-model="row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 /> <selector style="width:100px" v-model="row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 />
...@@ -389,18 +395,30 @@ ...@@ -389,18 +395,30 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div class="price_list"> <div class="price_list">
<span v-if="!row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span> <div v-if="!row.oneSeaFreight">
<span v-else>{{$t('运费')}}:{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</span> <span class="price_label">{{$t('运费')}}:</span>
</div> <span>{{$t('未报价')}}</span>
<div class="price_list"> </div>
<span v-if="!row.oneSeaFreight">{{$t('清关费')}}:{{$t('未报价')}}</span> <div v-else>
<span v-else>{{$t('清关费')}}:{{row.oneClearanceFreight}} {{currencyMap[row.clearanceFreightCurrency]}} / {{unitMap[row.clearanceFreightVolume]}}</span> <span class="price_label">{{$t('运费')}}:</span>
</div> <span>{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</span>
</div> </div>
</div>
<div class="price_list">
<div v-if="!row.oneSeaFreight">
<span class="price_label">{{$t('清关费')}}:</span>
<span>{{$t('未报价')}}</span>
</div>
<div v-else>
<span class="price_label">{{$t('清关费')}}:</span>
<span>{{row.oneClearanceFreight}} {{currencyMap[row.clearanceFreightCurrency]}} / {{unitMap[row.clearanceFreightVolume]}}</span>
</div>
</div>
</div> </div>
</div> </div>
</div>
</div> </div>
<!--预付异常的备选需要根据接口数据过滤--> <!--预付异常的备选需要根据接口数据过滤-->
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'"> <el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
...@@ -554,12 +572,24 @@ ...@@ -554,12 +572,24 @@
<el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'"> <el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">
<!--嵌套一个form来脱离disabled控制--> <!--嵌套一个form来脱离disabled控制-->
<el-form> <el-form>
<selector <el-select
v-model="handlerParams.channelId"
:placeholder="$t('请选择出货渠道')"
@change="calculationPrice"
>
<el-option
v-for="item in channelList"
:key="item.channelId"
:label="$i18n.locale=='zh_CN'?item.nameZh:item.nameEn"
:value="item.channelId"
/>
</el-select>
<!-- <selector
v-model="handlerParams.channelId" v-model="handlerParams.channelId"
:options="channelList" :options="channelList"
value-field="channelId" value-field="channelId"
:label-field="$l(null, 'name')" :label-field="$l(null, 'name')"
></selector> ></selector> -->
</el-form> </el-form>
</el-form-item> </el-form-item>
<el-form-item :label="$t('选择线路')" prop="lineId"> <el-form-item :label="$t('选择线路')" prop="lineId">
...@@ -673,12 +703,12 @@ ...@@ -673,12 +703,12 @@
<div v-if="scope.row.charging ==1" class="channel"> <div v-if="scope.row.charging ==1" class="channel">
<span v-if="!scope.row.oneSeaFreight">{{$t('全包价')}}:{{$t('未报价')}}</span> <span v-if="!scope.row.oneSeaFreight">{{$t('全包价')}}:{{$t('未报价')}}</span>
<span v-else>{{$t('全包价')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span> <span v-else>{{$t('全包价')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span>
<el-button v-if="orderExceptionData.orderExceptionStatus==0" type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button> <!-- <el-button v-if="orderExceptionData.orderExceptionStatus==0" type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button> -->
</div> </div>
<div v-else class="channel"> <div v-else class="channel">
<span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span> <span v-if="!scope.row.oneSeaFreight">{{$t('运费')}}:{{$t('未报价')}}</span>
<span v-else>{{$t('运费')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span> <span v-else>{{$t('运费')}}:{{scope.row.oneSeaFreight}} {{currencyMap[scope.row.seaFreightCurrency]}} / {{unitMap[scope.row.seaFreightVolume]}}</span>
<el-button v-if="orderExceptionData.orderExceptionStatus==0" type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button> <!-- <el-button v-if="orderExceptionData.orderExceptionStatus==0" type="primary" plain @click="routeToPrice(scope.row,1)">{{!scope.row.oneSeaFreight?$t('报价'):$t('修改报价')}}</el-button> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -768,7 +798,7 @@ ...@@ -768,7 +798,7 @@
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse' import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region' import {getTradeCityList} from '@/api/ecw/region'
import { getUnitList } from '@/api/ecw/unit'; import { getUnitList } from '@/api/ecw/unit';
import {getProduct} from '@/api/ecw/product' import {getProduct,calculationPrice} from '@/api/ecw/product'
import {getProductPriceGetPrice} from '@/api/ecw/productPrice' import {getProductPriceGetPrice} from '@/api/ecw/productPrice'
import Inputor from '@/components/Inputor' import Inputor from '@/components/Inputor'
...@@ -817,6 +847,7 @@ ...@@ -817,6 +847,7 @@
tradeCityList:[], tradeCityList:[],
unitList: [], unitList: [],
selectLine:null, selectLine:null,
calculating: false, // 是否正在计算费用,防止频繁重新请求
}; };
}, },
activated(){ activated(){
...@@ -841,7 +872,7 @@ ...@@ -841,7 +872,7 @@
this.customerServiceList = r.data; this.customerServiceList = r.data;
}) })
getCurrencyList().then(res => this.currencyList = res.data) await getCurrencyList().then(res => this.currencyList = res.data)
this.tradeCityList = (await getTradeCityList()).data this.tradeCityList = (await getTradeCityList()).data
if(this.$route.query.id){ if(this.$route.query.id){
this.orderExceptionId = this.$route.query.id this.orderExceptionId = this.$route.query.id
...@@ -868,14 +899,14 @@ ...@@ -868,14 +899,14 @@
console.log('listById', res) console.log('listById', res)
let region = '' let region = ''
res.data.forEach(item => { res.data.forEach(item => {
region += " " + item.titleZh region += " " + (this.$i18n.locale=='zh_CN'?item.titleZh:item.titleEn)
}) })
this.region = region this.region = region
}) })
}, },
'orderData.channelId'(){ 'orderData.channelId'(){
this.getChannel() this.getChannel()
}, }
}, },
computed: { computed: {
currencyMap(){ currencyMap(){
...@@ -940,6 +971,7 @@ ...@@ -940,6 +971,7 @@
methods: { methods: {
changeLined(e){ changeLined(e){
this.selectLine = this.routerList.find(item => item.id == this.handlerParams.lineId) this.selectLine = this.routerList.find(item => item.id == this.handlerParams.lineId)
this.calculationPrice()
}, },
getDictData, getDictData,
onTableMounted(e){ onTableMounted(e){
...@@ -960,13 +992,13 @@ ...@@ -960,13 +992,13 @@
/** 查询列表 */ /** 查询列表 */
getCurrencyLabel(id){ getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id) var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
return '' return ''
}, },
getChannel(){ getChannel(){
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => { getChannel(this.order.channelId).then(res => {
this.channelName = res.data.nameZh this.channelName = this.$i18n.locale=='zh_CN'?res.data.nameZh:res.data.nameEn
}) })
}, },
getList() { getList() {
...@@ -1162,7 +1194,7 @@ ...@@ -1162,7 +1194,7 @@
return return
} }
} }
if((this.orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&this.handlerParams.orderExceptionHandlerResult=='continue_channel')||this.orderExceptionData.orderExceptionType=='line_loop_exception'){ if((this.orderExceptionData.orderExceptionType=='not_shipping_channel_exception')||this.orderExceptionData.orderExceptionType=='line_loop_exception'){
this.handlerParams.orderItemVOList = this.orderData.orderItemVOList this.handlerParams.orderItemVOList = this.orderData.orderItemVOList
this.handlerParams.channelPriceList = [] this.handlerParams.channelPriceList = []
this.orderData.orderItemVOList.map(v=>{ this.orderData.orderItemVOList.map(v=>{
...@@ -1320,6 +1352,56 @@ ...@@ -1320,6 +1352,56 @@
} }
}, },
// 计算商品运费(根据货值计算保费)
calculationPrice(){
let calcable = true
if(!this.orderData.orderItemVOList.length) return false
this.orderData.orderItemVOList.forEach(item => {
if(!item.prodId){
calcable = false
}
})
console.log('calculationPrice', this.calculating)
if(this.calculating || !calcable) return false
this.calculating = true
console.log('calculating ---> ')
const params = {
lineId: this.handlerParams.lineId,
transportId: this.orderData.transportId,
channelId: [3,4].indexOf(this.orderData.transportId) > -1 ? this.handlerParams.channelId : undefined,
prodConditionParamList: this.getProductListWithDefaultValue(),
orderType: this.orderData.orderType
}
if(this.handlerParams.channelId){
params.channelId = this.handlerParams.channelId
}
calculationPrice(params).then(res => {
this.orderData.orderItemVOList.map((item, index) => {
item.oneClearanceFreight = res.data.prodCostDtoList[index].clearanceFee
item.clearanceFreightCurrency = res.data.prodCostDtoList[index].clearanceFeeCurrency
item.clearanceFreightVolume = res.data.prodCostDtoList[index].clearanceFeeVolume
item.oneSeaFreight = res.data.prodCostDtoList[index].oneFreight
item.seaFreightCurrency = res.data.prodCostDtoList[index].freightCurrency
item.seaFreightVolume = res.data.prodCostDtoList[index].freightVolume
})
}).finally(() => {
this.calculating = false
})
},
// 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值
getProductListWithDefaultValue(){
let arr = []
this.orderData.orderItemVOList.forEach(item => {
let tmp = {...item}
if(!tmp.volume)tmp.volume = 1
if(!tmp.weight)tmp.weight = 1
if(!tmp.quantity)tmp.quantity = 1
if(!tmp.num)tmp.num = 1
tmp.orderType = item.orderItemType
arr.push(tmp)
})
return arr
},
//获取提交的不可出渠道异常商品清关费 //获取提交的不可出渠道异常商品清关费
getExceptionPriceList(type){ getExceptionPriceList(type){
let that = this let that = this
...@@ -1397,6 +1479,14 @@ ...@@ -1397,6 +1479,14 @@
align-items: center; align-items: center;
margin-bottom:10px; margin-bottom:10px;
} }
.price_label{
width: 112px;
font-weight: 700;
text-align: right;
margin-right: 6px;
font-size: 14px;
color:#606266;
}
.channel{ .channel{
width: 100%; width: 100%;
display: flex; display: flex;
......
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