Commit b8f14291 authored by dragondean@qq.com's avatar dragondean@qq.com

理货转异

parent 0dbc6623
<template>
<el-dialog :title="orderNo + $t('订单转异')" center :visible.sync="show" v-bind="$attrs">
<el-form label-position="top" label-width="200" ref="exceptionForm" :model="form" :rules="exceptionRules">
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="form.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="form.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleException">{{$t('确认转异')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</template>
<script>
import imageUpload from "@/components/ImageUpload/index.vue";
import {batchException} from "@/api/ecw/order";
export default {
components: {imageUpload},
props:{
orderNo:{
type: String,
},
orderId:{
type: Number,
}
},
data(){
return {
show: false,
form: {
manualExceptionType: [],
exceptionUrls: [],
descZh: ''
},
exceptionRules:{}
}
},
async created(){
this.$nextTick()
this.show = true
},
methods:{
cancel(){
this.show = false
this.$emit('cancel');
},
handleException(){
if(!this.form.manualExceptionType.length){
return this.$message.error(this.$t('请选择异常类型'))
}
batchException({
orderIds: [this.orderId],
manualExceptionType: this.form.manualExceptionType.join(","),
exceptionUrls: this.form.exceptionUrls.split(","),
descZh: this.form.descZh
}).then(res=>{
this.$message.success(this.$t('操作成功'));
this.show = false
this.$emit('success');
})
}
}
}
</script>
<style scoped lang="scss">
</style>
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="shipmentObj.approvaling" type="text" size="small" @click="tallyClick('single',scope.row)">{{$t('理货')}}</el-button> <el-button :disabled="shipmentObj.approvaling" type="text" size="small" @click="tallyClick('single',scope.row)">{{$t('理货')}}</el-button>
<el-button :disabled="shipmentObj.approvaling" type="text" size="small" @click="removeClick('single',scope.row)">{{$t('移出')}}</el-button> <el-button :disabled="shipmentObj.approvaling" type="text" size="small" @click="removeClick('single',scope.row)">{{$t('移出')}}</el-button>
<el-button type="text" size="small" @click="currentTurnExceptionOrder=scope.row">{{$t('转异')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -112,6 +113,13 @@ ...@@ -112,6 +113,13 @@
<batchTally v-if="dialogConfig.dialogVisible" v-bind="$attrs" @closeDialog="closeDialog" :type="dialogConfig.type" :tallyRows="tallyRows" :shipmentObj="shipmentObj" /> <batchTally v-if="dialogConfig.dialogVisible" v-bind="$attrs" @closeDialog="closeDialog" :type="dialogConfig.type" :tallyRows="tallyRows" :shipmentObj="shipmentObj" />
</el-dialog> </el-dialog>
<warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" /> <warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" />
<exception
v-if="currentTurnExceptionOrder"
:orderNo="currentTurnExceptionOrder.orderNo"
:orderId="currentTurnExceptionOrder.orderId"
append-to-body
@cancel="currentTurnExceptionOrder=null"
@success="currentTurnExceptionOrder=null" />
</div> </div>
</template> </template>
...@@ -121,11 +129,13 @@ import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea"; ...@@ -121,11 +129,13 @@ import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea";
import { formatDate, serviceMsg } from "../../utils"; import { formatDate, serviceMsg } from "../../utils";
import WarehouseDetail from "./warehouseDetail"; import WarehouseDetail from "./warehouseDetail";
import { getOrder } from "@/api/ecw/order"; import { getOrder } from "@/api/ecw/order";
import Exception from "@/views/ecw/box/components/Exception.vue";
export default { export default {
name: "tally", name: "tally",
inheritAttrs: false, inheritAttrs: false,
components: { components: {
Exception,
batchTally, batchTally,
WarehouseDetail, WarehouseDetail,
}, },
...@@ -149,6 +159,8 @@ export default { ...@@ -149,6 +159,8 @@ export default {
type: "", type: "",
fullscreen: false, fullscreen: false,
}, },
// 当前转异订单
currentTurnExceptionOrder: null
}; };
}, },
created() { created() {
......
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