fix:bx日志相关改动
This commit is contained in:
parent
f01b1a6c9d
commit
49c3fdaae3
|
@ -4,7 +4,7 @@
|
|||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
@closed="close"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
|
@ -134,393 +134,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider style="margin-top:0"></el-divider>
|
||||
<!-- 尺寸检验 -->
|
||||
<el-row v-if="mgroupName=='size'">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈内径">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqnj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈内径圆度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqnjyd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈外径">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqwj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈外径圆度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqwjyd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品外径">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_wj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品圆度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_yd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品同心度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_txd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="厚度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="准合格">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_zhg"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="圆准">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_yz"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 外观检验 -->
|
||||
<el-row v-else-if="mgroupName=='facade'">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="脏">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_z"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="气泡">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_qp"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="水纹">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_swen"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="崩边">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_bb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="棕边">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_zb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="棕圈">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_zq"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="划伤">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hs"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="麻点">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_md"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈变形">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqbx"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="倒角">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_dj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="破损">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_ps"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="蓝圈">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_lq"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 过程检验 -->
|
||||
<el-row v-else>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="厚度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品外径">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_wj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品圆度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_yd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品同心度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_txd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="气泡">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_qp"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="水纹">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_swen"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="崩边">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_bb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="小崩边">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_xbb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="划伤">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hs"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="麻点">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_md"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="破损">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_ps"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="其他">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_qt"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||
|
@ -550,7 +165,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
mode:'',
|
||||
modeTitle: '',
|
||||
modeTitle: '抽检',
|
||||
loading: false,
|
||||
form: {
|
||||
type:'process',
|
||||
|
@ -561,25 +176,8 @@ export default {
|
|||
count_ok: 0,
|
||||
count_sampling_ok:'',
|
||||
count_notok: 0,
|
||||
count_notok_json:{}
|
||||
},
|
||||
count_ok_rate:100,
|
||||
count_notok_json:{
|
||||
//尺寸
|
||||
count_n_wj: 0,
|
||||
count_n_yd: 0,
|
||||
count_n_txd: 0,
|
||||
count_n_hd: 0,
|
||||
//外观和内质
|
||||
count_n_qp: 0,
|
||||
count_n_swen: 0,
|
||||
count_n_hs: 0,
|
||||
count_n_md: 0,
|
||||
count_n_bb:0,
|
||||
count_n_xbb:0,
|
||||
count_n_ps: 0,
|
||||
count_n_qt:0,
|
||||
},
|
||||
rules: {
|
||||
test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}],
|
||||
batch: [{required: true,message: "请选择物料批次",trigger: "blur"}],
|
||||
|
@ -591,29 +189,35 @@ export default {
|
|||
{name:'全检',value:20},
|
||||
{name:'抽检',value:10},
|
||||
],
|
||||
selectionFilters: [],
|
||||
qct_defects: [],
|
||||
defectlist:[],
|
||||
batchCount:null,
|
||||
formCount:null,
|
||||
visible: false,
|
||||
supplier:null,
|
||||
isSaveing: false,
|
||||
setFiltersVisible: false,
|
||||
addTemplate:{},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.batchCount = this.itemObj.count_cando;
|
||||
console.log('this.itemObj',this.itemObj);
|
||||
this.form.count_sampling_ok =
|
||||
this.form.count_sampling =
|
||||
this.form.count_ok =
|
||||
this.form.count =
|
||||
this.batchCount =
|
||||
this.itemObj.count;
|
||||
this.form.batch = this.itemObj.batch;
|
||||
this.form.wm = this.itemObj.id;
|
||||
this.form.count = this.itemObj.count_cando;
|
||||
this.form.supplier = this.itemObj.supplier;
|
||||
this.deptID = this.$TOOL.data.get('gx_deptID');
|
||||
this.getUsers();
|
||||
this.getdefects();
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
open(mode = "抽检") {
|
||||
this.mode = mode;
|
||||
this.modeTitle = mode+'抽检';
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
|
@ -624,29 +228,28 @@ export default {
|
|||
.req({ page: 0, posts__code__contains: "check" })
|
||||
.then((res) => {
|
||||
userList = res;
|
||||
that.$API.system.user.list.req({ depts: that.deptID, page: 0 })
|
||||
.then((res2) => {
|
||||
res2.forEach((item) => {
|
||||
userList.push(item);
|
||||
});
|
||||
that.userList = userList ;
|
||||
});
|
||||
// that.$API.system.user.list.req({ depts: that.deptID, page: 0 })
|
||||
// .then((res2) => {
|
||||
// res2.forEach((item) => {
|
||||
// userList.push(item);
|
||||
// });
|
||||
// that.userList = userList ;
|
||||
// });
|
||||
});
|
||||
},
|
||||
//获取不合格项
|
||||
getdefects(){
|
||||
let that = this;
|
||||
that.$API.qm.qct.list.req({ page: 0, qctmat__material: that.itemObj.material }).then((res) => {
|
||||
if(res.length>0){
|
||||
that.$API.qm.qct.item.req(res[0].id).then((res) => {
|
||||
that.qct_defects = res.qct_defects;
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCountChange(type){
|
||||
this.form.count_notok =
|
||||
this.count_notok_json.count_n_wj+
|
||||
this.count_notok_json.count_n_yd+
|
||||
this.count_notok_json.count_n_txd+
|
||||
this.count_notok_json.count_n_hd+
|
||||
this.count_notok_json.count_n_qp+
|
||||
this.count_notok_json.count_n_swen+
|
||||
this.count_notok_json.count_n_hs+
|
||||
this.count_notok_json.count_n_bb+
|
||||
this.count_notok_json.count_n_xbb+
|
||||
this.count_notok_json.count_n_md+
|
||||
this.count_notok_json.count_n_ps+
|
||||
this.count_notok_json.count_n_qt;
|
||||
this.form.count_notok
|
||||
this.handleCountNotokChange();
|
||||
},
|
||||
handleCountNotokChange(){
|
||||
|
@ -664,11 +267,9 @@ 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;
|
||||
});
|
||||
},
|
||||
//提交
|
||||
submit() {
|
||||
|
@ -676,19 +277,7 @@ export default {
|
|||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
let count_notok =
|
||||
this.count_notok_json.count_n_wj+
|
||||
this.count_notok_json.count_n_yd+
|
||||
this.count_notok_json.count_n_txd+
|
||||
this.count_notok_json.count_n_hd+
|
||||
this.count_notok_json.count_n_qp+
|
||||
this.count_notok_json.count_n_swen+
|
||||
this.count_notok_json.count_n_hs+
|
||||
this.count_notok_json.count_n_bb+
|
||||
this.count_notok_json.count_n_xbb+
|
||||
this.count_notok_json.count_n_md+
|
||||
this.count_notok_json.count_n_ps+
|
||||
this.count_notok_json.count_n_qt;
|
||||
let count_notok;
|
||||
if(count_notok>that.form.count_notok){
|
||||
that.$notify.error("不合格数量有问题");
|
||||
that.isSaveing = false;
|
||||
|
@ -699,43 +288,37 @@ export default {
|
|||
if(that.supplier!== null&&that.form.type2==10){
|
||||
that.form.need_update_wm = false;
|
||||
}
|
||||
// that.form.count_ok = that.form.count-that.form.count_notok;
|
||||
if(that.form.type2==10){//抽检
|
||||
that.form.count_sampling_ok = that.form.count_sampling - that.form.count_notok;
|
||||
}else{//全检
|
||||
that.form.count_ok = that.form.count - that.form.count_notok;
|
||||
}
|
||||
that.form.count_notok_json = that.count_notok_json;
|
||||
console.log('that.form',that.form)
|
||||
that.$API.qm.ftestwork.create.req(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.submit.req(res.id)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
}).catch( err=>{
|
||||
//可以处理校验错误
|
||||
that.isSaveing = false;
|
||||
})
|
||||
that.visible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
}).catch( err=>{
|
||||
//可以处理校验错误
|
||||
that.isSaveing = false;
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
close(){
|
||||
this.visible = false;
|
||||
this.$emit('closed')
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
this.formCount = this.form.count;
|
||||
// this.form.test_group = this.form.split(",");
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -287,9 +287,6 @@ export default {
|
|||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
listParams:{
|
||||
|
||||
},
|
||||
totalCount: 0,
|
||||
deptID:'',
|
||||
|
@ -367,37 +364,13 @@ export default {
|
|||
let that = this;
|
||||
var req = {
|
||||
page: 0,
|
||||
notok_sign__isnull : 1,
|
||||
count_xtest__isnull:1
|
||||
state:10,
|
||||
mgroupx:that.mgroupId
|
||||
};
|
||||
that.materialOptions = [];
|
||||
if(that.mgroupName=="size"){
|
||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
req.belong_dept=res[0].id;
|
||||
that.listParams = req;
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
that.materialOptions = res;
|
||||
});
|
||||
}
|
||||
})
|
||||
}else if(that.mgroupName=="facade"){
|
||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
req.belong_dept=res[0].id;
|
||||
that.listParams = req;
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
that.materialOptions = res;
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
req.mgroupx = that.mgroupId;
|
||||
that.listParams = req;
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
that.materialOptions = res;
|
||||
});
|
||||
}
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
that.materialOptions = res;
|
||||
});
|
||||
},
|
||||
//获取车间不合格物料
|
||||
getMaterialNotok() {
|
||||
|
@ -406,10 +379,8 @@ export default {
|
|||
var req = {
|
||||
mgroupx: that.mgroupId,
|
||||
page: 0,
|
||||
notok_sign__isnull : 0,
|
||||
count_xtest__isnull:1
|
||||
state:20,
|
||||
};
|
||||
that.listParams = req;
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
that.materialOptions = res;
|
||||
});
|
||||
|
|
|
@ -84,7 +84,11 @@
|
|||
label="数量"
|
||||
prop="count"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-link :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="生产中"
|
||||
prop="count_working"
|
||||
|
@ -106,7 +110,15 @@
|
|||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
<el-link :underline="false" @click="printMaterial(scope.row)" type="primary">物料标签</el-link>
|
||||
<!-- <el-link
|
||||
v-if="scope.row.material_&&scope.row.material_.tracking==10" -->
|
||||
<el-link
|
||||
:underline="false"
|
||||
@click="inmCheck(scope.row)"
|
||||
type="primary"
|
||||
style="margin-left: 10px;"
|
||||
>检验</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
@ -119,16 +131,16 @@
|
|||
@choseChange="choseChange"
|
||||
></materials>
|
||||
</el-dialog>
|
||||
<!-- <check-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
<check-dialog
|
||||
v-if="dialog.check"
|
||||
ref="checkDialog"
|
||||
:mgroup="mgroupId"
|
||||
:mgroupName="mgroup_name"
|
||||
:itemObj = "checkItem"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
@closed="dialog.check = false"
|
||||
>
|
||||
</check-dialog> -->
|
||||
</check-dialog>
|
||||
<scrap-dialog
|
||||
v-if="dialog.scrap"
|
||||
ref="scrapDialog"
|
||||
|
@ -156,6 +168,32 @@
|
|||
@success="handleinmSuccess"
|
||||
>
|
||||
</save-dialog>
|
||||
<el-drawer v-model="wprVisibleDrawer" :size="'50%'">
|
||||
<template #header>
|
||||
<h4>关联产品</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<scTable ref="wprTable" :apiObj="wprApiObj" :params="wprParams">
|
||||
<!-- <el-table-column label="产品名称" prop="material_name"></el-table-column> -->
|
||||
<el-table-column label="产品编号" prop="number"></el-table-column>
|
||||
<el-table-column label="缺陷项">
|
||||
<template #default="scope">
|
||||
<span v-for="item in scope.row.wprdefect" :key="item">
|
||||
<el-tag
|
||||
v-if="item.is_main"
|
||||
type="danger"
|
||||
>{{ item.defect_name }}</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style="flex: auto">
|
||||
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -195,10 +233,12 @@ export default {
|
|||
},
|
||||
dialog: {
|
||||
save: false,
|
||||
check: false,
|
||||
scrap: false,
|
||||
permission: false,
|
||||
inmRecord:false,
|
||||
},
|
||||
wprList:[],
|
||||
tableData: [],
|
||||
selection: [],
|
||||
stateOptions:[
|
||||
|
@ -212,30 +252,25 @@ export default {
|
|||
search: "",
|
||||
material: "",
|
||||
},
|
||||
wprParams:{
|
||||
wm: ""
|
||||
},
|
||||
cate_type:'',
|
||||
process:'',
|
||||
materialType: "wm",
|
||||
materialsVisible:false,
|
||||
visibleDrawer: false,
|
||||
wprVisibleDrawer:false,
|
||||
wprApiObj:this.$API.wpm.wpr,
|
||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||
printer_name:localStorage.getItem("printer_name"),
|
||||
mgroup_name:'',
|
||||
checkItem:{},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMgroupInfo();
|
||||
},
|
||||
watch: {
|
||||
// mgroupName: {
|
||||
// handler: function (newval,odlval) {
|
||||
// let that = this;
|
||||
// that.params.mgroupx = "";
|
||||
// that.apiObj = null;
|
||||
// that.mgroup_name = newval;
|
||||
// that.getMgroupInfo();
|
||||
// },
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
getMgroupInfo(){
|
||||
let that = this;
|
||||
|
@ -300,15 +335,6 @@ export default {
|
|||
that.$nextTick(() => {
|
||||
that.$refs.inmRecordDialog.open("add");
|
||||
});
|
||||
// this.$router.push({ name: "halfgood_mio" });
|
||||
},
|
||||
table_Check(row){
|
||||
this.checkItem = row;
|
||||
let mode = this.mgroupName;
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open(mode);
|
||||
});
|
||||
},
|
||||
//获取当前批次车间物料的检验记录
|
||||
tableCheckList(row){
|
||||
|
@ -342,6 +368,15 @@ export default {
|
|||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
showWpr(row){
|
||||
let that = this;
|
||||
that.wprParams.wm='';
|
||||
that.wprParams.wm = row.id;
|
||||
that.wprVisibleDrawer = true;
|
||||
// that.$API.wpm.wpr.req({ wm: row.id,page:0 }).then((res) => {
|
||||
// that.wprList = res;
|
||||
// })
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.dialog.save = false;
|
||||
|
@ -370,6 +405,15 @@ export default {
|
|||
});
|
||||
})
|
||||
},
|
||||
inmCheck(row){
|
||||
let that = this;
|
||||
that.checkItem = row;
|
||||
that.dialog.check = true;
|
||||
that.$nextTick(() => {
|
||||
that.$refs.checkDialog.open("add");
|
||||
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-if="tracking == 10">
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">提交</el-button>
|
||||
<el-button @click="visibleDrawer = false">取消</el-button>
|
||||
</el-footer>
|
||||
|
@ -188,9 +188,9 @@ export default {
|
|||
that.form.batch = wm_in;
|
||||
that.form.wm_in = arr[0].id;
|
||||
that.form.count_use = arr[0].count;
|
||||
if(that.tracking==10){}else{
|
||||
that.submit();//提交
|
||||
}
|
||||
// if(that.tracking==10){}else{
|
||||
// that.submit();//提交
|
||||
// }
|
||||
}else{
|
||||
that.wm_in = '';
|
||||
that.$message.error("批次号不存在");
|
||||
|
|
Loading…
Reference in New Issue