| | |
| | | |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | printList: [], |
| | | processName:[] |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | |
| | | request.post(`/processCard/getSelectPrintingRefund/${merge}/${like}/${mergeTechnologyNumber}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data) |
| | | data.processName = res.data.data[0].processNameList |
| | | //处理单片厚度 |
| | | |
| | | for (let j = 0; j < produceList.value.length; j++) { |
| | |
| | | produceList.value[j].detail[0].weight = sumWeight |
| | | } |
| | | //处理合并打印 |
| | | if (printMerge !== null && printMerge !== undefined && printMerge !== "") { |
| | | |
| | | produceList.value.forEach(item => { |
| | | item.detail[0].technologyNumber = printMerge; |
| | | }); |
| | | |
| | | //合并打印工艺流程处理 |
| | | if (like == null) { |
| | | let process = produceList.value[0].detail[0].process |
| | | let indexOfJiaJiao = process.indexOf('夹胶'); |
| | | if (indexOfJiaJiao !== -1) { |
| | | // 使用 substring 截取 "夹胶" 后面的部分,包括 "夹胶" 本身 |
| | | let afterJiaJiao = process.substring(indexOfJiaJiao).trim(); |
| | | produceList.value.forEach(item => { |
| | | item.detail[0].process = afterJiaJiao |
| | | }) |
| | | } |
| | | |
| | | let indexOfProceList = produceList.value[0].processList |
| | | let getProceList = indexOfProceList.findIndex(item => item.process === '夹胶'); |
| | | |
| | | if (getProceList !== -1) { |
| | | // 使用 filter 方法过滤出 "夹胶" 及其之后的对象 |
| | | produceList.value[0].processList = indexOfProceList.filter((item, index) => index >= getProceList); |
| | | } |
| | | } |
| | | } |
| | | // if (printMerge !== null && printMerge !== undefined && printMerge !== "") { |
| | | // |
| | | // produceList.value.forEach(item => { |
| | | // item.detail[0].technologyNumber = printMerge; |
| | | // }); |
| | | // |
| | | // //合并打印工艺流程处理 |
| | | // if (like == null) { |
| | | // let process = produceList.value[0].detail[0].process |
| | | // console.log(process) |
| | | // let indexOfJiaJiao = process.indexOf('夹胶'); |
| | | // if (indexOfJiaJiao !== -1) { |
| | | // // 使用 substring 截取 "夹胶" 后面的部分,包括 "夹胶" 本身 |
| | | // let afterJiaJiao = process.substring(indexOfJiaJiao).trim(); |
| | | // produceList.value.forEach(item => { |
| | | // item.detail[0].process = afterJiaJiao |
| | | // }) |
| | | // } |
| | | // |
| | | // let indexOfProceList = produceList.value[0].processList |
| | | // let getProceList = indexOfProceList.findIndex(item => item.process === '夹胶'); |
| | | // |
| | | // if (getProceList !== -1) { |
| | | // // 使用 filter 方法过滤出 "夹胶" 及其之后的对象 |
| | | // produceList.value[0].processList = indexOfProceList.filter((item, index) => index >= getProceList); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | |
| | | produceList.value.forEach(item => { |