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

物料加单位字段

parent 0044e078
...@@ -61,15 +61,29 @@ ...@@ -61,15 +61,29 @@
:key="row.dataType" :key="row.dataType"
></Dictionary> ></Dictionary>
</template> </template>
<!-- <template slot-scope="{ row, index }" slot="result"> <template slot-scope="{ row, index }" slot="dataType">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" /> <!-- <state
</template>--> v-if="row.fieldType==1"
code="materail.main.company"
:value="row.company"
type="text"
></state> -->
<Dictionary
@on-change="setRow(row,index)"
v-model="row.company"
code="materail.main.company"
type="select"
:value="row.company"
:key="row.company"
></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>
<template slot-scope="{ row, index }" slot="isUnique"> <template slot-scope="{ row, index }" slot="isUnique">
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox> <Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox>
</template> </template>
<template <template
slot-scope="{ row, index }" slot-scope="{ row, index }"
slot="action" slot="action"
...@@ -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: "company",
// align: "center", align: "center",
// slot: "result" slot: "company"
// }, },
{ {
title: "是否必填", title: "是否必填",
key: "required", key: "required",
...@@ -181,7 +195,11 @@ export default { ...@@ -181,7 +195,11 @@ export default {
} }
]; ];
Api.listTable({ conditions: conditions ,sortBy:'id',isDesc:false}).then(r => { Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false
}).then(r => {
if (r.result) { if (r.result) {
var arr = r.result; var arr = r.result;
this.checkList = arr.filter(function(item) { this.checkList = arr.filter(function(item) {
......
...@@ -122,6 +122,7 @@ export default { ...@@ -122,6 +122,7 @@ export default {
methods: { methods: {
clickItem(val) { clickItem(val) {
this.nodeInfo.codeRuleId = val; this.nodeInfo.codeRuleId = val;
this.model8 = val;
this.loadTree(this.nodeInfo.codeRuleId); this.loadTree(this.nodeInfo.codeRuleId);
this.cityList.forEach(e => { this.cityList.forEach(e => {
if (val == e.id) { if (val == e.id) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!-- <Select v-model="model8" clearable style="width:130px;float:left;margin-top:8px" @on-change='chnangeClick' placeholder="请选择类型"> <!-- <Select v-model="model8" clearable style="width:130px;float:left;margin-top:8px" @on-change='chnangeClick' placeholder="请选择类型">
<Option v-for="item in cityList" :value="item.id" :key="item.id">{{ item.name }}</Option> <Option v-for="item in cityList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select> </Select>
</Select> --> </Select>-->
<Dropdown @on-click="clickItem"> <Dropdown @on-click="clickItem">
<a href="javascript:void(0)"> <a href="javascript:void(0)">
{{downName}} {{downName}}
...@@ -66,10 +66,10 @@ export default { ...@@ -66,10 +66,10 @@ export default {
name: "masterData", name: "masterData",
data() { data() {
return { return {
model8:'', model8: "",
type: "", type: "",
keys: "", keys: "",
cityList:[], cityList: [],
expand: false, expand: false,
list: [], list: [],
nodeInfo: { nodeInfo: {
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
detail: null, detail: null,
showMenu: true, showMenu: true,
dataList: [], dataList: [],
codeRuleId:'', codeRuleId: ""
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -97,6 +97,7 @@ export default { ...@@ -97,6 +97,7 @@ export default {
methods: { methods: {
clickItem(val) { clickItem(val) {
this.codeRuleId = val; this.codeRuleId = val;
this.model8 = val;
this.loadTree(this.codeRuleId); this.loadTree(this.codeRuleId);
this.cityList.forEach(e => { this.cityList.forEach(e => {
if (val == e.id) { if (val == e.id) {
...@@ -200,7 +201,6 @@ export default { ...@@ -200,7 +201,6 @@ export default {
} else { } else {
this.$Message.error("请先选择类型"); this.$Message.error("请先选择类型");
} }
}, },
change(v, b) { change(v, b) {
let ids = []; let ids = [];
...@@ -275,7 +275,6 @@ export default { ...@@ -275,7 +275,6 @@ export default {
background: rgba(245, 246, 250, 1); background: rgba(245, 246, 250, 1);
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
.search { .search {
height: 50px; height: 50px;
......
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