| | |
| | | clearable |
| | | placeholder="请输入杆包号" |
| | | > |
| | | <template #label> |
| | | <span style="color: #F56C6C">杆包号</span> |
| | | </template> |
| | | <template #label> |
| | | <span style="color: #f56c6c">杆包号</span> |
| | | </template> |
| | | </wd-input> |
| | | <wd-input |
| | | v-model="model.dishModel" |
| | |
| | | clearable |
| | | placeholder="请输入盘型号" |
| | | > |
| | | <template #label> |
| | | <span style="color: #F56C6C">盘型号</span> |
| | | </template> |
| | | <template #label> |
| | | <span style="color: #f56c6c">盘型号</span> |
| | | </template> |
| | | </wd-input> |
| | | <wd-input |
| | | v-model="model.actuallyLength" |
| | |
| | | clearable |
| | | placeholder="请输入实际长度" |
| | | > |
| | | <template #label> |
| | | <span style="color: #F56C6C">实际长度(m)</span> |
| | | </template> |
| | | <template #label> |
| | | <span style="color: #f56c6c">实际长度(m)</span> |
| | | </template> |
| | | </wd-input> |
| | | <wd-input |
| | | v-model="model.actuallyWeight" |
| | |
| | | clearable |
| | | placeholder="请输入实际重量" |
| | | > |
| | | <template #label> |
| | | <span style="color: #F56C6C">实际重量(kg)</span> |
| | | </template> |
| | | <template #label> |
| | | <span style="color: #f56c6c">实际重量(kg)</span> |
| | | </template> |
| | | </wd-input> |
| | | </wd-cell-group> |
| | | <wd-toast /> |
| | |
| | | }); |
| | | |
| | | const submit = async () => { |
| | | // 在调用API前先保存poleNumber的值,确保我们有正确的值 |
| | | const poleNumberValue = model.poleNumber; |
| | | |
| | | const { code } = await WireApi.addWireOutput({ |
| | | wireId: paramsId.value, |
| | | type: "拉丝", |
| | | ...model, |
| | | }); |
| | | |
| | | if (code == 200) { |
| | | toast.success("提交成功"); |
| | | resetForm() |
| | | return true; |
| | | // 创建返回结果对象,使用提前保存的poleNumber值 |
| | | const result = { |
| | | success: true, |
| | | poleNumber: poleNumberValue, |
| | | }; |
| | | // 在返回之前执行resetForm() |
| | | resetForm(); |
| | | // 返回结果 |
| | | return result; |
| | | } else { |
| | | toast.error("提交失败"); |
| | | return false; |
| | | return { success: false }; |
| | | } |
| | | }; |
| | | |
| | |
| | | const arr = code.code.split(","); |
| | | model.poleNumber = arr[3]; // 领用杆号 |
| | | model.poleWeight = arr[4]; // 杆重 |
| | | model.poleModel = 'Φ' + arr[1].slice(2); // 杆型号 |
| | | model.poleModel = arr[2]; // 杆型号 |
| | | }; |
| | | |
| | | onLoad((options: any) => { |