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

物料优化

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