feat(钢卷管理): 新增钢卷物料添加功能并优化修正功能
将新增按钮从基础面板移至修正页面,并实现新增钢卷物料的功能 优化修正功能,根据操作类型动态显示标题 新增时隐藏创建时间和创建人字段
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleMaterialQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetMaterialQuery">重置</el-button>
|
||||
<el-button type="success" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -259,7 +260,7 @@
|
||||
<label-render :content="labelRender.data" :labelType="labelRender.type" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="钢卷信息修正" :visible.sync="correctVisible" width="600px">
|
||||
<el-dialog :title="title" :visible.sync="correctVisible" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||
<el-input v-model="form.enterCoilNo" placeholder="请输入入场钢卷号" :disabled="form.coilId" />
|
||||
@@ -340,11 +341,11 @@
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-form-item label="创建时间" prop="createTime" v-if="form.coilId">
|
||||
<el-date-picker v-model="form.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择创建时间" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createBy">
|
||||
<el-form-item label="创建人" prop="createBy" v-if="form.coilId">
|
||||
<el-select v-model="form.createBy" placeholder="请选择创建人" style="width: 100%;" clearable filterable>
|
||||
<el-option v-for="item in userList" :key="item.userName" :label="item.nickName" :value="item.userName" />
|
||||
</el-select>
|
||||
@@ -360,7 +361,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMaterialCoil, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil, restoreMaterialCoil } from '@/api/wms/coil'
|
||||
import { listMaterialCoil, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil, restoreMaterialCoil, addMaterialCoil } from '@/api/wms/coil'
|
||||
import { listUser } from '@/api/system/user'
|
||||
import { listPendingAction, startProcess, cancelAction, delPendingAction } from '@/api/wms/pendingAction'
|
||||
import { parseTime } from '@/utils/klp'
|
||||
@@ -397,6 +398,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '钢卷信息修正',
|
||||
// 物料列表相关
|
||||
materialLoading: false,
|
||||
materialCoilList: [],
|
||||
@@ -591,6 +593,42 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
parseTime,
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.correctVisible = true;
|
||||
this.title = "添加钢卷物料";
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
coilId: undefined,
|
||||
enterCoilNo: undefined,
|
||||
currentCoilNo: undefined,
|
||||
supplierCoilNo: undefined,
|
||||
dataType: 1,
|
||||
warehouseId: undefined,
|
||||
nextWarehouseId: undefined,
|
||||
qrcodeRecordId: undefined,
|
||||
actualWarehouseId: undefined,
|
||||
team: undefined,
|
||||
hasMergeSplit: undefined,
|
||||
parentCoilNos: undefined,
|
||||
itemId: undefined,
|
||||
itemType: undefined,
|
||||
status: undefined,
|
||||
remark: undefined,
|
||||
delFlag: undefined,
|
||||
createTime: undefined,
|
||||
createBy: undefined,
|
||||
updateTime: undefined,
|
||||
updateBy: undefined,
|
||||
materialType: '原料',
|
||||
temperGrade: undefined,
|
||||
coatingType: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
getBorderStyle(row) {
|
||||
// console.log(row);
|
||||
// 已发货
|
||||
@@ -727,7 +765,8 @@ export default {
|
||||
handleCorrectMaterial(row) {
|
||||
this.form = {
|
||||
...row,
|
||||
}
|
||||
};
|
||||
this.title = "钢卷信息修正";
|
||||
this.correctVisible = true
|
||||
},
|
||||
cancel() {
|
||||
@@ -741,13 +780,25 @@ export default {
|
||||
return
|
||||
}
|
||||
this.buttonLoading = true;
|
||||
updateMaterialCoilSimple(this.form).then(_ => {
|
||||
this.$modal.msgSuccess("修正成功");
|
||||
this.correctVisible = false;
|
||||
this.getMaterialCoil();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
if (this.form.coilId) {
|
||||
// 更新
|
||||
updateMaterialCoilSimple(this.form).then(_ => {
|
||||
this.$modal.msgSuccess("修正成功");
|
||||
this.correctVisible = false;
|
||||
this.getMaterialCoil();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
// 新增
|
||||
addMaterialCoil(this.form).then(_ => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.correctVisible = false;
|
||||
this.getMaterialCoil();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8" v-if="showControl">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
|
||||
@click="handleCheck">修正</el-button>
|
||||
|
||||
Reference in New Issue
Block a user