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

物料加单位字段

parent 0044e078
......@@ -61,15 +61,29 @@
:key="row.dataType"
></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="dataType">
<!-- <state
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">
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="isUnique">
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox>
</template>
<template
slot-scope="{ row, index }"
slot="action"
......@@ -129,12 +143,12 @@ export default {
align: "center",
slot: "dataType"
},
// {
// title: "是否显示",
// key: "result",
// align: "center",
// slot: "result"
// },
{
title: "单位",
key: "company",
align: "center",
slot: "company"
},
{
title: "是否必填",
key: "required",
......@@ -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) {
var arr = r.result;
this.checkList = arr.filter(function(item) {
......
......@@ -122,6 +122,7 @@ export default {
methods: {
clickItem(val) {
this.nodeInfo.codeRuleId = val;
this.model8 = val;
this.loadTree(this.nodeInfo.codeRuleId);
this.cityList.forEach(e => {
if (val == e.id) {
......
......@@ -7,7 +7,7 @@
<!-- <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>
</Select>
</Select> -->
</Select>-->
<Dropdown @on-click="clickItem">
<a href="javascript:void(0)">
{{downName}}
......@@ -66,10 +66,10 @@ export default {
name: "masterData",
data() {
return {
model8:'',
model8: "",
type: "",
keys: "",
cityList:[],
cityList: [],
expand: false,
list: [],
nodeInfo: {
......@@ -84,7 +84,7 @@ export default {
detail: null,
showMenu: true,
dataList: [],
codeRuleId:'',
codeRuleId: ""
};
},
async fetch({ store, params }) {
......@@ -97,6 +97,7 @@ export default {
methods: {
clickItem(val) {
this.codeRuleId = val;
this.model8 = val;
this.loadTree(this.codeRuleId);
this.cityList.forEach(e => {
if (val == e.id) {
......@@ -200,7 +201,6 @@ export default {
} else {
this.$Message.error("请先选择类型");
}
},
change(v, b) {
let ids = [];
......@@ -275,7 +275,6 @@ export default {
background: rgba(245, 246, 250, 1);
opacity: 1;
padding-left: 10px;
}
.search {
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