| | |
| | | <script lang="ts" setup> |
| | | import {onMounted, reactive, ref, watch} from "vue" |
| | | import {nextTick, onMounted, reactive, ref, watch} from "vue" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import * as XLXS from "xlsx" |
| | | import {ElMessage, ElMessageBox} from "element-plus" |
| | | import {Action, ElMessage, ElMessageBox} from "element-plus" |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import SelectProduct from "@/views/sd/product/SelectProduct.vue" |
| | | import CreateProduct from "@/views/sd/product/CreateProduct.vue" |
| | | import CreateCustomer from "@/views/sd/customer/CreateCustomer.vue" |
| | | import OrderOtherMoney from "@/components/sd/order/OrderOtherMoney.vue" |
| | | import OrderSizeCheck from "@/components/sd/order/OrderSizeCheck.vue" |
| | | import UpdateAlienEditor from "@/components/sd/order/UpdateAlienEditor.vue" |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove" |
| | | import downLoadFile from "@/hook/downLoadFile" |
| | | import footSum from "@/hook/footSum" |
| | | import {useI18n} from "vue-i18n" |
| | | 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 errorAreaVisible = ref(false) |
| | | let otherMoneyVisible = ref(false) |
| | | let sizeCheckVisible = 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, |
| | | newOrderId:null, |
| | | oldOrderNumber:null, |
| | | }) |
| | | let orderIdVisible = ref(false) |
| | | const maxTableLen =ref(500) |
| | | let errorArea = ref(0.4) |
| | | const userStore = useUserInfoStore() |
| | | const company = companyInfo() |
| | | let errorArea = ref(company.errorArea) |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const xGrid = ref() |
| | |
| | | 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) |
| | |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true,gt:0 },//开启虚拟滚动 |
| | | scrollX:{ enabled: true,gt:0 },//开启虚拟滚动 |
| | | virtualXConfig:{ enabled: true,gt:0 },//开启虚拟滚动 |
| | | virtualYConfig:{ enabled: true,gt:0 },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | menuConfig: { |
| | | body: { |
| | |
| | | { code: 'errorArea', name: t('basicData.errorSettlementArea'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false }, |
| | | { code: 'otherMoney', name: t('basicData.otherAmounts'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false }, |
| | | { code: 'sizeCheck', name: t('basicData.sizeReview'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }, |
| | | { code: 'updateOrderId', name: '修改订单号', 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: 'fileUpload', name: t('order.fileUpload'),prefixIcon: 'vxe-icon-picture-fill', visible: true, } |
| | | ] |
| | | ] |
| | | } |
| | |
| | | keyboardConfig:{ |
| | | isArrow: true, |
| | | isDel: true, |
| | | isEnter: true, |
| | | //isEnter: true, |
| | | isTab: true, |
| | | isEdit: true, |
| | | isChecked: true |
| | |
| | | trigger: 'dblclick', |
| | | mode: 'cell', |
| | | showStatus: true, |
| | | showIcon:false |
| | | showIcon:false, |
| | | },//表头参数 |
| | | columns:[ |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 }, |
| | |
| | | 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}, |
| | | |
| | | |
| | | ], |
| | | //表单验证 |
| | | 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') } |
| | |
| | | break |
| | | } |
| | | case 'updateMoney': { |
| | | $grid.clearEdit() |
| | | updateMoney() |
| | | break |
| | | } |
| | |
| | | break |
| | | } |
| | | case 'saveOrder': { |
| | | xGrid.value.clearEdit() |
| | | if ($grid.getTableData().tableData.length === 0){ |
| | | ElMessage.error( t('order.msg.tableLengthNot')) |
| | | return |
| | |
| | | } |
| | | |
| | | const project = titleUploadData.value.project |
| | | if(project === null || project === undefined || project === ''){ |
| | | ElMessage.error(t('order.msg.projectCheck')) |
| | | return |
| | | if(project === null || project === undefined ){ |
| | | titleUploadData.value.project='' |
| | | } |
| | | const customer = titleUploadData.value.customerId |
| | | if(customer === null || customer === undefined || customer === ''){ |
| | |
| | | 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 |
| | | ) |
| | | //判断宽高相乘与字段结算面积是否相同 |
| | | |
| | | 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 |
| | | } |
| | | |
| | | const project = titleUploadData.value.project |
| | | if(project === null || project === undefined || project === ''){ |
| | | ElMessage.error(t('order.msg.projectCheck')) |
| | | return |
| | | } |
| | | const customer = titleUploadData.value.customerId |
| | | if(customer === null || customer === undefined || customer === ''){ |
| | | ElMessage.error(t('order.msg.customerCheck')) |
| | |
| | | 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) |
| | |
| | | } |
| | | computedMoney(result.cell) |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | xGrid.value.updateFooter() |
| | | break |
| | | } |
| | | case 'copyAll' :{ |
| | |
| | | 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) =>{ |
| | |
| | | } |
| | | computedMoney(result.cell) |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | xGrid.value.updateFooter() |
| | | break |
| | | } |
| | | case 'clearChecked' :{ |
| | | 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 |
| | | |
| | | break |
| | | } |
| | | case 'computedMoney' :{ |
| | |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = getNestedProperty(dataList[result.start],result.cell)+"" |
| | | if(!/\d$/.test(val)){ |
| | | const matches = val.match(/\D/g); |
| | | const b= val.lastIndexOf(matches[matches.length-1]) |
| | | |
| | | const numbersArr = [] |
| | | const regex = /\d+/g |
| | | let match |
| | | while ((match = regex.exec(val))) { |
| | | numbersArr.push({ number: match[0], index: match.index }); |
| | | } |
| | | let numbers=numbersArr[numbersArr.length-1] |
| | | var subStr1 = val.substring(numbers.index); |
| | | var subStr2 = val.substring(0, numbers.index); |
| | | let number = parseInt(subStr1) |
| | | var reg =new RegExp(number,"g") |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | const numbersArr = [] |
| | | const regex = /\d+/g |
| | | let match |
| | | while ((match = regex.exec(val))) { |
| | | numbersArr.push({ number: match[0], index: match.index }); |
| | | } |
| | | let numbers=numbersArr[numbersArr.length-1] |
| | | var subStr1 = val.substring(numbers.index); |
| | | const matche = subStr1.match(/(\d+)([^0-9]|$)/); |
| | | const a= val.lastIndexOf(matche[2]) |
| | | var subStr2 = val.substring(0, numbers.index); |
| | | var subStr3 = val.substring(a,b+1); |
| | | let number = parseInt(subStr1) |
| | | var reg =new RegExp(number,"g") |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | if(!/\d$/.test(val)){ |
| | | newStr=newStr+subStr3 |
| | | } |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | } |
| | | |
| | | }) |
| | | }) |
| | | }else{ |
| | | const numbersArr = [] |
| | | const regex = /\d+/g |
| | | let match |
| | | while ((match = regex.exec(val))) { |
| | | numbersArr.push({ number: match[0], index: match.index }); |
| | | } |
| | | let numbers=numbersArr[numbersArr.length-1] |
| | | var subStr1 = val.substring(numbers.index); |
| | | var subStr2 = val.substring(0, numbers.index); |
| | | let number = parseInt(subStr1) |
| | | var reg =new RegExp(number,"g") |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | } |
| | | computedMoney(result.cell) |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | xGrid.value.updateFooter() |
| | | break |
| | | } |
| | | case 'incrementalChecked' : { |
| | |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = getNestedProperty(dataList[result.start], result.cell)+"" |
| | | const numbersArr = [] |
| | | const regex = /\d+/g |
| | | let match |
| | | while ((match = regex.exec(val))) { |
| | | numbersArr.push({ number: match[0], index: match.index }); |
| | | } |
| | | let numbers=numbersArr[numbersArr.length-1] |
| | | var subStr1 = val.substring(numbers.index); |
| | | var subStr2 = val.substring(0, numbers.index); |
| | | let number = parseInt(subStr1) |
| | | var reg =new RegExp(number,"g") |
| | | dataList.forEach((item,index) =>{ |
| | | if(index >= result.start && index <= result.end){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | if(!/\d$/.test(val)){ |
| | | const matches = val.match(/\D/g); |
| | | const b= val.lastIndexOf(matches[matches.length-1]) |
| | | |
| | | const numbersArr = [] |
| | | const regex = /\d+/g |
| | | let match |
| | | while ((match = regex.exec(val))) { |
| | | numbersArr.push({ number: match[0], index: match.index }); |
| | | } |
| | | let numbers=numbersArr[numbersArr.length-1] |
| | | var subStr1 = val.substring(numbers.index); |
| | | const matche = subStr1.match(/(\d+)([^0-9]|$)/); |
| | | const a= val.lastIndexOf(matche[2]) |
| | | var subStr2 = val.substring(0, numbers.index); |
| | | var subStr3 = val.substring(a,b+1); |
| | | let number = parseInt(subStr1) |
| | | var reg =new RegExp(number,"g") |
| | | dataList.forEach((item,index) =>{ |
| | | if(index >= result.start && index <= result.end){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | newStr=newStr+subStr3 |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | } |
| | | |
| | | }) |
| | | /*let numbers = parseInt(val.match(/(\d+)$/)) |
| | | const string=val.replace(/\d+$/, '') |
| | | dataList.forEach((item, index) => { |
| | | if (index >= result.start && index <= result.end) { |
| | | setNestedValue(item, result.cell, string + numbers) |
| | | numbers = numbers + 1 |
| | | }) |
| | | }else{ |
| | | const numbersArr = [] |
| | | const regex = /\d+/g |
| | | let match |
| | | while ((match = regex.exec(val))) { |
| | | numbersArr.push({ number: match[0], index: match.index }); |
| | | } |
| | | })*/ |
| | | let numbers=numbersArr[numbersArr.length-1] |
| | | var subStr1 = val.substring(numbers.index); |
| | | var subStr2 = val.substring(0, numbers.index); |
| | | let number = parseInt(subStr1) |
| | | var reg =new RegExp(number,"g") |
| | | dataList.forEach((item,index) =>{ |
| | | if(index >= result.start && index <= result.end){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | } |
| | | |
| | | }) |
| | | } |
| | | } |
| | | computedMoney(result.cell) |
| | | gridOptions.menuConfig.body.options[0][5].disabled = false |
| | | xGrid.value.updateFooter() |
| | | break |
| | | } |
| | | case "reportingTransfer":{ |
| | | const row = xGrid.value.getCurrentRecord() |
| | | if(row===null){ |
| | | ElMessage.warning(t('components.pleaseClickToSelectARowFirst')) |
| | | return |
| | | } |
| | | transferData.value.oldOrderNumber = row.orderNumber |
| | | transferData.value.oldOrderId = titleUploadData.value.orderId |
| | | dialogTransferVisible.value = true |
| | | break |
| | | } |
| | | case 'uploadPicture':{ |
| | | const row = xGrid.value.getCurrentRecord() |
| | | if(row===null){ |
| | | ElMessage.warning(t('components.pleaseClickToSelectARowFirst')) |
| | | return |
| | | } |
| | | rowIndex=row |
| | | 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 |
| | | } |
| | | |
| | | }, |
| | |
| | | //初始化判断是否有id传入 |
| | | onMounted(async ()=>{ |
| | | gridOptions.loading = true |
| | | await initOrder() |
| | | await initOrder(0) |
| | | |
| | | //异形导入 |
| | | if(!company.alienFunction){ |
| | | gridOptions.menuConfig.body.options[0][13].disabled=true |
| | | } |
| | | |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions) |
| | | let productData = route.query.produceList |
| | | if (!(typeof productData === 'undefined' || productData == null || productData === '' || productData === '\n' || productData === '\r')){ |
| | | xGrid.value.insertAt(JSON.parse(productData)) |
| | | } |
| | | |
| | | const str = route.query.orderId || history.state.orderId |
| | | if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){ |
| | | gridOptions.menuConfig.body.options[0][11].disabled = true |
| | |
| | | request.post(`/order/getOrderById/${str}`).then((res) => { |
| | | if(res.code==200){ |
| | | titleUploadData.value = res.data.order |
| | | const customer = titleSelectJson.value.customer.filter(item => item.id === titleUploadData.value.customerId) |
| | | projects.value = customer[0].projectList |
| | | 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 |
| | |
| | | //gridOptions.menuConfig.body.options[0][8].disabled =false |
| | | } |
| | | |
| | | //下单后工艺审核之前可以右键上传dwg文件 |
| | | if(res.data.order.createOrder === 2 && res.data.order.processReview === 0){ |
| | | orderTypeState.value=1 |
| | | } |
| | | |
| | | //按钮审核过后变为反审 |
| | | if(Math.abs(res.data.order.orderReview) === 2){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | gridOptions.toolbarConfig.buttons[3].disabled = true |
| | | gridOptions.toolbarConfig.buttons[4].disabled = true |
| | | |
| | | |
| | | } |
| | | } |
| | | if(res.data.order.processingCard>0 && company.connectMes){ |
| | | gridOptions.menuConfig.body.options[0][12].disabled = false |
| | | } |
| | | |
| | | if(res.data.order.productionOrder !==0 ){ |
| | |
| | | const orderDetails = res.data.orderDetails |
| | | orderDetails.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | if(res.data.orderFile!=null){ |
| | | res.data.orderFile.forEach(items=>{ |
| | | if(items.order_number==item.orderNumber) |
| | | item.fileData=items.file_data |
| | | }) |
| | | } |
| | | }) |
| | | otherMoney.value =res.data.orderOtherMoneyList |
| | | //加载副表数据 |
| | |
| | | |
| | | if(titleUploadData.value.calculateType===3){ |
| | | item.grossAmount=multiply(item.price,item.quantity) |
| | | }else if(titleUploadData.value.calculateType===4){ |
| | | item.grossAmount=parseFloat(divideAuto(item.width * item.height* item.quantity*item.price,1000000,company.decValue)) |
| | | }else{ |
| | | item.grossAmount=multiply(item.price,item.computeGrossArea) |
| | | } |
| | |
| | | |
| | | |
| | | //页面第一次加载执行 |
| | | const initOrder = async ()=>{ |
| | | const initOrder = async (val)=>{ |
| | | |
| | | await request.get(`/basicData/orderBasicData`).then((res) => { |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | //其他金额 |
| | | otherMoney.value = titleSelectJson.value.orderOtherMoney[0] |
| | | //let columns = [] |
| | | otherMoney.value.forEach(item => { |
| | | let column = { |
| | | field: `otherColumns.${item.column}`, |
| | | width:100, |
| | | title: item.alias, |
| | | editRender: { |
| | | name: 'input', |
| | | if(val===0){ |
| | | //其他金额 |
| | | otherMoney.value = titleSelectJson.value.orderOtherMoney[0] |
| | | //let columns = [] |
| | | otherMoney.value.forEach(item => { |
| | | let column = { |
| | | field: `otherColumns.${item.column}`, |
| | | width:100, |
| | | title: item.alias, |
| | | editRender: { |
| | | name: 'input', |
| | | } |
| | | } |
| | | } |
| | | //判断 其他列是否是数字 |
| | | if(item.column.indexOf('M')>-1){ |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^(0(\.\d{1,3})?|([1-9]\d{0,4})(\.\d{1,3})?|99999(\.9{1,3})?)$/ |
| | | if (cellValue && !regex.test(cellValue)) { |
| | | return new Error(t('basicData.msg.range99999Dec3')) |
| | | //判断 其他列是否是数字 |
| | | if(item.column.indexOf('M')>-1){ |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^(0(\.\d{1,3})?|([1-9]\d{0,4})(\.\d{1,3})?|99999(\.9{1,3})?)$/ |
| | | if (cellValue && !regex.test(cellValue)) { |
| | | return new Error(t('basicData.msg.range99999Dec3')) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }else{ |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { required: false}, |
| | | { min: 0, max: 255, message: t('basicData.msg.max255') } |
| | | ] |
| | | } |
| | | ] |
| | | }else{ |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { required: false}, |
| | | { min: 0, max: 255, message: t('basicData.msg.max255') } |
| | | ] |
| | | } |
| | | |
| | | //columns.push(column) |
| | | gridOptions.columns.push(column) |
| | | //columns.push(column) |
| | | gridOptions.columns.push(column) |
| | | |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | //进入页面下拉框设置默认值 |
| | | titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName |
| | |
| | | titleUploadData.value.alType = titleSelectJson.value.alType[0].basicName |
| | | titleUploadData.value.calculateType = company.calculateType |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (7 * 24 * 60 * 60 * 1000)) |
| | | today.setTime(today.getTime() + (company.deliveryDate * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.deliveryDate = today.getFullYear() + |
| | | '-' + ("0" + (today.getMonth() + 1)).slice(-2) |
| | | + '-' + ("0" + today.getDate()).slice(-2) |
| | |
| | | }else { |
| | | ElMessage.error(res.msg) |
| | | } |
| | | }).catch(()=>{ |
| | | if(titleUploadData.value.orderId.trim()!==""){ |
| | | ElMessageBox.alert(t('order.msg.updateOrderError'), 'Title', { |
| | | confirmButtonText: 'OK', |
| | | callback: (action: Action) => { |
| | | router.push({path:'/main/order/createOrder',query:{ |
| | | orderId:titleUploadData.value.orderId, |
| | | random:Math.random()}}) |
| | | }, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | request.post(`/order/saveOrderTitle`,order).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path:'/main/order/selectOrder'}) |
| | | router.push({path:'/main/order/createOrder',query:{ |
| | | orderId:titleUploadData.value.orderId, |
| | | random:Math.random()}}) |
| | | }else { |
| | | ElMessage.error(res.msg) |
| | | } |
| | |
| | | orderId:newOrderId.value, |
| | | random:Math.random()}}) |
| | | }else if(res.data==="false1"){ |
| | | ElMessage.warning("输入订单号不能大于最大订单号") |
| | | ElMessage.warning(t('order.msg.updateOrderIdErrorGtMaxId')) |
| | | }else if(res.data==="false2"){ |
| | | ElMessage.warning("输入订单号已存在") |
| | | ElMessage.warning(t('order.msg.updateOrderIdErrorIsExist')) |
| | | }else if(res.data==="false3"){ |
| | | ElMessage.warning("输入订单号相同") |
| | | ElMessage.warning(t('order.msg.updateOrderIdErrorIsSame')) |
| | | }else if(res.data==="false4"){ |
| | | ElMessage.warning("输入订单号长度不符") |
| | | ElMessage.warning(t('order.msg.updateOrderIdErrorDiscrepancyInLength')) |
| | | }else if(res.data==="false5"){ |
| | | ElMessage.warning("请输入数字") |
| | | ElMessage.warning(t('order.msg.updateOrderIdErrorInputNumber')) |
| | | }else if(res.data==="false6"){ |
| | | ElMessage.warning("不能修改第一个单子") |
| | | ElMessage.warning(t('order.msg.updateOrderIdErrorNotNo1')) |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | |
| | | // 审核订单 |
| | | const reviewOrder = (state) => { |
| | | const reviewOrder = async (state) => { |
| | | let differentSize = null |
| | | if(state===0){ |
| | | await request.post(`/order/selectDifferentSize/${titleUploadData.value.orderId}`).then(res =>{ |
| | | differentSize = res.data |
| | | }) |
| | | } |
| | | let orderGlassState = null |
| | | if(differentSize===true){ |
| | | await ElMessageBox.confirm( |
| | | t('order.msg.differentSize'), |
| | | t('order.msg.warning'), |
| | | {confirmButtonText: t('basicData.confirmButtonText'), |
| | | cancelButtonText: t('basicData.cancelButtonText'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(async () => { |
| | | |
| | | }) |
| | | .catch(async () => { |
| | | orderGlassState = false |
| | | }) |
| | | } |
| | | if (orderGlassState===false){ |
| | | return |
| | | } |
| | | |
| | | request.post(`/order/reviewOrderById/${titleUploadData.value.orderId}/${state}/${userStore.user.userId}/${userStore.user.userName}`).then(res =>{ |
| | | if(res.code==200){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | |
| | | reviewOrder(2) |
| | | } |
| | | |
| | | let projects = ref([]) |
| | | |
| | | const changeProject = (item) => { |
| | | if(typeof item === 'string'){ |
| | | titleUploadData.value.project = item |
| | | return |
| | | } |
| | | titleUploadData.value.project = item.project |
| | | titleUploadData.value.salesmanId = parseInt(item.salesmanId) |
| | | titleUploadData.value.salesman = item.salesman |
| | | titleUploadData.value.contacts = item.contacts |
| | | titleUploadData.value.contactNumber = item.contactNumber |
| | | } |
| | | |
| | | const changeCustomer = () => { |
| | | const changedCustomerId = titleUploadData.value.customerId |
| | | const customer = titleSelectJson.value.customer.filter(item => item.id === changedCustomerId) |
| | |
| | | titleUploadData.value.project = customer[0].project |
| | | titleUploadData.value.salesmanId = customer[0].salesmanId |
| | | titleUploadData.value.salesman = customer[0].salesman |
| | | titleUploadData.value.contacts = customer[0].contacts |
| | | titleUploadData.value.contactNumber = customer[0].contactNumber |
| | | projects.value = customer[0].projectList |
| | | } |
| | | |
| | | const changeSaleMan = () => { |
| | | const changedSaleManId = titleUploadData.value.salesmanId |
| | | const SaleMan = titleSelectJson.value.saleMan.filter(item => item.id === changedSaleManId) |
| | | titleUploadData.value.salesman = SaleMan[0].basicName |
| | | titleUploadData.value.salesman = SaleMan[0]['basicName'] |
| | | } |
| | | |
| | | const area = (row) => { |
| | |
| | | // 获取保留面积, |
| | | const decValue = company.decValue |
| | | switch (titleUploadData.value.calculateType){ |
| | | case 2:{ |
| | | case 2 :{ |
| | | areaSum = parseFloat(divideAuto(row.width * row.height* row.quantity,1000000,company.decValue)) |
| | | break |
| | | } |
| | | case 4:{ |
| | | areaSum = parseFloat(divideAuto(row.width * row.height* row.quantity,1000000,company.decValue)) |
| | | break |
| | | } |
| | |
| | | } |
| | | if(titleUploadData.value.calculateType===3){ |
| | | item.grossAmount=multiply(item.price , item.quantity) |
| | | }else if(titleUploadData.value.calculateType===4){ |
| | | item.grossAmount=parseFloat(divideAuto(item.width * item.height* item.quantity*item.price,1000000,company.decValue)) |
| | | }else{ |
| | | item.grossAmount=multiply(item.price * 1 , item.computeGrossArea) |
| | | } |
| | |
| | | //行单元格修改修改触发此事件 |
| | | const editClosedEvent = ({ row, column }) => { |
| | | |
| | | |
| | | //判断修改相应的数值修改面积与金额 |
| | | if (['width', 'height', 'quantity', 'price'].includes(column.property)) { |
| | | if(titleUploadData.value?.orderReview!==2){ |
| | |
| | | } |
| | | if(titleUploadData.value.calculateType===3){ |
| | | row.grossAmount=multiply(row.price ,row.quantity) |
| | | }else if(titleUploadData.value.calculateType===4){ |
| | | row.grossAmount=parseFloat(divideAuto(row.width * row.height* row.quantity*row.price,1000000,company.decValue)) |
| | | }else{ |
| | | row.grossAmount=multiply(row.price , row.computeGrossArea) |
| | | } |
| | |
| | | // } |
| | | // } |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | |
| | | xGrid.value.updateFooter() |
| | | |
| | | } |
| | | |
| | |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | } |
| | | } |
| | | |
| | | //关闭异形编辑界面 |
| | | const refAlienEditor = ref() |
| | | const closeAlienEditorDialog = async (done) => { |
| | | const flag = await refAlienEditor.value.validate() |
| | | if(flag){ |
| | | done() |
| | | } |
| | | } |
| | | //改变计算方式 |
| | | const changeCalculateType = ()=>{ |
| | | const fullData = xGrid.value.getTableData().fullData |
| | |
| | | if( !isNaN(item.computeArea*1) && item.computeArea != null ){ |
| | | if(titleUploadData.value.calculateType===3){ |
| | | item.grossAmount=parseFloat(multiply(item.price , item.quantity)) |
| | | }else if(titleUploadData.value.calculateType===4){ |
| | | if(titleUploadData.value?.orderReview!==2){ |
| | | item.grossArea = countArea(item) |
| | | item.computeGrossArea = item.grossArea |
| | | item.grossAmount=parseFloat(divideAuto(item.width * item.height* item.quantity*item.price,1000000,company.decValue)) |
| | | }else{ |
| | | item.grossAmount=parseFloat(divideAuto(item.width * item.height* item.quantity*item.price,1000000,company.decValue)) |
| | | } |
| | | |
| | | }else{ |
| | | item.grossArea = countArea(item) |
| | | item.computeGrossArea = item.grossArea |
| | | item.grossAmount=parseFloat(multiply(item.price , item.computeGrossArea)) |
| | | if(titleUploadData.value?.orderReview!==2){ |
| | | item.grossArea = countArea(item) |
| | | item.computeGrossArea = item.grossArea |
| | | item.grossAmount=parseFloat(multiply(item.price , item.computeGrossArea)) |
| | | }else{ |
| | | item.grossAmount=parseFloat(multiply(item.price , item.computeGrossArea)) |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | |
| | | //表格回车,在表格最后一行添加一行空数据 |
| | | const handleKeyDown = (evnt) =>{ |
| | | const handleKeyDown =async (evnt) =>{ |
| | | //判断表示是否为筛选状态 |
| | | if(xGrid.value.isFilter()){ |
| | | return |
| | |
| | | } |
| | | if(evnt.$event.keyCode === 13 ){ |
| | | const { rowIndex,row,column } = xGrid.value.getSelectedCell() || xGrid.value.getEditRecord() |
| | | let nextRowIndex = xGrid.value.getRowIndex(row) + 1; |
| | | if (nextRowIndex < xGrid.value.getTableData().fullData.length) { |
| | | let nextRowIndex = xGrid.value.getVTRowIndex(row) + 1 |
| | | |
| | | |
| | | switch (column.field){ |
| | | case 'width': |
| | | xGrid.value.setSelectCell(row, 'height') |
| | | break; |
| | | case 'height': |
| | | xGrid.value.setSelectCell(row, 'quantity') |
| | | break; |
| | | case 'quantity': |
| | | if(nextRowIndex === length){ |
| | | await editClosedEvent({row,column}) |
| | | xGrid.value.clearEdit() |
| | | let rowNext = row |
| | | delete rowNext._X_ROW_KEY |
| | | //xGrid.value.insertAt(rowNext, xGrid.value.getTableData.length || -1) |
| | | xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | } |
| | | const nextRow = xGrid.value.getTableData().fullData[nextRowIndex] |
| | | xGrid.value.setCurrentRow(nextRow) |
| | | xGrid.value.scrollToRow(nextRow) |
| | | xGrid.value.setSelectCell(nextRow, 'width') |
| | | break; |
| | | default: |
| | | if(nextRowIndex === length){ |
| | | xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | } |
| | | const nextRow1 = xGrid.value.getTableData().fullData[nextRowIndex] |
| | | xGrid.value.setCurrentRow(nextRow1) |
| | | xGrid.value.scrollToRow(nextRow1) |
| | | xGrid.value.setSelectCell(nextRow1, column.field) |
| | | break; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /*if (nextRowIndex < xGrid.value.getTableData().fullData.length) { |
| | | xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]); |
| | | } |
| | | if(rowIndex === length-1){ |
| | | xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | if(evnt.$event.keyCode === 38 ){ |
| | |
| | | xGrid.value.clearSelected() |
| | | } |
| | | |
| | | //切换产品界面 |
| | | const productFlag = ref(true) |
| | | const changeProduct = (val)=>{ |
| | | productFlag.value = val |
| | | } |
| | | const closeProductDialog = ()=>{ |
| | | productFlag.value = true |
| | | } |
| | | //改变产品页面切换 |
| | | const changePage = () => { |
| | | productFlag.value = true |
| | | } |
| | | // 创建客户显示 |
| | | let createCustomerVisible = ref(false) |
| | | |
| | | //创建客户成功返回方法 |
| | | const createCustomerSuccess = async () => { |
| | | await initOrder(1) |
| | | createCustomerVisible.value = false |
| | | } |
| | | const orderNumberTransfer = () => { |
| | | router.push({ |
| | | path:'/main/order/createOrder', |
| | | query:{ |
| | | orderId:titleUploadData.value.orderId, |
| | | random:Math.random()}}) |
| | | } |
| | | |
| | | //图片上传名称 |
| | | 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(t('basicData.msg.saveSuccess')) |
| | | alienEditorVisible.value=false |
| | | |
| | | } |
| | | |
| | | const fileToBase64 = (file) => { |
| | | return new Promise((resolve, reject) => { |
| | | const reader = new FileReader(); |
| | | reader.onload = () => resolve(reader.result); |
| | | reader.onerror = reject; |
| | | reader.readAsDataURL(file); |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | const getEdgingProcess = (value,edgingType) => { |
| | | rowIndex.processAttribute=JSON.stringify(value) |
| | | rowIndex.edgingType=edgingType |
| | | processAttributeVisible.value = false |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <div class="order-primary" style="background-color: white"> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>*{{$t('order.project')}}:</el-text></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.project"/></el-col> |
| | | <el-col :span="2"> |
| | | <!-- <el-input v-model.trim="titleUploadData.project"/>--> |
| | | <el-select v-model.trim="titleUploadData.project" |
| | | @change="changeProject" |
| | | clearable placeholder=" " allow-create filterable > |
| | | <el-option v-for="item in projects" |
| | | :label="item.project" |
| | | :value="item"/> |
| | | </el-select> |
| | | |
| | | |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*{{$t('order.customers')}}:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.customerId" |
| | |
| | | :label="item.id+' '+item.customerName" |
| | | :value="item.id" |
| | | /> |
| | | <template #footer> |
| | | <el-button @click="createCustomerVisible=true" text bg size="small" > |
| | | {{$t('basicData.create')}} |
| | | </el-button> |
| | | </template> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*{{$t('order.orderType')}}:</el-text></el-col> |
| | |
| | | <el-option :value="1" :label="t('order.areaAmountPerPiece')"/> |
| | | <el-option :value="2" :label="t('order.areaAmountAge')"/> |
| | | <el-option :value="3" :label="t('order.quantityMount')"/> |
| | | <el-option :value="4" :label="t('order.allAmount')"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*{{$t('order.salesman')}}:</el-text></el-col> |
| | |
| | | :value="item.id"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>{{$t('order.alType')}}</el-text></el-col> |
| | | <el-col :span="2"><el-text style="white-space: nowrap;">{{$t('order.alType')}}</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.alType" clearable placeholder=" " > |
| | | <el-option v-for="item in titleSelectJson['alType']" |
| | |
| | | </template> |
| | | |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <el-dialog v-model="dialogTableVisible" :title="$t('order.processingNote')" style="width: 60%;height:75% "> |
| | | <el-dialog v-model="dialogTableVisible" :draggable="true" :title="$t('order.processingNote')" style="width: 60%;height:75% "> |
| | | <el-input |
| | | v-model="titleUploadData.processingNote" |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 20 }" |
| | | /> |
| | | </el-dialog> |
| | | <el-dialog id="product" v-model="productVisible" style="width: 80%;height:75% "> |
| | | <select-product :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 100%;height: 100%" /> |
| | | <el-dialog id="product" |
| | | class="product1" |
| | | v-model="productVisible" |
| | | @closed="closeProductDialog" |
| | | style="width: 80%;height:75%; "> |
| | | <template #header > |
| | | <div class="my-header"> |
| | | <el-button @click="changeProduct(true)">{{$t('basicData.search')}}</el-button> |
| | | <el-button @click="changeProduct(false)">{{$t('basicData.create')}}</el-button> |
| | | </div> |
| | | </template> |
| | | <select-product v-if="productFlag" :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 100%;height: 100%" /> |
| | | <create-product v-else |
| | | :productFlag="productFlag" |
| | | @changePage="changePage" |
| | | style="text-align: left;background-color: #D5EAFF;"/> |
| | | </el-dialog> |
| | | <!--误差结算--> |
| | | <el-dialog v-model="errorAreaVisible" style="width: 300px;height:150px "> |
| | |
| | | :otherMoney="otherMoney" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | <!--异形导入--> |
| | | <el-dialog v-model="alienEditorVisible" |
| | | :title="$t('')" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | destroy-on-close |
| | | style="width: 1114px;height:600px "> |
| | | <update-alien-editor |
| | | ref="refAlienEditor" |
| | | :rowIndex="rowIndex" |
| | | @getUploadPicture="getUploadPicture" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <!-- 尺寸审核窗口--> |
| | | <el-dialog |
| | |
| | | @getParent="gaveOrderSizeCheck" |
| | | :orderId="titleUploadData.orderId" |
| | | :OrderDetail="xGrid"/> |
| | | <!-- <create-customer/>--> |
| | | </el-dialog> |
| | | <!-- 客户创建窗口--> |
| | | <el-dialog |
| | | id="createCustomer" |
| | | :title="$t('customer.page.createCustomer')" |
| | | v-model="createCustomerVisible" |
| | | style="width: 700px;height:445px;text-align: left " |
| | | > |
| | | <create-customer :getOrderPage="'order'" @getOrderFunction="createCustomerSuccess" /> |
| | | </el-dialog> |
| | | |
| | | <!-- 订单报工转移--> |
| | | <el-dialog v-model="dialogTransferVisible" |
| | | :close-on-click-modal="false" |
| | | :title="$t('order.orderTransfer')" |
| | | destroy-on-close width="500"> |
| | | <order-number-report-transfer :transferData="transferData" @orderNumberTransfer="orderNumberTransfer"/> |
| | | </el-dialog> |
| | | |
| | | <el-dialog id="loadDWG" |
| | | v-model="fileUploadVisible" |
| | | :close-on-click-modal="false" |
| | | 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> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | |
| | | .el-col{ |
| | | border: #181818 1px solid; |
| | | } |
| | | :deep(.el-input__wrapper) { |
| | | :deep(.order-primary .el-input__wrapper) { |
| | | box-shadow: 0 0 0 0 var(--el-input-border-color, var(--el-border-color)) inset; |
| | | cursor: default; |
| | | border: none !important; |
| | |
| | | width: 100%; |
| | | } |
| | | |
| | | :deep(#sizeCheck .el-dialog__body){ |
| | | :deep(#sizeCheck .el-dialog__body,#createCustomer .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | .my-header { |
| | | display: flex; |
| | | /*flex-direction : row; |
| | | justify-content: space-between;*/ |
| | | } |
| | | |
| | | :deep(#loadDWG .el-dialog__body){ |
| | | height: 70vh; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |