Merge branch 'master' of http://10.0.11.51:3000/zcdsj/factory_web
This commit is contained in:
commit
c87363a58a
|
|
@ -61,9 +61,11 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="更新时间" prop="update_time">
|
<el-table-column label="更新时间" prop="update_time">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="90">
|
<el-table-column width="140">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button @click="printMaterial(scope.row,'mb')" type="text">物料标签</el-button>
|
<el-button type="primary" link v-if="project_code == 'gx'" @click="mbCheck(scope.row)">检验</el-button>
|
||||||
|
<el-button type="success" link v-if="project_code == 'gx'" @click="mbCheckList(scope.row)">检验记录</el-button>
|
||||||
|
<el-button type="text" @click="printMaterial(scope.row,'mb')">物料标签</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -75,6 +77,7 @@
|
||||||
:mtype="wmtype"
|
:mtype="wmtype"
|
||||||
:apiObj="apiObjPrint"
|
:apiObj="apiObjPrint"
|
||||||
></print-dialog>
|
></print-dialog>
|
||||||
|
<!-- 关联产品 -->
|
||||||
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
||||||
<template #header>
|
<template #header>
|
||||||
<h4>关联产品</h4>
|
<h4>关联产品</h4>
|
||||||
|
|
@ -108,6 +111,143 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
<!-- 检验记录 -->
|
||||||
|
<el-drawer v-model="checkVisibleDrawer" :size="'70%'">
|
||||||
|
<template #header>
|
||||||
|
<h4>检验记录</h4>
|
||||||
|
</template>
|
||||||
|
<template #default>
|
||||||
|
<scTable ref="wprTable" hidePagination hideDo :data="checkList">
|
||||||
|
<el-table-column type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="物料名称" prop="material_name" min-width="100px"></el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batch"></el-table-column>
|
||||||
|
<el-table-column label="总数" prop="count"></el-table-column>
|
||||||
|
<el-table-column label="合格数" prop="count_ok"></el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="count_notok"></el-table-column>
|
||||||
|
<el-table-column label="检验员" prop="test_user_name"></el-table-column>
|
||||||
|
<el-table-column label="检验日期" prop="test_date"></el-table-column>
|
||||||
|
<el-table-column label="备注" prop="note"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="80"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link :underline="false" @click="checkDelete(scope.row)" type="danger">删除</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<div style="flex: auto">
|
||||||
|
<el-button type="warning" @click="checkVisibleDrawer=false">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-drawer>
|
||||||
|
<!-- 入厂检验 -->
|
||||||
|
<el-dialog
|
||||||
|
title="检验"
|
||||||
|
v-model="visible"
|
||||||
|
:size="1200"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-container v-loading="loading">
|
||||||
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="物料名称:">
|
||||||
|
{{ objitem.material_name }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="批次号:">
|
||||||
|
{{ objitem.batch }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label='总数'>
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count"
|
||||||
|
disabled
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="检验日期" prop="test_date">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.test_date"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="合格数">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_ok"
|
||||||
|
disabled
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="检验员" prop="test_user">
|
||||||
|
<el-select
|
||||||
|
v-model="form.test_user"
|
||||||
|
placeholder="检验员"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in userList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-for="item in qct_defects" :key="item.id" :md="12" :sm="24">
|
||||||
|
<el-form-item :label="item.defect_name">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form[item.defect_name]"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
@change="changeDefect(item)"
|
||||||
|
controls-position="right"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.note"> </el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-main>
|
||||||
|
<el-footer>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="mbCheckSubmit">提交</el-button>
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</el-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -123,10 +263,33 @@ export default {
|
||||||
params: { count__gte: 1, material__type__in: "30" },
|
params: { count__gte: 1, material__type__in: "30" },
|
||||||
selection: [],
|
selection: [],
|
||||||
wprList:[],
|
wprList:[],
|
||||||
|
checkList:[],
|
||||||
|
userList:[],
|
||||||
|
rules: {
|
||||||
|
test_date: [
|
||||||
|
{ required: true, message: "请选择检验日期", trigger: "blur" },
|
||||||
|
],
|
||||||
|
test_user: [
|
||||||
|
{ required: true, message: "请选择检验员", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
mb: "",
|
||||||
|
type: "purin",
|
||||||
|
test_date: "",
|
||||||
|
count: 0,
|
||||||
|
count_ok: 0,
|
||||||
|
count_notok: 0,
|
||||||
|
test_user: "",
|
||||||
|
note: "",
|
||||||
|
},
|
||||||
query: {},
|
query: {},
|
||||||
|
objitem: {},
|
||||||
warehouseOptions: [],
|
warehouseOptions: [],
|
||||||
wmtype:0,
|
wmtype:0,
|
||||||
print_m:false,
|
visible: false,
|
||||||
|
print_m: false,
|
||||||
|
checkVisibleDrawer:false,
|
||||||
wprVisibleDrawer:false,
|
wprVisibleDrawer:false,
|
||||||
materialsVisible:false,
|
materialsVisible:false,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromMb,
|
apiObjPrint:this.$API.cm.labelmat.fromMb,
|
||||||
|
|
@ -143,7 +306,9 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getIQCUser();
|
||||||
this.getWarehouse();
|
this.getWarehouse();
|
||||||
|
this.getQctDetail();
|
||||||
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -175,6 +340,107 @@ export default {
|
||||||
that.wprList = res;
|
that.wprList = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getIQCUser(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.system.user.list.req({ page: 0, belong_dept__name: "IQC" }).then((res) => {
|
||||||
|
that.userList = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//根据物料关联的检测表获取检测项和不合格项
|
||||||
|
getQctDetail(){
|
||||||
|
let that = this;
|
||||||
|
that.qct_defects = [];
|
||||||
|
that.$API.qm.qct.list.req({ page:0 }).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
res.forEach((item) => {
|
||||||
|
if(item.name=='入库检验表'){
|
||||||
|
that.qctId = item.id;
|
||||||
|
that.$API.qm.qct.item.req(that.qctId).then((res0) => {
|
||||||
|
if(res0.qct_defects.length>0){
|
||||||
|
that.qct_defects = res0.qct_defects;
|
||||||
|
res0.qct_defects.forEach((item) => {
|
||||||
|
that.form[item.defect_name] = 0;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
changeDefect(item){
|
||||||
|
let that = this;
|
||||||
|
let count_notok = 0;
|
||||||
|
that.form.count_notok = 0;
|
||||||
|
that.qct_defects.forEach((item) => {
|
||||||
|
if(that.form[item.defect_name]!==null){
|
||||||
|
count_notok += that.form[item.defect_name];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.form.count_notok = count_notok;
|
||||||
|
that.form.count_ok = that.form.count - that.form.count_notok;
|
||||||
|
},
|
||||||
|
//原料库存检验
|
||||||
|
mbCheck(row){
|
||||||
|
let that = this;
|
||||||
|
let date = new Date();
|
||||||
|
let currentDate = that.$TOOL.dateFormat2(date);
|
||||||
|
that.form.test_date = that.currentDate = currentDate;
|
||||||
|
that.visible = true;
|
||||||
|
that.objitem = row;
|
||||||
|
that.form.mb = row.id;
|
||||||
|
that.form.count = that.form.count_ok = row.count;
|
||||||
|
},
|
||||||
|
mbCheckSubmit(){
|
||||||
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
that.isSaveing = true;
|
||||||
|
let objitem = {} ;
|
||||||
|
objitem.mb = that.form.mb;
|
||||||
|
objitem.type = that.form.type;
|
||||||
|
objitem.test_date = that.form.test_date;
|
||||||
|
objitem.test_user = that.form.test_user;
|
||||||
|
objitem.count = that.form.count;
|
||||||
|
objitem.count_ok = that.form.count_ok;
|
||||||
|
objitem.count_notok = that.form.count_notok;
|
||||||
|
objitem.note = that.form.note;
|
||||||
|
objitem.ftestworkdefect = [];
|
||||||
|
that.qct_defects.forEach((item) => {
|
||||||
|
if(that.form[item.defect_name]!==null){
|
||||||
|
objitem.ftestworkdefect.push({defect:item.defect,count:that.form[item.defect_name]});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.$API.qm.ftestwork.create.req(objitem).then((res) => {
|
||||||
|
that.$API.qm.ftestwork.submit.req(res.id).then((res1) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("检验成功");
|
||||||
|
}).catch(err => {that.isSaveing = false;});
|
||||||
|
}).catch(err => {that.isSaveing = false;});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCheckList(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.qm.ftestwork.list.req({ page:0,mb:that.mbId }).then((res) => {
|
||||||
|
that.checkList = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mbCheckList(row){
|
||||||
|
let that = this;
|
||||||
|
that.checkList = [];
|
||||||
|
that.mbId = row.id;
|
||||||
|
that.getCheckList();
|
||||||
|
that.checkVisibleDrawer = true;
|
||||||
|
},
|
||||||
|
checkDelete(row){
|
||||||
|
let that = this;
|
||||||
|
that.$API.qm.ftestwork.delete.req(row.id).then((res) => {
|
||||||
|
that.getCheckList();
|
||||||
|
})
|
||||||
|
},
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row,type){
|
printMaterial(row,type){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,10 @@
|
||||||
>{{ mioObj.customer_name }}</el-descriptions-item
|
>{{ mioObj.customer_name }}</el-descriptions-item
|
||||||
>
|
>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<span v-if="indexArr.length>0" style="font-size: 14px;">大箱标签:</span><el-button type="primary" line v-for="item in indexArr" :key="item" @click="printSaleOut(mioObj,'out',item)">第{{ item }}箱</el-button>
|
<div v-if="mioObj.type == 'sale_out'&&project_code=='bxerp'">
|
||||||
|
<span v-if="indexArr.length>0" style="font-size: 14px;">大箱标签:</span>
|
||||||
|
<el-button type="primary" line v-for="item in indexArr" :key="item" @click="printSaleOut(mioObj,'out',item)">第{{ item }}箱</el-button>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 8px"></div>
|
<div style="height: 8px"></div>
|
||||||
|
|
|
||||||
|
|
@ -199,6 +199,9 @@ export default {
|
||||||
getList(val){
|
getList(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.params.page = val?val:1;
|
that.params.page = val?val:1;
|
||||||
|
that.params.search = that.query.search;
|
||||||
|
that.params.mio__inout_date__gte = that.query.mio__inout_date__gte;
|
||||||
|
that.params.mio__inout_date__lte = that.query.mio__inout_date__lte;
|
||||||
that.$API.inm.mioitem.list.req(that.params).then((res) => {
|
that.$API.inm.mioitem.list.req(that.params).then((res) => {
|
||||||
if (res.count > 0) {
|
if (res.count > 0) {
|
||||||
that.tableData = res.results;
|
that.tableData = res.results;
|
||||||
|
|
@ -286,7 +289,9 @@ export default {
|
||||||
this.dialog.check = false;
|
this.dialog.check = false;
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
let that = this;
|
||||||
|
that.params.page = 1;
|
||||||
|
that.getList(1);
|
||||||
},
|
},
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 玻纤 -->
|
<!-- 玻纤 -->
|
||||||
<el-col :md="12" :sm="24" v-if="project_code == 'bxerp'">
|
<el-col :md="12" :sm="24" v-if="project_code == 'bxerp'||project_code == 'tcerp'">
|
||||||
<el-form-item label="追踪方式" prop="tracking">
|
<el-form-item label="追踪方式" prop="tracking">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.tracking"
|
v-model="form.tracking"
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,26 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row v-if="project_code=='bxerp'&&processName=='捆棒'">
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="单丝长度">
|
||||||
|
<el-input-number
|
||||||
|
v-model="params_json2.dscd"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="丝径">
|
||||||
|
<el-input-number
|
||||||
|
v-model="params_json2.sijing"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row v-if="project_code=='bxerp'&&processName=='排一次棒'">
|
<el-row v-if="project_code=='bxerp'&&processName=='排一次棒'">
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="一次丝对边">
|
<el-form-item label="一次丝对边">
|
||||||
|
|
@ -191,6 +211,14 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="排板包边">
|
||||||
|
<el-select v-model="params_json.pbbb" style="width: 100%">
|
||||||
|
<el-option label="是" value="是"></el-option>
|
||||||
|
<el-option label="否" value="否"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
|
@ -314,6 +342,11 @@ export default {
|
||||||
changdu2:0,
|
changdu2:0,
|
||||||
pbnum:0,
|
pbnum:0,
|
||||||
pbsigao:0,
|
pbsigao:0,
|
||||||
|
pbbb:'是',
|
||||||
|
},
|
||||||
|
params_json2:{
|
||||||
|
dscd:0,
|
||||||
|
sijing:0,
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
|
@ -451,6 +484,9 @@ export default {
|
||||||
if(that.processName=='排一次棒'){
|
if(that.processName=='排一次棒'){
|
||||||
that.form.params_json = that.params_json;
|
that.form.params_json = that.params_json;
|
||||||
}
|
}
|
||||||
|
if(that.processName=='捆棒'){
|
||||||
|
that.form.params_json = that.params_json2;
|
||||||
|
}
|
||||||
if (that.mode === "add") {
|
if (that.mode === "add") {
|
||||||
that.$API.mtm.route.create.req(that.form).then((res) => {
|
that.$API.mtm.route.create.req(that.form).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
|
|
|
||||||
|
|
@ -37,124 +37,124 @@
|
||||||
<el-table-column type="index" width="50" fixed="left"/>
|
<el-table-column type="index" width="50" fixed="left"/>
|
||||||
<el-table-column label="批次号" fixed="left">
|
<el-table-column label="批次号" fixed="left">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_批次号 }}</span>
|
<span>{{ scope.row.data.成品自检_批次号 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="板号" prop="number" fixed="left">
|
<el-table-column label="板号" prop="number" fixed="left">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="腐蚀A" align="center" class-name="colorheader1">
|
<el-table-column label="腐蚀A" align="center" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_腐蚀A?scope.row.data.中检二_缺陷项_腐蚀A:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_腐蚀A?scope.row.data.成品自检_缺陷项_腐蚀A:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="亮道" align="center" class-name="colorheader2">
|
<el-table-column label="亮道" align="center" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_亮道?scope.row.data.中检二_缺陷项_亮道:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_亮道?scope.row.data.成品自检_缺陷项_亮道:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="凹面坑" align="center" class-name="colorheader3">
|
<el-table-column label="凹面坑" align="center" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_凹面坑?scope.row.data.中检二_缺陷项_凹面坑:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_凹面坑?scope.row.data.成品自检_缺陷项_凹面坑:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="小面坑" align="center" class-name="colorheader4">
|
<el-table-column label="小面坑" align="center" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_小面坑?scope.row.data.中检二_缺陷项_小面坑:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_小面坑?scope.row.data.成品自检_缺陷项_小面坑:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="台划" align="center" class-name="colorheader5">
|
<el-table-column label="台划" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_台划?scope.row.data.中检二_缺陷项_台划:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_台划?scope.row.data.成品自检_缺陷项_台划:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="台高" align="center" class-name="colorheader6">
|
<el-table-column label="台高" align="center" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_台高?scope.row.data.中检二_缺陷项_台高:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_台高?scope.row.data.成品自检_缺陷项_台高:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="倒角麻" align="center" class-name="colorheader7">
|
<el-table-column label="倒角麻" align="center" class-name="colorheader7">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_倒角麻?scope.row.data.中检二_缺陷项_倒角麻:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_倒角麻?scope.row.data.成品自检_缺陷项_倒角麻:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="台" align="center" class-name="colorheader1">
|
<el-table-column label="台" align="center" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_台?scope.row.data.中检二_缺陷项_台:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_台?scope.row.data.成品自检_缺陷项_台:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="大外划硌" align="center" class-name="colorheader2">
|
<el-table-column label="大外划硌" align="center" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_大外划硌?scope.row.data.中检二_缺陷项_大外划硌:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_大外划硌?scope.row.data.成品自检_缺陷项_大外划硌:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="炸" align="center" class-name="colorheader3">
|
<el-table-column label="炸" align="center" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_炸?scope.row.data.中检二_缺陷项_炸:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_炸?scope.row.data.成品自检_缺陷项_炸:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="崩废" align="center" class-name="colorheader4">
|
<el-table-column label="崩废" align="center" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_崩废?scope.row.data.中检二_缺陷项_崩废:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_崩废?scope.row.data.成品自检_缺陷项_崩废:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="小崩" align="center" class-name="colorheader5">
|
<el-table-column label="小崩" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_小崩?scope.row.data.中检二_缺陷项_小崩:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_小崩?scope.row.data.成品自检_缺陷项_小崩:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总厚" align="center" class-name="colorheader6">
|
<el-table-column label="总厚" align="center" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_总厚?scope.row.data.中检二_缺陷项_总厚:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_总厚?scope.row.data.成品自检_缺陷项_总厚:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="前角崩" align="center" class-name="colorheader7">
|
<el-table-column label="前角崩" align="center" class-name="colorheader7">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_前角崩?scope.row.data.中检二_缺陷项_前角崩:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_前角崩?scope.row.data.成品自检_缺陷项_前角崩:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="小柱划" align="center" class-name="colorheader1">
|
<el-table-column label="小柱划" align="center" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_小柱划?scope.row.data.中检二_缺陷项_小柱划:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_小柱划?scope.row.data.成品自检_缺陷项_小柱划:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="前小柱划" align="center" class-name="colorheader2">
|
<el-table-column label="前小柱划" align="center" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_前小柱划?scope.row.data.中检二_缺陷项_前小柱划:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_前小柱划?scope.row.data.成品自检_缺陷项_前小柱划:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="前角麻" align="center" class-name="colorheader3">
|
<el-table-column label="前角麻" align="center" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_前角麻?scope.row.data.中检二_缺陷项_前角麻:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_前角麻?scope.row.data.成品自检_缺陷项_前角麻:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="平麻" align="center" class-name="colorheader4">
|
<el-table-column label="平麻" align="center" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_平麻?scope.row.data.中检二_缺陷项_平麻:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_平麻?scope.row.data.成品自检_缺陷项_平麻:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="圆角划" align="center" class-name="colorheader5">
|
<el-table-column label="圆角划" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_圆角划?scope.row.data.中检二_缺陷项_圆角划:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_圆角划?scope.row.data.成品自检_缺陷项_圆角划:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="平面划" align="center" class-name="colorheader6">
|
<el-table-column label="平面划" align="center" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_平面划?scope.row.data.中检二_缺陷项_平面划:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_平面划?scope.row.data.成品自检_缺陷项_平面划:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="小面硌" align="center" class-name="colorheader7">
|
<el-table-column label="小面硌" align="center" class-name="colorheader7">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_小面硌?scope.row.data.中检二_缺陷项_小面硌:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_小面硌?scope.row.data.成品自检_缺陷项_小面硌:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="前台崩" align="center" class-name="colorheader1">
|
<el-table-column label="前台崩" align="center" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_前台崩?scope.row.data.中检二_缺陷项_前台崩:0 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_前台崩?scope.row.data.成品自检_缺陷项_前台崩:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" class-name="colorheader2">
|
<el-table-column label="备注" align="center" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.中检二_缺陷项_备注 }}</span>
|
<span>{{ scope.row.data.成品自检_缺陷项_备注 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
||||||
|
|
@ -29,139 +29,147 @@
|
||||||
stripe
|
stripe
|
||||||
>
|
>
|
||||||
<!-- <el-table-column type="index" width="50" fixed="left"/> -->
|
<!-- <el-table-column type="index" width="50" fixed="left"/> -->
|
||||||
<el-table-column label="检测日期" fixed="left">
|
<el-table-column label="检测日期" fixed="left" prop="batch">
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ scope.row.data.毛坯检测_批次号 }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="版型" prop="number" fixed="left">
|
<el-table-column label="版型" prop="number" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.material_start_name }}{{ scope.row.material_start_model }}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="共检" prop="number" fixed="left">
|
<el-table-column label="共检" fixed="left">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.data.毛坯检测_count_use }}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="放大率¢2mm" align="center" class-name="colorheader1">
|
<el-table-column label="放大率¢2mm" align="center" class-name="colorheader1">
|
||||||
<el-table-column label="合格数" class-name="colorheader1">
|
<el-table-column label="合格数" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']:1 }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷_放大率¢2mm不合格']?scope.row.data.毛坯检测_count_use-scope.row.data['毛坯检测_缺陷_放大率¢2mm不合格']:scope.row.data.毛坯检测_count_use }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率" class-name="colorheader1">
|
<el-table-column label="合格率" class-name="colorheader1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']:1 }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷_放大率¢2mm不合格_比例']?100-scope.row.data['毛坯检测_缺陷_放大率¢2mm不合格_比例']:100 }}%</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader2">
|
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader2">
|
||||||
<el-table-column label="合格数" class-name="colorheader2">
|
<el-table-column label="合格数" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']:1 }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷_放大率¢16mm不合格']?scope.row.data.毛坯检测_count_use-scope.row.data['毛坯检测_缺陷_放大率¢16mm不合格']:scope.row.data.毛坯检测_count_use }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率" class-name="colorheader2">
|
<el-table-column label="合格率" class-name="colorheader2">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']:1 }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷_放大率¢16mm不合格_比例']?100-scope.row.data['毛坯检测_缺陷_放大率¢16mm不合格_比例']:100 }}%</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="剪切" align="center" class-name="colorheader3">
|
<el-table-column label="剪切" align="center" class-name="colorheader3">
|
||||||
<el-table-column label="合格数" class-name="colorheader3">
|
<el-table-column label="合格数" class-name="colorheader3">
|
||||||
|
<!-- 总数-不合格数-可加工数 -->
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:1 }}</span>
|
<span v-if="scope.row.data['毛坯检测_缺陷_剪切¢18.3mm不合格']">
|
||||||
|
<span v-if="scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工']">{{ scope.row.data.毛坯检测_count_use-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm不合格']-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工'] }}</span>
|
||||||
|
<span v-else>{{ scope.row.data.毛坯检测_count_use-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm不合格']}}</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
<span v-if="scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工']">{{ scope.row.data.毛坯检测_count_use-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工'] }}</span>
|
||||||
|
<span v-else>{{ scope.row.data.毛坯检测_count_use }}</span>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率" class-name="colorheader3">
|
<el-table-column label="合格率" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:1 }}</span>
|
<span v-if="scope.row.data['毛坯检测_缺陷_剪切¢18.3mm不合格_比例']">
|
||||||
|
<span v-if="scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工_比例']">{{ 100-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm不合格_比例']-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工_比例'] }}</span>
|
||||||
|
<span v-else>{{ 100-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm不合格_比例'] }}%</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
<span v-if="scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工_比例']">{{ 100-scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工_比例'] }}%</span>
|
||||||
|
<span v-else>100%</span>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可加工" class-name="colorheader3">
|
<el-table-column label="可加工" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:0 }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工']?scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工']:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="加工率" class-name="colorheader3">
|
<el-table-column label="加工率" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:0 }}</span>
|
<span>{{ scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工_比例']?scope.row.data['毛坯检测_缺陷_剪切¢18.3mm可加工_比例']:0 }}%</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="暗点" align="center" class-name="colorheader4">
|
<el-table-column label="暗点" align="center" class-name="colorheader4">
|
||||||
<el-table-column label="内标数" class-name="colorheader4">
|
<el-table-column label="内标数" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_检测项_暗点=='合格'">1</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_暗点不合格?scope.row.data.毛坯检测_count_use-scope.row.data.毛坯检测_缺陷_暗点不合格:scope.row.data.毛坯检测_count_use }}</span>
|
||||||
<span v-else>0</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率" class-name="colorheader4">
|
<el-table-column label="合格率" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_检测项_暗点=='合格'">1</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_暗点不合格_比例?100-scope.row.data.毛坯检测_缺陷_暗点不合格_比例:100 }}%</span>
|
||||||
<span v-else>0</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="长点数" class-name="colorheader4">
|
<el-table-column label="长点数" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_检测项_暗点=='不合格'">1</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_暗点不合格?scope.row.data.毛坯检测_缺陷_暗点不合格:0 }}</span>
|
||||||
<span v-else>0</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="比率" class-name="colorheader4">
|
<el-table-column label="比率" class-name="colorheader4">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data.毛坯检测_检测项_暗点==''||scope.row.data.毛坯检测_检测项_暗点==null">1</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_暗点不合格_比例?scope.row.data.毛坯检测_缺陷_暗点不合格_比例:0 }}%</span>
|
||||||
<span v-else>0</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="崩炸" align="center" class-name="colorheader5">
|
<el-table-column label="崩炸" align="center" class-name="colorheader5">
|
||||||
<el-table-column label="崩" align="center" class-name="colorheader5">
|
<el-table-column label="崩" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_炸废?scope.row.data.毛坯检测_缺陷项_炸废:0 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_崩?scope.row.data.毛坯检测_缺陷_崩:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率" align="center" class-name="colorheader5">
|
<el-table-column label="合格率" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_炸废?scope.row.data.毛坯检测_缺陷项_炸废:0 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_崩_比例?100-scope.row.data.毛坯检测_缺陷_崩_比例:100 }}%</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="炸废" align="center" class-name="colorheader5">
|
<el-table-column label="炸废" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_炸废?scope.row.data.毛坯检测_缺陷项_炸废:0 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_炸废?scope.row.data.毛坯检测_缺陷_炸废:0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率" align="center" class-name="colorheader5">
|
<el-table-column label="合格率" align="center" class-name="colorheader5">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_炸废?scope.row.data.毛坯检测_缺陷项_炸废:0 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_炸废_比例?100-scope.row.data.毛坯检测_缺陷_炸废_比例:100 }}%</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总加工数" align="center" class-name="colorheader6">
|
<el-table-column label="总加工数" align="center" class-name="colorheader6">
|
||||||
<el-table-column label="数量" class-name="colorheader6">
|
<el-table-column label="数量" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']:1 }}</span>
|
<span>{{ scope.row.data.毛坯检测_count_ok }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率" class-name="colorheader6">
|
<el-table-column label="合格率" class-name="colorheader6">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']:1 }}</span>
|
<span>{{ scope.row.data.毛坯检测_合格率 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="长点试加工数" align="center" class-name="colorheader7">
|
<el-table-column label="长点试加工数" align="center" class-name="colorheader7">
|
||||||
<!-- <template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_暗点不合格?scope.row.data.毛坯检测_缺陷_暗点不合格:0 }}</span>
|
||||||
</template> -->
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="长点试加工数" align="center" class-name="colorheader1">
|
<el-table-column label="外形偏(0.5mm)" align="center" class-name="colorheader1">
|
||||||
<!-- <template #default="scope">
|
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
|
|
||||||
</template> -->
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单号" align="center" class-name="colorheader2">
|
<el-table-column label="单号" prop="batch" align="center" class-name="colorheader2">
|
||||||
<!-- <template #default="scope">
|
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
|
|
||||||
</template> -->
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" class-name="colorheader3">
|
<el-table-column label="备注" align="center" class-name="colorheader3">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
|
<span>{{ scope.row.data.毛坯检测_缺陷_备注 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,37 @@
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
></el-input>
|
></el-input>
|
||||||
|
<el-select
|
||||||
|
v-model="query.shiftcc"
|
||||||
|
placeholder="尺寸班次"
|
||||||
|
style="width: 130px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOptions"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
:key="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="query.shiftwg"
|
||||||
|
placeholder="外观班次"
|
||||||
|
style="width: 130px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOptions"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
:key="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.cc_data_start"
|
v-model="query.cc_data_start"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="尺寸检验开始日期"
|
placeholder="尺寸检验开始日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin: 5px"
|
style="width: 130px; margin: 5px"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.cc_data_end"
|
v-model="query.cc_data_end"
|
||||||
|
|
@ -21,7 +45,7 @@
|
||||||
placeholder="尺寸检验结束日期"
|
placeholder="尺寸检验结束日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin:0"
|
style="width: 130px; margin:0"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.wg_data_start"
|
v-model="query.wg_data_start"
|
||||||
|
|
@ -29,7 +53,7 @@
|
||||||
placeholder="外观检验开始日期"
|
placeholder="外观检验开始日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin: 5px"
|
style="width: 130px; margin: 5px"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.wg_data_end"
|
v-model="query.wg_data_end"
|
||||||
|
|
@ -37,7 +61,7 @@
|
||||||
placeholder="外观检验结束日期"
|
placeholder="外观检验结束日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin:0"
|
style="width: 130px; margin:0"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.fx_data_start"
|
v-model="query.fx_data_start"
|
||||||
|
|
@ -45,7 +69,7 @@
|
||||||
placeholder="返修开始日期"
|
placeholder="返修开始日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin: 5px"
|
style="width: 130px; margin: 5px"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.fx_data_end"
|
v-model="query.fx_data_end"
|
||||||
|
|
@ -53,7 +77,7 @@
|
||||||
placeholder="返修结束日期"
|
placeholder="返修结束日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin:0"
|
style="width: 130px; margin:0"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -349,6 +373,8 @@ export default {
|
||||||
wg_data_end:'',
|
wg_data_end:'',
|
||||||
fx_data_start:'',
|
fx_data_start:'',
|
||||||
fx_data_end:'',
|
fx_data_end:'',
|
||||||
|
shiftcc:'',
|
||||||
|
shiftwg:'',
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
page:1,
|
page:1,
|
||||||
|
|
@ -364,13 +390,21 @@ export default {
|
||||||
dataTotal:0,
|
dataTotal:0,
|
||||||
options:[],
|
options:[],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
|
shiftOptions:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.getList();
|
that.getList();
|
||||||
|
that.getShift();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getShift(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.shift.list.req({page:0}).then((res) => {
|
||||||
|
that.shiftOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
getList(val){
|
getList(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.params.page = val?val:1;
|
that.params.page = val?val:1;
|
||||||
|
|
@ -409,56 +443,37 @@ export default {
|
||||||
if(key=='batch'){
|
if(key=='batch'){
|
||||||
obj.field = "batch";
|
obj.field = "batch";
|
||||||
obj.compare = "contains";
|
obj.compare = "contains";
|
||||||
arr1.push(obj);
|
|
||||||
arr2.push(obj);
|
|
||||||
arr3.push(obj);
|
|
||||||
}else if(key=='cc_data_start'){
|
}else if(key=='cc_data_start'){
|
||||||
obj.compare = "gte";
|
obj.compare = "gte";
|
||||||
obj.field = "data__尺寸检验_日期";
|
obj.field = "data__尺寸检验_日期";
|
||||||
arr1.push(obj);
|
|
||||||
}else if(key=='cc_data_end'){
|
}else if(key=='cc_data_end'){
|
||||||
obj.compare = "lte";
|
obj.compare = "lte";
|
||||||
obj.field = "data__尺寸检验_日期";
|
obj.field = "data__尺寸检验_日期";
|
||||||
arr1.push(obj);
|
}else if(key=='shiftcc'){
|
||||||
|
obj.compare = "";
|
||||||
|
obj.field = "data__尺寸检验_班次";
|
||||||
}else if(key=='wg_data_start'){
|
}else if(key=='wg_data_start'){
|
||||||
obj.compare = "gte";
|
obj.compare = "gte";
|
||||||
obj.field = "data__外观检验_日期";
|
obj.field = "data__外观检验_日期";
|
||||||
arr2.push(obj);
|
|
||||||
}else if(key=='wg_data_end'){
|
}else if(key=='wg_data_end'){
|
||||||
obj.compare = "lte";
|
obj.compare = "lte";
|
||||||
obj.field = "data__外观检验_日期";
|
obj.field = "data__外观检验_日期";
|
||||||
arr2.push(obj);
|
}else if(key=='shiftwg'){
|
||||||
|
obj.compare = "";
|
||||||
|
obj.field = "data__外观检验_班次";
|
||||||
}else if(key=='fx_data_start'){
|
}else if(key=='fx_data_start'){
|
||||||
obj.compare = "gte";
|
obj.compare = "gte";
|
||||||
obj.field = "data__返修_日期";
|
obj.field = "data__返修_日期";
|
||||||
arr3.push(obj);
|
|
||||||
}else if(key=='fx_data_end'){
|
}else if(key=='fx_data_end'){
|
||||||
obj.compare = "lte";
|
obj.compare = "lte";
|
||||||
obj.field = "data__返修_日期";
|
obj.field = "data__返修_日期";
|
||||||
|
}
|
||||||
|
arr1.push(obj);
|
||||||
|
arr2.push(obj);
|
||||||
arr3.push(obj);
|
arr3.push(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if((that.query.cc_data_start != ""&&that.query.cc_data_start != null)||(that.query.cc_data_end != ""&&that.query.cc_data_end != null)){
|
|
||||||
console.log('arr1');
|
|
||||||
console.log(arr1);
|
|
||||||
that.params.querys.push(arr1);
|
|
||||||
}
|
|
||||||
if((that.query.wg_data_start != ""&&that.query.wg_data_start != null)||(that.query.wg_data_end != ""&&that.query.wg_data_end != null)){
|
|
||||||
console.log('arr2');
|
|
||||||
console.log(arr2);
|
|
||||||
that.params.querys.push(arr2);
|
|
||||||
}
|
|
||||||
if((that.query.fx_data_start != ""&&that.query.fx_data_start != null)||(that.query.fx_data_end != ""&&that.query.fx_data_end != null)){
|
|
||||||
console.log('arr3');
|
|
||||||
console.log(arr3);
|
|
||||||
that.params.querys.push(arr3);
|
|
||||||
}
|
|
||||||
if((that.query.cc_data_start == ""||that.query.cc_data_start == null)&&(that.query.cc_data_end == ""||that.query.cc_data_end== null)&&
|
|
||||||
(that.query.wg_data_start == ""||that.query.wg_data_start == null)&&(that.query.wg_data_end == ""||that.query.wg_data_end == null)&&
|
|
||||||
(that.query.fx_data_start == ""||that.query.fx_data_start == null)&&(that.query.fx_data_end == ""||that.query.fx_data_end == null)){
|
|
||||||
that.params.querys.push(arr1,arr2,arr3);
|
that.params.querys.push(arr1,arr2,arr3);
|
||||||
}
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
getSummaries({ columns, data }) {
|
getSummaries({ columns, data }) {
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,37 @@
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
></el-input>
|
></el-input>
|
||||||
|
<el-select
|
||||||
|
v-model="query.shiftcc"
|
||||||
|
placeholder="尺寸班次"
|
||||||
|
style="width: 130px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOptions"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
:key="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="query.shiftwg"
|
||||||
|
placeholder="外观班次"
|
||||||
|
style="width: 130px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOptions"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
:key="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.cc_data_start"
|
v-model="query.cc_data_start"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="尺寸检验开始日期"
|
placeholder="尺寸检验开始日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin: 5px"
|
style="width: 130px; margin: 5px"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.cc_data_end"
|
v-model="query.cc_data_end"
|
||||||
|
|
@ -21,7 +45,7 @@
|
||||||
placeholder="尺寸检验结束日期"
|
placeholder="尺寸检验结束日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin:0"
|
style="width: 130px; margin:0"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.wg_data_start"
|
v-model="query.wg_data_start"
|
||||||
|
|
@ -29,7 +53,7 @@
|
||||||
placeholder="外观检验开始日期"
|
placeholder="外观检验开始日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin: 5px"
|
style="width: 130px; margin: 5px"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.wg_data_end"
|
v-model="query.wg_data_end"
|
||||||
|
|
@ -37,7 +61,7 @@
|
||||||
placeholder="外观检验结束日期"
|
placeholder="外观检验结束日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin:0"
|
style="width: 130px; margin:0"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.fx_data_start"
|
v-model="query.fx_data_start"
|
||||||
|
|
@ -45,7 +69,7 @@
|
||||||
placeholder="返修开始日期"
|
placeholder="返修开始日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin: 5px"
|
style="width: 130px; margin: 5px"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.fx_data_end"
|
v-model="query.fx_data_end"
|
||||||
|
|
@ -53,7 +77,7 @@
|
||||||
placeholder="返修结束日期"
|
placeholder="返修结束日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
clearable
|
clearable
|
||||||
style="width: 160px; margin:0"
|
style="width: 130px; margin:0"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -290,6 +314,8 @@ export default {
|
||||||
wg_data_end:'',
|
wg_data_end:'',
|
||||||
fx_data_start:'',
|
fx_data_start:'',
|
||||||
fx_data_end:'',
|
fx_data_end:'',
|
||||||
|
shiftcc:'',
|
||||||
|
shiftwg:'',
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
page:1,
|
page:1,
|
||||||
|
|
@ -305,13 +331,21 @@ export default {
|
||||||
dataTotal:0,
|
dataTotal:0,
|
||||||
options:[],
|
options:[],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
|
shiftOptions:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.getList();
|
that.getList();
|
||||||
|
that.getShift();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getShift(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.shift.list.req({page:0}).then((res) => {
|
||||||
|
that.shiftOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
getList(val){
|
getList(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.params.page = val?val:1;
|
that.params.page = val?val:1;
|
||||||
|
|
@ -350,50 +384,37 @@ export default {
|
||||||
if(key=='batch'){
|
if(key=='batch'){
|
||||||
obj.field = "batch";
|
obj.field = "batch";
|
||||||
obj.compare = "contains";
|
obj.compare = "contains";
|
||||||
arr1.push(obj);
|
|
||||||
arr2.push(obj);
|
|
||||||
arr3.push(obj);
|
|
||||||
}else if(key=='cc_data_start'){
|
}else if(key=='cc_data_start'){
|
||||||
obj.compare = "gte";
|
obj.compare = "gte";
|
||||||
obj.field = "data__尺寸检验_日期";
|
obj.field = "data__尺寸检验_日期";
|
||||||
arr1.push(obj);
|
|
||||||
}else if(key=='cc_data_end'){
|
}else if(key=='cc_data_end'){
|
||||||
obj.compare = "lte";
|
obj.compare = "lte";
|
||||||
obj.field = "data__尺寸检验_日期";
|
obj.field = "data__尺寸检验_日期";
|
||||||
arr1.push(obj);
|
}else if(key=='shiftcc'){
|
||||||
|
obj.compare = "";
|
||||||
|
obj.field = "data__尺寸检验_班次";
|
||||||
}else if(key=='wg_data_start'){
|
}else if(key=='wg_data_start'){
|
||||||
obj.compare = "gte";
|
obj.compare = "gte";
|
||||||
obj.field = "data__外观检验_日期";
|
obj.field = "data__外观检验_日期";
|
||||||
arr2.push(obj);
|
|
||||||
}else if(key=='wg_data_end'){
|
}else if(key=='wg_data_end'){
|
||||||
obj.compare = "lte";
|
obj.compare = "lte";
|
||||||
obj.field = "data__外观检验_日期";
|
obj.field = "data__外观检验_日期";
|
||||||
arr2.push(obj);
|
}else if(key=='shiftwg'){
|
||||||
|
obj.compare = "";
|
||||||
|
obj.field = "data__外观检验_班次";
|
||||||
}else if(key=='fx_data_start'){
|
}else if(key=='fx_data_start'){
|
||||||
obj.compare = "gte";
|
obj.compare = "gte";
|
||||||
obj.field = "data__返修_日期";
|
obj.field = "data__返修_日期";
|
||||||
arr3.push(obj);
|
|
||||||
}else if(key=='fx_data_end'){
|
}else if(key=='fx_data_end'){
|
||||||
obj.compare = "lte";
|
obj.compare = "lte";
|
||||||
obj.field = "data__返修_日期";
|
obj.field = "data__返修_日期";
|
||||||
|
}
|
||||||
|
arr1.push(obj);
|
||||||
|
arr2.push(obj);
|
||||||
arr3.push(obj);
|
arr3.push(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if((that.query.cc_data_start != ""&&that.query.cc_data_start != null)||(that.query.cc_data_end != ""&&that.query.cc_data_end != null)){
|
|
||||||
that.params.querys.push(arr1);
|
|
||||||
}
|
|
||||||
if((that.query.wg_data_start != ""&&that.query.wg_data_start != null)||(that.query.wg_data_end != ""&&that.query.wg_data_end != null)){
|
|
||||||
that.params.querys.push(arr2);
|
|
||||||
}
|
|
||||||
if((that.query.fx_data_start != ""&&that.query.fx_data_start != null)||(that.query.fx_data_end != ""&&that.query.fx_data_end != null)){
|
|
||||||
that.params.querys.push(arr3);
|
|
||||||
}
|
|
||||||
if((that.query.cc_data_start == ""||that.query.cc_data_start == null)&&(that.query.cc_data_end == ""||that.query.cc_data_end== null)&&
|
|
||||||
(that.query.wg_data_start == ""||that.query.wg_data_start == null)&&(that.query.wg_data_end == ""||that.query.wg_data_end == null)&&
|
|
||||||
(that.query.fx_data_start == ""||that.query.fx_data_start == null)&&(that.query.fx_data_end == ""||that.query.fx_data_end == null)){
|
|
||||||
that.params.querys.push(arr1,arr2,arr3);
|
that.params.querys.push(arr1,arr2,arr3);
|
||||||
}
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
getSummaries({ columns, data }) {
|
getSummaries({ columns, data }) {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,6 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
|
||||||
import inmIn from "./inmIn.vue";
|
import inmIn from "./inmIn.vue";
|
||||||
import inmOut from "./inmOut.vue";
|
import inmOut from "./inmOut.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./mlogs.vue";
|
||||||
|
|
@ -93,7 +92,7 @@ import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "bx",
|
name: "bx",
|
||||||
components: { inm,inmIn, mlogs, mtask, handover,inmOut },
|
components: { inmIn, mlogs, mtask, handover,inmOut },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mgroups:[],
|
mgroups:[],
|
||||||
|
|
|
||||||
|
|
@ -1,547 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-container>
|
|
||||||
<el-header>
|
|
||||||
<div class="left-panel">
|
|
||||||
<el-button type="primary" @click="tomio('do_out')" v-auth="'mio.do'" v-if="route_code=='qingxi'">领料</el-button>
|
|
||||||
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">报废</el-button>
|
|
||||||
<el-button type="primary" v-auth="'handover.create'" @click="batchConcat()">合批</el-button>
|
|
||||||
<el-button type="primary" @click="tomio('do_in')" v-auth="'mio.do'"
|
|
||||||
v-if="route_code=='chengpingneiwaichujian'||route_code=='chengpneizhifujian'||route_code=='chengpingxinengjiance'||
|
|
||||||
route_code=='chenpjianchicunjiance'||route_code=='chengpwaiguanfujianyi'||route_code=='chengpwaiguanfujianer'"
|
|
||||||
>入库</el-button>
|
|
||||||
</div>
|
|
||||||
<div class="right-panel">
|
|
||||||
<el-select
|
|
||||||
v-model="query.state"
|
|
||||||
placeholder="物料状态"
|
|
||||||
clearable
|
|
||||||
@change="searchStateChange"
|
|
||||||
style="width: 250px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in stateOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-input
|
|
||||||
style="margin-right: 5px"
|
|
||||||
v-model="query.search"
|
|
||||||
placeholder="名称"
|
|
||||||
clearable
|
|
||||||
></el-input>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="handleQuery"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
</el-header>
|
|
||||||
<el-main class="nopadding">
|
|
||||||
<scTable
|
|
||||||
ref="table"
|
|
||||||
:apiObj="apiObj"
|
|
||||||
row-key="id"
|
|
||||||
:params="params"
|
|
||||||
:query="query"
|
|
||||||
@selection-change="selectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="50"></el-table-column>
|
|
||||||
<el-table-column label="状态" prop="state" width="100" >
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tag :type="wmState[scope.row.state]?.type">
|
|
||||||
{{wmState[scope.row.state]?.text}}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="物料名称"
|
|
||||||
prop="material_name"
|
|
||||||
min-width="150"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
{{ scope.row.material_name }}
|
|
||||||
<span v-if="scope.row.material_origin != null">
|
|
||||||
({{ scope.row.material_origin_name }})
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="物料已到工序"
|
|
||||||
prop="material_name"
|
|
||||||
min-width="100"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
{{ scope.row.material_name.split('|').at(-1) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="原始物料"
|
|
||||||
prop="material_ofrom_name"
|
|
||||||
min-width="120"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="批次号"
|
|
||||||
prop="batch"
|
|
||||||
min-width="120"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="部门/工段"
|
|
||||||
prop="belong_dept_name"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="数量"
|
|
||||||
prop="count"
|
|
||||||
min-width="80"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.material_&&scope.row.material_.tracking==10">{{scope.row.count}}</span>
|
|
||||||
<el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="备注"
|
|
||||||
prop="note"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="生产中"
|
|
||||||
prop="count_working"
|
|
||||||
min-width="80"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="不合格标记"
|
|
||||||
prop="defect_name"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="创建时间"
|
|
||||||
prop="create_time"
|
|
||||||
width="150"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
fixed="right"
|
|
||||||
align="center"
|
|
||||||
width="120"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-link :underline="false" @click="printMaterial(scope.row,'wm')" type="primary">物料标签</el-link>
|
|
||||||
<el-link :underline="false" v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20" @click="tableCheckList(scope.row)" type="primary">检验记录</el-link>
|
|
||||||
<el-link
|
|
||||||
v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20"
|
|
||||||
:underline="false"
|
|
||||||
@click="inmCheck(scope.row)"
|
|
||||||
type="primary"
|
|
||||||
style="margin-left: 10px;"
|
|
||||||
>检验</el-link>
|
|
||||||
<el-link :underline="false" type="primary"
|
|
||||||
@click="handleWatch(scope.row)"
|
|
||||||
>流程图</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-main>
|
|
||||||
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
|
|
||||||
<materials
|
|
||||||
style="height: 500px"
|
|
||||||
:materialType="materialType"
|
|
||||||
ref="materialsChose"
|
|
||||||
@choseChange="choseChange"
|
|
||||||
></materials>
|
|
||||||
</el-dialog>
|
|
||||||
<check-dialog
|
|
||||||
v-if="dialog.check"
|
|
||||||
ref="checkDialog"
|
|
||||||
:itemObj = "checkItem"
|
|
||||||
@success="handleSaveSuccess"
|
|
||||||
@closed="dialog.check = false"
|
|
||||||
>
|
|
||||||
</check-dialog>
|
|
||||||
<scrap-dialog
|
|
||||||
v-if="dialog.scrap"
|
|
||||||
ref="scrapDialog"
|
|
||||||
:type="type"
|
|
||||||
:mgroupName="mgroup_name"
|
|
||||||
:mgroupId="mgroupId"
|
|
||||||
@success="handleScrapSuccess"
|
|
||||||
@closed="dialog.scrap = false"
|
|
||||||
>
|
|
||||||
</scrap-dialog>
|
|
||||||
<showDrawer
|
|
||||||
ref="showDrawer"
|
|
||||||
v-if="visibleDrawer"
|
|
||||||
:wm="wm"
|
|
||||||
:material="wmMaterial"
|
|
||||||
@closed="visibleDrawer = false"
|
|
||||||
>
|
|
||||||
</showDrawer>
|
|
||||||
<save-dialog
|
|
||||||
v-if="dialog.inmRecord"
|
|
||||||
ref="inmRecordDialog"
|
|
||||||
:cate = "cate_type"
|
|
||||||
:process = "process"
|
|
||||||
:mgroupId = "params.mgroupx"
|
|
||||||
:deptId = " params.belong_dept"
|
|
||||||
@success="handleinmSuccess"
|
|
||||||
>
|
|
||||||
</save-dialog>
|
|
||||||
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
|
||||||
<template #header>
|
|
||||||
<h4>关联产品</h4>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<scTable ref="wprTable" hidePagination :data="wprList">
|
|
||||||
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
|
||||||
<el-table-column label="记录数据" prop="oinfo">
|
|
||||||
<template #default="scope">
|
|
||||||
<div v-for="(item,index) in scope.row.oinfo" :key="item.id">
|
|
||||||
{{ item.name }}:{{ item.val}}
|
|
||||||
<span v-if="index<(scope.row.oinfo.length-1)">,</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="缺陷项" min-width="200px">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-for="item in scope.row.wprdefect" :key="item.id">
|
|
||||||
<el-tag
|
|
||||||
type="warning"
|
|
||||||
>{{ item.defect_name }}</el-tag>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
fixed="right"
|
|
||||||
align="center"
|
|
||||||
width="120"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</template>
|
|
||||||
<template #footer>
|
|
||||||
<div style="flex: auto">
|
|
||||||
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-drawer>
|
|
||||||
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
|
||||||
<scDegra
|
|
||||||
v-if="limitedWatch"
|
|
||||||
ref="degraDialogs"
|
|
||||||
:nodes="nodes"
|
|
||||||
:edges="edges"
|
|
||||||
:rankdir="'LR'"
|
|
||||||
>
|
|
||||||
</scDegra>
|
|
||||||
</el-drawer>
|
|
||||||
</el-container>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { wmState } from "@/utils/enum.js";
|
|
||||||
import materials from "./../mtm/materials.vue";
|
|
||||||
import checkDialog from "./check_form.vue";
|
|
||||||
import showDrawer from "./check_drawer.vue";
|
|
||||||
import scrapDialog from "./handover_form.vue";
|
|
||||||
import saveDialog from "./inm_record.vue";
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
deptId: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
mgroupId: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
mgroupName: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
mgroup_code: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
process: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
saveDialog,
|
|
||||||
materials,
|
|
||||||
checkDialog,
|
|
||||||
showDrawer,
|
|
||||||
scrapDialog
|
|
||||||
},
|
|
||||||
name: "wmaterial",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
wmState,
|
|
||||||
apiObj: null,
|
|
||||||
params: {
|
|
||||||
mgroupx: "",
|
|
||||||
belong_dept:''
|
|
||||||
},
|
|
||||||
wmtype:0,
|
|
||||||
query: {
|
|
||||||
search: "",
|
|
||||||
state: null,
|
|
||||||
},
|
|
||||||
dialog: {
|
|
||||||
save: false,
|
|
||||||
check: false,
|
|
||||||
scrap: false,
|
|
||||||
permission: false,
|
|
||||||
inmRecord:false,
|
|
||||||
},
|
|
||||||
nodes:[],
|
|
||||||
edges:[],
|
|
||||||
wprList:[],
|
|
||||||
tableData: [],
|
|
||||||
selection: [],
|
|
||||||
stateOptions:[
|
|
||||||
{ value: 10, name: "合格"},
|
|
||||||
{ value: 20, name: "不合格"},
|
|
||||||
{ value: 30, name: "返工"},
|
|
||||||
// { value: 40, name: "检验"},
|
|
||||||
// { value: 50, name: "报废"},
|
|
||||||
],
|
|
||||||
queryWm: {
|
|
||||||
search: "",
|
|
||||||
material: "",
|
|
||||||
},
|
|
||||||
wprParams:{
|
|
||||||
page:0,
|
|
||||||
wm: ""
|
|
||||||
},
|
|
||||||
route_code:"",
|
|
||||||
showBatch: "",
|
|
||||||
wmMaterial:'',
|
|
||||||
cate_type:'',
|
|
||||||
materialType: "wm",
|
|
||||||
limitedWatch:false,
|
|
||||||
materialsVisible:false,
|
|
||||||
visibleDrawer: false,
|
|
||||||
wprVisibleDrawer:false,
|
|
||||||
wprApiObj:this.$API.wpm.wpr.list,
|
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
|
||||||
printer_name:localStorage.getItem("printer_name"),
|
|
||||||
mgroup_name:'',
|
|
||||||
ofrom_name:'',
|
|
||||||
ofrom_batch :'',
|
|
||||||
checkItem:{},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
let that = this;
|
|
||||||
let paths = that.$route.path;
|
|
||||||
let arr = paths.split("/");
|
|
||||||
that.route_code = arr[2];
|
|
||||||
that.params.mgroupx = that.mgroupId;
|
|
||||||
// that.params.belong_dept =that.deptId;
|
|
||||||
that.$TOOL.data.set('bx_deptID',that.deptId);
|
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleWatch(row) {
|
|
||||||
let that = this;
|
|
||||||
that.$API.wpm.batchlog.dag.req({batch:row.batch}).then((res) => {
|
|
||||||
that.nodes = res.nodes;
|
|
||||||
that.edges = res.edges;
|
|
||||||
that.limitedWatch = true;
|
|
||||||
that.$nextTick(() => {
|
|
||||||
that.$refs.degraDialogs.open();
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},
|
|
||||||
add() {
|
|
||||||
this.dialog.save = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.saveDialog.open("add");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
materialsChoses(str) {
|
|
||||||
this.materialType = str;
|
|
||||||
this.materialsVisible = true;
|
|
||||||
},
|
|
||||||
choseChange(data) {
|
|
||||||
this.queryWm.material = data;
|
|
||||||
this.$refs.table_wm.queryData(this.queryWm);
|
|
||||||
this.materialsVisible = false;
|
|
||||||
},
|
|
||||||
tomio(type) {
|
|
||||||
let that = this;
|
|
||||||
that.cate_type=type;
|
|
||||||
that.dialog.inmRecord = true;
|
|
||||||
that.$nextTick(() => {
|
|
||||||
that.$refs.inmRecordDialog.open("add");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//获取当前批次车间物料的检验记录
|
|
||||||
tableCheckList(row){
|
|
||||||
this.wm = row.id;
|
|
||||||
this.wmMaterial = row.material;
|
|
||||||
this.visibleDrawer = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.showDrawer.open();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//表格选择后回调事件
|
|
||||||
selectionChange(selection) {
|
|
||||||
let that = this;
|
|
||||||
that.selection = selection;
|
|
||||||
//合批
|
|
||||||
if(selection.length>0){
|
|
||||||
let material = selection[0].material;
|
|
||||||
selection.forEach((item)=>{
|
|
||||||
if(item.material!==material){
|
|
||||||
that.$refs.table.toggleRowSelection(item, false);
|
|
||||||
that.$message.warning("该批次物料与前面的不一样");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//添加报废
|
|
||||||
table_add(type) {
|
|
||||||
this.dialog.scrap = true;
|
|
||||||
this.type = type;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.scrapDialog.open("add");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//合批
|
|
||||||
batchConcat(){
|
|
||||||
this.changebatch = true;
|
|
||||||
let handoverb = [];
|
|
||||||
if(this.selection.length>0){
|
|
||||||
this.selection.forEach(item=>{
|
|
||||||
let obj = {};
|
|
||||||
obj.wm = item.id;
|
|
||||||
obj.batch = item.batch;
|
|
||||||
obj.process = item.material_.process_name;
|
|
||||||
obj.count_cando = item.count_cando;
|
|
||||||
obj.count = item.count_cando;
|
|
||||||
handoverb.push(obj)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.type = 10;
|
|
||||||
this.dialog.scrap = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.scrapDialog.open("add",handoverb,30);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleScrapSuccess(){
|
|
||||||
this.dialog.scrap = false;
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
},
|
|
||||||
//出入库后刷新页面
|
|
||||||
handleinmSuccess(){
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
},
|
|
||||||
//搜索
|
|
||||||
handleQuery() {
|
|
||||||
this.$refs.table.queryData(this.query);
|
|
||||||
},
|
|
||||||
showWpr(row){
|
|
||||||
let that = this;
|
|
||||||
that.ofrom_name = row.material_ofrom_name;
|
|
||||||
that.ofrom_batch = row.batch;
|
|
||||||
that.wprParams.wm = row.id;
|
|
||||||
that.wprVisibleDrawer = true;
|
|
||||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
|
||||||
that.wprList = res;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//本地更新数据
|
|
||||||
handleSaveSuccess(data, mode) {
|
|
||||||
this.dialog.save = false;
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
},
|
|
||||||
//打印物料标签
|
|
||||||
printMaterial(row,type){
|
|
||||||
let that = this;
|
|
||||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
|
||||||
if(type=='wm'){
|
|
||||||
let params = {};
|
|
||||||
params.tid = row.id;
|
|
||||||
if(that.route_code=='paiyicibang'){
|
|
||||||
params.label_template_name = '排一次棒打印模板';
|
|
||||||
}else{
|
|
||||||
params.extra_data={count:row.count};
|
|
||||||
params.label_template_name = '其他工序打印模板';
|
|
||||||
}
|
|
||||||
that.apiObjPrint.req(params).then((res) => {
|
|
||||||
let obj = {};
|
|
||||||
obj.printer_commands = res.commands;
|
|
||||||
obj.printer_name = that.printer_name;
|
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
|
||||||
that.$message.success("打印成功");
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}else if(type=='wpr'){
|
|
||||||
let params = {};
|
|
||||||
let name = row.material_name.split('|')[0];
|
|
||||||
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
|
|
||||||
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
|
|
||||||
){
|
|
||||||
let oinfo = [];
|
|
||||||
for(let key in row.oinfo){
|
|
||||||
oinfo.push(row.oinfo[key])
|
|
||||||
}
|
|
||||||
let data = {sigao:'',duibian:'',moban:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofrom_name,ofrom_batch:that.ofrom_batch};
|
|
||||||
if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
|
|
||||||
params.label_template_name = '脱膜测量单件标签模板';
|
|
||||||
}else{
|
|
||||||
params.label_template_name = '排扳单件打印模板';
|
|
||||||
}
|
|
||||||
if(oinfo.length>0){
|
|
||||||
oinfo.forEach((item)=>{
|
|
||||||
if(item.name=="丝高"){
|
|
||||||
data.sigao = item.val;
|
|
||||||
}else if(item.name=="对边"){
|
|
||||||
data.duibian = item.val;
|
|
||||||
}else if(item.name=="模具号"){
|
|
||||||
data.moban = item.val;
|
|
||||||
}else if(item.name=="实验板段"){
|
|
||||||
data.istest = item.val?'是':'否';
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
params.data = data;
|
|
||||||
}else{
|
|
||||||
params.label_template_name = '单件打印模板';
|
|
||||||
params.data = {number:row.number,name:name};
|
|
||||||
}
|
|
||||||
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
|
||||||
let obj = {};
|
|
||||||
obj.printer_commands = res.commands;
|
|
||||||
obj.printer_name = that.printer_name;
|
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
|
||||||
that.$message.success("打印成功");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
that.$message.warning("请先设置打印机");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
inmCheck(row){
|
|
||||||
let that = this;
|
|
||||||
that.checkItem = row;
|
|
||||||
that.dialog.check = true;
|
|
||||||
that.$nextTick(() => {
|
|
||||||
that.$refs.checkDialog.open("add");
|
|
||||||
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
v-model="query.state"
|
v-model="query.state"
|
||||||
placeholder="物料状态"
|
placeholder="物料状态"
|
||||||
clearable
|
clearable
|
||||||
@change="searchStateChange"
|
@change="handleQuery"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -129,7 +129,7 @@
|
||||||
width="120"
|
width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link :underline="false" @click="printMaterial(scope.row,'wm')" type="primary">物料标签</el-link>
|
<el-link :underline="false" @click="printMaterial(scope.row)" type="primary">物料标签</el-link>
|
||||||
<el-link :underline="false" v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20" @click="tableCheckList(scope.row)" type="primary">检验记录</el-link>
|
<el-link :underline="false" v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20" @click="tableCheckList(scope.row)" type="primary">检验记录</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20"
|
v-if="scope.row.material_&&scope.row.material_.tracking==10&&scope.row.state!==20"
|
||||||
|
|
@ -199,61 +199,18 @@
|
||||||
@closed="dialog.handover = false"
|
@closed="dialog.handover = false"
|
||||||
>
|
>
|
||||||
</handover-dialog>
|
</handover-dialog>
|
||||||
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
<wpr-dialog
|
||||||
<template #header>
|
v-if="dialog.wprList"
|
||||||
<h4>关联产品</h4>
|
ref="inmWprDialog"
|
||||||
<el-input
|
:wm = "wmId"
|
||||||
style="margin-right: 5px;width: 200px;"
|
:process = "process"
|
||||||
v-model="wprsearch"
|
:mgroupId = "mgroupId"
|
||||||
placeholder="编号"
|
:mgroupName="mgroupName"
|
||||||
clearable
|
:ofromName = "ofrom_name"
|
||||||
></el-input>
|
:ofromBatch = "ofrom_batch"
|
||||||
<el-button
|
@success="handleWprSuccess"
|
||||||
type="primary"
|
@closed="dialog.wprList = false"
|
||||||
icon="el-icon-search"
|
></wpr-dialog>
|
||||||
@click="handleWprQuery"
|
|
||||||
></el-button>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<el-table ref="wprTable" id="wprTable" :height="wprTableHeight" hidePagination highlight-current-row border :data="wprList">
|
|
||||||
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
|
||||||
<el-table-column label="对外编号" prop="number_out" min-width="100px"></el-table-column>
|
|
||||||
<el-table-column label="记录数据" prop="oinfo">
|
|
||||||
<template #default="scope">
|
|
||||||
<div v-for="(item,index) in scope.row.oinfo" :key="item.id">
|
|
||||||
{{ item.name }}:{{ item.val}}
|
|
||||||
<span v-if="index<(scope.row.oinfo.length-1)">,</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="缺陷项" min-width="200px">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-for="item in scope.row.wprdefect" :key="item.id">
|
|
||||||
<el-tag
|
|
||||||
type="warning"
|
|
||||||
>{{ item.defect_name }}</el-tag>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
fixed="right"
|
|
||||||
align="center"
|
|
||||||
width="200"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button v-if="mgroupName=='毛坯检测后打码'" @click="QRCode(scope.row,'wpr')" type="success">二维码</el-button>
|
|
||||||
<el-button @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</template>
|
|
||||||
<!-- <template #footer>
|
|
||||||
<div style="flex: auto">
|
|
||||||
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</template> -->
|
|
||||||
</el-drawer>
|
|
||||||
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
<scDegra
|
<scDegra
|
||||||
v-if="limitedWatch"
|
v-if="limitedWatch"
|
||||||
|
|
@ -264,13 +221,6 @@
|
||||||
>
|
>
|
||||||
</scDegra>
|
</scDegra>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<el-dialog title="二维码" v-model="dialog.qrcode" width="500px">
|
|
||||||
<el-container>
|
|
||||||
<el-main style="text-align: center;padding: 50px 0;">
|
|
||||||
<scQrCode :text="scQr_code"></scQrCode>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
</el-dialog>
|
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -281,6 +231,7 @@ import showDrawer from "./check_drawer.vue";
|
||||||
import scrapDialog from "./handover_form.vue";
|
import scrapDialog from "./handover_form.vue";
|
||||||
import saveDialog from "./inm_record.vue";
|
import saveDialog from "./inm_record.vue";
|
||||||
import handoverDialog from "./handover_form2.vue";
|
import handoverDialog from "./handover_form2.vue";
|
||||||
|
import wprDialog from "./wprList.vue";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
deptId: {
|
deptId: {
|
||||||
|
|
@ -305,6 +256,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
wprDialog,
|
||||||
saveDialog,
|
saveDialog,
|
||||||
materials,
|
materials,
|
||||||
checkDialog,
|
checkDialog,
|
||||||
|
|
@ -333,11 +285,9 @@ export default {
|
||||||
scrap: false,
|
scrap: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
inmRecord:false,
|
inmRecord:false,
|
||||||
qrcode:false
|
|
||||||
},
|
},
|
||||||
nodes:[],
|
nodes:[],
|
||||||
edges:[],
|
edges:[],
|
||||||
wprList:[],
|
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
|
|
@ -353,8 +303,7 @@ export default {
|
||||||
page:0,
|
page:0,
|
||||||
wm: ""
|
wm: ""
|
||||||
},
|
},
|
||||||
wprTableHeight: 500,
|
wmId:"",
|
||||||
wprsearch:"",
|
|
||||||
route_code:"",
|
route_code:"",
|
||||||
showBatch: "",
|
showBatch: "",
|
||||||
wmMaterial:'',
|
wmMaterial:'',
|
||||||
|
|
@ -363,14 +312,12 @@ export default {
|
||||||
limitedWatch:false,
|
limitedWatch:false,
|
||||||
materialsVisible:false,
|
materialsVisible:false,
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
wprVisibleDrawer:false,
|
|
||||||
wprApiObj:this.$API.wpm.wpr.list,
|
wprApiObj:this.$API.wpm.wpr.list,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
printer_name:localStorage.getItem("printer_name"),
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
mgroup_name:'',
|
mgroup_name:'',
|
||||||
ofrom_name:'',
|
ofrom_name:'',
|
||||||
ofrom_batch :'',
|
ofrom_batch :'',
|
||||||
scQr_code:'',
|
|
||||||
checkItem:{},
|
checkItem:{},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -484,30 +431,16 @@ export default {
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
handleWprQuery(){
|
|
||||||
let that = this;
|
|
||||||
that.wprList.forEach((item,index)=>{
|
|
||||||
if(item.number.indexOf(that.wprsearch) > -1){
|
|
||||||
let rows = document.querySelectorAll("#wprTable .el-table__row");
|
|
||||||
let row = rows[index];
|
|
||||||
let rowTop = row.offsetTop;
|
|
||||||
this.$refs.wprTable.scrollTo({ top: rowTop });
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
showWpr(row){
|
showWpr(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.ofrom_name = row.material_ofrom_name;
|
that.wmId = row.id;
|
||||||
that.ofrom_batch = row.batch;
|
that.ofrom_batch = row.batch;
|
||||||
that.wprParams.wm = row.id;
|
that.ofrom_name = row.material_ofrom_name;
|
||||||
that.wprVisibleDrawer = true;
|
that.dialog.wprList = true;
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
|
that.$refs.inmWprDialog.open("ins");
|
||||||
that.wprTableHeight = heights-20;
|
});
|
||||||
})
|
|
||||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
|
||||||
that.wprList = res;
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
|
|
@ -522,17 +455,10 @@ export default {
|
||||||
this.$refs.handoverDialog.open("add",row,20);
|
this.$refs.handoverDialog.open("add",row,20);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
QRCode(row){
|
|
||||||
this.dialog.qrcode = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.scQr_code=row.number;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row,type){
|
printMaterial(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
if(type=='wm'){
|
|
||||||
let params = {};
|
let params = {};
|
||||||
params.tid = row.id;
|
params.tid = row.id;
|
||||||
let materialname = row.material_.name + '|' + row.material_.process_name;
|
let materialname = row.material_.name + '|' + row.material_.process_name;
|
||||||
|
|
@ -590,50 +516,6 @@ export default {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(type=='wpr'){
|
|
||||||
let params = {};
|
|
||||||
let name = row.material_name.split('|')[0];
|
|
||||||
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
|
|
||||||
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
|
|
||||||
){
|
|
||||||
let oinfo = [];
|
|
||||||
for(let key in row.oinfo){
|
|
||||||
oinfo.push(row.oinfo[key])
|
|
||||||
}
|
|
||||||
let data = {sigao:'',duibian:'',moban:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofrom_name,ofrom_batch:that.ofrom_batch};
|
|
||||||
if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
|
|
||||||
params.label_template_name = '脱膜测量单件标签模板';
|
|
||||||
}else{
|
|
||||||
params.label_template_name = '排扳单件打印模板';
|
|
||||||
}
|
|
||||||
if(oinfo.length>0){
|
|
||||||
oinfo.forEach((item)=>{
|
|
||||||
if(item.name=="丝高"){
|
|
||||||
data.sigao = item.val;
|
|
||||||
}else if(item.name=="对边"){
|
|
||||||
data.duibian = item.val;
|
|
||||||
}else if(item.name=="模具号"){
|
|
||||||
data.moban = item.val;
|
|
||||||
}else if(item.name=="实验板段"){
|
|
||||||
data.istest = item.val?'是':'否';
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
params.data = data;
|
|
||||||
}else{
|
|
||||||
params.label_template_name = '单件打印模板';
|
|
||||||
params.data = {number:row.number,name:name};
|
|
||||||
}
|
|
||||||
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
|
||||||
let obj = {};
|
|
||||||
obj.printer_commands = res.commands;
|
|
||||||
obj.printer_name = that.printer_name;
|
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
|
||||||
that.$message.success("打印成功");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
that.$message.warning("请先设置打印机");
|
that.$message.warning("请先设置打印机");
|
||||||
}
|
}
|
||||||
|
|
@ -647,6 +529,7 @@ export default {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleWprSuccess(row){}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,17 @@
|
||||||
@success="handleinmSuccess"
|
@success="handleinmSuccess"
|
||||||
>
|
>
|
||||||
</save-dialog>
|
</save-dialog>
|
||||||
|
<wpr-dialog
|
||||||
|
v-if="dialog.wprList"
|
||||||
|
ref="inmWprDialog"
|
||||||
|
:wm = "wmId"
|
||||||
|
:process = "process"
|
||||||
|
:mgroupId = "mgroupId"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
:ofromName = "ofrom_name"
|
||||||
|
:ofromBatch = "ofrom_batch"
|
||||||
|
@success="handleWprSuccess"
|
||||||
|
></wpr-dialog>
|
||||||
<handover-dialog
|
<handover-dialog
|
||||||
v-if="dialog.handover"
|
v-if="dialog.handover"
|
||||||
ref="handoverDialog"
|
ref="handoverDialog"
|
||||||
|
|
@ -214,73 +225,6 @@
|
||||||
@closed="dialog.handover = false"
|
@closed="dialog.handover = false"
|
||||||
>
|
>
|
||||||
</handover-dialog>
|
</handover-dialog>
|
||||||
<el-drawer v-model="wprVisibleDrawer" :size="'70%'">
|
|
||||||
<template #header>
|
|
||||||
<h4>关联产品</h4>
|
|
||||||
<el-button type="primary" @click="wprNumberChange">发货编号</el-button>
|
|
||||||
<el-button type="warning" @click="wprNumberClear">清空编号</el-button>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<scTable ref="wprTable" hidePagination hideDo :data="wprList">
|
|
||||||
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
|
|
||||||
<el-table-column label="记录数据" prop="oinfo">
|
|
||||||
<template #default="scope">
|
|
||||||
<div v-for="(item,index) in scope.row.oinfo" :key="item.id">
|
|
||||||
{{ item.name }}:{{ item.val}}
|
|
||||||
<span v-if="index<(scope.row.oinfo.length-1)">,</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="缺陷项" min-width="200px">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-for="item in scope.row.wprdefect" :key="item.id">
|
|
||||||
<el-tag
|
|
||||||
type="warning"
|
|
||||||
>{{ item.defect_name }}</el-tag>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="对外编号" prop="number_out" min-width="100px"></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
fixed="right"
|
|
||||||
align="center"
|
|
||||||
width="120"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</template>
|
|
||||||
<template #footer>
|
|
||||||
<div style="flex: auto">
|
|
||||||
<el-button @click="wprVisibleDrawer=false">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-drawer>
|
|
||||||
<el-dialog title="设置发货编号" v-model="showBatch">
|
|
||||||
<el-form :model="wprParams" label-width="80px">
|
|
||||||
<el-form-item label="编号前缀">
|
|
||||||
<el-input v-model="prefix"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="getWprNum">确定</el-button>
|
|
||||||
<el-button @click="showBatch=false">取消</el-button>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog title="设置发货流水位数" v-model="showDigit">
|
|
||||||
<h4>没有找到该前缀的发货编号,请完善发货流水号位数(填整数)</h4>
|
|
||||||
<el-form :model="wprParams" label-width="80px">
|
|
||||||
<el-form-item label="流水位数">
|
|
||||||
<el-input-number controls-position="right" precision="0" v-model="digitNum"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="digitSure">确定</el-button>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
<scDegra
|
<scDegra
|
||||||
v-if="limitedWatch"
|
v-if="limitedWatch"
|
||||||
|
|
@ -300,6 +244,7 @@ import checkDialog from "./check_form.vue";
|
||||||
import showDrawer from "./check_drawer.vue";
|
import showDrawer from "./check_drawer.vue";
|
||||||
import scrapDialog from "./handover_form.vue";
|
import scrapDialog from "./handover_form.vue";
|
||||||
import saveDialog from "./inm_record.vue";
|
import saveDialog from "./inm_record.vue";
|
||||||
|
import wprDialog from "./wprList.vue";
|
||||||
import handoverDialog from "./handover_form2.vue";
|
import handoverDialog from "./handover_form2.vue";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -325,6 +270,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
wprDialog,
|
||||||
saveDialog,
|
saveDialog,
|
||||||
materials,
|
materials,
|
||||||
checkDialog,
|
checkDialog,
|
||||||
|
|
@ -352,12 +298,12 @@ export default {
|
||||||
save: false,
|
save: false,
|
||||||
check: false,
|
check: false,
|
||||||
scrap: false,
|
scrap: false,
|
||||||
|
wprList: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
inmRecord:false,
|
inmRecord:false,
|
||||||
},
|
},
|
||||||
nodes:[],
|
nodes:[],
|
||||||
edges:[],
|
edges:[],
|
||||||
wprList:[],
|
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
defectOptions: [],
|
defectOptions: [],
|
||||||
|
|
@ -374,19 +320,15 @@ export default {
|
||||||
page:0,
|
page:0,
|
||||||
wm: ""
|
wm: ""
|
||||||
},
|
},
|
||||||
prefix:'',
|
|
||||||
number_out_last:'',
|
number_out_last:'',
|
||||||
route_code:"",
|
route_code:"",
|
||||||
wmMaterial:'',
|
wmMaterial:'',
|
||||||
cate_type:'',
|
cate_type:'',
|
||||||
digitNum:null,
|
|
||||||
materialType: "wm",
|
materialType: "wm",
|
||||||
showDigit: false,
|
|
||||||
showBatch: false,
|
showBatch: false,
|
||||||
limitedWatch:false,
|
limitedWatch:false,
|
||||||
materialsVisible:false,
|
materialsVisible:false,
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
wprVisibleDrawer:false,
|
|
||||||
wprApiObj:this.$API.wpm.wpr.list,
|
wprApiObj:this.$API.wpm.wpr.list,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
printer_name:localStorage.getItem("printer_name"),
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
|
|
@ -512,6 +454,9 @@ export default {
|
||||||
//出入库后刷新页面
|
//出入库后刷新页面
|
||||||
handleinmSuccess(){
|
handleinmSuccess(){
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
handleWprSuccess(){
|
||||||
|
|
||||||
},
|
},
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -519,18 +464,15 @@ export default {
|
||||||
},
|
},
|
||||||
showWpr(row){
|
showWpr(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.ofrom_name = row.material_ofrom_name;
|
that.wmId = row.id;
|
||||||
that.ofrom_batch = row.batch;
|
that.ofrom_batch = row.batch;
|
||||||
that.wprParams.wm = row.id;
|
that.ofrom_name = row.material_ofrom_name;
|
||||||
that.wprVisibleDrawer = true;
|
that.dialog.wprList = true;
|
||||||
that.getRowWpr();
|
that.$nextTick(() => {
|
||||||
},
|
that.$refs.inmWprDialog.open("out");
|
||||||
getRowWpr(){
|
});
|
||||||
let that = this;
|
|
||||||
that.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
|
||||||
that.wprList = res;
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//分批mtype:20
|
//分批mtype:20
|
||||||
rowClick(row){
|
rowClick(row){
|
||||||
this.dialog.handover = true;
|
this.dialog.handover = true;
|
||||||
|
|
@ -539,87 +481,7 @@ export default {
|
||||||
this.$refs.handoverDialog.open("add",row,20);
|
this.$refs.handoverDialog.open("add",row,20);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
wprNumberChange(){
|
|
||||||
let that = this;
|
|
||||||
that.showBatch = true;
|
|
||||||
},
|
|
||||||
wprNumberClear(){
|
|
||||||
let that = this;
|
|
||||||
let items = [];
|
|
||||||
for(let i=0;i< that.wprList.length;i++){
|
|
||||||
let obj = {};
|
|
||||||
obj.id = that.wprList[i].id;
|
|
||||||
obj.number_out = null;
|
|
||||||
items.push(obj)
|
|
||||||
}
|
|
||||||
let params = {};
|
|
||||||
params.items = items;
|
|
||||||
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
|
||||||
that.getRowWpr();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getWprNum(){
|
|
||||||
let that = this;
|
|
||||||
let params0 = {};
|
|
||||||
params0.prefix = that.prefix;
|
|
||||||
that.$API.wpm.wpr.numberOutLast.req(params0).then((res) => {
|
|
||||||
let number_out_last = '';
|
|
||||||
if(res.number_out_last==null){//没有该前缀的发货编号
|
|
||||||
number_out_last = null;
|
|
||||||
that.showBatch=false;
|
|
||||||
that.showDigit = true;
|
|
||||||
}else{//有该前缀的发货编号
|
|
||||||
let items = [];
|
|
||||||
number_out_last = res.number_out_last;
|
|
||||||
let str = number_out_last.replace(/[^a-zA-Z]/g, ''); // 提取字母
|
|
||||||
let num = number_out_last.replace(/[^0-9]/g, ''); // 提取数字
|
|
||||||
let length = num.length;//流水号的长度
|
|
||||||
for(let i=0;i< that.wprList.length;i++){
|
|
||||||
let numb = Number(num)+i+1;
|
|
||||||
let numbs = numb+'';
|
|
||||||
let len = numbs.length;
|
|
||||||
let zoreStr = '';
|
|
||||||
for(let j=0;j<length-len;j++){
|
|
||||||
zoreStr+='0';
|
|
||||||
}
|
|
||||||
let obj = {};
|
|
||||||
obj.id = that.wprList[i].id;
|
|
||||||
obj.number_out = str + zoreStr + numb;
|
|
||||||
items.push(obj)
|
|
||||||
}
|
|
||||||
let params = {};
|
|
||||||
params.items = items;
|
|
||||||
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
|
||||||
that.showBatch=false;
|
|
||||||
that.getRowWpr();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//没有找到前缀的发货编号,从1开始编号时
|
|
||||||
digitSure(){
|
|
||||||
let that = this;
|
|
||||||
//根据前缀和流水位数获取编号
|
|
||||||
let items = [];
|
|
||||||
for(let i=0;i< that.wprList.length;i++){
|
|
||||||
let numb = i+1,zoreStr = '';
|
|
||||||
numb+= '';
|
|
||||||
let len = numb.length;
|
|
||||||
for(let j=0;j<that.digitNum-len;j++){
|
|
||||||
zoreStr+='0';
|
|
||||||
}
|
|
||||||
let obj = {};
|
|
||||||
obj.id = that.wprList[i].id;
|
|
||||||
obj.number_out = that.prefix + zoreStr + numb;
|
|
||||||
items.push(obj)
|
|
||||||
}
|
|
||||||
let params = {};
|
|
||||||
params.items = items;
|
|
||||||
that.$API.wpm.wpr.assginNumberOut.req(params).then((res) => {
|
|
||||||
that.showDigit = false;
|
|
||||||
that.getRowWpr();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
this.dialog.save = false;
|
this.dialog.save = false;
|
||||||
|
|
@ -629,7 +491,6 @@ export default {
|
||||||
printMaterial(row,type){
|
printMaterial(row,type){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||||
if(type=='wm'){
|
|
||||||
let params = {};
|
let params = {};
|
||||||
params.tid = row.id;
|
params.tid = row.id;
|
||||||
let materialname = row.material_.name + '|' + row.material_.process_name;
|
let materialname = row.material_.name + '|' + row.material_.process_name;
|
||||||
|
|
@ -701,69 +562,6 @@ export default {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else if(type=='wpr'){
|
|
||||||
let params = {};
|
|
||||||
let name = row.material_name.split('|')[0];
|
|
||||||
if(that.route_code=='paiyicibang'){
|
|
||||||
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
|
||||||
console.log('排一次棒单件打印res',res);
|
|
||||||
let data = res[0].params_json;
|
|
||||||
data.number = row.number;
|
|
||||||
data.name=name;
|
|
||||||
data.ofrom_name=that.ofrom_name;
|
|
||||||
params.data = data;
|
|
||||||
params.label_template_name = '排一次棒单件打印模板';
|
|
||||||
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
|
||||||
let obj = {};
|
|
||||||
obj.printer_commands = res.commands;
|
|
||||||
obj.printer_name = that.printer_name;
|
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
|
||||||
that.$message.success("打印成功");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
|
|
||||||
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
|
|
||||||
){
|
|
||||||
let oinfo = [];
|
|
||||||
for(let key in row.oinfo){
|
|
||||||
oinfo.push(row.oinfo[key])
|
|
||||||
}
|
|
||||||
let data = {sigao:'',duibian:'',moban:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofrom_name,ofrom_batch:that.ofrom_batch};
|
|
||||||
if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
|
|
||||||
params.label_template_name = '脱膜测量单件标签模板';
|
|
||||||
}else{
|
|
||||||
params.label_template_name = '排扳单件打印模板';
|
|
||||||
}
|
|
||||||
if(oinfo.length>0){
|
|
||||||
oinfo.forEach((item)=>{
|
|
||||||
if(item.name=="丝高"){
|
|
||||||
data.sigao = item.val;
|
|
||||||
}else if(item.name=="对边"){
|
|
||||||
data.duibian = item.val;
|
|
||||||
}else if(item.name=="模具号"){
|
|
||||||
data.moban = item.val;
|
|
||||||
}else if(item.name=="实验板段"){
|
|
||||||
data.istest = item.val?'是':'否';
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
params.data = data;
|
|
||||||
}else{
|
|
||||||
params.label_template_name = '单件打印模板';
|
|
||||||
params.data = {number:row.number,name:name};
|
|
||||||
}
|
|
||||||
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
|
||||||
let obj = {};
|
|
||||||
obj.printer_commands = res.commands;
|
|
||||||
obj.printer_name = that.printer_name;
|
|
||||||
that.$API.wpm.prints.req(obj).then((response) => {
|
|
||||||
that.$message.success("打印成功");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
that.$message.warning("请先设置打印机");
|
that.$message.warning("请先设置打印机");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
||||||
<!-- 左侧工段列表的 生产执行页面 -->
|
|
||||||
<template>
|
|
||||||
<el-container>
|
|
||||||
<el-aside style="width: 100px;background: #ffffff;">
|
|
||||||
<ul style="padding-left: 7px;">
|
|
||||||
<li
|
|
||||||
v-for="(item,index) in mgroups"
|
|
||||||
:key="item.id"
|
|
||||||
:class="['mgroupItem',selectedIndex === index?'mgroupItemActive':'']"
|
|
||||||
@click="changeMgroup(item.id,index)"
|
|
||||||
>{{item.name}}</li>
|
|
||||||
</ul>
|
|
||||||
</el-aside>
|
|
||||||
<el-main>
|
|
||||||
<el-container>
|
|
||||||
<el-header>
|
|
||||||
<el-segmented
|
|
||||||
v-model="values"
|
|
||||||
:options="options"
|
|
||||||
size="default"
|
|
||||||
></el-segmented>
|
|
||||||
</el-header>
|
|
||||||
<el-main id="elMain" class="nopadding">
|
|
||||||
<!-- 日志 -->
|
|
||||||
<mlogs
|
|
||||||
v-if="values == '日志'"
|
|
||||||
:mgroupName="mgroupName"
|
|
||||||
style="height: 60%"
|
|
||||||
></mlogs>
|
|
||||||
<mtask
|
|
||||||
v-if="values == '日志'"
|
|
||||||
:mgroupName="mgroupName"
|
|
||||||
style="height: 40%"
|
|
||||||
></mtask>
|
|
||||||
<!-- 交接记录 -->
|
|
||||||
<handover
|
|
||||||
v-else-if="values == '交接记录'"
|
|
||||||
:mgroupName="mgroupName"
|
|
||||||
></handover>
|
|
||||||
<!-- 库存 -->
|
|
||||||
<inm v-else-if="values == '库存'" :mgroupName="mgroupName"></inm>
|
|
||||||
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import inm from "./inm.vue";
|
|
||||||
import mlogs from "./mlogs.vue";
|
|
||||||
import mtask from "./mtask.vue";
|
|
||||||
import handover from "./handover.vue";
|
|
||||||
export default {
|
|
||||||
name: "bx",
|
|
||||||
components: { inm, mlogs, mtask, handover },
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
mgroups:[],
|
|
||||||
tableHieght: 200,
|
|
||||||
options: ["日志", "交接记录", "库存"],
|
|
||||||
values: "日志",
|
|
||||||
mgroupName: "",
|
|
||||||
mgroupId: "",
|
|
||||||
selectedIndex:0,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
let that = this;
|
|
||||||
that.getMgroups();
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
let that = this;
|
|
||||||
let height = document.getElementById("elMain").clintHeight / 2;
|
|
||||||
that.tableHieght = height;
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleChange(value) {
|
|
||||||
this.value = value;
|
|
||||||
console.log("Selected value:", value);
|
|
||||||
},
|
|
||||||
getMgroups(){
|
|
||||||
let that = this;
|
|
||||||
that.$API.mtm.mgroup.list.req({page:0}).then((res) => {
|
|
||||||
that.mgroups = res;
|
|
||||||
that.mgroupName = res[0].name;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
changeMgroup(id,index){
|
|
||||||
let that = this;
|
|
||||||
that.selectedIndex = index;
|
|
||||||
console.log(that.selectedIndex);
|
|
||||||
that.mgroupId = id;
|
|
||||||
that.mgroupName = that.mgroups[index].name;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.countBlock {
|
|
||||||
width: 80px;
|
|
||||||
color: #ffffff;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.mgroupItem{
|
|
||||||
height: 35px;
|
|
||||||
width: 80px;
|
|
||||||
line-height: 35px;
|
|
||||||
margin: 5px 0;
|
|
||||||
text-align: center;
|
|
||||||
color: #6e80ff;
|
|
||||||
}
|
|
||||||
.mgroupItem:hover,.mgroupItemActive{
|
|
||||||
color: #6e80ff;
|
|
||||||
background: rgba(83, 109, 254, 0.2);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -266,7 +266,7 @@ export default {
|
||||||
//获取工艺步骤
|
//获取工艺步骤
|
||||||
getRoute() {
|
getRoute() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.mtm.route.list.req({ process: that.process, page: 0, routepack__state: 30 }).then((res) => {
|
this.$API.mtm.route.list.req({ process: that.process, page: 0, routepack__state: 30 ,from_route__isnull:true }).then((res) => {
|
||||||
this.routeOriginOptions = res;
|
this.routeOriginOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"x":2.5,
|
|
||||||
"y":3.5,
|
|
||||||
"z":5.0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
@ -74,11 +74,6 @@ export default {
|
||||||
bottom: "3%",
|
bottom: "3%",
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
// toolbox: {
|
|
||||||
// feature: {
|
|
||||||
// saveAsImage: {},
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category",
|
type: "category",
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
|
|
@ -135,7 +130,8 @@ export default {
|
||||||
that.$API.enm.mplogx.req(params).then((res) => {
|
that.$API.enm.mplogx.req(params).then((res) => {
|
||||||
res.forEach(item=>{
|
res.forEach(item=>{
|
||||||
that.option.xAxis.data.push(item.timex);
|
that.option.xAxis.data.push(item.timex);
|
||||||
that.option.series.data.push(item.val_float);
|
let value = Number(item.val_float).toFixed(3);
|
||||||
|
that.option.series.data.push(value);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,141 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div id="pdfDom" class="container" ref="pdfContent">
|
|
||||||
<div class="title">
|
|
||||||
<span>光芯科技</span>
|
|
||||||
<span>交接单</span>
|
|
||||||
</div>
|
|
||||||
<canvas id="barcode"></canvas>
|
|
||||||
<p class="lineStyle">物料:{{ name }}</p>
|
|
||||||
<p class="lineStyle">批次号:{{ batch }}</p>
|
|
||||||
<p class="lineStyle">数量:{{ count }}</p>
|
|
||||||
</div>
|
|
||||||
<el-button type="primary" @click="toGetPdf1">打印 </el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import axios from "axios";
|
|
||||||
import config from "@/config";
|
|
||||||
import http from "@/utils/request";
|
|
||||||
import getPdf from "@/utils/htmlToPdf";
|
|
||||||
import PdfLoader from "@/utils/html2pdf";
|
|
||||||
|
|
||||||
import html2canvas from "html2canvas";
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
material_name: "玻璃片",
|
|
||||||
batch: "20240723_001",
|
|
||||||
count: "1000",
|
|
||||||
date: "2023-01-01",
|
|
||||||
sender: "切片-石小静",
|
|
||||||
resave: "活化-白海军",
|
|
||||||
visible: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
var canvas = document.getElementById("barcode");
|
|
||||||
var context = canvas.getContext("2d");
|
|
||||||
context.clearRect(0, 0, 210, 270);
|
|
||||||
JsBarcode("#barcode", "9780199532179", {
|
|
||||||
format: "CODE128",
|
|
||||||
displayValue: true,
|
|
||||||
fontSize: 24,
|
|
||||||
lineColor: "#000000",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
toGetPdf(val = false, download = false) {
|
|
||||||
let that = this;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
setTimeout(() => {
|
|
||||||
let title = "交接单";
|
|
||||||
getPdf(title, download).then((res) => {
|
|
||||||
console.log("res", res);
|
|
||||||
|
|
||||||
// 创建 FormData 对象
|
|
||||||
let formData = new FormData();
|
|
||||||
formData.append("file", res, "document.pdf"); // 添加文件到 FormData
|
|
||||||
formData.append("printer_name", "GP-3150TN"); // 添加其他字段
|
|
||||||
|
|
||||||
// 发送 POST 请求
|
|
||||||
that.$API.wpm.prints.req(formData)
|
|
||||||
// http.post("http://localhost:8080/prints/", formData)
|
|
||||||
.then((response) => {
|
|
||||||
console.log("postRes", response);
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error("postError", error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/* 将base64转换为文件,接收2个参数,第一是base64,第二个是文件名字 最后返回文件对象 */
|
|
||||||
dataURLtoFile(dataurl, filename) {
|
|
||||||
var arr = dataurl.split(","),
|
|
||||||
mime = arr[0].match(/:(.*?);/)[1],
|
|
||||||
bstr = atob(arr[1]),
|
|
||||||
n = bstr.length,
|
|
||||||
u8arr = new Uint8Array(n);
|
|
||||||
while (n--) {
|
|
||||||
u8arr[n] = bstr.charCodeAt(n);
|
|
||||||
}
|
|
||||||
return new File([u8arr], filename, { type: mime });
|
|
||||||
},
|
|
||||||
|
|
||||||
toGetPdf1() {
|
|
||||||
let str = [
|
|
||||||
"SIZE 70 mm,90 mm",
|
|
||||||
"GAP 2 mm,0 mm",
|
|
||||||
"CLS",
|
|
||||||
"WINTEXT 100,80,36,0,0,0,Simhei,光芯科技——交接单",
|
|
||||||
'BARCODE 100,140,"128",108,0,0,2,4,"' + this.batch + '"',
|
|
||||||
"WINTEXT 100,280,36,0,0,0,Simhei,物料:" + this.material_name,
|
|
||||||
"WINTEXT 100,340,36,0,0,0,Simhei,批次:" + this.batch,
|
|
||||||
"WINTEXT 100,400,36,0,0,0,Simhei,数量:" + this.count,
|
|
||||||
"WINTEXT 100,460,36,0,0,0,Simhei,日期:" + this.date,
|
|
||||||
"WINTEXT 100,520,36,0,0,0,Simhei,送料:" + this.sender,
|
|
||||||
"WINTEXT 100,580,36,0,0,0,Simhei,收料:" + this.resave,
|
|
||||||
"PRINT 1",
|
|
||||||
];
|
|
||||||
// 送料:工段-姓名
|
|
||||||
// 收料:工段-姓名
|
|
||||||
let obj = {};
|
|
||||||
obj.printer_commands = str;
|
|
||||||
obj.printer_name = "GP-3150TNS";
|
|
||||||
that.$API.wpm.prints.req(obj)
|
|
||||||
// http.post("http://localhost:8080/prints/", obj)
|
|
||||||
.then((response) => {
|
|
||||||
console.log("postRes", response);
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error("postError", error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.container {
|
|
||||||
width: 210px;
|
|
||||||
height: 270px;
|
|
||||||
padding: 10px 5px;
|
|
||||||
border: 1px solid #dddddd;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
/* display: flex;
|
|
||||||
justify-content: space-between; */
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
#barcode {
|
|
||||||
/* position: absolute; */
|
|
||||||
width: 200px;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
.lineStyle {
|
|
||||||
font-size: 14px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -208,12 +208,15 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="工作日期" prop="handle_date">
|
<el-form-item
|
||||||
|
label="开始时间"
|
||||||
|
prop="work_start_time"
|
||||||
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.handle_date"
|
v-model="form.work_start_time"
|
||||||
type="date"
|
type="datetime"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -447,15 +450,10 @@ export default {
|
||||||
that.getRoute();
|
that.getRoute();
|
||||||
that.gettestitem();
|
that.gettestitem();
|
||||||
that.form.fmlog = that.fmlog;
|
that.form.fmlog = that.fmlog;
|
||||||
that.form.handle_date = that.$TOOL.dateFormat2(new Date());;
|
// that.form.handle_date = that.$TOOL.dateFormat2(new Date());
|
||||||
|
that.form.work_start_time = that.$TOOL.dateFormat(new Date());
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getRoute() {
|
|
||||||
// let that = this;
|
|
||||||
// that.$API.mtm.route.list.req({ process: that.process, page: 0, routepack__state: 30 }).then((res) => {
|
|
||||||
// that.routeOptions = res;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
changeRoute(){
|
changeRoute(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.routeOptions.forEach(item=>{
|
that.routeOptions.forEach(item=>{
|
||||||
|
|
@ -664,8 +662,8 @@ export default {
|
||||||
that.defectinform[item.defect_name] = 0;
|
that.defectinform[item.defect_name] = 0;
|
||||||
})
|
})
|
||||||
that.materialFix = item.material;
|
that.materialFix = item.material;
|
||||||
that.materialCount = that.form.count_use =
|
that.form.batch = item.batch;
|
||||||
that.form.count_real = that.form.count_ok = item.count;
|
that.materialCount = that.form.count_use = that.form.count_real = that.form.count_ok = item.count;
|
||||||
that.form.count_real = item.count-that.form.count_pn_jgqbl;
|
that.form.count_real = item.count-that.form.count_pn_jgqbl;
|
||||||
that.getdefects(that.route,that.material_in,that.material_out);
|
that.getdefects(that.route,that.material_in,that.material_out);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
:params="params"
|
:params="params"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@row-click="table_detail"
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"></el-table-column>
|
<el-table-column type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="批次号" prop="batch" min-width="100"></el-table-column>
|
<el-table-column label="批次号" prop="batch" min-width="100"></el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer v-show="mode!=='show'">
|
<el-footer v-show="mode!=='show'">
|
||||||
<template v-if="route_code=='tuihuo'&&type==10&&mtype==10">
|
<template v-if="(route_code=='tuihuo'&&type==10&&mtype==10)||form.ticket!=null">
|
||||||
<el-button
|
<el-button
|
||||||
v-for="item in transitions"
|
v-for="item in transitions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|
@ -320,6 +320,7 @@ export default {
|
||||||
},
|
},
|
||||||
listParams:{},
|
listParams:{},
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
|
mtype:10,
|
||||||
deptID:'',
|
deptID:'',
|
||||||
route_code:'',
|
route_code:'',
|
||||||
codeText: "",
|
codeText: "",
|
||||||
|
|
@ -344,6 +345,10 @@ export default {
|
||||||
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
|
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
|
||||||
that.form.send_mgroup = that.mgroupId;
|
that.form.send_mgroup = that.mgroupId;
|
||||||
that.route_code = that.$route.path.split("/")[2];
|
that.route_code = that.$route.path.split("/")[2];
|
||||||
|
// console.log('that.route_code',that.route_code)
|
||||||
|
// console.log('that.type',that.type)
|
||||||
|
// console.log('that.mtype',that.mtype)
|
||||||
|
// console.log(that.route_code=='tuihuo'&&that.type==10&&that.mtype==10)
|
||||||
//type 10:正常交接 ;20:返工交接 ;40:报废交接
|
//type 10:正常交接 ;20:返工交接 ;40:报废交接
|
||||||
//mtype 10:正常交接 ;20:分批操作 ;30:合批操作
|
//mtype 10:正常交接 ;20:分批操作 ;30:合批操作
|
||||||
//state 10:合格;20:不合格;30:返工;34:返工完成;40:检验;50:报废
|
//state 10:合格;20:不合格;30:返工;34:返工完成;40:检验;50:报废
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.state"
|
v-model="queryState"
|
||||||
placeholder="物料状态"
|
placeholder="物料状态"
|
||||||
clearable
|
clearable
|
||||||
@change="searchStateChange"
|
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
|
@change="searchStateChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateOptions"
|
v-for="item in stateOptions"
|
||||||
|
|
@ -263,7 +263,8 @@ export default {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
{ value: 10, name: "合格"},
|
{ value: 100, name: "完全合格"},
|
||||||
|
{ value: 101, name: "合格B类"},
|
||||||
{ value: 20, name: "不合格"},
|
{ value: 20, name: "不合格"},
|
||||||
{ value: 30, name: "返工"},
|
{ value: 30, name: "返工"},
|
||||||
],
|
],
|
||||||
|
|
@ -271,6 +272,7 @@ export default {
|
||||||
search: "",
|
search: "",
|
||||||
material: "",
|
material: "",
|
||||||
},
|
},
|
||||||
|
queryState: null,
|
||||||
codeText2: "",
|
codeText2: "",
|
||||||
codeText4: "",
|
codeText4: "",
|
||||||
cate_type:'',
|
cate_type:'',
|
||||||
|
|
@ -343,6 +345,24 @@ export default {
|
||||||
this.$refs.table_wm.queryData(this.queryWm);
|
this.$refs.table_wm.queryData(this.queryWm);
|
||||||
this.materialsVisible = false;
|
this.materialsVisible = false;
|
||||||
},
|
},
|
||||||
|
searchStateChange(){
|
||||||
|
let that = this;
|
||||||
|
that.query.state = null;
|
||||||
|
that.query.defect__isnull = null;
|
||||||
|
if(that.queryState==100){
|
||||||
|
that.query.state = 10;
|
||||||
|
that.query.defect__isnull = true;
|
||||||
|
}else if(that.queryState==101){
|
||||||
|
that.query.state = 10;
|
||||||
|
that.query.defect__isnull = false;
|
||||||
|
}else if(that.queryState==20){
|
||||||
|
that.query.state = 20;
|
||||||
|
that.query.defect__isnull = null;
|
||||||
|
}else if(that.queryState==30){
|
||||||
|
that.query.state = 30;
|
||||||
|
that.query.defect__isnull = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
//领料
|
//领料
|
||||||
tomio(type) {
|
tomio(type) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
|
|
@ -305,23 +305,20 @@ export default {
|
||||||
},
|
},
|
||||||
searchStateChange(){
|
searchStateChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
switch(that.queryState){
|
that.query.state = null;
|
||||||
case 100:
|
that.query.defect__isnull = null;
|
||||||
|
if(that.queryState==100){
|
||||||
that.query.state = 10;
|
that.query.state = 10;
|
||||||
that.query.notok_sign__isnull = true;
|
that.query.defect__isnull = true;
|
||||||
break;
|
}else if(that.queryState==101){
|
||||||
case 101:
|
|
||||||
that.query.state = 10;
|
that.query.state = 10;
|
||||||
that.query.notok_sign__isnull = false;
|
that.query.defect__isnull = false;
|
||||||
break;
|
}else if(that.queryState==20){
|
||||||
case 20:
|
|
||||||
that.query.state = 20;
|
that.query.state = 20;
|
||||||
that.query.notok_sign__isnull = null;
|
that.query.defect__isnull = null;
|
||||||
break;
|
}else if(that.queryState==30){
|
||||||
case 30:
|
|
||||||
that.query.state = 30;
|
that.query.state = 30;
|
||||||
that.query.notok_sign__isnull = null;
|
that.query.defect__isnull = null;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tomio(type) {
|
tomio(type) {
|
||||||
|
|
|
||||||
|
|
@ -568,11 +568,9 @@ export default {
|
||||||
obj_form.count_notok = that.count_json_wx.count_n_not;
|
obj_form.count_notok = that.count_json_wx.count_n_not;
|
||||||
sum = obj_form.count_ok + obj_form.count_notok;
|
sum = obj_form.count_ok + obj_form.count_notok;
|
||||||
}
|
}
|
||||||
// if(that.count_json_wx.count_ok_s!==null){
|
|
||||||
|
|
||||||
// }
|
|
||||||
}else{
|
}else{
|
||||||
that.qct_defects.forEach(item => {
|
that.qct_defects.forEach(item => {
|
||||||
|
if(that.defectform[item.defect_name]!==null){
|
||||||
if(item.defect_okcate==30){
|
if(item.defect_okcate==30){
|
||||||
that.form.count_notok += that.defectform[item.defect_name] ;
|
that.form.count_notok += that.defectform[item.defect_name] ;
|
||||||
}
|
}
|
||||||
|
|
@ -581,6 +579,7 @@ export default {
|
||||||
obj.count = that.defectform[item.defect_name];
|
obj.count = that.defectform[item.defect_name];
|
||||||
obj.mlogb = that.mlogbItem.id;
|
obj.mlogb = that.mlogbItem.id;
|
||||||
this.form.mlogbdefect.push(obj);
|
this.form.mlogbdefect.push(obj);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
that.form.count_ok = that.form.count_real -that.form.count_notok;
|
that.form.count_ok = that.form.count_real -that.form.count_notok;
|
||||||
sum = that.form.count_ok + that.form.count_notok;
|
sum = that.form.count_ok + that.form.count_notok;
|
||||||
|
|
|
||||||
|
|
@ -338,14 +338,14 @@ export default {
|
||||||
mlogWf(row){
|
mlogWf(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.userId!==row.ticket_.create_by){
|
if(that.userId!==row.ticket_.create_by){
|
||||||
this.$confirm(`需要日志提交人撤回该日志`, "提示", {
|
that.$confirm(`需要日志提交人撤回该日志`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {})
|
}).then(() => {})
|
||||||
}else{
|
}else{
|
||||||
this.$confirm(`确定撤回该日志审批吗?`, "提示", {
|
that.$confirm(`确定撤回该日志审批吗?`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$API.wf.ticket.ticketRetreat.req(row.ticket).then(res=>{
|
that.$API.wf.ticket.ticketRetreat.req(row.ticket).then(res=>{
|
||||||
that.$refs.table.refresh();
|
that.$refs.table.refresh();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue