rev: 工单字段修改

This commit is contained in:
2023-07-18 18:15:33 +08:00
parent 464697c5ce
commit 10ef2405ff
12 changed files with 224 additions and 33 deletions

View File

@@ -93,7 +93,7 @@
</el-select>
</el-form-item>
<el-form-item label="物料名称" prop="material_name">
<el-input v-model="form.material_name" style="width: 240px;" @focus="getMaterial" />
<el-input v-model="form.material_name" style="width: 240px;" @focus="getMaterial(1)" />
</el-form-item>
<el-form-item label="物料编码">
<el-input v-model="form.material_code" style="width: 240px;" disabled />
@@ -108,6 +108,12 @@
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="原料名称" prop="material_name">
<el-input v-model="form.raw_material_name" style="width: 240px;" @focus="getMaterial(2)" />
</el-form-item>
<el-form-item label="原料编码">
<el-input v-model="form.raw_material_code" style="width: 240px;" disabled />
</el-form-item>
<el-form-item label="计划开始时间" prop="planproducestart_date">
<el-date-picker
v-model="form.planproducestart_date"
@@ -332,7 +338,7 @@
<!--分页组件-->
<pagination />
</div>
<MaterialDialog :dialog-show.sync="materialDialog" @tableChanged="tableChanged" />
<MaterialDialog :dialog-show.sync="materialDialog" @tableChanged="tableChanged" :flag="flag"/>
</div>
</template>
@@ -355,6 +361,9 @@ const defaultForm = {
plan_qty: null,
real_qty: null,
material_id: null,
raw_material_id: null,
raw_material_name: null,
raw_material_code: null,
vehicle_type: null,
planproducestart_date: null,
planproduceend_date: null,
@@ -425,7 +434,8 @@ export default {
regionList: [],
pointList: [],
regionCodeParam: null,
materialDialog: false
materialDialog: false,
flag: 1
}
},
created() {
@@ -464,14 +474,21 @@ export default {
})
}
},
getMaterial() {
getMaterial(flag) {
this.materialDialog = true
this.flag = flag
},
tableChanged(row) {
this.form.material_name = row.material_name
this.form.material_id = row.material_id
this.form.material_spec = row.material_spec
this.form.material_code = row.material_code
tableChanged(row, flag) {
if (flag === 1) {
this.form.material_name = row.material_name
this.form.material_id = row.material_id
this.form.material_spec = row.material_spec
this.form.material_code = row.material_code
} else {
this.form.raw_material_name = row.material_name
this.form.raw_material_id = row.material_id
this.form.raw_material_code = row.material_code
}
},
setRegionName(data) {
// 清空

View File

@@ -101,6 +101,10 @@ export default {
isSingle: {
type: Boolean,
default: true
},
flag: {
type: Number,
default: 1
}
},
data() {
@@ -143,7 +147,7 @@ export default {
// 处理单选
if (this.isSingle && this.tableRadio) {
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.tableRadio)
this.$emit('tableChanged', this.tableRadio, this.flag)
return
}
this.rows = this.$refs.table.selection
@@ -153,7 +157,7 @@ export default {
}
this.crud.resetQuery(false)
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.rows)
this.$emit('tableChanged', this.rows, this.flag)
}
}
}