Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling

dev-scheduling
姜雪 3 weeks ago
commit c55f169c48
  1. 5
      public/config.js
  2. 9
      src/api/outsourcingManagement/oemApproval.js
  3. 38
      src/api/outsourcingManagement/oemOrder.js
  4. 8
      src/api/processManagement/basicProcesses.js
  5. 9
      src/api/qualityManagement/inspectionArchiving/eRecord.js
  6. 2
      src/page/index/top/index.vue
  7. 72
      src/router/views/index.js
  8. 30
      src/views/oem/facInnerApproval/approvalDialog.vue
  9. 1
      src/views/oem/facInnerApproval/index.vue
  10. 28
      src/views/oem/oemApproval/approvalDialog.vue
  11. 103
      src/views/oem/oemOrder/batchDialog.vue
  12. 58
      src/views/oem/oemOrder/index.vue
  13. 23
      src/views/oem/oemProcess/index.vue
  14. 14
      src/views/processManagement/basicProcesses.vue
  15. 106
      src/views/processManagement/components/addBasicProcessesDialog.vue
  16. 6
      src/views/processManagement/components/addTemplateDialog.vue
  17. 33
      src/views/processManagement/components/addinPlantMaintenanceDialog.vue
  18. 129
      src/views/processManagement/components/inPlantMaintenance.vue
  19. 180
      src/views/processManagement/components/inPlantProcessHandle.vue
  20. 4
      src/views/processManagement/components/processMainte/dsPartBasicInfo.vue
  21. 6
      src/views/processManagement/components/processMainte/partDetails.vue
  22. 267
      src/views/processManagement/components/processMainte/processPlanning.vue
  23. 1
      src/views/processManagement/components/processMainte/reworkProcessPlanning.vue
  24. 3
      src/views/processManagement/inPlantProcess.vue
  25. 4
      src/views/processManagement/procepssPlanning.vue
  26. 2
      src/views/processManagement/processTemplate.vue
  27. 3
      src/views/processManagement/sinTer/index.vue
  28. 1
      src/views/processManagement/taskProcessing.vue
  29. 108
      src/views/qualityManagement/inspectionArchiving/ERecord/index.vue
  30. 165599
      src/views/qualityManagement/inspectionArchiving/ERecord/json/glassSealing.json
  31. 97
      src/views/qualityManagement/inspectionArchiving/ERecord/printDialog.vue
  32. 10
      src/views/qualityManagement/inspectionArchiving/ERecord/printOrder.json
  33. 568
      src/views/qualityManagement/inspectionArchiving/ERecord/printSjDialog.vue
  34. 32
      src/views/qualityManagement/reviewFormMess/options.js
  35. 6
      src/views/wel/components/quickAccess.vue

@ -24,4 +24,7 @@ window.WARE_MATERIAL_PRINT = "http://192.168.169.172:9000/jmreport/view/11814863
// 库存汇总标签打印
window.WARE_MATERIAL_STOCK_TAG = "http://192.168.169.172:9000/jmreport/view/1181492297180168192"
window.PROCESS_INSPECTION_RECORD ="http://192.168.169.172:9000/jmreport/view/1188648621968805888" //检验记录地址
window.PROCESS_INSPECTION_RECORD ="http://192.168.169.172:9000/jmreport/view/1188648621968805888" //检验记录地址
//测厚打印
window.THICKNESS_PRINT = "http://192.168.169.172:9000/jmreport/view/1192318619566641152?woId=&&&&&&&&"

@ -17,4 +17,13 @@ export const oemApproval = data => {
method: 'post',
data: data
});
};
// 批量审批
export const oemApprovalBatch = data => {
return request({
url: '/api/blade-desk/oemOrder/batchApproval',
method: 'post',
data: data
});
};

@ -52,4 +52,40 @@ export const getPrintList = params => {
method: 'get',
params
});
};
};
// 获取分批数据
export const getBatchData = (params) =>{
return request({
url:"/api/blade-desk/oemOrder/prepareOemBatches",
method:"get",
params
})
}
// 外协分批
export const setBatch = (data) =>{
return request({
url:"/api/blade-desk/oemOrder/inOemBatches",
method:"post",
data
})
}
// 合格证跳转
export const turnCertificate = (data) =>{
return request({
url:"/api/blade-desk/oemOrder/reviewQualityRecords",
method:"post",
data
})
}
// 质量记录跳转
export const turnQuality = (data) =>{
return request({
url:"/api/blade-desk/oemOrder/reviewQualityRecords",
method:"post",
data
})
}

@ -22,6 +22,14 @@ export const add = row => {
});
};
export const update = row => {
return request({
url: '/blade-desk/bsProcessSet/update',
method: 'post',
data: row,
});
};
// 详情
export const getDetail = id => {

@ -26,4 +26,13 @@ export const getWordDetail = (data) =>{
method:'post',
data
})
}
// 烧结打印
export const getBurnDetail = (data) =>{
return request({
url:'/api/blade-desk/QA/InspectionTask/pagePrintSj',
method:'post',
data
})
}

@ -50,7 +50,7 @@
<top-logs></top-logs>
</div> -->
<div class="top-user">
<img class="top-bar__img" :src="userInfo.avatar" />
<!-- <img class="top-bar__img" :src="userInfo.avatar" /> -->
<el-dropdown :hide-on-click="false">
<span class="el-dropdown-link" :style="{color:setting.styleRadio == '3' || setting.styleRadio == '6' ? '#fff' : ''}">
{{ userInfo.real_name }}

@ -36,7 +36,7 @@ export default [
component: () => import(/* webpackChunkName: "views" */ '@/views/wel/dashboard.vue'),
},
{
path: '/taskCope',
path: '/wel/taskCope',
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/taskCope/index.vue'),
name: '工序接收',
meta: {
@ -46,26 +46,7 @@ export default [
},
},
// workReport
{
path: '/workReport',
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/workReport/index.vue'),
name: '工序报工',
meta: {
keepAlive: true,
isTab: false,
isAuth: false,
},
},
{
path: '/workCheck',
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/workCheck/index.vue'),
name: '工序检验',
meta: {
keepAlive: true,
isTab: false,
isAuth: false,
},
},
// {
// path: 'search',
// name: '菜单搜索',
@ -139,6 +120,53 @@ export default [
},
],
},
{
path: '/zhgd-work',
component: Layout,
redirect: '/zhgd-work/taskCope',
children: [
{
path: 'taskCope',
name: '工序接收',
meta: {
i18n: 'info',
},
component: () => import(/* webpackChunkName: "views" */ '@/views/zhgd-work/taskCope/index.vue'),
},
],
},
{
path: '/workReport',
component: Layout,
redirect: '/workReport/index',
children: [
{
path: 'index',
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/workReport/index.vue'),
name: '工序报工',
meta: {
i18n: 'info',
},
},
],
},
{
path: '/workCheck',
component: Layout,
redirect: '/workCheck/index',
children: [
{
path: 'index',
component: () => import(/* webpackChunkName: "page" */ '@/views/zhgd-work/workCheck/index.vue'),
name: '工序检验',
meta: {
i18n: 'info',
},
},
],
},
{
path: '/work/process/leave',
component: Layout,
@ -209,5 +237,5 @@ export default [
}
]
},
];

