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