Commit 48a46201 authored by 仇晓婷's avatar 仇晓婷

物料添加单位

parent d7c7ed19
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<h4>扩展属性</h4> <h4>扩展属性</h4>
<Table border :columns="columns" :data="checkList" height="300"> <Table border :columns="columns" :data="checkList" height="450">
<template slot-scope="{ row, index }" slot="title"> <template slot-scope="{ row, index }" slot="title">
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div> <div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<Input <Input
...@@ -61,20 +61,21 @@ ...@@ -61,20 +61,21 @@
:key="row.dataType" :key="row.dataType"
></Dictionary> ></Dictionary>
</template> </template>
<template slot-scope="{ row, index }" slot="dataType"> <template slot-scope="{ row, index }" slot="unitName">
<!-- <state <state
v-if="row.fieldType==1" v-if="row.fieldType==1"
code="materail.main.company" code="material.main.unitName"
:value="row.company" :value="row.unitName"
type="text" type="text"
></state> --> ></state>
<Dictionary <Dictionary
v-else
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
v-model="row.company" v-model="row.unitName"
code="materail.main.company" code="material.main.unitName"
type="select" type="select"
:value="row.company" :value="row.unitName"
:key="row.company" :key="row.unitName"
></Dictionary> ></Dictionary>
</template> </template>
<template slot-scope="{ row, index }" slot="required"> <template slot-scope="{ row, index }" slot="required">
...@@ -145,9 +146,9 @@ export default { ...@@ -145,9 +146,9 @@ export default {
}, },
{ {
title: "单位", title: "单位",
key: "company", key: "unitName",
align: "center", align: "center",
slot: "company" slot: "unitName"
}, },
{ {
title: "是否必填", title: "是否必填",
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</Col> </Col>
<Col :span="24" style="padding:20px 0 0px 10px;margin-bottom:10px;" class="table-solt"> <Col :span="24" style="padding:20px 0 0px 10px;margin-bottom:10px;" class="table-solt">
<!--fieldType 1.固有,2.默认,3自定义; --> <!--fieldType 1.固有,2.默认,3自定义; -->
<Table border :columns="columns" :data="checkList" class="tableCommon" height="300"> <Table border :columns="columns" :data="checkList" class="tableCommon" height="450">
<template slot-scope="{ row, index }" slot="title"> <template slot-scope="{ row, index }" slot="title">
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div> <div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<Input v-else v-model="row.title" placeholder="请输入" @on-blur="setRow(row,index)" /> <Input v-else v-model="row.title" placeholder="请输入" @on-blur="setRow(row,index)" />
...@@ -59,9 +59,23 @@ ...@@ -59,9 +59,23 @@
:key="row.dataType" :key="row.dataType"
></Dictionary> ></Dictionary>
</template> </template>
<!-- <template slot-scope="{ row, index }" slot="result"> <template slot-scope="{ row, index }" slot="unitName">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" /> <state
</template>--> v-if="row.fieldType==1"
code="material.main.unitName"
:value="row.unitName"
type="text"
></state>
<Dictionary
v-else
@on-change="setRow(row,index)"
v-model="row.unitName"
code="material.main.unitName"
type="select"
:value="row.unitName"
:key="row.unitName"
></Dictionary>
</template>
<template slot-scope="{ row, index }" slot="required"> <template slot-scope="{ row, index }" slot="required">
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox> <Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
</template> </template>
...@@ -129,12 +143,12 @@ export default { ...@@ -129,12 +143,12 @@ export default {
align: "center", align: "center",
slot: "dataType" slot: "dataType"
}, },
// { {
// title: "是否显示", title: "单位",
// key: "result", key: "unitName",
// align: "center", align: "center",
// slot: "result" slot: "unitName"
// }, },
{ {
title: "是否必填", title: "是否必填",
key: "required", key: "required",
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
}, },
methods: { methods: {
search() { search() {
alert(JSON.stringify(this.easySearch)); // alert(JSON.stringify(this.easySearch));
console.log(this.easySearch); console.log(this.easySearch);
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
......
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