Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | import QRCode from "qrcode"; |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | import userInfo from "@/stores/userInfo" |
| | | import {add} from '@/utils/decimal' |
| | | //è¯è¨è·å |
| | | const company = companyInfo() |
| | | const {t} = useI18n() |
| | |
| | | totalQuantity += collection.quantity * 1; |
| | | //æ¯ä¸ªåºå·é¢ç§¯ |
| | | collection.total_area = parseFloat((collection.width * collection.height * collection.quantity / 1000000).toFixed(2)) |
| | | totalArea += collection.total_area * 1; |
| | | totalArea = add(totalArea, collection.total_area) |
| | | 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)) |
| | |
| | | |
| | | const AreaQuantitySummary = () => { |
| | | |
| | | |
| | | console.log(produceList.value) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | // éåå½å项ç®ç detail æ°ç» |
| | | for (let j = 0; j < produceList.value[i].detail.length; j++) { |
| | | // ç´¯å æ°é |
| | | totalQuantity += produceList.value[i].detail[j].quantity; |
| | | totalQuantity = add(totalQuantity,produceList.value[i].detail[j].quantity) |
| | | // ç´¯å é¢ç§¯ |
| | | totalArea += produceList.value[i].detail[j].gross_area; |
| | | totalArea = add(totalArea,produceList.value[i].detail[j].gross_area) |
| | | } |
| | | } |
| | | |
| | |
| | | æ°éï¼ |
| | | <label>{{ itemsum.quantity }}</label> |
| | | é¢ç§¯ï¼ |
| | | <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label> |
| | | <label>{{ itemsum.gross_area }}</label> |
| | | ééï¼ |
| | | <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label> |
| | | </td> |
| | |
| | | request.post(`/delivery/getSelectDeliveryPrinting`,form.value).then((res) => { |
| | | if(res.code==200){ |
| | | produceList.value = deepClone(res.data.data) |
| | | console.log(produceList.value) |
| | | delivery.value=deepClone(res.data.delivery) |
| | | money.value=deepClone(res.data.money) |
| | | otherMoney.value=deepClone(res.data.otherMoney) |
| | | produceList.value.forEach(item => { |
| | | sumMoney+=item.DeliveryDetail.money |
| | | }) |
| | | console.log(otherMoney.value) |
| | | otherMoney1=[] |
| | | otherMoney=deepClone(res.data.otherMoney) |
| | | for(let i=0;i<otherMoney.length;i++){ |
| | |
| | | if(res.code==200){ |
| | | productIdData.value=deepClone(res.data.data) |
| | | produceList.value = deepClone(res.data.data) |
| | | |
| | | console.log(produceList.value) |
| | | delivery.value=deepClone(res.data.delivery) |
| | | money.value=deepClone(res.data.money) |
| | | produceList.value.forEach(item => { |
| | |
| | | <th style="width: 10%;">é¢ç§¯</th> |
| | | <th style="width: 10%;">åä»·</th> |
| | | <th style="width: 12%;">éé¢</th> |
| | | <th style="width: 20%;" colspan="2">å å·¥è¦æ±</th> |
| | | <th v-if="company.showDeliveryCreator" style="width: 20%;" colspan="2">å å·¥è¦æ±</th> |
| | | <th v-if="!company.showDeliveryCreator" style="width: 10%;" colspan="1">å å·¥è¦æ±</th> |
| | | <th v-if="!company.showDeliveryCreator" style="width: 10%;" colspan="1">夿³¨</th> |
| | | </tr> |
| | | <template v-for="(item, index) in produceList" :key="index" > |
| | | <tr> |
| | |
| | | <td>{{items.compute_gross_area}}</td> |
| | | <td>{{items.price}}</td> |
| | | <td>{{items.gross_amount}}</td> |
| | | <td colspan="2">{{items.processingNote}}</td> |
| | | <td v-if="company.showDeliveryCreator" colspan="2">{{items.processingNote}}</td> |
| | | <td v-if="!company.showDeliveryCreator" >{{items.processingNote}}</td> |
| | | <td v-if="!company.showDeliveryCreator" >{{items.remarks}}</td> |
| | | </tr> |
| | | <tr class="day-in" > |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">å°è®¡:</td> |
| | |
| | | hollowThickness:'* Hollow thickness', |
| | | hollowGasType:'* Inflation mode', |
| | | hollowType:'* Sealing compound', |
| | | hollowGlueDepth:'* Default glue depth', |
| | | hollowGlueDepth:'Default glue depth', |
| | | hollow:'Hollow spacer', |
| | | hollowUpdate:'Hollow spacers modified', |
| | | interlayerThickness:'*Lamination thickness', |
| | |
| | | hollowThickness:'* СÑеднÑÑ ÑолÑина', |
| | | hollowGasType:'* СпоÑоб наполнениÑ', |
| | | hollowType:'* ÐелÑ', |
| | | hollowGlueDepth:'* ÐлÑбина ÐºÐ»ÐµÑ Ð¿Ð¾ ÑмолÑаниÑ', |
| | | hollowGlueDepth:'ÐлÑбина ÐºÐ»ÐµÑ Ð¿Ð¾ ÑмолÑаниÑ', |
| | | hollow:'ÐÑÑÑой', |
| | | hollowUpdate:'ÐÑÑÑое обновление', |
| | | interlayerThickness:'* ТолÑина ÑлоÑ', |
| | |
| | | hollowThickness:'*ä¸ç©ºå度', |
| | | hollowGasType:'*å
æ°æ¹å¼:', |
| | | hollowType:'*å°è¶', |
| | | hollowGlueDepth:'*é»è®¤è¶æ·±:', |
| | | hollowGlueDepth:'é»è®¤è¶æ·±:', |
| | | hollow:'ä¸ç©ºé´éç©', |
| | | hollowUpdate:'ä¸ç©ºé´éç©ä¿®æ¹', |
| | | interlayerThickness:'*夹å±å度', |
| | |
| | | address:'天津å®å»åºèè½ç¯ä¿å·¥ä¸åºå¤©å
´è·¯è¥¿ä¾§å®ä¸éåä¾§', |
| | | telephone:'022-59280088', |
| | | fax:'022-59280066', |
| | | errorArea:0.4, |
| | | widHeiLength:{//订å宽é«é¿åº¦ |
| | | regexp:/^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/,//æ£å0.00-99999.99 |
| | | //regexp:/^(0|[1-9][0-9]{0,3}([.][0-9]{1,2})?)$/,//æ£å0.00-9999.99 |
| | |
| | | address:'常å·å¸å¤©å®åºééé大æåè·¯8å·', |
| | | telephone:'022-59280088', |
| | | fax:'022-59280066', |
| | | errorArea:0.4, |
| | | widHeiLength:{//订å宽é«é¿åº¦ |
| | | regexp:/^(\d{1,4})$/,//æ£åå使´æ° |
| | | //regexp:/^(0|[1-9][0-9]{0,3}([.][0-9]{1,2})?)$/,//æ£å0.00-9999.99 |
| | |
| | | address:'æ°çäºå®¶æ¸ å·¥ä¸åå
µå¢æ°å建æå·¥ä¸ååºå·¥ä¸è·¯11å·é1å·', |
| | | telephone:'13419168999', |
| | | fax:'', |
| | | errorArea:0.4, |
| | | widHeiLength:{//订å宽é«é¿åº¦ |
| | | regexp:/^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/,//æ£å0.00-99999.99 |
| | | //regexp:/^(0|[1-9][0-9]{0,3}([.][0-9]{1,2})?)$/,//æ£å0.00-9999.99 |
| | |
| | | address:'æµæ±çéåå¸éä¸åºæ¹å®
éå·¥ä¸åè½åºé¹¤å²©è¡28å·2å·', |
| | | telephone:'189 3119 1362 èµåé¿', |
| | | fax:'', |
| | | errorArea:0.3, |
| | | widHeiLength:{//订å宽é«é¿åº¦ |
| | | regexp:/^(0|[1-9][0-9]{0,4}([.][0-9]{1,2})?)$/,//æ£å0.00-99999.99 |
| | | //regexp:/^(0|[1-9][0-9]{0,3}([.][0-9]{1,2})?)$/,//æ£å0.00-9999.99 |
| | |
| | | }, |
| | | { |
| | | code: 'delproject', |
| | | initialState: ['1', '2', '10', '20', '100'], // å设è¿äºç¶æä¸çå·¥ç¨é½å
许å é¤ï¼ä½ 坿 ¹æ®å®é
ä¸å¡è°æ´ |
| | | initialState: ['1', '2', '10', '20', '100'], |
| | | targetState: null, |
| | | successMsg: 'å·¥ç¨å 餿åï¼', |
| | | failureMsg: 'å·¥ç¨å é¤å¤±è´¥ï¼è¯·è系管çåï¼', |
| | |
| | | }; |
| | | return stateMapping[targetState] || targetState; |
| | | } |
| | | //å³é®è忡件夿 |
| | | function checkOperationCondition(config, row) { |
| | | if (!config.requiresRow ||!row) { |
| | | return false; |
| | | } |
| | | if (Array.isArray(config.initialState)) { |
| | | return config.initialState.includes(String(row.state)); |
| | | } |
| | | return config.initialState === String(row.state); |
| | | } |
| | | // å³é®èåç¹å»äºä»¶ |
| | | const gridEvents = { |
| | | menuClick({ menu, row }) { |
| | |
| | | if ($grid) { |
| | | const config = operationConfigs.find(c => c.code === menu.code); |
| | | if (config) { |
| | | if (config.requiresRow &&!row) { |
| | | ElMessage.warning('æªéä¸å·¥ç¨ï¼è¯·éä¸å·¥ç¨ååè¿è¡å½åæä½ï¼'); |
| | | return; |
| | | } |
| | | if (config.code === 'compute') { |
| | | config.actionFunction(); |
| | | } else if (config.code === 'Export') { |
| | | if (config.code === 'Export') { |
| | | config.gridRef.value.exportData(); |
| | | ElMessage.success(config.successMsg); |
| | | } else if (config.code === 'delproject') { |
| | | deleteProject(row.projectNumber, config); // è°ç¨å é¤å·¥ç¨ç彿°ï¼ä¼ å
¥å·¥ç¨ç¼å·åé
ç½®ä¿¡æ¯ |
| | | } else |
| | | if (config.requiresRow && config.initialState.includes(String(row.state))) { |
| | | row.state = config.targetState; |
| | | const index = produceList.value.findIndex(item => item === row); |
| | | if (index!== -1) { |
| | | produceList.value.splice(index, 1, {...row }); |
| | | xGrid.value.reloadData(produceList.value); |
| | | return; |
| | | } |
| | | if (config.code === 'delproject') { |
| | | if (!row) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } |
| | | updateProjectStateAndHandleResponse(row, row.projectNumber, config.targetState, config.successMsg); |
| | | } else { |
| | | const isInitialStateMatched = config.initialState.includes(String(row.state)); |
| | | if (!isInitialStateMatched) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } |
| | | deleteProject(row.projectNumber, config); |
| | | } else if (!checkOperationCondition(config, row)) { |
| | | ElMessage.warning(config.checkMessage); |
| | | return; |
| | | } else { |
| | | if (config.code === 'compute') { |
| | | config.actionFunction(); |
| | | } else { |
| | | row.state = config.targetState; |
| | | const index = produceList.value.findIndex(item => item === row); |
| | | if (index!== -1) { |
| | | produceList.value.splice(index, 1, {...row }); |
| | | xGrid.value.reloadData(produceList.value); |
| | | } |
| | | updateProjectStateAndHandleResponse(row, row.projectNumber, config.targetState, config.successMsg); |
| | | } |
| | | } |
| | | } else { |
| | | console.error(`æªæ¾å°æä½é项 ${menu.code} 对åºçé
ç½®ï¼è¯·æ£æ¥é
置项`); |
| | |
| | | } |
| | | } |
| | | }; |
| | | |
| | | // å°è£
åéå³é®èå请æ±ãå¤çååºä»¥åéè¯¯åæ»çé»è¾ç彿° |
| | | function rollbackStateAndReloadGrid(row, targetState) { |
| | | row.state = getOriginalState(targetState); |
| | |
| | | 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() |
| | |
| | | (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a |
| | | on a.process_id=opd.process_id |
| | | where opd.project_no = #{projectNo} |
| | | order by opd.stock_id,opd.polys_id |
| | | group by order_id,od.order_number |
| | | order by ogd.child_width desc,ogd.child_height desc |
| | | </select> |
| | | </mapper> |
| | |
| | | ifnull(od.processing_note,"") as processingNote, |
| | | ifnull(od.building_number,"") as buildingNumber, |
| | | dd.price, |
| | | od.other_columns |
| | | od.other_columns, |
| | | od.remarks |
| | | from delivery_detail dd |
| | | left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number |
| | | left join product p on od.product_id = p.id |
| | |
| | | ifnull(od.processing_note,"") as processingNote, |
| | | ifnull(od.building_number,"") as buildingNumber, |
| | | od.price, |
| | | od.other_columns |
| | | od.other_columns, |
| | | od.remarks |
| | | from order_detail od |
| | | where od.order_id = #{orderId} |
| | | and od.product_id = #{productId} |