Commit 7b846879 authored by dragondean@qq.com's avatar dragondean@qq.com

更新拆单数量是否必填接口

parent 07ea6e83
......@@ -134,4 +134,10 @@ export function serviceConfig(data) {
})
}
// 数量是否必填
export function quantityRequired(lineId) {
return request({
url: '/ecw/warehouse/quantity/required/' + lineId,
method: 'get'
})
}
......@@ -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" >
......@@ -310,10 +312,9 @@ import {
createSplitItem,
deleteSplitItem,
deleteSplit,
quantitycheck,
deleteAllSplit
} from "@/api/ecw/orderHandle"
import {getWarehouseList} from '@/api/ecw/warehouse'
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'
......@@ -378,10 +379,9 @@ export default {
if (this.$route.query.orderId) {
this.queryParams.orderId = this.$route.query.orderId
}
await this.getList()
this.getOrder()
Promise.all([this.getList(), this.getOrder()]).then(res => {
console.log("拆单数据", this.splitData, this.splitData.length)
if(this.splitData.length){
if(this.orderData.inWarehouseState != 207 && this.splitData.length){
this.$confirm(this.$t('已有拆单数据,是否要重置?')).then(res => {
return deleteAllSplit(this.queryParams.orderId)
}).then(res => {
......@@ -389,6 +389,8 @@ export default {
this.$message.success("重置成功")
})
}
})
},
watch: {
//监听table这个对象
......@@ -467,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
......@@ -612,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
})
},
......
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