Commit b2cea61c authored by houjn@hikoon.cn's avatar houjn@hikoon.cn

Merge branch 'dev' of http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator into dev1.6

 Conflicts:
	src/views/ecw/messageLeave/index.vue
parents adf8c792 b35eb5d9
......@@ -448,32 +448,53 @@ export default {
this.isQuantity = false;
},
async changeProdTitleZh() {
const data = await this.getSelectData("zhId");
this.shopForm.enId = data.id;
const item = this.setShopForm("zhId");
this.shopForm.enId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
async changeProdTitleEn() {
const data = await this.getSelectData("enId");
this.shopForm.zhId = data.id;
const item = this.setShopForm("enId");
this.shopForm.zhId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
async getSelectData(key) {
setShopForm(key) {
let list = [];
list = this.orderItems.filter((item) => item.id == this.shopForm[key]);
this.shopForm.num = this.currRow.num - this.currRow.installNum;
const data = list[0];
const itemNum = data.num ?? 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;
}
this.shopForm.orderItemId = data.orderItemId;
this.shopForm.putNum = data.num ?? 0;
this.shopForm.quantity = data.quantity ?? 0;
this.shopForm.putQuantity = Decimal.div(
data.quantity ?? 0,
this.shopForm.num
).toFixed(0);
return data;
},
async getSelectData(item) {
await quantitycheck({
seaFreightVolume: data.seaFreightVolume,
clearanceFreightVolume: data.clearanceFreightVolume,
seaFreightVolume: item.seaFreightVolume,
clearanceFreightVolume: item.clearanceFreightVolume,
}).then((res) => {
if (res.data) {
this.isQuantity = true;
......@@ -489,7 +510,6 @@ export default {
delete this.shopRules.putQuantity;
}
});
return data;
},
shopAdd() {
this.$refs["shopForm"].validate((valid) => {
......
......@@ -20,7 +20,7 @@
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" label-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item>
......
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