Commit 18eb33e9 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'ting-p' into product

parents e8ca494d 92432624
......@@ -30,7 +30,7 @@
</Col>
<Col :span="24">
<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">
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<Input
......@@ -45,6 +45,8 @@
<Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" v-else />
</template>
<template slot-scope="{ row, index }" slot="dataType">
<Row>
<Col :span="12">
<state
v-if="row.fieldType==1"
code="materail.category.dataType"
......@@ -60,21 +62,40 @@
:value="row.dataType"
:key="row.dataType"
></Dictionary>
</Col>
<Col :span="12" v-if="row.dataType==3">
<div v-if="row.fieldType==1">'/'+{{row.dictionaryCode}}</div>
<Select
v-model="row.dictionaryCode"
clearable
transfer
v-else
@on-change="setRow(row,index)"
>
<Option
v-for="item in codeList"
:value="item.code"
:key="item.code"
>{{ item.name }}</Option>
</Select>
</Col>
</Row>
</template>
<template slot-scope="{ row, index }" slot="dataType">
<!-- <state
<template slot-scope="{ row, index }" slot="unitName">
<state
v-if="row.fieldType==1"
code="materail.main.company"
:value="row.company"
code="material.main.unitName"
:value="row.unitName"
type="text"
></state> -->
></state>
<Dictionary
v-else
@on-change="setRow(row,index)"
v-model="row.company"
code="materail.main.company"
v-model="row.unitName"
code="material.main.unitName"
type="select"
:value="row.company"
:key="row.company"
:value="row.unitName"
:key="row.unitName"
></Dictionary>
</template>
<template slot-scope="{ row, index }" slot="required">
......@@ -118,6 +139,7 @@ export default {
codeRuleId: this.nodeInfo.codeRuleId
},
disabled: false,
codeList: [],
columns: [
{
title: "序号",
......@@ -135,19 +157,22 @@ export default {
title: "备注",
key: "note",
align: "center",
slot: "note"
slot: "note",
width: "150"
},
{
title: "属性类型",
key: "dataType",
align: "center",
slot: "dataType"
slot: "dataType",
width: "200"
},
{
title: "单位",
key: "company",
key: "unitName",
align: "center",
slot: "company"
slot: "unitName",
width: "150"
},
{
title: "是否必填",
......@@ -164,7 +189,7 @@ export default {
{
title: "操作",
slot: "action",
width: 100,
align: "center"
}
],
......@@ -208,6 +233,11 @@ export default {
});
}
});
Api.getChildren({ id: 582 }).then(r => {
if (r.result) {
this.codeList = r.result;
}
});
},
remove(index, row) {
if (row.add == 0) {
......
......@@ -26,5 +26,7 @@ export default {
delete(id) {
return Api.delete(`${systemUrl}/category/delete`,{params:{id:id}});
},
getChildren(params){
return Api.get(`${systemUrl}/Dictionary/getChildren`,params); //字典
},
}
\ No newline at end of file
......@@ -33,7 +33,7 @@
</Col>
<Col :span="24" style="padding:20px 0 0px 10px;margin-bottom:10px;" class="table-solt">
<!--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">
<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)" />
......@@ -43,6 +43,8 @@
<Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" v-else />
</template>
<template slot-scope="{ row, index }" slot="dataType">
<Row>
<Col :span="12">
<state
v-if="row.fieldType==1"
code="materail.category.dataType"
......@@ -58,10 +60,42 @@
:value="row.dataType"
:key="row.dataType"
></Dictionary>
</Col>
<Col :span="12" v-if="row.dataType==3">
<div v-if="row.fieldType==1">'/'+{{row.dictionaryCode}}</div>
<Select
v-model="row.dictionaryCode"
clearable
transfer
v-else
@on-change="setRow(row,index)"
>
<Option
v-for="item in codeList"
:value="item.code"
:key="item.code"
>{{ item.name }}</Option>
</Select>
</Col>
</Row>
</template>
<template slot-scope="{ row, index }" slot="unitName">
<state
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="result">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" />
</template>-->
<template slot-scope="{ row, index }" slot="required">
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
</template>
......@@ -129,12 +163,12 @@ export default {
align: "center",
slot: "dataType"
},
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
{
title: "单位",
key: "unitName",
align: "center",
slot: "unitName"
},
{
title: "是否必填",
key: "required",
......
......@@ -111,7 +111,7 @@ export default {
},
methods: {
search() {
alert(JSON.stringify(this.easySearch));
// alert(JSON.stringify(this.easySearch));
console.log(this.easySearch);
this.$refs.grid.reload(this.easySearch);
},
......
......@@ -7,11 +7,11 @@
<Input v-model="upName" placeholder="请输入" disabled></Input>
</FormItem>
</Col>
<Col :span="12">
<!-- <Col :span="12">
<FormItem label="编码" prop="code">
<Input v-model="entity.code" placeholder="请输入" disabled></Input>
</FormItem>
</Col>
</Col> -->
<Col :span="12">
<FormItem label="名称" prop="name">
<Input v-model="entity.name" placeholder="请输入"></Input>
......
......@@ -2,27 +2,27 @@
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<!-- <Col :span="12">
<FormItem label="编码" prop="code">
<Input v-model="entity.code" placeholder="请输入" disabled></Input>
</FormItem>
</Col>
</Col> -->
<Col :span="12">
<FormItem label="名称" prop="name">
<Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem>
</Col>
<Col :span="12">
<!-- <Col :span="12">
<FormItem label="状态" prop="status" placeholder="请选择">
<Dictionary
code="materail.category.status"
code="material.main.status"
v-model="entity.status"
type="select"
:value="entity.status"
:key="entity.status"
></Dictionary>
</FormItem>
</Col>
</Col> -->
<Col :span="12">
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
......
......@@ -13,9 +13,9 @@
</FormItem>
</Col>
<Col :span="12">
<FormItem label="状态" prop="status" placeholder="请选择">
<FormItem label="状态" prop="status" placeholder="请选择" v-if="entity.status==3||entity.status==2">
<Dictionary
code="materail.category.status"
code="material.main.status"
v-model="entity.status"
type="select"
:value="entity.status"
......@@ -46,7 +46,7 @@
<script>
import Api from "./api";
export default {
props: ["nodeInfo",'eid'],
props: ["nodeInfo", "eid"],
data() {
return {
arr: [],
......@@ -79,7 +79,6 @@ export default {
},
remove(index, row) {
// if (row.add == 0) {
// //新增的删除,直接删
// this.checkList.splice(index, 1);
......
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