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