| | |
| | | let dialogTransferVisible = ref(false) |
| | | let uploadPictureVisible = ref(false) |
| | | let alienEditorVisible = ref(false) |
| | | let fileUploadVisible = 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 edgingTypeList = ref([]) |
| | | 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: 'Upload Picture', visible: true, } |
| | | { code: 'uploadPicture', name: t('order.graphic'),prefixIcon: 'vxe-icon-picture-fill', visible: true, }, |
| | | { code: 'fileUpload', name: t('上传dwg文件'),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'),editRender: { name: 'input'},filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter',edit:'edgingType_edit' }, 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('文件名称'),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}, |
| | | |
| | | |
| | | ], |
| | | //表单验证 |
| | | editRules: { |
| | | edgingType: [ |
| | | { required: company.edgingType}, |
| | | { min: 0, max: 255, message: t('basicData.msg.max255') } |
| | | ], |
| | | buildingNumber: [ |
| | | { required: false}, |
| | | { min: 0, max: 255, message: t('basicData.msg.max255') } |
| | |
| | | orderIdType:company.orderIdType, |
| | | creator:userStore.user.userName, |
| | | creatorId:userStore.user.userId, |
| | | newOrderId:newOrderId.value |
| | | newOrderId:newOrderId.value, |
| | | position:company.position |
| | | } |
| | | const grossAreaList = $grid.getTableData().fullData.filter( |
| | | item=>item.grossArea === 0 |
| | | ) |
| | | //判断宽高相乘与字段结算面积是否相同 |
| | | |
| | | for (const i in $grid.getTableData().fullData) { |
| | | const item = $grid.getTableData().fullData[i] |
| | | const grossArea = multiplyAuto(countArea(item),1,2) |
| | | const itemGrossArea = multiplyAuto(item.grossArea,1,2) |
| | | if(itemGrossArea!== grossArea ){ |
| | | ElMessage.warning(`${t('order.OrderNum')} |
| | | ${Number(i)+1}${t('order.area')}: ${grossArea} != ${itemGrossArea}`) |
| | | return |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | const errorAreaList = $grid.getTableData().fullData.filter( |
| | | item=>(item.width*item.height/1000000 < errorArea.value*1) |
| | | ) |
| | |
| | | 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 |
| | | } |
| | | |
| | | } |
| | |
| | | gridOptions.loading = true |
| | | await initOrder(0) |
| | | |
| | | //异形导入 |
| | | if(!company.alienFunction){ |
| | | gridOptions.menuConfig.body.options[0][13].disabled=true |
| | | } |
| | | |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions) |
| | | let productData = route.query.produceList |
| | |
| | | newOrderId.value=titleUploadData.value.orderId |
| | | if(history.state.orderId!=null){ |
| | | titleUploadData.value.orderId='' |
| | | titleUploadData.value.id=null |
| | | titleUploadData.value.processReview=null |
| | | titleUploadData.value.orderReview=null |
| | | titleUploadData.value.productionOrder=null |
| | | titleUploadData.value.processingCard=null |
| | | titleUploadData.value.warehousing=null |
| | | titleUploadData.value.delivery=null |
| | | titleUploadData.value.createTime=null |
| | | titleUploadData.value['id']=null |
| | | titleUploadData.value['processReview']=null |
| | | titleUploadData.value['orderReview']=null |
| | | titleUploadData.value['productionOrder']=null |
| | | titleUploadData.value['processingCard']=null |
| | | titleUploadData.value['warehousing']=null |
| | | titleUploadData.value['delivery']=null |
| | | titleUploadData.value['createTime']=null |
| | | titleUploadData.value['verifierId'] = null |
| | | titleUploadData.value['verifier'] = null |
| | | |
| | | |
| | | const orderDetails = res.data.orderDetails |
| | | orderDetails.forEach(item => { |
| | |
| | | if(history.state.type=='copy'){ |
| | | xGrid.value.reloadData(orderDetails) |
| | | gridOptions.menuConfig.body.options[0][11].disabled = true |
| | | titleUploadData.value['version'] = null |
| | | } |
| | | if(history.state.type=='copyTitle'){ |
| | | gridOptions.menuConfig.body.options[0][11].disabled = true |
| | | titleUploadData.value['version'] = null |
| | | } |
| | | |
| | | gridOptions.loading = false |
| | |
| | | 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 |
| | | } |
| | | |
| | | //按钮审核过后变为反审 |
| | |
| | | |
| | | }) |
| | | } |
| | | titleSelectJson.value.edgingType.forEach(item=>{ |
| | | let type= {label:item.basicName,value:item.basicName} |
| | | edgingTypeList.value.push(type) |
| | | }) |
| | | //进入页面下拉框设置默认值 |
| | | titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName |
| | | titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].basicName |
| | |
| | | }).catch(()=>{ |
| | | if(titleUploadData.value.orderId.trim()!==""){ |
| | | ElMessageBox.alert(t('order.msg.updateOrderError'), 'Title', { |
| | | // if you want to disable its autofocus |
| | | // autofocus: false, |
| | | confirmButtonText: 'OK', |
| | | callback: (action: Action) => { |
| | | router.push({path:'/main/order/createOrder',query:{ |
| | |
| | | } |
| | | 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 |
| | | |
| | | } |
| | |
| | | <template #shape_edit="{ row }"> |
| | | <vxe-select v-model="row.shape" transfer :options="shapeList" placeholder=" "/> |
| | | </template> |
| | | <template #edgingType_edit="{ row }"> |
| | | <vxe-select v-model="row.edgingType" transfer :options="edgingTypeList" placeholder=" "/> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | destroy-on-close |
| | | style="width: 614px;height:470px "> |
| | | style="width: 1114px;height:600px "> |
| | | <update-alien-editor |
| | | ref="refAlienEditor" |
| | | :rowIndex="rowIndex" |
| | |
| | | <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> |
| | | |
| | | |
| | |
| | | /*flex-direction : row; |
| | | justify-content: space-between;*/ |
| | | } |
| | | |
| | | :deep(#loadDWG .el-dialog__body){ |
| | | height: 70vh; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |