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 {
load(v) {
this.dataImmut = [];
this.dataMut = [];
let url = `${workflowUrl}/schema/intend`;
// this.$api.get(url, { schemaId: v }).then(r => {
// if (r.success) {
// // console.warn("VVVV",r)
// r.result.nodes.map((u, i) => {
// if (i > 0) {
// let ids = u.defaultUsers.immutable.concat(u.defaultUsers.mutable);
// u.defaultUsers.immutable = ids;
// 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();
// }
// });
//判断流程是否启用
let params = {
id: v
};
this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
//启用
let url = `${workflowUrl}/schema/intend`;
this.$api.get(url, { schemaId: v }).then(r => {
if (r.success) {
// console.warn("VVVV",r)
r.result.nodes.map((u, i) => {
if (i > 0) {
let ids = u.defaultUsers.immutable.concat(
u.defaultUsers.mutable
);
u.defaultUsers.immutable = ids;
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() {
var ids = [];
......
<template>
<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>
</template>
<script>
......
......@@ -118,9 +118,7 @@ export default {
}
},
downUrl: fileUrlDown,
columns: {
count:7,
},
columns: [],
comondata:[
{
productName: "受电弓",
......
.new_body{
&{
background: #fff;
}
}
.set_card{
padding: 12px 30px 0;
.set_card_box{
......@@ -18,6 +23,7 @@
width: 150px;
height: 120px;
text-align: center;
margin: 0 auto;
}
.statu_box{
line-height: 30px;
......@@ -32,11 +38,11 @@
margin: 0 10px 0 0;
}
.set_masage{
min-height: 125px;
height: 125px;
line-height: 25px;
.time_bg{
background: #267feb49;
line-height: 34px;
margin: 0 auto;
width: 160px;
text-align: center;
border-radius: 3px;
......@@ -44,8 +50,13 @@
}
.set_masage02{
line-height: 35px;
height: 144px;
text-align: center;
}
}
.echarts02{
height: 462px;
}
}
}
#echarts{
......@@ -58,7 +69,7 @@
.tips_item{
background: #eff1f7;
margin: 20px;
line-height: 38px;
line-height: 58px;
padding: 0 20px;
.item_top{
border-bottom: 1px solid #b1b1b1;
......
......@@ -2,7 +2,7 @@
@import "./mnc.less";
</style>
<template>
<div>
<div class="new_body">
<a class="back_href" @click="goView">
<Icon type="ios-undo-outline" size="24" />返回设备监控
</a>
......@@ -74,7 +74,7 @@
<p class="set_top">设备状态</p>
<div class="set_card_body">
<Row>
<Col span="9">
<Col span="24">
<div class="set_img statu_box">
<img v-if="formData.statu=='关机'" src="../image/guan.png" alt="">
<img v-else-if="formData.statu=='空闲'" src="../image/kong.png" alt="">
......@@ -83,7 +83,7 @@
<p>{{formData.statu}}</p>
</div>
</Col>
<Col span="15">
<Col span="24">
<div class="set_masage set_masage02">
<p>当前状态开始时间:</p>
<p class="time_bg">11:45:05</p>
......@@ -96,7 +96,7 @@
</div>
<div class="set_card_box">
<p class="set_top">加工状态统计</p>
<div class="center">
<div class="center echarts02">
<Echart2 ></Echart2>
</div>
</div>
......@@ -151,7 +151,7 @@
<p>当前刀具名称:<span class="item_right"> GD236689 </span></p>
<p>当前刀库号: <span class="item_right"> 1213 </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"> 200 </span></p>
</div>
......
......@@ -33,6 +33,6 @@ export default {
return Api.post(`${workflowUrl}/instance/batchstart`, 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 {
}
]
},
disabled: false
disabled: false,
wfstatu: 1
};
},
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();
},
methods: {
......@@ -182,7 +197,7 @@ export default {
this.$refs.formValidate.validate(v => {
if (v) {
this.disabled = true;
this.orderSearchForm.status = 1;
this.orderSearchForm.status = this.wfstatu;
Api.mesplancreate(this.orderSearchForm)
.then(r => {
this.disabled = false;
......
......@@ -147,7 +147,8 @@ export default {
},
placeholdeinfo: "",
list: [],
data1: []
data1: [],
wfstatu: 1
};
},
props: {
......@@ -159,6 +160,19 @@ export default {
}
},
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();
},
methods: {
......@@ -172,7 +186,7 @@ export default {
this.$refs.formValidate.validate(v => {
if (v) {
this.disabled = true;
this.orderSearchForm.status = 1;
this.orderSearchForm.status = this.wfstatu;
Api.mesorderupdate(this.orderSearchForm)
.then(r => {
this.disabled = false;
......
This diff is collapsed.
<template>
<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"
v-show="dataList.length>1"
:height="tbHeight"
></Table>
<Table border :columns="columns1" :data="dataList" class="tableCommon" :height="tbHeight"></Table>
<div style="width100%;margin:40px auto">
<Form
:model="orderForm"
:label-width="110"
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>
<Row>
<Process ref="userProcess" schemaIdVal="123327da-42b3-41f6-b785-cf933f137a95" />
</Row>
</div>
</div>
</template>
<script>
import Detail from "./detail";
var myDate = new Date();
import Process from "@/components/orderOperator/process";
export default {
name: "send",
name: "sendView",
components: {
Detail
Process
},
data() {
return {
divHeight: "400px",
roleTitle: "工艺员",
orderForm: {
ProductingPreparationPeople: null, //生产准备
ProductingPreparationFinishDate: "", //生产准备完成时间
QuotationPeople: null, //订单报价人员
QuotationFinishDate: "" //订单报价完成时间
},
columns1: [
{
title: this.l("mesCode"),
......@@ -111,42 +58,10 @@ export default {
dataList: [],
row1: {},
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: [],
row1: {},
tbHeight: 0
tbHeight: 0,
};
},
props: {
......@@ -158,55 +73,17 @@ export default {
}
},
methods: {
returnData() {
let objStr = {};
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople;
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;
getUsers() {
let ues = this.$refs.userProcess;
return ues.immutData;
},
l(key) {
let vkey = "mes_plan" + "." + key;
return this.$t(vkey) || key;
}
},
created() {
//var theight = window.innerHeight - 400 + "px";
// this.divHeight = theight;
},
mounted() {
// window.onresize = () => {
// ///浏览器窗口大小变化
// return (() => {
// window.screenHeight = window.innerHeight;
// this.divHeight = window.screenHeight - 400 + "px";
// })();
// };
},
created() {},
mounted() {},
watch: {
row(v) {
if (v != []) {
......
......@@ -2,13 +2,14 @@
<div class="photosensitive">
<Modal
v-model="modalShow"
title="订单报价"
title="订单报价5"
width="90%"
:mask-closable="false"
@on-cancel="cancel"
fullscreen
footer-hide
>
{{status}}
<Form :model="formItem" :label-width="80">
<Row type="flex" justify="space-between">
<Col span="8">
......@@ -122,6 +123,7 @@ export default {
zPhotosensitive: {
result: []
},
status: 0,
row: {},
index: "",
newList: [],
......@@ -130,7 +132,8 @@ export default {
contactUser: "",
contactTel: "",
quotationType: "AlSi10Mg",
remark: ""
remark: "",
status: ""
},
values1: "",
values2: "",
......@@ -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: {
gmData: {
......@@ -335,6 +348,13 @@ export default {
quotationBox() {
//订单报价
// 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 quotationMain = {};
let data = {
......@@ -348,21 +368,26 @@ export default {
.then(res => {
if (res.success) {
this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then(res => {
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
if (this.status == 1) {
this.modalShow = false;
this.$emit("update");
} else {
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
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 => {
......@@ -476,8 +501,8 @@ export default {
}
});
},
cancel() {
this.$emit('update')
cancel() {
this.$emit("update");
}
}
};
......
......@@ -85,6 +85,7 @@ export default {
zPhotosensitive: {
result: []
},
status: 0,
row: {},
index: "",
newList: [],
......@@ -93,7 +94,8 @@ export default {
contactUser: "",
contactTel: "",
quotationType: "光敏树脂",
remark: ""
remark: "",
status: ""
},
values1: "",
values2: "",
......@@ -190,7 +192,17 @@ export default {
// 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: {
Order3D() {
//计算3D打印费=重量(g)*单价(元/g)
......@@ -215,6 +227,13 @@ export default {
},
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 quotationMain = {};
let data = {
......@@ -227,22 +246,27 @@ export default {
.then(res => {
if (res.success) {
this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then(res => {
console.log(res);
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
if (this.status == 1) {
this.modalShow = false;
this.$emit("update");
} else {
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: 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 => {
......
......@@ -2,7 +2,7 @@
<div class="quotation-box">
<Modal
v-model="modalShow"
title="订单报价"
title="订单报价1"
width="90%"
:mask-closable="false"
@on-cancel="cancel"
......
......@@ -34,6 +34,8 @@ export default {
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 @@
<Checkbox
v-model="index"
@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" />
</Checkbox>
......@@ -60,13 +60,13 @@
</template>
<script>
import Api from '../../certificate/api'
import PdfDetail from './pdfDetail'
import Edit from './edit'
import Examine from './examine'
import Api from "../../certificate/api";
import PdfDetail from "./pdfDetail";
import Edit from "./edit";
import Examine from "./examine";
export default {
name: '',
name: "",
components: {
PdfDetail,
Edit,
......@@ -77,6 +77,7 @@ export default {
},
data() {
return {
status: 0,
zanwushuju: false,
index: false,
arrId: [],
......@@ -98,95 +99,101 @@ export default {
checkboxList: [],
indeterminate: true,
checkAll: false
}
};
},
created() {
Api.getbyid({
id: "207b59eb-4fca-4324-b5cd-46f48a5ff21d"
}).then(r => {
this.status = r.result.status; //status为0的话为启用,有送审,为1的话,流程是禁用的,没有送审按钮
});
},
methods: {
load(v) {
Api.ordercertificate({ id: v }).then((r) => {
this.checkboxList = r.result
Api.ordercertificate({ id: v }).then(r => {
this.checkboxList = r.result;
if (this.checkboxList) {
this.zanwushuju = false
this.zanwushuju = false;
} else {
this.zanwushuju = true
this.zanwushuju = true;
}
})
});
},
handleExport(id) {
this.pdfModal = true
this.curId = id
this.pdfModal = true;
this.curId = id;
},
addOk() {
this.editModal = false
this.curId = null
this.$emit('on-ok')
this.editModal = false;
this.curId = null;
this.$emit("on-ok");
},
cancel() {
this.editModal = false
this.examineModal = false
this.editModal = false;
this.examineModal = false;
},
edit(id) {
this.editModal = true
this.curId = id
this.editModal = true;
this.curId = id;
},
delet(id) {
this.$Modal.confirm({
title: '删除',
content: '<p>您确定要删除此合格证吗</p>',
title: "删除",
content: "<p>您确定要删除此合格证吗</p>",
onOk: () => {
Api.certificatedelete({ id: id }).then((r) => {
Api.certificatedelete({ id: id }).then(r => {
if (r.result) {
this.$Message.info('删除成功')
this.load(this.eid)
this.$Message.info("删除成功");
this.load(this.eid);
}
})
});
},
onCancel: () => {
this.$Message.info('已取消删除')
this.$Message.info("已取消删除");
}
})
});
},
canselFooter() {},
upChange() {
if (this.arr.length == 1) {
this.$refs.examine.info = true
this.$refs.examine.tableInfo = false
this.$refs.examine.info = true;
this.$refs.examine.tableInfo = false;
} else {
this.$refs.examine.info = false
this.$refs.examine.tableInfo = true
this.$refs.examine.info = false;
this.$refs.examine.tableInfo = true;
}
this.arrId = this.arr
this.examineModal = true
this.arrId = this.arr;
this.examineModal = true;
},
changeBox(index, id) {
if (index == true) {
this.arr.push(id)
this.arr.push(id);
} else if (index == false) {
for (var i = 0; i < this.arr.length; i++) {
if (this.arr[i] == id) {
this.arr.splice(i, 1)
this.arr.splice(i, 1);
}
}
return this.arr
return this.arr;
}
}
},
watch: {
eid(v) {
if (v != null) {
this.checkboxList = []
this.load(v)
this.checkboxList = [];
this.load(v);
}
},
arr(v) {
if (this.arr.length >= 1) {
this.show = true
this.show = true;
} else {
this.show = false
this.show = false;
}
}
}
}
};
</script>
<style lang="less" scoped>
......@@ -240,6 +247,5 @@ a {
}
.shuju {
margin: 30px 0 30px 48%;
}
</style>
\ No newline at end of file
......@@ -121,7 +121,7 @@
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</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>
</Form>
<Modal v-model="examineModal" title="合格证送审" footer-hide fullscreen :mask-closable="false">
......@@ -130,10 +130,10 @@
</div>
</template>
<script>
import Api from '../../certificate/api'
import Examine from '../endIssued/examine'
import Api from "../../certificate/api";
import Examine from "../endIssued/examine";
export default {
name: 'Add',
name: "Add",
props: {
eid: Number
},
......@@ -142,207 +142,221 @@ export default {
},
data() {
return {
isId: '',
isId: "",
examineModal: false,
submit: true,
isDisabled: false,
codeDisabled: false,
results: [],
status: 0,
parms: {
app: 'certificateUrl', //服务
app: "certificateUrl", //服务
eid: null, //记录id
name: 'ProductCertificateExamItem', //表名(检验项表名)
field: 'file' //字段名
name: "ProductCertificateExamItem", //表名(检验项表名)
field: "file" //字段名
},
disabled: false,
entity: {
id: 0
id: 0,
status: ""
},
rules: {
businessName: [{ required: true, message: '必填', trigger: 'blur' }],
businessCode: [{ required: true, message: '必填', trigger: 'blur' }]
// userUnit: [{ required: true, message: "必填", trigger: "change" }],
// productQuantity: [{ required: true, message: "必填", trigger: "change" }]
},
easySearch: {
keys: { op: 'mesCode', value: '' },
type: { op: 'Equal', value: 1 }
keys: { op: "mesCode", value: "" },
type: { op: "Equal", value: 1 }
},
columns: [
{
title: '序号',
type: 'index',
title: "序号",
type: "index",
width: 80,
align: 'center'
align: "center"
},
{
title: '检验项目',
key: 'name',
align: 'center',
slot: 'name'
title: "检验项目",
key: "name",
align: "center",
slot: "name"
},
{
title: '要求',
key: 'require',
align: 'center',
slot: 'require'
title: "要求",
key: "require",
align: "center",
slot: "require"
},
{
title: '预测结果',
key: 'result',
align: 'center',
slot: 'result'
title: "预测结果",
key: "result",
align: "center",
slot: "result"
},
{
key: 'file',
title: '附件',
slot: 'pash',
key: "file",
title: "附件",
slot: "pash",
width: 400,
align: 'center'
align: "center"
},
{
title: '结论',
key: 'conclusion',
align: 'center',
slot: 'conclusion'
title: "结论",
key: "conclusion",
align: "center",
slot: "conclusion"
},
{
title: '备注',
align: 'center',
key: 'remark',
slot: 'remark'
title: "备注",
align: "center",
key: "remark",
slot: "remark"
},
{
title: '操作',
slot: 'action',
title: "操作",
slot: "action",
width: 100,
align: 'center'
align: "center"
}
],
checkList: []
}
};
},
created() {
this.addNew()
this.isDisabled = true
this.addNew();
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: {
change(e) {
this.entity.productQuantity = e.length + ''
this.entity.productQuantity = e.length + "";
},
getOrder(v) {
Api.testItems({ id: v }).then((r) => {
Api.testItems({ id: v }).then(r => {
if (r.result !== null) {
this.checkList = r.result
this.checkList = r.result;
}
})
});
},
setRow(row, index) {
this.$set(this.checkList, index, row)
this.$set(this.checkList, index, row);
},
handleSubmit() {
this.entity.items = this.checkList
this.entity.items.forEach((c) => {
return delete c.id
})
this.$refs.form.validate((v) => {
this.arrId = []
this.entity.items = this.checkList;
this.entity.items.forEach(c => {
return delete c.id;
});
this.$refs.form.validate(v => {
this.arrId = [];
if (v) {
this.disabled = true
this.entity.orderId = this.$refs.codes.orderId
this.entity.codeIds = this.$refs.codes.codeIds
this.disabled = true;
this.entity.orderId = this.$refs.codes.orderId;
this.entity.codeIds = this.$refs.codes.codeIds;
this.entity.productSerialNumber = this.entity.productSerialNumber.join(
','
)
","
);
if (this.status == 1) {
this.entity.status = 4;
}
if (this.submit == true) {
//送审
Api.create(this.entity)
.then((r) => {
.then(r => {
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
this.entity = {}
this.disabled = false
this.isId = r.result
this.examineModal = true
this.$Message.success("保存成功");
this.$emit("on-ok");
this.entity = {};
this.disabled = false;
this.isId = r.result;
this.examineModal = true;
} else {
this.$Message.error('保存失败')
this.disabled = false
this.$Message.error("保存失败");
this.disabled = false;
}
})
.catch((err) => {
this.disabled = false
this.$Message.error('保存失败')
console.warn(err)
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
} else {
Api.create(this.entity)
.then((r) => {
.then(r => {
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
this.entity = {}
this.disabled = false
this.$Message.success("保存成功");
this.$emit("on-ok");
this.entity = {};
this.disabled = false;
} else {
this.$Message.error('保存失败')
this.disabled = false
this.$Message.error("保存失败");
this.disabled = false;
}
})
.catch((err) => {
this.disabled = false
this.$Message.error('保存失败')
console.warn(err)
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
}
})
});
},
remove(index) {
this.checkList.splice(index, 1)
this.checkList.splice(index, 1);
},
getParams(id) {
return 'app=qms&name=ProductCertificateExamItem&field=file&eid=' + id
return "app=qms&name=ProductCertificateExamItem&field=file&eid=" + id;
},
addNew() {
if (this.checkList) {
let obj = {
file: '',
file: "",
fileId: this.$u.guid()
}
this.checkList.push(obj)
};
this.checkList.push(obj);
} else {
var arr = new Array()
this.checkList = arr
var arr = new Array();
this.checkList = arr;
let obj = {
file: '',
file: "",
fileId: this.$u.guid()
}
this.checkList.push(obj)
};
this.checkList.push(obj);
}
},
handleClose() {
this.$emit('on-close')
this.$emit("on-close");
},
close() {
this.examineModal = false
this.$emit('on-close')
this.examineModal = false;
this.$emit("on-close");
},
l(key) {
key = 'waitOpened' + '.' + key
return this.$t(key)
key = "waitOpened" + "." + key;
return this.$t(key);
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v)
this.entity = this.$u.clone(this.v);
},
eid(v) {
if (v != 0) {
this.checkList = []
this.getOrder(v)
this.checkList = [];
this.getOrder(v);
}
}
}
}
};
</script>
<style lang="less" scoped>
.jy-boder {
......
<template>
<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">
<Add @on-close="cancel" @on-ok="addOk" :eid="curId" ref="addFile" />
</Modal>
......@@ -8,10 +15,10 @@
</template>
<script>
import Api from '../api'
import Add from './add'
import Api from "../api";
import Add from "./add";
export default {
name: 'index',
name: "index",
components: {
Add
},
......@@ -21,144 +28,144 @@ export default {
checkLists: [],
addModal: false,
curId: null,
tdHeight:'',
tdHeight: "",
columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' },
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: 'mesCode',
title: this.l('mesCode'),
align: 'left',
key: "mesCode",
title: this.l("mesCode"),
align: "left",
easy: true,
high: true
},
{
key: 'productName',
title: this.l('productName'),
align: 'left',
key: "productName",
title: this.l("productName"),
align: "left",
easy: true,
high: true
},
{
key: 'drawnNumber',
title: this.l('drawnNumber'),
align: 'left',
key: "drawnNumber",
title: this.l("drawnNumber"),
align: "left",
easy: true,
high: true
},
{
key: 'quantity',
title: this.l('quantity'),
align: 'left',
key: "quantity",
title: this.l("quantity"),
align: "left",
easy: true,
high: true
},
{
key: 'qualifiedQuantity',
title: this.l('qualifiedQuantity'),
align: 'left',
key: "qualifiedQuantity",
title: this.l("qualifiedQuantity"),
align: "left",
easy: true,
high: true
},
{
key: 'uncertificateQuantity',
title: this.l('uncertificateQuantity'),
align: 'left',
key: "uncertificateQuantity",
title: this.l("uncertificateQuantity"),
align: "left",
easy: true,
high: true
},
{
key: 'actualFinishDate',
title: this.l('actualFinishDate'),
align: 'left',
key: "actualFinishDate",
title: this.l("actualFinishDate"),
align: "left",
easy: true,
high: true,
width: 180,
render: (h, params) => {
return h(
'span',
params.row.actualFinishDate == '0001-01-01 00:00:00'
? ''
"span",
params.row.actualFinishDate == "0001-01-01 00:00:00"
? ""
: params.row.actualFinishDate
)
);
}
},
{
key: 'productingPreparationPeople',
title: this.l('productingPreparationPeople'),
align: 'left',
key: "productingPreparationPeople",
title: this.l("productingPreparationPeople"),
align: "left",
easy: true,
high: true
},
{
key: 'status',
title: this.l('status'),
align: 'left',
key: "status",
title: this.l("status"),
align: "left",
easy: true,
high: true,
code: 'plan.order.status'
code: "plan.order.status"
},
{
title: '操作',
key: 'id',
title: "操作",
key: "id",
// width: 250,
align: 'center',
align: "center",
render: (h, params) => {
return h('div', { class: 'action' }, [
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs: {
oprate: 'add'
oprate: "add"
},
on: { click: () => this.add(params.row) }
},
'开合格证'
"开合格证"
)
])
]);
}
}
],
easySearch: {
keys: { op: 'mesCode', value: null, default: true },
type: { op: 'Equal', value: 1 }
keys: { op: "mesCode", value: null, default: true },
type: { op: "Equal", value: 1 }
}
}
};
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
created() {
this.tdHeight = window.innerHeight - 200
this.tdHeight = window.innerHeight - 200;
},
methods: {
addOk() {
// this.$refs.grid.load()
this.addModal = false
this.curId = 0
this.$refs.grid.load();
this.addModal = false;
this.curId = 0;
},
cancel() {
this.curId = 0
this.addModal = false
this.curId = 0;
this.addModal = false;
},
reload() {
this.$refs.grid.load()
this.$refs.grid.load();
},
add(row) {
this.addModal = true
this.curId = row.id
this.$refs.addFile.entity.productName = row.productName
this.$refs.addFile.entity.productStatus = row.status
this.$refs.addFile.entity.productCode = row.drawnNumber
this.addModal = true;
this.curId = row.id;
this.$refs.addFile.entity.productName = row.productName;
this.$refs.addFile.entity.productStatus = row.status;
this.$refs.addFile.entity.productCode = row.drawnNumber;
},
// 列表title
l(key) {
let vkey = 'waitOpened' + '.' + key
return this.$t(vkey) || key
let vkey = "waitOpened" + "." + key;
return this.$t(vkey) || key;
}
}
}
};
</script>
<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