refactor(wms/coil): 简化钢卷更新逻辑并调整表单验证规则
- 使用updateMaterialCoilSimple替换updateMaterialCoil以简化更新逻辑 - 移除部分非必要的表单验证规则 - 为钢卷选择器添加状态筛选条件
This commit is contained in:
@@ -244,7 +244,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateMaterialCoil, getMaterialCoil } from '@/api/wms/coil'
|
||||
import { updateMaterialCoilSimple, getMaterialCoil } from '@/api/wms/coil'
|
||||
import { listPendingAction, addPendingAction } from '@/api/wms/pendingAction'
|
||||
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
||||
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||
@@ -275,6 +275,7 @@ export default {
|
||||
// 钢卷选择器筛选参数
|
||||
coilFilters: {
|
||||
dataType: 1,
|
||||
status: 0,
|
||||
},
|
||||
coilSelectorVisible: false,
|
||||
loading: false,
|
||||
@@ -291,25 +292,25 @@ export default {
|
||||
formLoading: false,
|
||||
// 表单校验
|
||||
rules: {
|
||||
enterCoilNo: [
|
||||
{ required: true, message: "入场钢卷号不能为空", trigger: "blur" }
|
||||
],
|
||||
currentCoilNo: [
|
||||
{ required: true, message: "当前钢卷号不能为空", trigger: "blur" }
|
||||
],
|
||||
itemId: [
|
||||
{ required: true, message: "物品ID不能为空", trigger: "blur" }
|
||||
],
|
||||
itemType: [
|
||||
{ required: true, message: "物品类型不能为空", trigger: "change" }
|
||||
],
|
||||
// 净重和毛重
|
||||
netWeight: [
|
||||
{ required: true, message: "净重不能为空", trigger: "blur" }
|
||||
],
|
||||
grossWeight: [
|
||||
{ required: true, message: "毛重不能为空", trigger: "blur" }
|
||||
],
|
||||
// enterCoilNo: [
|
||||
// { required: true, message: "入场钢卷号不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// currentCoilNo: [
|
||||
// { required: true, message: "当前钢卷号不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// itemId: [
|
||||
// { required: true, message: "物品ID不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// itemType: [
|
||||
// { required: true, message: "物品类型不能为空", trigger: "change" }
|
||||
// ],
|
||||
// // 净重和毛重
|
||||
// netWeight: [
|
||||
// { required: true, message: "净重不能为空", trigger: "blur" }
|
||||
// ],
|
||||
// grossWeight: [
|
||||
// { required: true, message: "毛重不能为空", trigger: "blur" }
|
||||
// ],
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -366,7 +367,7 @@ export default {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
updateMaterialCoil(this.form).then(_ => {
|
||||
updateMaterialCoilSimple(this.form).then(_ => {
|
||||
addPendingAction({
|
||||
actionType: 405,
|
||||
currentCoilNo: this.form.currentCoilNo,
|
||||
|
||||
Reference in New Issue
Block a user