'修改完成'
This commit is contained in:
@@ -25,7 +25,10 @@ import { bind, unBind } from "@/api/les/lesMaterialBind.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
formData: {
|
||||
locationCode: null,
|
||||
batchNo: null,
|
||||
},
|
||||
/** 校验规则 */
|
||||
rules: {
|
||||
locationCode: {
|
||||
@@ -75,6 +78,7 @@ export default {
|
||||
bind(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("绑定成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -102,7 +106,8 @@ export default {
|
||||
_this.$modal.loading('解绑中')
|
||||
unBind(_this.formData.locationCode).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("解绑成功!")
|
||||
_this.$modal.msgSuccess("解绑成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -118,9 +123,12 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// reset() {
|
||||
// this.formData = {};
|
||||
// }
|
||||
reset() {
|
||||
this.formData = {
|
||||
locationCode: null,
|
||||
batchNo: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -24,6 +24,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
srcLocationCode: null,
|
||||
destLocationCode: null,
|
||||
taskType: LesDeliveryTaskType.PRODUCTION
|
||||
},
|
||||
/** 校验规则 */
|
||||
@@ -46,7 +48,8 @@ export default {
|
||||
methods: {
|
||||
searchSrcLocation() {
|
||||
const _this = this;
|
||||
if (_this.formData.destLocationCode == '') {
|
||||
if (!_this.formData.destLocationCode) {
|
||||
_this.formData.srcLocationCode = null;
|
||||
return;
|
||||
}
|
||||
findPreparation(_this.formData.destLocationCode).then(res => {
|
||||
@@ -76,6 +79,7 @@ export default {
|
||||
addDeliveryTask(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("提交成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
_this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -86,11 +90,10 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// reset() {
|
||||
// const _this = this;
|
||||
// this.formData.srcLocationCode = '';
|
||||
// this.formData.destLocationCode = '';
|
||||
// }
|
||||
reset() {
|
||||
this.formData.srcLocationCode = null;
|
||||
this.formData.destLocationCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -5,12 +5,12 @@
|
||||
<uni-easyinput type="text" v-model="formData.srcLocationCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="目的点位:" :labelWidth='100' name="destLocationCode">
|
||||
<uni-easyinput type="text" v-model="formData.destLocationCode" />
|
||||
<uni-easyinput type="text" v-model="destLocationCode" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="机器人类型:" :labelWidth='100' name="RobotType">
|
||||
<uni-data-select placeholder="请选择机器类型" v-model="formData.RobotType" :localdata="RobotData" />
|
||||
<uni-forms-item label="机器人类型:" :labelWidth='100' name="robotType">
|
||||
<uni-data-select placeholder="请选择机器类型" v-model="formData.robotType" :localdata="RobotData" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="容器类型:" :labelWidth='100' name="ctnrTyp" v-if="formData.RobotType == 2">
|
||||
<uni-forms-item label="容器类型:" :labelWidth='100' name="ctnrTyp" v-if="formData.robotType == 2">
|
||||
<uni-easyinput type="text" v-model="formData.ctnrTyp" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
@@ -30,11 +30,22 @@ import RobotType from "@/utils/enums/RobotType";
|
||||
import { delivery, cancel } from "@/api/les/lesMaterialDelivery.js"
|
||||
export default {
|
||||
onLoad(option) {
|
||||
this.formData = JSON.parse(option.formData);
|
||||
const form = JSON.parse(option.formData);
|
||||
this.formData.taskTyp = form.taskType;
|
||||
this.formData.id = form.id;
|
||||
this.formData.srcLocationCode = form.srcLocationCode;
|
||||
this.destLocationCode = form.destLocationCode;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
formData: {
|
||||
id: null,
|
||||
srcLocationCode: null,
|
||||
taskTyp: null,
|
||||
robotType: null,
|
||||
ctnrTyp: null,
|
||||
},
|
||||
destLocationCode: null,
|
||||
RobotData: [
|
||||
{ value: RobotType.LATENT_MOBILE_ROBOT, text: "潜伏车" },
|
||||
{ value: RobotType.LATENT_FORKLIFT_AGV, text: "潜伏叉车" },
|
||||
@@ -47,12 +58,6 @@ export default {
|
||||
errorMessage: '请输入发货点位',
|
||||
}, ]
|
||||
},
|
||||
destLocationCode: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入目的货位',
|
||||
}, ]
|
||||
},
|
||||
RobotType: {
|
||||
rules: [{
|
||||
required: true,
|
||||
@@ -66,14 +71,14 @@ export default {
|
||||
handleDelivery() {
|
||||
const _this = this;
|
||||
this.$refs.form.validate().then(res => {
|
||||
if (_this.formData.srcLocationCode && _this.formData.destLocationCode) {
|
||||
if (_this.formData.srcLocationCode && this.formData.robotType) {
|
||||
_this.$modal.loading('提交中')
|
||||
delivery(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("提交成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/les/chooseTask");
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
})
|
||||
} else {
|
||||
@@ -97,7 +102,7 @@ export default {
|
||||
_this.$modal.msgSuccess("取消成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/les/chooseTask");
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
@@ -107,9 +112,16 @@ export default {
|
||||
});
|
||||
})
|
||||
},
|
||||
// reset() {
|
||||
// this.formData = {};
|
||||
// }
|
||||
reset() {
|
||||
this.formData = {
|
||||
id: null,
|
||||
srcLocationCode: null,
|
||||
taskTyp: null,
|
||||
robotType: null,
|
||||
ctnrTyp: null,
|
||||
};
|
||||
this.destLocationCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -25,6 +25,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
srcLocationCode: null,
|
||||
destLocationCode: null,
|
||||
taskType: LesDeliveryTaskType.PALLET_RECYCLING
|
||||
},
|
||||
/** 校验规则 */
|
||||
@@ -69,6 +71,7 @@ export default {
|
||||
addDeliveryTask(_this.formData).then(res => {
|
||||
_this.$modal.closeLoading();
|
||||
_this.$modal.msgSuccess("提交成功!");
|
||||
_this.reset();
|
||||
setTimeout(() => {
|
||||
this.$tab.switchTab("/pages/work/index");
|
||||
}, 500);
|
||||
@@ -78,11 +81,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// reset() {
|
||||
// const _this = this;
|
||||
// this.formData.srcLocationCode = '';
|
||||
// this.formData.destLocationCode = '';
|
||||
// }
|
||||
reset() {
|
||||
this.formData.srcLocationCode = null;
|
||||
this.formData.destLocationCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user