'修改完成'

This commit is contained in:
2025-12-22 09:48:01 +08:00
parent 23da00a8f0
commit 5868f8fab9
5 changed files with 63 additions and 38 deletions

View File

@@ -25,7 +25,10 @@ import { bind, unBind } from "@/api/les/lesMaterialBind.js";
export default { export default {
data() { data() {
return { return {
formData: {}, formData: {
locationCode: null,
batchNo: null,
},
/** 校验规则 */ /** 校验规则 */
rules: { rules: {
locationCode: { locationCode: {
@@ -75,6 +78,7 @@ export default {
bind(_this.formData).then(res => { bind(_this.formData).then(res => {
_this.$modal.closeLoading(); _this.$modal.closeLoading();
_this.$modal.msgSuccess("绑定成功!"); _this.$modal.msgSuccess("绑定成功!");
_this.reset();
setTimeout(() => { setTimeout(() => {
this.$tab.switchTab("/pages/work/index"); this.$tab.switchTab("/pages/work/index");
}, 500); }, 500);
@@ -102,7 +106,8 @@ export default {
_this.$modal.loading('解绑中') _this.$modal.loading('解绑中')
unBind(_this.formData.locationCode).then(res => { unBind(_this.formData.locationCode).then(res => {
_this.$modal.closeLoading(); _this.$modal.closeLoading();
_this.$modal.msgSuccess("解绑成功!") _this.$modal.msgSuccess("解绑成功!");
_this.reset();
setTimeout(() => { setTimeout(() => {
this.$tab.switchTab("/pages/work/index"); this.$tab.switchTab("/pages/work/index");
}, 500); }, 500);
@@ -118,9 +123,12 @@ export default {
}) })
}, },
// reset() { reset() {
// this.formData = {}; this.formData = {
// } locationCode: null,
batchNo: null,
};
}
} }
} }
</script> </script>

View File

@@ -24,6 +24,8 @@ export default {
data() { data() {
return { return {
formData: { formData: {
srcLocationCode: null,
destLocationCode: null,
taskType: LesDeliveryTaskType.PRODUCTION taskType: LesDeliveryTaskType.PRODUCTION
}, },
/** 校验规则 */ /** 校验规则 */
@@ -46,7 +48,8 @@ export default {
methods: { methods: {
searchSrcLocation() { searchSrcLocation() {
const _this = this; const _this = this;
if (_this.formData.destLocationCode == '') { if (!_this.formData.destLocationCode) {
_this.formData.srcLocationCode = null;
return; return;
} }
findPreparation(_this.formData.destLocationCode).then(res => { findPreparation(_this.formData.destLocationCode).then(res => {
@@ -76,6 +79,7 @@ export default {
addDeliveryTask(_this.formData).then(res => { addDeliveryTask(_this.formData).then(res => {
_this.$modal.closeLoading(); _this.$modal.closeLoading();
_this.$modal.msgSuccess("提交成功!"); _this.$modal.msgSuccess("提交成功!");
_this.reset();
setTimeout(() => { setTimeout(() => {
_this.$tab.switchTab("/pages/work/index"); _this.$tab.switchTab("/pages/work/index");
}, 500); }, 500);
@@ -86,11 +90,10 @@ export default {
}) })
}, },
// reset() { reset() {
// const _this = this; this.formData.srcLocationCode = null;
// this.formData.srcLocationCode = ''; this.formData.destLocationCode = null;
// this.formData.destLocationCode = ''; }
// }
} }
} }
</script> </script>

View File

@@ -5,12 +5,12 @@
<uni-easyinput type="text" v-model="formData.srcLocationCode" /> <uni-easyinput type="text" v-model="formData.srcLocationCode" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="目的点位:" :labelWidth='100' name="destLocationCode"> <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>
<uni-forms-item label="机器人类型:" :labelWidth='100' name="RobotType"> <uni-forms-item label="机器人类型:" :labelWidth='100' name="robotType">
<uni-data-select placeholder="请选择机器类型" v-model="formData.RobotType" :localdata="RobotData" /> <uni-data-select placeholder="请选择机器类型" v-model="formData.robotType" :localdata="RobotData" />
</uni-forms-item> </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-easyinput type="text" v-model="formData.ctnrTyp" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
@@ -30,11 +30,22 @@ import RobotType from "@/utils/enums/RobotType";
import { delivery, cancel } from "@/api/les/lesMaterialDelivery.js" import { delivery, cancel } from "@/api/les/lesMaterialDelivery.js"
export default { export default {
onLoad(option) { 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() { data() {
return { return {
formData: {}, formData: {
id: null,
srcLocationCode: null,
taskTyp: null,
robotType: null,
ctnrTyp: null,
},
destLocationCode: null,
RobotData: [ RobotData: [
{ value: RobotType.LATENT_MOBILE_ROBOT, text: "潜伏车" }, { value: RobotType.LATENT_MOBILE_ROBOT, text: "潜伏车" },
{ value: RobotType.LATENT_FORKLIFT_AGV, text: "潜伏叉车" }, { value: RobotType.LATENT_FORKLIFT_AGV, text: "潜伏叉车" },
@@ -47,12 +58,6 @@ export default {
errorMessage: '请输入发货点位', errorMessage: '请输入发货点位',
}, ] }, ]
}, },
destLocationCode: {
rules: [{
required: true,
errorMessage: '请输入目的货位',
}, ]
},
RobotType: { RobotType: {
rules: [{ rules: [{
required: true, required: true,
@@ -66,14 +71,14 @@ export default {
handleDelivery() { handleDelivery() {
const _this = this; const _this = this;
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
if (_this.formData.srcLocationCode && _this.formData.destLocationCode) { if (_this.formData.srcLocationCode && this.formData.robotType) {
_this.$modal.loading('提交中') _this.$modal.loading('提交中')
delivery(_this.formData).then(res => { delivery(_this.formData).then(res => {
_this.$modal.closeLoading(); _this.$modal.closeLoading();
_this.$modal.msgSuccess("提交成功!"); _this.$modal.msgSuccess("提交成功!");
_this.reset(); _this.reset();
setTimeout(() => { setTimeout(() => {
this.$tab.switchTab("/pages/les/chooseTask"); this.$tab.switchTab("/pages/work/index");
}, 500); }, 500);
}) })
} else { } else {
@@ -97,7 +102,7 @@ export default {
_this.$modal.msgSuccess("取消成功!"); _this.$modal.msgSuccess("取消成功!");
_this.reset(); _this.reset();
setTimeout(() => { setTimeout(() => {
this.$tab.switchTab("/pages/les/chooseTask"); this.$tab.switchTab("/pages/work/index");
}, 500); }, 500);
}) })
} else if (res.cancel) { } else if (res.cancel) {
@@ -107,9 +112,16 @@ export default {
}); });
}) })
}, },
// reset() { reset() {
// this.formData = {}; this.formData = {
// } id: null,
srcLocationCode: null,
taskTyp: null,
robotType: null,
ctnrTyp: null,
};
this.destLocationCode = null;
}
} }
} }
</script> </script>

View File

@@ -25,6 +25,8 @@ export default {
data() { data() {
return { return {
formData: { formData: {
srcLocationCode: null,
destLocationCode: null,
taskType: LesDeliveryTaskType.PALLET_RECYCLING taskType: LesDeliveryTaskType.PALLET_RECYCLING
}, },
/** 校验规则 */ /** 校验规则 */
@@ -69,6 +71,7 @@ export default {
addDeliveryTask(_this.formData).then(res => { addDeliveryTask(_this.formData).then(res => {
_this.$modal.closeLoading(); _this.$modal.closeLoading();
_this.$modal.msgSuccess("提交成功!"); _this.$modal.msgSuccess("提交成功!");
_this.reset();
setTimeout(() => { setTimeout(() => {
this.$tab.switchTab("/pages/work/index"); this.$tab.switchTab("/pages/work/index");
}, 500); }, 500);
@@ -78,11 +81,10 @@ export default {
} }
}) })
}, },
// reset() { reset() {
// const _this = this; this.formData.srcLocationCode = null;
// this.formData.srcLocationCode = ''; this.formData.destLocationCode = null;
// this.formData.destLocationCode = ''; }
// }
} }
} }
</script> </script>

View File

@@ -967,7 +967,7 @@
"data": [{ "data": [{
"path": "/pages/les/returnPallet", "path": "/pages/les/returnPallet",
"permission": "les:deliveryTask:list", "permission": "les:deliveryTask:list",
"icon": "icon-luchangfenxibaogao", "icon": "checkmarkempty",
"color": "linear-gradient(#FEBD5F, #FEAD37)", "color": "linear-gradient(#FEBD5F, #FEAD37)",
"style": { "style": {
"navigationBarTitleText": "托盘返空" "navigationBarTitleText": "托盘返空"
@@ -975,7 +975,7 @@
}, { }, {
"path": "/pages/les/bindMaterial", "path": "/pages/les/bindMaterial",
"permission": "les:basic:location:list", "permission": "les:basic:location:list",
"icon": "icon-jianyanjilu", "icon": "icon-lingliaodan",
"color": "linear-gradient(#FEBD5F, #FEAD37)", "color": "linear-gradient(#FEBD5F, #FEAD37)",
"style": { "style": {
"navigationBarTitleText": "备料绑定" "navigationBarTitleText": "备料绑定"
@@ -983,7 +983,7 @@
}, { }, {
"path": "/pages/les/callMaterial", "path": "/pages/les/callMaterial",
"permission": "les:deliveryTask:list", "permission": "les:deliveryTask:list",
"icon": "icon-a-ziyuan13500", "icon": "checkmarkempty",
"color": "linear-gradient(#FEBD5F, #FEAD37)", "color": "linear-gradient(#FEBD5F, #FEAD37)",
"style": { "style": {
"navigationBarTitleText": "生产呼料" "navigationBarTitleText": "生产呼料"
@@ -991,7 +991,7 @@
}, { }, {
"path": "/pages/les/chooseTask", "path": "/pages/les/chooseTask",
"permission": "les:deliveryRecord:list", "permission": "les:deliveryRecord:list",
"icon": "icon-yonghujiluchaxun", "icon": "icon--tuichu",
"color": "linear-gradient(#FEBD5F, #FEAD37)", "color": "linear-gradient(#FEBD5F, #FEAD37)",
"style": { "style": {
"navigationBarTitleText": "生产配送" "navigationBarTitleText": "生产配送"