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() {
...@@ -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,9 +488,7 @@ export default { ...@@ -484,9 +488,7 @@ 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 })
.then(res => {
console.log(res); console.log(res);
if (res.success) { if (res.success) {
let itemId = res.result.id; let itemId = res.result.id;
...@@ -497,7 +499,7 @@ export default { ...@@ -497,7 +499,7 @@ export default {
} }
}); });
// 如果选择送审,则打开送审页面 // 如果选择送审,则打开送审页面
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,9 +540,7 @@ export default { ...@@ -538,9 +540,7 @@ 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 } )
.then(response => {
this.formdata = response.result; this.formdata = response.result;
}); });
this.show = true; this.show = true;
...@@ -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 } )
.then(response => {
this.$refs.trialOrder.formdata = response.result; 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,13 +574,10 @@ export default { ...@@ -576,13 +574,10 @@ 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 } )
.then(response => {
var name = response.result.name; var name = response.result.name;
console.log(nameid); console.log(nameid);
this.$refs.trialOrder.name3 = name; this.$refs.trialOrder.name3 = name;
...@@ -591,12 +586,9 @@ export default { ...@@ -591,12 +586,9 @@ export default {
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 } )
.then(response => {
var name = response.result.name; var name = response.result.name;
//console.log(name) //console.log(name)
this.$refs.trialOrder.name2 = name; this.$refs.trialOrder.name2 = name;
...@@ -607,12 +599,9 @@ export default { ...@@ -607,12 +599,9 @@ export default {
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 } )
.then(response => {
var name = response.result.name; var name = response.result.name;
//console.log(name) //console.log(name)
this.$refs.trialOrder.name1 = name; this.$refs.trialOrder.name1 = name;
...@@ -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,20 +152,23 @@ export default { ...@@ -151,20 +152,23 @@ 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({
let params = {
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740" id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
}) };
this.$api
.get(`${workflowUrl}/schema/getbyid`, params)
.then(res1 => { .then(res1 => {
if (res1.success) { if (res1.success) {
let wfStatus = res1.result.status; let wfStatus = res1.result.status;
if (wfStatus == 0) { if (wfStatus == 0) {
this.submitShow = true; this.submitShow = true;
this.wfstatu=1 this.wfstatu = 1;
// this.entity.approvalStatus = 4; // this.entity.approvalStatus = 4;
} else { } else {
// this.entity.approvalStatus = 1; // this.entity.approvalStatus = 1;
this.submitShow = false; this.submitShow = false;
this.wfstatu=3 this.wfstatu = 3;
} }
} }
}) })
......
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