Commit edaf0497 authored by 仇晓婷's avatar 仇晓婷

物料优化

parent ab47335a
......@@ -257,7 +257,7 @@ export default {
action: 1,
add: 0 //新增标识
};
this.checkList.unshift(obj);
this.checkList.push(obj);
},
handleSubmit() {
this.$refs.form.validate(v => {
......
......@@ -254,7 +254,7 @@ export default {
action: 1,
add: 0 //新增标识
};
this.checkList.unshift(obj);
this.checkList.push(obj);
},
handleSubmit() {
this.$refs.form.validate(v => {
......
......@@ -25,7 +25,15 @@
</Col>-->
<Col :span="12">
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
<!-- <Input v-model="entity.version" placeholder="请输入"></Input> -->
<Dictionary
code="material.main.version"
disabled
v-model="entity.version"
type="select"
:value="entity.version"
:key="entity.version"
></Dictionary>
</FormItem>
</Col>
<Col :span="24">
......@@ -47,7 +55,7 @@
class="w100"
></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<DatePicker
v-if="li.dataType==4"
v-model="entity[li.field]"
......@@ -58,7 +66,12 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
<state
v-if="li.unitName&&(li.dataType==1||li.dataType==2)"
:value="li.unitName"
code="material.main.unitName"
type="tag"
></state>
</FormItem>
</Col>
<!-- <Col :span="24">
......@@ -84,6 +97,7 @@ export default {
entity: {
code: 0,
status: 0,
version: 0,
codeRuleId: this.nodeInfo.codeRuleId,
categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {},
......
......@@ -25,7 +25,15 @@
</Col>-->
<Col :span="12">
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
<!-- <Input v-model="entity.version" placeholder="请输入"></Input> -->
<Dictionary
code="material.main.version"
disabled
v-model="entity.version"
type="select"
:value="entity.version"
:key="entity.version"
></Dictionary>
</FormItem>
</Col>
<Col :span="24">
......@@ -47,7 +55,7 @@
class="w100"
></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<DatePicker
v-if="li.dataType==4"
v-model="entity[li.field]"
......@@ -58,7 +66,12 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
<state
v-if="li.unitName&&(li.dataType==1||li.dataType==2)"
:value="li.unitName"
code="material.main.unitName"
type="tag"
></state>
</FormItem>
</Col>
<!-- <Col :span="24">
......
......@@ -7,6 +7,7 @@
:action="action"
:initsearch="sets"
:high="false"
:format="formatFun"
:height="tableHeight"
@on-selection-change="onSelect"
>
......@@ -132,7 +133,8 @@ export default {
{
key: "version",
title: "版本",
align: "left"
align: "left",
code: "material.main.version"
},
{
key: "description",
......@@ -212,6 +214,17 @@ export default {
};
},
methods: {
//格式化原始数据
formatFun(data) {
data.map(e => {
if (e.status == 0) {
e._disabled = false;
} else {
e._disabled = true;
}
});
return data;
},
onSelect(a, b) {
//批量选择
this.rootCategoryId = a[0].rootCategoryId;
......@@ -261,9 +274,9 @@ export default {
col.code = u.note;
}
if (u.dataType == 4) {
col.type = 'date';
col.type = "date";
}
if (u.unitName&&(u.dataType==1||u.dataType==2)) {
if (u.unitName && (u.dataType == 1 || u.dataType == 2)) {
var units = this.$store.getters.dictionaryByKey(
"material.main.unitName"
);
......@@ -279,7 +292,7 @@ export default {
this.cols = this.cols.concat(extra);
var action = this.cols.splice(this.columns.length - 1, 1);
this.cols.push(this.columns[this.columns.length - 1]);
if(delay){
if (delay) {
delay();
}
// console.log(this.cols)
......@@ -349,14 +362,14 @@ export default {
handler(newName, oldName) {
console.log("ovo", newName, oldName);
if (newName.rootCategoryId) {
this.initCols(()=>{
this.initCols(() => {
if (newName.categoryId) {
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
}
});
}
if (!newName.categoryId) {
if (!newName.categoryId) {
this.easySearch.categoryId.value = "-1";
}
},
......
......@@ -111,7 +111,8 @@ export default {
click: () => this.details(params.row.id)
}
},
params.row.code
// params.row.code
!params.row.code ? "未分配" : params.row.code
);
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment