Commit eb30b182 authored by renjintao's avatar renjintao

不合格审理单&&生产协调但

parent ebb357f6
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
}, },
data() { data() {
return { return {
submitShow: false, //送审按钮显隐 submitShow: true, //送审按钮显隐
checked: true, //送审选择框 checked: true, //送审选择框
modalInfo: false, //校验送审弹框 modalInfo: false, //校验送审弹框
formExamine: {}, formExamine: {},
...@@ -409,7 +409,8 @@ export default { ...@@ -409,7 +409,8 @@ export default {
], ],
data2: [], data2: [],
data3: [], data3: [],
userlist: [] userlist: [],
wfstatu: 1,
}; };
}, },
created() { created() {
...@@ -451,7 +452,6 @@ export default { ...@@ -451,7 +452,6 @@ export default {
//新增库位 //新增库位
addData() { addData() {
this.submitShow = true;
this.title = "生产过程技术协调单"; this.title = "生产过程技术协调单";
this.show = true; this.show = true;
if (this.formdata.dispatch_id == 0) { if (this.formdata.dispatch_id == 0) {
...@@ -473,7 +473,7 @@ export default { ...@@ -473,7 +473,7 @@ export default {
this.formdata.compilation_temporary_process = ""; this.formdata.compilation_temporary_process = "";
this.formdata.inspection_date = ""; this.formdata.inspection_date = "";
this.formdata.inspection_person_name = this.$store.state.userInfo.userName; this.formdata.inspection_person_name = this.$store.state.userInfo.userName;
this.formdata.status = 1; this.formdata.status = this.wfstatu;
this.formdata.note = ""; this.formdata.note = "";
var url1 = `${designUrl}/routingheader/GetCodeByType?code=JJXTD`; var url1 = `${designUrl}/routingheader/GetCodeByType?code=JJXTD`;
...@@ -495,7 +495,7 @@ export default { ...@@ -495,7 +495,7 @@ export default {
this.loadchangelist(); this.loadchangelist();
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.show = false; this.show = false;
if (this.checked == true) { if (this.submitShow&&this.checked == true) {
let url = `${designUrl}/technicalcoordination/getpaged`; let url = `${designUrl}/technicalcoordination/getpaged`;
service service
.get(`${url}`, { .get(`${url}`, {
...@@ -521,7 +521,6 @@ export default { ...@@ -521,7 +521,6 @@ export default {
}, },
editRow(params) { editRow(params) {
this.title = "生产过程技术协调单"; this.title = "生产过程技术协调单";
this.submitShow = true;
this.flag = 1; this.flag = 1;
var url2 = `${designUrl}/technicalcoordination/getforedit`; var url2 = `${designUrl}/technicalcoordination/getforedit`;
service service
...@@ -596,6 +595,23 @@ export default { ...@@ -596,6 +595,23 @@ export default {
} }
}, },
mounted() { mounted() {
let params = {
id: "2c921502-41a2-4fa5-b659-71d0e1e19ffc"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
this.wfstatu = 1;
this.submitShow = true;
} else {
this.wfstatu = 3;
this.submitShow = false;
}
}
});
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<div slot="footer"> <div slot="footer">
<Button @click="show=false">取消</Button> <Button @click="show=false">取消</Button>
<Button type="primary" @click="saveOk">保存</Button> <Button type="primary" @click="saveOk">保存</Button>
<Checkbox v-model="checked" class="ml10" label="送审">送审</Checkbox> <Checkbox v-model="checked" v-show="submitShow" class="ml10" label="送审">送审</Checkbox>
<!-- v-show="submitShow" --> <!-- v-show="submitShow" -->
</div> </div>
</Modal> </Modal>
...@@ -357,7 +357,8 @@ export default { ...@@ -357,7 +357,8 @@ export default {
"op", "op",
{ {
attrs: { attrs: {
oprate: "detail",title: "预览" oprate: "detail",
title: "预览"
}, },
on: { on: {
click: () => { click: () => {
...@@ -376,7 +377,8 @@ export default { ...@@ -376,7 +377,8 @@ export default {
"op", "op",
{ {
attrs: { attrs: {
oprate: "detail",title: "编辑" oprate: "detail",
title: "编辑"
}, },
on: { on: {
click: () => { click: () => {
...@@ -395,7 +397,9 @@ export default { ...@@ -395,7 +397,9 @@ export default {
], ],
data2: [], data2: [],
data3: [], data3: [],
userlist: [] userlist: [],
wfstatu: 1,
submitShow:true
}; };
}, },
created() { created() {
...@@ -426,10 +430,10 @@ export default { ...@@ -426,10 +430,10 @@ export default {
let url = `${designUrl}/unqualifiedorder/getpaged`; let url = `${designUrl}/unqualifiedorder/getpaged`;
service service
.get(`${url}`, { .get(`${url}`, {
unqualified_order_code: this.value1, unqualified_order_code: this.value1,
dispatch_id: this.formdata.dispatch_id, dispatch_id: this.formdata.dispatch_id,
pageindex: this.page, pageindex: this.page,
pageSize: this.pageSize pageSize: this.pageSize
}) })
.then(res => { .then(res => {
this.data2 = res.result.items; this.data2 = res.result.items;
...@@ -462,7 +466,7 @@ export default { ...@@ -462,7 +466,7 @@ export default {
this.formdata.inspection_date = ""; this.formdata.inspection_date = "";
this.formdata.department_id = ""; //部门ID this.formdata.department_id = ""; //部门ID
this.formdata.department_name = ""; //部门名称departmentTitle this.formdata.department_name = ""; //部门名称departmentTitle
this.formdata.status = 1; this.formdata.status = this.wfstatu;
this.formdata.note = ""; this.formdata.note = "";
var userId = this.$store.state.userInfo.userId; var userId = this.$store.state.userInfo.userId;
let parma = { let parma = {
...@@ -484,20 +488,18 @@ export default { ...@@ -484,20 +488,18 @@ export default {
// 添加/编辑 弹框的保存 // 添加/编辑 弹框的保存
saveOk() { saveOk() {
var url = `${designUrl}/unqualifiedorder/createorupdate`; var url = `${designUrl}/unqualifiedorder/createorupdate`;
service service.post(`${url}`, { unqualifiedOrder: this.formdata }).then(res => {
.post(`${url}`, { unqualifiedOrder: this.formdata }) console.log(res);
.then(res => { if (res.success) {
console.log(res); let itemId = res.result.id;
if (res.success) { this.dataListRetrunNew.idList.push(itemId);
let itemId = res.result.id; this.loadchangelist();
this.dataListRetrunNew.idList.push(itemId); this.$Message.success("保存成功");
this.loadchangelist(); this.show = false;
this.$Message.success("保存成功"); }
this.show = false; });
}
});
// 如果选择送审,则打开送审页面 // 如果选择送审,则打开送审页面
if (this.checked == true) { if (this.submitShow&&this.checked == true) {
this.$refs.orderSendReview.intData(this.formdata); this.$refs.orderSendReview.intData(this.formdata);
this.show = false; this.show = false;
this.modalInfo = true; this.modalInfo = true;
...@@ -538,11 +540,9 @@ export default { ...@@ -538,11 +540,9 @@ export default {
this.title = "不合格审理单"; this.title = "不合格审理单";
this.flag = 1; this.flag = 1;
var url2 = `${designUrl}/unqualifiedorder/getbyid`; var url2 = `${designUrl}/unqualifiedorder/getbyid`;
service service.get(`${url2}`, { Id: params.row.id }).then(response => {
.get(`${url2}`, { Id: params.row.id } ) this.formdata = response.result;
.then(response => { });
this.formdata = response.result;
});
this.show = true; this.show = true;
}, },
editRow1(params) { editRow1(params) {
...@@ -558,14 +558,12 @@ export default { ...@@ -558,14 +558,12 @@ export default {
this.$refs.trialOrder.disabled = true; this.$refs.trialOrder.disabled = true;
this.flag = 1; this.flag = 1;
var url2 = `${designUrl}/unqualifiedorder/getbyid`; var url2 = `${designUrl}/unqualifiedorder/getbyid`;
service service.get(`${url2}`, { Id: params.row.id }).then(response => {
.get(`${url2}`, { Id: params.row.id } ) this.$refs.trialOrder.formdata = response.result;
.then(response => { });
this.$refs.trialOrder.formdata = response.result;
});
var url3 = `${workflowUrl}/instance/getdetailbycode`; var url3 = `${workflowUrl}/instance/getdetailbycode`;
service service
.get(`${url3}`, { code: params.row.unqualified_order_code } ) .get(`${url3}`, { code: params.row.unqualified_order_code })
.then(response => { .then(response => {
console.log(response); console.log(response);
for (var i = 0; i < response.result.nodes.length; i++) { for (var i = 0; i < response.result.nodes.length; i++) {
...@@ -576,47 +574,38 @@ export default { ...@@ -576,47 +574,38 @@ export default {
this.$refs.trialOrder.formcontextdata = JSON.parse(context); this.$refs.trialOrder.formcontextdata = JSON.parse(context);
this.$refs.trialOrder.gyauditedTime = this.$refs.trialOrder.gyauditedTime =
response.result.nodes[i].auditedTime; response.result.nodes[i].auditedTime;
var nameid = var nameid = response.result.nodes[i].defaultUsers.immutable[0];
response.result.nodes[i].defaultUsers.immutable[0];
console.log(nameid); console.log(nameid);
var url5 = `${systemUrl}/user/getuser`; var url5 = `${systemUrl}/user/getuser`;
service service.get(`${url5}`, { id: nameid }).then(response => {
.get(`${url5}`, { id: nameid } ) var name = response.result.name;
.then(response => { console.log(nameid);
var name = response.result.name; this.$refs.trialOrder.name3 = name;
console.log(nameid); });
this.$refs.trialOrder.name3 = name;
});
} }
if (id == 158 && status == 2) { if (id == 158 && status == 2) {
this.$refs.trialOrder.hqauditedTime = this.$refs.trialOrder.hqauditedTime =
response.result.nodes[i].auditedTime; response.result.nodes[i].auditedTime;
var nameid = var nameid = response.result.nodes[i].defaultUsers.immutable[0];
response.result.nodes[i].defaultUsers.immutable[0];
var url5 = `${systemUrl}/user/getuser`; var url5 = `${systemUrl}/user/getuser`;
service service.get(`${url5}`, { id: nameid }).then(response => {
.get(`${url5}`, { id: nameid } ) var name = response.result.name;
.then(response => { //console.log(name)
var name = response.result.name; this.$refs.trialOrder.name2 = name;
//console.log(name) });
this.$refs.trialOrder.name2 = name;
});
} }
if (id == 159 && status == 2) { if (id == 159 && status == 2) {
var context = response.result.nodes[i].contextData; var context = response.result.nodes[i].contextData;
this.$refs.trialOrder.formcontextclosedata = JSON.parse(context); this.$refs.trialOrder.formcontextclosedata = JSON.parse(context);
this.$refs.trialOrder.jyauditedTime = this.$refs.trialOrder.jyauditedTime =
response.result.nodes[i].auditedTime; response.result.nodes[i].auditedTime;
var nameid = var nameid = response.result.nodes[i].defaultUsers.immutable[0];
response.result.nodes[i].defaultUsers.immutable[0];
var url5 = `${systemUrl}/user/getuser`; var url5 = `${systemUrl}/user/getuser`;
service service.get(`${url5}`, { id: nameid }).then(response => {
.get(`${url5}`, { id: nameid } ) var name = response.result.name;
.then(response => { //console.log(name)
var name = response.result.name; this.$refs.trialOrder.name1 = name;
//console.log(name) });
this.$refs.trialOrder.name1 = name;
});
} }
} }
//this.$refs.trialOrder.formdata = response.result //this.$refs.trialOrder.formdata = response.result
...@@ -625,6 +614,22 @@ export default { ...@@ -625,6 +614,22 @@ export default {
} }
}, },
mounted() { mounted() {
let params = {
id: "c2e09c9b-02a9-4188-97a6-cdb68d50a64a"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
if (res.success) {
let wfStatus = res.result.status;
if (wfStatus == 0) {
this.wfstatu = 1;
this.submitShow = true;
} else {
this.wfstatu = 3;
this.submitShow = false;
}
}
});
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
......
...@@ -136,7 +136,8 @@ export default { ...@@ -136,7 +136,8 @@ export default {
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
}, },
wfstatu: 1 wfstatu: 1,
submitShow:true
}; };
}, },
props: { props: {
...@@ -151,27 +152,30 @@ export default { ...@@ -151,27 +152,30 @@ export default {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.entity = r.result; this.entity = r.result;
ApiWorkflow.getbyid({
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740" let params = {
}) id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
.then(res1 => { };
if (res1.success) { this.$api
let wfStatus = res1.result.status; .get(`${workflowUrl}/schema/getbyid`, params)
if (wfStatus == 0) { .then(res1 => {
this.submitShow = true; if (res1.success) {
this.wfstatu=1 let wfStatus = res1.result.status;
// this.entity.approvalStatus = 4; if (wfStatus == 0) {
} else { this.submitShow = true;
// this.entity.approvalStatus = 1; this.wfstatu = 1;
this.submitShow = false; // this.entity.approvalStatus = 4;
this.wfstatu=3 } else {
} // this.entity.approvalStatus = 1;
this.submitShow = false;
this.wfstatu = 3;
} }
}) }
.catch(err => { })
this.$Message.error("操作失败"); .catch(err => {
console.warn(err); this.$Message.error("操作失败");
}); console.warn(err);
});
}); });
}, },
handleSubmit() { handleSubmit() {
......
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