| | |
| | | menu_Id: 1847, |
| | | menuName: 'åé¦SAPæ°æ®å¤±è´¥æ¥è¯¢' |
| | | } |
| | | },{ |
| | | }, |
| | | { |
| | | path: '/stat/inventory/sapdata', |
| | | component: () => import('@/views/stat/inventory/sapdata'), |
| | | name: 'sapdata', |
| | |
| | | menu_Id: 1845, |
| | | menuName: 'åé¦SAPæ°æ®æ¥è¯¢' |
| | | } |
| | | },{ |
| | | }, |
| | | { |
| | | path: '/stat/inventory/deviceGeneralInfo', |
| | | component: () => import('@/views/stat/inventory/deviceGeneralInfo'), |
| | | name: 'deviceGeneralInfo', |
| | | meta: { |
| | | title: 'deviceGeneralInfo', |
| | | icon: '', |
| | | menu_Id: 1845, |
| | | menuName: 'å åæºè¿è¡ç»è®¡' |
| | | } |
| | | }, |
| | | { |
| | | path: '/stat/inventory/purchaseEmptyMaterialCode', |
| | | component: () => import('@/views/stat/inventory/purchaseEmptyMaterialCode'), |
| | | name: 'purchaseEmptyMaterialCode', |
| | | meta: { |
| | | title: 'purchaseEmptyMaterialCode', |
| | | icon: '', |
| | | menu_Id: 1845, |
| | | menuName: 'POæç»ç©ºç©æå·ä¿¡æ¯' |
| | | } |
| | | }, |
| | | { |
| | | path: '/stat/inventory/early', |
| | | component: () => import('@/views/stat/inventory/early'), |
| | | name: 'early', |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æ¶é´æ¥æè½¬æ¢ |
| | | * @param date å½åæ¶é´ï¼new Date() æ ¼å¼ |
| | | * @param format éè¦è½¬æ¢çæ¶é´æ ¼å¼å符串 |
| | | * @description format å符串éæï¼å¦ `YYYY-mmãYYYY-mm-dd` |
| | | * @description format å£åº¦ï¼"YYYY-mm-dd HH:MM:SS QQQQ" |
| | | * @description format ææï¼"YYYY-mm-dd HH:MM:SS WWW" |
| | | * @description format å å¨ï¼"YYYY-mm-dd HH:MM:SS ZZZ" |
| | | * @description format å£åº¦ + ææ + å å¨ï¼"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ" |
| | | * @returns è¿åæ¼æ¥åçæ¶é´å符串 |
| | | */ |
| | | export function formatDate(date, format) { |
| | | const we = date.getDay(); // ææ |
| | | const z = getWeek(date); // å¨ |
| | | const qut = Math.floor((date.getMonth() + 3) / 3).toString(); // å£åº¦ |
| | | const opt = { |
| | | 'Y+': date.getFullYear().toString(), // å¹´ |
| | | 'm+': (date.getMonth() + 1).toString(), // æ(æä»½ä»0å¼å§ï¼è¦+1) |
| | | 'd+': date.getDate().toString(), // æ¥ |
| | | 'H+': date.getHours().toString(), // æ¶ |
| | | 'M+': date.getMinutes().toString(), // å |
| | | 'S+': date.getSeconds().toString(), // ç§ |
| | | 'q+': qut, // å£åº¦ |
| | | }; |
| | | // 䏿æ°å (ææ) |
| | | const week = { |
| | | '0': 'æ¥', |
| | | '1': 'ä¸', |
| | | '2': 'äº', |
| | | '3': 'ä¸', |
| | | '4': 'å', |
| | | '5': 'äº', |
| | | '6': 'å
', |
| | | }; |
| | | // 䏿æ°åï¼å£åº¦ï¼ |
| | | const quarter = { |
| | | '1': 'ä¸', |
| | | '2': 'äº', |
| | | '3': 'ä¸', |
| | | '4': 'å', |
| | | }; |
| | | if (/(W+)/.test(format)) |
| | | format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? 'ææ' + week[we] : 'å¨' + week[we]) : week[we]); |
| | | if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? '第' + quarter[qut] + 'å£åº¦' : quarter[qut]); |
| | | if (/(Z+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 3 ? '第' + z + 'å¨' : z + ''); |
| | | for (const k in opt) { |
| | | const r = new RegExp('(' + k + ')').exec(format); |
| | | // è¥è¾å
¥çé¿åº¦ä¸ä¸º1ï¼ååé¢è¡¥é¶ |
| | | if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0')); |
| | | } |
| | | return format; |
| | | } |
| | | |
| | | /** |
| | | * æ¶é´æ¥æè½¬æ¢ |
| | | * @param date å½åæ¶é´ï¼new Date() æ ¼å¼ |
| | | * @param format éè¦è½¬æ¢çæ¶é´æ ¼å¼å符串 |
| | | * @description format å符串éæï¼å¦ `YYYY-mmãYYYY-mm-dd` |
| | | * @description format å£åº¦ï¼"YYYY-mm-dd HH:MM:SS QQQQ" |
| | | * @description format ææï¼"YYYY-mm-dd HH:MM:SS WWW" |
| | | * @description format å å¨ï¼"YYYY-mm-dd HH:MM:SS ZZZ" |
| | | * @description format å£åº¦ + ææ + å å¨ï¼"YYYY/MM/DD HH:mm:ss WWW QQQQ ZZZ" |
| | | * @returns è¿åæ¼æ¥åçæ¶é´å符串 YYYY-MM-DD HH:mm:ss |
| | | */ |
| | | export function formatDateV2(date, format) { |
| | | //debugger |
| | | const we = date.getDay(); // ææ |
| | | const z = getWeek(date); // å¨ |
| | | const qut = Math.floor((date.getMonth() + 3) / 3).toString(); // å£åº¦ |
| | | const opt = { |
| | | 'Y+': date.getFullYear().toString(), // å¹´ |
| | | 'M+': (date.getMonth() + 1).toString(), // æ(æä»½ä»0å¼å§ï¼è¦+1) |
| | | 'D+': date.getDate().toString(), // æ¥ |
| | | 'H+': date.getHours().toString(), // æ¶ |
| | | 'm+': date.getMinutes().toString(), // å |
| | | 's+': date.getSeconds().toString(), // ç§ |
| | | 'q+': qut, // å£åº¦ |
| | | }; |
| | | // 䏿æ°å (ææ) |
| | | const week = { |
| | | '0': 'æ¥', |
| | | '1': 'ä¸', |
| | | '2': 'äº', |
| | | '3': 'ä¸', |
| | | '4': 'å', |
| | | '5': 'äº', |
| | | '6': 'å
', |
| | | }; |
| | | // 䏿æ°åï¼å£åº¦ï¼ |
| | | const quarter = { |
| | | '1': 'ä¸', |
| | | '2': 'äº', |
| | | '3': 'ä¸', |
| | | '4': 'å', |
| | | }; |
| | | if (/(W+)/.test(format)) |
| | | format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? 'ææ' + week[we] : 'å¨' + week[we]) : week[we]); |
| | | if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? '第' + quarter[qut] + 'å£åº¦' : quarter[qut]); |
| | | if (/(Z+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 3 ? '第' + z + 'å¨' : z + ''); |
| | | for (const k in opt) { |
| | | const r = new RegExp('(' + k + ')').exec(format); |
| | | // è¥è¾å
¥çé¿åº¦ä¸ä¸º1ï¼ååé¢è¡¥é¶ |
| | | if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0')); |
| | | } |
| | | return format; |
| | | } |
| | | |
| | | /** |
| | | * è·åå½åæ¥ææ¯ç¬¬å å¨ |
| | | * @param dateTime å½åä¼ å
¥çæ¥æå¼ |
| | | * @returns è¿å第å 卿°åå¼ |
| | | */ |
| | | export function getWeek(dateTime) { |
| | | const temptTime = new Date(dateTime.getTime()); |
| | | // å¨å |
| | | const weekday = temptTime.getDay() || 7; |
| | | // å¨1+5天=å¨å
|
| | | temptTime.setDate(temptTime.getDate() - weekday + 1 + 5); |
| | | let firstDay = new Date(temptTime.getFullYear(), 0, 1); |
| | | const dayOfWeek = firstDay.getDay(); |
| | | let spendDay = 1; |
| | | if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1; |
| | | firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay); |
| | | const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000); |
| | | const result = Math.ceil(d / 7); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ¶é´é®åè¯ |
| | | * @param param å½åæ¶é´ï¼new Date() æ ¼å¼ |
| | | * @description param è°ç¨ `formatAxis(new Date())` è¾åº `ä¸å好` |
| | | * @returns è¿åæ¼æ¥åçæ¶é´å符串 |
| | | */ |
| | | export function formatAxis(param) { |
| | | const hour = new Date(param).getHours(); |
| | | if (hour < 6) return '忍好'; |
| | | else if (hour < 9) return 'æ©ä¸å¥½'; |
| | | else if (hour < 12) return 'ä¸å好'; |
| | | else if (hour < 14) return 'ä¸å好'; |
| | | else if (hour < 17) return 'ä¸å好'; |
| | | else if (hour < 19) return 'åæå¥½'; |
| | | else if (hour < 22) return 'æä¸å¥½'; |
| | | else return 'å¤é好'; |
| | | } |
| | | |
| | | //é»è®¤èµå¼ å½åä¸å¨çæ¶é´ |
| | | export function getThisWeekRange(flag) { |
| | | |
| | | //ææ¶é½è¿å空 |
| | | //return ["",""]; |
| | | |
| | | const today = new Date(); |
| | | const startOfWeek = new Date(); |
| | | // if(flag==1){//è¡¨ç¤ºè¦æ¥7天å
æ°æ® |
| | | // //startOfWeek.setDate(today.getDate() -6); // åå»ä»å¤©æ¯ä¸å¨ç第å 天ï¼å¾å°å¨ä¸çæ¥æstartOfWeek |
| | | // startOfWeek.setDate(today.getDate() -2); // åå»ä»å¤©æ¯ä¸å¨ç第å 天ï¼å¾å°å¨ä¸çæ¥æstartOfWeek |
| | | // } |
| | | startOfWeek.setDate(today.getDate() - flag); // åå»ä»å¤©æ¯ä¸å¨ç第å 天ï¼å¾å°å¨ä¸çæ¥æstartOfWeek |
| | | startOfWeek.setHours(0, 0, 0, 0); // 设置æ¶ãåãç§åæ¯«ç§æ° |
| | | |
| | | const endOfWeek = new Date(today); |
| | | endOfWeek.setDate(endOfWeek.getDate() + 1); |
| | | //endOfWeek.setHours(23, 59, 59, 999); // 设置æ¶ãåãç§åæ¯«ç§æ° |
| | | endOfWeek.setHours(0, 0, 0, 0); // 设置æ¶ãåãç§åæ¯«ç§æ° |
| | | |
| | | |
| | | //return [moment(startOfWeek,"YYYY-MM-DD HH:mm"), moment(endOfWeek,"YYYY-MM-DD HH:mm")]; |
| | | //return [moment(startOfWeek), moment(endOfWeek)]; |
| | | |
| | | // const startStr = formatDateV2(startOfWeek,'YYYY-MM-DD HH:mm:ss'); |
| | | // const endStr = formatDateV2(endOfWeek,'YYYY-MM-DD HH:mm:ss'); |
| | | //return [new Date(startStr), new Date(endStr)]; |
| | | // const startStr = formatDateV2(startOfWeek, 'yyyy-MM-dd HH:mm:ss'); |
| | | // const endStr = formatDateV2(endOfWeek, 'yyyy-MM-dd HH:mm:ss'); |
| | | // return [startStr, endStr]; |
| | | // â
ç´æ¥è¿å Date å¯¹è±¡çæ°ç» |
| | | return [startOfWeek, endOfWeek]; |
| | | //*/ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- é¢å
å±å¯¼èªåº --> |
| | | <div class="indexs"> |
| | | <el-card> |
| | | <el-row> |
| | | <el-button type="success" plain @click="exportExcel" >导åºExcel</el-button> |
| | | <el-date-picker |
| | | v-model="datatime" |
| | | size="large" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | <el-button type="success" plain @click="find(1)" >æ¥è¯¢</el-button> |
| | | <el-button type="info" plain @click="reset" >éç½®</el-button> |
| | | </el-row> |
| | | <!-- æ¾ç¤ºäººåå表 --> |
| | | <el-table ref= "table" :max-height="tableHeight" :data="TakeStocklist" bottom= "10%" border stripe > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column label="è¿è¡æ¶é´(åé)" prop="deviceRunTime" width="220"></el-table-column> |
| | | <el-table-column label="æ¥è¦æ¶é´(åé)" prop="deviceAlarmTime" width="220"></el-table-column> |
| | | <el-table-column label="çå¾
æ¶é´(åé)" prop="deviceWaitTime" width="220"></el-table-column> |
| | | <el-table-column label="æ¶é´" prop="createTime" width="170" :formatter="formatterDateTime" ></el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | :current-page="queryInfo.pagenum" |
| | | :page-sizes="[5,10, 15, 20,50,100,1000,10000]" |
| | | :page-size="queryInfo.pagesize" |
| | | :total="total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | > |
| | | </el-pagination> |
| | | </el-card> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { parseTime,formatDate } from '@/utils' |
| | | import { getThisWeekRange} from '@/utils/formatTime.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | tableHeight:window.innerHeight-204, |
| | | searchParam: { |
| | | materialName: null, |
| | | materialCode: null, |
| | | SalesOrder: null |
| | | }, |
| | | queryInfo: { |
| | | // å½å页 |
| | | pagenum: 1, |
| | | // æ¯é¡µæ¾ç¤ºå¤å°æ¡ä¿¡æ¯s |
| | | pagesize: 10 |
| | | }, |
| | | |
| | | TakeStocklist: [], |
| | | TakeStocklistAll: [], |
| | | total: 0, |
| | | datatime: '', |
| | | selectType: [ |
| | | { value: '1', label: 'åºåº' }, { value: '2', label: 'ç§»åº' }, { value: '3', label: 'æ¶è´§' }, { value: '4', label: 'æåè¯éè´§' }], |
| | | selectTypeValue: '', |
| | | dialogFormVisible: false, |
| | | productList: [], |
| | | updateDate: null |
| | | } |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.initTimeData(); |
| | | this.find(1) |
| | | }, |
| | | methods: { |
| | | initTimeData(){ |
| | | this.datatime= ''; |
| | | this.datatime= getThisWeekRange(30);//å¯ç¨äº |
| | | }, |
| | | // æ¶é´è½¬æ¢ |
| | | formatterDateTime (row, column, cellValue, index) { |
| | | if (cellValue === null || cellValue === '') { |
| | | return '' |
| | | } |
| | | var NewDtime = new Date(cellValue) |
| | | return formatDate(NewDtime, 'yyyy-MM-dd hh:mm:ss') |
| | | }, |
| | | |
| | | // çå¬ pagesize æ¹å |
| | | handleSizeChange(newSizd) { |
| | | this.queryInfo.pagesize = newSizd |
| | | this.queryInfo.pagenum = 1 |
| | | this.find(1) |
| | | }, |
| | | // çå¬ é¡µç 弿¹å |
| | | handleCurrentChange(newpage) { |
| | | this.queryInfo.pagenum = newpage |
| | | |
| | | this.find(2) |
| | | }, |
| | | userStatusChange(userinfo) { |
| | | console.log(userinfo) |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = 'å计' |
| | | return |
| | | } |
| | | if (index != 5) { |
| | | sums[index] = '' |
| | | return |
| | | } |
| | | const values = data.map(item => Number(item[column.property])) |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr) |
| | | if (!isNaN(value)) { |
| | | return prev + curr |
| | | } else { |
| | | return prev |
| | | } |
| | | }, 0) |
| | | sums[index] += ' ' |
| | | } else { |
| | | sums[index] = 'N/A' |
| | | } |
| | | sums[index] = Number(sums[index]).toFixed(2) |
| | | }) |
| | | |
| | | return sums |
| | | }, |
| | | |
| | | formatJson(filterVal, jsonData) { |
| | | return jsonData.map(v => |
| | | filterVal.map(j => { |
| | | if (j === 'createTime') { |
| | | return parseTime(v[j]) |
| | | } |
| | | else if (j === 'moveType') { |
| | | return this.setMoveTypeStr(v[j]) |
| | | } |
| | | else if (j === 'isFinish') { |
| | | return this.setIsFinishStr(v[j]) |
| | | } else { |
| | | return v[j] |
| | | } |
| | | }) |
| | | ) |
| | | }, |
| | | find(ischang = 1) { |
| | | if (ischang == 1) { |
| | | this.queryInfo.pagenum = 1 |
| | | } |
| | | const url = '/api/task/queryPageDeviceGeneralInfo' |
| | | const params = { |
| | | search: this.searchParam, |
| | | queryInfo: this.queryInfo, //å页 |
| | | positionTypeValue: this.selectTypeValue, //䏿æ¡çå¼ |
| | | datatime: this.datatime, //æ¥æ |
| | | alarmValue: 1 |
| | | } |
| | | var callback = res => { |
| | | //debugger |
| | | if (res.result === true) { |
| | | res.data.forEach(item => { |
| | | item.moveType =this.setMoveTypeStr(item.moveType) |
| | | item.isFinish =this.setIsFinishStr(item.isFinish) |
| | | }) |
| | | |
| | | this.TakeStocklist = res.data |
| | | this.TakeStocklistAll = res.data2 |
| | | this.total = res.countPrint |
| | | } else { |
| | | this.TakeStocklist = [] |
| | | this.TakeStocklistAll = [] |
| | | this.total = 0 |
| | | return this.$message.success('å½åæ¡ä»¶ æ¥ä¸å°æ°æ®!') |
| | | } |
| | | } |
| | | this.common.ajax(url, params, callback, true) |
| | | }, |
| | | find_export(ischang = 1) { |
| | | if (ischang == 1) { |
| | | this.queryInfo.pagenum = 1 |
| | | } |
| | | const url = '/api/task/queryPageDeviceGeneralInfo' |
| | | const params = { |
| | | IsLoadAllData:true,//å è½½å
¨é¨ |
| | | search: this.searchParam, |
| | | queryInfo: this.queryInfo, //å页 |
| | | positionTypeValue: this.selectTypeValue, //䏿æ¡çå¼ |
| | | datatime: this.datatime, //æ¥æ |
| | | alarmValue: 1 |
| | | } |
| | | var callback = res => { |
| | | //debugger |
| | | if (res.result === true) { |
| | | res.data2.forEach(item => { |
| | | item.moveType =this.setMoveTypeStr(item.moveType) |
| | | item.isFinish =this.setIsFinishStr(item.isFinish) |
| | | }) |
| | | this.TakeStocklistAll = res.data2 |
| | | this.do_exportExcel() |
| | | } else { |
| | | this.TakeStocklistAll = [] |
| | | return this.$message.success('å½åæ¡ä»¶ æ¥ä¸å°æ°æ®!') |
| | | } |
| | | } |
| | | this.common.ajax(url, params, callback, true) |
| | | }, |
| | | do_exportExcel() { |
| | | // import("@/vendor/Export2Excel") |
| | | this.downloadLoading = true |
| | | import('@/vendor/Export2Excel').then(excel => { |
| | | const tHeader = ['è¿è¡æ¶é´(åé)', 'æ¥è¦æ¶é´(åé)', 'çå¾
æ¶é´(åé)','æ¶é´'] |
| | | const filterVal = ['deviceRunTime', 'deviceAlarmTime', 'deviceWaitTime', 'createTime'] |
| | | const data = this.formatJson(filterVal, this.TakeStocklistAll) |
| | | excel.export_json_to_excel({ |
| | | header: tHeader, |
| | | data, |
| | | filename: 'å åæºè¿è¡ç»è®¡' |
| | | }) |
| | | this.downloadLoading = false |
| | | }) |
| | | }, |
| | | exportExcel() { |
| | | this.find_export(1) |
| | | }, |
| | | setMoveTypeStr(moveType){ |
| | | if (moveType === 1) return'åºåº' |
| | | if (moveType === 2) return 'ç§»åº' |
| | | if (moveType === 3) return 'æ¶è´§' |
| | | if (moveType === 4) return 'æåè¯éè´§' |
| | | return '' |
| | | }, |
| | | setIsFinishStr(isFinish){ |
| | | if (isFinish === 1) { |
| | | return '已宿' |
| | | }else{ |
| | | return 'æªå®æ' |
| | | } |
| | | }, |
| | | reset() { |
| | | this.searchParam.materialName = null |
| | | this.searchParam.materialCode = null |
| | | this.searchParam.SalesOrder = null |
| | | this.selectTypeValue = '' |
| | | this.datatime = '' |
| | | this.initTimeData();//éç½®æ¶é´ |
| | | this.find() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="postcss" scoped> |
| | | .el-table .el-pagination { |
| | | margin-top: 10px; |
| | | line-height: 30px; |
| | | margin-bottom: 0%; |
| | | } |
| | | .el-row { |
| | | text-align: left; |
| | | } |
| | | .selectValues { |
| | | width: 420px; |
| | | } |
| | | .search { |
| | | width: 200px; |
| | | } |
| | | .selectTypeValue { |
| | | width: 150px; |
| | | } |
| | | .el-card { |
| | | padding: 0%; |
| | | margin-bottom: 0%; |
| | | /* 84 = navbar + tags-view = 50 +34 */ |
| | | max-height: calc(100vh - 104px); |
| | | } |
| | | thead .el-table-column--selection .cell { |
| | | display: none; |
| | | } |
| | | .el-scrollbar{ |
| | | .el-scrollbar__bar.is-vertical { |
| | | opacity: 1;/* æ¹ä¸º0䏿¾ç¤ºæ»å¨æ¡*/ |
| | | width:5; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <el-input v-model="searchParam.materialName" placeholder="ç©æåç§°" class="search"></el-input> |
| | | <el-input v-model="searchParam.materialCode" placeholder="ç©æç¼å·" class="search"></el-input> |
| | | <el-input v-model="searchParam.tranckNnmber" placeholder="è·è¸ªå·" class="search"></el-input> |
| | | <el-date-picker |
| | | <!-- <el-date-picker |
| | | v-model="datatime" |
| | | size="large" |
| | | type="datetimerange" |
| | |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-date-picker> --> |
| | | <el-button type="success" plain @click="find(1)" >æ¥è¯¢</el-button> |
| | | <el-button type="info" plain @click="reset" >éç½®</el-button> |
| | | </el-row> |
| | |
| | | <div class="indexs"> |
| | | <el-card> |
| | | <el-row> |
| | | <el-button type="success" plain @click="exportExcel" >å¯¼åºæ¬é¡µExcel</el-button> |
| | | <el-button type="success" plain @click="exportExcel" >导åºExcel</el-button> |
| | | <el-button type="danger" @click="openAlarm">设å¤å¼å¸¸æ¥è¦ç»è®¡</el-button> |
| | | <el-select v-model="selectTypeValue" placeholder="éæ©è®¾å¤åç§°" class="selectTypeValue" @change="selectChang"> |
| | | <el-option |
| | |
| | | <script> |
| | | import { parseTime } from '@/utils' |
| | | import { getDate } from '@/utils/dateTime' |
| | | import { getThisWeekRange} from '@/utils/formatTime.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.initTimeData(); |
| | | this.find() |
| | | }, |
| | | methods: { |
| | | initTimeData(){ |
| | | this.datatime= ''; |
| | | this.datatime= getThisWeekRange(30);//å¯ç¨äº |
| | | }, |
| | | // çå¬ pagesize æ¹å |
| | | handleSizeChange(newSizd) { |
| | | this.queryInfo.pagesize = newSizd |
| | |
| | | this.queryInfo.pagenum = 1 |
| | | this.pagesize = 10 |
| | | this.datatime = '' |
| | | this.initTimeData();//éç½®æ¶é´ |
| | | this.find() |
| | | }, |
| | | resetChild() { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- é¢å
å±å¯¼èªåº --> |
| | | <div class="indexs"> |
| | | <el-card> |
| | | <el-row> |
| | | <el-button type="success" plain @click="exportExcel" >导åºExcel</el-button> |
| | | <el-input v-model="searchParam.PoCode" placeholder="POåå·" class="search"></el-input> |
| | | <el-input v-model="searchParam.ProductName" placeholder="ç©æåç§°" class="search"></el-input> |
| | | <el-input v-model="searchParam.ItemNumber" placeholder="项å·" class="search"></el-input> |
| | | <el-date-picker |
| | | v-model="datatime" |
| | | size="large" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | <el-button type="success" plain @click="find(1)" >æ¥è¯¢</el-button> |
| | | <el-button type="info" plain @click="reset" >éç½®</el-button> |
| | | </el-row> |
| | | <!-- æ¾ç¤ºäººåå表 --> |
| | | <el-table ref= "table" :max-height="tableHeight" :data="TakeStocklist" bottom= "10%" border stripe > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column label="POåå·" prop="PoCode" width="200"></el-table-column> |
| | | <el-table-column label="ç©æåç§°" prop="ProductName" width="300" ></el-table-column> |
| | | <el-table-column label="项å·" prop="ItemNumber" width="300" ></el-table-column> |
| | | <el-table-column label="æ¶é´" prop="CreateTime" width="170" :formatter="formatterDateTime" ></el-table-column> |
| | | <el-table-column label="夿³¨" prop="Remark" width="120"></el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | :current-page="queryInfo.pagenum" |
| | | :page-sizes="[5,10, 15, 20,50,100,1000,10000]" |
| | | :page-size="queryInfo.pagesize" |
| | | :total="total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | > |
| | | </el-pagination> |
| | | </el-card> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { parseTime,formatDate} from '@/utils' |
| | | import { getThisWeekRange} from '@/utils/formatTime.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | tableHeight:window.innerHeight-204, |
| | | searchParam: { |
| | | ProductName: null, |
| | | MaterialCode: null, |
| | | ItemNumber: null |
| | | }, |
| | | queryInfo: { |
| | | // å½å页 |
| | | pagenum: 1, |
| | | // æ¯é¡µæ¾ç¤ºå¤å°æ¡ä¿¡æ¯s |
| | | pagesize: 10 |
| | | }, |
| | | |
| | | TakeStocklist: [], |
| | | TakeStocklistAll: [], |
| | | total: 0, |
| | | datatime: '', |
| | | selectType: [ |
| | | { value: '1', label: 'åºåº' }, { value: '2', label: 'ç§»åº' }, { value: '3', label: 'æ¶è´§' }, { value: '4', label: 'æåè¯éè´§' }], |
| | | selectTypeValue: '', |
| | | dialogFormVisible: false, |
| | | productList: [], |
| | | updateDate: null |
| | | } |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.initTimeData(); |
| | | this.find(1) |
| | | }, |
| | | methods: { |
| | | initTimeData(){ |
| | | this.datatime= ''; |
| | | this.datatime= getThisWeekRange(30);//å¯ç¨äº |
| | | }, |
| | | // æ¶é´è½¬æ¢ |
| | | formatterDateTime (row, column, cellValue, index) { |
| | | if (cellValue === null || cellValue === '') { |
| | | return '' |
| | | } |
| | | var NewDtime = new Date(cellValue) |
| | | return formatDate(NewDtime, 'yyyy-MM-dd hh:mm:ss') |
| | | }, |
| | | |
| | | // çå¬ pagesize æ¹å |
| | | handleSizeChange(newSizd) { |
| | | this.queryInfo.pagesize = newSizd |
| | | this.queryInfo.pagenum = 1 |
| | | this.find(1) |
| | | }, |
| | | // çå¬ é¡µç 弿¹å |
| | | handleCurrentChange(newpage) { |
| | | this.queryInfo.pagenum = newpage |
| | | |
| | | this.find(2) |
| | | }, |
| | | userStatusChange(userinfo) { |
| | | console.log(userinfo) |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = 'å计' |
| | | return |
| | | } |
| | | if (index != 5) { |
| | | sums[index] = '' |
| | | return |
| | | } |
| | | const values = data.map(item => Number(item[column.property])) |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr) |
| | | if (!isNaN(value)) { |
| | | return prev + curr |
| | | } else { |
| | | return prev |
| | | } |
| | | }, 0) |
| | | sums[index] += ' ' |
| | | } else { |
| | | sums[index] = 'N/A' |
| | | } |
| | | sums[index] = Number(sums[index]).toFixed(2) |
| | | }) |
| | | |
| | | return sums |
| | | }, |
| | | |
| | | formatJson(filterVal, jsonData) { |
| | | return jsonData.map(v => |
| | | filterVal.map(j => { |
| | | if (j === 'CreateTime') { |
| | | return parseTime(v[j]) |
| | | } |
| | | else if (j === 'moveType') { |
| | | return this.setMoveTypeStr(v[j]) |
| | | } |
| | | else if (j === 'isFinish') { |
| | | return this.setIsFinishStr(v[j]) |
| | | } else { |
| | | return v[j] |
| | | } |
| | | }) |
| | | ) |
| | | }, |
| | | find(ischang = 1) { |
| | | if (ischang == 1) { |
| | | this.queryInfo.pagenum = 1 |
| | | } |
| | | const url = '/api/task/queryPagePurchaseEmptyMaterialCode' |
| | | const params = { |
| | | search: this.searchParam, |
| | | queryInfo: this.queryInfo, //å页 |
| | | positionTypeValue: this.selectTypeValue, //䏿æ¡çå¼ |
| | | datatime: this.datatime, //æ¥æ |
| | | alarmValue: 1 |
| | | } |
| | | var callback = res => { |
| | | //debugger |
| | | if (res.result === true) { |
| | | res.data.forEach(item => { |
| | | item.moveType =this.setMoveTypeStr(item.moveType) |
| | | item.isFinish =this.setIsFinishStr(item.isFinish) |
| | | }) |
| | | |
| | | this.TakeStocklist = res.data |
| | | this.TakeStocklistAll = res.data2 |
| | | this.total = res.countPrint |
| | | } else { |
| | | this.TakeStocklist = [] |
| | | this.TakeStocklistAll = [] |
| | | this.total = 0 |
| | | return this.$message.success('å½åæ¡ä»¶ æ¥ä¸å°æ°æ®!') |
| | | } |
| | | } |
| | | this.common.ajax(url, params, callback, true) |
| | | }, |
| | | find_export(ischang = 1) { |
| | | if (ischang == 1) { |
| | | this.queryInfo.pagenum = 1 |
| | | } |
| | | const url = '/api/task/queryPagePurchaseEmptyMaterialCode' |
| | | const params = { |
| | | IsLoadAllData:true,//å è½½å
¨é¨ |
| | | search: this.searchParam, |
| | | queryInfo: this.queryInfo, //å页 |
| | | positionTypeValue: this.selectTypeValue, //䏿æ¡çå¼ |
| | | datatime: this.datatime, //æ¥æ |
| | | alarmValue: 1 |
| | | } |
| | | var callback = res => { |
| | | //debugger |
| | | if (res.result === true) { |
| | | res.data2.forEach(item => { |
| | | item.moveType =this.setMoveTypeStr(item.moveType) |
| | | item.isFinish =this.setIsFinishStr(item.isFinish) |
| | | }) |
| | | this.TakeStocklistAll = res.data2 |
| | | this.do_exportExcel() |
| | | } else { |
| | | this.TakeStocklistAll = [] |
| | | return this.$message.success('å½åæ¡ä»¶ æ¥ä¸å°æ°æ®!') |
| | | } |
| | | } |
| | | this.common.ajax(url, params, callback, true) |
| | | }, |
| | | do_exportExcel() { |
| | | // import("@/vendor/Export2Excel") |
| | | this.downloadLoading = true |
| | | import('@/vendor/Export2Excel').then(excel => { |
| | | const tHeader = ['POåå·', 'ç©æåç§°', '项å·', 'æ¶é´','夿³¨'] |
| | | const filterVal = ['PoCode', 'ProductName', 'ItemNumber', 'CreateTime', 'Remark'] |
| | | const data = this.formatJson(filterVal, this.TakeStocklistAll) |
| | | excel.export_json_to_excel({ |
| | | header: tHeader, |
| | | data, |
| | | filename: 'POæç»ç©ºç©æå·ä¿¡æ¯' |
| | | }) |
| | | this.downloadLoading = false |
| | | }) |
| | | }, |
| | | exportExcel() { |
| | | this.find_export(1) |
| | | }, |
| | | setMoveTypeStr(moveType){ |
| | | if (moveType === 1) return'åºåº' |
| | | if (moveType === 2) return 'ç§»åº' |
| | | if (moveType === 3) return 'æ¶è´§' |
| | | if (moveType === 4) return 'æåè¯éè´§' |
| | | return '' |
| | | }, |
| | | setIsFinishStr(isFinish){ |
| | | if (isFinish === 1) { |
| | | return '已宿' |
| | | }else{ |
| | | return 'æªå®æ' |
| | | } |
| | | }, |
| | | reset() { |
| | | this.searchParam.ProductName = null |
| | | this.searchParam.MaterialCode = null |
| | | this.searchParam.ItemNumber = null |
| | | this.selectTypeValue = '' |
| | | this.datatime = '' |
| | | this.initTimeData();//éç½®æ¶é´ |
| | | this.find() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="postcss" scoped> |
| | | .el-table .el-pagination { |
| | | margin-top: 10px; |
| | | line-height: 30px; |
| | | margin-bottom: 0%; |
| | | } |
| | | .el-row { |
| | | text-align: left; |
| | | } |
| | | .selectValues { |
| | | width: 420px; |
| | | } |
| | | .search { |
| | | width: 200px; |
| | | } |
| | | .selectTypeValue { |
| | | width: 150px; |
| | | } |
| | | .el-card { |
| | | padding: 0%; |
| | | margin-bottom: 0%; |
| | | /* 84 = navbar + tags-view = 50 +34 */ |
| | | max-height: calc(100vh - 104px); |
| | | } |
| | | thead .el-table-column--selection .cell { |
| | | display: none; |
| | | } |
| | | .el-scrollbar{ |
| | | .el-scrollbar__bar.is-vertical { |
| | | opacity: 1;/* æ¹ä¸º0䏿¾ç¤ºæ»å¨æ¡*/ |
| | | width:5; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | </template> |
| | | <script> |
| | | import { parseTime,formatDate } from '@/utils' |
| | | import { getThisWeekRange} from '@/utils/formatTime.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.initTimeData(); |
| | | this.find(1) |
| | | }, |
| | | methods: { |
| | | initTimeData(){ |
| | | this.datatime= ''; |
| | | this.datatime= getThisWeekRange(60);//å¯ç¨äº |
| | | }, |
| | | // æ¶é´è½¬æ¢ |
| | | formatterDateTime (row, column, cellValue, index) { |
| | | if (cellValue === null || cellValue === '') { |
| | |
| | | this.searchParam.SalesOrder = null |
| | | this.selectTypeValue = '' |
| | | this.datatime = '' |
| | | this.initTimeData();//éç½®æ¶é´ |
| | | this.find() |
| | | } |
| | | } |
| | |
| | | </template> |
| | | <script> |
| | | import { parseTime,formatDate } from '@/utils' |
| | | import { getThisWeekRange} from '@/utils/formatTime.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.initTimeData(); |
| | | this.find(1) |
| | | }, |
| | | methods: { |
| | | initTimeData(){ |
| | | this.datatime= ''; |
| | | this.datatime= getThisWeekRange(60);//å¯ç¨äº |
| | | }, |
| | | // æ¶é´è½¬æ¢ |
| | | formatterDateTime (row, column, cellValue, index) { |
| | | if (cellValue === null || cellValue === '') { |
| | |
| | | this.searchParam.purchaseCode = null |
| | | this.selectTypeValue = '' |
| | | this.datatime = '' |
| | | this.initTimeData();//éç½®æ¶é´ |
| | | this.find() |
| | | } |
| | | } |
| | |
| | | 0ãè·åPOåæµç¨ |
| | | çé¢ä¸è¾å
¥ poåå·=ãè°ç¨wcftestæ¥å£getPoList=ãè°ç¨sapæ¥å£ GetPurchaseOrder=ãåå
¥å°wms表ã |
| | | |
| | | 1ãå
¥åºæµç¨ |
| | | ï¼1ï¼æ¶è´§ï¼è¾å
¥éè´åå·å项å·ï¼è°ç¨æ¥å£ inbound/inScan/getDataæ¥è¯¢ï¼æ¥è¯¢è¿ä¸ªé¡¹å·å¾
æ¶å¤å°ï¼å·²æ¶å¤å°ã |
| | | ï¼2ï¼ç¹å»æé®ã确认ãï¼è¯·æ±æ¥å£receiptConvertï¼ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { getThisWeekRange} from '@/utils/formatTime.js' |
| | | |
| | | |
| | | initTimeData(){ |
| | | this.datatime= ''; |
| | | this.datatime= getThisWeekRange(30);//å¯ç¨äº |
| | | }, |
| | | |
| | | |
| | | 1ãå¨mountedæ¹æ³ä¸ï¼findåé¢è°ç¨æ¹æ³ |
| | | this.initTimeData(); |
| | | this.find(1) |
| | | |
| | | 2ãå¨ reset æ¹æ³ä¸è°ç¨ |
| | | this.initTimeData();//éç½®æ¶é´ |
| | | this.find() |
| | |
| | | GO |
| | | |
| | | |
| | | use YrtWMS_Siemens2; |
| | | go |
| | | |
| | | /*==============================================================*/ |
| | | /* Table: Purchase_OrderList_EmptyMaterialCode */ |
| | | /* Description: POæç»ç©ºç©æå·è¡¨ */ |
| | | /* Author:shaocx */ |
| | | /* CreateTime:2025-09-09 */ |
| | | /*==============================================================*/ |
| | | IF NOT EXISTS( SELECT 1 FROM SYSOBJECTS WHERE ID = OBJECT_ID('Purchase_OrderList_EmptyMaterialCode') AND TYPE = 'U') |
| | | create table Purchase_OrderList_EmptyMaterialCode ( |
| | | ID bigint NOT NULL, -- ä¸»é® |
| | | |
| | | PoCode nvarchar(50) null,-- éè´åå· |
| | | ProductName nvarchar(500) null,-- ç©æåç§° |
| | | Quantity decimal null, -- æ°é |
| | | ItemNumber nvarchar(50) null,-- é¡¹å· |
| | | BatchNumber nvarchar(50) null,-- æ¹æ¬¡å· |
| | | |
| | | Remark nvarchar(2000) null, -- 夿³¨ |
| | | |
| | | Creator varchar(128) null,-- å建人 |
| | | CreateTime datetime null,-- å建æ¶é´ |
| | | LastModifier varchar(128) null,-- ä¿®æ¹äºº |
| | | LastModifyTime datetime null -- ä¿®æ¹æ¶é´ |
| | | |
| | | constraint PK_Purchase_OrderList_EmptyMaterialCode_Id primary key (ID) |
| | | ) |
| | | GO |
| | | |
| | | |
| | | |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections></configSections> |
| | | <startup> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> |
| | | </startup> |
| | | <system.serviceModel> |
| | | <bindings> |
| | |
| | | </basicHttpBinding> |
| | | </bindings> |
| | | <client> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" |
| | | binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" |
| | | contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" /> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" |
| | | binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" |
| | | contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" /> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/> |
| | | </client> |
| | | <behaviors> |
| | | <serviceBehaviors> |
| | |
| | | // è¿è¡æ¶çæ¬: 4.0.30319.42000 |
| | | // |
| | | // å¯¹æ¤æä»¶çæ´æ¹å¯è½ä¼å¯¼è´ä¸æ£ç¡®çè¡ä¸ºï¼å¹¶ä¸å¦æ |
| | | // éæ°çæä»£ç ï¼è¿äºæ´æ¹å°ä¸¢å¤±ã |
| | | // éæ°çæä»£ç ï¼è¿äºæ´æ¹å°ä¼ä¸¢å¤±ã |
| | | // </auto-generated> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace WMS_TestForm.Properties |
| | | { |
| | | namespace WMS_TestForm.Properties { |
| | | using System; |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] |
| | | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| | | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
| | | internal class Resources |
| | | { |
| | | internal class Resources { |
| | | |
| | | private static global::System.Resources.ResourceManager resourceMan; |
| | | |
| | | private static global::System.Globalization.CultureInfo resourceCulture; |
| | | |
| | | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
| | | internal Resources() |
| | | { |
| | | internal Resources() { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¿åæ¤ç±»ä½¿ç¨çãç¼åç ResourceManager å®ä¾ã |
| | | /// è¿åæ¤ç±»ä½¿ç¨çç¼åç ResourceManager å®ä¾ã |
| | | /// </summary> |
| | | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
| | | internal static global::System.Resources.ResourceManager ResourceManager |
| | | { |
| | | get |
| | | { |
| | | if ((resourceMan == null)) |
| | | { |
| | | internal static global::System.Resources.ResourceManager ResourceManager { |
| | | get { |
| | | if (object.ReferenceEquals(resourceMan, null)) { |
| | | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WMS_TestForm.Properties.Resources", typeof(Resources).Assembly); |
| | | resourceMan = temp; |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 为ææèµæºæ¥æ¾éåå½å线ç¨ç CurrentUICulture 屿§ï¼ |
| | | /// æ¹æ³æ¯ä½¿ç¨æ¤å¼ºç±»åèµæºç±»ã |
| | | /// ä½¿ç¨æ¤å¼ºç±»åèµæºç±»ï¼ä¸ºææèµæºæ¥æ¾ |
| | | /// éåå½å线ç¨ç CurrentUICulture 屿§ã |
| | | /// </summary> |
| | | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
| | | internal static global::System.Globalization.CultureInfo Culture |
| | | { |
| | | get |
| | | { |
| | | internal static global::System.Globalization.CultureInfo Culture { |
| | | get { |
| | | return resourceCulture; |
| | | } |
| | | set |
| | | { |
| | | set { |
| | | resourceCulture = value; |
| | | } |
| | | } |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <auto-generated> |
| | | // This code was generated by a tool. |
| | | // Runtime Version:4.0.30319.42000 |
| | | // æ¤ä»£ç ç±å·¥å
·çæã |
| | | // è¿è¡æ¶çæ¬:4.0.30319.42000 |
| | | // |
| | | // Changes to this file may cause incorrect behavior and will be lost if |
| | | // the code is regenerated. |
| | | // å¯¹æ¤æä»¶çæ´æ¹å¯è½ä¼å¯¼è´ä¸æ£ç¡®çè¡ä¸ºï¼å¹¶ä¸å¦æ |
| | | // éæ°çæä»£ç ï¼è¿äºæ´æ¹å°ä¼ä¸¢å¤±ã |
| | | // </auto-generated> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace WMS_TestForm.Properties |
| | | { |
| | | namespace WMS_TestForm.Properties { |
| | | |
| | | |
| | | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] |
| | | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
| | | { |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] |
| | | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { |
| | | |
| | | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
| | | |
| | | public static Settings Default |
| | | { |
| | | get |
| | | { |
| | | public static Settings Default { |
| | | get { |
| | | return defaultInstance; |
| | | } |
| | | } |
| | |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>WMS_TestForm</RootNamespace> |
| | | <AssemblyName>WMS_TestForm</AssemblyName> |
| | | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| | | <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <TargetFrameworkProfile /> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | |
| | | <Compile Include="Properties\Resources.Designer.cs"> |
| | | <AutoGen>True</AutoGen> |
| | | <DependentUpon>Resources.resx</DependentUpon> |
| | | <DesignTime>True</DesignTime> |
| | | </Compile> |
| | | <None Include="Properties\Settings.settings"> |
| | | <Generator>SettingsSingleFileGenerator</Generator> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections></configSections> |
| | | <startup> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> |
| | | </startup> |
| | | <system.serviceModel> |
| | | <bindings> |
| | |
| | | </basicHttpBinding> |
| | | </bindings> |
| | | <client> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" |
| | | binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" |
| | | contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" /> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" |
| | | binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" |
| | | contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" /> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/> |
| | | </client> |
| | | <behaviors> |
| | | <serviceBehaviors> |
| | |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>WMS_UnitTest</RootNamespace> |
| | | <AssemblyName>WMS_UnitTest</AssemblyName> |
| | | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| | | <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
| | | <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> |
| | |
| | | <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> |
| | | <IsCodedUITest>False</IsCodedUITest> |
| | | <TestProjectType>UnitTest</TestProjectType> |
| | | <TargetFrameworkProfile /> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <configSections></configSections> |
| | | <startup> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> |
| | | </startup> |
| | | <system.serviceModel> |
| | | <bindings> |
| | | <basicHttpBinding> |
| | | <binding name="BasicHttpBinding_IControlCenterWcfService" /> |
| | | <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" |
| | | maxReceivedMessageSize="2147483647" /> |
| | | <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/> |
| | | </basicHttpBinding> |
| | | </bindings> |
| | | <client> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" |
| | | binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" |
| | | contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" /> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" |
| | | binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" |
| | | contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" /> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/> |
| | | <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/> |
| | | </client> |
| | | <behaviors> |
| | | <serviceBehaviors> |
| | |
| | | //模æç¯å¢ä¸ï¼è®¤ä¸ºæåºå¼å¸¸ |
| | | //卿µè¯ç¯å¢ä¸ï¼ä½ å¯ä»¥å±è½è¯¥ä»£ç |
| | | //åå¸å°ç产ç¯å¢ï¼è¯·æå¼è¯¥ä»£ç |
| | | throw new Exception("æ¤æ¬¡æ¯æ¨¡æç¯å¢ï¼è¦å"); |
| | | //throw new Exception("æ¤æ¬¡æ¯æ¨¡æç¯å¢ï¼è¦å"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using wcftest.EnumDefine; |
| | | |
| | | namespace wcftest.Model.Input |
| | | { |
| | | /// <summary> |
| | | /// å页æ¥è¯¢ å åæºè¿è¡ç»è®¡ è¾å
¥åæ° |
| | | /// </summary> |
| | | public class DeviceGeneralInfoInput : roleMenu |
| | | { |
| | | |
| | | /// <summary> |
| | | /// å页 |
| | | /// </summary> |
| | | public paging queryInfo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å è½½å
¨é¨æ°æ® |
| | | /// </summary> |
| | | public bool IsLoadAllData { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¶é´èå´-å建æ¶é´ |
| | | /// </summary> |
| | | public DateTime[] datatime { get; set; } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using wcftest.EnumDefine; |
| | | |
| | | namespace wcftest.Model.Input |
| | | { |
| | | /// <summary> |
| | | /// å页æ¥è¯¢ è¾å
¥åæ° |
| | | /// </summary> |
| | | public class Purchase_OrderList_EmptyMaterialCodeInput : roleMenu |
| | | { |
| | | |
| | | /// <summary> |
| | | /// å页 |
| | | /// </summary> |
| | | public paging queryInfo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å è½½å
¨é¨æ°æ® |
| | | /// </summary> |
| | | public bool IsLoadAllData { get; set; } |
| | | |
| | | |
| | | /// <summary>æç´¢åæ° |
| | | /// |
| | | /// </summary> |
| | | public searchparamForPurchase_OrderList_EmptyMaterialCode search { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¶é´èå´-å建æ¶é´ |
| | | /// </summary> |
| | | public DateTime[] datatime { get; set; } |
| | | |
| | | } |
| | | |
| | | public class searchparamForPurchase_OrderList_EmptyMaterialCode |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | public string PoCode { get; set; } |
| | | |
| | | |
| | | public string ProductName { get; set; } |
| | | |
| | | |
| | | |
| | | public string ItemNumber { get; set; } |
| | | } |
| | | } |
| | |
| | | Mutex MyMutex = new Mutex(true, "wcftest", out result); |
| | | if (result) |
| | | { |
| | | Yitter.IdGenerator.IdGeneratorOptions options = new Yitter.IdGenerator.IdGeneratorOptions(1); |
| | | Yitter.IdGenerator.YitIdHelper.SetIdGenerator(options); |
| | | Application.Run(form1ObjPublic); |
| | | } |
| | | else |
| | |
| | | : base("name=dbModel") |
| | | { |
| | | } |
| | | public virtual DbSet<Purchase_OrderList_EmptyMaterialCode> Purchase_OrderList_EmptyMaterialCode { get; set; } |
| | | public virtual DbSet<Base_PositionPrint> Base_PositionPrint { get; set; } |
| | | public virtual DbSet<Sale_Order_History_Items> Sale_Order_History_Items { get; set; } |
| | | public virtual DbSet<Sale_Order_History> Sale_Order_History { get; set; } |
| | |
| | | public virtual DbSet<Base_BasicDataSet> Base_BasicDataSet { get; set; } |
| | | protected override void OnModelCreating(DbModelBuilder modelBuilder) |
| | | { |
| | | modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>() |
| | | .Property(e => e.Quantity) |
| | | .HasPrecision(18, 0); |
| | | |
| | | modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>() |
| | | .Property(e => e.Creator) |
| | | .IsUnicode(false); |
| | | |
| | | modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>() |
| | | .Property(e => e.LastModifier) |
| | | .IsUnicode(false); |
| | | |
| | | modelBuilder.Entity<Base_PositionPrint>() |
| | | .Property(e => e.ProductStorage) |
| | | .HasPrecision(14, 4); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace wcftest.orm |
| | | { |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel.DataAnnotations.Schema; |
| | | using System.Data.Entity.Spatial; |
| | | |
| | | public partial class Purchase_OrderList_EmptyMaterialCode |
| | | { |
| | | [DatabaseGenerated(DatabaseGeneratedOption.None)] |
| | | public long ID { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string PoCode { get; set; } |
| | | |
| | | [StringLength(500)] |
| | | public string ProductName { get; set; } |
| | | |
| | | public decimal? Quantity { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string ItemNumber { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string BatchNumber { get; set; } |
| | | |
| | | [StringLength(2000)] |
| | | public string Remark { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string Creator { get; set; } |
| | | |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string LastModifier { get; set; } |
| | | |
| | | public DateTime? LastModifyTime { get; set; } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | protected override void OnModelCreating(DbModelBuilder modelBuilder) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | [OperationContract] |
| | | string getDeviceInfo(string startTime, string endTime); |
| | | |
| | | /// <summary> |
| | | /// å页æ¥è¯¢ å åæºè¿è¡ç»è®¡ |
| | | /// </summary> |
| | | /// <param name="param"></param> |
| | | /// <returns></returns> |
| | | [OperationContract] |
| | | string QueryPageDeviceGeneralInfo(string param); |
| | | |
| | | /// <summary> |
| | | /// å页æ¥è¯¢ POæç»ç©ºç©æå·ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="param"></param> |
| | | /// <returns></returns> |
| | | [OperationContract] |
| | | string QueryPagePurchaseEmptyMaterialCode(string param); |
| | | |
| | | |
| | | [OperationContract] |
| | | string outStockTaskList(string takes); |
| | | [OperationContract] |
| | |
| | | using wcftest.Model.Output; |
| | | using wcftest.orm_test; |
| | | using wcftest.Utils.AuthFacotry; |
| | | using System.Linq.Expressions; |
| | | |
| | | |
| | | namespace wcftest.wcf |
| | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å页æ¥è¯¢ å åæºè¿è¡ç»è®¡ |
| | | /// </summary> |
| | | /// <param name="param"></param> |
| | | /// <returns></returns> |
| | | public string QueryPageDeviceGeneralInfo(string param) |
| | | { |
| | | msgss<deviceGeneralInfo> msg = new msgss<deviceGeneralInfo>(); |
| | | DeviceGeneralInfoInput page = JsonConvert.DeserializeObject<DeviceGeneralInfoInput>(param); |
| | | try |
| | | { |
| | | using (dbModel mod = new dbModel()) |
| | | { |
| | | List<deviceGeneralInfo> fiveDayDeviceInfo = null; |
| | | if (page.datatime == null) |
| | | { |
| | | fiveDayDeviceInfo = mod.deviceGeneralInfo |
| | | .OrderByDescending(x => x.createTime) |
| | | .ToList(); |
| | | } |
| | | else |
| | | { |
| | | DateTime _startTime = Convert.ToDateTime(page.datatime[0]); |
| | | DateTime _endTime = Convert.ToDateTime(page.datatime[1]); |
| | | fiveDayDeviceInfo = mod.deviceGeneralInfo |
| | | .Where(x => x.createTime >= _startTime && x.createTime <= _endTime) |
| | | .OrderByDescending(x => x.createTime) |
| | | .ToList(); |
| | | } |
| | | |
| | | if (fiveDayDeviceInfo.Count > 0) |
| | | { |
| | | foreach (var item in fiveDayDeviceInfo) |
| | | { |
| | | //éæ°è®¡ç®çå¾
æ¶é´ |
| | | item.deviceWaitTime = 1440 - ((item.deviceRunTime ?? 0M) + (item.deviceAlarmTime ?? 0M)); |
| | | } |
| | | } |
| | | |
| | | List<deviceGeneralInfo> fenyeRerult = new List<deviceGeneralInfo>(); |
| | | if (fiveDayDeviceInfo.Count > 0) |
| | | { |
| | | msg.status = 200; |
| | | msg.total = fiveDayDeviceInfo.Count; |
| | | if (page.IsLoadAllData) |
| | | {//åªæç¡®å®å è½½å
¨é¨æ°æ®æ¶æå è½½å
¨é¨æ°æ® [EditBy shaocx,2022-03-07] |
| | | msg.status = 200; |
| | | msg.allDate = fiveDayDeviceInfo.ToList(); |
| | | } |
| | | else |
| | | {//ä¸å è½½å
¨é¨ï¼å°±è¿æ»¤åé¡µä¿¡æ¯ |
| | | //å妿¯é¡µæ°é 大äºçç¹æ°æ® |
| | | if (page.queryInfo.pagesize > fiveDayDeviceInfo.Count) |
| | | { |
| | | msg.date = fiveDayDeviceInfo; |
| | | } |
| | | else |
| | | { |
| | | #region åé¡µè®¡ç® |
| | | int a = page.queryInfo.pagesize; |
| | | |
| | | int b = page.queryInfo.pagenum; |
| | | int c = (int)Math.Ceiling((double)fiveDayDeviceInfo.Count / a); |
| | | int d = fiveDayDeviceInfo.Count % a; |
| | | int e = 0; |
| | | int f = a * (b - 1); |
| | | if (d != 0 && b == c) |
| | | { |
| | | e = d + f; |
| | | |
| | | } |
| | | else |
| | | { |
| | | e = a + f; |
| | | } |
| | | |
| | | |
| | | |
| | | for (int i = f; i < e; i++) |
| | | { |
| | | fenyeRerult.Add(fiveDayDeviceInfo[i]); |
| | | } |
| | | msg.date = fenyeRerult; |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | msg.status = 400; |
| | | msg.total = 1; |
| | | msg.date = null; |
| | | } |
| | | |
| | | |
| | | return JsonConvert.SerializeObject(msg); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | logtxt.txtWrite("åºéä¿¡æ¯" + ex.Message + "åºéè¡å·" + (string)ex.StackTrace, 2); |
| | | msg.status = 400; |
| | | msg.total = 1; |
| | | msg.date = null; |
| | | |
| | | return JsonConvert.SerializeObject(msg); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å页æ¥è¯¢ POæç»ç©ºç©æå·ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="param"></param> |
| | | /// <returns></returns> |
| | | public string QueryPagePurchaseEmptyMaterialCode(string param) |
| | | { |
| | | msgss<Purchase_OrderList_EmptyMaterialCode> msg = new msgss<Purchase_OrderList_EmptyMaterialCode>(); |
| | | Purchase_OrderList_EmptyMaterialCodeInput page = JsonConvert.DeserializeObject<Purchase_OrderList_EmptyMaterialCodeInput>(param); |
| | | try |
| | | { |
| | | using (dbModel mod = new dbModel()) |
| | | { |
| | | List<Purchase_OrderList_EmptyMaterialCode> fiveDayDeviceInfo = new List<Purchase_OrderList_EmptyMaterialCode>(); |
| | | |
| | | Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_datatime = x => 1 == 1; |
| | | if (page.datatime != null) |
| | | { |
| | | DateTime _startTime = Convert.ToDateTime(page.datatime[0]); |
| | | DateTime _endTime = Convert.ToDateTime(page.datatime[1]); |
| | | predicate_datatime = x => x.CreateTime >= _startTime && x.CreateTime <= _endTime; |
| | | } |
| | | Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_poCode = x => 1 == 1; |
| | | if (!string.IsNullOrEmpty(page.search.PoCode)) |
| | | { |
| | | predicate_poCode = x => x.PoCode == page.search.PoCode; |
| | | } |
| | | Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_ItemNumber = x => 1 == 1; |
| | | if (!string.IsNullOrEmpty(page.search.ItemNumber)) |
| | | { |
| | | predicate_poCode = x => x.ItemNumber == page.search.ItemNumber; |
| | | } |
| | | Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_ProductName = x => 1 == 1; |
| | | if (!string.IsNullOrEmpty(page.search.ProductName)) |
| | | { |
| | | predicate_poCode = x => x.ProductName == page.search.ProductName; |
| | | } |
| | | fiveDayDeviceInfo = mod.Purchase_OrderList_EmptyMaterialCode |
| | | .Where(predicate_datatime) |
| | | .Where(predicate_poCode) |
| | | .Where(predicate_ItemNumber) |
| | | .Where(predicate_ProductName) |
| | | .ToList(); |
| | | |
| | | |
| | | List<Purchase_OrderList_EmptyMaterialCode> fenyeRerult = new List<Purchase_OrderList_EmptyMaterialCode>(); |
| | | if (fiveDayDeviceInfo.Count > 0) |
| | | { |
| | | msg.status = 200; |
| | | msg.total = fiveDayDeviceInfo.Count; |
| | | if (page.IsLoadAllData) |
| | | {//åªæç¡®å®å è½½å
¨é¨æ°æ®æ¶æå è½½å
¨é¨æ°æ® [EditBy shaocx,2022-03-07] |
| | | msg.status = 200; |
| | | msg.allDate = fiveDayDeviceInfo.ToList(); |
| | | } |
| | | else |
| | | {//ä¸å è½½å
¨é¨ï¼å°±è¿æ»¤åé¡µä¿¡æ¯ |
| | | //å妿¯é¡µæ°é 大äºçç¹æ°æ® |
| | | if (page.queryInfo.pagesize > fiveDayDeviceInfo.Count) |
| | | { |
| | | msg.date = fiveDayDeviceInfo; |
| | | } |
| | | else |
| | | { |
| | | #region åé¡µè®¡ç® |
| | | int a = page.queryInfo.pagesize; |
| | | |
| | | int b = page.queryInfo.pagenum; |
| | | int c = (int)Math.Ceiling((double)fiveDayDeviceInfo.Count / a); |
| | | int d = fiveDayDeviceInfo.Count % a; |
| | | int e = 0; |
| | | int f = a * (b - 1); |
| | | if (d != 0 && b == c) |
| | | { |
| | | e = d + f; |
| | | |
| | | } |
| | | else |
| | | { |
| | | e = a + f; |
| | | } |
| | | |
| | | |
| | | |
| | | for (int i = f; i < e; i++) |
| | | { |
| | | fenyeRerult.Add(fiveDayDeviceInfo[i]); |
| | | } |
| | | msg.date = fenyeRerult; |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | msg.status = 400; |
| | | msg.total = 1; |
| | | msg.date = null; |
| | | } |
| | | |
| | | |
| | | return JsonConvert.SerializeObject(msg); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | logtxt.txtWrite("åºéä¿¡æ¯" + ex.Message + "åºéè¡å·" + (string)ex.StackTrace, 2); |
| | | msg.status = 400; |
| | | msg.total = 1; |
| | | msg.date = null; |
| | | |
| | | return JsonConvert.SerializeObject(msg); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary>2då¨ç»è·å设å¤ä½ç½® |
| | | /// 2då¨ç»è·å设å¤ä½ç½® |
| | | /// </summary> |
| | |
| | | var checkMateria1s = (from p in mod.Base_ProductInfo where (from f in rstPo select f).Contains(p.ProductCode) select p).ToList(); |
| | | |
| | | #region æ·»å POåç©ææç» |
| | | System.Collections.Generic.List<Purchase_OrderList_EmptyMaterialCode> insert_OrderList_EmptyMaterialCodeList = new List<Purchase_OrderList_EmptyMaterialCode>(); |
| | | string lastTracknum = ""; |
| | | foreach (var item in resultPo.Materials) |
| | | { |
| | | if (item.MaterialCode == null) |
| | | { |
| | | if (string.IsNullOrEmpty(item.MaterialCode)) |
| | | {//åå
¥POæç»ç©ºç©æå·è¡¨ ãEditby shaocx,2025-09-09ã |
| | | logtxt.txtWrite("éè´åå·:" + item.PoNumber + " ç©æé¡¹å·:" + item.PoItem + "ç©æç¼å·ä¸ºç©º", 2); |
| | | insert_OrderList_EmptyMaterialCodeList.Add(new Purchase_OrderList_EmptyMaterialCode() |
| | | { |
| | | ID = Yitter.IdGenerator.YitIdHelper.NextId(), |
| | | PoCode = poInfo.PoCode, |
| | | BatchNumber = "", |
| | | ItemNumber = item.PoItem, |
| | | ProductName = item.MaterialName, |
| | | CreateTime = DateTime.Now, |
| | | Creator = resultPo.CreatedBy, |
| | | Quantity = 0, |
| | | LastModifier = resultPo.CreatedBy, |
| | | LastModifyTime = DateTime.Now, |
| | | Remark = "" |
| | | }); |
| | | continue;//ç©æç¼å·ä¸ºç©º |
| | | } |
| | | string materialCode = item.MaterialCode; |
| | |
| | | #endregion |
| | | //å
ä¿å主表 ç¶åè·å主表ID ååå
¥æç»è¡¨ |
| | | mod.Purchase_Order.Add(poInfo); |
| | | |
| | | if (insert_OrderList_EmptyMaterialCodeList != null && insert_OrderList_EmptyMaterialCodeList.Count > 0) |
| | | {//åå
¥POæç»ç©ºç©æå·è¡¨ ãEditby shaocx,2025-09-09ã |
| | | mod.Purchase_OrderList_EmptyMaterialCode.AddRange(insert_OrderList_EmptyMaterialCodeList); |
| | | } |
| | | |
| | | int results = mod.SaveChanges(); |
| | | for (int h = 0; h < 10; h++) |
| | | { |
| | |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>wcftest</RootNamespace> |
| | | <AssemblyName>wcftest</AssemblyName> |
| | | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| | | <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled> |
| | | <TargetFrameworkProfile /> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | |
| | | <Reference Include="System.Drawing" /> |
| | | <Reference Include="System.Windows.Forms" /> |
| | | <Reference Include="System.Xml" /> |
| | | <Reference Include="Yitter.IdGenerator.Net45"> |
| | | <HintPath>..\DLL\Yitter.IdGenerator.Net45.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="BussinessExtension\AutoMoveLocation\UpdateStoreWarningDaysHandler.cs" /> |
| | |
| | | </Compile> |
| | | <Compile Include="deviceorm\MainTask.cs" /> |
| | | <Compile Include="deviceorm\PartTask.cs" /> |
| | | <Compile Include="Model\Input\Purchase_OrderList_EmptyMaterialCodeInput.cs" /> |
| | | <Compile Include="Model\Input\DeviceGeneralInfoInput.cs" /> |
| | | <Compile Include="Model\Input\UpdateStoreWarningDaysInput.cs" /> |
| | | <Compile Include="Model\Input\RePrintBarCodeInput.cs" /> |
| | | <Compile Include="Model\Input\Sale_Order_HistoryInput.cs" /> |
| | |
| | | <Compile Include="orm\Sale_Order_History.cs" /> |
| | | <Compile Include="orm\Sale_Order_History_Items.cs" /> |
| | | <Compile Include="orm_test\orm_test.cs" /> |
| | | <Compile Include="orm2\Purchase_OrderList_EmptyMaterialCode.cs" /> |
| | | <Compile Include="Program.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | <Compile Include="sapEntity\analyseMateral.cs" /> |