Commit 7484b2e7 authored by 我在何方's avatar 我在何方

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

parents 6ed51a40 b63f7a0b
......@@ -59,7 +59,6 @@ export function deleteSplit(id) {
})
}
//取消申请拆单
export function cancelApply(data) {
return request({
url: '/order/split/cancel-apply',
......@@ -137,3 +136,12 @@ export function quantitycheck(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) {
})
}
// 数量是否必填
export function quantityRequired(lineId) {
return request({
url: '/ecw/warehouse/quantity/required/' + lineId,
method: 'get'
})
}
......@@ -87,6 +87,7 @@ service.interceptors.response.use(res => {
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
Message({
dangerouslyUseHTMLString: true,
message: msg,
type: 'error'
})
......
......@@ -271,10 +271,11 @@
<script>
import {
getSplitList,
quantitycheck,
// quantitycheck,
createSplitItem,
deleteSplitItem,
} from "@/api/ecw/orderHandle";
import {quantityRequired} from "@/api/ecw/warehouse";
import { getTradeCityList } from "@/api/ecw/region";
import WorkFlow from "@/components/WorkFlow";
import {getOrder, splitItemUpdate} from "@/api/ecw/order";
......@@ -614,10 +615,7 @@ export default {
return data;
},*/
async getSelectData(item) {
await quantitycheck({
seaFreightVolume: item.seaFreightVolume,
clearanceFreightVolume: item.clearanceFreightVolume,
}).then((res) => {
await quantityRequired(this.orderData.lineId).then((res) => {
if (res.data) {
this.isQuantity = true;
this.shopRules.putQuantity = [
......
......@@ -538,7 +538,10 @@ export default {
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
type: "warning",
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
remove({ ...params, deleteType: 2 }).then((res) => {
......@@ -547,12 +550,14 @@ export default {
});
});
})
.catch((_) => {
.catch(action => {
if(action =='cancel'){
remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
}
});
}
});
......
......@@ -246,6 +246,31 @@ export default {
serviceMsg(res, this).then(() => {
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,10 +287,63 @@ export default {
} else {
params.orderItemIdList = [item.orderItemId];
}
createGoods(params).then((res) => {
createGoods(params)
.then((res) => {
const { data } = res;
if (data.relationMsg) {
const msg = data.relationMsg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
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("提示"), {
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("提示"), {
type: "warning",
})
.then((_) => {
createGoods({ ...params, relationStatus: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
}
});
},
/* 增加部分 */
......
......@@ -747,7 +747,10 @@ export default {
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
type: "warning",
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
deleteGoods({ ...param, deleteType: 2 }).then((res) => {
......@@ -756,12 +759,14 @@ export default {
});
});
})
.catch((_) => {
.catch(action => {
if(action =='cancel'){
deleteGoods({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
}
});
}
});
......
......@@ -251,7 +251,10 @@ export default {
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
type: "warning",
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
tallyRemove({ ...param, deleteType: 2 }).then((res) => {
......@@ -260,12 +263,14 @@ export default {
});
});
})
.catch((_) => {
.catch(action => {
if(action =='cancel'){
tallyRemove({ ...param, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
}
});
}
});
......
......@@ -520,6 +520,16 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
import Decimal from 'decimal.js'
window.Decimal= Decimal
const createDefaultForm = () => {
return {
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
}
}
export default {
name: "EcwOfferEdit",
components: {
......@@ -542,14 +552,7 @@ export default {
// couponList: [],
fee: {}, // 费用
// 表单参数
form: {
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
},
form: {...createDefaultForm()},
// 表单校验
labelStyle: 'width:120px',
......@@ -846,7 +849,7 @@ export default {
})
},
'form.transportVO.packageTypeArr'(val){
this.$set(this.form.transportVO, 'packageType', val.join(','))
this.$set(this.form.transportVO, 'packageType', (val || []).join(','))
},
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){
......@@ -982,6 +985,8 @@ export default {
if(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)
},
// 计算体积
......@@ -1035,6 +1040,14 @@ export default {
})
// 添加的提交
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.$redirect('index')
});
......
......@@ -96,7 +96,8 @@
</el-row>
<el-row v-if="scope.row.warehouseInInfoVO">
<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 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>
......@@ -137,8 +138,8 @@
<div>
<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" 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 v-if="index==0" disabled 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>
<el-table v-if="item.orderSplitItemBackVOList" border :data="item.orderSplitItemBackVOList">
......@@ -151,7 +152,8 @@
<el-table-column :label="$t('英文名')" align="center" prop="prodTitleEn" />
<el-table-column :label="$t('品牌')" align="center">
<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>
</el-table-column>
<el-table-column :label="$t('入仓体积')" align="center" >
......@@ -242,7 +244,7 @@
</el-select>
</el-form-item>
<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 :label="$t('放入箱数')">
<el-input-number v-model="shopForm.num" @change="numChange" controls-position="right" :min="1" :max="mainOrderItem.num"></el-input-number>
......@@ -302,8 +304,17 @@
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import {getSplitList,splitApply,createSplit,cancelApply,createSplitItem,deleteSplitItem,deleteSplit,quantitycheck} from "@/api/ecw/orderHandle"
import {getWarehouseList} from '@/api/ecw/warehouse'
import {
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 WorkFlow from '@/components/WorkFlow'
import {getOrder, splitItemUpdate} from '@/api/ecw/order'
......@@ -359,7 +370,7 @@ export default {
quantitySum:0
};
},
created() {
async created() {
this.getChannel()
getWarehouseList().then(res => {
this.tradeCityList = res.data
......@@ -368,8 +379,18 @@ export default {
if (this.$route.query.orderId) {
this.queryParams.orderId = this.$route.query.orderId
}
Promise.all([this.getList(), this.getOrder()]).then(res => {
console.log("拆单数据", this.splitData, this.splitData.length)
if(this.orderData.inWarehouseState != 207 && this.splitData.length){
this.$confirm(this.$t('已有拆单数据,是否要重置?')).then(res => {
return deleteAllSplit(this.queryParams.orderId)
}).then(res => {
this.getList()
this.getOrder()
this.$message.success("重置成功")
})
}
})
},
watch: {
//监听table这个对象
......@@ -448,7 +469,7 @@ export default {
},
getOrder(){
this.loading = true;
getOrder(this.queryParams.orderId).then(response => {
return getOrder(this.queryParams.orderId).then(response => {
this.orderData = response.data
this.query.destWarehouseId = response.data.logisticsInfoDto.startWarehouseId
this.loading = false
......@@ -459,7 +480,7 @@ export default {
getList() {
this.loading = true;
// 执行查询
getSplitList(this.queryParams).then(response => {
return getSplitList(this.queryParams).then(response => {
this.splitData = response.data.orderSplitBackVOList
this.orderApprovalBackVO = response.data
......@@ -540,8 +561,13 @@ export default {
// 挂在到window测试
window.orderData = this.orderData
this.orderData.orderItemVOList.forEach(item => {
// 未入仓的不检查
if(!item.warehouseInInfoVO){
return
}
// 没拆单的不检查
if(!item.splitSum){
prods.push(this.$l(item, 'prodTitle'))
// prods.push(this.$l(item, 'prodTitle'))
return
}
if(item.splitSum.volume.toNumber() != item.warehouseInInfoVO.volume || item.splitSum.weight.toNumber() != item.warehouseInInfoVO.weight){
......@@ -588,15 +614,15 @@ export default {
this.shopForm.prodTitleEn = list[0].prodTitleEn
this.shopForm.prodTitleZh = list[0].prodTitleZh
var orderItemData = this.orderData.orderItemVOList.find(item=>item.orderItemId==this.shopForm.orderItemId)
var params = {
/*var params = {
'seaFreightVolume':orderItemData.seaFreightVolume,
'clearanceFreightVolume':orderItemData.clearanceFreightVolume
}
console.log(orderItemData)
this.numcheck(params)
console.log(orderItemData)*/
this.numcheck()
},
numcheck(params){
quantitycheck(params).then(res=>{
numcheck(){
quantityRequired(this.orderData.lineId).then(res=>{
this.quantityshow = res.data
})
},
......
......@@ -943,9 +943,10 @@ export default {
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({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
......
......@@ -735,7 +735,7 @@ export default {
this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => {
if(item[field].toString().trim() == ''){
if(!item[field] || item[field].toString().trim() == ''){
stepPriceEmpty = true
}
})
......@@ -744,7 +744,7 @@ export default {
}
})
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