基础,物料,设备

This commit is contained in:
helloDy
2023-11-07 15:53:01 +08:00
parent 1d38a560ec
commit fcb1885bf7
21 changed files with 827 additions and 588 deletions

View File

@@ -75,6 +75,7 @@
<el-select
v-model="dataForm.unit"
filterable
style="width: 100%"
placeholder="请选择单位">
<el-option
v-for="dict in getDictDatas('unit_dict')"
@@ -103,7 +104,7 @@ import { getDictDatas} from "@/utils/dict";
export default {
props: {
productId: {
workOrderId: {
type: String,
default: '',
},
@@ -121,8 +122,8 @@ export default {
unit: undefined
},
originList: [
{ label: 1, value: '内部'},
{ label: 2, value: '采购'}
{ label: '内部', value: 1},
{ label: '采购', value: 2}
],
supplierList: [],
dataRule: {
@@ -142,13 +143,12 @@ export default {
},
init(id) {
this.dataForm.id = id || '';
console.log('1', this.dataForm.id)
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getCoreWOMa({
id: this.dataForm.id
}).then((res) => {
getCoreWOMa(this.dataForm.id).then((res) => {
this.dataForm = res.data
});
}
@@ -162,7 +162,7 @@ export default {
if (this.dataForm.id) {
updateCoreWOMa({
...this.dataForm,
workOrderId: this.productId,
workOrderId: this.workOrderId,
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
@@ -173,7 +173,7 @@ export default {
// 添加的提交
createCoreWOMa({
...this.dataForm,
workOrderId: this.productId,
workOrderId: this.workOrderId,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;