Commit 40912b67 authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents 08f4917b daabb5f2
......@@ -85,8 +85,6 @@ export default {
// const openNames = getSiderSubmenu(path, menuSider);
// this.$store.commit("admin/menu/setOpenNames", openNames);
} else {
this.$Message.error("加载产品树失败!");
}
});
},
......
......@@ -27,7 +27,11 @@
</Col>
<Col :span="24">
<FormItem label="描述" prop="description">
<Input v-model="entity.description" type="textarea" placeholder="请输入..."></Input>
<Input
v-model="entity.description"
type="textarea"
placeholder="请输入..."
></Input>
</FormItem>
</Col>
</Row>
......@@ -37,26 +41,44 @@
<Row>
<Col v-for="li in fileds" :key="li.field" :span="li.span">
<FormItem :label="li.title" :prop="li.name">
<Input v-if="li.dataType==0" v-model="entity[li.field]"></Input>
<Input v-if="li.dataType == 0" v-model="entity[li.field]"></Input>
<InputNumber
v-if="li.dataType==1||li.dataType==2"
v-if="li.dataType == 1 || li.dataType == 2"
v-model="entity[li.field]"
class="w100"
></InputNumber>
<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>
<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>
<DatePicker
v-if="li.dataType==4"
v-if="li.dataType == 4"
v-model="entity[li.field]"
type="date"
:placeholder="'选择'+li.title"
:placeholder="'选择' + li.title"
></DatePicker>
<InputFile v-if="li.dataType==6" v-model="entity[li.field]"></InputFile>
<InputFile
v-if="li.dataType == 6"
v-model="entity[li.field]"
></InputFile>
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<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>
<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>
<state
v-if="li.unitName&&(li.dataType==1||li.dataType==2)"
v-if="li.unitName && (li.dataType == 1 || li.dataType == 2)"
:value="li.unitName"
code="material.main.unitName"
type="tag"
......@@ -66,7 +88,7 @@
<!-- <Col :span="24">
<div v-html="entity"></div>
</Col>-->
<Col :span="24" style="text-align: right;">
<Col :span="24" style="text-align: right">
<FormItem>
<Button type="primary" @click="handleSubmit" v-noClick>保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
......@@ -106,9 +128,7 @@ export default {
created() {
this.initFiled();
},
mounted() {
this.get();
},
mounted() {},
methods: {
initFiled() {
let conditions = [
......@@ -141,6 +161,7 @@ export default {
this.entity[u.field] = "";
this.$set(this.entity, u.filed, v);
});
this.get();
}
});
},
......@@ -152,49 +173,9 @@ export default {
}
});
},
tableData() {
let conditions = [
{
conditionalType: "In",
fieldName: "fieldType",
fieldValue: "1,2",
},
{
conditionalType: "Equal",
fieldName: "categoryId",
fieldValue: "0",
},
];
Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false,
}).then((r) => {
if (r.result) {
var arr = r.result;
this.checkList = arr.filter(function (item) {
item.mid = item.id;
delete item["id"]; //删除属性id
return item;
});
}
});
},
remove(index, row) {
// if (row.add == 0) {
// //新增的删除,直接删
// this.checkList.splice(index, 1);
// } else {
// row.action = 2; //返回的默认删除,删除后保存在arr数组中,添加标识action = 2,然后点击保存的时候,一起传给后台
// setRow(row, index) {
// this.$set(this.checkList, index, row);
// this.arr.push(row);
// this.checkList.splice(index, 1);
// }
},
setRow(row, index) {
this.$set(this.checkList, index, row);
},
// },
handleSubmit() {
this.$refs.form.validate((v) => {
......
......@@ -64,18 +64,7 @@
</Col>
</Row>
</div>
<!-- <DataGrid
v-else
:columns="cols"
ref="grid"
:conditions="easySearch"
:action="action"
:initsearch="sets"
:tool="false"
:page="false"
:height="300"
:format="formatFun"
/> -->
<DataGrid
v-else
:height="300"
......@@ -152,11 +141,11 @@ export default {
operatorIdList: [], //操作员id
}, //确定后返回
columns: [
{
type: "selection",
width: 70,
align: "center",
},
// {
// type: "selection",
// width: 70,
// align: "center",
// },
{
key: "id",
title: this.$t("id"),
......
......@@ -88,10 +88,7 @@
>&nbsp;
<a @click="view(row.id)"> <Icon type="md-document" />详情 </a>
&nbsp;
<a
@click="sub(row.id)"
v-if="row.status == 1 && row.schemaId"
>
<a @click="sub(row.id)" v-if="row.status == 1 && row.schemaId">
<Icon type="md-color-wand" />送审
</a>
</div>
......@@ -236,9 +233,9 @@ export default {
},
},
],
typeInfo: "card",
iconInfo: "md-apps",
titleInfo: "卡片模式",
typeInfo: "table",
iconInfo: "md-list",
titleInfo: "列表模式",
ModalIm: false,
temTitle: "文档管理",
selectRows: [],
......
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