Commit 128cf6be authored by dragondean@qq.com's avatar dragondean@qq.com

完成备货打包

parent 63546fee
......@@ -85,8 +85,10 @@
prop="address"
:label="$t('操作')">
<template v-slot="{ row, column, $index }">
<el-button v-if="row.packStatus == 1" size="mini" type="warning" @click="noNeedPack(row)">{{$t('无需打包')}}</el-button>
<el-button v-if="row.packStatus == 1" size="mini" type="primary" @click="package(row, $t('打包'))">{{$t('打包')}}</el-button>
<template v-if="wareItemPackStatus(row.orderItemId) == 1">
<el-button size="mini" type="warning" @click="noNeedPack(row)">{{$t('无需打包')}}</el-button>
<el-button size="mini" type="primary" @click="package(row, $t('打包'))">{{$t('打包')}}</el-button>
</template>
<el-button v-else size="mini" type="primary" @click="package(row, $t('修改打包'))">{{$t('修改打包')}}</el-button>
</template>
</el-table-column>
......@@ -159,7 +161,7 @@
:order-item-b="packageWarehouseItem"
:title="packageTitle"
v-if="!!packageOrderItem"
@close="packageOrderItem=null;packageOrderItem=null"
@close="onPackageClose"
></package>
</div>
</template>
......@@ -313,13 +315,23 @@ export default {
},
// 完成备货
async handleSubmit() {
// TODO 判断是否有未完成打包
let unpackProds = []
this.orderItemList.forEach(item => {
if(item.packStatus == 1){
unpackProds.push(this.$l(item, 'prodTitle'))
}
})
if(unpackProds.length){
return this.$alert(`商品${unpackProds.join(',')}未完成打包,无法完成备货`, this.$t('提示'))
}
let form = {...this.form}
form.orderId = this.orderId
form.manualExceptionType = form.manualExceptionType.join(',')
finishStock(form).then(res => {
this.$message.success(this.$t('操作成功'))
return this.$alert(this.$t('操作成功'))
}).then(() => {
this.$tab.closePage()
})
},
// 显示打包弹层
......@@ -334,6 +346,11 @@ export default {
this.$message.success(this.$t('操作成功'))
})
},
onPackageClose(){
this.packageOrderItem=null;
this.packageOrderItem=null;
this.getOrderItemList()
}
},
watch: {
/*orderSpecialNeeds(val){
......
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