| | |
| | | import {multiply,multiplyAuto,divideAuto} from '@/utils/decimal' |
| | | import OrderNumberReportTransfer from "@/components/sd/order/OrderNumberReportTransfer.vue" |
| | | import UploadPicture from "@/components/sd/order/UploadPicture.vue" |
| | | import ProcessAttribute from "@/components/sd/order/ProcessAttribute.vue" |
| | | const { t } = useI18n() |
| | | |
| | | let dialogTableVisible = ref(false) |
| | |
| | | let dialogTransferVisible = ref(false) |
| | | let uploadPictureVisible = ref(false) |
| | | let alienEditorVisible = ref(false) |
| | | let fileUploadVisible = ref(false) |
| | | let processAttributeVisible = ref(false) |
| | | const transferData = ref({ |
| | | oldOrderId:null, |
| | | newOrderNumber:null, |
| | |
| | | const shapeList = ref([ |
| | | {label:t('order.universalShape'),value:'1'}, {label:t('order.alien'),value:'2'} |
| | | ]) |
| | | |
| | | const newOrderId = ref([]) |
| | | |
| | | const orderTypeState = ref(0) |
| | | |
| | | // 定义表头上传数据 |
| | | const titleUploadData = ref({ |
| | |
| | | orderClassify:[], |
| | | packType:[], |
| | | customer:[], |
| | | saleMan:[] |
| | | saleMan:[], |
| | | edgingType:[] |
| | | }) |
| | | let filterData = ref({}) |
| | | let rowIndex = ref(null) |
| | |
| | | { code: 'sizeCheck', name: t('basicData.sizeReview'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }, |
| | | { code: 'updateOrderId', name: t('searchOrder.updateOrderId'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }, |
| | | { code: 'reportingTransfer', name: t('searchOrder.reportingTransfer'), prefixIcon: 'vxe-icon-send', visible: true, disabled: true }, |
| | | { code: 'uploadPicture', name: t('order.graphic'),prefixIcon: 'vxe-icon-picture-fill', visible: true, } |
| | | { code: 'uploadPicture', name: t('order.graphic'),prefixIcon: 'vxe-icon-picture-fill', visible: true, }, |
| | | { code: 'fileUpload', name: t('order.fileUpload'),prefixIcon: 'vxe-icon-picture-fill', visible: true, } |
| | | ] |
| | | ] |
| | | } |
| | |
| | | filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter',edit:'shape_edit',default:'default_shape' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'bendRadius',width:160, title: t('order.bendRadius'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'edgingType',width:160, title: t('order.edgingType'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'edgingType',width:160, title: t('order.edgingType'),filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | { |
| | | field: 'processAttribute', |
| | | width: 160, |
| | | title: t('craft.processAttribute'), |
| | | filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged |
| | | }, |
| | | {field: 'processingNote',width:200, title: t('order.processingNote'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'fileName',width:200, title: t('order.drawingNo'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'remarks',width:140, title: t('basicData.remarks'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | orderIdType:company.orderIdType, |
| | | creator:userStore.user.userName, |
| | | creatorId:userStore.user.userId, |
| | | newOrderId:newOrderId.value |
| | | newOrderId:newOrderId.value, |
| | | position:company.position, |
| | | orderIdTypeLetter:company.orderIdTypeLetter, |
| | | orderIdTypeMantissa:company.orderIdTypeMantissa |
| | | } |
| | | const grossAreaList = $grid.getTableData().fullData.filter( |
| | | item=>item.grossArea === 0 |
| | |
| | | item["productName"] = val1 |
| | | } |
| | | }) |
| | | }else if(result.cell=='processAttribute'){ |
| | | const val = dataList[result.start][result.cell] |
| | | const val1 = dataList[result.start]["edgingType"] |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = val |
| | | item["edgingType"] = val1 |
| | | } |
| | | }) |
| | | }else if(result.cell=='edgingType'){ |
| | | const val = dataList[result.start][result.cell] |
| | | const val1 = dataList[result.start]["processAttribute"] |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = val |
| | | item["processAttribute"] = val1 |
| | | } |
| | | }) |
| | | }else{ |
| | | |
| | | const val = getNestedProperty(dataList[result.start],result.cell) |
| | |
| | | item["productName"] = val1 |
| | | } |
| | | }) |
| | | }else if(result.cell=='processAttribute'){ |
| | | const val = dataList[result.start][result.cell] |
| | | const val1 = dataList[result.start]["edgingType"] |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | item[result.cell] = val |
| | | item["edgingType"] = val1 |
| | | } |
| | | }) |
| | | }else if(result.cell=='edgingType'){ |
| | | const val = dataList[result.start][result.cell] |
| | | const val1 = dataList[result.start]["processAttribute"] |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | item[result.cell] = val |
| | | item["processAttribute"] = val1 |
| | | } |
| | | }) |
| | | }else{ |
| | | const val = getNestedProperty(dataList[result.start],result.cell) |
| | | dataList.forEach((item,index) =>{ |
| | |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = '' |
| | | } |
| | | }) |
| | | if(result.cell=='processAttribute'){ |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = '' |
| | | item['edgingType'] = '' |
| | | } |
| | | }) |
| | | }else if(result.cell=='edgingType'){ |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = '' |
| | | item['processAttribute'] = '' |
| | | } |
| | | }) |
| | | }else{ |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = '' |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | computedMoney(result.cell) |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | |
| | | return |
| | | } |
| | | rowIndex=row |
| | | alienEditorVisible.value= true |
| | | alienEditorVisible.value=true |
| | | break |
| | | } |
| | | case 'fileUpload':{ |
| | | const row = xGrid.value.getCurrentRecord() |
| | | if(row===null){ |
| | | ElMessage.warning(t('components.pleaseClickToSelectARowFirst')) |
| | | return |
| | | } |
| | | rowIndex=row |
| | | fileUploadVisible.value=true |
| | | break |
| | | } |
| | | |
| | | } |
| | |
| | | }, |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row,column } = params |
| | | if(column.field==='productName' || column.field==='productId'){ |
| | | if (column.field === 'processAttribute'||column.field === 'edgingType') { |
| | | rowIndex = row |
| | | processAttributeVisible.value = true |
| | | } else if (column.field === 'productName' || column.field === 'productId') { |
| | | // 保留原产品选择逻辑 |
| | | productVisible.value = true |
| | | rowIndex=row |
| | | rowIndex = row |
| | | } |
| | | |
| | | }, |
| | |
| | | titleUploadData.value['verifierId'] = null |
| | | titleUploadData.value['verifier'] = null |
| | | |
| | | |
| | | const orderDetails = res.data.orderDetails |
| | | orderDetails.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | |
| | | titleUploadData.value['version'] = null |
| | | } |
| | | if(history.state.type=='copyTitle'){ |
| | | gridOptions.menuConfig.body.options[0][11].disabled = tru |
| | | gridOptions.menuConfig.body.options[0][11].disabled = true |
| | | titleUploadData.value['version'] = null |
| | | } |
| | | |
| | |
| | | if(res.data.order.processReview === 2 && res.data.order.orderReview === 0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | //gridOptions.menuConfig.body.options[0][8].disabled =false |
| | | } |
| | | |
| | | //下单后工艺审核之前可以右键上传dwg文件 |
| | | if(res.data.order.createOrder === 2 && res.data.order.processReview === 0){ |
| | | orderTypeState.value=1 |
| | | } |
| | | |
| | | //按钮审核过后变为反审 |
| | |
| | | |
| | | }) |
| | | } |
| | | |
| | | //进入页面下拉框设置默认值 |
| | | titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName |
| | | titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].basicName |
| | |
| | | } |
| | | if(evnt.$event.keyCode === 13 ){ |
| | | const { rowIndex,row,column } = xGrid.value.getSelectedCell() || xGrid.value.getEditRecord() |
| | | let nextRowIndex = xGrid.value.getRowIndex(row) + 1 |
| | | let nextRowIndex = xGrid.value.getVTRowIndex(row) + 1 |
| | | |
| | | |
| | | switch (column.field){ |
| | |
| | | } |
| | | |
| | | //图片上传名称 |
| | | const getUploadPicture = async (name, fileData) => { |
| | | const getUploadPicture = async (name, fileData,fileJson) => { |
| | | const row = xGrid.value.getCurrentRecord() |
| | | row.fileName = name |
| | | row.fileData = fileData |
| | | row.fileJson = fileJson |
| | | row.shape=2 |
| | | ElMessage.success("保存成功") |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | alienEditorVisible.value=false |
| | | |
| | | } |
| | |
| | | reader.readAsDataURL(file); |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | const getEdgingProcess = (value,edgingType) => { |
| | | rowIndex.processAttribute=JSON.stringify(value) |
| | | rowIndex.edgingType=edgingType |
| | | processAttributeVisible.value = false |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | </template> |
| | | |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <el-dialog v-model="dialogTableVisible" :draggable="true" :title="$t('order.processingNote')" style="width: 60%;height:75% "> |
| | |
| | | <order-number-report-transfer :transferData="transferData" @orderNumberTransfer="orderNumberTransfer"/> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="uploadPictureVisible" |
| | | <el-dialog id="loadDWG" |
| | | v-model="fileUploadVisible" |
| | | :close-on-click-modal="false" |
| | | destroy-on-close width="500"> |
| | | <upload-picture /> |
| | | destroy-on-close width="800px"> |
| | | <upload-picture |
| | | :rowIndex="rowIndex" |
| | | :orderId="titleUploadData.orderId" |
| | | :state="orderTypeState" |
| | | /> |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-dialog |
| | | v-model="processAttributeVisible" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | destroy-on-close |
| | | style="width: 1114px;height:650px "> |
| | | <process-attribute :rowIndex="rowIndex" |
| | | :edging-type-list="titleSelectJson" |
| | | @getEdgingProcess="getEdgingProcess" |
| | | /> |
| | | </el-dialog> |
| | | |
| | | |
| | |
| | | /*flex-direction : row; |
| | | justify-content: space-between;*/ |
| | | } |
| | | |
| | | :deep(#loadDWG .el-dialog__body){ |
| | | height: 70vh; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |