Commit 238cbdf2 authored by 周远喜's avatar 周远喜

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

parents bfa08bc1 01c2b987
...@@ -71,28 +71,46 @@ export default { ...@@ -71,28 +71,46 @@ export default {
load(v) { load(v) {
this.dataImmut = []; this.dataImmut = [];
this.dataMut = []; this.dataMut = [];
let url = `${workflowUrl}/schema/intend`; //判断流程是否启用
let params = {
// this.$api.get(url, { schemaId: v }).then(r => { id: v
// if (r.success) { };
// // console.warn("VVVV",r) this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
// r.result.nodes.map((u, i) => { if (res.success) {
// if (i > 0) { let wfStatus = res.result.status;
// let ids = u.defaultUsers.immutable.concat(u.defaultUsers.mutable); if (wfStatus == 0) {
// u.defaultUsers.immutable = ids; //启用
// u.userIds = this.$u.clone(ids); let url = `${workflowUrl}/schema/intend`;
// } else { this.$api.get(url, { schemaId: v }).then(r => {
// u.userIds = [this.currentUserId]; if (r.success) {
// } // console.warn("VVVV",r)
// }); r.result.nodes.map((u, i) => {
// this.dataImmut = r.result.nodes; if (i > 0) {
// this.processTitle = r.result.name; let ids = u.defaultUsers.immutable.concat(
// // if (this.dataImmut.length >= 1) { u.defaultUsers.mutable
// // this.immutData = this.dataImmut[1].defaultUsers.immutable );
// // } u.defaultUsers.immutable = ids;
// this.userIds(); u.userIds = this.$u.clone(ids);
// } } else {
// }); u.userIds = [this.currentUserId];
}
});
this.dataImmut = r.result.nodes;
this.processTitle = r.result.name;
// if (this.dataImmut.length >= 1) {
// this.immutData = this.dataImmut[1].defaultUsers.immutable
// }
this.userIds();
}
});
}
// else {
// this.$Message.error("流程未启用");
// }
} else {
this.$Message.error("操作失败");
}
});
}, },
userIds() { userIds() {
var ids = []; var ids = [];
......
<template> <template>
<div> <div>
<div id="myChart" style="width:380px;height:300px;margin:0 auto;top: 0px;"></div> <div id="myChart" style="width:380px;height:400px;margin:0 auto;top: 30px;"></div>
</div> </div>
</template> </template>
<script> <script>
......
...@@ -118,9 +118,7 @@ export default { ...@@ -118,9 +118,7 @@ export default {
} }
}, },
downUrl: fileUrlDown, downUrl: fileUrlDown,
columns: { columns: [],
count:7,
},
comondata:[ comondata:[
{ {
productName: "受电弓", productName: "受电弓",
......
.new_body{
&{
background: #fff;
}
}
.set_card{ .set_card{
padding: 12px 30px 0; padding: 12px 30px 0;
.set_card_box{ .set_card_box{
...@@ -18,6 +23,7 @@ ...@@ -18,6 +23,7 @@
width: 150px; width: 150px;
height: 120px; height: 120px;
text-align: center; text-align: center;
margin: 0 auto;
} }
.statu_box{ .statu_box{
line-height: 30px; line-height: 30px;
...@@ -32,11 +38,11 @@ ...@@ -32,11 +38,11 @@
margin: 0 10px 0 0; margin: 0 10px 0 0;
} }
.set_masage{ .set_masage{
min-height: 125px; height: 125px;
line-height: 25px; line-height: 25px;
.time_bg{ .time_bg{
background: #267feb49; background: #267feb49;
line-height: 34px; margin: 0 auto;
width: 160px; width: 160px;
text-align: center; text-align: center;
border-radius: 3px; border-radius: 3px;
...@@ -44,8 +50,13 @@ ...@@ -44,8 +50,13 @@
} }
.set_masage02{ .set_masage02{
line-height: 35px; line-height: 35px;
height: 144px;
text-align: center;
} }
} }
.echarts02{
height: 462px;
}
} }
} }
#echarts{ #echarts{
...@@ -58,7 +69,7 @@ ...@@ -58,7 +69,7 @@
.tips_item{ .tips_item{
background: #eff1f7; background: #eff1f7;
margin: 20px; margin: 20px;
line-height: 38px; line-height: 58px;
padding: 0 20px; padding: 0 20px;
.item_top{ .item_top{
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@import "./mnc.less"; @import "./mnc.less";
</style> </style>
<template> <template>
<div> <div class="new_body">
<a class="back_href" @click="goView"> <a class="back_href" @click="goView">
<Icon type="ios-undo-outline" size="24" />返回设备监控 <Icon type="ios-undo-outline" size="24" />返回设备监控
</a> </a>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<p class="set_top">设备状态</p> <p class="set_top">设备状态</p>
<div class="set_card_body"> <div class="set_card_body">
<Row> <Row>
<Col span="9"> <Col span="24">
<div class="set_img statu_box"> <div class="set_img statu_box">
<img v-if="formData.statu=='关机'" src="../image/guan.png" alt=""> <img v-if="formData.statu=='关机'" src="../image/guan.png" alt="">
<img v-else-if="formData.statu=='空闲'" src="../image/kong.png" alt=""> <img v-else-if="formData.statu=='空闲'" src="../image/kong.png" alt="">
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<p>{{formData.statu}}</p> <p>{{formData.statu}}</p>
</div> </div>
</Col> </Col>
<Col span="15"> <Col span="24">
<div class="set_masage set_masage02"> <div class="set_masage set_masage02">
<p>当前状态开始时间:</p> <p>当前状态开始时间:</p>
<p class="time_bg">11:45:05</p> <p class="time_bg">11:45:05</p>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</div> </div>
<div class="set_card_box"> <div class="set_card_box">
<p class="set_top">加工状态统计</p> <p class="set_top">加工状态统计</p>
<div class="center"> <div class="center echarts02">
<Echart2 ></Echart2> <Echart2 ></Echart2>
</div> </div>
</div> </div>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
<p>当前刀具名称:<span class="item_right"> GD236689 </span></p> <p>当前刀具名称:<span class="item_right"> GD236689 </span></p>
<p>当前刀库号: <span class="item_right"> 1213 </span></p> <p>当前刀库号: <span class="item_right"> 1213 </span></p>
<p>刀具已使用工时: <span class="item_right"> 10 </span></p> <p>刀具已使用工时: <span class="item_right"> 10 </span></p>
<p>刀补值: <span class="item_right"> 20 </span>-</p> <p>刀补值: <span class="item_right"> -20 </span></p>
<p>刀补地址: <span class="item_right"> D1 </span></p> <p>刀补地址: <span class="item_right"> D1 </span></p>
<p>扭矩: <span class="item_right"> 200 </span></p> <p>扭矩: <span class="item_right"> 200 </span></p>
</div> </div>
......
...@@ -33,6 +33,6 @@ export default { ...@@ -33,6 +33,6 @@ export default {
return Api.post(`${workflowUrl}/instance/batchstart`, params); //送审 return Api.post(`${workflowUrl}/instance/batchstart`, params); //送审
}, },
getbyid(params) { getbyid(params) {
return Api.get(`${workflowUrl}/schema/getbyid`, params); //流程 return Api.get(`${workflowUrl}/schema/getbyid`, params); //流程判断启用禁用
}, },
} }
\ No newline at end of file
...@@ -171,10 +171,25 @@ export default { ...@@ -171,10 +171,25 @@ export default {
} }
] ]
}, },
disabled: false disabled: false,
wfstatu: 1
}; };
}, },
mounted() { mounted() {
let params = {
id: "123327da-42b3-41f6-b785-cf933f137a95"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
this.wfstatu = 1;
} else {
this.wfstatu = 3;
}
}
});
this.loadTree(); this.loadTree();
}, },
methods: { methods: {
...@@ -182,7 +197,7 @@ export default { ...@@ -182,7 +197,7 @@ export default {
this.$refs.formValidate.validate(v => { this.$refs.formValidate.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.orderSearchForm.status = 1; this.orderSearchForm.status = this.wfstatu;
Api.mesplancreate(this.orderSearchForm) Api.mesplancreate(this.orderSearchForm)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
...@@ -147,7 +147,8 @@ export default { ...@@ -147,7 +147,8 @@ export default {
}, },
placeholdeinfo: "", placeholdeinfo: "",
list: [], list: [],
data1: [] data1: [],
wfstatu: 1
}; };
}, },
props: { props: {
...@@ -159,6 +160,19 @@ export default { ...@@ -159,6 +160,19 @@ export default {
} }
}, },
mounted() { mounted() {
let params = {
id: "123327da-42b3-41f6-b785-cf933f137a95"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
this.wfstatu = 1;
} else {
this.wfstatu = 3;
}
}
});
this.loadTree(); this.loadTree();
}, },
methods: { methods: {
...@@ -172,7 +186,7 @@ export default { ...@@ -172,7 +186,7 @@ export default {
this.$refs.formValidate.validate(v => { this.$refs.formValidate.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.orderSearchForm.status = 1; this.orderSearchForm.status = this.wfstatu;
Api.mesorderupdate(this.orderSearchForm) Api.mesorderupdate(this.orderSearchForm)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
...@@ -51,6 +51,12 @@ ...@@ -51,6 +51,12 @@
<Button type="primary" @click="addModal=true">创建</Button> <Button type="primary" @click="addModal=true">创建</Button>
</template> </template>
<template slot="batch"> <template slot="batch">
<Button
type="primary"
class="mr10 ml10"
@click="openSendViewModal"
v-if="this.wfstatu==1"
>订单送审</Button>
<Button type="primary" class="mr10 ml10" @click="openSendModal">订单派发</Button> <Button type="primary" class="mr10 ml10" @click="openSendModal">订单派发</Button>
<Button type="primary" class="mr10 ml10" @click="removeList">批量删除</Button> <Button type="primary" class="mr10 ml10" @click="removeList">批量删除</Button>
</template> </template>
...@@ -71,6 +77,13 @@ ...@@ -71,6 +77,13 @@
<Button type="primary" @click="orderSplitOk">确定分解</Button> <Button type="primary" @click="orderSplitOk">确定分解</Button>
</div> </div>
</Modal> </Modal>
<Modal v-model="sendViewModal" title="订单送审" width="1200">
<SendView :row="rowDataArry" ref="orderSendView" />
<div slot="footer">
<Button @click="sendViewModal = false">取消</Button>
<Button type="primary" @click="sendViewOk">确定送审</Button>
</div>
</Modal>
<Modal v-model="sendModal" title="订单派发" width="1200"> <Modal v-model="sendModal" title="订单派发" width="1200">
<Send :row="rowDataArry" ref="orderSend" /> <Send :row="rowDataArry" ref="orderSend" />
<div slot="footer"> <div slot="footer">
...@@ -108,6 +121,7 @@ import Detail from "./detail"; ...@@ -108,6 +121,7 @@ import Detail from "./detail";
import Search from "./search"; import Search from "./search";
import Split from "./split"; import Split from "./split";
import Send from "./send"; import Send from "./send";
import SendView from "./sendView";
import ProductTree from "@/components/page/productTree.vue"; import ProductTree from "@/components/page/productTree.vue";
export default { export default {
name: "list", name: "list",
...@@ -118,6 +132,7 @@ export default { ...@@ -118,6 +132,7 @@ export default {
Search, Search,
Split, Split,
Send, Send,
SendView,
ProductTree ProductTree
}, },
data() { data() {
...@@ -139,6 +154,7 @@ export default { ...@@ -139,6 +154,7 @@ export default {
splitModal: false, splitModal: false,
ModalInfo: false, ModalInfo: false,
sendModal: false, sendModal: false,
sendViewModal: false,
curId: 0, curId: 0,
id: "id", id: "id",
columns: [ columns: [
...@@ -328,7 +344,6 @@ export default { ...@@ -328,7 +344,6 @@ export default {
high: true, high: true,
width: 180 width: 180
}, },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
...@@ -350,13 +365,23 @@ export default { ...@@ -350,13 +365,23 @@ export default {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row) }, on: { click: () => this.edit(params.row) },
style: style:
(params.row.status == 1 && this.wfstatu == 1
params.row.id == params.row.rootId && ? (
params.row.divideMark != 0) || (params.row.status == 1 &&
params.row.id != params.row.rootId || params.row.id == params.row.rootId &&
params.row.status != 1 params.row.divideMark != 0) ||
params.row.id != params.row.rootId ||
params.row.status != 1
? "display:none"
: "")
: (
(params.row.status == 3 &&
params.row.id == params.row.rootId &&
params.row.divideMark != 0) ||
params.row.id != params.row.rootId ||
params.row.status != 3
? "display:none" ? "display:none"
: "" : "")
}, },
"编辑" "编辑"
), ),
...@@ -366,12 +391,23 @@ export default { ...@@ -366,12 +391,23 @@ export default {
attrs: { oprate: "remove" }, attrs: { oprate: "remove" },
on: { click: () => this.remove(params.row) }, on: { click: () => this.remove(params.row) },
style: style:
(params.row.status == 1 && this.wfstatu == 1
params.row.id == params.row.rootId && ? (
params.row.divideMark != 0) || (params.row.status == 1 &&
params.row.status != 1 params.row.id == params.row.rootId &&
params.row.divideMark != 0) ||
params.row.id != params.row.rootId ||
params.row.status != 1
? "display:none"
: "")
: (
(params.row.status == 3 &&
params.row.id == params.row.rootId &&
params.row.divideMark != 0) ||
params.row.id != params.row.rootId ||
params.row.status != 3
? "display:none" ? "display:none"
: "" : "")
}, },
"删除" "删除"
), ),
...@@ -381,12 +417,21 @@ export default { ...@@ -381,12 +417,21 @@ export default {
attrs: { oprate: "detail" }, attrs: { oprate: "detail" },
on: { click: () => this.split(params.row) }, on: { click: () => this.split(params.row) },
style: style:
(params.row.divideMark != 0 && this.wfstatu == 1
params.row.id == params.row.rootId) || ? (
params.row.status != 1 || (params.row.divideMark != 0 &&
params.row.quantity <= 1 params.row.id == params.row.rootId) ||
params.row.status != 1 ||
params.row.quantity <= 1
? "display:none"
: "")
: (
(params.row.divideMark != 0 &&
params.row.id == params.row.rootId) ||
params.row.status != 3 ||
params.row.quantity <= 1
? "display:none" ? "display:none"
: "" : "")
}, },
"分解" "分解"
) )
...@@ -477,205 +522,7 @@ export default { ...@@ -477,205 +522,7 @@ export default {
list: [], list: [],
//data测试数据 //data测试数据
dataT: [], dataT: [],
dataTemp: [ dataTemp: [],
{
mesCode: "DDBH_20200414_32",
taskType: 2,
productId: 71,
quantity: 10,
remark: "5",
taskRequire: "4",
status: 1,
divideMark: 1,
productName: "铅笔",
drawnNumber: "qianbii11",
rootId: 0,
batchNumber: "5",
projectNumber: "5",
urgencyLevel: 2,
productingPreparationPeople: 0,
productingPreparationFinishDate: "0001-01-01 00:00:00",
quotationPeople: 0,
quotationFinishDate: "0001-01-01 00:00:00",
upId: 0,
demandStartDate: "2020-04-14 00:00:01",
demandFinishDate: "2020-04-15 00:00:01",
rootCode: "DDBH_20200414_32",
creationTime: "2020-04-16 17:21:03",
id: 46
},
{
mesCode: "DDBH_20200414_3202",
taskType: 2,
productId: 71,
quantity: 6,
remark: "5",
taskRequire: "4",
status: 4,
divideMark: 0,
productCode: "No1~No6",
productName: "铅笔",
drawnNumber: "qianbii11",
rootId: 46,
batchNumber: "5",
projectNumber: "5",
urgencyLevel: 2,
productingPreparationPeople: 56,
productingPreparationFinishDate: "2020-04-17 23:59:59",
quotationPeople: 108,
quotationFinishDate: "2020-04-17 23:59:59",
upId: 46,
demandStartDate: "2020-04-14 00:00:01",
demandFinishDate: "2020-04-15 00:00:01",
rootCode: "DDBH_20200414_32",
lastModificationTime: "2020-04-15 10:40:22",
lastModifierUserId: 1,
creationTime: "2020-04-14 17:32:13",
creatorUserId: 1,
id: 52
},
{
mesCode: "DDBH_20200414_320101",
taskType: 2,
productId: 71,
quantity: 3,
remark: "5",
taskRequire: "4",
status: 1,
divideMark: 0,
productName: "铅笔",
drawnNumber: "qianbii11",
rootId: 46,
batchNumber: "5",
projectNumber: "5",
urgencyLevel: 2,
productingPreparationPeople: 0,
productingPreparationFinishDate: "0001-01-01 00:00:00",
quotationPeople: 0,
quotationFinishDate: "0001-01-01 00:00:00",
upId: 51,
demandStartDate: "2020-04-14 00:00:01",
demandFinishDate: "2020-04-15 00:00:01",
rootCode: "DDBH_20200414_32",
lastModificationTime: "2020-04-14 17:50:18",
lastModifierUserId: 1,
creationTime: "2020-04-14 17:32:13",
creatorUserId: 1,
id: 53
},
{
mesCode: "DDBH_20200414_320102",
taskType: 2,
productId: 71,
quantity: 1,
remark: "5",
taskRequire: "4",
status: 1,
divideMark: 0,
productName: "铅笔",
drawnNumber: "qianbii11",
rootId: 46,
batchNumber: "5",
projectNumber: "5",
urgencyLevel: 2,
productingPreparationPeople: 0,
productingPreparationFinishDate: "0001-01-01 00:00:00",
quotationPeople: 0,
quotationFinishDate: "0001-01-01 00:00:00",
upId: 51,
demandStartDate: "2020-04-14 00:00:01",
demandFinishDate: "2020-04-15 00:00:01",
rootCode: "DDBH_20200414_32",
lastModificationTime: "2020-04-14 17:50:18",
lastModifierUserId: 1,
creationTime: "2020-04-14 17:32:13",
creatorUserId: 1,
id: 54
},
{
mesCode: "DDBH_20200414_31",
taskType: 2,
productId: 70,
quantity: 8,
remark: "5",
taskRequire: "4",
status: 4,
divideMark: 0,
productCode: "No1~No8",
productName: "口罩模具",
drawnNumber: "LXG_KZ_001",
rootId: 0,
batchNumber: "5",
projectNumber: "5",
urgencyLevel: 2,
productingPreparationPeople: 56,
productingPreparationFinishDate: "2020-04-16 23:59:59",
quotationPeople: 108,
quotationFinishDate: "2020-04-16 23:59:59",
upId: 0,
demandStartDate: "2020-04-14 00:00:01",
demandFinishDate: "2020-04-15 00:00:01",
rootCode: "DDBH_20200414_31",
isDeleted: false,
creationTime: "2020-04-16 17:21:03",
id: 45
},
{
mesCode: "DDBH_20200414_30",
taskType: 2,
productId: 69,
quantity: 18,
remark: "5",
taskRequire: "4",
status: 4,
divideMark: 0,
productCode: "No1~No18",
productName: "护目镜",
drawnNumber: "LXG_HMJ_001",
rootId: 0,
batchNumber: "5",
projectNumber: "5",
urgencyLevel: 2,
productingPreparationPeople: 56,
productingPreparationFinishDate: "2020-04-16 23:59:59",
quotationPeople: 1,
quotationFinishDate: "2020-04-24 23:59:59",
upId: 0,
demandStartDate: "2020-04-14 00:00:01",
demandFinishDate: "2020-04-15 00:00:01",
rootCode: "DDBH_20200414_30",
isDeleted: false,
creationTime: "2020-04-16 17:21:03",
id: 44
},
{
mesCode: "DDBH_20200414_28",
taskType: 1,
productId: 22,
quantity: 15,
remark: "rr",
taskRequire: "r",
status: 1,
divideMark: 0,
productName: "te",
drawnNumber: "te",
rootId: 0,
batchNumber: "r",
projectNumber: "rr",
urgencyLevel: 2,
productingPreparationPeople: 0,
productingPreparationFinishDate: "0001-01-01 00:00:00",
quotationPeople: 0,
quotationFinishDate: "0001-01-01 00:00:00",
upId: 0,
demandStartDate: "2020-04-14 00:00:01",
demandFinishDate: "2020-04-15 00:00:01",
rootCode: "DDBH_20200414_28",
isDeleted: false,
creationTime: "2020-04-16 17:21:03",
id: 42
}
],
data1: [], data1: [],
selectdata: [], selectdata: [],
//以下为手写死数据集: //以下为手写死数据集:
...@@ -700,7 +547,14 @@ export default { ...@@ -700,7 +547,14 @@ export default {
actMescodes: [], actMescodes: [],
delNum: 0, //判断是否可以进行修改 delNum: 0, //判断是否可以进行修改
arrayIds: [], //选择列表后的ids arrayIds: [], //选择列表后的ids
delMsg: "" //删除提示信息 delMsg: "", //删除提示信息
dataListRetrunNew: {
schemaId: "123327da-42b3-41f6-b785-cf933f137a95", //订单送审的schemaId
idList: [], //订单id List
codeList: [], //订单编号List
operatorIdList: [] //操作员id
}, //确定后返回数据
wfstatu: 1 //流程是否启用1 禁用 0启用
}; };
}, },
created() { created() {
...@@ -708,6 +562,20 @@ export default { ...@@ -708,6 +562,20 @@ export default {
}, },
mounted() { mounted() {
this.initTree(); this.initTree();
let params = {
id: "123327da-42b3-41f6-b785-cf933f137a95"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
this.wfstatu = 1;
} else {
this.wfstatu = 3;
}
}
});
//this.dataformat();//data传数据转为tree类型 //this.dataformat();//data传数据转为tree类型
this.tableHeight = window.innerHeight - 220; this.tableHeight = window.innerHeight - 220;
//this.$refs.CustomTable.getTableHeight(this.tableHeight); //this.$refs.CustomTable.getTableHeight(this.tableHeight);
...@@ -847,47 +715,53 @@ export default { ...@@ -847,47 +715,53 @@ export default {
}); });
this.splitModal = false; this.splitModal = false;
this.ModalInfo = false; this.ModalInfo = false;
//确定批量操作 },
// if (this.ModalInfoStaut == 'orderSendReview') { //打开送审modal
// this.$http.order.batchstart(this.dataListRetrun).then((res) => { openSendViewModal() {
// if (res.success) { this.actIds = [];
// this.$Message.success('订单送审成功!') this.delNum = 0;
// this.easySearch('') if (this.rowDataArry.length > 0) {
// } else { this.rowDataArry.forEach(data => {
// this.$Message.error('订单送审失败!') this.actIds.push(data.id);
// } if (data.status != 1) {
// }) //判断非新建状态的订单
// this.ModalOrderSendReview = false this.delNum += 1;
// } else if (this.ModalInfoStaut == 'delOrder') { }
// this.$http.order.delOrder(this.dataListRetrunParam).then((res) => { });
// if (res.result) { setTimeout(() => {
// this.$Message.success('删除成功!') if (this.delNum > 0) {
// this.easySearch('') this.$Message.error("所选的订单中有不可送审的订单!");
// } else { this.actIds = [];
// this.$Message.error('删除失败!') this.sendViewModal = false;
// } } else {
// this.$refs.createOrder.resetFields() this.sendViewModal = true;
// this.createShow = false }
// }) }, 400);
// } else if (this.ModalInfoStaut == 'orderSend') { } else {
// this.$http.order.orderSend(this.dataListRetrun).then((res) => { this.$Message.error("请选择订单");
// if (res.result) { }
// this.$Message.success('订单派发成功!') },
// this.easySearch('') //确定送审
// this.ModalOrderSend = false sendViewOk() {
// } else { this.dataListRetrunNew.idList = [];
// this.$Message.error('订单派发失败!') this.dataListRetrunNew.codeList = [];
// } this.dataListRetrunNew.operatorIdList = [];
// }) this.rowDataArry.forEach(item => {
// } else { this.dataListRetrunNew.idList.push(item.id);
// Api.mesorderdivide(this.dataListRetrun).then(res => { this.dataListRetrunNew.codeList.push(item.mesCode);
// if (res.result) { });
// this.$Message.success("订单分解成功!"); let ues = this.$refs.userProcess;
// } else { this.dataListRetrunNew.operatorIdList = this.$refs.orderSendView.getUsers();
// this.$Message.error("订单分解失败!"); //返回审批数据
// } //alert(JSON.stringify(this.dataListRetrunNew));
// }); this.$http.order.batchstart(this.dataListRetrunNew).then(res => {
//} if (res.success) {
this.$Message.success("订单送审成功!");
this.$refs.grid.load();
} else {
this.$Message.error("订单送审失败!");
}
});
}, },
//打开派发 //打开派发
openSendModal() { openSendModal() {
...@@ -896,7 +770,7 @@ export default { ...@@ -896,7 +770,7 @@ export default {
if (this.rowDataArry.length > 0) { if (this.rowDataArry.length > 0) {
this.rowDataArry.forEach(data => { this.rowDataArry.forEach(data => {
this.actIds.push(data.id); this.actIds.push(data.id);
if (data.status != 1) { if (data.status != 3) {
//判断非新建状态的订单 //判断非新建状态的订单
this.delNum += 1; this.delNum += 1;
} }
......
<template> <template>
<div style="width:100%;margin:0 auto"> <div style="width:100%;margin:0 auto">
<Detail ref="detailRow" :row="row1" v-show="dataList.length==1"></Detail> <Table border :columns="columns1" :data="dataList" class="tableCommon" :height="tbHeight"></Table>
<Table
border
:columns="columns1"
:data="dataList"
class="tableCommon"
v-show="dataList.length>1"
:height="tbHeight"
></Table>
<div style="width100%;margin:40px auto"> <div style="width100%;margin:40px auto">
<Form <Row>
:model="orderForm" <Process ref="userProcess" schemaIdVal="123327da-42b3-41f6-b785-cf933f137a95" />
:label-width="110" </Row>
class="margin-top-20 margin-bottom-50"
:rules="ruleValidate"
ref="formValidate"
>
<Row>
<Col span="6">
<FormItem label="生产车间" style="width:100%" prop="ProductingPreparationPeople">
<WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" />
</FormItem>
</Col>
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="ProductingPreparationFinishDate">
<DatePicker
v-model="orderForm.ProductingPreparationFinishDate"
type="date"
placeholder="请选择日期"
@on-change="getTimeProductPFD"
></DatePicker>
</FormItem>
</Col>
<Col span="6">
<FormItem label="订单报价人员" style="width:100%" prop="QuotationPeople">
<UserSelect ref="userSelected" v-model="orderForm.QuotationPeople" />
</FormItem>
</Col>
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="QuotationFinishDate">
<DatePicker
v-model="orderForm.QuotationFinishDate"
type="date"
placeholder="请选择日期"
@on-change="getTimeQuotationFD"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Detail from "./detail"; import Process from "@/components/orderOperator/process";
var myDate = new Date();
export default { export default {
name: "send", name: "sendView",
components: { components: {
Detail Process
}, },
data() { data() {
return { return {
divHeight: "400px", divHeight: "400px",
roleTitle: "工艺员",
orderForm: {
ProductingPreparationPeople: null, //生产准备
ProductingPreparationFinishDate: "", //生产准备完成时间
QuotationPeople: null, //订单报价人员
QuotationFinishDate: "" //订单报价完成时间
},
columns1: [ columns1: [
{ {
title: this.l("mesCode"), title: this.l("mesCode"),
...@@ -111,42 +58,10 @@ export default { ...@@ -111,42 +58,10 @@ export default {
dataList: [], dataList: [],
row1: {}, row1: {},
dataListRetrun: [], //确定后返回数据 dataListRetrun: [], //确定后返回数据
ruleValidate: {
ProductingPreparationPeople: [
{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}
],
ProductingPreparationFinishDate: [
{
required: true,
message: "请选择时间",
trigger: "change"
}
],
QuotationPeople: [
{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}
],
QuotationFinishDate: [
{
required: true,
message: "请选择时间",
trigger: "change"
}
]
},
rowList: [], rowList: [],
row1: {}, row1: {},
tbHeight: 0 tbHeight: 0,
}; };
}, },
props: { props: {
...@@ -158,55 +73,17 @@ export default { ...@@ -158,55 +73,17 @@ export default {
} }
}, },
methods: { methods: {
returnData() { getUsers() {
let objStr = {}; let ues = this.$refs.userProcess;
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople; return ues.immutData;
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate;
objStr.QuotationPeople = this.orderForm.QuotationPeople;
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate;
//返回审批数据
return objStr;
},
getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = this.getFormatDateEnd(
value
);
},
getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = this.getFormatDateEnd(value);
},
getFormatDateEnd(dates) {
const d = new Date(dates);
const resDate =
d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate()) +
" 23:59:59";
return resDate;
},
p(s) {
return s < 10 ? "0" + s : s;
}, },
l(key) { l(key) {
let vkey = "mes_plan" + "." + key; let vkey = "mes_plan" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
} }
}, },
created() { created() {},
//var theight = window.innerHeight - 400 + "px"; mounted() {},
// this.divHeight = theight;
},
mounted() {
// window.onresize = () => {
// ///浏览器窗口大小变化
// return (() => {
// window.screenHeight = window.innerHeight;
// this.divHeight = window.screenHeight - 400 + "px";
// })();
// };
},
watch: { watch: {
row(v) { row(v) {
if (v != []) { if (v != []) {
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
<div class="photosensitive"> <div class="photosensitive">
<Modal <Modal
v-model="modalShow" v-model="modalShow"
title="订单报价" title="订单报价5"
width="90%" width="90%"
:mask-closable="false" :mask-closable="false"
@on-cancel="cancel" @on-cancel="cancel"
fullscreen fullscreen
footer-hide footer-hide
> >
{{status}}
<Form :model="formItem" :label-width="80"> <Form :model="formItem" :label-width="80">
<Row type="flex" justify="space-between"> <Row type="flex" justify="space-between">
<Col span="8"> <Col span="8">
...@@ -122,6 +123,7 @@ export default { ...@@ -122,6 +123,7 @@ export default {
zPhotosensitive: { zPhotosensitive: {
result: [] result: []
}, },
status: 0,
row: {}, row: {},
index: "", index: "",
newList: [], newList: [],
...@@ -130,7 +132,8 @@ export default { ...@@ -130,7 +132,8 @@ export default {
contactUser: "", contactUser: "",
contactTel: "", contactTel: "",
quotationType: "AlSi10Mg", quotationType: "AlSi10Mg",
remark: "" remark: "",
status: ""
}, },
values1: "", values1: "",
values2: "", values2: "",
...@@ -265,7 +268,17 @@ export default { ...@@ -265,7 +268,17 @@ export default {
] ]
}; };
}, },
mounted() {}, mounted() {
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
watch: { watch: {
gmData: { gmData: {
...@@ -335,6 +348,13 @@ export default { ...@@ -335,6 +348,13 @@ export default {
quotationBox() { quotationBox() {
//订单报价 //订单报价
// console.log(this.newList) // console.log(this.newList)
if (this.status == 0) {
this.formItem.status = 1;
alert(this.formItem.status);
} else {
this.formItem.status = 3;
alert(this.formItem.status);
}
let item = []; let item = [];
let quotationMain = {}; let quotationMain = {};
let data = { let data = {
...@@ -348,21 +368,26 @@ export default { ...@@ -348,21 +368,26 @@ export default {
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true; if (this.status == 1) {
let id = res.result.id; this.modalShow = false;
this.$http.quotation this.$emit("update");
.orderList({ } else {
id: id this.$refs.photosensitive.modalShow = true;
}) let id = res.result.id;
.then(res => { this.$http.quotation
res.result.forEach((data, index) => { .orderList({
res.result[index].quotationId = id; id: id
})
.then(res => {
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
}); });
this.zPhotosensitive.result = res.result; }
})
.catch(error => {
this.$Message.error("请求失败");
});
} }
}) })
.catch(error => { .catch(error => {
...@@ -476,8 +501,8 @@ export default { ...@@ -476,8 +501,8 @@ export default {
} }
}); });
}, },
cancel() { cancel() {
this.$emit('update') this.$emit("update");
} }
} }
}; };
......
...@@ -85,6 +85,7 @@ export default { ...@@ -85,6 +85,7 @@ export default {
zPhotosensitive: { zPhotosensitive: {
result: [] result: []
}, },
status: 0,
row: {}, row: {},
index: "", index: "",
newList: [], newList: [],
...@@ -93,7 +94,8 @@ export default { ...@@ -93,7 +94,8 @@ export default {
contactUser: "", contactUser: "",
contactTel: "", contactTel: "",
quotationType: "光敏树脂", quotationType: "光敏树脂",
remark: "" remark: "",
status: ""
}, },
values1: "", values1: "",
values2: "", values2: "",
...@@ -190,7 +192,17 @@ export default { ...@@ -190,7 +192,17 @@ export default {
// deep: true // deep: true
// } // }
// }, // },
mounted() {}, mounted() {
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
computed: { computed: {
Order3D() { Order3D() {
//计算3D打印费=重量(g)*单价(元/g) //计算3D打印费=重量(g)*单价(元/g)
...@@ -215,6 +227,13 @@ export default { ...@@ -215,6 +227,13 @@ export default {
}, },
quotationBox() { quotationBox() {
//订单报价 //订单报价
if (this.status == 0) {
this.formItem.status = 1;
alert(this.formItem.status);
} else {
this.formItem.status = 3;
alert(this.formItem.status);
}
let item = []; let item = [];
let quotationMain = {}; let quotationMain = {};
let data = { let data = {
...@@ -227,22 +246,27 @@ export default { ...@@ -227,22 +246,27 @@ export default {
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true; if (this.status == 1) {
let id = res.result.id; this.modalShow = false;
this.$http.quotation this.$emit("update");
.orderList({ } else {
id: id this.$refs.photosensitive.modalShow = true;
}) let id = res.result.id;
.then(res => { this.$http.quotation
console.log(res); .orderList({
res.result.forEach((data, index) => { id: id
res.result[index].quotationId = id; })
.then(res => {
console.log(res);
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
}); });
this.zPhotosensitive.result = res.result; }
})
.catch(error => {
this.$Message.error("请求失败");
});
} }
}) })
.catch(error => { .catch(error => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="quotation-box"> <div class="quotation-box">
<Modal <Modal
v-model="modalShow" v-model="modalShow"
title="订单报价" title="订单报价1"
width="90%" width="90%"
:mask-closable="false" :mask-closable="false"
@on-cancel="cancel" @on-cancel="cancel"
......
...@@ -34,6 +34,8 @@ export default { ...@@ -34,6 +34,8 @@ export default {
batchstart(params) { batchstart(params) {
return Api.post(`${workflowUrl}/instance/batchstart`, params); //合格证送审 return Api.post(`${workflowUrl}/instance/batchstart`, params); //合格证送审
}, },
getbyid(params) {
return Api.get(`${workflowUrl}/schema/getbyid`, params); //流程判断启用禁用
},
} }
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<Checkbox <Checkbox
v-model="index" v-model="index"
@change.native="changeBox(index,item.id)" @change.native="changeBox(index,item.id)"
v-if="item.status==1" v-if="item.status==1 && status==0"
> >
<state code="qms.certificate.status" :value="item.status" /> <state code="qms.certificate.status" :value="item.status" />
</Checkbox> </Checkbox>
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
</template> </template>
<script> <script>
import Api from '../../certificate/api' import Api from "../../certificate/api";
import PdfDetail from './pdfDetail' import PdfDetail from "./pdfDetail";
import Edit from './edit' import Edit from "./edit";
import Examine from './examine' import Examine from "./examine";
export default { export default {
name: '', name: "",
components: { components: {
PdfDetail, PdfDetail,
Edit, Edit,
...@@ -77,6 +77,7 @@ export default { ...@@ -77,6 +77,7 @@ export default {
}, },
data() { data() {
return { return {
status: 0,
zanwushuju: false, zanwushuju: false,
index: false, index: false,
arrId: [], arrId: [],
...@@ -98,95 +99,101 @@ export default { ...@@ -98,95 +99,101 @@ export default {
checkboxList: [], checkboxList: [],
indeterminate: true, indeterminate: true,
checkAll: false checkAll: false
} };
},
created() {
Api.getbyid({
id: "207b59eb-4fca-4324-b5cd-46f48a5ff21d"
}).then(r => {
this.status = r.result.status; //status为0的话为启用,有送审,为1的话,流程是禁用的,没有送审按钮
});
}, },
methods: { methods: {
load(v) { load(v) {
Api.ordercertificate({ id: v }).then(r => {
Api.ordercertificate({ id: v }).then((r) => { this.checkboxList = r.result;
this.checkboxList = r.result
if (this.checkboxList) { if (this.checkboxList) {
this.zanwushuju = false this.zanwushuju = false;
} else { } else {
this.zanwushuju = true this.zanwushuju = true;
} }
}) });
}, },
handleExport(id) { handleExport(id) {
this.pdfModal = true this.pdfModal = true;
this.curId = id this.curId = id;
}, },
addOk() { addOk() {
this.editModal = false this.editModal = false;
this.curId = null this.curId = null;
this.$emit('on-ok') this.$emit("on-ok");
}, },
cancel() { cancel() {
this.editModal = false this.editModal = false;
this.examineModal = false this.examineModal = false;
}, },
edit(id) { edit(id) {
this.editModal = true this.editModal = true;
this.curId = id this.curId = id;
}, },
delet(id) { delet(id) {
this.$Modal.confirm({ this.$Modal.confirm({
title: '删除', title: "删除",
content: '<p>您确定要删除此合格证吗</p>', content: "<p>您确定要删除此合格证吗</p>",
onOk: () => { onOk: () => {
Api.certificatedelete({ id: id }).then((r) => { Api.certificatedelete({ id: id }).then(r => {
if (r.result) { if (r.result) {
this.$Message.info('删除成功') this.$Message.info("删除成功");
this.load(this.eid) this.load(this.eid);
} }
}) });
}, },
onCancel: () => { onCancel: () => {
this.$Message.info('已取消删除') this.$Message.info("已取消删除");
} }
}) });
}, },
canselFooter() {}, canselFooter() {},
upChange() { upChange() {
if (this.arr.length == 1) { if (this.arr.length == 1) {
this.$refs.examine.info = true this.$refs.examine.info = true;
this.$refs.examine.tableInfo = false this.$refs.examine.tableInfo = false;
} else { } else {
this.$refs.examine.info = false this.$refs.examine.info = false;
this.$refs.examine.tableInfo = true this.$refs.examine.tableInfo = true;
} }
this.arrId = this.arr this.arrId = this.arr;
this.examineModal = true this.examineModal = true;
}, },
changeBox(index, id) { changeBox(index, id) {
if (index == true) { if (index == true) {
this.arr.push(id) this.arr.push(id);
} else if (index == false) { } else if (index == false) {
for (var i = 0; i < this.arr.length; i++) { for (var i = 0; i < this.arr.length; i++) {
if (this.arr[i] == id) { if (this.arr[i] == id) {
this.arr.splice(i, 1) this.arr.splice(i, 1);
} }
} }
return this.arr return this.arr;
} }
} }
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v != null) { if (v != null) {
this.checkboxList = [] this.checkboxList = [];
this.load(v) this.load(v);
} }
}, },
arr(v) { arr(v) {
if (this.arr.length >= 1) { if (this.arr.length >= 1) {
this.show = true this.show = true;
} else { } else {
this.show = false this.show = false;
} }
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -240,6 +247,5 @@ a { ...@@ -240,6 +247,5 @@ a {
} }
.shuju { .shuju {
margin: 30px 0 30px 48%; margin: 30px 0 30px 48%;
} }
</style> </style>
\ No newline at end of file
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button> <Button @click="handleClose" class="ml20">取消</Button>
<Checkbox v-model="submit" class="ml20">是否送审</Checkbox> <Checkbox v-model="submit" class="ml20" v-if="status==0">是否送审</Checkbox>
</FormItem> </FormItem>
</Form> </Form>
<Modal v-model="examineModal" title="合格证送审" footer-hide fullscreen :mask-closable="false"> <Modal v-model="examineModal" title="合格证送审" footer-hide fullscreen :mask-closable="false">
...@@ -130,10 +130,10 @@ ...@@ -130,10 +130,10 @@
</div> </div>
</template> </template>
<script> <script>
import Api from '../../certificate/api' import Api from "../../certificate/api";
import Examine from '../endIssued/examine' import Examine from "../endIssued/examine";
export default { export default {
name: 'Add', name: "Add",
props: { props: {
eid: Number eid: Number
}, },
...@@ -142,207 +142,221 @@ export default { ...@@ -142,207 +142,221 @@ export default {
}, },
data() { data() {
return { return {
isId: '', isId: "",
examineModal: false, examineModal: false,
submit: true, submit: true,
isDisabled: false, isDisabled: false,
codeDisabled: false, codeDisabled: false,
results: [], results: [],
status: 0,
parms: { parms: {
app: 'certificateUrl', //服务 app: "certificateUrl", //服务
eid: null, //记录id eid: null, //记录id
name: 'ProductCertificateExamItem', //表名(检验项表名) name: "ProductCertificateExamItem", //表名(检验项表名)
field: 'file' //字段名 field: "file" //字段名
}, },
disabled: false, disabled: false,
entity: { entity: {
id: 0 id: 0,
status: ""
}, },
rules: { rules: {
businessName: [{ required: true, message: '必填', trigger: 'blur' }], // userUnit: [{ required: true, message: "必填", trigger: "change" }],
businessCode: [{ required: true, message: '必填', trigger: 'blur' }] // productQuantity: [{ required: true, message: "必填", trigger: "change" }]
}, },
easySearch: { easySearch: {
keys: { op: 'mesCode', value: '' }, keys: { op: "mesCode", value: "" },
type: { op: 'Equal', value: 1 } type: { op: "Equal", value: 1 }
}, },
columns: [ columns: [
{ {
title: '序号', title: "序号",
type: 'index', type: "index",
width: 80, width: 80,
align: 'center' align: "center"
}, },
{ {
title: '检验项目', title: "检验项目",
key: 'name', key: "name",
align: 'center', align: "center",
slot: 'name' slot: "name"
}, },
{ {
title: '要求', title: "要求",
key: 'require', key: "require",
align: 'center', align: "center",
slot: 'require' slot: "require"
}, },
{ {
title: '预测结果', title: "预测结果",
key: 'result', key: "result",
align: 'center', align: "center",
slot: 'result' slot: "result"
}, },
{ {
key: 'file', key: "file",
title: '附件', title: "附件",
slot: 'pash', slot: "pash",
width: 400, width: 400,
align: 'center' align: "center"
}, },
{ {
title: '结论', title: "结论",
key: 'conclusion', key: "conclusion",
align: 'center', align: "center",
slot: 'conclusion' slot: "conclusion"
}, },
{ {
title: '备注', title: "备注",
align: 'center', align: "center",
key: 'remark', key: "remark",
slot: 'remark' slot: "remark"
}, },
{ {
title: '操作', title: "操作",
slot: 'action', slot: "action",
width: 100, width: 100,
align: 'center' align: "center"
} }
], ],
checkList: [] checkList: []
} };
}, },
created() { created() {
this.addNew() this.addNew();
this.isDisabled = true this.isDisabled = true;
Api.getbyid({
id: "207b59eb-4fca-4324-b5cd-46f48a5ff21d"
}).then(r => {
this.status = r.result.status; //status为0的话为启用,有送审,为1的话,流程是禁用的,没有送审按钮
if (this.status == 0) {
this.submit = true;
} else {
this.submit = false;
}
});
}, },
methods: { methods: {
change(e) { change(e) {
this.entity.productQuantity = e.length + '' this.entity.productQuantity = e.length + "";
}, },
getOrder(v) { getOrder(v) {
Api.testItems({ id: v }).then((r) => { Api.testItems({ id: v }).then(r => {
if (r.result !== null) { if (r.result !== null) {
this.checkList = r.result this.checkList = r.result;
} }
}) });
}, },
setRow(row, index) { setRow(row, index) {
this.$set(this.checkList, index, row) this.$set(this.checkList, index, row);
}, },
handleSubmit() { handleSubmit() {
this.entity.items = this.checkList this.entity.items = this.checkList;
this.entity.items.forEach(c => {
this.entity.items.forEach((c) => { return delete c.id;
return delete c.id });
}) this.$refs.form.validate(v => {
this.$refs.form.validate((v) => { this.arrId = [];
this.arrId = []
if (v) { if (v) {
this.disabled = true this.disabled = true;
this.entity.orderId = this.$refs.codes.orderId this.entity.orderId = this.$refs.codes.orderId;
this.entity.codeIds = this.$refs.codes.codeIds this.entity.codeIds = this.$refs.codes.codeIds;
this.entity.productSerialNumber = this.entity.productSerialNumber.join( this.entity.productSerialNumber = this.entity.productSerialNumber.join(
',' ","
) );
if (this.status == 1) {
this.entity.status = 4;
}
if (this.submit == true) { if (this.submit == true) {
//送审 //送审
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then(r => {
if (r.success) { if (r.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.$emit('on-ok') this.$emit("on-ok");
this.entity = {} this.entity = {};
this.disabled = false this.disabled = false;
this.isId = r.result this.isId = r.result;
this.examineModal = true this.examineModal = true;
} else { } else {
this.$Message.error('保存失败') this.$Message.error("保存失败");
this.disabled = false this.disabled = false;
} }
}) })
.catch((err) => { .catch(err => {
this.disabled = false this.disabled = false;
this.$Message.error('保存失败') this.$Message.error("保存失败");
console.warn(err) console.warn(err);
}) });
} else { } else {
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then(r => {
if (r.success) { if (r.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.$emit('on-ok') this.$emit("on-ok");
this.entity = {} this.entity = {};
this.disabled = false this.disabled = false;
} else { } else {
this.$Message.error('保存失败') this.$Message.error("保存失败");
this.disabled = false this.disabled = false;
} }
}) })
.catch((err) => { .catch(err => {
this.disabled = false this.disabled = false;
this.$Message.error('保存失败') this.$Message.error("保存失败");
console.warn(err) console.warn(err);
}) });
} }
} }
}) });
}, },
remove(index) { remove(index) {
this.checkList.splice(index, 1) this.checkList.splice(index, 1);
}, },
getParams(id) { getParams(id) {
return 'app=qms&name=ProductCertificateExamItem&field=file&eid=' + id return "app=qms&name=ProductCertificateExamItem&field=file&eid=" + id;
}, },
addNew() { addNew() {
if (this.checkList) { if (this.checkList) {
let obj = { let obj = {
file: '', file: "",
fileId: this.$u.guid() fileId: this.$u.guid()
} };
this.checkList.push(obj) this.checkList.push(obj);
} else { } else {
var arr = new Array() var arr = new Array();
this.checkList = arr this.checkList = arr;
let obj = { let obj = {
file: '', file: "",
fileId: this.$u.guid() fileId: this.$u.guid()
} };
this.checkList.push(obj) this.checkList.push(obj);
} }
}, },
handleClose() { handleClose() {
this.$emit('on-close') this.$emit("on-close");
}, },
close() { close() {
this.examineModal = false this.examineModal = false;
this.$emit('on-close') this.$emit("on-close");
}, },
l(key) { l(key) {
key = 'waitOpened' + '.' + key key = "waitOpened" + "." + key;
return this.$t(key) return this.$t(key);
} }
}, },
watch: { watch: {
v() { v() {
this.entity = this.$u.clone(this.v) this.entity = this.$u.clone(this.v);
}, },
eid(v) { eid(v) {
if (v != 0) { if (v != 0) {
this.checkList = [] this.checkList = [];
this.getOrder(v) this.getOrder(v);
} }
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jy-boder { .jy-boder {
......
<template> <template>
<div class="wait-opened"> <div class="wait-opened">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false" :height="tdHeight" ></DataGrid> <DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:high="false"
:height="tdHeight"
></DataGrid>
<Modal v-model="addModal" title="开合格证" fullscreen footer-hide :mask-closable="false"> <Modal v-model="addModal" title="开合格证" fullscreen footer-hide :mask-closable="false">
<Add @on-close="cancel" @on-ok="addOk" :eid="curId" ref="addFile" /> <Add @on-close="cancel" @on-ok="addOk" :eid="curId" ref="addFile" />
</Modal> </Modal>
...@@ -8,10 +15,10 @@ ...@@ -8,10 +15,10 @@
</template> </template>
<script> <script>
import Api from '../api' import Api from "../api";
import Add from './add' import Add from "./add";
export default { export default {
name: 'index', name: "index",
components: { components: {
Add Add
}, },
...@@ -21,144 +28,144 @@ export default { ...@@ -21,144 +28,144 @@ export default {
checkLists: [], checkLists: [],
addModal: false, addModal: false,
curId: null, curId: null,
tdHeight:'', tdHeight: "",
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
key: 'mesCode', key: "mesCode",
title: this.l('mesCode'), title: this.l("mesCode"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'productName', key: "productName",
title: this.l('productName'), title: this.l("productName"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'drawnNumber', key: "drawnNumber",
title: this.l('drawnNumber'), title: this.l("drawnNumber"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'quantity', key: "quantity",
title: this.l('quantity'), title: this.l("quantity"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'qualifiedQuantity', key: "qualifiedQuantity",
title: this.l('qualifiedQuantity'), title: this.l("qualifiedQuantity"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'uncertificateQuantity', key: "uncertificateQuantity",
title: this.l('uncertificateQuantity'), title: this.l("uncertificateQuantity"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'actualFinishDate', key: "actualFinishDate",
title: this.l('actualFinishDate'), title: this.l("actualFinishDate"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
width: 180, width: 180,
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
params.row.actualFinishDate == '0001-01-01 00:00:00' params.row.actualFinishDate == "0001-01-01 00:00:00"
? '' ? ""
: params.row.actualFinishDate : params.row.actualFinishDate
) );
} }
}, },
{ {
key: 'productingPreparationPeople', key: "productingPreparationPeople",
title: this.l('productingPreparationPeople'), title: this.l("productingPreparationPeople"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'status', key: "status",
title: this.l('status'), title: this.l("status"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
code: 'plan.order.status' code: "plan.order.status"
}, },
{ {
title: '操作', title: "操作",
key: 'id', key: "id",
// width: 250, // width: 250,
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'add' oprate: "add"
}, },
on: { click: () => this.add(params.row) } on: { click: () => this.add(params.row) }
}, },
'开合格证' "开合格证"
) )
]) ]);
} }
} }
], ],
easySearch: { easySearch: {
keys: { op: 'mesCode', value: null, default: true }, keys: { op: "mesCode", value: null, default: true },
type: { op: 'Equal', value: 1 } type: { op: "Equal", value: 1 }
} }
} };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() {}, mounted() {},
created() { created() {
this.tdHeight = window.innerHeight - 200 this.tdHeight = window.innerHeight - 200;
}, },
methods: { methods: {
addOk() { addOk() {
// this.$refs.grid.load() this.$refs.grid.load();
this.addModal = false this.addModal = false;
this.curId = 0 this.curId = 0;
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.addModal = false this.addModal = false;
}, },
reload() { reload() {
this.$refs.grid.load() this.$refs.grid.load();
}, },
add(row) { add(row) {
this.addModal = true this.addModal = true;
this.curId = row.id this.curId = row.id;
this.$refs.addFile.entity.productName = row.productName this.$refs.addFile.entity.productName = row.productName;
this.$refs.addFile.entity.productStatus = row.status this.$refs.addFile.entity.productStatus = row.status;
this.$refs.addFile.entity.productCode = row.drawnNumber this.$refs.addFile.entity.productCode = row.drawnNumber;
}, },
// 列表title // 列表title
l(key) { l(key) {
let vkey = 'waitOpened' + '.' + key let vkey = "waitOpened" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
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