Merge branch 'master' of http://10.153.19.25:10105/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> |
| | |
| | | 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 |
| | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div class="head"> |
| | | <el-date-picker |
| | | <!-- <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button>--> |
| | | <div> |
| | | <el-row> |
| | | <el-select v-model="values" :placeholder="$t('ingredients.pleaseSelectACategory')" @change="selectInventoryWork"> |
| | |
| | | |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | } |
| | | .head{ |
| | | width: 100%; |
| | | height: 65px; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 60px); |
| | | height: calc(100% - 35px); |
| | | } |
| | | </style> |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | <el-input style="width: 200px" v-model="container" class="m-2" :placeholder="$t('productStock.pleaseEnterTheBoxNumber')"> |
| | | </el-input> |
| | | <el-input style="width: 200px" v-model="storageRegion" class="m-2" :placeholder="$t('productStock.pleaseEnterTheStorageLocation')"> |
| | |
| | | |
| | | </div> |
| | | |
| | | |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | </style> |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | </div> |
| | | |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button> |
| | | <div id="printFlowCard" > |
| | | <!-- <div id="entirety" v-for="(items,id) in produceList" > |
| | | <div v-for="(item,index) in items.data" :key="index"> |
| | | <div class="row1">{{ item.customer_name }}</div> |
| | | <div class="row2"> |
| | | <span>{{ item.order_id }}</span> |
| | | <span>{{ item.type_name }}</span> |
| | | </div> |
| | | <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span>{{item.project}}</span> |
| | | <span>{{ item.remarks }}</span> |
| | | </div> |
| | | <div class="row6"> |
| | | <span>{{item.glass_child}}</span> |
| | | <span>{{item.processing_note}}</span> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <div id="entirety" v-for="(item,id) in labelList" > |
| | | <div v-if="type!=='3'" id="entirety" v-for="(item,id) in labelList" > |
| | | |
| | | <div class="row1" v-if="item.heat_layout_id!=null"> |
| | | |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | |
| | | <span>{{item.project}}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | <template v-if="type==='3'" v-for="(item,id) in labelList"> |
| | | <div v-if="type==='3'" id="entirety" v-for="n in item.quantity" > |
| | | |
| | | <div class="row1" v-if="item.heat_layout_id!=null"> |
| | | |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹è¶')">è¶ç</span> |
| | | <span v-else-if="item.process.includes('ä¸ç©º')">ä¸ç©º</span> |
| | | <span v-else-if="item.process.includes('ç¾å¶')">ç¾å¶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | |
| | | </div> |
| | | <div class="row2" v-else> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹è¶')">è¶ç</span> |
| | | <span v-else-if="item.process.includes('ä¸ç©º')">ä¸ç©º</span> |
| | | <span v-else-if="item.process.includes('ç¾å¶')">ç¾å¶</span> |
| | | <span v-else></span> |
| | | </div> |
| | | |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span style="white-space: pre-wrap;font-size: 6pt">{{ item.building_number }}</span> |
| | | <span v-if="item.bend_radius!=null">R={{item.bend_radius}}</span> |
| | | </div> |
| | | <div class="row6"> |
| | | <span>{{item.glass_child}}</span> |
| | | <span>{{item.processing_note}}</span> |
| | | </div> |
| | | <div class="row5"> |
| | | <span>{{item.project}}</span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | 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 }, |
| | | ] |
| | | ] |
| | | } |
| | |
| | | } |
| | | 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 |
| | |
| | | } |
| | | } |
| | | |
| | | 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({ |
| | | "deliveryDetail.quantity": [{ |
| | |
| | | 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() |
| | |
| | | ms.json |
| | | from mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | order by mi.id desc |
| | |
| | | from |
| | | mm.material_inventory mi |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | |
| | | 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} |