feat(钢卷管理): 添加长度字段支持及相关功能
refactor(订单管理): 重构订单状态显示及操作记录功能 fix(权限控制): 移除导出订单明细的权限校验 perf(钢卷操作): 使用策略模式重构钢卷操作逻辑
This commit is contained in:
@@ -110,6 +110,11 @@
|
||||
<el-input v-model="form.netWeight" placeholder="请输入净重" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="长度" prop="length">
|
||||
<el-input v-model="form.length" placeholder="请输入长度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
|
||||
@@ -229,6 +229,7 @@ import ProductSelect from "@/components/KLPService/ProductSelect";
|
||||
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
||||
import { Pagination } from 'element-ui';
|
||||
import { listDeliveryPlan } from '@/api/wms/deliveryPlan'
|
||||
import handleCoil, { COIL_ACTIONS } from '../js/coilActions'
|
||||
|
||||
// 键值为[400, 500), 不包含在字典中,但后续可以加入的特殊操作,这类操作录入后会立刻完成,例如入库(401)和发货(402)
|
||||
|
||||
@@ -354,26 +355,16 @@ export default {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
addMaterialCoil(this.form).then(response => {
|
||||
addPendingAction({
|
||||
// 计划ID 对应 warehouseId, warehouseId字段并不是仓库ID,而是一个根据操作类型自适应的查询字段
|
||||
warehouseId: this.form.planId,
|
||||
actionType: 401,
|
||||
currentCoilNo: this.form.currentCoilNo,
|
||||
sourceType: 'manual',
|
||||
coilId: response.data.coilId,
|
||||
priority: 0,
|
||||
remark: this.form.remark,
|
||||
actionStatus: 0,
|
||||
}).then(res => {
|
||||
handleCoil(COIL_ACTIONS.RECEIVE, this.form, this.form.planId)
|
||||
.then(res => {
|
||||
this.$modal.msgSuccess("入库成功");
|
||||
this.$refs.form.resetFields();
|
||||
this.getList()
|
||||
})
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
// 打开收货弹窗
|
||||
@@ -394,20 +385,13 @@ export default {
|
||||
this.$modal.confirm("收货后刚钢卷会进入库存并占用所选的实际库区,是否继续?").then(() => {
|
||||
this.buttonLoading = true;
|
||||
// 更新操作记录状态 actionStatus: 2
|
||||
updatePendingAction({
|
||||
...this.receiptForm,
|
||||
actionStatus: 2,
|
||||
}).then(_ => {
|
||||
this.$message.success("确认收货成功");
|
||||
this.getList()
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
// 更新钢卷状态为当前钢卷; dataType: 1
|
||||
updateMaterialCoilSimple({
|
||||
...this.coilInfo,
|
||||
dataType: 1,
|
||||
})
|
||||
handleCoil(COIL_ACTIONS.STORE, this.coilInfo, this.receiptForm)
|
||||
.then(_ => {
|
||||
this.$message.success("确认收货成功");
|
||||
this.getList()
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
})
|
||||
},
|
||||
// 取消操作
|
||||
|
||||
Reference in New Issue
Block a user