| | |
| | | let sizeCheckVisible = ref(false) |
| | | 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() |
| | |
| | | keyboardConfig:{ |
| | | isArrow: true, |
| | | isDel: true, |
| | | isEnter: true, |
| | | //isEnter: true, |
| | | isTab: true, |
| | | isEdit: true, |
| | | isChecked: true |
| | |
| | | } |
| | | |
| | | 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 === ''){ |
| | |
| | | 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')) |
| | |
| | | |
| | | |
| | | // 审核订单 |
| | | 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 |
| | |
| | | } |
| | | 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.getRowIndex(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){ |
| | | 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 ){ |
| | |
| | | <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-col> |
| | | <el-col :span="2"><el-text>*{{$t('order.customers')}}:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.customerId" |