Commit eb30b182 authored by renjintao's avatar renjintao

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

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