Commit 2c01c61e authored by 周远喜's avatar 周远喜

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

parents 95a82c26 40cb288a
...@@ -550,6 +550,7 @@ export default { ...@@ -550,6 +550,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
.table-tools { .table-tools {
padding-top: 5px;
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
.table-search { .table-search {
......
...@@ -1187,7 +1187,7 @@ export default { ...@@ -1187,7 +1187,7 @@ export default {
isDeleted: '是否删除', isDeleted: '是否删除',
platesnum: '板数', platesnum: '板数',
isEffect: '生效', isEffect: '生效',
versionnotes: '版本', versionnotes: '版本说明',
phase: '阶段', phase: '阶段',
versionid: '版本ID', versionid: '版本ID',
isSendPpm: '发送PPM', isSendPpm: '发送PPM',
......
...@@ -9538,8 +9538,7 @@ ...@@ -9538,8 +9538,7 @@
"dependencies": { "dependencies": {
"deepmerge": { "deepmerge": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", "bundled": true
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
} }
} }
}, },
...@@ -19891,8 +19890,7 @@ ...@@ -19891,8 +19890,7 @@
"version": "4.0.8", "version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true, "dev": true
"optional": true
}, },
"rx-lite-aggregates": { "rx-lite-aggregates": {
"version": "4.0.8", "version": "4.0.8",
......
...@@ -81,9 +81,13 @@ export default { ...@@ -81,9 +81,13 @@ export default {
time: [ time: [
{ {
required: true, required: true,
type: "date", type: "array",
message: "请选择时间", message: "请选择工时时间段",
trigger: "change" trigger: "blur",
fields: {
0: { type: "date", required: true, message: "请选择工时时间段" },
1: { type: "date", required: true, message: "请选择工时时间段" }
}
} }
], ],
userIds: [ userIds: [
...@@ -168,7 +172,8 @@ export default { ...@@ -168,7 +172,8 @@ export default {
this.listClass.push(obj); this.listClass.push(obj);
this.formItem.shopId = this.listClass[0].value; this.formItem.shopId = this.listClass[0].value;
this.formItem.shopName = this.listClass[0].label; this.formItem.shopName = this.listClass[0].label;
} },
}, },
watch: { watch: {
"formItem.radio"(v) { "formItem.radio"(v) {
......
...@@ -287,6 +287,37 @@ export default { ...@@ -287,6 +287,37 @@ export default {
hide: true, hide: true,
type: "date" type: "date"
}, },
{
key: "creatorUserId",
title: this.$t("creatorUserId"),
align: "left",
high: true,
type: "user"
},
{
key: "creationTime",
title: this.$t("creationTime"),
align: "center",
high: true,
width: 180
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
hide: true,
align: "left",
high: true,
type: "user"
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
hide: true,
align: "center",
high: true,
width: 180
},
{ {
title: "操作", title: "操作",
key: "action", key: "action",
...@@ -297,7 +328,7 @@ export default { ...@@ -297,7 +328,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", }, attrs: { oprate: "detail" },
on: { click: () => this.detail(params.row) } on: { click: () => this.detail(params.row) }
}, },
"查看" "查看"
...@@ -305,7 +336,7 @@ export default { ...@@ -305,7 +336,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "edit", }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row) }, on: { click: () => this.edit(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -321,7 +352,7 @@ export default { ...@@ -321,7 +352,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "remove", }, attrs: { oprate: "remove" },
on: { click: () => this.remove(params.row) }, on: { click: () => this.remove(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -336,7 +367,7 @@ export default { ...@@ -336,7 +367,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", }, attrs: { oprate: "detail" },
on: { click: () => this.split(params.row) }, on: { click: () => this.split(params.row) },
style: style:
(params.row.divideMark != 0 && (params.row.divideMark != 0 &&
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
> >
<Row> <Row>
<Col span="6"> <Col span="6">
<FormItem label="生产准备" style="width:100%" prop="ProductingPreparationPeople"> <FormItem label="生产车间" style="width:100%" prop="ProductingPreparationPeople">
<WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" /> <WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" />
</FormItem> </FormItem>
</Col> </Col>
...@@ -74,36 +74,35 @@ export default { ...@@ -74,36 +74,35 @@ export default {
}, },
columns1: [ columns1: [
{ {
title: "订单编码", title: this.l("mesCode"),
key: "mesCode", key: "mesCode",
width: 180, width: 180,
tooltip: true tooltip: true
}, },
{ {
title: "任务类型", title: this.l("productName"),
key: "taskType", key: "productName",
align: "center",
width: 100,
tooltip: true tooltip: true
}, },
{ {
title: "产品名称", key: "drawnNumber",
key: "productName", title: this.l("drawnNumber"),
tooltip: true align: "center",
width: 140
}, },
{ {
title: "阶段", title: this.l("projectNumber"),
key: "stage", key: "projectNumber",
width: 80 width: 140
}, },
{ {
title: "材料", title: this.l("batchNumber"),
key: "materialId", key: "batchNumber",
width: 100, width: 120,
tooltip: true tooltip: true
}, },
{ {
title: "数量", title: this.l("quantity"),
key: "quantity", key: "quantity",
align: "right", align: "right",
width: 70 width: 70
...@@ -169,7 +168,9 @@ export default { ...@@ -169,7 +168,9 @@ export default {
return objStr; return objStr;
}, },
getTimeProductPFD(value) { getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = this.getFormatDateEnd(value); this.orderForm.ProductingPreparationFinishDate = this.getFormatDateEnd(
value
);
}, },
getTimeQuotationFD(value) { getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = this.getFormatDateEnd(value); this.orderForm.QuotationFinishDate = this.getFormatDateEnd(value);
...@@ -181,11 +182,16 @@ export default { ...@@ -181,11 +182,16 @@ export default {
"-" + "-" +
this.p(d.getMonth() + 1) + this.p(d.getMonth() + 1) +
"-" + "-" +
this.p(d.getDate())+ " 23:59:59"; this.p(d.getDate()) +
" 23:59:59";
return resDate; return resDate;
}, },
p(s) { p(s) {
return s < 10 ? "0" + s : s; return s < 10 ? "0" + s : s;
},
l(key) {
let vkey = "mes_plan" + "." + key;
return this.$t(vkey) || key;
} }
}, },
created() { created() {
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</FormItem> --> </FormItem> -->
<FormItem :label="l('performancehours')" > <FormItem :label="l('performanceHours')" >
<InputNumber v-model="formprocessValidate.performance_hours"></InputNumber> <InputNumber v-model="formprocessValidate.performance_hours"></InputNumber>
</FormItem> </FormItem>
...@@ -278,7 +278,7 @@ export default { ...@@ -278,7 +278,7 @@ export default {
}, },
{ {
key: 'performance_hours', key: 'performance_hours',
title: this.l('performancehours') title: this.l('performanceHours')
}, },
// { // {
// key: 'check_flag', // key: 'check_flag',
......
...@@ -55,17 +55,17 @@ ...@@ -55,17 +55,17 @@
<inputFile ref="refqcFile" v-model="imgName" :parms="qcfileparms" files /> <inputFile ref="refqcFile" v-model="imgName" :parms="qcfileparms" files />
</FormItem> </FormItem>
</Col> </Col>
<Col span="11" offset="1"> <!-- <Col span="11" offset="1">
<FormItem label="是否关重" prop="isimportant"> <FormItem label="是否关重" prop="isimportant">
<Select v-model="isimportant"> <Select v-model="isimportant">
<Option :value="1"></Option> <Option :value="1"></Option>
<Option :value="2"></Option> <Option :value="2"></Option>
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col> -->
</Row> </Row>
<Row :gutter="16"> <Row :gutter="16">
<Col span="11"> <!-- <Col span="11">
<FormItem label="能力系数"> <FormItem label="能力系数">
<InputNumber <InputNumber
:min="0" :min="0"
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
style="width:240px" style="width:240px"
></InputNumber> ></InputNumber>
</FormItem> </FormItem>
</Col> </Col> -->
<Col span="11" offset="1"> <Col span="11" offset="1">
<FormItem label="位置" prop="location"> <FormItem label="位置" prop="location">
<Input v-model="formItem.location" placeholder="请输入位置"></Input> <Input v-model="formItem.location" placeholder="请输入位置"></Input>
...@@ -132,12 +132,12 @@ export default { ...@@ -132,12 +132,12 @@ export default {
equip_ip: "", equip_ip: "",
shop_id: "", shop_id: "",
shop_name: "", shop_name: "",
isimportant: 2, // isimportant: 2,
location: "", location: "",
capability_value: 1 // capability_value: 1
}, },
property: true, property: true,
isimportant: 2, // isimportant: 2,
ruleValidate: { ruleValidate: {
equip_id: [ equip_id: [
{ {
...@@ -234,9 +234,9 @@ export default { ...@@ -234,9 +234,9 @@ export default {
equip_ip: this.formItem.equip_ip, equip_ip: this.formItem.equip_ip,
shop_id: this.formItem.shop_id, shop_id: this.formItem.shop_id,
eqstyle: str, eqstyle: str,
isimportant: this.isimportant, // isimportant: this.isimportant,
location: this.formItem.location, location: this.formItem.location,
capability_value: this.formItem.capability_value, // capability_value: this.formItem.capability_value,
property: this.property, property: this.property,
shop_name: this.formItem.shop_name shop_name: this.formItem.shop_name
}; };
...@@ -277,9 +277,9 @@ export default { ...@@ -277,9 +277,9 @@ export default {
equip_ip: this.formItem.equip_ip, equip_ip: this.formItem.equip_ip,
shop_id: this.formItem.shop_id, shop_id: this.formItem.shop_id,
eqstyle: str, eqstyle: str,
isimportant: this.isimportant, // isimportant: this.isimportant,
location: this.formItem.location, location: this.formItem.location,
capability_value: this.formItem.capability_value, // capability_value: this.formItem.capability_value,
property: this.property, property: this.property,
shop_name: this.formItem.shop_name shop_name: this.formItem.shop_name
}; };
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
<h3 class="zh-title">组织架构</h3> <h3 class="zh-title">组织架构</h3>
<div class="zh-box"> <div class="zh-box">
<Input search placeholder="请输入查询条件" clearable v-model="treeInputSearch" /> <Input search placeholder="请输入查询条件" clearable v-model="treeInputSearch" />
<Tree :data="searchList" <Tree
:data="searchList"
:style="{height:(treeHeight-115)+'px'}" :style="{height:(treeHeight-115)+'px'}"
style="overflow-y:auto;overflow-x:hiden;width:215px;" style="overflow-y:auto;overflow-x:hiden;width:215px;"
@on-select-change="selectTreeNode"></Tree> @on-select-change="selectTreeNode"
></Tree>
</div> </div>
</div> </div>
<!-- 右侧内容 --> <!-- 右侧内容 -->
...@@ -535,23 +537,23 @@ export default { ...@@ -535,23 +537,23 @@ export default {
title: "所属部门", title: "所属部门",
key: "shop_name" key: "shop_name"
}, },
{ // {
title: "是否关重", // title: "是否关重",
key: "isimportant", // key: "isimportant",
render: (h, params) => { // render: (h, params) => {
let statuse = params.row.isimportant; // let statuse = params.row.isimportant;
let text = statuse == 1 ? "是" : statuse == 2 ? "否" : ""; // let text = statuse == 1 ? "是" : statuse == 2 ? "否" : "";
return h("span", {}, text); // return h("span", {}, text);
} // }
}, // },
{ {
title: "位置", title: "位置",
key: "location" key: "location"
}, },
{ // {
title: "能力系数", // title: "能力系数",
key: "capability_value" // key: "capability_value"
}, // },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
...@@ -591,7 +593,8 @@ export default { ...@@ -591,7 +593,8 @@ export default {
"op", "op",
{ {
attrs: { attrs: {
oprate: "delete",title: "删除" oprate: "delete",
title: "删除"
}, },
style: { style: {
color: "red" color: "red"
...@@ -608,7 +611,8 @@ export default { ...@@ -608,7 +611,8 @@ export default {
"op", "op",
{ {
attrs: { attrs: {
oprate: "detail",title: "保养" oprate: "detail",
title: "保养"
}, },
on: { on: {
click: () => { click: () => {
...@@ -622,7 +626,8 @@ export default { ...@@ -622,7 +626,8 @@ export default {
"op", "op",
{ {
attrs: { attrs: {
oprate: "detail",title: "维修" oprate: "detail",
title: "维修"
}, },
on: { on: {
click: () => { click: () => {
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<Col span="8"> <Col span="8">
<FormItem :label="l('isimportant')" prop="isimportant"> <FormItem :label="l('isimportant')" prop="isimportant">
<RadioGroup v-model="entity.isimportant"> <RadioGroup v-model="entity.isimportant">
<Radio label="0"></Radio> <Radio label="1"></Radio>
<Radio label="1"></Radio> <Radio label="2"></Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Col> </Col>
...@@ -132,6 +132,23 @@ export default { ...@@ -132,6 +132,23 @@ export default {
easy: true, easy: true,
high: true high: true
}, },
{
key: "isimportant",
title: this.l("isimportant"),
align: "left",
render: (h, params) => {
let statuse = params.row.isimportant;
let text = statuse == 1 ? "是" : statuse == 2 ? "否" : "";
return h("span", {}, text);
}
},
{
key: "capabilityValue",
title: this.l("capabilityValue"),
align: "left",
easy: true,
high: true
},
{ {
key: "calId", key: "calId",
title: this.l("calId"), title: this.l("calId"),
...@@ -173,12 +190,12 @@ export default { ...@@ -173,12 +190,12 @@ export default {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id) }
}, },
"设置日历" "设置"
), ),
h( h(
"op", "op",
{ {
attrs: { oprate: "remove",title: "删除" }, attrs: { oprate: "remove", title: "删除" },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.id) }
}, },
"删除" "删除"
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="formItem" :rules="rules" :label-width="90">
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem label="资源名称" prop="equip_name"> <FormItem label="资源名称" prop="equip_name">
...@@ -29,6 +29,19 @@ ...@@ -29,6 +29,19 @@
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem label="是否关重" prop="isimportant">
<RadioGroup v-model="formItem.isimportant">
<Radio label="1"></Radio>
<Radio label="2"></Radio>
</RadioGroup>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="能力值" prop="capabilityValue">
<Input v-model="formItem.capabilityValue" placeholder="请输入能力值"></Input>
</FormItem>
</Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
...@@ -47,7 +60,9 @@ export default { ...@@ -47,7 +60,9 @@ export default {
overtimeList: [], overtimeList: [],
formItem: { formItem: {
equip_name: "", equip_name: "",
equip_id: "" equip_id: "",
isimportant: "",
capabilityValue: ""
}, },
formItem1: { formItem1: {
id: 0, id: 0,
...@@ -97,6 +112,8 @@ export default { ...@@ -97,6 +112,8 @@ export default {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.formItem.equip_name = r.result.title; this.formItem.equip_name = r.result.title;
this.formItem.equip_id = r.result.code; this.formItem.equip_id = r.result.code;
this.formItem.capabilityValue = r.result.capabilityValue;
this.formItem.isimportant = r.result.isimportant + "";
this.formItem1.calendarwork_pk = r.result.calKey; this.formItem1.calendarwork_pk = r.result.calKey;
this.formItem2.calendarovertime_pk = r.result.holidayKey; this.formItem2.calendarovertime_pk = r.result.holidayKey;
this.formItem1.equip_pk = r.result.id; this.formItem1.equip_pk = r.result.id;
...@@ -109,7 +126,9 @@ export default { ...@@ -109,7 +126,9 @@ export default {
this.disabled = true; this.disabled = true;
Api.update({ Api.update({
equipCalendarWork: this.formItem1, equipCalendarWork: this.formItem1,
equipCalendarOverTime: this.formItem2 equipCalendarOverTime: this.formItem2,
isimportant: this.formItem.isimportant,
capabilityValue: this.formItem.capabilityValue
}) })
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
<FormItem :label="l('departmentId')" prop="departmentId"> <FormItem :label="l('departmentId')" prop="departmentId">
<departmentSelect v-model="entity.departmentId"></departmentSelect> <departmentSelect v-model="entity.departmentId"></departmentSelect>
</FormItem> </FormItem>
</Col> <Col :span="5"> </Col>
<Col :span="5">
<FormItem :label="l('isMain')" prop="isMain"> <FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary> <Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem> </FormItem>
...@@ -122,22 +123,15 @@ ...@@ -122,22 +123,15 @@
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<i-quill <i-quill v-model="entity.remark" :height="300" border v-paste="handleImg" />
v-model="entity.remark"
:height="300"
border
v-paste="handleImg"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem label="多媒体附件" prop="files"> <FormItem label="多媒体附件" prop="files">
<files ref="refFile" :parms="parms" files />
<files />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
...@@ -147,7 +141,7 @@ ...@@ -147,7 +141,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import iQuill from '@/components/quill' import iQuill from "@/components/quill";
export default { export default {
name: "Add", name: "Add",
components: { components: {
...@@ -181,11 +175,18 @@ export default { ...@@ -181,11 +175,18 @@ export default {
versionnotes: "", versionnotes: "",
phase: null, phase: null,
versionid: null, versionid: null,
isSendPpm: 1 isSendPpm: 1,
fileId: ""
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }] code: [{ required: true, message: "必填", trigger: "blur" }]
},
parms: {
app: "technology",
eid: null,
name: "",
field: ""
} }
}; };
}, },
...@@ -194,15 +195,19 @@ export default { ...@@ -194,15 +195,19 @@ export default {
eid: Number eid: Number
}, },
mounted() { mounted() {
if (this.eid > 0) { this.parms.eid = this.$u.guid();
this.load(this.eid); this.$refs.refFile.intFiles();
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
if (this.$refs.refFile.nameList.length > 0) {
this.entity.fileId = this.parms.eid;
} else {
this.entity.fileId = "";
}
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -225,22 +230,22 @@ export default { ...@@ -225,22 +230,22 @@ export default {
this.$emit("on-close"); this.$emit("on-close");
}, },
handleImg(e) { handleImg(e) {
console.warn(e) console.warn(e);
let file = null let file = null;
if ( if (
e.clipboardData && e.clipboardData &&
e.clipboardData.items[0] && e.clipboardData.items[0] &&
e.clipboardData.items[0].type && e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf('image') > -1 e.clipboardData.items[0].type.indexOf("image") > -1
) { ) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式 //这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile() file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader() let reader = new FileReader();
reader.readAsDataURL(file) reader.readAsDataURL(file);
setTimeout(() => { setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>' var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.remark += img this.entity.remark += img;
}, 1000) }, 1000);
// new R // new R
} }
......
...@@ -81,8 +81,7 @@ ...@@ -81,8 +81,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName"> <FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<Input v-model="entity.qualityTemplateName"></Input> <files ref="refFile" :parms="parms" files singleFile />
<files ref="refFile" :parms="parms" files singleFile/>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -162,22 +161,25 @@ export default { ...@@ -162,22 +161,25 @@ export default {
data() { data() {
return { return {
disabled: false, disabled: false,
entity: {}, entity: {
qualityTemplateName: "",
qualityTemplate: ""
},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
}, },
routingDetailList: [], routingDetailList: [],
parms: { parms: {
app: 'qccard', app: "qccard",
eid: null, eid: this.eid,
name: '', name: "",
field: '' field: ""
} }
}; };
}, },
props: { props: {
headid: Number, headid: Number,
eName:String, eName: String,
eid: Number eid: Number
}, },
mounted() { mounted() {
...@@ -189,7 +191,7 @@ export default { ...@@ -189,7 +191,7 @@ export default {
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone() this.$refs.refFile.intFilesClone();
this.entity = r.result; this.entity = r.result;
}); });
}, },
...@@ -197,6 +199,26 @@ export default { ...@@ -197,6 +199,26 @@ export default {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.qualityTemplateName = "";
this.entity.qualityTemplate = "";
if (this.$refs.refFile.nameList.length > 0) {
let nameList = this.$refs.refFile.nameList;
let names = [];
let url = [];
nameList.forEach(e => {
names.push(e.fileName);
url.push(e.filePath);
});
this.entity.qualityTemplateName = JSON.stringify(names)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, ""); //附件本地库暂存文件名称
this.entity.qualityTemplate = JSON.stringify(url)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
}
Api.update(this.entity) Api.update(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -231,8 +253,8 @@ export default { ...@@ -231,8 +253,8 @@ export default {
tempObj.value = data.id; tempObj.value = data.id;
tempObj.label = data.name; tempObj.label = data.name;
tempD.push(tempObj); tempD.push(tempObj);
}) });
this.routingDetailList = tempD this.routingDetailList = tempD;
}); });
}, },
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
<Col :span="24"> <Col :span="24">
<FormItem label="多媒体附件" prop="files"> <FormItem label="多媒体附件" prop="files">
<files /> <files ref="refFile" :parms="parms" files />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -154,11 +154,18 @@ export default { ...@@ -154,11 +154,18 @@ export default {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
},
parms: {
app: "technology",
eid: this.uid != "" ? this.uid : "",
name: "",
field: ""
} }
}; };
}, },
props: { props: {
eid: Number eid: Number,
uid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid > 0) {
...@@ -168,6 +175,7 @@ export default { ...@@ -168,6 +175,7 @@ export default {
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.entity = r.result; this.entity = r.result;
}); });
}, },
...@@ -175,6 +183,7 @@ export default { ...@@ -175,6 +183,7 @@ export default {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.fileId = this.parms.eid;
Api.update(this.entity) Api.update(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :uid="uid" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
<div class="fullWindow flex fd" v-if="viewModal"> <div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex"> <div class="top flex">
...@@ -122,6 +122,7 @@ export default { ...@@ -122,6 +122,7 @@ export default {
src: null, src: null,
detail: null, detail: null,
curId: 0, curId: 0,
uid:'',
columns: [ columns: [
{ key: "id", title: this.$t("id"), hide: true, align: "left" }, { key: "id", title: this.$t("id"), hide: true, align: "left" },
{ {
...@@ -222,7 +223,8 @@ export default { ...@@ -222,7 +223,8 @@ export default {
key: "versionnotes", key: "versionnotes",
title: this.l("versionnotes"), title: this.l("versionnotes"),
align: "left", align: "left",
high: true high: true,
hide:true,
}, },
{ {
key: "phase", key: "phase",
...@@ -266,7 +268,7 @@ export default { ...@@ -266,7 +268,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row) }
}, },
"编辑" "编辑"
), ),
...@@ -364,8 +366,9 @@ export default { ...@@ -364,8 +366,9 @@ export default {
// this.detail = () => import("./detail"); // this.detail = () => import("./detail");
// this.modal = true; // this.modal = true;
// }, // },
edit(id) { edit(row) {
this.curId = id; this.curId = row.id;
this.uId=row.fileId;
this.title = "编辑"; this.title = "编辑";
this.detail = () => import("./edit"); this.detail = () => import("./edit");
this.modal = true; this.modal = true;
......
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