| | |
| | | font-weight: normal; |
| | | height: 100%; |
| | | width: 100%; |
| | | /*min-width: 1536px; |
| | | min-height: 730px;*/ |
| | | min-width: 1536px; |
| | | min-height: 730px; |
| | | |
| | | } |
| | | @media (max-width: 500px) { |
| | |
| | | props.lastList.push(list.value[i].data[j]) |
| | | } |
| | | } |
| | | console.log(props) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | } |
| | | } |
| | | } |
| | | console.log(props) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | //æ¯ä¸ªåºå·é¢ç§¯ |
| | | collection.total_area = parseFloat((collection.width * collection.height * collection.quantity / 1000000).toFixed(2)) |
| | | totalArea = add(totalArea, collection.total_area) |
| | | totalWeight += collection.width * collection.height * collection.quantity / 1000000 * collection.separation * 2.5 * 1; |
| | | //æ ¹æ®æå å±è®¡ç®éé |
| | | for (let j = 0; j < produceList.value[i].detail.length; j++) { |
| | | if (produceList.value[i].detail[j].technologyNumber.length>1){ |
| | | totalWeight += collection.weight * collection.quantity * 1; |
| | | |
| | | }else { |
| | | totalWeight += collection.width * collection.height * collection.quantity / 1000000 * collection.separation * 2.5 * 1; |
| | | |
| | | } |
| | | } |
| | | |
| | | //æ¯ä¸ªåºå·å¨é¿ |
| | | collection.perimeter = parseFloat(((collection.width * 2 + collection.height * 2) * collection.quantity / 1000).toFixed(3)) |
| | | }); |
| | |
| | | <td class="tdNowrap">åçåç§°ï¼</td> |
| | | <td colspan="3">{{ itemTr.glass_child }}</td> |
| | | <td class="tdNowrap">产ååç§°ï¼</td> |
| | | <td :colspan="2+item.processList.length*2">{{ itemTr.product_name }}</td> |
| | | |
| | | <td v-if="!company.processFontSize" :colspan="2+item.processList.length*2">{{ itemTr.product_name }}</td> |
| | | <td v-else :colspan="2+item.processList.length*2" style="font-size: 18px;">{{ itemTr.product_name }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td rowspan='2'>åºå·</td> |
| | |
| | | </tr> |
| | | |
| | | <tr class="title-s"> |
| | | <th colspan="2" style="width: 30%;text-align: left;"><span>{{data.order.orderType}} æ»éé:{{ grossNum.weight }}</span></th> |
| | | <th colspan="2" style="width: 30%;text-align: left;"><span>æ»éé:{{ grossNum.weight }}</span></th> |
| | | <th colspan="5" style="width: 40%;"> |
| | | <h3 >ç产任å¡å(æå)</h3> |
| | | <h3 >ç产任å¡å({{data.order.orderType}})</h3> |
| | | </th> |
| | | <th colspan="2" style="width: 30%;">订åç¼å·ï¼<span>{{ data.order.orderId }}</span> |
| | | <span v-if="company.companyName==='常å·å¸åå©ç»çæéå
¬å¸'&& data.order.batch!==''">(å{{ data.order.batch }})</span> |
| | |
| | | userPassWord :'تغÙÙØ± ÙÙÙ
Ø© اÙÙ
Ø±ÙØ±', |
| | | glassPrice:'ç»çä»·æ ¼', |
| | | glassOptimize:'ç»çä¼å', |
| | | finishedGlassShelf:'æåææ¶' |
| | | finishedGlassShelf:'æåææ¶', |
| | | userLog:'ç»å½æ¥å¿' |
| | | }, |
| | | |
| | | glassPrice:{ |
| | |
| | | userPassWord :'User Pass Word', |
| | | glassPrice:'Glass Price', |
| | | glassOptimize:'ç»çä¼å', |
| | | finishedGlassShelf:'æåææ¶' |
| | | finishedGlassShelf:'æåææ¶', |
| | | userLog:'ç»å½æ¥å¿' |
| | | }, |
| | | |
| | | glassPrice:{ |
| | |
| | | userPassWord :'ë¹ë°ë²í¸ ë³ê²½', |
| | | glassPrice:'ì 리 ê°ê²©', |
| | | glassOptimize:'ì 리 ìµì í', |
| | | finishedGlassShelf:'æåææ¶' |
| | | finishedGlassShelf:'æåææ¶', |
| | | userLog:'ç»å½æ¥å¿' |
| | | }, |
| | | |
| | | glassPrice:{ |
| | |
| | | userPassWord :'ÐзмениÑÑ Ð¿Ð°ÑолÑ', |
| | | glassPrice:'Цена ÑÑекла.', |
| | | glassOptimize:'ç»çä¼å', |
| | | finishedGlassShelf:'æåææ¶' |
| | | finishedGlassShelf:'æåææ¶', |
| | | userLog:'ç»å½æ¥å¿' |
| | | }, |
| | | |
| | | glassPrice:{ |
| | |
| | | userPassWord :'ä¿®æ¹å¯ç ', |
| | | glassPrice:'ç»çä»·æ ¼', |
| | | glassOptimize:'ç»çä¼å', |
| | | finishedGlassShelf:'æåææ¶' |
| | | finishedGlassShelf:'æåææ¶', |
| | | userLog:'ç»å½æ¥å¿' |
| | | }, |
| | | |
| | | glassPrice:{ |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div style="height:100%;width:100%"> |
| | | <el-container id="el-container1"> |
| | | <el-header > |
| | | <div style="height: 100%;width: 100%;display: flex"> |
| | | <img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%"> |
| | | <h3 style="margin: 1rem ;font-weight: bold;width: 70vw;"> {{$t('main.titleFirst') + user + $t('main.titleLast')}}</h3> |
| | | <span style="height: 70%;width: 78vw;margin-top: 1.5rem;" > |
| | | |
| | | <!-- <el-button class="sys-quit" @click="quit" type="info" round>--> |
| | | <h3 style="margin: 1rem ;font-weight: bold;width: 95%;"> {{$t('main.titleFirst') + user + $t('main.titleLast')}}</h3> |
| | | <span style="height: 70%;width: 10%;margin-top: 1.5rem;" > |
| | | <el-icon @click="quit" style="float: right;margin-right: 1rem" size="large" ><SwitchButton size=""/></el-icon> |
| | | <!-- </el-button>--> |
| | | </span> |
| | | </div> |
| | | </el-header> |
| | |
| | | <style scoped> |
| | | |
| | | #el-container1{ |
| | | height: 100vh; |
| | | width: 100vw; |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | #el-container2{ |
| | | height:calc(100% - 60px); |
| | | width: 100vw; |
| | | width: 100%; |
| | | } |
| | | |
| | | *{ |
| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path:'userLog', |
| | | name: 'userLog', |
| | | component: () => import('../views/system/userLog/UserLog.vue'), |
| | | children:[ |
| | | { |
| | | path: 'userListLog', |
| | | name: 'userListLog', |
| | | component: () => import('../views/system/userLog/UserListLog.vue'), |
| | | }, |
| | | { |
| | | name:'userLog', |
| | | path: '', |
| | | redirect:'/main/userLog/userListLog' |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | { |
| | | path:'glassPrice', |
| | |
| | | msg:'basicData.msg.range99999Dec2' |
| | | }, |
| | | orderIdType:'day',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ,year:æ¯å¹´çæ |
| | | orderIdTypeLetter:'NG',//订åå·åé¢åæ¯ |
| | | orderIdTypeMantissa:2,//订åå·å°¾æ°ä¿ç使° orderIdTypeLetteré¿åº¦+orderIdTypeMantissa =4 |
| | | deliveryIdType:'day', |
| | | deliveryDate:15,//订åå建éè´§æ¥æ 天津7天ï¼å¸¸å·7天ï¼ä¹ä¹15å¤©ï¼æ°ç15天 |
| | | columnName:'å¾å·', |
| | |
| | | msg:'basicData.msg.range99999Dec2' |
| | | }, |
| | | orderIdType:'year',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ,year:æ¯å¹´çæ |
| | | orderIdTypeLetter:'NG',//订åå·åé¢åæ¯ |
| | | orderIdTypeMantissa:2,//订åå·å°¾æ°ä¿ç使° orderIdTypeLetteré¿åº¦+orderIdTypeMantissa =4 |
| | | deliveryIdType:'day',//å端çæåè´§åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ |
| | | deliveryDate:7,//订åå建éè´§æ¥æ 天津7天ï¼å¸¸å·7天ï¼ä¹ä¹15å¤©ï¼æ°ç15天 |
| | | columnName:'å¾å·',//æå°çäº§åæ¶éè¦æ¾ç¤ºçååï¼æ²¡æä¸ºç©º |
| | |
| | | msg:'basicData.msg.range9999Dec' |
| | | }, |
| | | orderIdType:'month',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ |
| | | orderIdTypeLetter:'NG',//订åå·åé¢åæ¯ |
| | | orderIdTypeMantissa:2,//订åå·å°¾æ°ä¿ç使° orderIdTypeLetteré¿åº¦+orderIdTypeMantissa =4 |
| | | deliveryIdType:'month',//å端çæåè´§åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ |
| | | deliveryDate:7,//订åå建éè´§æ¥æ 天津7天ï¼å¸¸å·7天ï¼ä¹ä¹15å¤©ï¼æ°ç15天 |
| | | columnName:'å¼å½¢åæ°',//æå°çäº§åæ¶éè¦æ¾ç¤ºçååï¼æ²¡æä¸ºç©º |
| | |
| | | msg:'basicData.msg.range99999Dec2' |
| | | }, |
| | | orderIdType:'year',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ,year:æå¹´çæ |
| | | orderIdTypeLetter:'NG',//订åå·åé¢åæ¯ |
| | | orderIdTypeMantissa:2,//订åå·å°¾æ°ä¿ç使° orderIdTypeLetteré¿åº¦+orderIdTypeMantissa =4 |
| | | deliveryIdType:'day',//å端çæåè´§åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ |
| | | deliveryDate:15,//订åå建éè´§æ¥æ 天津7天ï¼å¸¸å·7天ï¼ä¹ä¹15å¤©ï¼æ°ç15天 |
| | | columnName:'å¾å·',//æå°çäº§åæ¶éè¦æ¾ç¤ºçååï¼æ²¡æä¸ºç©º |
| | |
| | | msg:'basicData.msg.range99999Dec2' |
| | | }, |
| | | orderIdType:'day',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ,year:æ¯å¹´çæ |
| | | orderIdTypeLetter:'NG',//订åå·åé¢åæ¯ |
| | | orderIdTypeMantissa:2,//订åå·å°¾æ°ä¿ç使° orderIdTypeLetteré¿åº¦+orderIdTypeMantissa =4 |
| | | deliveryIdType:'day', |
| | | deliveryDate:15,//订åå建éè´§æ¥æ 天津7天ï¼å¸¸å·7天ï¼ä¹ä¹15å¤©ï¼æ°ç15天 |
| | | columnName:'å¾å·', |
| | |
| | | msg:'basicData.msg.range99999Dec2' |
| | | }, |
| | | orderIdType:'day',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ,year:æ¯å¹´çæ |
| | | orderIdTypeLetter:'NG',//订åå·åé¢åæ¯ |
| | | orderIdTypeMantissa:2,//订åå·å°¾æ°ä¿ç使° orderIdTypeLetteré¿åº¦+orderIdTypeMantissa =4 |
| | | deliveryIdType:'day',//å端çæåè´§åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ |
| | | deliveryDate:15,//订åå建éè´§æ¥æ 天津7天ï¼å¸¸å·7天ï¼ä¹ä¹15å¤©ï¼æ°ç15天 |
| | | columnName:'å¾å·',//æå°çäº§åæ¶éè¦æ¾ç¤ºçååï¼æ²¡æä¸ºç©º |
| | |
| | | //regexp:/^(0|[1-9][0-9]{0,3}([.][0-9]{1,2})?)$/,//æ£å0.00-9999.99 |
| | | msg:'basicData.msg.range99999Dec2' |
| | | }, |
| | | orderIdType:'year',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ,year:æ¯å¹´çæ |
| | | orderIdType:'day',//å端çæè®¢åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ,year:æ¯å¹´çæ |
| | | orderIdTypeLetter:'R',//订åå·åé¢åæ¯ |
| | | orderIdTypeMantissa:3,//订åå·å°¾æ°ä¿ç使° orderIdTypeLetteré¿åº¦+orderIdTypeMantissa =4 |
| | | deliveryIdType:'day',//å端çæåè´§åå·ç±»åï¼day:æ¯å¤©çæï¼month:æ¯æçæ |
| | | deliveryDate:15,//订åå建éè´§æ¥æ 天津7天ï¼å¸¸å·7天ï¼ä¹ä¹15å¤©ï¼æ°ç15天 |
| | | columnName:'å¾å·',//æå°çäº§åæ¶éè¦æ¾ç¤ºçååï¼æ²¡æä¸ºç©º |
| | |
| | | } |
| | | |
| | | }, |
| | | searchDeliverFilter:{ |
| | | list:ref([]), |
| | | data:{} |
| | | |
| | | }, |
| | | projectNo:ref(), |
| | | optimizeData:{ |
| | | optimalResults:'', |
| | |
| | | } |
| | | } |
| | | } |
| | | this.searchDeliverFilter={ |
| | | list:[], |
| | | data:{} |
| | | } |
| | | this.projectNo=null |
| | | this.optimizeData={ |
| | | optimalResults:null, |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | .mainDiv1{ |
| | | //background-color: #1890FF; |
| | | //overflow: hidden; |
| | | width: 100%; |
| | | height: 100%; |
| | | width: 100vw; |
| | | height: 100vh; |
| | | |
| | | display: grid; |
| | | place-items: center; /* åæ¶æ°´å¹³ååç´å±
ä¸ */ |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const brokenGridKey = ref(0) |
| | | const openedBrokenTable = async () => { |
| | | brokenGridKey.value++ |
| | | await nextTick() |
| | | console.log('breakageType:', titleSelectJson.value.breakageType) |
| | | console.log('breakageReason:', titleSelectJson.value.breakageReason) |
| | |
| | | +brokenRow.glass_child+'.'+brokenRow.order_number+'.'+brokenRow.technology_number" |
| | | style="width: 80%;height:75% "> |
| | | <vxe-grid |
| | | |
| | | :key="brokenGridKey" |
| | | height="400px" |
| | | ref="brokenGrid" |
| | | class="mytable-scrollbar" |
| | |
| | | import {multiply} from "@/utils/decimal"; |
| | | import MaterialAddition from "@/views/mm/ingredientStock/MaterialAddition.vue"; |
| | | import {copyTableCellValue} from "@/hook/copyTableCellValue"; |
| | | import SelectOrderList from "@/views/sd/delivery/SelectOrderList.vue"; |
| | | import { ElDialog } from "element-plus"; |
| | | |
| | | //è¯è¨è·å |
| | | const { t } = useI18n() |
| | |
| | | let otherMoneyVisible = ref(false) |
| | | let otherMoney = ref(null) |
| | | |
| | | const dialogSelectOrderVisible = ref(false); // æ§å¶å¼¹çªæ¾ç¤º |
| | | const currentOrderIds = ref([]); // å·²æç订åIDï¼ç¨äºæé¤ |
| | | |
| | | |
| | | // åå§åå·²é订åIDï¼å¨onMountedä¸è°ç¨ï¼ |
| | | const initCurrentOrderIds = () => { |
| | | if (produceList && produceList.length > 0) { |
| | | const orderIds = produceList.map(item => item.orderId); |
| | | currentOrderIds.value = [...new Set(orderIds)]; |
| | | }else { |
| | | currentOrderIds.value = []; |
| | | } |
| | | }; |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // å®ä¹æ£å表达å¼ï¼æ¥æ¾å°æ°ç¹ |
| | |
| | | //ç¦ç¨æé® |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | gridOptions.toolbarConfig.buttons[3].disabled = true |
| | | //gridOptions.toolbarConfig.buttons[4].disabled = false |
| | | //æ¾ç¤ºå¤éæ¡ |
| | | xGrid.value.showColumn("select") |
| | | gridOptions.loading=false |
| | |
| | | if(titleUploadData.value.deliveryState!==0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //gridOptions.toolbarConfig.buttons[4].disabled = true |
| | | } |
| | | if(titleUploadData.value.deliveryState===0){ |
| | | gridOptions.toolbarConfig.buttons[3].disabled = true |
| | |
| | | {'code': 'addToExamine', 'name': t('reportingWorks.saveAndReview'),status: 'primary',icon: 'vxe-icon-save'}, |
| | | {'code': 'toExamine', 'name': t('basicData.review'),status: 'primary'}, |
| | | {'code': 'CounterExamination', 'name': t('basicData.cancelReview'),status: 'primary'}, |
| | | //{'code': 'addOtherOrders','name': t('è®¢åæ·»å '),'status': 'primary'} |
| | | //{'code': 'glassShelf', 'name': t('finishedGlassShelf.finishedGlassShelfEmit'),status: 'primary'} |
| | | ], |
| | | /*import: false, |
| | |
| | | }) |
| | | break |
| | | } |
| | | case 'addOtherOrders': { |
| | | // æ¾ç¤ºå¼¹çªåæ´æ°å·²é订åID |
| | | initCurrentOrderIds(); |
| | | // æ¾ç¤ºå¼¹çª |
| | | dialogSelectOrderVisible.value = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | }; |
| | | |
| | | |
| | | // å¤çä»SelectOrderListéä¸ç订å |
| | | const handleSelectedOrders = async (selectedOrders) => { |
| | | if (!selectedOrders || selectedOrders.length === 0) return; |
| | | |
| | | // å
³éå¼¹çª |
| | | dialogSelectOrderVisible.value = false; |
| | | |
| | | // éªè¯éä¸çè®¢åæ¯å¦ç¬¦åæ¡ä»¶ |
| | | const { customerId, project } = titleUploadData.value; |
| | | const invalidOrders = selectedOrders.filter(order => |
| | | order.customerId !== parseInt(customerId) || order.project !== project |
| | | ); |
| | | |
| | | if (invalidOrders.length > 0) { |
| | | ElMessage.warning(t('delivery.onlySameCustomerProject')); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | // æ¾ç¤ºå è½½ç¶æ |
| | | gridOptions.loading = true; |
| | | |
| | | // æ¹éæ¥è¯¢è®¢åæç»ï¼æè®¢åIDï¼ |
| | | const orderIds = selectedOrders.map(order => order.orderId).join('|'); |
| | | filterData.value.orderId=orderIds |
| | | request.post("/delivery/getSelectShippingOrderDetails/1/100",filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | // å¤çè¿åçæç»æ°æ® |
| | | const orderDetails = res.data.data || []; |
| | | //åå¹¶æ°æ® |
| | | mergeData(orderDetails); |
| | | } else { |
| | | ElMessage.warning(res.msg || t('basicData.msg.dataè·å失败')); |
| | | } |
| | | }) |
| | | } catch (error) { |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')); |
| | | console.error('æ¥è¯¢è®¢åæç»å¤±è´¥:', error); |
| | | } finally { |
| | | // å
³éå è½½ç¶æ |
| | | gridOptions.loading = false; |
| | | } |
| | | }; |
| | | |
| | | // åå¹¶æ°æ®ï¼å¤æorderIdãorderNumberãboxNoæ¯å¦ç¸åï¼ç¸ååç´¯å æ°éï¼ä¸ååæ°å¢ |
| | | const mergeData = (newDataList) => { |
| | | // å¤å¶ç°ææ°æ®ï¼é¿å
ç´æ¥ä¿®æ¹ååºå¼æºæ°æ®ï¼ |
| | | const currentList = [...produceList]; |
| | | |
| | | newDataList.forEach(newItem => { |
| | | // æåæ°æ°æ®çå
³é®æ¯å¯¹å段 |
| | | const newOrderId = newItem.orderId; |
| | | const newOrderNumber = newItem.orderNumber; |
| | | const newBoxNo = newItem.finishedGoodsInventory?.boxNo || ''; // å¤çå¯è½çundefined |
| | | |
| | | // å¨ç°ææ°æ®ä¸æ¥æ¾å¹é
项ï¼ä¸ä¸ªå段å®å
¨ç¸åï¼ |
| | | const matchedItem = currentList.find(item => |
| | | item.orderId === newOrderId && |
| | | item.orderNumber === newOrderNumber && |
| | | (item.finishedGoodsInventory?.boxNo || '') === newBoxNo |
| | | ); |
| | | |
| | | if (matchedItem) { |
| | | // æ¾å°å¹é
项ï¼ç´¯å æ°éï¼ç¡®ä¿æ¯æ°å¼ç±»åï¼ |
| | | matchedItem.deliveryDetail.quantity = (Number(matchedItem.deliveryDetail.quantity) || 0) + |
| | | (Number(newItem.deliveryDetail.quantity) || 0); |
| | | } else { |
| | | // æªæ¾å°å¹é
é¡¹ï¼æ°å¢ä¸æ¡æ°æ® |
| | | currentList.push(newItem); |
| | | } |
| | | }); |
| | | |
| | | // æ´æ°ååºå¼æ°æ® |
| | | produceList = currentList; |
| | | // å·æ°è¡¨æ ¼ |
| | | xGrid.value.reloadData(produceList); |
| | | }; |
| | | |
| | | </script> |
| | | |
| | |
| | | @handle-result="handleChildResult2" |
| | | /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-model="dialogSelectOrderVisible" |
| | | :title="t('è®¢åæ·»å ')" |
| | | style="width: 70%;height:75% " |
| | | destroy-on-close |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false"> |
| | | <SelectOrderList |
| | | style="width: 100%;height: 600px" |
| | | :customer-id="titleUploadData.customerId" |
| | | :project="titleUploadData.project" |
| | | :exclude-order-ids="currentOrderIds" |
| | | @select-orders="handleSelectedOrders" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive, ref} from "vue"; |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | |
| | | |
| | | //çéæ¡ä»¶ï¼æå¤é®éè¦å
å®ä¹æç»éé¢çæ°æ® |
| | | let filterData = ref({}) |
| | | let sortData = ref({ |
| | | field:'id', |
| | | order:null |
| | | }) |
| | | |
| | | let selectDate = ref(["",""]) |
| | | |
| | |
| | | pageSize : 100 |
| | | }) |
| | | |
| | | //ç¬¬ä¸æ¬¡è°ç¨ |
| | | request.post(`/delivery/getSelectShippingOrder/1/${total.pageSize}/${orderInfo.selectDeliveryDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | orderInfo.selectDeliveryDate = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | if(company.companyName=='æ´é³åæ¹ç»çææ¯è¡ä»½æéå
¬å¸'){ |
| | | xGrid.value.menuConfig.body.options[0][2].visible=true |
| | | xGrid.value.menuConfig.body.options[0][3].visible=true |
| | | xGrid.value.menuConfig.body.options[0][4].visible=true |
| | | xGrid.value.menuConfig.body.options[0][5].visible=true |
| | | } |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | onMounted(async () => { |
| | | filterData.value = orderInfo.searchDeliverFilter.data |
| | | await getDeliveryList() |
| | | orderInfo.searchDeliverFilter.list.forEach(item =>{ |
| | | xGrid.value.getColumnByField(item.field).filters = item.column.filters |
| | | }) |
| | | }) |
| | | |
| | | const getDeliveryList = async () => { |
| | | //å è½½è¯·æ± |
| | | const config = { |
| | | filter: filterData.value, |
| | | sort: sortData.value |
| | | } |
| | | await request.post(`/delivery/getSelectShippingOrder/1/${total.pageSize}/${orderInfo.selectDeliveryDate}`,config).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | orderInfo.selectDeliveryDate = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | if(company.companyName=='æ´é³åæ¹ç»çææ¯è¡ä»½æéå
¬å¸'){ |
| | | xGrid.value.menuConfig.body.options[0][2].visible=true |
| | | xGrid.value.menuConfig.body.options[0][3].visible=true |
| | | xGrid.value.menuConfig.body.options[0][4].visible=true |
| | | xGrid.value.menuConfig.body.options[0][5].visible=true |
| | | } |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | //å®ä¹å½åé¡µæ° |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post(`/delivery/getSelectShippingOrder/1/${total.pageSize}/${orderInfo.selectDeliveryDate}`,filterData.value).then((res) => { |
| | | |
| | | const config = { |
| | | filter: filterData.value, |
| | | sort: sortData.value |
| | | } |
| | | request.post(`/delivery/getSelectShippingOrder/1/${total.pageSize}/${orderInfo.selectDeliveryDate}`,config).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | |
| | | xGrid.value.menuConfig.body.options[0][2].visible=true |
| | | xGrid.value.menuConfig.body.options[0][3].visible=true |
| | | } |
| | | |
| | | orderInfo.searchDeliverFilter.list = xGrid.value.getCheckedFilters() |
| | | orderInfo.searchDeliverFilter.data = filterData.value |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/delivery/getSelectShippingOrder/${pageNum.value}/${total.pageSize}/${orderInfo.selectDeliveryDate}`,filterData.value).then((res) => { |
| | | const config = { |
| | | filter: filterData.value, |
| | | sort: sortData.value |
| | | } |
| | | request.post(`/delivery/getSelectShippingOrder/${pageNum.value}/${total.pageSize}/${orderInfo.selectDeliveryDate}`,config).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |
| | | }, |
| | | sortChange ({ field, order }) { |
| | | sortData.value = {field,order} |
| | | selectOrderList() |
| | | } |
| | | } |
| | | |
| | |
| | | filterConfig: { //çéé
置项 |
| | | remote: true |
| | | }, |
| | | sortConfig: { //æåºé
置项 |
| | | remote: true//æ¯å¦æå¡ç«¯æåº |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from "vue-router" |
| | | import {reactive, ref} from "vue"; |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import VXETable from "vxe-table"; |
| | |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let produceList = ref([]) |
| | | |
| | | |
| | | const props = defineProps({ |
| | | customerId: null, |
| | | project: null, |
| | | excludeOrderIds: null |
| | | }) |
| | | |
| | | const emit = defineEmits(['selectOrders']) |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | |
| | | //çéæ¡ä»¶ï¼æå¤é®éè¦å
å®ä¹æç»éé¢çæ°æ® |
| | | let filterData = ref({ |
| | | |
| | | finishedGoodsInventory:{ |
| | | quantityAvailable:'', |
| | | |
| | | }, |
| | | |
| | | }) |
| | | let selectDate = ref(["",""]) |
| | | |
| | |
| | | }) |
| | | |
| | | |
| | | //ç¬¬ä¸æ¬¡è°ç¨ |
| | | request.post(`/delivery/getSelectOrderInventory/1/${total.pageSize}/${orderInfo.selectOrderListDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | orderInfo.selectOrderListDate = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | // ç¬¬ä¸æ¬¡è°ç¨ï¼ä¿®æ¹ä¸ºå¸¦ç鿡件 |
| | | const fetchOrders = async () => { |
| | | |
| | | await request.post(`/delivery/getSelectOrderInventory/${pageNum.value}/${total.pageSize}/${orderInfo.selectOrderListDate}`, filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | orderInfo.selectOrderListDate = res.data.selectDate |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | onMounted(async () => { |
| | | if (props.customerId !== undefined) { |
| | | filterData.value.customerId = props.customerId |
| | | filterData.value.project = props.project |
| | | filterData.value.excludeOrderIds = props.excludeOrderIds |
| | | gridOptions.toolbarConfig.buttons[0].visible = false |
| | | |
| | | await fetchOrders() |
| | | } else { |
| | | gridOptions.toolbarConfig.buttons[1].visible = false |
| | | filterData.value = orderInfo.searchOrderFilter.data |
| | | await fetchOrders() |
| | | orderInfo.searchOrderFilter.list.forEach(item => { |
| | | xGrid.value.getColumnByField(item.field).filters = item.column.filters |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | |
| | | }) |
| | | |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // æå¨è§¦åçé |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | if(props.customerId!==undefined){ |
| | | filterData.value.customerId = props.customerId |
| | | filterData.value.project = props.project |
| | | filterData.value.excludeOrderIds = props.excludeOrderIds |
| | | gridOptions.toolbarConfig.buttons[0].visible = false |
| | | }else{ |
| | | gridOptions.toolbarConfig.buttons[1].visible = false |
| | | } |
| | | |
| | | request.post(`/delivery/getSelectOrderInventory/1/${total.pageSize}/${orderInfo.selectOrderListDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | |
| | | //䏿¯å¼¹çªçé¢ |
| | | if(props.customerId===undefined){ |
| | | orderInfo.searchOrderFilter.list = xGrid.value.getCheckedFilters() |
| | | orderInfo.searchOrderFilter.data = filterData.value |
| | | } |
| | | |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | |
| | | |
| | | const changeDate = ()=>{ |
| | | pageNum.value=1 |
| | | selectOrderList() |
| | | fetchOrders() |
| | | } |
| | | |
| | | //页è跳转 |
| | |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | fetchOrders() |
| | | } |
| | | |
| | | |
| | |
| | | {field: 'customerId',width:120, title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'finishedGoodsInventory.quantityAvailable',width:120, title: t('delivery.availableStock'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'finishedGoodsInventory.quantityAvailable',width:120, title: t('delivery.availableStock'), sortable: true}, |
| | | {field: 'project',width:120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'batch',width:120, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'money',width:120, title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | ],//表头æé® |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'add', 'name': t('delivery.delivery'),status: 'primary',icon: 'vxe-icon-add'} |
| | | {'code': 'add', 'name': t('delivery.delivery'),status: 'primary',icon: 'vxe-icon-add'}, |
| | | {'code': 'update', 'name': t('delivery.delivery'),status: 'primary',icon: 'vxe-icon-add'} |
| | | ], |
| | | /*import: false, |
| | | export: true, |
| | |
| | | router.push({path: '/main/delivery/createDelivery', query: { orderId: order_id }}) |
| | | break |
| | | } |
| | | case 'update': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | |
| | | // éªè¯æéè®¢åæ¯å¦ç¬¦åæ¡ä»¶ï¼è½ç¶å·²çéï¼ä½äºæ¬¡éªè¯æ´å®å
¨ï¼ |
| | | const customerIdArray = selectRecords.map(item => item.customerId) |
| | | const projectArray = selectRecords.map(item => item.project?.trim() || '') |
| | | |
| | | if(!isAllEqual(customerIdArray)){ |
| | | ElMessage.warning(t('delivery.pleaseSelectTheSameCustomerOrder')) |
| | | return |
| | | } |
| | | if(!isAllEqual(projectArray)){ |
| | | ElMessage.warning(t('delivery.pleaseSelectTheSameCustomerProject')) |
| | | return |
| | | } |
| | | |
| | | const simpleOrders = selectRecords.map(order => ({ |
| | | orderId: order.orderId, |
| | | customerId: order.customerId, |
| | | project: order.project, |
| | | // å¯è¡¥å
å
¶ä»éè¦ç主订ååæ®µ |
| | | })); |
| | | |
| | | // éè¿äºä»¶è¿åç»ç¶ç»ä»¶ |
| | | emit('select-orders', simpleOrders); |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | creator:userStore.user.userName, |
| | | creatorId:userStore.user.userId, |
| | | newOrderId:newOrderId.value, |
| | | position:company.position |
| | | position:company.position, |
| | | orderIdTypeLetter:company.orderIdTypeLetter, |
| | | orderIdTypeMantissa:company.orderIdTypeMantissa |
| | | } |
| | | const grossAreaList = $grid.getTableData().fullData.filter( |
| | | item=>item.grossArea === 0 |
| New file |
| | |
| | | <script setup> |
| | | import {onBeforeMount, onMounted, reactive, ref} from "vue" |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import request from "@/utils/request" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import {useI18n} from "vue-i18n" |
| | | import {ElMessage, ElMessageBox} from "element-plus" |
| | | import deepClone from "@/utils/deepClone"; |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const dialogVisible = ref(false) |
| | | const dialogVisibleProcess = ref(false) |
| | | let roleList = ref([]) |
| | | //å·¥åº |
| | | const processValue = ref() |
| | | let userRole= ref({ |
| | | userId:'', |
| | | roles:[] |
| | | }) |
| | | let processRow = ref({ |
| | | process: null, |
| | | userId:null |
| | | }) |
| | | let produceList = ref([]) |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//è¡¨æ ¼å è¾¹æ¡ |
| | | keepSource: true,//ä¿ææºæ°æ® |
| | | align: 'center',//æåå±
ä¸ |
| | | stripe:true,//æé©¬çº¹ |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//é¼ æ ç§»å¨æéæ©é«äº® |
| | | id: 'userList', |
| | | showFooter: false,//æ¾ç¤ºè |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//å¼å¯èææ»å¨ |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //çéé
置项 |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | |
| | | //è¡¨å¤´åæ° |
| | | columns:[ |
| | | {type: 'seq', title: t('basicData.Number'), width: 80 ,fixed:"left"}, |
| | | {field: 'operator_id',width:120, title: t('ç»å½å'), sortable: true, filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'operator',width:120, title: t('ç¨æ·å'), sortable: true, filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'format_create_time',width:160, title: t('ç»å½æ¶é´'),sortable: true}, |
| | | ], |
| | | |
| | | //表头æé® |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | |
| | | ], |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | }) |
| | | |
| | | onMounted(()=>{ |
| | | request.post('/user/getUserLog').then(res=>{ |
| | | if(res.code==200){ |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | }) |
| | | |
| | | const getTableRow = (row,type) => { |
| | | switch (type) { |
| | | case 'edit': { |
| | | userRole.value.roles = [] |
| | | dialogVisible.value = true |
| | | row.userRoleList.forEach(item=>{ |
| | | userRole.value.roles.push(item.roleId) |
| | | }) |
| | | userRole.value.userId = row.id |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/userInfo/userDelete/${row.id}`).then((res) => { |
| | | if(res.code==200 && res.data ===true){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({path:'/main/user/userList',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('searchOrder.msgDeleteFail')) |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | case 'editProcess': { |
| | | dialogVisibleProcess.value = true |
| | | processRow.value.userId = row.id |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | const handleClose = (done) => { |
| | | userRole.value.roles = [] |
| | | done() |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | > |
| | | <template #filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{ $t('user.setUpRoles') }}</el-button> |
| | | <el-button @click="getTableRow(row,'editProcess')" link type="primary" size="small">{{ $t('user.setProcess') }}</el-button> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> |
| | | <template #reference> |
| | | <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @keyup.enter.native="$panel.confirmFilter()" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="$t('user.roleSelection')" |
| | | width="30%" |
| | | :before-close="handleClose" |
| | | > |
| | | <span> |
| | | <el-radio v-for="(item) in roleList" |
| | | :label="item.id" |
| | | v-model="userRole.roles" > |
| | | {{item.role}} |
| | | </el-radio> |
| | | </span> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">{{ $t('basicData.cancelButtonText') }}</el-button> |
| | | <el-button type="primary" @click="roleUpdate"> |
| | | {{ $t('basicData.confirmButtonText') }} |
| | | </el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog |
| | | v-model="dialogVisibleProcess" |
| | | :title="$t('user.roleSelection')" |
| | | width="30%" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-select v-model="processValue" clearable :placeholder="$t('reportingWorks.selectProcess')" default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in processRow['process']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogVisibleProcess = false">{{ $t('basicData.cancelButtonText') }}</el-button> |
| | | <el-button type="primary" @click="updateProcess"> |
| | | {{ $t('basicData.confirmButtonText') }} |
| | | </el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .dialog-footer button:first-child { |
| | | margin-right: 10px; |
| | | } |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 0px); |
| | | } |
| | | </style> |
| New file |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router" |
| | | import {useI18n} from "vue-i18n" |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="main-div"> |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/userLog/userListLog' }">{{$t('æ¥å¿é¦é¡µ')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" /> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | #div-title{ |
| | | height: 2%; |
| | | width: 100%; |
| | | } |
| | | #searchButton{ |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } |
| | | /*main-bodyæ ·å¼*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | | margin-top: 1%; |
| | | } |
| | | #select{ |
| | | margin-left:0.5rem; |
| | | } |
| | | :deep(.indexTag .el-breadcrumb__inner){ |
| | | color: #5CADFE !important; |
| | | } |
| | | </style> |
| | |
| | | |
| | | @ApiOperation("å¯å
¥åºçæåæ¥è¯¢æ¥å£") |
| | | @PostMapping("/getSelectWarehousingList") |
| | | @SaCheckPermission("createProductStock.search") |
| | | public Result getSelectWarehousingList(@RequestBody Map<String,String> map){ |
| | | return Result.success(finishedGoodsInventoryService.getSelectWarehousingApp(map.get("processId"))); |
| | | } |
| | | |
| | | @ApiOperation("æåå
¥åºæ¥å£") |
| | | @PostMapping("/addSelectWarehousing") |
| | | @SaCheckPermission("createProductStock.add") |
| | | public Result addSelectWarehousing( @RequestBody Map<String,Object> object){ |
| | | return Result.success(finishedGoodsInventoryService.addSelectWarehousing(object)); |
| | | |
| | |
| | | |
| | | @ApiOperation("å¯åè´§çæåæ¥è¯¢æ¥å£") |
| | | @PostMapping("/getSelectDeliveryDetailList") |
| | | @SaCheckPermission("finishedProductOut.search") |
| | | public Result getSelectDeliveryDetailList(){ |
| | | return Result.success(finishedGoodsInventoryService.getSelectDeliveryDetailApp()); |
| | | } |
| | | |
| | | @ApiOperation("æååºåºæ¥å£") |
| | | @PostMapping("/addDeliveryDetail") |
| | | @SaCheckPermission("finishedProductOut.add") |
| | | public Result addDeliveryDetail( @RequestBody Map<String,Object> object){ |
| | | return Result.success(finishedGoodsInventoryService.addDeliveryDetail(object)); |
| | | } |
| | |
| | | @ApiOperation("åè´§è®¢åæ¥è¯¢æ¥å£") |
| | | @SaCheckPermission("selectDelivery.search") |
| | | @PostMapping("/getSelectShippingOrder/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Delivery delivery) throws JsonProcessingException { |
| | | return Result.success(deliveryService.getSelectShippingOrder(pageNum,pageSize,selectDate,delivery)); |
| | | public Result getSelectShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Map<String,Object> config) throws JsonProcessingException { |
| | | return Result.success(deliveryService.getSelectShippingOrder(pageNum,pageSize,selectDate,config)); |
| | | } |
| | | |
| | | /*åè´§æ¥è¡¨æ¥è¯¢*/ |
| | |
| | | return Result.success( userService.updateUserName(object)); |
| | | } |
| | | |
| | | @ApiOperation("ç¨æ·ç»å½è®°å½") |
| | | @PostMapping("/getUserLog") |
| | | public Result getUserLog(){ |
| | | return Result.success( userService.getUserLog()); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.example.erp.dto.sd; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.example.erp.entity.sd.Order; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | |
| | | @Data |
| | | public class DeliverySearchDTO { |
| | | @ExcelProperty("ç¼å·") |
| | | private Long id; |
| | | @ExcelProperty("åè´§ç¶æ") |
| | | private Integer deliveryState; |
| | | @ExcelProperty("åºåºç¶æ") |
| | | private Integer stockState; |
| | | @ExcelProperty("仿¬¾æ¡ä»¶") |
| | | private String paymentTerms; |
| | | @ExcelProperty("åè´§åå·") |
| | | private String deliveryId; |
| | | @ExcelProperty("订åç¼å·") |
| | | private String orderId; |
| | | @ExcelProperty("项ç®åç§°") |
| | | private String project; |
| | | @ExcelProperty("客æ·ç¼å·") |
| | | private String customerId; |
| | | @ExcelProperty("客æ·åç§°") |
| | | private String customerName; |
| | | @ExcelProperty("åè´§æ¥æ") |
| | | private LocalDate deliveryDate; |
| | | @ExcelProperty("æ¯ä»æ¹å¼") |
| | | private String payMethod; |
| | | @ExcelProperty("æ¯ä»æ¥æ") |
| | | private LocalDate payDate; |
| | | @ExcelProperty("éå®äººid") |
| | | private String salesmanId; |
| | | @ExcelProperty("éå®äºº") |
| | | private String salesman; |
| | | @ExcelProperty("å建人id") |
| | | private String creatorId; |
| | | @ExcelProperty("å建人") |
| | | private String creator; |
| | | @ExcelProperty("è系人") |
| | | private String contacts; |
| | | @ExcelProperty("èç³»çµè¯") |
| | | private String contactNumber; |
| | | @ExcelProperty("éè´§å°å") |
| | | private String deliveryAddress; |
| | | @ExcelProperty("é¢ç§¯") |
| | | private Double area; |
| | | @ExcelProperty("æ°é") |
| | | private Integer quantity; |
| | | @ExcelProperty("æ»éé¢") |
| | | private Double money; |
| | | @ExcelProperty("å
¶ä»éé¢") |
| | | private Double otherMoney; |
| | | @ExcelProperty("è¿è´¹éé¢") |
| | | private Double freight; |
| | | @ExcelProperty("è¿è´¹æ°é") |
| | | private Integer freightQuantity; |
| | | @ExcelProperty("è¿è´¹åä»·") |
| | | private Double freightPrice; |
| | | @ExcelProperty("æå°æ¬¡æ°") |
| | | private Integer printingNumber; |
| | | @ExcelProperty("夿³¨") |
| | | private String remarks; |
| | | @ExcelProperty("å建æ¶é´") |
| | | private LocalDate createTime; |
| | | @ExcelProperty("ä¿®æ¹æ¶é´") |
| | | private LocalDate updateTime; |
| | | |
| | | private Order order; |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @TableName("sd.`order`") |
| | |
| | | private Integer goodsQuantity; |
| | | @TableField(select = false,exist = false) |
| | | private String timeOut; |
| | | @TableField(select = false,exist = false) |
| | | private List<String> excludeOrderIds; |
| | | |
| | | @TableField(value = "customer_id") |
| | | private Customer customer; |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.example.erp.dto.sd.DeliverySearchDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | |
| | | |
| | | List<Delivery> getSelectShippingOrder(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("delivery") Delivery delivery); |
| | | @Param("delivery") DeliverySearchDTO delivery,String field, String orderBy); |
| | | |
| | | Delivery getSelectShippingOrderDetailDelivery(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | |
| | | Order getSelectShippingOrderDetailDeliverys(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | Map<String,Integer> getSelectShippingOrderPageTotal(Integer offset, Integer pageSize, String startDate, String endDate, Delivery delivery); |
| | | Map<String,Integer> getSelectShippingOrderPageTotal(Integer offset, Integer pageSize, String startDate, String endDate, DeliverySearchDTO delivery); |
| | | |
| | | List<Order> getSelectOrderInventory(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | |
| | |
| | | List<User> findByAddress(String userName); |
| | | |
| | | String selectOptimizeParmsById(@Param("username") String username); |
| | | |
| | | List<Map<String, Object>> getUserLog(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.dto.sd.DeliverySearchDTO; |
| | | import com.example.erp.dto.sd.OrderSearchDTO; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | |
| | | FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | |
| | | |
| | | public Map<String, Object> getSelectShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Delivery delivery) throws JsonProcessingException { |
| | | public Map<String, Object> getSelectShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Map<String,Object> config) throws JsonProcessingException { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | JSONObject orderJson = new JSONObject(config); |
| | | DeliverySearchDTO delivery = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("filter")), DeliverySearchDTO.class); |
| | | Map<String,String> sortDate = (Map<String, String>) config.get("sort"); |
| | | String field = sortDate.get("field").replaceAll("(?<!^)([A-Z])", "_$1").toLowerCase(); |
| | | String orderBy = sortDate.get("order"); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", deliveryMapper.getSelectShippingOrder(offset, pageSize,startDate,endDate, delivery)); |
| | | map.put("data", deliveryMapper.getSelectShippingOrder(offset, pageSize,startDate,endDate, delivery,field, orderBy)); |
| | | map.put("total", deliveryMapper.getSelectShippingOrderPageTotal(offset, pageSize,startDate,endDate, delivery)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.sql.SQLOutput; |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | |
| | | public boolean saveOrder(Map<String,Object> orderMap) throws Exception { |
| | | JSONObject orderJson = new JSONObject(orderMap); |
| | | String orderIdType = orderJson.getString("orderIdType"); |
| | | String orderIdTypeLetter = orderJson.getString("orderIdTypeLetter"); |
| | | Integer orderIdTypeMantissa = orderJson.getInteger("orderIdTypeMantissa"); |
| | | Order order = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("title")), Order.class); |
| | | List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("detail")), OrderDetail.class); |
| | | List<OrderOtherMoney> orderOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("otherMoney")), OrderOtherMoney.class); |
| | |
| | | log.setContent(orderMap.toString()); |
| | | |
| | | if(order.getOrderId() == null || order.getOrderId().isEmpty()){ |
| | | insertOrder(order,OrderDetails,orderOtherMoneyList,orderIdType, (Map<String, String>) orderMap.get("position")); |
| | | insertOrder(order, |
| | | OrderDetails,orderOtherMoneyList,orderIdType, |
| | | (Map<String, String>) orderMap.get("position"), |
| | | orderIdTypeLetter, |
| | | orderIdTypeMantissa |
| | | ); |
| | | log.setFunction("saveOrderå建:"+order.getOrderId()); |
| | | }else { |
| | | updateOrder(order,OrderDetails,orderOtherMoneyList,(Map<String, String>) orderMap.get("position")); |
| | |
| | | return map; |
| | | } |
| | | //çæè®¢åæ°æ® |
| | | public void insertOrder(Order order, List<OrderDetail> OrderDetails, List<OrderOtherMoney> orderOtherMoneyList, String orderIdType, Map<String,String> position) { |
| | | public void insertOrder(Order order, List<OrderDetail> OrderDetails, List<OrderOtherMoney> orderOtherMoneyList, String orderIdType, Map<String,String> position, String orderIdTypeLetter, Integer orderIdTypeMantissa) { |
| | | //æ ¹æ®ä¼ å
¥çå½åæä»½æè
å½å¤©çæè®¢åid |
| | | String orderId = getOrderId(orderIdType); |
| | | String orderId = getOrderId(orderIdType,orderIdTypeLetter,orderIdTypeMantissa); |
| | | //å¾ä¸»è¡¨ææ°æ® |
| | | order.setOrderId(orderId); |
| | | order.setCreateOrder(2); |
| | |
| | | insertOtherDetail(orderId,OrderDetails,orderOtherMoneyList,position); |
| | | } |
| | | |
| | | private String getOrderId(String dateType){ |
| | | private String getOrderId(String dateType, String orderIdTypeLetter, Integer orderIdTypeMantissa){ |
| | | String orderId = null; |
| | | Integer orderIdTypeLetterLen = orderIdTypeLetter.length(); |
| | | Integer count = orderIdTypeLetterLen+orderIdTypeMantissa; |
| | | if(dateType==null || dateType.equals("day")){ |
| | | Integer maxOrderId = orderMapper.selectMaxOrderId(); |
| | | //æ¥è¯¢è®¢åidï¼å¹¶ä¸èªå¢ |
| | | String formattedNumber = String.format("%02d", maxOrderId+1); |
| | | String formattedNumber = String.format("%0"+orderIdTypeMantissa+"d", maxOrderId+1); |
| | | //æ ¼å¼åå½åæ¥æ |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | orderId = "NG"+formattedDate+formattedNumber; |
| | | orderId = orderIdTypeLetter+formattedDate+formattedNumber; |
| | | }else if(dateType.equals("month")){ |
| | | Integer maxOrderId = orderMapper.selectMaxOrderIdByMonth(); |
| | | String formattedNumber = String.format("%04d", maxOrderId+1); |
| | | String formattedNumber = String.format("%0"+(orderIdTypeMantissa+2)+"d", maxOrderId+1); |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMM"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | orderId = "NG"+formattedDate+formattedNumber; |
| | | orderId = orderIdTypeLetter+formattedDate+formattedNumber; |
| | | |
| | | }else if(dateType.equals("year")){ |
| | | Integer maxOrderId = orderMapper.selectMaxOrderIdByYear(); |
| | | String formattedNumber = String.format("%06d", maxOrderId+1); |
| | | String formattedNumber = String.format("%"+(orderIdTypeMantissa+4)+"d", maxOrderId+1); |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yy"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | orderId = "NG"+formattedDate+formattedNumber; |
| | | orderId = orderIdTypeLetter+formattedDate+formattedNumber; |
| | | } |
| | | return orderId; |
| | | } |
| | |
| | | List<Order> list = orderMapper.selectList(new LambdaQueryWrapper<Order>() |
| | | .apply("create_order > 0") |
| | | .apply("date(create_time) between {0} and {1}",startDate, endDate) |
| | | .orderByDesc(Order::getOrderId) |
| | | ); |
| | | Integer quantity = 0; |
| | | Double area = 0.00; |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.controller.dto.UserDTO; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.Role; |
| | | import com.example.erp.entity.userInfo.User; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | | import com.example.erp.mapper.userInfo.*; |
| | | import com.example.erp.tools.TokenTools; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private final PermissionRoleMapper permissionRoleMapper; |
| | | private final ProductionSchedulingMapper productionSchedulingMapper; |
| | | |
| | | @Autowired |
| | | LogService logService; |
| | | |
| | | public UserService(UserMapper userMapper, RoleMapper roleMapper, PermissionRoleMapper permissionRoleMapper, UserRoleMapper userRoleMapper, ProductionSchedulingMapper productionSchedulingMapper) { |
| | | this.userMapper = userMapper; |
| | |
| | | userDTO.setToken(StpUtil.getTokenValue()); |
| | | Boolean userIsAdmin= userRoleMapper.getUserIsAdmin(user.getId()); |
| | | userDTO.setPermissions(permissionRoleMapper.getUserEditPermission(user.getId(),userIsAdmin)); |
| | | |
| | | Log log = new Log(); |
| | | log.setOperator(user.getUserName()); |
| | | log.setOperatorId(userDTO.getUserId()); |
| | | log.setContent(userDTO.toString()); |
| | | log.setFunction("ç¨æ·ç»å½"); |
| | | logService.saveLog(log); |
| | | return userDTO; |
| | | }else{ |
| | | return null; |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Object getUserLog() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", userMapper.getUserLog()); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | //æ¥è¯¢ç¨æ·ä¼ååæ° |
| | | public String getOptimizeParms(String username) { |
| | |
| | | pd.separation, |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | pd.separation, |
| | | #{compound} as technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | and od.perimeter regexp #{orderDetail.perimeter} |
| | | </if> |
| | | </where> |
| | | order by od.order_id,od.order_number |
| | | </select> |
| | | |
| | | <select id="getSelectShippingOrderDetailsPageTotal"> |
| | |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and o.create_time REGEXP #{order.createTime} |
| | | </if> |
| | | <if test="order.finishedGoodsInventory.quantityAvailable != null and order.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | </where> |
| | | group by o.order_id order by o.id desc |
| | | limit #{offset},#{pageSize}; |
| | |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and o.create_time REGEXP #{order.createTime} |
| | | </if> |
| | | <if test="order.finishedGoodsInventory.quantityAvailable != null and order.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | </where> |
| | | group by o.order_id limit #{offset},#{pageSize}) as zu; |
| | |
| | | |
| | | </where> |
| | | group by d.delivery_id |
| | | order by d.id desc |
| | | order by |
| | | <if test="orderBy == null "> |
| | | d.id desc |
| | | </if> |
| | | <if test="orderBy == 'desc'"> |
| | | d.${field} desc |
| | | </if> |
| | | <if test="orderBy == 'asc'"> |
| | | d.${field} |
| | | </if> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | SELECT optimize_parms FROM erp_user_info.user WHERE user_name = #{username} |
| | | </select> |
| | | |
| | | <select id="getUserLog" > |
| | | SELECT operator_id,operator,DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') AS format_create_time |
| | | FROM erp_log.log |
| | | WHERE create_time >= DATE_SUB(NOW(), INTERVAL 1 MONTH) and `function`='ç¨æ·ç»å½' order by create_time desc limit 0,100 |
| | | </select> |
| | | |
| | | </mapper> |