diff --git a/src/views/business-data/pickDetail/pickTask.vue b/src/views/business-data/pickDetail/pickTask.vue
index ebb7859..7dddef2 100644
--- a/src/views/business-data/pickDetail/pickTask.vue
+++ b/src/views/business-data/pickDetail/pickTask.vue
@@ -65,6 +65,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 翻包拣货
+
+
+
@@ -132,6 +179,8 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker/index.vue'
+import crudKmres from "@/api/kmres";
+import curdApp, {fbPicking} from "@/api/app"
const defaultForm = {
id: null,
@@ -196,8 +245,32 @@ export default {
edit: ['admin', 'task:edit'],
del: ['admin', 'task:del']
},
- rules: {},
- items: []
+ rules: {
+ moveQty: [
+ {required: true, message: '拣货数量不能为空', trigger: 'blur'}
+ ],
+ dstOrderNumber: [
+ {required: true, message: '实拣箱号不能为空', trigger: 'blur'}
+ ],
+ dstStockCode: [
+ {required: true, message: '目标货架不能为空', trigger: 'blur'}
+ ],
+ },
+ items: [],
+ fbPickingForm: {
+ taskId: null,
+ srcStockCode: null,
+ itemCode: null,
+ itemName: null,
+ srcPointCode: null,
+ dstPointCode: null,
+ planQty: null,
+ srcOrderNumber: null,
+ dstOrderNumber: null,
+ moveQty: null,
+ dstStockCode: null
+ },
+ fbPickingDialog: false
}
},
mounted() {
@@ -239,7 +312,44 @@ export default {
},
filterTag(value, row) {
return row.taskStatus === value
- }
+ },
+ fbPicking(data) {
+ this.fbPickingForm.taskId = data.id
+ this.fbPickingForm.srcStockCode = data.srcStockCode
+ this.fbPickingForm.itemCode = data.itemKey.item.code
+ this.fbPickingForm.itemName = data.itemKey.item.name
+ this.fbPickingForm.srcPointCode = data.srcPointCode
+ this.fbPickingForm.dstPointCode = data.dstPointCode
+ this.fbPickingForm.planQty = data.planQty-data.moveQty
+ this.fbPickingForm.moveQty = data.planQty //默认拣货数量为计划数量
+ this.fbPickingForm.srcOrderNumber = data.itemKey.orderNumber
+ this.fbPickingDialog = true
+ },
+ //翻包拣货
+ toFbPicking() {
+ this.$refs['fbPickingForm'].validate((valid) => {
+ if (valid) {
+ curdApp.fbPicking({
+ taskId: this.fbPickingForm.taskId,
+ srcStockCode: this.fbPickingForm.srcStockCode,
+ dstOrderNumber: this.fbPickingForm.dstOrderNumber,
+ moveQty: this.fbPickingForm.moveQty,
+ dstStockCode: this.fbPickingForm.dstStockCode
+ }).then(res => {
+ if (res.status == 200) {
+ this.fbPickingDialog = false
+ this.crud.notify('拣货成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
+ this.crud.toQuery()
+ this.fbPickingForm = {}
+ } else {
+ this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
+ }
+ })
+ } else {
+ return false
+ }
+ })
+ },
}
}