@ -11,7 +11,7 @@
</el-dialog>
</template>
<script>
import {oemApproval} from "@/api/outsourcingManagement/oemApproval"
import {oemApproval,oemApprovalBatch} from "@/api/outsourcingManagement/oemApproval"
export default {
props: {
showDialog: {
@ -84,16 +84,34 @@ export default {
submit(){
this.$refs.form.validate((valid, done, msg) => {
if(valid){
// this.$emit('approval', this.formData)
oemApproval({
...this.formData,
workOrderRunId:this.woId
}).then(res =>{
console.log('this.woID-------',this.woId)
let arr = this.woId.split(',')
console.log('arr-------',arr)
let params = []
arr.map(item =>{
params.push({
...this.formData,
workOrderRunId:item
})
})
console.log('params-------',params)
oemApprovalBatch(params).then(res =>{
if(res.data.code == 200){
this.$message.success('审批成功')
this.closeDialog(true)
}
})
// this.$emit('approval', this.formData)
// oemApproval({
// ...this.formData,
// workOrderRunId:this.woId
// }).then(res =>{
// if(res.data.code == 200){
// this.$message.success('')
// this.closeDialog(true)
// }
// })
}
})
},

@ -287,7 +287,6 @@ export default {
this.page.pageSize = pageSize
},
handleApproval(type,row) {
console.log('row--------',row)
if(type == 'batch' && this.selectionList.length == 0){
this.$message.error("请至少选择一条数据");
return

@ -11,7 +11,7 @@
</el-dialog>
</template>
<script>
import {oemApproval} from "@/api/outsourcingManagement/oemApproval"
import {oemApproval,oemApprovalBatch} from "@/api/outsourcingManagement/oemApproval"
export default {
props: {
showDialog: {
@ -85,15 +85,33 @@ export default {
this.$refs.form.validate((valid, done, msg) => {
if(valid){
// this.$emit('approval', this.formData)
oemApproval({
...this.formData,
workOrderRunId:this.woId
}).then(res =>{
let arr = this.woId.split(',')
console.log('arr-------',arr)
let params = []
arr.map(item =>{
params.push({
...this.formData,
workOrderRunId:item
})
})
console.log('params-------',params)
oemApprovalBatch(params).then(res =>{
if(res.data.code == 200){
this.$message.success('审批成功')
this.closeDialog(true)
}
})
// oemApproval({
// ...this.formData,
// workOrderRunId:this.woId
// }).then(res =>{
// if(res.data.code == 200){
// this.$message.success('')
// this.closeDialog(true)
// }
// })
}
})
},

@ -0,0 +1,103 @@
<template>
<el-dialog title="分批" v-model="setCrewShow" :before-close="cancel" width="45%" @open="open">
<el-form ref="form" :model="batchForm" :rules="batchRules" label-width="90">
<el-form-item label="分批数量" prop="makeQty">
<el-input-number style="width:100%;" controls-position="right" v-model="batchForm.makeQty"></el-input-number>
</el-form-item>
<el-form-item label="车间订单号" prop="woCode">
<el-input disabled v-model="batchForm.woCode"></el-input>
</el-form-item>
<el-form-item label="流程卡号" prop="cardNo">
<el-input disabled v-model="batchForm.cardNo"></el-input>
</el-form-item>
<el-form-item label="批次号" prop="batchNo">
<el-input disabled v-model="batchForm.batchNo"></el-input>
</el-form-item>
<el-form-item label="备注" prop="memo">
<el-input type="textarea" v-model="batchForm.memo"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submit()"> 确认</el-button>
</div>
</template>
</el-dialog>
</template>
<script>
import {getBatchData,setBatch} from "@/api/outsourcingManagement/oemOrder"
export default {
props:{
showBatch:{
type:Boolean,
default:false
},
checkRow:{
type:Object,
default:() => {}
}
},
data(){
return{
setCrewShow:false,
batchForm:{
makeQty:1,
},
batchRules:{
makeQty:[{required: true, message: '请输入分批数量', trigger: 'blur'}],
woCode:[{required: true, message: '请输入车间订单号', trigger: 'blur'}],
cardNo:[{required: true, message: '请输入流程卡号', trigger: 'blur'}],
batchNo:[{required: true, message: '请输入批次号', trigger: 'blur'}],
}
}
},
created(){
this.setCrewShow = this.showBatch;
this.getData()
},
methods:{
getData(){
console.log('111111111111111')
getBatchData({
worId:this.checkRow.id
}).then(res =>{
console.log('res----------',res)
this.batchForm = {
...this.batchForm,
woCode:res.data.data.woCode,
cardNo:res.data.data.cardNo,
batchNo:res.data.data.batchNo
}
})
},
cancel(val){
this.setCrewShow = false
this.$emit('cancel', val);
},
submit(){
this.$refs.form.validate((valid) => {
if(valid){
console.log('11111111111111111111111111111111111')
setBatch({
id:this.checkRow.woId,
...this.batchForm
}).then(res =>{
if(res.data.code == 200){
this.$message.success('分批成功')
this.cancel(true)
}
}).catch(err =>{
this.cancel(false)
})
}
})
}
}
}
</script>
<style>
</style>

@ -19,7 +19,7 @@
:row-class-name="rowCLassName"
>
<template #menu-left>
<el-button type="primary" @click="materialFormPrint">领料单打印</el-button>
<!-- <el-button type="primary" @click="materialFormPrint">领料单打印</el-button> -->
</template>
<template #menu-right="{ size }">
@ -56,15 +56,15 @@
<template
v-if="scope.row.approvalStatus != 2 && scope.row.runStatus < 15"
>
<el-button type="primary" link @click="takeBack(scope.row)">收回</el-button>
<el-button type="primary" link @click="turnFacInner(scope.row)"
>转厂内</el-button
>
<el-button type="text" @click="takeBack(scope.row)">收回</el-button>
<el-button type="text" v-if="scope.row.oemStatus == 1 " @click="turnFacInner(scope.row)" >转厂内</el-button>
<el-button type="text" @click="inBatches(scope.row)" >分批</el-button>
</template>
<template
v-if="scope.row.approvalStatus != 2 && scope.row.runStatus >= 15"
>
<span style="color: red">订单{{ scope.row.runStatusTitle }}</span>
v-if="scope.row.approvalStatus != 2 && scope.row.runStatus >= 15">
<!-- <span style="color: red">订单{{ scope.row.runStatusTitle }}</span> -->
<el-button type="text" @click="qualityRecords(scope.row)">质量记录</el-button>
<el-button type="text" @click="certificate(scope.row)">合格证</el-button>
</template>
</template>
<!-- <template #virtualMac="scope">
@ -118,16 +118,19 @@
></manufacturerChange>
<!-- 领料单打印 -->
<materialPrint v-if="showPrint" :showPrint="showPrint" @cancel="cancel"></materialPrint>
<!-- 分批处理 -->
<batch-dialog v-if="showBatch" :showBatch="showBatch" :checkRow="checkRow" @cancel="cancel"></batch-dialog>
</basic-container>
</template>
<script>
import {getList,oemBack} from "@/api/outsourcingManagement/oemOrder"
import {getList,oemBack,turnQuality,turnCertificate} from "@/api/outsourcingManagement/oemOrder"
import { mapGetters } from "vuex";
import memoDialog from "./memoDialog.vue";
import takeBack from "./takeBack.vue";
import turnFacInner from "./turnFacInner.vue";
import manufacturerChange from "./manufacturerChange.vue";
import materialPrint from "./materialPrint.vue"
import batchDialog from "./batchDialog.vue";
export default {
components: {
memoDialog,
@ -135,6 +138,7 @@ export default {
turnFacInner,
manufacturerChange,
materialPrint,
batchDialog
// setCraftAbility
},
data() {
@ -144,6 +148,7 @@ export default {
rowItem: {},
takeBackOpen: false,
worId: "",
showBatch:false,
memoDialogOpen: false,
parameter: {},
ocId: "89889",
@ -310,6 +315,20 @@ export default {
// },
// ],
},
{
label: "外协状态",
prop: "oemStatusList",
type:"select",
// bind: 'prWorkOrder.runStatus',
sortable: true,
hide: true,
search: true,
dicData:[
{label:"待外协",value:'1'},
{label:"外协中",value:'2'},
{label:"已完成",value:'3'},
]
},
{
label: "订单状态",
prop: "runStatusName",
@ -355,6 +374,11 @@ export default {
// },
// ],
},
{
label:'外协状态',
prop:"oemStatusTitle",
search:false,
},
{
label: "批次号",
prop: "batchNo",
@ -567,6 +591,7 @@ export default {
},
data: [],
changeOpen: false,
checkRow:{},
};
},
computed: {
@ -612,6 +637,16 @@ export default {
this.closeObj = { woId, status };
this.memoDialogOpen = true;
},
qualityRecords(row){
turnQuality({key:row.deliverKey}).then(res =>{
window.open(res.data.msg)
})
},
certificate(row){
turnCertificate({key:row.deliverKey}).then(res =>{
window.open(res.data.msg)
})
},
//
memoDialogCancel(flag, memo) {
this.memoDialogOpen = false;
@ -645,6 +680,10 @@ export default {
this.ecId = ecId;
this.showIp = true;
},
inBatches(row){
this.checkRow = row
this.showBatch = true
},
cancel(isRefresh) {
this.showPrint = false
this.workRateOpen = false;
@ -656,6 +695,7 @@ export default {
this.updateMakeQtyOpen = false;
this.memoDialogOpen = false;
this.changeOpen = false;
this.showBatch = false
if (isRefresh) {
this.refresh();
}

@ -152,6 +152,29 @@ export default {
},
],
},
{
label:'手动结算',
prop:"manual",
type:'switch',
span: 24,
dicData:[
{
label:'是',
value:'1'
},
{
label:'否',
value:'0'
}
],
rules: [
{
required: true,
message: "请选择是否手动结算",
trigger: "blur",
},
],
}
],
},
form: {},

@ -18,8 +18,8 @@
<el-button type="primary" @click="addFn">新增</el-button>
</template>
<template #menu="scope">
<!-- <el-button type="text" @click="editFn(scope.row)"> 编辑</el-button> -->
<el-button type="text" @click="detailsFn(scope.row)"> 详情</el-button>
<el-button type="text" @click="editFn(scope.row)"> 修改</el-button>
<!-- 是否展示 -->
<el-button type="text" v-if="scope.row.isSpecial == 1" @click="setCrew(scope.row)">
设置班组</el-button
@ -79,6 +79,7 @@
@closeDialog="closeDialog"
:title="openTitle"
:id="rowId"
:rowData="rowData"
></addBasicProcessesDialog>
<!-- 导入 -->
@ -143,7 +144,7 @@ export default {
editBtnIcon: ' ',
viewBtnText: '详情',
// labelWidth: 120,
menuWidth: 140,
menuWidth: 160,
dialogWidth: 840,
dialogClickModal: false,
searchEnter: true,
@ -335,6 +336,7 @@ export default {
isAddOpen: false,
openTitle: '',
rowId: '',
rowData:{}
};
},
@ -349,6 +351,14 @@ export default {
this.isAddOpen = true;
this.openTitle = '新增';
},
//
editFn(row) {
this.isAddOpen = true;
this.openTitle = '修改';
row.isCheckout = row.isCheckout + '';
this.rowId = row.id;
},
closeDialog(isRefresh) {
this.isAddOpen = false;
this.isShowImport = false;

@ -1,11 +1,5 @@
<template>
<el-dialog
:title="title"
append-to-body
:modelValue="openShow"
width="40%"
@close="closeDialog"
>
<el-dialog :title="title" append-to-body :modelValue="openShow" width="40%" @close="closeDialog">
<el-form
:model="ruleForm"
:rules="rules"
@ -44,18 +38,18 @@
</el-col>
<el-col :span="12">
<el-form-item label="检验工序:" prop="isCheckout">
<el-select v-model="ruleForm.isCheckout" placeholder="请选择" clearable filterable :disabled="disableFrom">
<el-option
label="是"
value="1">
</el-option>
<el-option
label="否"
value="0">
</el-option>
<el-select
v-model="ruleForm.isCheckout"
placeholder="请选择"
clearable
filterable
:disabled="disableFrom"
>
<el-option label="是" value="1"> </el-option>
<el-option label="否" value="0"> </el-option>
</el-select>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="6">
@ -170,7 +164,7 @@
</el-dialog>
</template>
<script>
import { add, getDetail } from "@/api/processManagement/basicProcesses";
import { add, getDetail, update } from '@/api/processManagement/basicProcesses';
export default {
props: {
showDialog: {
@ -183,11 +177,15 @@ export default {
},
title: {
type: String,
default: "",
default: '',
},
id: {
type: String,
default: "",
default: '',
},
rowData: {
type: Object,
default: () => ({}),
},
},
data() {
@ -199,50 +197,68 @@ export default {
cycle: 0,
},
rules: {
code: [{ required: true, message: "请输入", trigger: "blur" }],
name: [{ required: true, message: "请输入", trigger: "blur" }],
cycle: [{ required: true, message: "请输入", trigger: "blur" }],
isCheckout: [{ required: true, message: "请选择", trigger: "change" }]
code: [{ required: true, message: '请输入', trigger: 'blur' }],
name: [{ required: true, message: '请输入', trigger: 'blur' }],
cycle: [{ required: true, message: '请输入', trigger: 'blur' }],
isCheckout: [{ required: true, message: '请选择', trigger: 'change' }],
},
};
},
mounted() {
this.openShow = this.showDialog;
this.disableFrom = this.title == "新增" ? false : true;
if (this.title == "详情") {
getDetail(this.id).then((res) => {
this.disableFrom = this.title == '详情' ? true : false;
if (this.title == '详情' || this.title == '修改') {
getDetail(this.id).then(res => {
this.ruleForm = res.data.data;
this.ruleForm.isCheckout = this.ruleForm.isCheckout == -1 ? '' : this.ruleForm.isCheckout+''
this.ruleForm.isCheckout =
this.ruleForm.isCheckout == -1 ? '' : this.ruleForm.isCheckout + '';
});
}
},
methods: {
closeDialog() {
this.openShow = false;
this.$emit("closeDialog");
this.$emit('closeDialog');
},
detailsInfo() {},
submit() {
this.$refs.ruleForm.validate((valid) => {
this.$refs.ruleForm.validate(valid => {
if (valid) {
console.log(9999, this.ruleForm);
add(this.ruleForm).then(
(res) => {
//
this.$message({
type: "success",
message: "操作成功!",
});
//
this.$emit("closeDialog", true);
},
(error) => {
// loading();
}
);
if (this.title == '新增') {
add(this.ruleForm).then(
res => {
//
this.$message({
type: 'success',
message: '操作成功!',
});
//
this.$emit('closeDialog', true);
},
error => {
// loading();
}
);
} else {
update(this.ruleForm).then(
res => {
//
this.$message({
type: 'success',
message: '操作成功!',
});
//
this.$emit('closeDialog', true);
},
error => {
// loading();
}
);
}
} else {
console.log("error submit!!");
console.log('error submit!!');
return false;
}
});

@ -792,7 +792,8 @@ export default {
type: 'success',
message: '操作成功!',
});
this.$emit('closeDialog');
// this.$emit('closeDialog');
this.getDetail()
})
.catch(err => {
this.formLoading = false;
@ -806,7 +807,8 @@ export default {
type: 'success',
message: '操作成功!',
});
this.$emit('closeDialog');
// this.$emit('closeDialog');
this.getDetail()
})
.catch(err => {
this.formLoading = false;

@ -1,5 +1,5 @@
<template>
<el-dialog title="新增" append-to-body :modelValue="openShow" width="80%" @close="closeDialog">
<el-dialog :title="title" append-to-body :modelValue="openShow" width="80%" @close="closeDialog">
<div style="margin-bottom: 12px" v-if="moldAddMore">
<el-button type="primary" @click="addTable">插入一行</el-button>
<el-button type="danger" @click="delTable">删除选中行</el-button>
@ -172,7 +172,7 @@
<script>
import { getWorkCenterList } from '@/api/processManagement/addQuantity.js';
// import { submitBatchData } from '@/api/processManagement/periodical.js'; //
import { getEquipmentList, add } from '@/api/processManagement/specialProcess';
import { getEquipmentList, add,update } from '@/api/processManagement/specialProcess';
import { getRoleUserList } from '@/api/processManagement/taskDispatch';
export default {
props: {
@ -180,13 +180,14 @@ export default {
moldAddMore: { type: Boolean, default: false },
tabPosition: { type: String, default: '' },
itemData: { type: Array, default: () => [] },
title: { type: String, default: '' },
},
data() {
return {
loading: false,
openShow: false,
wcData: [],
userData:[],
userData: [],
equipmentData: [],
formError: '', //
@ -236,12 +237,12 @@ export default {
console.log('this.itemData', this.itemData);
this.form.tableData =
this.itemData.length > 0 ? JSON.parse(JSON.stringify(this.itemData)) : [];
if(this.form.tableData.length > 0){
if (this.form.tableData.length > 0) {
this.form.tableData.forEach(item => {
item.lastDueTime = item.lastDueTime+' 00:00:00'
})
item.lastDueTime = item.lastDueTime + ' 00:00:00';
});
}
this.workCenterChange()
this.workCenterChange();
}
},
methods: {
@ -324,11 +325,19 @@ export default {
//
try {
console.log('提交数据:', submitData);
add(submitData).then(res => {
this.$message.success('操作成功');
this.loading = false;
this.closeDialog();
});
if (this.title == '新增') {
add(submitData).then(res => {
this.$message.success('操作成功');
this.loading = false;
this.closeDialog();
});
}else{
update(submitData[0]).then(res => {
this.$message.success('操作成功');
this.loading = false;
this.closeDialog();
});
}
} catch (err) {
this.loading = false;
this.$message.error(err.message);

@ -19,7 +19,7 @@
@row-update="rowUpdate"
>
<template #menu-left>
<el-button type="primary" @click="handleAdd">新增 </el-button>
<el-button type="primary" @click="handleAdd">新增 </el-button>
<el-button type="danger" @click="handleDelete">删除 </el-button>
</template>
<template #menu-right>
@ -27,7 +27,12 @@
</template>
<template #menu="scope">
<el-button type="text" @click="handleEdit(scope.row)">修改 </el-button>
</template>
</template>
<template #fileUrls="scope">
<el-button v-if="scope.row.fileUrl != null&&scope.row.fileUrl != ''" type="text" @click="uploadUrl(scope.row)" >
下载</el-button
>
</template>
</avue-crud>
<!-- 导入 -->
<basic-import
@ -41,8 +46,14 @@
></basic-import>
<!-- 新增 -->
<addinPlantMaintenanceDialog v-if="showAddDialog" :showDialog="showAddDialog" :moldAddMore="moldAddMore" @closeDialog="closeAddDialog" :itemData="itemData"></addinPlantMaintenanceDialog>
<addinPlantMaintenanceDialog
v-if="showAddDialog"
:showDialog="showAddDialog"
:moldAddMore="moldAddMore"
@closeDialog="closeAddDialog"
:itemData="itemData"
:title="title"
></addinPlantMaintenanceDialog>
</div>
</template>
<script>
@ -58,12 +69,12 @@ import addinPlantMaintenanceDialog from './addinPlantMaintenanceDialog.vue';
export default {
components: {
basicImport,
addinPlantMaintenanceDialog
addinPlantMaintenanceDialog,
},
data() {
return {
showAddDialog: false,
moldAddMore:true,
moldAddMore: true,
isShowImport: false,
data: [],
selectionList: [],
@ -75,7 +86,7 @@ export default {
searchShow: true,
searchMenuSpan: 12,
searchIcon: true,
searchIndex: 3,
searchIndex: 3,
tree: false,
border: true,
index: true,
@ -142,7 +153,7 @@ export default {
{
label: '产线',
prop: 'equipmentId',
searchLabelWidth:50,
searchLabelWidth: 50,
search: true,
sortable: true,
filter: true,
@ -152,19 +163,18 @@ export default {
type: 'select',
filterable: true,
clearable: true,
hide:true,
hide: true,
dicUrl: `/blade-desk/equipment/page?used=1&workstationId={{wcId}}&size=99999`,
props: {
label: 'deviceName',
value: 'id',
res: 'data.records',
},
change: (val) =>{
this.equipmentChange(val.item,'equipmentId')
change: val => {
this.equipmentChange(val.item, 'equipmentId');
},
},
{
{
label: '产线',
prop: 'equipmentName',
search: false,
@ -175,10 +185,8 @@ export default {
align: 'left',
filterable: true,
clearable: true,
addDisplay:false,
editDisplay:false,
addDisplay: false,
editDisplay: false,
},
{
label: '确认名称',
@ -278,6 +286,36 @@ export default {
},
],
},
{
label: '状态',
prop: 'syncStatu',
search: false,
sortable: true,
filter: true,
span: 12,
headerAlign: 'center',
align: 'left',
type: 'select',
dicData: [
{
label: '未同步',
value: '0',
},
{
label: '已同步',
value: '1',
},
],
},
{
label: '文件',
prop: 'fileUrls',
search: false,
sortable: true,
span: 12,
headerAlign: 'center',
align: 'left',
},
{
label: '备注',
prop: 'remarks',
@ -298,31 +336,37 @@ export default {
},
query: {},
loading: false,
itemData:[],
itemData: [],
title: '新增',
};
},
methods: {
handleEdit(row){
this.showAddDialog = true
this.moldAddMore = false
row.proMan=row.proMan.toString()
row.equipmentId=row.equipmentId.toString()
this.itemData = [row]
uploadUrl(row) {
window.open(row.fileUrl);
},
handleEdit(row) {
this.title = '修改';
this.showAddDialog = true;
this.moldAddMore = false;
row.proMan = row.proMan.toString();
row.equipmentId = row.equipmentId.toString();
this.itemData = [row];
},
handleAdd() {
this.title = '新增';
this.showAddDialog = true;
this.moldAddMore = true;
},
handleAdd(){
this.showAddDialog = true
this.moldAddMore = true
},
closeAddDialog(){
this.showAddDialog = false
this.isShowImport = false
this.onLoad(this.page,this.query)
closeAddDialog() {
this.showAddDialog = false;
this.isShowImport = false;
this.onLoad(this.page, this.query);
},
equipmentChange(val,type){
console.log(val,'val')
if(val&&type=='equipmentId'){
this.form.equipmentName = val.deviceName
this.form.equipmentCode = val.deviceCode
equipmentChange(val, type) {
console.log(val, 'val');
if (val && type == 'equipmentId') {
this.form.equipmentName = val.deviceName;
this.form.equipmentCode = val.deviceCode;
}
},
//
@ -342,7 +386,7 @@ export default {
let ids = this.selectionList.map(item => item.id);
remove(ids.join(',')).then(() => {
this.$message.success('删除成功');
this.onLoad(this.page,this.query);
this.onLoad(this.page, this.query);
});
});
},
@ -357,7 +401,7 @@ export default {
//
const data = res.data.data;
row.id = data.id;
this.onLoad(this.page,this.query);
this.onLoad(this.page, this.query);
this.$message({
type: 'success',
message: '操作成功!',
@ -380,7 +424,7 @@ export default {
message: '操作成功!',
});
//
this.onLoad(this.page,this.query);
this.onLoad(this.page, this.query);
done();
},
error => {
@ -405,15 +449,14 @@ export default {
});
//
done();
this.onLoad(this.page,this.query);
this.onLoad(this.page, this.query);
});
},
//
searchReset() {
this.query = {};
this.parentId = 0;
this.onLoad(this.page,this.query);
this.onLoad(this.page, this.query);
},
//
searchChange(params, done) {

@ -1,56 +1,41 @@
<template>
<el-dialog title="处理" append-to-body :modelValue="openShow" width="70%" @close="closeDialog">
<el-dialog title="处理" append-to-body :modelValue="openShow" width="35%" @close="closeDialog">
<!-- 单个 Form 包裹整个表格 -->
<el-form ref="tableForm" :model="form" :rules="formRules" label-width="0px">
<el-form-item label="备注:" label-width="60px">
<el-input v-model="form.fillMemo" type="textarea" :rows="3" style="width:50%" />
<avue-form
ref="form"
:option="fileOption"
v-model="fileForm"
:upload-after="uploadAfter"
:upload-exceed="uploadExceed"
:upload-delete="uploadDelete"
>
</avue-form>
<!-- <el-form ref="tableForm" :model="form" :rules="formRules" label-width="0px">
<el-form-item label="上传文件:" label-width="100px" prop="fileUrl">
<el-upload
class="upload-demo"
action="/api/blade-resource/oss/endpoint/put-file-attach"
:on-success="handleSuccess"
:on-remove="handleRemove"
multiple
:limit="1"
:on-exceed="handleExceed"
:file-list="fileList"
accept=".rar,.zip,.doc,.docx,.pdf,.jpg"
style="width: 100%"
>
<div>
<el-button type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持扩展名 .doc .docx .pdf .jpg</div>
</div>
</el-upload>
</el-form-item>
<div style="margin-bottom: 12px" v-if="moldAddMore">
<el-button type="primary" @click="addTable">插入一行</el-button>
<el-button type="danger" @click="delTable">删除选中行</el-button>
</div>
<!-- 全局错误提示 -->
<div v-if="formError" class="error-message" style="color: #f56c6c; margin-bottom: 10px">
{{ formError }}
</div>
<el-table :data="form.tableData" @select="selectChange" border>
<el-table-column type="selection" width="55"></el-table-column>
<!-- 作业中心绑定数组字段 -->
<el-table-column align="center" label="事项">
<template #header>
<span><i style="color: red">*</i>事项</span>
</template>
<template #default="scope">
<!-- prop 格式数组名[索引].字段名 -->
<el-form-item :prop="`tableData[${scope.$index}].matter`" :rules="formRules.matter">
<el-input
v-model="scope.row.matter"
placeholder="请输入"
style="width: 100%"
></el-input>
</el-form-item>
</template>
</el-table-column>
<!-- 描述 -->
<el-table-column align="center" label="描述">
<template #header>
<span><i style="color: red">*</i>描述</span>
</template>
<template #default="scope">
<el-form-item :prop="`tableData[${scope.$index}].process`" :rules="formRules.process">
<el-input
v-model="scope.row.process"
placeholder="请输入"
style="width: 100%"
></el-input>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
<el-form-item label="描述:" label-width="60px">
<el-input v-model="form.fillMemo" type="textarea" :rows="3" style="width: 100%" />
</el-form-item>
</el-form> -->
<template #footer>
<span class="dialog-footer">
@ -74,6 +59,7 @@ export default {
},
data() {
return {
fileList: [], //
openShow: false,
wcData: [],
formError: '', //
@ -85,6 +71,7 @@ export default {
//
formRules: {
fileUrl: [{ required: true, message: '请上传文件', trigger: ['change', 'submit'] }],
// 1
tableData: [
{
@ -111,6 +98,42 @@ export default {
// preserveContent
process: [{ required: true, message: '请输入', trigger: ['blur', 'submit'] }],
},
attachLink: '',
fileForm: {},
fileOption: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '资料上传',
prop: 'excelFile',
type: 'upload',
// drag: true,
loadText: '附件上传中,请稍等',
span: 24,
limit: 1,
fileSize: 10000,
propsHttp: {
res: "data",
},
tip: '不能上传 附件,且不超过 10M',
action: '/api/blade-resource/oss/endpoint/put-file-attach',
rules: [
{
required: true,
message: '请上传文件',
trigger: 'blur',
},
],
},
{
label: '描述:',
prop: 'fillMemo',
type: 'textarea',
span: 24,
},
],
},
};
},
mounted() {
@ -123,6 +146,17 @@ export default {
}
},
methods: {
uploadExceed(limit, files, fileList, column) {
this.$message.error('最多只能上传一个文件');
},
uploadAfter(res, done, loading, column) {
this.attachLink = res.link;
this.fileForm.excelFile = [res.link];
done();
},
uploadDelete(file, column) {
// this.fileForm.excelFile = [];
},
selectChange(list, row) {
row._select = !row._select;
},
@ -152,51 +186,23 @@ export default {
//
submitForm() {
this.formError = '';
// Form
this.$refs.tableForm.validate(async (isValid, invalidFields) => {
if (!isValid) {
//
this.formError = '存在未完善的字段,请检查表格中的红色提示';
this.$nextTick(() => {
//
const firstError = document.querySelector('.el-form-item.is-error');
if (firstError) {
firstError.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
});
return;
}
//
const submitData = this.form.tableData.map(row => {
const { _select, ...validData } = row; //
return validData;
});
//
try {
console.log(this.fileForm, this.attachLink, 'fileForm');
this.$refs.form.validate((valid, done, msg) => {
if (valid) {
let query = {
fillingDetailList: submitData,
tbId: this.rowData.id,
deleteIds: [],
fillMemo: '',
fileUrl: this.attachLink,
fillMemo: this.fileForm.fillMemo,
};
submitBatchData(query).then(res => {
this.$message.success('提交成功');
this.closeDialog();
this.$emit('submitSuccess', submitData);
});
//
// this.$message.success('');
// this.closeDialog();
// this.$emit('submitSuccess', submitData);
} catch (err) {
this.$message.error(err);
// console.error('', err);
done();
} else {
console.log('error submit!!');
return false;
}
});
},

@ -107,7 +107,7 @@
<el-col :span="6">
<el-form-item label="镀层厚度2:" prop="plateThickness">
<el-input v-model="formData.plateThickness" placeholder="请输入" />
<el-input v-model="formData.plateThicknessTwo" placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
@ -932,6 +932,7 @@ export default {
if (this.formData.plateCode || this.formData.plateThickness) {
if (!this.formData.plateGoodsCode) {
isReturn = true;
this.submitLoading = false
}
}
if (isReturn && this.notSinTer) {
@ -944,6 +945,7 @@ export default {
this.formData.tsbNum === null &&
this.formData.tjtNum === null
) {
this.submitLoading = false;
return this.$message.warning('一级路线包含涂色,请填写涂色数据');
}

@ -9,8 +9,8 @@
工艺版本<el-select
v-model="version"
placeholder="请输入"
filterable
@change="versionChange()"
style="width:150px"
>
<el-option
v-for="(item, index) in versionOptions"
@ -1121,10 +1121,12 @@ export default {
float: right;
}
.version_select {
float: left;
float: right;
height: 50px;
display: flex;
line-height: 35px;
z-index: 99;
position: relative;
.el-select {
flex: 1;
}

@ -27,7 +27,7 @@
node-key="id"
@node-click="handleNodeClick"
@node-contextmenu="handleNodeRightClick"
:default-expand-all="true"
:default-expand-all="false"
:expand-on-click-node="false"
/>
<div
@ -372,10 +372,6 @@
placeholder="请输入"
style="width: 100%"
></el-input>
<!-- <el-select v-model="scope.row.tool" placeholder="请选择" clearable filterable>
<el-option label="是" value="1"></el-option>
<el-option label="否" value="2"></el-option>
</el-select> -->
</el-form-item>
</template>
</el-table-column>
@ -585,7 +581,9 @@ export default {
formRules4: {
moldCode: [{ required: true, message: '请输入', trigger: ['change', 'submit'] }],
},
treeNodes: {}, //
treeNodes: {
rawData: {},
}, //
parentData: {}, //
partInfoData: {}, //
tempId: 0,
@ -765,20 +763,48 @@ export default {
getModelDetailList({ Id: this.modelLevel }).then(res => {
const templateData = res.data.data.proDetailVOList;
const existing = [...this.form1.tableData1];
const baseIndex = existing.length;
//
const mappedData = templateData.map((item, index) => {
// 使
if (item.modelProjectList.length > 0) {
item.modelProjectList = item.modelProjectList.map(project => {
project.id = null;
return project;
});
}
//
const projectList = (item.modelProjectList || []).map(project => ({
id: null,
trialNo: this.getProcessNo([], index),
projectCode: project.projectCode,
projectName: project.projectName,
projectStandard: project.projectStandard,
projectStandardName: project.projectStandardName,
proHours: project.proHours || 0,
prepareHours: project.prepareHours || 0,
}));
//
const measuringToolList = (item.measuringToolList || []).map(tool => ({
id: null,
trialNo: this.getProcessNo([], index),
testType: tool.testType,
tool: tool.tool,
toolSize: tool.toolSize,
toolInfo: tool.toolInfo,
}));
//
const moldToolList = (item.moldToolList || []).map(mold => ({
id: null,
trialNo: this.getProcessNo([], index),
moldCode: mold.moldCode,
moldName: mold.moldName,
isPrint: mold.isPrint,
printNo: mold.printNo,
testFixtureNo: mold.testFixtureNo,
}));
return {
id: null, // null
processNo: this.getProcessNo(this.form1.tableData1), //
// processNo: item.processNo,
ppsId: item.ppsId + '', // ppsId id
id: null,
_tempId: `temp_${Date.now()}_${index}`, //
processNo: this.getProcessNo(existing, index),
ppsId: item.ppsId + '',
processName: item.processName,
caId: item.caId + '',
craftName: item.craftName,
@ -786,34 +812,65 @@ export default {
proHours: item.proHours || '',
setoutHours: item.setoutHours || '',
isMain: item.isMain || '0',
processProjectList: item.modelProjectList || [],
// ...
//
processProjectList: projectList,
measuringToolList: measuringToolList,
moldToolList: moldToolList,
};
});
// 12
this.form1.tableData1 = [...existing, ...mappedData]; //
//
this.form1.tableData1 = [...existing, ...mappedData];
this.modelLevelLoading = false;
let query_ = {
dsPart: this.partInfoData, //
craft: this.treeNodes.rawData, //
processList: this.form1.tableData1, //
processDeleteIds: this.form1.deleteIds, //ids
};
authorizedAccomplish2(query_)
.then(res => {
this.$message.success('保存成功');
this.craftLoading = false;
this.getDetails();
})
.catch(err => {
this.craftLoading = false;
});
//
this.updateTreeStructure(mappedData);
// this.$message.success('');
this.$message.success('模板导入成功,请检查后手动保存');
});
},
//
updateTreeStructure(mappedData) {
// 1. processList
if (this.treeLeave === 2) {
this.treeNodes.processList = this.form1.tableData1;
}
// 2. data
const updateTreeNode = nodes => {
for (let node of nodes) {
if (node.level === 2 && node.id === this.treeNodes.id) {
// processList
node.processList = this.form1.tableData1;
//
node.children = this.form1.tableData1.map(process => ({
id: process.id || process._tempId || `process_${Date.now()}_${Math.random()}`,
label: process.processName || '未知工序',
level: 3,
rawData: {
processInfo: process,
projectList: process.processProjectList || [],
measuringToolList: process.measuringToolList || [],
moldToolList: process.moldToolList || [],
},
children: (process.processProjectList || []).map(project => ({
id: project.id || `project_${Date.now()}_${Math.random()}`,
label: project.projectName || '未知项目',
level: 4,
disabled: true,
rawData: project,
})),
}));
break;
}
if (node.children && node.children.length > 0) {
updateTreeNode(node.children);
}
}
};
updateTreeNode(this.data);
},
//
async getDetails() {
this.treeLoading = true;
@ -879,7 +936,7 @@ export default {
};
const formatCraftLabel = craftInfo => {
return `${craftInfo.roamNo || '临时工艺'}-${craftInfo.craftNo || '工艺文件'}`;
return `${craftInfo.roamNo || '临时工艺'}-${craftInfo.craftNo || 'C000000'}`;
};
const tree = [
@ -1096,9 +1153,9 @@ export default {
}
},
//
getProcessNo(table) {
const len = table;
let processNo = (len.length + 1) * 5;
getProcessNo(table, index = 0) {
const len = table.length;
let processNo = (len + index + 1) * 5;
if (processNo.toString().length === 1) {
processNo = '000' + processNo;
@ -1445,7 +1502,11 @@ export default {
.then(res => {
this.$message.success('保存成功');
this.craftLoading = false;
this.getDetails();
if (this.treeLeave == 1) {
this.getDetails();
}
this.updateTreeAfterSave(res.data.data);
})
.catch(err => {
this.craftLoading = false;
@ -1481,7 +1542,12 @@ export default {
saveProcessProjectSave(query_).then(res => {
this.$message.success('保存成功');
this.craftLoading = false;
this.getDetails();
//
if (this.treeLeave === 3) {
this.treeNodes.rawData.projectList = this.form2.tableData2;
this.updateTreeNodeProject();
this.refreshTableData(); //
}
});
}
});
@ -1498,7 +1564,12 @@ export default {
saveProcessMeasuringTool(query_).then(res => {
this.$message.success('保存成功');
this.craftLoading = false;
this.getDetails();
//
if (this.treeLeave === 3) {
this.treeNodes.rawData.measuringToolList = this.form3.tableData3;
this.updateTreeNodeProject();
this.refreshTableData(); //
}
});
}
});
@ -1515,12 +1586,118 @@ export default {
saveProcessMoldTool(query_).then(res => {
this.$message.success('保存成功');
this.craftLoading = false;
this.getDetails();
//
if (this.treeLeave === 3) {
this.treeNodes.rawData.moldToolList = this.form4.tableData4;
this.updateTreeNodeProject();
this.refreshTableData(); //
}
});
}
});
}
},
//
updateTreeAfterSave(saveData) {
// 1. rawData
if (this.treeLeave === 1 && saveData) {
console.log('updateTreeAfterSave', this.treeNodes);
// this.treeNodes.rawData = { ...this.treeNodes.rawData, ...saveData };
}
if (this.treeLeave === 2 && saveData) {
this.treeNodes.rawData = { ...this.treeNodes.rawData, ...saveData };
this.treeNodes.processList = this.form1.tableData1;
}
// 2. data
const updateTreeNode = nodes => {
for (let node of nodes) {
if (node.level === 2 && node.id === this.treeNodes.id) {
//
if (saveData) {
node.rawData = { ...node.rawData, ...saveData };
node.label = `${saveData.roamNo || '临时工艺'}-${saveData.craftNo || '工艺文件'}`;
}
//
node.processList = this.form1.tableData1;
node.children = this.form1.tableData1.map(process => ({
id: process.id || `process_${Date.now()}_${Math.random()}`,
label: process.processName || '未知工序',
level: 3,
rawData: {
processInfo: process,
projectList: process.processProjectList || [],
measuringToolList: process.measuringToolList || [],
moldToolList: process.moldToolList || [],
},
children: (process.processProjectList || []).map(project => ({
id: project.id || `project_${Date.now()}_${Math.random()}`,
label: project.projectName || '未知项目',
level: 4,
disabled: true,
rawData: project,
})),
}));
break;
}
if (node.children && node.children.length > 0) {
updateTreeNode(node.children);
}
}
};
updateTreeNode(this.data);
// 3.
this.refreshTableData();
},
refreshTableData() {
this.$nextTick(() => {
if (this.treeLeave === 2) {
//
this.form1.tableData1 = [...(this.treeNodes.processList || [])];
} else if (this.treeLeave === 3) {
//
const { projectList, measuringToolList, moldToolList } = this.treeNodes.rawData;
this.form2.tableData2 = [...(projectList || [])];
this.form3.tableData3 = [...(measuringToolList || [])];
this.form4.tableData4 = [...(moldToolList || [])];
}
});
},
//
updateTreeNodeProject() {
const updateTreeNode = nodes => {
for (let node of nodes) {
if (node.level === 3 && node.id === this.treeNodes.id) {
node.rawData = {
...node.rawData,
projectList: this.form2.tableData2,
measuringToolList: this.form3.tableData3,
moldToolList: this.form4.tableData4,
};
//
node.children = (this.form2.tableData2 || []).map(project => ({
id: project.id || `project_${Date.now()}_${Math.random()}`,
label: project.projectName || '未知项目',
level: 4,
disabled: true,
rawData: project,
}));
break;
}
if (node.children && node.children.length > 0) {
updateTreeNode(node.children);
}
}
};
updateTreeNode(this.data);
//
this.refreshTableData();
},
},
};
</script>

@ -952,7 +952,6 @@ export default {
}),
},
];
console.log(909090, tree);
return tree;
},
//

@ -164,6 +164,9 @@ export default {
sortable: true,
filter: true,
span: 12,
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
headerAlign: 'center',
align: 'center',
width: 150,

@ -16,7 +16,7 @@
@on-load="onLoad"
>
<template #body>
<el-tag style="width: 100%; display: block; line-height: 22px"
<el-tag style="width: 100%; display: block; line-height: 17px;margin-bottom: 5px;" v-if="expireData.length>0"
>{{ expireData.length }}个零件工艺即将到期请尽快维护有效期</el-tag
>
</template>
@ -341,7 +341,7 @@ export default {
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.length;
this.page.total = res.data.data.total;
this.selectionClear();
});
},

@ -321,7 +321,7 @@ export default {
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.length;
this.page.total = res.data.data.total;
});
},
},

@ -258,8 +258,7 @@ export default {
lineHeight: 20,
color: '#fff',
formatter: params => {
const childText =
params.data.children?.length > 0 ? `${params.data.children.length}个子件` : '';
const childText =params.data.quota>=0?`${params.data.quota}`:''
// \n
return `${params.name}${childText ? '\n' + childText : ''}`;
},

@ -53,7 +53,6 @@
type="primary"
link
@click="setBathCrew(scope.row)"
v-if="scope.row.taskStatus == 1 && !scope.row.completed"
>转派</el-button
>
</template>

@ -20,12 +20,10 @@
@on-load="onLoad"
>
<template #menu="{ row }">
<span v-if="row.yieldType !== 1">
<span>
<el-button type="text" @click="inspectionRecord(row)">检验记录</el-button>
<el-button type="text" @click="rbPrint(row,2)">热表打印</el-button>
</span>
<span v-else>
<el-button type="text" @click="handleDelete">烧结打印</el-button>
<el-button v-if="row.yieldType == 1" type="text" @click="rbPrint(row,2)">热表打印</el-button>
<el-button v-else type="text" @click="sjPrint(row)">烧结打印</el-button>
</span>
<el-button type="text" @click="handleDelete">测厚打印</el-button>
</template>
@ -99,6 +97,13 @@
</el-form-item>
</template>
</el-form>
<el-form ref="form" label-width="80px" class="vd-form-row" v-if="planOpenSj">
<template v-for="(item, index) in prWorkPlanList" :key="index">
<el-form-item :label="'工序'+item.orders">
<el-checkbox v-model="checkedList[index]" :label="item.procedureSet.ppsName" border size="small" />
</el-form-item>
</template>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="previewOpen = false"> </el-button>
@ -109,6 +114,8 @@
<print-dialog v-if="showPrint" :show-print="showPrint" :rbChecked="rbChecked" :checked-list="checkedList"
:printType="printType" :woId="checkWoId"
@closeDialog="closeDialog"></print-dialog>
<print-sj-dialog v-if="showSjPrint" :show-print="showSjPrint" @closeDialog="closeDialog"
:planList="checkedList" :checkRow="checkRow"></print-sj-dialog>
</basic-container>
</template>
@ -117,10 +124,12 @@ import {getList,getProcessList} from "@/api/qualityManagement/inspectionArchivin
import { mapGetters } from 'vuex';
import website from '@/config/website';
import printDialog from './printDialog.vue';
import printSjDialog from './printSjDialog.vue';
export default {
components:{
printDialog
printDialog,
printSjDialog
},
data() {
return {
@ -706,13 +715,16 @@ export default {
],
},
planOpenSj:false,
showSjPrint:false,
data: [],
prWorkPlanList:[],
dialogType:1,
prWorkChecked:[],
rbChecked:[true,false,false,false],
printType:'',
checkWoId:''
checkWoId:'',
checkRow:{}
};
},
computed: {
@ -727,9 +739,15 @@ export default {
},
methods: {
submitPrint(){
this.previewOpen = false
this.printType = '热表'
this.showPrint = true
if(this.planOpenSj){
this.previewOpen = false
this.showSjPrint = true
}else{
this.previewOpen = false
this.printType = '热表'
this.showPrint = true
}
},
printPreview(val,type){
this.dialogType = type
@ -738,30 +756,64 @@ export default {
},
closeDialog(){
this.showPrint = false
this.showSjPrint = false
this.previewOpen = false
},
sjPrint(row){
this.checkedList = []
this.prWorkPlanList = []
this.checkRow = row
// if(row.yieldType == 2){
getProcessList({
woId:'2019646268865155074'
// woId:row.woId
}).then(res =>{
res.data.data.forEach(ele =>{
this.prWorkPlanList.push({
orders:ele.ppsCode,
procedureSet:{
ppsName:ele.ppsName
}
})
})
this.checkedList = []
for(let i = 0;i<this.prWorkPlanList.length;i++){
this.checkedList.push(true)
}
this.dialogType = null
this.planOpenSj = true
this.previewOpen = true
})
// }else{
// this.showSjPrint = true
// }
},
rbPrint(row,type){
this.dialogType = type
this.planOpenSj = false
this.prWorkPlanList = []
this.checkWoId = '2019646268865155074'
// getProcessList({
// woId:'2019646268865155074'
// }).then(res =>{
// console.log('res==========',res)
// res.data.data.forEach(ele =>{
// this.prWorkPlanList.push({
// orders:ele.ppsCode,
// procedureSet:{
// ppsName:ele.ppsName
// }
// })
// })
// this.checkedList = []
// for(let i = 0;i<this.prWorkPlanList.length;i++){
// this.checkedList.push(true)
// }
this.checkedList = []
// this.checkWoId = '2019646268865155074'
this.woId = row.woId
getProcessList({
// woId:'2019646268865155074'
woId:row.woId
}).then(res =>{
console.log('res==========',res)
res.data.data.forEach(ele =>{
this.prWorkPlanList.push({
orders:ele.ppsCode,
procedureSet:{
ppsName:ele.ppsName
}
})
})
this.checkedList = []
for(let i = 0;i<this.prWorkPlanList.length;i++){
this.checkedList.push(true)
}
this.previewOpen = true
// })
})
},
inspectionRecord(row){
console.log('row=============',row)

@ -58,7 +58,7 @@
<tr v-if="index != 0" style="height: 20px;"></tr>
<tr>
<td colspan="9" style="font-size:16px;">
{{item.orders}} - {{item.ppsName}} 工序详情
{{item.orders}} - {{item.procedureSet.ppsName}} 工序详情
</td>
</tr>
<tr v-if="item.selfInspection && JSON.stringify(item.selfInspection) != '{}'">
@ -87,15 +87,29 @@
<td colspan="1" v-if="item.procedureSet.ppsName=='荧光检测'">
{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}
</td>
<td colspan="4" v-if="item.procedureSet.ppsName=='荧光检测'">曹鹏飞/2025-06-28</td>
<td v-else>{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}</td>
<template v-if="item.procedureSet.ppsName=='荧光检测'">
<td colspan="4"><img :src="testManImg(index) ? testManImg(index):'/'" style="width:70px;height:25px;margin:6px 0 6px 0"></br>{{ item.factEndTime || '/' }}</td>
</template>
<td colspan="4" v-else>
<!-- {{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : (testMan(index) ? (testMan(index) + ' / '+item.factEndTime):'/') }} -->
曹鹏飞1/2025-06-28
</td>
</tr>
<tr v-else>
<td :colspan="!item.jyy ? '4' : '1'">操作者</td>
<td :colspan="!item.jyy ? '5' : '4'">{{item.createMan || '/'}}</td>
<td colspan="1">操作者</td>
<td colspan="4">{{item.createMan || '/'}}</td>
<td colspan="1" v-if="item.procedureSet.ppsName=='荧光检测'">
{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}
</td>
<td colspan="3" v-if="item.procedureSet.ppsName=='荧光检测'">曹鹏飞/2025-06-28</td>
<td v-else>{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}</td>
<template v-if="item.procedureSet.ppsName=='荧光检测'">
<td colspan="3"><img :src="testManImg(index) ? testManImg(index):'/'" style="width:70px;height:25px;margin:6px 0 6px 0"></br>{{ item.factEndTime || '/' }}</td>
</template>
<td colspan="3" v-else>
<!-- {{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : (testMan(index) ? (testMan(index) + ' / '+item.factEndTime):'/') }} -->
曹鹏飞2/2025-06-28
</td>
</tr>
<tr v-if="item.deviceCode && item.deviceCode != ''">
<td colspan="1">设备编号</td>
@ -103,7 +117,7 @@
<td colspan="1">有效期</td>
<td colspan="3"></td>
</tr>
<tr v-if="item.tankInfo && JSON.stringify(item.tankInfo) != {}">
<tr v-if="item.slotList && item.slotList.length>0">
<td colspan="9" >同槽信息</td>
</tr>
<tr v-if="item.tankInfo && JSON.stringify(item.tankInfo) != {}">
@ -114,7 +128,7 @@
<td colspan="1">挂具面积(dm²)</td>
<td colspan="3">{{item.tankInfo.gjArea}}</td>
</tr>
<template v-if="item.tankInfo && JSON.stringify(item.tankInfo) != {} && item.tankInfo.slotList && item.tankInfo.slotList.length != 0">
<template v-if="item.slotList && item.slotList.length>0">
<tr>
<td colspan="1">同槽编号</td>
<td colspan="2">零件号</td>
@ -124,8 +138,8 @@
<td>面积(dm²)</td>
<td colspan="2">总面积(dm²)</td>
</tr>
<tr v-for="(slot,index) in item.tankInfo.slotList">
<td v-if="index === 0" :rowspan="item.tankInfo.slotList.length">{{slot.mtnCode || '/'}}</td>
<tr v-for="(slot,index) in item.slotList">
<td v-if="index === 0" :rowspan="item.slotList.length">{{slot.mtnCode || '/'}}</td>
<td v-if="!slot.cdj" colspan="2">{{slot.partCode || '/'}}</td>
<td v-if="!slot.cdj" colspan="1">{{slot.batchNo || '/'}}</td>
<td v-if="!slot.cdj" >{{slot.workQty || '/'}}</td>
@ -133,7 +147,7 @@
<td v-if="!slot.cdj" >{{slot.area || '/'}}</td>
<td v-if="slot.cdj" colspan="5">{{slot.cdj}}</td>
<td v-if="slot.cdj">{{slot.cdjArea}}</td>
<td v-if="index === 0" :rowspan="item.tankInfo.slotList.length" colspan="2">{{slot.sumArea || '/'}}</td>
<td v-if="index === 0" :rowspan="item.slotList.length" colspan="2">{{slot.sumArea || '/'}}</td>
</tr>
</template>
<template v-if="item.dsRbFilePreserveSlotList && item.dsRbFilePreserveSlotList.length>0">
@ -540,17 +554,44 @@ export default {
}
},
created(){
console.log('check---------',this.checkedList)
console.log('printType---------',this.printType)
const { modelOne, modelTwo, modelThree, modelFour, modelFive } =
printOrderJson.data;
this.modelOne = modelOne
this.modelTwo = modelTwo
console.log('modelOne----------',this.modelOne)
console.log('modelTwo----------',this.modelTwo)
this.modelThree = modelThree
getWordDetail({
woId:this.woId,
moduleList:this.rbChecked,
planList:this.checkedList
}).then(res =>{
console.log('res----------',res)
})
},
methods:{
//
testMan(index) {
let testWorkPlan = null;
for (var i = index; i < this.modelTwo.length; i++) {
if (this.modelTwo[i].procedureSet.ppsName.indexOf('检验') != -1) {
if (testWorkPlan == null) {
testWorkPlan = this.modelTwo[i];
if (this.modelThree && this.modelThree.checkList) {
const item = this.modelThree.checkList.find(
(item) =>
item.testOrders.indexOf(testWorkPlan.orders + '-') != -1
);
let checkInfo = this.modelTwo[i].procedureSet.ppsName=='荧光检测'?item.imgUrl:item.checkName
return checkInfo;
} else {
return null;
}
}
}
}
},
getTemplateComponent(type) {
const componentName = getTemplateComponent(type);
return componentName;
@ -676,13 +717,17 @@ export default {
}
table {
width: 100%;
table-layout: fixed;
tr {
width: 100%;
// table-layout: fixed;
page-break-inside: avoid;
break-inside: avoid;
// break-inside: avoid;
}
td {
width: 11.1%;
// width: 11.1%;
width: 168px;
height: 30px;
border: 1px solid #000;
background: transparent;
@ -752,13 +797,31 @@ export default {
table {
width: 98% !important;
table-layout: fixed;
border-collapse: collapse;
tr {
page-break-inside: avoid;
break-inside: avoid;
// break-inside: avoid;
td {
width: 8.1%;
// &:first-child{
// width: 55px;
// }
}
}
}
.print-table,
.print-table td,
.print-table th {
border-collapse: collapse !important;
box-sizing: border-box !important;
page-break-inside: avoid !important;
}
}
}
</style>

@ -4262,7 +4262,7 @@
"rfpsId": null,
"rfpsType": 7,
"slotIndex": 21.0,
"slotName": "34#溢流双水洗"
"slotName": "34#溢流双水洗22"
},
{
"childrenList": [
@ -28612,7 +28612,7 @@
"rfpsId": null,
"rfpsType": 7,
"slotIndex": 21.0,
"slotName": "34#溢流双水洗"
"slotName": "34#溢流双水洗33"
},
{
"childrenList": [
@ -50628,7 +50628,7 @@
"rfpsId": null,
"rfpsType": 7,
"slotIndex": 21.0,
"slotName": "34#溢流双水洗"
"slotName": "34#溢流双水洗1qqqq"
},
{
"childrenList": [
@ -65575,7 +65575,7 @@
"tempRange": null,
"tempSlot": null,
"vSpeed": null,
"workSlot": "35#溢流纯水洗"
"workSlot": "35#溢流纯水洗11"
},
{
"createMan": null,
@ -70149,7 +70149,7 @@
"rfpsId": null,
"rfpsType": 7,
"slotIndex": 21.0,
"slotName": "34#溢流双水洗"
"slotName": "34#溢流双"
},
{
"childrenList": [

@ -0,0 +1,568 @@
<template>
<el-dialog title="打印预览" append-to-body :modelValue="showPrint" fullscreen width="85%"
@close="closeDialog" :custom-class="isPrint ? 'noprint' : 'rbdyBox'">
<!-- @click="printData" -->
<el-button v-print="printConfig" type="primary" class="printButton no-print"> </el-button>
<div v-loading="loading" id="printMe" ref="printContent" class="printBox">
<!-- <div class="printTitle">
<div style="text-align:left;">JONHON受控</div>
<div style="width: 88%;text-align:center;">热表分厂质量记录卡</div>
</div> -->
<div class="fixTopLeft">JONHON受控</div>
<div class="printTitle">热表分厂质量记录卡</div>
<div class="tableNo">表号</div>
<table id="cus-table" cellspacing="0" style="width:100%">
<template v-if="dsPart!= null">
<tr>
<td colspan="1">零件号</td>
<td colspan="2">{{dsPart.partCode || '/'}}</td>
<td colspan="1">产品型号</td>
<td colspan="2">{{ dsPart.productType || '/' }}</td>
<td colspan="1">生产标识</td>
<td colspan="2">{{dsPart.prodIdent || '/'}}</td>
</tr>
<tr>
<td colspan="1">批次号</td>
<td colspan="1">{{dsPart.batchNo || '/'}}</td>
<td colspan="1">名称</td>
<td colspan="1">{{dsPart.partName || '/'}}</td>
<td colspan="1">是否印字</td>
<td colspan="1">{{dsPart.isWording || '/'}}</td>
<td colspan="1">数量</td>
<td colspan="2">{{ dsPart.qty || '/' }}</td>
</tr>
<tr>
<td colspan="1">壳体面积(dm²)</td>
<td colspan="1">{{dsPart.batchNo || '/'}}</td>
<td colspan="1">壳体材料</td>
<td colspan="1">{{dsPart.partName || '/'}}</td>
<td colspan="1">插针面积(dm²)</td>
<td colspan="1">{{dsPart.isWording || '/'}}</td>
<td colspan="1">插针材料</td>
<td colspan="2">{{ dsPart.qty || '/' }}</td>
</tr>
<tr>
<td colspan="1">壳体镀种</td>
<td colspan="5">{{dsPart.hardness || '/'}}</td>
<td colspan="1">插针镀种</td>
<td colspan="2">{{ dsPart.area || '/' }}</td>
</tr>
<tr>
<td colspan="1">镀种</td>
<td colspan="5">{{ dsPart.plate || '/' }}</td>
<td colspan="1">材料</td>
<td colspan="2">{{ dsPart.material || '/' }}</td>
</tr>
<tr>
<td colspan="1">工艺路线</td>
<td colspan="8">{{ dsPart.craftWay || '/' }}</td>
</tr>
<tr>
<td colspan="1">质量信息</td>
<td colspan="8">{{ dsPart.keyInfo || '/' }}</td>
</tr>
<tr>
<td colspan="1">色标色带</td>
<td colspan="8">{{ dsPart.keyInfo || '/' }}</td>
</tr>
</template>
<template v-if="prWorkPlanList && prWorkPlanList.length>0">
<tr>
<td colspan="9" style="font-size:21px;">生产过程</td>
</tr>
<template v-for="(item,index) in prWorkPlanList" >
<tr v-if="index != 0" style="height: 20px;"></tr>
<tr>
<td colspan="9" style="font-size:16px;">
{{item.orders}} - {{item.procedureSet.ppsName}} 工序详情
</td>
</tr>
<tr v-if="item.selfInspection && JSON.stringify(item.selfInspection) != '{}'">
<td colspan="1">自检</td>
<td colspan="4">{{item.selfInspection.content}}</td>
<td colspan="1">结论</td>
<td colspan="3">{{item.selfInspection.conclusion}}</td>
</tr>
<template v-if="item.auditFile && JSON.stringify(item.auditFile) != '{}'">
<tr>
<td colspan="5">工艺文件编号/版本号</td>
<td colspan="4">{{item.auditFile.papers || '/'}}</td>
</tr>
<tr>
<td colspan="5">CPS文件编号/版本号</td>
<td colspan="4">{{item.auditFile.referenceFile || '/'}}</td>
</tr>
</template>
<tr v-if="item.procedureSet.ppsName == '玻璃封接组装' || item.procedureSet.ppsName == '玻璃封接卸模' || item.procedureSet.ppsName == '玻璃封接(链式炉)'">
<td colspan="1">操作者</td>
<td colspan="1">{{item.createMan || '/'}}</td>
<td colspan="1" v-if="item.qualifiedQty">数量</td>
<td colspan="1" v-if="item.qualifiedQty">{{item.qualifiedQty}}</td>
<td colspan="1" v-if="item.fbCode">飞拔编号</td>
<td colspan="1" v-if="item.fbCode">{{item.fbCode}}</td>
<td colspan="2">检验员确认</td>
<td colspan="3">曹鹏飞1/2025-06-28</td>
</tr>
<!-- <tr v-if="(item.gjCode && !item.fbCode && !item.deviceCode) || item.fbCode">
<td colspan="1">操作者</td>
<td colspan="1">{{item.createMan || '/'}}</td>
<td colspan="1" v-if="item.gjCode && !item.fbCode && !item.deviceCode ">挂具编号</td>
<td colspan="1" v-if="item.gjCode && !item.fbCode && !item.deviceCode">{{item.gjCode || '/'}}</td>
<td colspan="1" v-if="item.fbCode">飞拔编号</td>
<td colspan="1" v-if="item.fbCode">{{item.fbCode || '/'}}</td>
<td colspan="1" v-if="item.procedureSet.ppsName=='荧光检测'">
{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}
</td>
<td v-else>{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}</td>
<template v-if="item.procedureSet.ppsName=='荧光检测'">
<td colspan="4"><img :src="testManImg(index) ? testManImg(index):'/'" style="width:70px;height:25px;margin:6px 0 6px 0"></br>{{ item.factEndTime || '/' }}</td>
</template>
<td colspan="4" v-else>
曹鹏飞1/2025-06-28
</td>
</tr>
<tr v-else>
<td colspan="1">操作者</td>
<td colspan="4">{{item.createMan || '/'}}</td>
<td colspan="1" v-if="item.procedureSet.ppsName=='荧光检测'">
{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}
</td>
<td v-else>{{ (item.procedureSet.ppsName.indexOf('检验') != -1 || item.procedureSet.ppsName == '镀后接收') ? '/' : '检验员确认' }}</td>
<template v-if="item.procedureSet.ppsName=='荧光检测'">
<td colspan="3"><img :src="testManImg(index) ? testManImg(index):'/'" style="width:70px;height:25px;margin:6px 0 6px 0"></br>{{ item.factEndTime || '/' }}</td>
</template>
<td colspan="3" v-else>
曹鹏飞2/2025-06-28
</td>
</tr> -->
<tr v-if="item.deviceCode && item.deviceCode != ''">
<td colspan="1">设备编号</td>
<td colspan="3">{{item.deviceCode || '/'}}</td>
<td colspan="2">有效期</td>
<td colspan="3"></td>
</tr>
<template v-if="item.procedureSet.ppsName == '玻璃封接(链式炉)'">
<tr>
<td>数量</td>
<td>封接温度/</td>
<td colspan="2">入炉时间</td>
<td colspan="2">出炉时间</td>
<td colspan="3">链速</td>
</tr>
<template v-if="item.totalPrList>0 && item.prList.length>0">
<tr v-for="(prLItem,prLIndex) in item.prList" :key="Math.floor(Math.random()*100000)+1+prWpIndex+prLIndex">
<td>{{prLItem.dataThree}}</td>
<td>{{prLItem.tempSlot}}</td>
<td colspan="2">{{prLItem.inDate}}</td>
<td colspan="2">{{prLItem.outDate}}</td>
<td colspan="3">{{prLItem.vSpeed}}</td>
</tr>
</template>
</template>
<tr v-if="item.slotList && item.slotList.length>0">
<td colspan="9" >同槽信息</td>
</tr>
<tr v-if="item.tankInfo && JSON.stringify(item.tankInfo) != {}">
<td colspan="1">掺镀件面积(dm²)</td>
<td colspan="2">{{item.tankInfo.cdjArea}}</td>
<td colspan="1">陪镀件面积(dm²)</td>
<td colspan="1">{{item.tankInfo.pdjArea}}</td>
<td colspan="1">挂具面积(dm²)</td>
<td colspan="3">{{item.tankInfo.gjArea}}</td>
</tr>
<template v-if="item.slotList && item.slotList.length>0">
<tr>
<td colspan="1">同槽编号</td>
<td colspan="2">零件号</td>
<td colspan="1">批次号</td>
<td>数量</td>
<td>生产标识</td>
<td>面积(dm²)</td>
<td colspan="2">总面积(dm²)</td>
</tr>
<tr v-for="(slot,index) in item.slotList">
<td v-if="index === 0" :rowspan="item.slotList.length">{{slot.mtnCode || '/'}}</td>
<td v-if="!slot.cdj" colspan="2">{{slot.partCode || '/'}}</td>
<td v-if="!slot.cdj" colspan="1">{{slot.batchNo || '/'}}</td>
<td v-if="!slot.cdj" >{{slot.workQty || '/'}}</td>
<td v-if="!slot.cdj" >{{slot.prodIdent || '/'}}</td>
<td v-if="!slot.cdj" >{{slot.area || '/'}}</td>
<td v-if="slot.cdj" colspan="5">{{slot.cdj}}</td>
<td v-if="slot.cdj">{{slot.cdjArea}}</td>
<td v-if="index === 0" :rowspan="item.slotList.length" colspan="2">{{slot.sumArea || '/'}}</td>
</tr>
</template>
<template v-if="item.dsRbFilePreserveSlotList && item.dsRbFilePreserveSlotList.length>0">
<tr >
<td colspan="1">槽位/工步</td>
<td colspan="4">工艺要求</td>
<td colspan="4">实际参数</td>
</tr>
<template v-for="(itemSlot, indexSlot) in item.dsRbFilePreserveSlotList" :key="itemSlot.slotName + indexSlot">
<component
:is="getTemplateComponent(itemSlot.rfpsType)"
:itemSlot="itemSlot"
:indexSlot="indexSlot"
:quality="true"
/>
</template>
</template>
</template>
</template>
</table>
</div>
</el-dialog>
</template>
<script>
import {getBurnDetail} from '@/api/qualityManagement/inspectionArchiving/eRecord'
import Templates from "@/views/qualityTemplate/index.js";
import { getTemplateComponent } from '@/utils/templateMapper.js';
import glassSealing from "./json/glassSealing"
export default {
props:{
showPrint: {
type: Boolean,
default: false
},
checkedList: {
type: Array,
default: () => []
},
printType:{
type:String,
default:''
},
woId:{
type:String,
default:''
},
rbChecked:{
type:Array,
default:() =>[]
},
planList:{
type:Array,
default:() =>[]
},
checkRow:{
type:Object,
default:() =>{}
}
},
components: {
...Templates,
},
data(){
return{
// printObj: {
// id: 'printMe',
// popTitle: '66',
// ignoreClass: 'noprint',
// endCallback: (e) => {
// console.log(e, 5555);
// }
// },
printConfig :{
id: 'printMe',
extraCss: 'https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css',
extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
// preview: true,
},
dsPart:{},
prWorkPlanList:[],
modelOne: {},
isPrint:false,
modelTwo: [],
modelThree: { checkList: [], procedureSet: {}},
modelFour: { procedureSet: {}, prWorkOrder: { pjYieldOrder: {}}},
}
},
created(){
console.log('check---------',this.checkedList)
console.log('printType---------',this.printType)
// const {sunPrWorkOrderList,prWorkPlanList,prWorkOrder,dsPart,qcReviewSheetList} =
// glassSealing.data
// this.dsPart = dsPart
// this.prWorkPlanList = prWorkPlanList
// console.log('prWorkPlanList=======',this.prWorkPlanList)
getBurnDetail({
"woId":'2019646268865155074',
// woId:this.checkRow.woId,
"yieldType":2,
// yieldType:this.checkRow.yieldType,
"planList":this.planList,
"moduleList":[true]
}).then(res =>{
console.log('res==========',res)
this.dsPart = res.data.data.dsPart
this.prWorkPlanList = res.data.data.prWorkPlanList
})
},
methods:{
//
testMan(index) {
let testWorkPlan = null;
for (var i = index; i < this.modelTwo.length; i++) {
if (this.modelTwo[i].procedureSet.ppsName.indexOf('检验') != -1) {
if (testWorkPlan == null) {
testWorkPlan = this.modelTwo[i];
if (this.modelThree && this.modelThree.checkList) {
const item = this.modelThree.checkList.find(
(item) =>
item.testOrders.indexOf(testWorkPlan.orders + '-') != -1
);
let checkInfo = this.modelTwo[i].procedureSet.ppsName=='荧光检测'?item.imgUrl:item.checkName
return checkInfo;
} else {
return null;
}
}
}
}
},
getTemplateComponent(type) {
const componentName = getTemplateComponent(type);
return componentName;
},
printData(){
// exportEchartsToPdf('printMe','')
// window.print()
const overflowInfo = this.checkPrintOverflow();
console.log('打印页数:', overflowInfo.pageCount);
if (overflowInfo.isOverflow) {
this.addPageBreaks();
}
window.print();
//
setTimeout(() => {
this.removePageBreaks();
}, 1000);
},
closeDialog(){
this.$emit('closeDialog');
},
// A4
checkPrintOverflow() {
const A4_HEIGHT = 297; // A4 (mm)
const PRINT_MARGIN = 20; // (mm)
// const AVAILABLE_HEIGHT = (A4_HEIGHT - PRINT_MARGIN) * 3.78; // (1mm 3.78px)
const AVAILABLE_HEIGHT = 880
console.log('AVA============',AVAILABLE_HEIGHT)
const printContent = this.$refs.printContent;
console.log('dom-----------',document.getElementById('printMe'))
console.log('hei-------',document.getElementById('printMe').offsetHeight)
console.log('prine---------',printContent)
if (!printContent) return false;
const contentHeight = printContent.scrollHeight;
const pageCount = Math.ceil(contentHeight / AVAILABLE_HEIGHT);
console.log('cont-------------',contentHeight)
console.log('pageCount-------------',pageCount)
return {
isOverflow: contentHeight > AVAILABLE_HEIGHT,
pageCount,
contentHeight,
availableHeight: AVAILABLE_HEIGHT
};
},
//
addPageBreaks() {
const A4_HEIGHT_PX = 1123; // A4 ( 297mm - 20mm )
const table = document.getElementById('cus-table');
if (!table) return;
const rows = table.querySelectorAll('tr');
let currentHeight = 0;
let page = 1;
rows.forEach((row, index) => {
const rowHeight = row.offsetHeight;
currentHeight += rowHeight;
//
if (currentHeight > A4_HEIGHT_PX * page && index > 0) {
row.style.pageBreakBefore = 'always';
page++;
//
this.insertPageBreakRow(table, row, page);
}
});
},
//
insertPageBreakRow(table, referenceRow, pageNum) {
const pageBreakRow = document.createElement('tr');
pageBreakRow.className = 'page-break-tip';
pageBreakRow.innerHTML = `
<td colspan="12" style="text-align:right;font-size:12px;color:#666;">
--- ${pageNum} ---
</td>
`;
referenceRow.parentNode.insertBefore(pageBreakRow, referenceRow);
},
//
removePageBreaks() {
const pageBreakTips = document.querySelectorAll('.page-break-tip');
pageBreakTips.forEach(tip => tip.remove());
const rows = document.querySelectorAll('#cus-table tr');
rows.forEach(row => {
row.style.pageBreakBefore = '';
});
},
}
}
</script>
<style lang="scss" >
.printButton {
float: right;
margin-right: 8px;
margin-top: 16px;
}
.printBox {
width: 100%;
padding: 6px;
text-align: center;
.printTitle {
font-size: 22px;
font-weight: 700;
padding: 8px;
color:#606266
// margin-bottom: 6px;
}
.tableNo{
text-align: right;
margin-bottom: 10px;
}
table {
width: 100%;
table-layout: fixed;
tr {
width: 100%;
// table-layout: fixed;
page-break-inside: avoid;
// break-inside: avoid;
}
td {
// width: 11.1%;
width: 168px;
height: 30px;
border: 1px solid #000;
background: transparent;
color: #000;
font-size: 14px;
text-align: center;
padding: 0;
margin: 0;
}
//
.page-break-tip {
page-break-before: always;
break-before: always;
height: 20px;
border: none !important;
}
}
}
.fixTopLeft{
// position: fixed;
float: left;
top: 1;
left: 0;
font-family: 'SimHei';
font-size: 24px;
color: black;
}
@media print {
/* 隐藏不需要打印的元素:按钮、导航栏、侧边栏等 */
.no-print, header, footer, .sidebar, button {
display: none !important;
}
@page {
size: auto;
margin: 6mm;
}
}
// @media print { @page { size:21cm 29.7cm } }
</style>
<style lang="scss">
@media print {
.no-print {
display: none !important;
}
.print-btn {
display: none !important;
}
body {
margin: 0;
// padding: 20px;
// font-size: 12pt;
background: white !important;
}
@page {
size: auto;
margin: 6mm;
}
.printBox {
width: 100% !important;
overflow: visible !important;
table {
width: 98% !important;
table-layout: fixed;
border-collapse: collapse;
tr {
page-break-inside: avoid;
// break-inside: avoid;
td {
width: 8.1%;
// &:first-child{
// width: 55px;
// }
}
}
}
.print-table,
.print-table td,
.print-table th {
border-collapse: collapse !important;
box-sizing: border-box !important;
page-break-inside: avoid !important;
}
}
}
</style>

@ -274,7 +274,8 @@ export const erpOption = {
column: [
{
label: '审理单号',
prop: 'rsCode',
// prop: 'rsCode',
prop: 'sheetNo',
// bind: 'dsPart.partCode',
search: true,
sortable: true,
@ -284,7 +285,8 @@ export const erpOption = {
},
{
label: '责任零件',
prop: 'dutyPart',
// prop: 'dutyPart',
prop:'p5layer1',
// bind: 'dsPart.partCode',
search: true,
sortable: true,
@ -295,7 +297,8 @@ export const erpOption = {
{
label: '责任批号',
prop: 'dutyBatNo',
// prop: 'dutyBatNo',
prop: 'p5layer3',
// bind: 'dsPart.plate',
search: true,
sortable: true,
@ -305,7 +308,8 @@ export const erpOption = {
},
{
label: '工序号',
prop: 'processNo',
prop: 'process',
// prop: 'processNo',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -316,6 +320,7 @@ export const erpOption = {
{
label: '工序名称',
prop: 'processName',
// prop: 'processName',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -325,7 +330,8 @@ export const erpOption = {
},
{
label: '上级编号',
prop: 'upCode',
prop: 'precode',
// prop: 'upCode',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -335,7 +341,8 @@ export const erpOption = {
},
{
label: '返修路线',
prop: 'reDoPath',
prop: 'reworkLine',
// prop: 'reDoPath',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -345,7 +352,8 @@ export const erpOption = {
},
{
label: '发生单位',
prop: 'ngOrg',
prop: 'deptcode',
// prop: 'ngOrg',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -355,7 +363,8 @@ export const erpOption = {
},
{
label: '责任部门',
prop: 'dutyDeptName',
prop: 'layer1',
// prop: 'dutyDeptName',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -365,7 +374,8 @@ export const erpOption = {
},
{
label: '审理人',
prop: 'reviewUserRealName',
prop: 'usercode',
// prop: 'reviewUserRealName',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -376,6 +386,7 @@ export const erpOption = {
{
label: '零件号',
prop: 'partCode',
// prop: 'partCode',
// bind: 'dsPart.plate',
search: false,
sortable: true,
@ -385,7 +396,8 @@ export const erpOption = {
},
{
label: '批次号',
prop: 'batchNo',
prop: 'lotno',
// prop: 'batchNo',
// bind: 'dsPart.plate',
search: false,
sortable: true,

@ -32,9 +32,9 @@ export default {
data() {
return {
accessData: [
{ name: '工序接收', url: 'plan', page: '/taskCope' },
{ name: '工序报工', url: 'rule', page: '/workReport' },
{ name: '工序检验', url: 'product',page:'/workCheck' },
{ name: '工序接收', url: 'plan', page: '/zhgd-work/taskCope' },
{ name: '工序报工', url: 'rule', page: '/workReport/index' },
{ name: '工序检验', url: 'product',page:'/workCheck/index' },
// { name: '', url: 'craft' },
// { name: '', url: 'quality' },
],

Loading…
Cancel
Save