Commit 0ed79233 authored by 我在何方's avatar 我在何方
parents a61cb77e 88fea860
...@@ -506,10 +506,11 @@ export function boxGoodsDetail(data) { ...@@ -506,10 +506,11 @@ export function boxGoodsDetail(data) {
* @param {*} id * @param {*} id
* @return {*} * @return {*}
*/ */
export function deleteSection(id) { export function deleteSection(params) {
return request({ return request({
url: "/ecw/box-preload-goods/deleteSection?id=" + id, url: "/ecw/box-preload-goods/deleteSection",
method: "delete", method: "delete",
params
}); });
} }
...@@ -520,10 +521,11 @@ export function deleteSection(id) { ...@@ -520,10 +521,11 @@ export function deleteSection(id) {
* @param {*} id * @param {*} id
* @return {*} * @return {*}
*/ */
export function deleteGoods(id) { export function deleteGoods(params) {
return request({ return request({
url: "/ecw/box-preload-goods/delete?ids=" + id.join(","), url: "/ecw/box-preload-goods/delete",
method: "delete", method: "delete",
params
}); });
} }
......
...@@ -71,9 +71,13 @@ export function exportCustomerContactsExcel(query) { ...@@ -71,9 +71,13 @@ export function exportCustomerContactsExcel(query) {
// 根据客户ID获得联系人列表 // 根据客户ID获得联系人列表
export function getCustomerContactsListByCustomer(query) { export function getCustomerContactsListByCustomer(query) {
return request({ if(query.customerId){
url: '/ecw/customer-contacts/list-by-customer', return request({
method: 'get', url: '/ecw/customer-contacts/list-by-customer',
params: query method: 'get',
}) params: query
})
}else {
return Promise.resolve()
}
} }
...@@ -688,6 +688,15 @@ export function operateLogPage(params){ ...@@ -688,6 +688,15 @@ export function operateLogPage(params){
}) })
} }
// 获取操作日志详情
export function getOperateLogDetail(id){
return request({
url: '/ecw/order-operate-log/get',
params: {id},
method: 'get',
})
}
// 取消拆单申请 // 取消拆单申请
export function splitCancelApply(data){ export function splitCancelApply(data){
return request({ return request({
......
...@@ -113,3 +113,11 @@ export function exportExcel(params) { ...@@ -113,3 +113,11 @@ export function exportExcel(params) {
responseType: 'arraybuffer' responseType: 'arraybuffer'
}) })
} }
// 根据订ID获取订单异常结果
export function getOrderExcptionResult(query) {
return request({
url: '/ecw/order-exception-result/page',
method: 'get',
params: query
})
}
\ No newline at end of file
...@@ -59,7 +59,6 @@ export function deleteSplit(id) { ...@@ -59,7 +59,6 @@ export function deleteSplit(id) {
}) })
} }
//取消申请拆单 //取消申请拆单
export function cancelApply(data) { export function cancelApply(data) {
return request({ return request({
url: '/order/split/cancel-apply', url: '/order/split/cancel-apply',
...@@ -137,3 +136,12 @@ export function quantitycheck(query) { ...@@ -137,3 +136,12 @@ export function quantitycheck(query) {
params: query params: query
}) })
} }
// 重置拆单
export function deleteAllSplit(orderId) {
return request({
url: '/order/split/delete/all',
method: 'delete',
params: {orderId}
})
}
...@@ -134,4 +134,10 @@ export function serviceConfig(data) { ...@@ -134,4 +134,10 @@ export function serviceConfig(data) {
}) })
} }
// 数量是否必填
export function quantityRequired(lineId) {
return request({
url: '/ecw/warehouse/quantity/required/' + lineId,
method: 'get'
})
}
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
this.$emit('input', this.valueSync.replace('+', '')) this.$emit('input', this.valueSync.replace('+', ''))
}, },
value(){ value(){
if(this.value)this.valueSync = this.value this.valueSync = this.value
} }
}, },
created(){ created(){
...@@ -39,4 +39,4 @@ export default { ...@@ -39,4 +39,4 @@ export default {
} }
} }
</script> </script>
\ No newline at end of file
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<div class="line"> <div class="line">
<div class="label">{{$t('姓名(英文)')}}</div> <div class="label">{{$t('姓名(英文)')}}</div>
<div class="value">{{item.contactsNameEn}}</div> <div class="value">{{item.contactsNameEn}}</div>
<el-tag v-if="item.isInOpenSea" type="danger" effect="dark">{{$t('')}}</el-tag>
</div> </div>
<div class="line"> <div class="line">
<div class="label">{{$t('电话')}}</div> <div class="label">{{$t('电话')}}</div>
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
this.customerFollow.form.bizId = this.id this.customerFollow.form.bizId = this.id
}) })
listServiceUser().then(r => { listServiceUser().then(r => {
console.log( r.data,'r.data跟进业务') // console.log( r.data,'r.data跟进业务')
this.serviceUserList = r.data this.serviceUserList = r.data
}) })
this.getCustomerFollowList() this.getCustomerFollowList()
......
...@@ -258,30 +258,34 @@ export default { ...@@ -258,30 +258,34 @@ export default {
} }
}, },
initArea(){ resetAreaTreeSelected(area) {
return getByWarehouseId({ warehouseId: this.warehouseId }).then(r => { area.forEach(e => {
const area = r.data // 仓库
area.forEach(e => { e.children?.forEach(f => {
// 仓库 // 区域
e.children?.forEach(f => { f.selected = this.isSelected(e.id, f.id)
// 区域 if(f.positionList) f.positionList.forEach(g => {
f.selected = this.isSelected(e.id, f.id) // 位置
if(f.positionList) f.positionList.forEach(g => { g.selected = this.isSelected(e.id, f.id, g.id)
// 位置 g.children?.forEach(k => {
g.selected = this.isSelected(e.id, f.id, g.id) // 子位置
g.children?.forEach(k => { k.selected = this.isSelected(e.id, f.id, k.id)
// 子位置
k.selected = this.isSelected(e.id, f.id, k.id)
})
}) })
}) })
}) })
this.area = area })
return area
},
initArea(){
return getByWarehouseId({ warehouseId: this.warehouseId }).then(r => {
this.area = this.resetAreaTreeSelected(r.data)
}) })
}, },
// 用于储位回显选中 // 用于储位回显选中
isSelected(warehouse, area, position = 0){ isSelected(warehouse, area, position = 0){
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && position === e.locationId) return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && (position === e.locationId || undefined === e.locationId))
}, },
} }
} }
......
...@@ -3897,4 +3897,4 @@ ...@@ -3897,4 +3897,4 @@
"收费方数": "", "收费方数": "",
"可放入重量": "", "可放入重量": "",
"可放入收费重量": "" "可放入收费重量": ""
} }
\ No newline at end of file
...@@ -119,6 +119,7 @@ export const DICT_TYPE = { ...@@ -119,6 +119,7 @@ export const DICT_TYPE = {
ECW_CUSTOMER_RESOURCE_TYPE: 'customer_resource_type', // 客户资源类型 ECW_CUSTOMER_RESOURCE_TYPE: 'customer_resource_type', // 客户资源类型
ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部) ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部)
ECW_ORDER_APPROVAL_TYPE: 'order_approval_type', // 订单相关审批类型 ECW_ORDER_APPROVAL_TYPE: 'order_approval_type', // 订单相关审批类型
ECW_FEE_SOURCE: 'fee_source', // 费用来源
//--------ecw--------- //--------ecw---------
CUSTOMER_STATUS: 'customer_status', CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source', CUSTOMER_SOURCE: 'customer_source',
......
...@@ -87,6 +87,7 @@ service.interceptors.response.use(res => { ...@@ -87,6 +87,7 @@ service.interceptors.response.use(res => {
return Promise.reject('无效的会话,或者会话已过期,请重新登录。') return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) { } else if (code === 500) {
Message({ Message({
dangerouslyUseHTMLString: true,
message: msg, message: msg,
type: 'error' type: 'error'
}) })
...@@ -109,6 +110,9 @@ service.interceptors.response.use(res => { ...@@ -109,6 +110,9 @@ service.interceptors.response.use(res => {
} else if (code === 566) { } else if (code === 566) {
// 额外情况 // 额外情况
return Promise.reject(res.data) return Promise.reject(res.data)
} else if (code === 666) {
// 额外情况
return Promise.reject(res.data)
} else if (code !== 200) { } else if (code !== 200) {
Notification.error({ Notification.error({
title: msg title: msg
......
<template> <template>
<iframe src="https://chat.groupage.cn/" class="iframe"></iframe> <iframe :src="url" class="iframe"></iframe>
</template> </template>
<style> <style>
.iframe{ .iframe{
...@@ -8,3 +8,24 @@ ...@@ -8,3 +8,24 @@
border: none; border: none;
} }
</style> </style>
<script>
import {getUserProfile} from "@/api/system/user";
export default {
data() {
return {
username: ''
}
},
computed:{
url(){
return 'https://chatgpt.groupage.cn/#/' + this.username
}
},
created() {
getUserProfile().then(res => {
this.username = res.data.username
})
}
}
</script>
...@@ -167,11 +167,19 @@ ...@@ -167,11 +167,19 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('货值')" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.worth" @change="updateField(scope.row, 'worth')" size="mini" :disabled="index === 0">
<span slot="append">{{ $t('美元') }}</span>
</el-input>
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center"> <el-table-column :label="$t('箱数')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.num}}</span> <span>{{scope.row.num}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('计划装柜')" align="center"> <el-table-column :label="$t('计划装柜')" align="center">
{{planCabinet}} {{planCabinet}}
</el-table-column> </el-table-column>
...@@ -226,7 +234,7 @@ ...@@ -226,7 +234,7 @@
</el-col>--> </el-col>-->
</el-row> </el-row>
<el-form-item :label="$t('放入箱数')+':'"> <el-form-item :label="$t('放入箱数')+':'">
{{shopForm.num||0}} <el-input-number v-model="shopForm.num" controls-position="right" :min="0" :max="+shopForm.leftNum" @change="calcAverg"></el-input-number>
</el-form-item> </el-form-item>
...@@ -251,6 +259,12 @@ ...@@ -251,6 +259,12 @@
<el-form-item :label="$t('收费重量')"> <el-form-item :label="$t('收费重量')">
<el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="mainOrderItem.chargeWeight"></el-input-number> <el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="mainOrderItem.chargeWeight"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item v-if="mainOrderItem.orderItemId" label-width="0">
{{ $t('剩余货值') }}:{{ mainOrderItem.worth || 0 }}{{ $t('美元') }}
</el-form-item>
<el-form-item :label="$t('放入货值')">
<el-input-number v-model="shopForm.worth" controls-position="right" :min="0" :max="mainOrderItem.worth"></el-input-number>
</el-form-item>
<!--按照原型这里需要显示剩余数量,但是事实无法计算剩余数量,因为已装数量是未知的--> <!--按照原型这里需要显示剩余数量,但是事实无法计算剩余数量,因为已装数量是未知的-->
<el-form-item :label="$t('放入数量(个)')+':'" prop="quantity" v-if="isQuantity"> <el-form-item :label="$t('放入数量(个)')+':'" prop="quantity" v-if="isQuantity">
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="0" :max="mainOrderItem.quantity || undefined"></el-input-number> <el-input-number v-model="shopForm.quantity" controls-position="right" :min="0" :max="mainOrderItem.quantity || undefined"></el-input-number>
...@@ -271,10 +285,11 @@ ...@@ -271,10 +285,11 @@
<script> <script>
import { import {
getSplitList, getSplitList,
quantitycheck, // quantitycheck,
createSplitItem, createSplitItem,
deleteSplitItem, deleteSplitItem,
} from "@/api/ecw/orderHandle"; } from "@/api/ecw/orderHandle";
import {quantityRequired} from "@/api/ecw/warehouse";
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region";
import WorkFlow from "@/components/WorkFlow"; import WorkFlow from "@/components/WorkFlow";
import {getOrder, splitItemUpdate} from "@/api/ecw/order"; import {getOrder, splitItemUpdate} from "@/api/ecw/order";
...@@ -405,14 +420,6 @@ export default { ...@@ -405,14 +420,6 @@ export default {
}); });
return _total; return _total;
}, },
/*totalSplitQty() {
let _total = 0;
const { orderSplitItemBackVOList = [] } = this.splitData;
orderSplitItemBackVOList.forEach((v) => {
_total = Decimal.add(_total, Number(v.quantity)).toNumber();
});
return _total;
},*/
/* 打开拆单 */ /* 打开拆单 */
getSplit() { getSplit() {
this.orderItems = this.currRow.goodsList ?? []; this.orderItems = this.currRow.goodsList ?? [];
...@@ -545,11 +552,12 @@ export default { ...@@ -545,11 +552,12 @@ export default {
leftNum = Math.min(leftNum, this.mainOrderItem.num) leftNum = Math.min(leftNum, this.mainOrderItem.num)
// 放入箱数 // 放入箱数
this.$set(this.shopForm, 'num', leftNum) this.$set(this.shopForm, 'num', leftNum)
this.calcAverg()
},
// 按比例计算体积重量的默认值
calcAverg(){
// 装箱比例 // 装箱比例
const rate = leftNum / this.mainOrderItem.num const rate = this.shopForm.num / this.mainOrderItem.num
// 放入个数,剩余个数是算不出来的,因为不知道已装数量,所以放入数量只能按照总数的比例计算 // 放入个数,剩余个数是算不出来的,因为不知道已装数量,所以放入数量只能按照总数的比例计算
this.$set(this.shopForm, 'quantity', Math.ceil(this.mainOrderItem.quantity*rate|| 0 * rate)) this.$set(this.shopForm, 'quantity', Math.ceil(this.mainOrderItem.quantity*rate|| 0 * rate))
...@@ -558,66 +566,10 @@ export default { ...@@ -558,66 +566,10 @@ export default {
this.$set(this.shopForm, 'chargeVolume', (this.mainOrderItem.chargeVolume * rate).toFixed(2)) this.$set(this.shopForm, 'chargeVolume', (this.mainOrderItem.chargeVolume * rate).toFixed(2))
this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * rate).toFixed(2)) this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2)) this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2))
this.$set(this.shopForm, 'worth', (this.mainOrderItem.worth * rate).toFixed(2))
}, },
/*async changeProdTitleZh() { /*async getSelectData(item) {
const item = this.setShopForm("zhId"); await quantityRequired(this.orderData.lineId).then((res) => {
this.shopForm.enId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
async changeProdTitleEn() {
const item = this.setShopForm("enId");
this.shopForm.zhId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
setShopForm(key) {
let list = [];
list = this.orderItems.filter((item) => item.id == this.shopForm[key]);
const data = list[0];
const itemNum = data.num ?? 0;
const itemQty = data.quantity ?? 0;
// 获取拆单项的总num
const total = this.totalSplitNum();
// 订单的剩余
const orderNum = this.currRow.num - this.currRow.installNum;
// 剩余可装
const remainNum = Decimal.sub(orderNum, total).toNumber();
this.shopForm.num = 0;
this.shopForm.putNum = 0;
// 剩余可装大于等于订单项剩余,显示订单剩余
if (remainNum >= itemNum) {
this.shopForm.num = remainNum;
this.shopForm.putNum = itemNum;
}
// 订单剩余小于订单项剩余,显示订单项剩余
if (remainNum < itemNum) {
this.shopForm.num = this.shopForm.putNum = remainNum;
}
const totalQty = this.totalSplitQty();
this.shopForm.quantity = 0;
if (totalQty >= itemQty) {
this.shopForm.quantity = totalQty;
}
if (totalQty < itemQty) {
this.shopForm.quantity = itemQty;
}
this.shopForm.orderItemId = data.orderItemId;
this.shopForm.putQuantity = Decimal.div(
this.shopForm.quantity,
this.shopForm.num
).toFixed(0);
return data;
},*/
async getSelectData(item) {
await quantitycheck({
seaFreightVolume: item.seaFreightVolume,
clearanceFreightVolume: item.clearanceFreightVolume,
}).then((res) => {
if (res.data) { if (res.data) {
this.isQuantity = true; this.isQuantity = true;
this.shopRules.putQuantity = [ this.shopRules.putQuantity = [
...@@ -632,7 +584,7 @@ export default { ...@@ -632,7 +584,7 @@ export default {
delete this.shopRules.putQuantity; delete this.shopRules.putQuantity;
} }
}); });
}, },*/
shopAdd() { shopAdd() {
this.$refs["shopForm"].validate((valid) => { this.$refs["shopForm"].validate((valid) => {
if (valid) { if (valid) {
...@@ -667,7 +619,8 @@ export default { ...@@ -667,7 +619,8 @@ export default {
volume: this.shopForm.volume, volume: this.shopForm.volume,
weight: this.shopForm.weight, weight: this.shopForm.weight,
chargeWeight: this.shopForm.chargeWeight, chargeWeight: this.shopForm.chargeWeight,
chargeVolume: this.shopForm.chargeVolume chargeVolume: this.shopForm.chargeVolume,
worth: this.shopForm.worth
}; };
// 按数量计费的才需要传递数量 // 按数量计费的才需要传递数量
if(this.isQuantity){ if(this.isQuantity){
......
...@@ -535,6 +535,31 @@ export default { ...@@ -535,6 +535,31 @@ export default {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}).catch((res) => {
if (res.code === 666) {
this.$confirm("<div style='max-height:500px;overflow:auto'>"+res.msg+this.$t('是否需要一起移出?')+"</div>", this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
remove({ ...params, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
})
.catch(action => {
if(action =='cancel'){
remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
}
});
}
}); });
}, },
/* 修改柜信息 */ /* 修改柜信息 */
......
...@@ -246,6 +246,31 @@ export default { ...@@ -246,6 +246,31 @@ export default {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getSecGoods(); this.getSecGoods();
}); });
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
remove({ ...params, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
})
.catch(action => {
if(action =='cancel'){
remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
}
});
}
}); });
}, },
/** 预装 */ /** 预装 */
...@@ -262,11 +287,67 @@ export default { ...@@ -262,11 +287,67 @@ export default {
} else { } else {
params.orderItemIdList = [item.orderItemId]; params.orderItemIdList = [item.orderItemId];
} }
createGoods(params).then((res) => { createGoods(params)
serviceMsg(res, this).then(() => { .then((res) => {
this.queryAllData(); const { data } = res;
}); if (data.relationMsg) {
}); const msg = data.relationMsg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
loadRelationOrder(data).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
} else {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
}
})
.catch((res) => {
if (res.code === 555) {
const msg = res.msg && res.msg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
createGoods({ ...params, relationStatus: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
}
if (res.code === 566) {
this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
createGoods({ ...params, relationStatus: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
}
});
}, },
/* 增加部分 */ /* 增加部分 */
addPart() { addPart() {
...@@ -289,7 +370,11 @@ export default { ...@@ -289,7 +370,11 @@ export default {
} }
) )
.then((_) => { .then((_) => {
deleteSection(this.partData.id).then((res) => { let params = {
id: this.partData.id,
deleteType: 2
};
deleteSection(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.partData = {}; this.partData = {};
this.getSecGoods(); this.getSecGoods();
......
...@@ -631,7 +631,11 @@ export default { ...@@ -631,7 +631,11 @@ export default {
} }
) )
.then((_) => { .then((_) => {
deleteSection(part.id).then((res) => { let params = {
id: part.id,
deleteType: 2
};
deleteSection(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
...@@ -657,6 +661,7 @@ export default { ...@@ -657,6 +661,7 @@ export default {
if (data.relationMsg) { if (data.relationMsg) {
const msg = data.relationMsg.replaceAll(",", ""); const msg = data.relationMsg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), { this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
...@@ -679,6 +684,7 @@ export default { ...@@ -679,6 +684,7 @@ export default {
if (res.code === 555) { if (res.code === 555) {
const msg = res.msg && res.msg.replaceAll(",", ""); const msg = res.msg && res.msg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), { this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
...@@ -695,6 +701,7 @@ export default { ...@@ -695,6 +701,7 @@ export default {
if (res.code === 566) { if (res.code === 566) {
this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), { this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
...@@ -737,11 +744,38 @@ export default { ...@@ -737,11 +744,38 @@ export default {
if (type === "row") { if (type === "row") {
ids.push(data.id); ids.push(data.id);
} }
let param = {
deleteGoods(ids).then((res) => { ids: ids.join(",")
}
deleteGoods(param).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}); });
}).catch((res) => {
if (res.code === 666) {
this.$confirm("<div style='max-height:500px;overflow:auto'>"+res.msg+this.$t('是否需要一起移出?')+"</div>", this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
deleteGoods({ ...param, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch(action => {
if(action =='cancel'){
deleteGoods({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
}
});
}
}); });
}, },
/* 查询所有数据 */ /* 查询所有数据 */
......
...@@ -240,14 +240,40 @@ export default { ...@@ -240,14 +240,40 @@ export default {
type: "warning", type: "warning",
}) })
.then((_) => { .then((_) => {
tallyRemove({ let param = {
orderIdLIst: orderIds, orderIdLIst: orderIds,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
}).then((res) => { }
tallyRemove(param).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getList(); this.getList();
}); });
}); }).catch((res) => {
if (res.code === 666) {
this.$confirm("<div style='max-height:500px;overflow:auto'>"+res.msg+this.$t('是否需要一起移出?')+"</div>", this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
tallyRemove({ ...param, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
})
.catch(action => {
if(action =='cancel'){
tallyRemove({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
}
});
}
});
}) })
.catch((_) => {}); .catch((_) => {});
}, },
......
...@@ -587,9 +587,10 @@ export default { ...@@ -587,9 +587,10 @@ export default {
this.reset() this.reset()
// this.getUserMemberUserFn() // this.getUserMemberUserFn()
if(this.customerId !== '0') { if(this.customerId !== '0') {
let customerId = this.customerId
// 编辑客户 // 编辑客户
this.getCustomer(this.customerId).then(() => { this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => { getCustomerContactsListByCustomer({customerId: customerId}).then(r => {
this.form.customerContacts = r.data this.form.customerContacts = r.data
let list = this.form.customerContacts.map(item => item.userid); let list = this.form.customerContacts.map(item => item.userid);
if(list.length >0){ if(list.length >0){
...@@ -604,16 +605,15 @@ export default { ...@@ -604,16 +605,15 @@ export default {
} }
}) })
// 打开重泡货开关 // 打开重泡货开关
if(this.form.weightUnit){ if(this.form.weightUnit){
this.showZhong = true this.showZhong = true
} }
if(this.form.lightUnit){ if(this.form.lightUnit){
this.showPao = true this.showPao = true
} }
// 获取重泡货路线 // 获取重泡货路线
getCustomerLines(this.customerId).then(res => { getCustomerLines(customerId).then(res => {
this.zhongLines = res.data.filter(item => item.zhongPaoType == 1) this.zhongLines = res.data.filter(item => item.zhongPaoType == 1)
this.paoLines = res.data.filter(item => item.zhongPaoType == 2) this.paoLines = res.data.filter(item => item.zhongPaoType == 2)
if(this.zhongLines.length)this.showZhong1 = true if(this.zhongLines.length)this.showZhong1 = true
......
...@@ -690,7 +690,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse' ...@@ -690,7 +690,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
import WorkFlow from '@/components/WorkFlow/' import WorkFlow from '@/components/WorkFlow/'
export default { export default {
name: "CreatCollection", name: "EcwFinancialCreatcollection",
components: { components: {
CustomerSelector,WorkFlow CustomerSelector,WorkFlow
}, },
...@@ -745,6 +745,10 @@ export default { ...@@ -745,6 +745,10 @@ export default {
isUpdate:false isUpdate:false
}; };
}, },
activated(){
console.log(11)
// this.getList();
},
async created() { async created() {
getUserProfile().then(res => { getUserProfile().then(res => {
this.discountForm.author = res.data.username this.discountForm.author = res.data.username
......
...@@ -456,7 +456,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse' ...@@ -456,7 +456,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
import WorkFlow from '@/components/WorkFlow/' import WorkFlow from '@/components/WorkFlow/'
export default { export default {
name: "CreatPayment", name: "EcwFinancialCreatpayment",
components: { components: {
CustomerSelector,WorkFlow CustomerSelector,WorkFlow
}, },
...@@ -495,6 +495,10 @@ export default { ...@@ -495,6 +495,10 @@ export default {
dialogVisible:false dialogVisible:false
}; };
}, },
activated(){
console.log(11)
// this.getList();
},
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) getWarehouseList().then(res => this.warehouseList = res.data)
......
<script> <script>
// 对edit组件复用并更名,防止keepalive缓存数据 // 对edit组件复用并更名,防止keepalive缓存数据
import edit from './edit.vue' import edit from './edit.vue'
edit.name = 'OfferCreate' edit.name = 'EcwOfferCreate'
export default edit export default edit
</script> </script>
\ No newline at end of file
...@@ -520,6 +520,16 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer' ...@@ -520,6 +520,16 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts' import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
window.Decimal= Decimal window.Decimal= Decimal
const createDefaultForm = () => {
return {
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
}
}
export default { export default {
name: "EcwOfferEdit", name: "EcwOfferEdit",
components: { components: {
...@@ -542,16 +552,9 @@ export default { ...@@ -542,16 +552,9 @@ export default {
// couponList: [], // couponList: [],
fee: {}, // 费用 fee: {}, // 费用
// 表单参数 // 表单参数
form: { form: {...createDefaultForm()},
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
},
// 表单校验 // 表单校验
labelStyle: 'width:120px', labelStyle: 'width:120px',
productNames: {}, // 品名id和名称对应关系 productNames: {}, // 品名id和名称对应关系
couponAvailableGroupDtoList: [], // 可用优惠 couponAvailableGroupDtoList: [], // 可用优惠
...@@ -771,7 +774,7 @@ export default { ...@@ -771,7 +774,7 @@ export default {
currencyId: this.form.otherFeeCurrencyId, currencyId: this.form.otherFeeCurrencyId,
amount: Decimal(this.form.otherFee) amount: Decimal(this.form.otherFee)
} }
// 如果保价费跟其他费用是同一种货币(都是美元) // 如果保价费跟其他费用是同一种货币(都是美元)
if(!withInsuranceFee && this.fee && this.fee.insuranceFee && this.form.otherFeeCurrencyId == 1){ if(!withInsuranceFee && this.fee && this.fee.insuranceFee && this.form.otherFeeCurrencyId == 1){
fee.amount = fee.amount.plus(this.fee.insuranceFee) fee.amount = fee.amount.plus(this.fee.insuranceFee)
...@@ -780,7 +783,7 @@ export default { ...@@ -780,7 +783,7 @@ export default {
arr.push(fee) arr.push(fee)
} }
return arr return arr
}, },
...@@ -823,7 +826,7 @@ export default { ...@@ -823,7 +826,7 @@ export default {
})) }))
} }
this.getOpenedRouterList() this.getOpenedRouterList()
// 更换运输方式之后,之前选择的路线会失效,需要重新选择 // 更换运输方式之后,之前选择的路线会失效,需要重新选择
if(oldTransportId && oldTransportId != transportId && transportId != this.selectedRouter?.transportType){ if(oldTransportId && oldTransportId != transportId && transportId != this.selectedRouter?.transportType){
console.log('重置路线',oldTransportId, transportId, this.selectedRouter?.transportType) console.log('重置路线',oldTransportId, transportId, this.selectedRouter?.transportType)
...@@ -840,13 +843,13 @@ export default { ...@@ -840,13 +843,13 @@ export default {
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
} }
this.$nextTick(() => { this.$nextTick(() => {
this.calculationPrice('form.lineId') this.calculationPrice('form.lineId')
}) })
}, },
'form.transportVO.packageTypeArr'(val){ 'form.transportVO.packageTypeArr'(val){
this.$set(this.form.transportVO, 'packageType', val.join(',')) this.$set(this.form.transportVO, 'packageType', (val || []).join(','))
}, },
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择 // 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){ selectedRouter(val){
...@@ -982,6 +985,8 @@ export default { ...@@ -982,6 +985,8 @@ export default {
if(this.form.channelId){ if(this.form.channelId){
params.channelId = this.form.channelId params.channelId = this.form.channelId
} }
// 如果没有任何条件,不请求接口
if(!params.startCityId && !params.destCityId && !params.transportType && !params.channelId) return false
getOpenedRouterList(params).then(res => this.routerList = res.data) getOpenedRouterList(params).then(res => this.routerList = res.data)
}, },
// 计算体积 // 计算体积
...@@ -1035,6 +1040,14 @@ export default { ...@@ -1035,6 +1040,14 @@ export default {
}) })
// 添加的提交 // 添加的提交
createOffer(data).then(response => { createOffer(data).then(response => {
// 重置表单内容
this.$set(this, 'form', {...createDefaultForm()})
this.routerList = []
this.$nextTick(() => {
console.log('清理表单校验和路线')
this.addProduct()
this.$refs.form.clearValidate()
})
this.$modal.msgSuccess(this.$t("新增成功")); this.$modal.msgSuccess(this.$t("新增成功"));
this.$redirect('index') this.$redirect('index')
}); });
......
...@@ -310,7 +310,7 @@ export default { ...@@ -310,7 +310,7 @@ export default {
}) })
.then(res => { .then(res => {
this.$message.success('操作成功') this.$message.success('操作成功')
this.handleQuery() this.getList()
}) })
}, },
// 批量复核 // 批量复核
...@@ -319,7 +319,7 @@ export default { ...@@ -319,7 +319,7 @@ export default {
return batchReview("orderIds=" + this.ids.join(',')) return batchReview("orderIds=" + this.ids.join(','))
}).then(() => { }).then(() => {
this.$message.success(this.$t('操作成功')) this.$message.success(this.$t('操作成功'))
this.handleQuery() this.getList()
}) })
}, },
cargoTransfer(row){ cargoTransfer(row){
...@@ -333,15 +333,15 @@ export default { ...@@ -333,15 +333,15 @@ export default {
}, },
onReleaseSuccess(){ onReleaseSuccess(){
this.showReleaseOrderId = null this.showReleaseOrderId = null
this.handleQuery() this.getList()
}, },
onFallbackSuccess(){ onFallbackSuccess(){
this.showFallbackOrder = null this.showFallbackOrder = null
this.handleQuery() this.getList()
}, },
onTransferCargoSuccess(){ onTransferCargoSuccess(){
this.showTransferCargoOrderId = null this.showTransferCargoOrderId = null
this.handleQuery() this.getList()
} }
} }
}; };
......
<template>
<el-dialog :visible="true" title="日志详情" :before-close="closeDialog">
<el-form label-width="100px">
<el-form-item label="ID">{{detail.id}}</el-form-item>
<el-form-item :label="$t('时间')">{{detail.createTime|parseTime}}</el-form-item>
<el-form-item :label="$t('操作人')">{{detail.creatorName}}【ID: {{detail.creator}}</el-form-item>
<el-form-item :label="$t('操作人类型')">{{detail.userType == 2 ? $t('管理员') : $t('会员')}}</el-form-item>
<el-form-item :label="$t('操作描述')">{{detail.msg}}</el-form-item>
<el-form-item :label="$t('操作类型')">{{detail.type}}</el-form-item>
<el-form-item :label="$t('请求地址')">{{detail.requestUrl}}</el-form-item>
<el-form-item :label="$t('请求备注')">{{detail.note}}</el-form-item>
<el-form-item :label="$t('请求内容')">{{detail.body}}</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import {getOperateLogDetail} from "@/api/ecw/order";
import {parseTime} from '@/utils/ruoyi'
export default {
name: "OperateLogDetail",
filters: {parseTime},
props:{
logId: Number
},
data(){
return {
detail: null
}
},
created() {
this.$nextTick(this.getDetail)
},
methods:{
getDetail(){
getOperateLogDetail(this.logId).then(res => {
this.detail = res.data
})
},
closeDialog(){
this.$emit('close')
}
}
}
</script>
<style scoped>
</style>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<send-sms-code :order-id="detail.orderId" scene="5" /> <send-sms-code :order-id="detail.orderId" scene="5" />
</el-form-item> </el-form-item>
<el-form-item label="" style="margin-top:20px"> <el-form-item label="" style="margin-top:20px">
<el-button type="success" @click="submit">{{$t('确认货')}}</el-button> <el-button type="success" @click="submit">{{$t('确认货')}}</el-button>
<el-button type="default" @click="closeDialog">{{$t('关闭')}}</el-button> <el-button type="default" @click="closeDialog">{{$t('关闭')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
this.$emit('success') this.$emit('success')
}) })
}) })
} }
} }
...@@ -205,4 +205,4 @@ export default { ...@@ -205,4 +205,4 @@ export default {
::v-deep .release-table .el-form-item__error{ ::v-deep .release-table .el-form-item__error{
position: static; position: static;
} }
</style> </style>
\ No newline at end of file
<script> <script>
// 对edit组件复用并更名,防止keepalive缓存数据 // 对edit组件复用并更名,防止keepalive缓存数据
import edit from './edit.vue' import edit from './edit.vue'
edit.name = 'OrderCreate' edit.name = 'EcwOrderCreate'
export default edit export default edit
</script> </script>
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<template v-else-if="order.containerNumber"> - {{order.containerNumber}}</template> <template v-else-if="order.containerNumber"> - {{order.containerNumber}}</template>
</div> </div>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12" v-if="order.consignorVO"> <el-col :span="12" v-if="order.consignorVO" >
<el-descriptions class="margin-top" border :title="$t('发货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}"> <el-descriptions class="margin-top" border :title="$t('发货人')" :column="3" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('中文名称')">{{order.consignorVO.name}}</el-descriptions-item> <el-descriptions-item :label="$t('中文名称')">{{order.consignorVO.name}}</el-descriptions-item>
<!-- v1.7新增 --> <!-- v1.7新增 -->
...@@ -278,7 +278,11 @@ ...@@ -278,7 +278,11 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('费用明细')" name="four"> <el-tab-pane :label="$t('费用明细')" name="four">
<el-table :data="feeList"> <el-table :data="feeList">
<el-table-column :label="$t('订单号')" prop="orderNo"></el-table-column> <el-table-column :label="$t('订单号')" prop="orderNo">
<template slot-scope="{row}">
{{row.orderNo}}
</template>
</el-table-column>
<el-table-column :label="$t('运输方式')"> <el-table-column :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-table-column> </el-table-column>
...@@ -297,6 +301,11 @@ ...@@ -297,6 +301,11 @@
{{$l(row, 'title')}} {{$l(row, 'title')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('费用来源')" prop="feeSource">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_FEE_SOURCE" :value="row.feeSource" />
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" prop="num"> <el-table-column :label="$t('箱数')" prop="num">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.num || '-'}} {{row.num || '-'}}
...@@ -355,6 +364,11 @@ ...@@ -355,6 +364,11 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" prop="note">
<template slot-scope="{row}">
<el-link type="primary" @click="showLogDetailId=row.id">{{$t('详情')}}</el-link>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -427,7 +441,11 @@ ...@@ -427,7 +441,11 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
<!--日志详情-->
<operate-log-detail v-if="showLogDetailId" :log-id="showLogDetailId" @close="showLogDetailId=null"></operate-log-detail>
</div> </div>
</template> </template>
<script> <script>
...@@ -445,9 +463,11 @@ import {getProductBrank} from '@/api/ecw/productBrank' ...@@ -445,9 +463,11 @@ import {getProductBrank} from '@/api/ecw/productBrank'
import { parseTime } from '@/utils/ruoyi'; import { parseTime } from '@/utils/ruoyi';
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect" import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {checkPermi} from '@/utils/permission' import {checkPermi} from '@/utils/permission'
import OperateLogDetail from "@/views/ecw/order/components/OprateLogDetail";
export default { export default {
name: "detail", name: "detail",
components: { components: {
OperateLogDetail,
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect
}, },
filters: { filters: {
...@@ -492,6 +512,7 @@ export default { ...@@ -492,6 +512,7 @@ export default {
showText:this.$t('显示更多'), showText:this.$t('显示更多'),
showMore:false, showMore:false,
consigneeText:this.$t('更多'), consigneeText:this.$t('更多'),
showLogDetailId: null, // 显示日志详情的ID
} }
}, },
computed:{ computed:{
......
...@@ -115,9 +115,31 @@ ...@@ -115,9 +115,31 @@
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input> <el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item> </el-form-item>
<select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px" :disabled2="inWarehouse"> <select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px" :disabled2="inWarehouse">
<option v-for="item in routerList" :value="item.id" :key="item.id">{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}</option> <option v-for="item in routerList" :value="item.id" :key="item.id">
{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}
(<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportType"></dict-tag>)
</option>
</select> </select>
</div> </div>
<!--目的港清关:选择专线空运才显示,默认选中我司
我司选中后,按钮下方显示“多票”和“单票”的操作,默认选中多票。
客户选中后,按钮下方显示“单票”的操作,默认选中,无需点击-->
<div class="form-section" v-if="form.transportId == 3">
<el-form-item :label="$t('目的港清关')">
<el-radio-group v-model="form.portDestCustomsClear">
<el-radio :label="1">{{$t('我司')}}</el-radio>
<el-radio :label="2">{{$t('客户')}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="form-section" v-if="form.transportId == 3">
<el-form-item :label="$t('发货方式')">
<el-radio-group v-model="form.deliveryWay">
<el-radio :label="1" v-if="form.portDestCustomsClear == 1">{{$t('多票')}}</el-radio>
<el-radio :label="2">{{$t('单票')}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
</el-card> </el-card>
<el-card class="mt-10"> <el-card class="mt-10">
<div slot="header" class="card-title"> <div slot="header" class="card-title">
...@@ -443,7 +465,7 @@ ...@@ -443,7 +465,7 @@
<dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" defaultable :disabled="false" /> <dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" defaultable :disabled="false" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('清关证书备注')" > <el-form-item :label="$t('清关证书备注')" >
<el-input v-model="form.remarks" :disabled="false"></el-input> <el-input v-model="form.customsClearCertRemarks" :disabled="false"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div v-if="[3,4].indexOf(+form.transportId) > -1"> <div v-if="[3,4].indexOf(+form.transportId) > -1">
...@@ -552,7 +574,19 @@ import WorkFlow from '@/components/WorkFlow' ...@@ -552,7 +574,19 @@ import WorkFlow from '@/components/WorkFlow'
import { getCustomer } from "@/api/ecw/customer"; import { getCustomer } from "@/api/ecw/customer";
// 缓存默认的表单数据 // 缓存默认的表单数据
let defaultFormData = null let makeDefaultFormData = () => {
return {
status:0,
sendstatus:0,
isCargoControl: false,
isCollection: false,
type:[],
isExternalWarehouse: false,
externalWarehouseDtoList:[],
orderItemVOList:[],
drawee: 2
}
}
window.Decimal = Decimal window.Decimal = Decimal
export default { export default {
...@@ -592,17 +626,7 @@ export default { ...@@ -592,17 +626,7 @@ export default {
couponTypeList: [], couponTypeList: [],
fee: {}, // 费用 fee: {}, // 费用
// 表单参数 // 表单参数
form: { form: makeDefaultFormData(),
status:0,
sendstatus:0,
isCargoControl: false,
isCollection: false,
type:[],
isExternalWarehouse: false,
externalWarehouseDtoList:[],
orderItemVOList:[],
drawee: 2
},
ccIdArr: [], ccIdArr: [],
// 表单校验 // 表单校验
labelStyle: 'width:120px', labelStyle: 'width:120px',
...@@ -817,6 +841,11 @@ export default { ...@@ -817,6 +841,11 @@ export default {
this.$set(this.form, 'channelId', null) this.$set(this.form, 'channelId', null)
} }
// 如果是专线空运默认目的港清关选择我司
if(transportId == 3){
this.$set(this.form, 'portDestCustomsClear', 1)
}
this.getOpenedRouterList() this.getOpenedRouterList()
}, },
'form.channelId'(){ 'form.channelId'(){
...@@ -829,6 +858,7 @@ export default { ...@@ -829,6 +858,7 @@ export default {
} }
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
this.$set(this.form, 'transportId', router.transportType)
this.calculationPrice() this.calculationPrice()
}, },
...@@ -860,6 +890,17 @@ export default { ...@@ -860,6 +890,17 @@ export default {
this.$set(this.form, 'drawee', isCargoControl ? 2 : 2) this.$set(this.form, 'drawee', isCargoControl ? 2 : 2)
} }
}, },
// 目的港清关,1我司,2客户
'form.portDestCustomsClear'(portDestCustomsClear){
// 我司默认多票
if(portDestCustomsClear == 1){
this.$set(this.form, 'deliveryWay', 1)
}
// 客户默认单票
if(portDestCustomsClear == 2){
this.$set(this.form, 'deliveryWay', 2)
}
},
/* 'form.orderItemVOList'(){ /* 'form.orderItemVOList'(){
console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList) console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList)
}, */ }, */
...@@ -888,7 +929,6 @@ export default { ...@@ -888,7 +929,6 @@ export default {
} }
}, },
async created() { async created() {
defaultFormData = Object.assign({}, this.form)
this.productAttrList = (await getProductAttrList()).data this.productAttrList = (await getProductAttrList()).data
this.channelList = (await getChannelList()).data this.channelList = (await getChannelList()).data
...@@ -1056,7 +1096,7 @@ export default { ...@@ -1056,7 +1096,7 @@ export default {
// 检查正整数 // 检查正整数
checkPositiveInterge(row, field){ checkPositiveInterge(row, field){
console.log('checkPositiveInterge', field, row[field]) console.log('checkPositiveInterge', field, row[field])
row[field] = row[field].replace(/[^\d]/g, '') row[field] = row[field].toString().replace(/[^\d]/g, '')
}, },
onProductChange(row, product){ onProductChange(row, product){
console.log(product) console.log(product)
...@@ -1103,6 +1143,8 @@ export default { ...@@ -1103,6 +1143,8 @@ export default {
if(this.form.transportId){ if(this.form.transportId){
params.transportType = this.form.transportId params.transportType = this.form.transportId
} }
// 始发,目的和运输方式都没有的时候不获取
if(!params.startCityId && !params.destCityId && !params.transportType) return false
getOpenedRouterList(params).then(res => this.routerList = res.data.filter(item => { getOpenedRouterList(params).then(res => this.routerList = res.data.filter(item => {
return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1 return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1
})) }))
...@@ -1194,10 +1236,15 @@ export default { ...@@ -1194,10 +1236,15 @@ export default {
this.$modal.msgSuccess(this.$t("新增成功")); this.$modal.msgSuccess(this.$t("新增成功"));
// 重置数据 // 重置数据
this.form = {...defaultFormData} this.form = {...makeDefaultFormData()}
this.$refs.form.clearValidate() this.routerList = []
this.addProduct()
this.$nextTick(() =>{
this.$refs.form.clearValidate()
this.$redirect('success?orderId=' + response.data)
})
this.$redirect('success?orderId=' + response.data)
}); });
}); });
}, },
......
...@@ -85,13 +85,6 @@ ...@@ -85,13 +85,6 @@
<el-option :label="$t('自有仓')" :value="0"></el-option> <el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label=""> <el-form-item label="">
......
<!--空运待出列表-->
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item :label="$t('编号')" prop="orderNo">
<el-input v-model="queryParams.numberKey" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" :filter="(item) => item.value != 'PickTime'" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handleQuery"
>
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<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('目的仓')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的仓')" clearable @change="handleQuery">
<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('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery"/>
</el-form-item>-->
<el-form-item :label="$t('商品')" prop="tidanNo">
<el-input v-model="queryParams.prodKey" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('控货')" prop="isCargoControl">
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable />
</el-form-item>
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehouseType" clearable/>
</el-form-item>
<el-form-item :label="$t('客户经理')" >
<user-selector manage v-model="queryParams.salesmanId" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('是否齐货')" >
<!--// 字段存疑-->
<dict-selector v-model="queryParams.isNeat" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('备案属性')" prop="productRecord">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('快递单号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('快递单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('外部仓')" prop="number">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option :label="$t('外部仓')" :value="1"></el-option>
<el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('异常状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_ABNORMAL_STATE" v-model="queryParams.abnormalState"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('审核状态')" prop="status">
<dict-selector :type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE" v-model="queryParams.auditType"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="$alert('//TODO')" v-hasPermi="['ecw:order:peddingList:batch_avail4shpiing']">{{$t('批量可出')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="$alert('//TODO')" v-hasPermi="['ecw:order:peddingList:batch_exception']">{{$t('批量转异')}}</el-button>
</el-col>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope">
<router-link :to="{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
<span>{{ scope.row.orderNo }}</span>
</router-link>
<div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType">
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.label[0]}}</el-button>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('总箱数/入仓箱数')" align="center" prop="sumNum">
<template slot-scope="{row}">
<div :style="{color:row.customsType != 1 ? 'red' : null}">{{row.totalNum}}{{$t('')}}/{{row.sumNum}}{{$t('')}}</div>
<dict-tag v-if="row.customsType != 1" style="color:red" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="row.customsType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
<template slot-scope="{row}">
<!--入仓前是填单数据,入仓后是入仓数据,装柜审核通过等状态inwarehouseState会变成0,所以只能通过sumNum来判断-->
<component
:is="row.orderType == 2 ? 'el-tooltip' : 'div'"
class="item"
:style="{
color: row.orderType == 2 ? 'red' : null
}"
effect="dark"
:content="(row.wvolume||0)+'m³'"
placement="bottom">
<div v-if="row.sumNum > 0">{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</div>
<div v-else>{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</div>
</component>
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName">
<template slot-scope="{row}">
{{row.startWarehouseName}}
<span style="color:red" v-if="row.isExternalWarehouse">({{$t('外部仓')}})</span>
</template>
</el-table-column>
<el-table-column :label="$t('运输方式/目的地')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" /> / {{row.dstWarehouseName}}
</template>
</el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="isCargoControl">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl" />
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="center" prop="status">
<template slot-scope="scope">
<!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" /> -->
{{scope.row.statusMsg}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width actions" width="150px">
<template slot-scope="scope">
<el-button type="text" @click="$alert('// TODO')" v-hasPermi="['ecw:order:peddingList:avail4shpiing']">{{$t('可出')}}</el-button>
<el-button type="text" @click="printTagOrderId=scope.row.orderId" v-hasPermi="['ecw:order:peddingList:print_tag']">{{$t('打印标签')}}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
</div>
</template>
<script>
import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import {
createOrder,
updateOrder,
deleteOrder,
getOrder,
getOrderPage,
exportOrderExcel,
orderSpecialNeed,
cancelOrder,
recoveryOrder,
getMyOrderPage,
deptOrderPage,
orderStatistics,
orderMyStatistics,
orderDeptStatistics,
orderExportSearch,
orderExportMySearch,
orderExportDeptSearch,
exportAbnormal,
exportHeavyOrder,
exportReturnOrder,
exportSaleRepay,
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload
} from "@/api/ecw/order";
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
import BatchPickup from './components/BatchPickup'
import withdrawal from "@/views/ecw/order/withdrawal";
import UserSelector from '@/components/UserSelector'
import BatchSingleApplication from "@/views/ecw/order/batchSingleApplication";
import FeeApplication from "@/views/ecw/order/feeApplication";
import MergeLog from '@/views/ecw/order/components/MergeLog'
import PickupLog from './components/PickupLog'
import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
export default {
name: "EcwPeddingList",
components: {
UserSelector,
FeeApplication,
BatchSingleApplication,
MergeLog,
PickupLog,
SplitRevoke,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
data() {
return {
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 订单列表
list: [],
// 查询参数
queryParams: {
page: 1,
rows: 10
},
warehouseList:[],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
denominator: '', //重货比分母
dateFilterType: '', //日期筛选类别
dateFilter: [], //筛选日期
printTagOrderId: null, // 显示打印标签的订单ID
isShow:false,//特殊显示
multipleSelection:[],
params: {
page: 1,
rows: 20,
},
currencyList:[],
};
},
watch:{
isChinese(){
this.getList()
}
},
computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
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)
},
combinedQueryParams(){
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
let queryParams = Object.assign({}, this.queryParams, timeParams)
return queryParams
}
},
activated(){
this.getList()
},
created() {
this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getOrderPage(this.combinedQueryParams).then(response => {
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this.list = []
this.$nextTick(() => {
this.list = response.data.list
})
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.$nextTick(this.getList)
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
page: 1,
rows: 10
}
this.dateFilter = []
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push('create')
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('edit?id=' + row.orderId)
},
// 表格多选
handleSelectionChange(selection) {
this.multipleSelection = selection
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
}
}
};
</script>
<style lang="scss" scoped>
::v-deep .actions{
.el-dropdown{
margin-right: 10px;
&:last-child {
margin-right: 0;
}
}
}
</style>
...@@ -110,7 +110,25 @@ ...@@ -110,7 +110,25 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center"> <el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag> <!-- <el-button v-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType!='order_no_quote_exception'" v-hasPermi="['ecw:exception:seeExceptionInfo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button> -->
<el-button v-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_miss_exception'" v-hasPermi="['ecw:exception:miss']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_superfluous_goods_exception'" v-hasPermi="['ecw:exception:superfluousGoods']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_in_water_exception'" v-hasPermi="['ecw:exception:inWater']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_damage_exception'" v-hasPermi="['ecw:exception:damaged']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_heavy_cargo_exception'" v-hasPermi="['ecw:exception:heavyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_doc_exception'" v-hasPermi="['ecw:exception:doc']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_consignor_exception'" v-hasPermi="['ecw:exception:consignor']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_other_exception'" v-hasPermi="['ecw:exception:other']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_cod_exception'" v-hasPermi="['ecw:exception:cod']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-tag style="margin-left:10px" v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
<el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
......
...@@ -89,14 +89,14 @@ ...@@ -89,14 +89,14 @@
<!-- {{orderExceptionData.orderExceptionDescVO?orderExceptionData.orderExceptionDescVO.descZh:''}} --> <!-- {{orderExceptionData.orderExceptionDescVO?orderExceptionData.orderExceptionDescVO.descZh:''}} -->
{{$l(orderExceptionData.orderExceptionDescVO, 'desc')}} {{$l(orderExceptionData.orderExceptionDescVO, 'desc')}}
</el-form-item> </el-form-item>
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">{{ $t('新增收款单') }}</el-button> <el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'&&orderExceptionData.orderExceptionStatus!=2" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">{{ $t('新增收款单') }}</el-button>
</el-row> </el-row>
<el-row v-if="orderExceptionData.orderExceptionDetails"> <el-row v-if="orderExceptionData.orderExceptionDetails">
<el-form-item :label="$t('详细内容')+':'"> <el-form-item :label="$t('详细内容')+':'">
<span>{{orderExceptionData.orderExceptionDetails}}</span> <span>{{orderExceptionData.orderExceptionDetails}}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType=='goods_add_exception'"> <el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType!='goods_add_exception'">
<el-form-item :label="$t('收费参数')+':'"> <el-form-item :label="$t('收费参数')+':'">
<span>{{orderData.sumNum||0}}{{$t('')}} {{orderData.wvolume||0}}m³ {{orderData.vweight||0}}Kg {{orderData.sumQuantity||0}}{{$t('')}}</span> <span>{{orderData.sumNum||0}}{{$t('')}} {{orderData.wvolume||0}}m³ {{orderData.vweight||0}}Kg {{orderData.sumQuantity||0}}{{$t('')}}</span>
</el-form-item> </el-form-item>
...@@ -303,7 +303,7 @@ ...@@ -303,7 +303,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :span="12" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'"> <el-row :span="12" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'">
<el-form-item :label="$t('报关资料')+':'" size="medium" :require="true"> <el-form-item v-if="orderExceptionData.orderExceptionStatus!=2" :label="$t('报关资料')+':'" size="medium" :require="true">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.orderExceptionAttr" ></file-upload> <file-upload v-model="handlerParams.fileList" :value="orderExceptionData.orderExceptionAttr" ></file-upload>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
<!--预付异常的备选需要根据接口数据过滤--> <!--预付异常的备选需要根据接口数据过滤-->
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType=='not_customer_service_exception'"> <el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType=='not_customer_service_exception'">
<el-form-item :label="$t('处理结果')+':'" required> <el-form-item :label="$t('处理结果')+':'" required>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable> <el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"> <template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')">
<el-option :disabled="orderFee && orderFee.result && orderFee.result.indexOf(dict.value) ==-1" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/> <el-option :disabled="orderFee && orderFee.result && orderFee.result.indexOf(dict.value) ==-1" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</template> </template>
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
</el-row> </el-row>
<el-row v-else-if="orderExceptionData.orderExceptionType!='order_miss_exception'&&orderExceptionData.orderExceptionType!='order_superfluous_goods_exception'&&orderExceptionData.orderExceptionType!='order_in_water_exception'&&orderExceptionData.orderExceptionType!='order_damage_exception'"> <el-row v-else-if="orderExceptionData.orderExceptionType!='order_miss_exception'&&orderExceptionData.orderExceptionType!='order_superfluous_goods_exception'&&orderExceptionData.orderExceptionType!='order_in_water_exception'&&orderExceptionData.orderExceptionType!='order_damage_exception'">
<el-form-item :label="$t('处理结果')+':'" required> <el-form-item :label="$t('处理结果')+':'" required>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable @change="handlerResultChange"> <el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable @change="handlerResultChange" :disabled="orderExceptionData.orderExceptionStatus==2">
<template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"> <template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')">
<el-option :disabled="dict.value=='pending'" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/> <el-option :disabled="dict.value=='pending'" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</template> </template>
...@@ -349,6 +349,7 @@ ...@@ -349,6 +349,7 @@
> >
<product-selector <product-selector
:status="0" :status="0"
:disabled="orderExceptionData.orderExceptionStatus==2"
@hook:mounted="onTableMounted" @hook:mounted="onTableMounted"
v-model="productId2" v-model="productId2"
@change = "onProductChange($event)" @change = "onProductChange($event)"
...@@ -371,6 +372,7 @@ ...@@ -371,6 +372,7 @@
lang="En" lang="En"
:status="0" :status="0"
v-model="productId1" v-model="productId1"
:disabled="orderExceptionData.orderExceptionStatus==2"
@change = "onProductChange($event)" @change = "onProductChange($event)"
/> />
</el-form-item> </el-form-item>
...@@ -378,7 +380,7 @@ ...@@ -378,7 +380,7 @@
</div> </div>
<el-row v-if="orderExceptionData.orderExceptionType=='not_customer_service_exception'&&handlerParams.orderExceptionHandlerResult=='allocate'"> <el-row v-if="orderExceptionData.orderExceptionType=='not_customer_service_exception'&&handlerParams.orderExceptionHandlerResult=='allocate'">
<el-form-item :label="$t('移交客户经理')+':'" required> <el-form-item :label="$t('移交客户经理')+':'" required>
<el-select v-model="handlerParams.customerService" :placeholder="$t('请选择客户经理')" clearable> <el-select v-model="handlerParams.customerService" :placeholder="$t('请选择客户经理')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in customerServiceList" <el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/> :key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select> </el-select>
...@@ -387,7 +389,7 @@ ...@@ -387,7 +389,7 @@
<!-- 代收货款 时需要填写代收金额 --> <!-- 代收货款 时需要填写代收金额 -->
<el-row v-if="handlerParams.orderExceptionHandlerResult == 'cod'" > <el-row v-if="handlerParams.orderExceptionHandlerResult == 'cod'" >
<el-form-item :label="$t('代收金额')+':'" size="medium" required> <el-form-item :label="$t('代收金额')+':'" size="medium" required>
<el-input class="w-100" type="text" v-model="handlerParams.amount" /> <el-input class="w-100" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<!-- <el-select v-model="handlerParams.currency" clearable> <!-- <el-select v-model="handlerParams.currency" clearable>
<el-option v-for="dict in getDictDatas('shipping_price_unit') " <el-option v-for="dict in getDictDatas('shipping_price_unit') "
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
...@@ -398,8 +400,8 @@ ...@@ -398,8 +400,8 @@
<el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_pick_up_exception'&&handlerParams.orderExceptionHandlerResult=='cost_required'"> <el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_pick_up_exception'&&handlerParams.orderExceptionHandlerResult=='cost_required'">
<el-form-item :label="$t('送货费用')+':'" size="medium"> <el-form-item :label="$t('送货费用')+':'" size="medium">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" /> <el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2"/>
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable> <el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList " <el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/> :key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select> </el-select>
...@@ -407,14 +409,14 @@ ...@@ -407,14 +409,14 @@
</el-row> </el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType!='not_customer_service_exception'&&orderExceptionData.orderExceptionType!='goods_add_exception'"> <el-row :span="8" v-if="orderExceptionData.orderExceptionType!='not_customer_service_exception'&&orderExceptionData.orderExceptionType!='goods_add_exception'">
<el-form-item :label="$t('备注')+':'" size="medium"> <el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" /> <el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" :disabled="orderExceptionData.orderExceptionStatus==2" />
</el-form-item> </el-form-item>
</el-row> </el-row>
<div v-if="orderExceptionData.orderExceptionType=='order_miss_exception'||orderExceptionData.orderExceptionType=='order_superfluous_goods_exception'||orderExceptionData.orderExceptionType=='order_in_water_exception'||orderExceptionData.orderExceptionType=='order_damage_exception'"> <div v-if="orderExceptionData.orderExceptionType=='order_miss_exception'||orderExceptionData.orderExceptionType=='order_superfluous_goods_exception'||orderExceptionData.orderExceptionType=='order_in_water_exception'||orderExceptionData.orderExceptionType=='order_damage_exception'">
<el-row > <el-row >
<el-form-item :label="$t('状态')+':'"> <el-form-item :label="$t('状态')+':'">
<el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus"> <el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus" :disabled="orderExceptionData.orderExceptionStatus==2">
<el-radio label="1">{{$t('处理中')}}</el-radio> <el-radio label="1">{{$t('处理中')}}</el-radio>
<el-radio label="2">{{$t('已处理')}}</el-radio> <el-radio label="2">{{$t('已处理')}}</el-radio>
</el-radio-group> </el-radio-group>
...@@ -422,7 +424,7 @@ ...@@ -422,7 +424,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item :label="$t('处理结果')+':'" required v-if="handlerParams.orderExceptionStatus==2"> <el-form-item :label="$t('处理结果')+':'" required v-if="handlerParams.orderExceptionStatus==2">
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable> <el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_don_result')" <el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_don_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
...@@ -430,8 +432,8 @@ ...@@ -430,8 +432,8 @@
</el-row> </el-row>
<el-row > <el-row >
<el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="handlerParams.orderExceptionStatus==2"> <el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="handlerParams.orderExceptionStatus==2">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" /> <el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable> <el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList " <el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/> :key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select> </el-select>
...@@ -439,7 +441,7 @@ ...@@ -439,7 +441,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item :label="$t('查明原因')+':'" required v-if="handlerParams.orderExceptionStatus==1"> <el-form-item :label="$t('查明原因')+':'" required v-if="handlerParams.orderExceptionStatus==1">
<el-select v-model="handlerParams.orderExceptionHandlerResult" clearable> <el-select v-model="handlerParams.orderExceptionHandlerResult" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')" <el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
...@@ -449,7 +451,7 @@ ...@@ -449,7 +451,7 @@
</el-form> </el-form>
</el-card> </el-card>
<!-- 只有不需要预付才需要审核 --> <!-- 只有不需要预付才需要审核 -->
<template v-if="showWorkFlow"> <template v-if="showWorkFlow&&orderExceptionData.orderExceptionStatus!=2">
<div class="page-title">{{$t('审批流程')}}</div> <div class="page-title">{{$t('审批流程')}}</div>
<work-flow xmlkey="commission_config" v-model="handlerParams.ccIds" /> <work-flow xmlkey="commission_config" v-model="handlerParams.ccIds" />
</template> </template>
...@@ -463,6 +465,9 @@ ...@@ -463,6 +465,9 @@
<el-button plain type="primary" @click="cancelAudit">{{$t('取消审核')}}</el-button> <el-button plain type="primary" @click="cancelAudit">{{$t('取消审核')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button> <el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</template> </template>
<template v-else-if="orderExceptionData.orderExceptionStatus==2">
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</template>
<template v-else> <template v-else>
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button> <el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button> <el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
...@@ -480,7 +485,7 @@ ...@@ -480,7 +485,7 @@
import {getOrder} from '@/api/ecw/order' import {getOrder} from '@/api/ecw/order'
import FilePreview from '@/components/FilePreview' import FilePreview from '@/components/FilePreview'
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById} from "@/api/ecw/orderException" import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById,getOrderExcptionResult} from "@/api/ecw/orderException"
import {getFirstReceivableListByOrderId} from '@/api/ecw/financial' import {getFirstReceivableListByOrderId} from '@/api/ecw/financial'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {listByIds} from '@/api/ecw/region' import {listByIds} from '@/api/ecw/region'
...@@ -579,7 +584,6 @@ ...@@ -579,7 +584,6 @@
// this.productId1 = this.handlerParams.productId // this.productId1 = this.handlerParams.productId
// this.productId2 = this.handlerParams.productId // this.productId2 = this.handlerParams.productId
} }
console.log(this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId))
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId) return this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId)
} }
} }
...@@ -617,6 +621,9 @@ ...@@ -617,6 +621,9 @@
that.getOrderFeeByIdData() that.getOrderFeeByIdData()
that.getPreExceptionData() that.getPreExceptionData()
} }
if(that.orderExceptionData.orderExceptionStatus==2){
that.getOrderExcptionResult()
}
}); });
}, },
...@@ -636,10 +643,33 @@ ...@@ -636,10 +643,33 @@
this.customerData = res.data this.customerData = res.data
}) })
}, },
//获取异常结果
getOrderExcptionResult(){
getOrderExcptionResult({orderExceptionId:this.orderExceptionId}).then(res=>{
this.handlerParams = Object.assign(this.handlerParams,res.data.list[0])
if(!this.orderExceptionData.handlerTime){
this.orderExceptionData.handlerTime = this.handlerParams.handlerTime
}
if(this.handlerParams.handlerRemark){
this.$set(this.handlerParams,'orderExceptionHandlerRemark', this.handlerParams.handlerRemark)
}
if(this.handlerParams.handlerResult){
this.$set(this.handlerParams,'orderExceptionHandlerResult', this.handlerParams.handlerResult)
}
if(this.handlerParams.productId){
this.productId2 = this.productId1 = this.handlerParams.productId
}
})
},
getOrderFeeByIdData(){ getOrderFeeByIdData(){
getOrderFeeById({id:this.orderId}).then(response => { getOrderFeeById({id:this.orderId}).then(response => {
this.orderFee = response.data this.orderFee = response.data
this.handlerParams.orderExceptionHandlerResult = this.orderFee.result[0] this.handlerParams.orderExceptionHandlerResult = this.orderFee.result[0]
if(this.orderExceptionData.orderExceptionStatus==2){
this.getOrderExcptionResult()
}
}) })
}, },
getPreExceptionData(){ getPreExceptionData(){
...@@ -817,4 +847,7 @@ ...@@ -817,4 +847,7 @@
.red{ .red{
color: red; color: red;
} }
.el-select{
width:300px !important;
}
</style> </style>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
{{$t('数量')}}{{order.sumQuantity}}{{$t('')}} {{$t('数量')}}{{order.sumQuantity}}{{$t('')}}
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('货方式')"> <el-form-item :label="$t('货方式')">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.pickType" form-type="radio" formatter="number"></dict-selector> <dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.pickType" form-type="radio" formatter="number"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提货时间')" v-if="form.pickType == 1"> <el-form-item :label="$t('提货时间')" v-if="form.pickType == 1">
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-input v-model="form.remark" type="textarea" placeholder=""></el-input> <el-input v-model="form.remark" type="textarea" placeholder=""></el-input>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-button type="primary" @click="submit">{{$t('确认货')}}</el-button> <el-button type="primary" @click="submit">{{$t('确认货')}}</el-button>
<el-button type="default" @click="$router.back()">{{$t('取消')}}</el-button> <el-button type="default" @click="$router.back()">{{$t('取消')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -28,10 +28,16 @@ ...@@ -28,10 +28,16 @@
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('始发地')" > <el-descriptions-item :label="$t('始发地')" >
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:$t('')}} <template v-if="orderData.logisticsInfoDto">
{{$l(orderData.logisticsInfoDto, 'startTitle')}}
</template>
<template v-else>{{$t('')}}</template>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('目的地')" :span="2"> <el-descriptions-item :label="$t('目的地')" :span="2">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.destTitleZh:$t('')}} <template v-if="orderData.logisticsInfoDto">
{{$l(orderData.logisticsInfoDto, 'destTitle')}}
</template>
<template v-else>{{$t('')}}</template>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('发货人姓名')"> <el-descriptions-item :label="$t('发货人姓名')">
{{orderData.consignorVO?orderData.consignorVO.name||$t('无'):$t('无')}} {{orderData.consignorVO?orderData.consignorVO.name||$t('无'):$t('无')}}
...@@ -96,7 +102,8 @@ ...@@ -96,7 +102,8 @@
</el-row> </el-row>
<el-row v-if="scope.row.warehouseInInfoVO"> <el-row v-if="scope.row.warehouseInInfoVO">
<span>{{$t('品牌')}} <span>{{$t('品牌')}}
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" /> <template v-if="scope.row.brandName">{{scope.row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" />
</span> </span>
<span style="margin-left: 10px;">{{$t('箱数')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.cartonsNum}}</span> <span style="margin-left: 10px;">{{$t('箱数')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.cartonsNum}}</span>
<span style="margin-left: 10px;">{{$t('体积')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.volume}}m³</span> <span style="margin-left: 10px;">{{$t('体积')}}:{{!scope.row.warehouseInInfoVO?0:scope.row.warehouseInInfoVO.volume}}m³</span>
...@@ -137,8 +144,8 @@ ...@@ -137,8 +144,8 @@
<div> <div>
<el-button v-if="index==0" disabled type="primary" @click="addShop(index)">{{$t('放入')}}</el-button> <el-button v-if="index==0" disabled type="primary" @click="addShop(index)">{{$t('放入')}}</el-button>
<el-button v-if="index!=0" type="primary" @click="addShop(index)">{{$t('放入')}}</el-button> <el-button v-if="index!=0" type="primary" @click="addShop(index)">{{$t('放入')}}</el-button>
<el-button v-if="index==0" disabled type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button> <!--<el-button v-if="index==0" disabled type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button>-->
<el-button v-if="index!=0" type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button> <el-button :disabled="index < splitData.length - 1" type="primary" plain @click="deleteSplit(item.id)">{{$t('删除')}}</el-button>
</div> </div>
</div> </div>
<el-table v-if="item.orderSplitItemBackVOList" border :data="item.orderSplitItemBackVOList"> <el-table v-if="item.orderSplitItemBackVOList" border :data="item.orderSplitItemBackVOList">
...@@ -151,7 +158,8 @@ ...@@ -151,7 +158,8 @@
<el-table-column :label="$t('英文名')" align="center" prop="prodTitleEn" /> <el-table-column :label="$t('英文名')" align="center" prop="prodTitleEn" />
<el-table-column :label="$t('品牌')" align="center"> <el-table-column :label="$t('品牌')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" /> <template v-if="scope.row.brandName">{{scope.row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('入仓体积')" align="center" > <el-table-column :label="$t('入仓体积')" align="center" >
...@@ -182,17 +190,24 @@ ...@@ -182,17 +190,24 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center"> <el-table-column :label="$t('货值')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.num}}</span> <el-input v-model="scope.row.worth" @change="updateField(scope.row, 'worth')" size="mini" :disabled="index === 0">
</template> <span slot="append">{{ $t('美元') }}</span>
</el-table-column> </el-input>
<el-table-column :label="$t('操作')" align="center"> </template>
<template slot-scope="scope"> </el-table-column>
<el-button v-if="index==0" disabled size="mini" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">{{$t('移出')}}</el-button> <el-table-column :label="$t('箱数')" align="center">
<el-button v-else size="mini" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">{{$t('移出')}}</el-button> <template slot-scope="scope">
<span>{{scope.row.num}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope">
<el-button v-if="index==0" disabled size="mini" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">{{$t('移出')}}</el-button>
<el-button v-else size="mini" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">{{$t('移出')}}</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</el-card> </el-card>
...@@ -242,7 +257,7 @@ ...@@ -242,7 +257,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label2="$t('剩余箱数')" v-if="mainOrderItem.orderItemId"> <el-form-item :label2="$t('剩余箱数')" v-if="mainOrderItem.orderItemId">
剩余箱数{{ shopForm.sum || 0 }}<!--,可放入箱数:{{ mainOrderItem.num - 1 }}--> {{$t('剩余箱数')}}{{ shopForm.sum || 0 }}<!--,可放入箱数:{{ mainOrderItem.num - 1 }}-->
</el-form-item> </el-form-item>
<el-form-item :label="$t('放入箱数')"> <el-form-item :label="$t('放入箱数')">
<el-input-number v-model="shopForm.num" @change="numChange" controls-position="right" :min="1" :max="mainOrderItem.num"></el-input-number> <el-input-number v-model="shopForm.num" @change="numChange" controls-position="right" :min="1" :max="mainOrderItem.num"></el-input-number>
...@@ -272,7 +287,14 @@ ...@@ -272,7 +287,14 @@
<el-form-item :label="$t('收费重量')"> <el-form-item :label="$t('收费重量')">
<el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="mainOrderItem.chargeWeight"></el-input-number> <el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="mainOrderItem.chargeWeight"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item v-if="mainOrderItem.orderItemId">
<div>{{$t('剩余货值')}}:{{ mainOrderItem.worth || 0 }}{{ $t('美元') }}</div>
</el-form-item>
<el-form-item :label="$t('放货货值')">
<el-input-number v-model="shopForm.worth" controls-position="right" :min="0" :max="mainOrderItem.worth">
<template slot="append">{{ $t('美元') }}</template>
</el-input-number>
</el-form-item>
<el-form-item :label="$t('备注信息')+':'"> <el-form-item :label="$t('备注信息')+':'">
<el-input v-model="shopForm.remark"></el-input> <el-input v-model="shopForm.remark"></el-input>
</el-form-item> </el-form-item>
...@@ -302,16 +324,27 @@ ...@@ -302,16 +324,27 @@
<script> <script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict' import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import {getSplitList,splitApply,createSplit,cancelApply,createSplitItem,deleteSplitItem,deleteSplit,quantitycheck} from "@/api/ecw/orderHandle" import {
import {getWarehouseList} from '@/api/ecw/warehouse' getSplitList,
splitApply,
createSplit,
cancelApply,
createSplitItem,
deleteSplitItem,
deleteSplit,
deleteAllSplit
} from "@/api/ecw/orderHandle"
import {getWarehouseList, quantityRequired} from '@/api/ecw/warehouse'
import {getChannelList} from '@/api/ecw/channel' import {getChannelList} from '@/api/ecw/channel'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {getOrder, splitItemUpdate} from '@/api/ecw/order' import {getOrder, splitItemUpdate} from '@/api/ecw/order'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
import Template from "@/views/cms/template";
export default { export default {
name: "SplitApply", name: "SplitApply",
components: { components: {
Template,
WorkFlow WorkFlow
}, },
data() { data() {
...@@ -359,7 +392,7 @@ export default { ...@@ -359,7 +392,7 @@ export default {
quantitySum:0 quantitySum:0
}; };
}, },
created() { async created() {
this.getChannel() this.getChannel()
getWarehouseList().then(res => { getWarehouseList().then(res => {
this.tradeCityList = res.data this.tradeCityList = res.data
...@@ -368,8 +401,22 @@ export default { ...@@ -368,8 +401,22 @@ export default {
if (this.$route.query.orderId) { if (this.$route.query.orderId) {
this.queryParams.orderId = this.$route.query.orderId this.queryParams.orderId = this.$route.query.orderId
} }
this.getList() Promise.all([this.getList(), this.getOrder()]).then(res => {
this.getOrder() console.log("拆单数据", this.splitData, this.splitData.length)
if(this.orderData.inWarehouseState != 207 && this.splitData.length){
// 2023-05-20确认不需要询问,直接重置
deleteAllSplit(this.queryParams.orderId).then(res => {
this.getList()
})
/*this.$confirm(this.$t('已有拆单数据,是否要重置?')).then(res => {
return deleteAllSplit(this.queryParams.orderId)
}).then(res => {
this.getList()
this.$message.success("重置成功")
})*/
}
})
}, },
watch: { watch: {
//监听table这个对象 //监听table这个对象
...@@ -426,7 +473,7 @@ export default { ...@@ -426,7 +473,7 @@ export default {
} }
splitItemUpdate(row).then(() => { splitItemUpdate(row).then(() => {
this.$message.success(this.$t('修改成功')) this.$message.success(this.$t('修改成功'))
}).catch(() => { }).finally(() => {
this.getList() this.getList()
}) })
}, },
...@@ -448,7 +495,7 @@ export default { ...@@ -448,7 +495,7 @@ export default {
}, },
getOrder(){ getOrder(){
this.loading = true; this.loading = true;
getOrder(this.queryParams.orderId).then(response => { return getOrder(this.queryParams.orderId).then(response => {
this.orderData = response.data this.orderData = response.data
this.query.destWarehouseId = response.data.logisticsInfoDto.startWarehouseId this.query.destWarehouseId = response.data.logisticsInfoDto.startWarehouseId
this.loading = false this.loading = false
...@@ -459,7 +506,7 @@ export default { ...@@ -459,7 +506,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
// 执行查询 // 执行查询
getSplitList(this.queryParams).then(response => { return getSplitList(this.queryParams).then(response => {
this.splitData = response.data.orderSplitBackVOList this.splitData = response.data.orderSplitBackVOList
this.orderApprovalBackVO = response.data this.orderApprovalBackVO = response.data
...@@ -537,9 +584,16 @@ export default { ...@@ -537,9 +584,16 @@ export default {
}) })
// 2. 遍历商品项 对比数据是否符合 // 2. 遍历商品项 对比数据是否符合
let prods = [] // 数据不符合要求的商品 let prods = [] // 数据不符合要求的商品
// 挂在到window测试
window.orderData = this.orderData
this.orderData.orderItemVOList.forEach(item => { this.orderData.orderItemVOList.forEach(item => {
// 未入仓的不检查
if(!item.warehouseInInfoVO){
return
}
// 没拆单的不检查
if(!item.splitSum){ if(!item.splitSum){
prods.push(this.$l(item, 'prodTitle')) // prods.push(this.$l(item, 'prodTitle'))
return return
} }
if(item.splitSum.volume.toNumber() != item.warehouseInInfoVO.volume || item.splitSum.weight.toNumber() != item.warehouseInInfoVO.weight){ if(item.splitSum.volume.toNumber() != item.warehouseInInfoVO.volume || item.splitSum.weight.toNumber() != item.warehouseInInfoVO.weight){
...@@ -586,15 +640,15 @@ export default { ...@@ -586,15 +640,15 @@ export default {
this.shopForm.prodTitleEn = list[0].prodTitleEn this.shopForm.prodTitleEn = list[0].prodTitleEn
this.shopForm.prodTitleZh = list[0].prodTitleZh this.shopForm.prodTitleZh = list[0].prodTitleZh
var orderItemData = this.orderData.orderItemVOList.find(item=>item.orderItemId==this.shopForm.orderItemId) var orderItemData = this.orderData.orderItemVOList.find(item=>item.orderItemId==this.shopForm.orderItemId)
var params = { /*var params = {
'seaFreightVolume':orderItemData.seaFreightVolume, 'seaFreightVolume':orderItemData.seaFreightVolume,
'clearanceFreightVolume':orderItemData.clearanceFreightVolume 'clearanceFreightVolume':orderItemData.clearanceFreightVolume
} }
console.log(orderItemData) console.log(orderItemData)*/
this.numcheck(params) this.numcheck()
}, },
numcheck(params){ numcheck(){
quantitycheck(params).then(res=>{ quantityRequired(this.orderData.lineId).then(res=>{
this.quantityshow = res.data this.quantityshow = res.data
}) })
}, },
...@@ -608,14 +662,15 @@ export default { ...@@ -608,14 +662,15 @@ export default {
this.$set(this.shopForm, 'chargeVolume', (this.mainOrderItem.chargeVolume * rate).toFixed(2)) this.$set(this.shopForm, 'chargeVolume', (this.mainOrderItem.chargeVolume * rate).toFixed(2))
this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * rate).toFixed(2)) this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2)) this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2))
this.$set(this.shopForm, 'worth', (this.mainOrderItem.worth * rate).toFixed(2))
}, },
changeProdTitleEn(){ /*changeProdTitleEn(){
var list = [] var list = []
list = this.splitData[0].orderSplitItemBackVOList.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn) list = this.splitData[0].orderSplitItemBackVOList.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn)
this.shopForm.sum = list[0].num this.shopForm.sum = list[0].num
this.quantitySum = list[0].quantity this.quantitySum = list[0].quantity
this.shopForm.prodTitleZh = list[0].prodTitleZh this.shopForm.prodTitleZh = list[0].prodTitleZh
}, },*/
haddleAdd(){ haddleAdd(){
let that = this let that = this
if(!that.form.transportId){ if(!that.form.transportId){
...@@ -659,7 +714,11 @@ export default { ...@@ -659,7 +714,11 @@ export default {
volume: this.shopForm.volume, volume: this.shopForm.volume,
chargeVolume: this.shopForm.chargeVolume, chargeVolume: this.shopForm.chargeVolume,
weight: this.shopForm.weight, weight: this.shopForm.weight,
chargeWeight: this.shopForm.chargeWeight chargeWeight: this.shopForm.chargeWeight,
worth: this.shopForm.worth
}
if(this.quantityshow){
params.quantity = this.shopForm.quantity
} }
createSplitItem(params).then(res=>{ createSplitItem(params).then(res=>{
this.$message.success(this.$t("放入成功")); this.$message.success(this.$t("放入成功"));
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<div class="title">{{$t('新增订单生成成功')}}</div> <div class="title">{{$t('新增订单生成成功')}}</div>
<div class="line">{{$t('订单号')}}{{order.orderNo}}</div> <div class="line">{{$t('订单号')}}{{order.orderNo}}</div>
<div class="line">{{$t('运输方式')}}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" /></div> <div class="line">{{$t('运输方式')}}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" /></div>
<div class="line" v-if="order.channelName">{{$t('出货渠道')}}{{order.channelName}}</div>
<div class="line">{{$t('路线')}}{{$l(order.logisticsInfoDto, 'startTitle')}} >> {{$l(order.logisticsInfoDto, 'destTitle')}}</div> <div class="line">{{$t('路线')}}{{$l(order.logisticsInfoDto, 'startTitle')}} >> {{$l(order.logisticsInfoDto, 'destTitle')}}</div>
<div class="line">{{$t('商品列表')}} <div class="line">{{$t('商品列表')}}
<span v-for="(item, index) in order.orderItemVOList" :key="index"> <span v-for="(item, index) in order.orderItemVOList" :key="index">
......
...@@ -941,6 +941,12 @@ export default { ...@@ -941,6 +941,12 @@ export default {
} }
const form = val === 1 ? this.form1 : this.form const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/
form.table.push({ form.table.push({
"boxGauge1": this.isJiyun ? 0 : '', "boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '', "boxGauge2": this.isJiyun ? 0 : '',
...@@ -952,7 +958,8 @@ export default { ...@@ -952,7 +958,8 @@ export default {
"volume": '', "volume": '',
"weight": '', "weight": '',
specificationType: '1', specificationType: '1',
table: [] table: [],
orderLocationBackVOList
}) })
}, },
/** 获取产品属性列表 */ /** 获取产品属性列表 */
......
...@@ -88,36 +88,52 @@ ...@@ -88,36 +88,52 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('重货方数')" v-if="type=='order_heavy_cargo_exception'"> <el-table-column :label="$t('重货方数')" v-if="type=='order_heavy_cargo_exception'">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.weVolume||0}}CBM</span> <span>{{scope.row.chargeVolume||0}}CBM</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('泡货方数')" v-if="type!='order_heavy_cargo_exception'"> <el-table-column :label="$t('泡货方数')" v-if="type!='order_heavy_cargo_exception'">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.weVolume||0}}CBM</span> <span>{{scope.row.chargeVolume||0}}CBM</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('重货重量')" v-if="type=='order_heavy_cargo_exception'"> <el-table-column :label="$t('重货重量')" v-if="type=='order_heavy_cargo_exception'">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.voWeight||0}}KG</span> <span>{{scope.row.chargeWeight ||0}}KG</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('泡货重量')" v-if="type!='order_heavy_cargo_exception'" > <el-table-column :label="$t('泡货重量')" v-if="type!='order_heavy_cargo_exception'" >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.vweight||0}}KG</span> <span>{{scope.row.chargeWeight ||0}}KG</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('最后操作时间')" scope="handlerTime" /> <el-table-column :label="$t('最后操作时间')" scope="handlerTime" />
</el-table> </el-table>
</el-card>
<el-card v-if="list.orderExceptionStatus==2">
<div slot="header" class="card-title">{{$t('处理结果')}}</div>
<el-descriptions :column="1">
<el-descriptions-item :label="$t('处理时间')">
{{parseTime(handlerParams.handlerTime)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('处理结果')">
{{handlerParams.handlerResult=='general_cargo'?$t('设为普货'):$t('设为已处理')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">
{{handlerParams.handlerRemark||"无"}}
</el-descriptions-item>
</el-descriptions>
</el-card> </el-card>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<div> <div v-if="list.orderExceptionStatus!=2">
<el-button type="primary" @click="submit('general_cargo')">{{$t('设为普货')}}</el-button> <el-button type="primary" @click="submit('general_cargo')">{{$t('设为普货')}}</el-button>
<el-button plain type="primary" @click="submit('process')">{{$t('设为已处理')}}</el-button> <el-button plain type="primary" @click="submit('process')">{{$t('设为已处理')}}</el-button>
</div> </div>
<div v-else>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
</div> </div>
<el-form :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card"> <el-form v-if="list.orderExceptionStatus!=2" :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card">
<el-form-item :label="$t('备注')+':'" size="medium"> <el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" /> <el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
</el-form-item> </el-form-item>
...@@ -127,7 +143,7 @@ ...@@ -127,7 +143,7 @@
</template> </template>
<script> <script>
import {getExceptionById,handlerExceptionByExceptionId} from "@/api/ecw/orderException" import {getExceptionById,handlerExceptionByExceptionId,getOrderExcptionResult} from "@/api/ecw/orderException"
import {DICT_TYPE} from '@/utils/dict' import {DICT_TYPE} from '@/utils/dict'
import {getOrder} from '@/api/ecw/order' import {getOrder} from '@/api/ecw/order'
import {getProductBrankPage} from '@/api/ecw/productBrank' import {getProductBrankPage} from '@/api/ecw/productBrank'
...@@ -171,6 +187,9 @@ export default { ...@@ -171,6 +187,9 @@ export default {
getExceptionById(this.id).then(response => { getExceptionById(this.id).then(response => {
this.list = response.data; this.list = response.data;
this.loading = false; this.loading = false;
if(this.list.orderExceptionStatus==2){
this.getOrderExcptionResult()
}
this.getOrders() this.getOrders()
}); });
}, },
...@@ -178,6 +197,14 @@ export default { ...@@ -178,6 +197,14 @@ export default {
var brank = this.branklist.find(item=>item.id==id) var brank = this.branklist.find(item=>item.id==id)
return brank.titleZh||'' return brank.titleZh||''
}, },
//获取异常结果
getOrderExcptionResult(){
getOrderExcptionResult({orderExceptionId:this.id}).then(res=>{
this.handlerParams = res.data.list[0]
console.log(this.handlerParams)
})
},
checkCode(data){ checkCode(data){
if(data.indexOf('+')==-1){ if(data.indexOf('+')==-1){
return '+'+data return '+'+data
...@@ -219,7 +246,7 @@ export default { ...@@ -219,7 +246,7 @@ export default {
submit(result){ submit(result){
handlerExceptionByExceptionId({orderExceptionId:this.list.id,orderExceptionHandlerResult:result,orderExceptionHandlerRemark:this.handlerParams.orderExceptionHandlerRemark}).then(res=>{ handlerExceptionByExceptionId({orderExceptionId:this.list.id,orderExceptionHandlerResult:result,orderExceptionHandlerRemark:this.handlerParams.orderExceptionHandlerRemark}).then(res=>{
this.$modal.msgSuccess(this.$t("提交成功")); this.$modal.msgSuccess(this.$t("提交成功"));
this.$router.back() this.$store.dispatch('tagsView/delCurrentView')
}) })
} }
} }
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
</el-form-item> </el-form-item>
</template> </template>
</template> </template>
<!--特需--> <!--特需-->
<template v-if="form.priceType==1"> <template v-if="form.priceType==1">
<el-form-item <el-form-item
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
<selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
</template> </template>
<el-form-item :label="$t('价格有效期')"> <el-form-item :label="$t('价格有效期')">
<el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
<div>{{ $t('预付') }}<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.detail.needPay" /></div> <div>{{ $t('预付') }}<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.detail.needPay" /></div>
<div>{{ $t('单价模式') }}<dict-tag :type="DICT_TYPE.ECW_PRICE_TYPE" :value="row.detail.priceType" /></div> <div>{{ $t('单价模式') }}<dict-tag :type="DICT_TYPE.ECW_PRICE_TYPE" :value="row.detail.priceType" /></div>
<div v-if="row.detail.minWeight">{{ $t('最小起计量') }}{{ row.detail.minWeight }}{{unitMap[row.detail.minWeightUnit]}}</div> <div v-if="row.detail.minWeight">{{ $t('最小起计量') }}{{ row.detail.minWeight }}{{unitMap[row.detail.minWeightUnit]}}</div>
<!----阶梯定价--> <!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1"> <template v-if="row.detail.stepPrice == 1">
<template v-for="(item, index) in row.detail.priceStepList"> <template v-for="(item, index) in row.detail.priceStepList">
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
全包价: 全包价:
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}} {{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div> </div>
<template v-for="(item, index) in row.detail.specialList"> <template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1"> <template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" > <div :key="item.specialDictType + '_freight'" >
...@@ -384,7 +384,7 @@ export default { ...@@ -384,7 +384,7 @@ export default {
}) })
return map return map
} }
}, },
watch: { watch: {
showLogsDialog(showLogsDialog){ showLogsDialog(showLogsDialog){
...@@ -587,7 +587,7 @@ export default { ...@@ -587,7 +587,7 @@ export default {
warehouseLineDO: {... res.data[0]} warehouseLineDO: {... res.data[0]}
})] })]
}) })
} }
} }
...@@ -630,9 +630,9 @@ export default { ...@@ -630,9 +630,9 @@ export default {
"transportVolumeUnit": null, "transportVolumeUnit": null,
}) })
} }
}) })
}, },
methods: { methods: {
// 同步全部单位 // 同步全部单位
...@@ -735,7 +735,7 @@ export default { ...@@ -735,7 +735,7 @@ export default {
this.form.priceStepList.forEach(item => { this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit'] let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => { notEmptyFields.forEach(field => {
if(item[field].toString().trim() == ''){ if(!item[field] || item[field].toString().trim() == ''){
stepPriceEmpty = true stepPriceEmpty = true
} }
}) })
...@@ -744,7 +744,7 @@ export default { ...@@ -744,7 +744,7 @@ export default {
} }
}) })
if(stepPriceEmpty){ if(stepPriceEmpty){
return this.$message.error(this.$t('阶梯价格设置不能留空')) return this.$message.error(this.$t('阶梯价格设置不能留空'))
} }
} }
......
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