feat:白片抛检验审批
This commit is contained in:
parent
5c139f0b7c
commit
bb95b5228e
|
@ -51,7 +51,7 @@
|
|||
controls-position="right"
|
||||
v-model="form.count"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountNotokChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -68,7 +68,7 @@
|
|||
controls-position="right"
|
||||
v-model="form.count_sampling"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountNotokChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -80,7 +80,7 @@
|
|||
v-model="form.count_sampling_ok"
|
||||
style="width: 100%"
|
||||
disabled
|
||||
precision="0"
|
||||
:precision="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -90,7 +90,7 @@
|
|||
controls-position="right"
|
||||
v-model="form.count_notok"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountNotokChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -101,7 +101,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_ok_rate"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -143,7 +143,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqnj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -154,7 +154,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqnjyd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -165,7 +165,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqwj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -176,7 +176,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqwjyd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -187,7 +187,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_wj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -198,7 +198,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_yd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -209,7 +209,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_txd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -220,7 +220,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -231,7 +231,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_zhg"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -242,7 +242,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_yz"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -256,7 +256,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_z"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -267,7 +267,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_qp"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -278,7 +278,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_swen"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -289,7 +289,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_bb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -300,7 +300,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_zb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -311,7 +311,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_zq"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -322,7 +322,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hs"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -333,7 +333,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_md"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -344,7 +344,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqbx"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -355,7 +355,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_dj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
|
@ -367,7 +367,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_ps"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -378,7 +378,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_lq"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -392,7 +392,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -403,7 +403,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_wj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -414,7 +414,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_yd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -425,7 +425,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_txd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -436,7 +436,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_qp"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -447,7 +447,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_swen"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -458,7 +458,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_bb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -469,7 +469,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_xbb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -480,7 +480,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hs"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -491,7 +491,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_md"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -503,7 +503,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_ps"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -514,7 +514,7 @@
|
|||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_qt"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
:precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
|
@ -522,8 +522,23 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||
<el-footer v-if="mgroupName=='白片抛'">
|
||||
<el-button
|
||||
v-for="item in initForm.transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
:loading="isSaveing"
|
||||
:disabled="isSaveing"
|
||||
@click="submitTicketCreate(item.id)"
|
||||
style="margin-right: 4px"
|
||||
>{{ item.name }}</el-button
|
||||
>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
<el-footer v-else>
|
||||
<el-button type="primary"
|
||||
:loading="isSaveing"
|
||||
@click="submit"
|
||||
>提交</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
|
@ -559,7 +574,8 @@ export default {
|
|||
batch: "",
|
||||
count: null,
|
||||
count_ok: 0,
|
||||
count_sampling_ok:'',
|
||||
count_sampling_ok:0,
|
||||
count_sampling:0,
|
||||
count_notok: 0,
|
||||
count_notok_json:{}
|
||||
},
|
||||
|
@ -591,6 +607,7 @@ export default {
|
|||
{name:'全检',value:20},
|
||||
{name:'抽检',value:10},
|
||||
],
|
||||
initForm: {},
|
||||
selectionFilters: [],
|
||||
batchCount:null,
|
||||
formCount:null,
|
||||
|
@ -601,6 +618,7 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log('mgroupName',this.mgroupName);
|
||||
this.batchCount = this.itemObj.count_cando;
|
||||
this.form.batch = this.itemObj.batch;
|
||||
this.form.wm = this.itemObj.id;
|
||||
|
@ -608,6 +626,7 @@ export default {
|
|||
this.form.supplier = this.itemObj.supplier;
|
||||
this.deptID = this.$TOOL.data.get('gx_deptID');
|
||||
this.getUsers();
|
||||
this.getInit();
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
|
@ -633,6 +652,14 @@ export default {
|
|||
});
|
||||
});
|
||||
},
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
that.$API.wf.workflow.initkey.req("baipaopiantest").then((res) => {
|
||||
that.initForm = res;
|
||||
console.log('that.initForm',that.initForm);
|
||||
});
|
||||
},
|
||||
handleCountChange(type){
|
||||
this.form.count_notok =
|
||||
this.count_notok_json.count_n_wj+
|
||||
|
@ -664,11 +691,29 @@ export default {
|
|||
let obj = {page: 0, count__gte: 0, count_xtest__gte: 0};
|
||||
//工段
|
||||
obj.mgroupx = that.mgroup;
|
||||
that.$API.wpm.wmaterial.list
|
||||
.req(obj)
|
||||
.then((res) => {
|
||||
that.options = res;
|
||||
});
|
||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||
that.options = res;
|
||||
});
|
||||
},
|
||||
//提交白片抛抽检信息,创建工单
|
||||
submitTicketCreate(id) {
|
||||
this.transition = id;
|
||||
this.submit();
|
||||
// let that = this;
|
||||
// let ticket = {};
|
||||
// that.isSaveing = true;
|
||||
// ticket.title = '白片抛抽检审批单';
|
||||
// ticket.workflow = that.initForm.workflow;
|
||||
// ticket.ticket_data = {t_id: that.mlogItem.id};
|
||||
// ticket.transition = id;
|
||||
// that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
// that.isSaveing = false;
|
||||
// that.ticketDialog = false;
|
||||
// that.visible = false;
|
||||
// that.$message.success("提交成功");
|
||||
// }).catch((e) => {
|
||||
// that.isSaveing = false;
|
||||
// });
|
||||
},
|
||||
//提交
|
||||
submit() {
|
||||
|
@ -707,15 +752,30 @@ export default {
|
|||
}
|
||||
that.form.count_notok_json = that.count_notok_json;
|
||||
console.log('that.form',that.form)
|
||||
that.$API.qm.ftestwork.create.req(that.form)
|
||||
.then((res) => {
|
||||
that.$API.qm.ftestwork.submit.req(res.id)
|
||||
.then((res) => {
|
||||
that.$API.qm.ftestwork.create.req(that.form).then((res) => {
|
||||
if(that.mgroupName=='白片抛'){
|
||||
let ticket = {};
|
||||
that.isSaveing = true;
|
||||
ticket.title = '白片抛抽检审批单';
|
||||
ticket.workflow = that.initForm.workflow;
|
||||
ticket.ticket_data = {t_id: res.id};
|
||||
ticket.transition = that.transition;
|
||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.ticketDialog = false;
|
||||
that.visible = false;
|
||||
that.$message.success("提交成功");
|
||||
}).catch((e) => {
|
||||
that.isSaveing = false;
|
||||
});
|
||||
}else{
|
||||
that.$API.qm.ftestwork.submit.req(res.id).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
}
|
||||
}).catch( err=>{
|
||||
//可以处理校验错误
|
||||
that.isSaveing = false;
|
||||
|
|
Loading…
Reference in New Issue