| | |
| | | titleUploadData.value=deepClone(res.data.delivery) |
| | | titleUploadData.value.deliveryId=str |
| | | |
| | | //判断是否发货出库 |
| | | if(!company.deliveryOutbound){ |
| | | if(titleUploadData.value.stockState!==0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | } |
| | | //根据审核状态显示审核按钮或者是反审按钮 |
| | | |
| | | if(titleUploadData.value.deliveryState!==0){ |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | |
| | | if(titleUploadData.value.deliveryState===0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | if(titleUploadData.value.stockState!==0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | |
| | |
| | | options: [ |
| | | [ |
| | | { code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | //{ code: 'otherMoney', name: t('basicData.otherAmounts'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false } |
| | | { code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false }, |
| | | ] |
| | | ] |
| | | } |
| | |
| | | {field: 'deliveryDetail.money',width:120, title: t('order.grossAmount'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'order.batch',width:120, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'shape',width:120, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'finishedGoodsInventory.actualSignalArea',width:120, title: t('productStock.singlePieceArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'area',width:120, title: t('productStock.singlePieceArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'grossArea',width:120, title: t('productStock.totalArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'computeArea',width:120, title: t('order.computeArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'computeGrossArea',width:120, title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | return |
| | | } |
| | | //表头数据校验 |
| | | const project = titleUploadData.value.project |
| | | if(project === null || project === undefined || project === ''){ |
| | | ElMessage.error(t('delivery.pleaseEnterTheAmountOfFunds')) |
| | | return |
| | | } |
| | | const paymentTerms = titleUploadData.value.paymentTerms |
| | | if(paymentTerms === null || paymentTerms === undefined || paymentTerms === ''){ |
| | | ElMessage.error(t('delivery.pleaseSelectPaymentTerms')) |
| | |
| | | }else if(res.data==="false1"){ |
| | | ElMessage.warning(t('delivery.pleaseMsg1')) |
| | | }else if(res.data==="false2"){ |
| | | ElMessage.warning("订单存在已发货请刷新界面") |
| | | ElMessage.warning(t('basicData.msg.quantityError')) |
| | | }else if(res.data==="false3"){ |
| | | ElMessage.warning("数据不存在") |
| | | ElMessage.warning(t('basicData.msg.dataDoesNotExist')) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | } |
| | |
| | | case 'toExamine': { |
| | | let flowData = ref({ |
| | | deliveryId: route.query.deliveryID, |
| | | type: 2 |
| | | type: 2, |
| | | userName:userStore.user.userName, |
| | | userId:userStore.user.userId, |
| | | deliveryOutbound:company.deliveryOutbound |
| | | |
| | | }) |
| | | request.post("/delivery/updateDeliveryToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200 && res.data===true) { |
| | | if (res.code == 200 && res.data==="true") { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | //router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}}) |
| | | router.push({path:'/main/delivery/createDelivery',query:{ |
| | |
| | | case 'CounterExamination': { |
| | | let flowData = ref({ |
| | | deliveryId: route.query.deliveryID, |
| | | type: 0 |
| | | type: 0, |
| | | userName:userStore.user.userName, |
| | | userId:userStore.user.userId, |
| | | deliveryOutbound:company.deliveryOutbound |
| | | |
| | | }) |
| | | request.post("/delivery/updateDeliveryToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200 && res.data===true) { |
| | | if (res.code == 200 && res.data==="true") { |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | //router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}}) |
| | | router.push({path:'/main/delivery/createDelivery',query:{ |
| | |
| | | } |
| | | break |
| | | } |
| | | case 'copyAll' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | let firstVal=null; |
| | | if(result.cell.indexOf('.')>-1){ |
| | | firstVal = eval("dataList["+result.start +"]."+result.cell) |
| | | }else { |
| | | firstVal=dataList[result.start][result.cell]; |
| | | } |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start){ |
| | | //取消选中 |
| | | if(parseInt(firstVal)<=0){ |
| | | xGrid.value.setCheckboxRow(item, false); |
| | | } |
| | | if(result.cell.indexOf('.')>-1){ |
| | | const columnArr = result.cell.split('.') |
| | | item[columnArr[0]][columnArr[1]] = firstVal |
| | | }else{ |
| | | item[result.cell] = firstVal |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | break |
| | | } |
| | | case 'otherMoney' :{ |
| | | otherMoneyVisible.value=true |
| | | break |
| | |
| | | //titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | } |
| | | } |
| | | |
| | | function getNestedProperty(obj, path) { |
| | | return path.split('.').reduce(function(o, p) { |
| | | if(o && o.hasOwnProperty(p)) { |
| | | return o[p]; |
| | | } |
| | | }, obj); |
| | | } |
| | | |
| | | function setNestedValue(obj, path, value) { |
| | | const keys = path.split('.'); |
| | | const lastKey = keys.pop(); |
| | | const lastObj = keys.reduce((obj, key) => obj[key], obj); |
| | | lastObj[lastKey] = value; |
| | | } |
| | | |
| | | |
| | | /*数据校验*/ |
| | | const validRules = ref({ |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div"> |
| | | <div class="order-primary" style="background-color: white"> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head" style="background-color: white"> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>{{$t('customer.customerNumber')}}:</el-text></el-col> |
| | | <el-col :span="3"><el-input style="font-size: large;color: #181818" v-model="titleUploadData.customerId" :readonly="true" ></el-input></el-col> |
| | |
| | | <el-col :span="2"><el-input v-model="titleUploadData.freight" :readonly="true"/></el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="order-detail"> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | max-height="97%" |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | |
| | | .head{ |
| | | width: 100%; |
| | | height: 170px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 170px); |
| | | } |
| | | </style> |