| | |
| | | onClick: function () { |
| | | this.export(); |
| | | } |
| | | }, |
| | | { |
| | | name: "å¯¼åºæµç¨å¡", |
| | | icon: 'el-icon-bottom', |
| | | type: 'success', |
| | | plain: true, |
| | | value: 'ExportProcessCard', |
| | | onClick: function () { |
| | | } |
| | | } |
| | | |
| | | ] |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-button v-else @click="handleClick" |
| | | >éæ©{{ img ? 'å¾ç' : 'æä»¶' }}</el-button |
| | | > |
| | | <el-button v-else @click="handleClick">éæ©{{ img ? "å¾ç" : "æä»¶" }}</el-button> |
| | | |
| | | <el-button |
| | | v-if="!autoUpload && !img" |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | let OSS = require('ali-oss'); |
| | | let OSS = require("ali-oss"); |
| | | export default { |
| | | components: {}, |
| | | props: { |
| | |
| | | //æ¯å¦æ¾ç¤ºé»è®¤ä»ç» |
| | | //æ¯å¦å¤é |
| | | type: Boolean, |
| | | default: false |
| | | default: false, |
| | | }, |
| | | fileInfo: { |
| | | //ç¨äºæ¥æ¶ä¸ä¼ çæä»¶ï¼ä¹å¯ä»¥å 以é»è®¤å¼ï¼æ¾ç¤ºå·²ä¸ä¼ çæä»¶ï¼ç¨æ·ä¸ä¼ åä¼è¦çé»è®¤å¼ |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | } //æ ¼å¼[{name:'1.jpg',path:'127.0.01/1.jpg'}] |
| | | }, //æ ¼å¼[{name:'1.jpg',path:'127.0.01/1.jpg'}] |
| | | }, |
| | | downLoad: { |
| | | //æ¯å¦å¯ä»¥ç¹å»æä»¶ä¸è½½ |
| | | type: Boolean, |
| | | default: true |
| | | default: true, |
| | | }, |
| | | multiple: { |
| | | //æ¯å¦å¤é |
| | | type: Boolean, |
| | | default: false |
| | | default: false, |
| | | }, |
| | | maxFile: { |
| | | //æå¤å¯éæä»¶æ°éï¼å¿
é¡»multiple=trueï¼æä¼çæ |
| | | type: Number, |
| | | default: 5 |
| | | default: 5, |
| | | }, |
| | | maxSize: { |
| | | //æä»¶éå¶å¤§å°3M |
| | | type: Number, |
| | | default: 50 |
| | | default: 50, |
| | | }, |
| | | |
| | | autoUpload: { |
| | | //éæ©æä»¶åæ¯å¦èªå¨ä¸ä¼ |
| | | type: Boolean, |
| | | default: true |
| | | default: true, |
| | | }, |
| | | img: { |
| | | //å¾çç±»å img>excel>fileTypesä¸ç§æä»¶ç±»åä¼å
级 |
| | | type: Boolean, |
| | | default: false |
| | | default: false, |
| | | }, |
| | | excel: { |
| | | //excelæä»¶ |
| | | type: Boolean, |
| | | default: false |
| | | default: false, |
| | | }, |
| | | fileTypes: { |
| | | //æå®ä¸ä¼ æä»¶çç±»å |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | } |
| | | }, |
| | | }, |
| | | url: { |
| | | //ä¸ä¼ çurl |
| | | type: String, |
| | | default: '' |
| | | default: "", |
| | | }, |
| | | uploadBefore: { |
| | | //è¿åfalseä¼ä¸æ¢æ§è¡ |
| | |
| | | type: Function, |
| | | default: (files) => { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | uploadAfter: { |
| | | //è¿åfalseä¼ä¸æ¢æ§è¡ |
| | |
| | | type: Function, |
| | | default: (result, files) => { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | onChange: { |
| | | //éæ©æä»¶æ¶ //è¿åfalseä¼ä¸æ¢æ§è¡ |
| | | type: Function, |
| | | default: (files) => { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | // clear: { |
| | | // //ä¸ä¼ 宿忝妿¸
空æä»¶å表 |
| | |
| | | fileList: { |
| | | //æ¯å¦æ¾ç¤ºéæ©çæä»¶å表 |
| | | type: Boolean, |
| | | default: true |
| | | default: true, |
| | | }, |
| | | fileClick: { |
| | | //ç¹å»æä»¶äºä»¶ |
| | | type: Function, |
| | | default: (index, file, files) => { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | removeBefore: { |
| | | //ç§»é¤æä»¶äºä»¶ |
| | | type: Function, |
| | | default: (index, file, files) => { |
| | | return true; |
| | | } |
| | | }, |
| | | }, |
| | | append: { |
| | | //æ¤å±æ§å·²åºå¼ï¼å¤æä»¶ä¸ä¼ ï¼é»è®¤è¿½å æä»¶ |
| | | type: Boolean, |
| | | default: false |
| | | default: false, |
| | | }, |
| | | compress: { |
| | | //å¼å¯å¾çå缩,å颿 ¹æ®éè¦åå®å |
| | | type: Boolean, |
| | | default: true |
| | | default: true, |
| | | }, |
| | | compressMinSize: { |
| | | //å缩çæå°æ¯ä¾ |
| | | type: Number, |
| | | default: 0.1 |
| | | } |
| | | default: 0.1, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | errorImg: 'this.src="' + require('@/assets/imgs/error-img.png') + '"', |
| | | errorImg: 'this.src="' + require("@/assets/imgs/error-img.png") + '"', |
| | | changed: false, //æå¨ä¸ä¼ æååç¦æ¢éå¤ä¸ä¼ ï¼å¿
须鿰鿩 |
| | | model: true, |
| | | files: [], |
| | | bigImg: '', |
| | | imgTypes: ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp', 'jfif'], |
| | | bigImg: "", |
| | | imgTypes: ["gif", "jpg", "jpeg", "png", "bmp", "webp", "jfif"], |
| | | loadingStatus: false, |
| | | loadText: 'ä¸ä¼ æä»¶' |
| | | loadText: "ä¸ä¼ æä»¶", |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | handler(files) { |
| | | this.cloneFile(files); |
| | | }, |
| | | deep: true |
| | | } |
| | | deep: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | cloneFile(files) { |
| | | this.files = files.map((x) => { |
| | | return { |
| | | name: x.name || this.getFileName(x.path), |
| | | path: x.path |
| | | path: x.path, |
| | | }; |
| | | }); |
| | | }, |
| | | getFileName(path) { |
| | | if (!path) { |
| | | return 'æªå®ä¹æä»¶å'; |
| | | return "æªå®ä¹æä»¶å"; |
| | | } |
| | | let _index = path.lastIndexOf('/'); |
| | | let _index = path.lastIndexOf("/"); |
| | | return path.substring(_index + 1); |
| | | }, |
| | | previewImg(index) { |
| | |
| | | }, |
| | | getSelector() { |
| | | if (this.autoUpload) { |
| | | return 'auto-selector'; |
| | | return "auto-selector"; |
| | | } |
| | | return 'submit-selector'; |
| | | return "submit-selector"; |
| | | }, |
| | | getImgSrc(file, index) { |
| | | if (file.hasOwnProperty('path')) { |
| | | if (file.hasOwnProperty("path")) { |
| | | if (this.base.isUrl(file.path)) { |
| | | return file.path; |
| | | } |
| | | //2020.12.27å¢å base64å¾çæä½ |
| | | if (file.path.indexOf('/9j/') != -1) { |
| | | return 'data:image/jpeg;base64,' + file.path; |
| | | if (file.path.indexOf("/9j/") != -1) { |
| | | return "data:image/jpeg;base64," + file.path; |
| | | } |
| | | if (file.path.substr(0, 1) == '/') { |
| | | if (file.path.substr(0, 1) == "/") { |
| | | file.path = file.path.substr(1); |
| | | } |
| | | return this.http.ipAddress + file.path; |
| | |
| | | return; |
| | | } |
| | | if (!file.path) { |
| | | this.$message.error('请å
ä¸ä¼ æä»¶'); |
| | | this.$message.error("请å
ä¸ä¼ æä»¶"); |
| | | return; |
| | | } |
| | | this.base.dowloadFile( |
| | | file.path, |
| | | file.name, |
| | | { |
| | | Authorization: this.$store.getters.getToken() |
| | | Authorization: this.$store.getters.getToken(), |
| | | }, |
| | | this.http.ipAddress |
| | | ); |
| | | }, |
| | | getText() { |
| | | if (this.img) { |
| | | return 'åªè½ä¸ä¼ å¾ç,'; |
| | | return "åªè½ä¸ä¼ å¾ç,"; |
| | | } else if (this.excel) { |
| | | return 'åªè½ä¸ä¼ excelæä»¶,'; |
| | | return "åªè½ä¸ä¼ excelæä»¶,"; |
| | | } |
| | | }, |
| | | handleClick() { |
| | |
| | | return this.files; |
| | | }, |
| | | convertToFile(dataurl, filename) { |
| | | let arr = dataurl.split(','); |
| | | let arr = dataurl.split(","); |
| | | let mime = arr[0].match(/:(.*?);/)[1]; |
| | | let suffix = mime.split('/')[1]; |
| | | let suffix = mime.split("/")[1]; |
| | | let bstr = atob(arr[1]); |
| | | let n = bstr.length; |
| | | let u8arr = new Uint8Array(n); |
| | |
| | | // 第ä¸ä¸ªåæ°æ¯ è¦æ¾å°æä»¶ä¸çå
容ç MIME ç±»å |
| | | return new File([u8arr], `${filename}.${suffix}`, { |
| | | type: mime, |
| | | input: true |
| | | input: true, |
| | | }); |
| | | }, |
| | | async compressImg(file) { |
| | |
| | | //é»è®¤ææ¯ä¾å缩 |
| | | let w = this.width; |
| | | let h = this.height; |
| | | let canvas = document.createElement('canvas'); |
| | | let ctx = canvas.getContext('2d'); |
| | | canvas.setAttribute('width', w); |
| | | canvas.setAttribute('height', h); |
| | | let canvas = document.createElement("canvas"); |
| | | let ctx = canvas.getContext("2d"); |
| | | canvas.setAttribute("width", w); |
| | | canvas.setAttribute("height", h); |
| | | ctx.drawImage(this, 0, 0, w, h); |
| | | let rate = 0.3; |
| | | if (fileSize > 2) { |
| | |
| | | rate = _this.compressMinSize; |
| | | } |
| | | // rate=1; |
| | | let base64 = canvas.toDataURL('image/jpeg', rate); |
| | | let base64 = canvas.toDataURL("image/jpeg", rate); |
| | | resolve(_this.convertToFile(base64, file.name)); |
| | | }; |
| | | }; |
| | | }); |
| | | }, |
| | | async uploadOSS() { |
| | | this.http.get('api/alioss/getAccessToken', {}, false).then(async (x) => { |
| | | this.http.get("api/alioss/getAccessToken", {}, false).then(async (x) => { |
| | | if (!x.status) return this.$Message.error(x.message); |
| | | let client = new OSS({ |
| | | // yourRegionå¡«åBucketæå¨å°åã以åä¸1ï¼æå·ï¼ä¸ºä¾ï¼Regionå¡«å为oss-cn-hangzhouã |
| | |
| | | // ä»STSæå¡è·åçå®å
¨ä»¤çï¼SecurityTokenï¼ã |
| | | stsToken: x.data.securityToken, |
| | | // å¡«åBucketåç§°ã |
| | | bucket: x.data.bucket |
| | | bucket: x.data.bucket, |
| | | }); |
| | | console.log(this.files); |
| | | for (let index = 0; index < this.files.length; index++) { |
| | | const file = this.files[index]; |
| | | if (file.input) { |
| | | let result = await client.put( |
| | | x.data.bucketFolder + '/' + x.data.unique + file.name, |
| | | x.data.bucketFolder + "/" + x.data.unique + file.name, |
| | | file |
| | | ); |
| | | file.path = result.url; |
| | |
| | | let _files = this.files.map((file) => { |
| | | return { |
| | | name: file.newName || file.name, |
| | | path: file.path |
| | | path: file.path, |
| | | }; |
| | | }); |
| | | this.fileInfo.push(..._files); |
| | |
| | | async upload(vail) { |
| | | if (vail && !this.checkFile()) return false; |
| | | if (!this.url) { |
| | | return this.$message.error('没æé
置好Url'); |
| | | return this.$message.error("没æé
置好Url"); |
| | | } |
| | | if (!this.files || this.files.length == 0) { |
| | | return this.$message.error('è¯·éæ©æä»¶'); |
| | | return this.$message.error("è¯·éæ©æä»¶"); |
| | | } |
| | | //å¢å ä¸ä¼ æ¶èªå®ä¹åæ°ï¼åå°ä½¿ç¨è·åUtilities.HttpContext.Current.Request.Query["åæ®µ"] |
| | | let params={}; |
| | |
| | | paramText="?1=1"; |
| | | for (const key in params) { |
| | | let value=params[key]; |
| | | if(typeof(value)=='object'){ |
| | | value=JSON.stringify(value) |
| | | if (typeof value == "object") { |
| | | value = JSON.stringify(value); |
| | | } |
| | | paramText+=`&${key}=${value}` |
| | | paramText += `&${key}=${value}`; |
| | | } |
| | | } |
| | | |
| | | this.loadingStatus = true; |
| | | this.loadText = 'ä¸ä¼ ä¸..'; |
| | | this.loadText = "ä¸ä¼ ä¸.."; |
| | | if (window.oss && window.oss.ali.use) { |
| | | await this.uploadOSS(); |
| | | this.loadingStatus = false; |
| | | this.loadText = 'ä¸ä¼ æä»¶'; |
| | | this.loadText = "ä¸ä¼ æä»¶"; |
| | | if (!this.uploadAfter({status:true}, this.files)) { |
| | | this.changed = false; |
| | | return; |
| | | } else { |
| | | this.changed = true; |
| | | } |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$message.success("ä¸ä¼ æå"); |
| | | return; |
| | | } |
| | | |
| | |
| | | for (let index = 0; index < this.files.length; index++) { |
| | | let file = this.files[index]; |
| | | if (file.input) { |
| | | let name = file.name.split('.'); |
| | | let name = file.name.split("."); |
| | | name = name[name.length - 1].toLocaleLowerCase(); |
| | | let isImg = this.imgTypes.indexOf(name) != -1; |
| | | if (isImg && (name == 'jpg' || name == 'jpeg')) { |
| | | if (isImg && (name == "jpg" || name == "jpeg")) { |
| | | //>200KBçå¼å¯å缩 |
| | | if (isImg && file.size / 1024 / 1024 > 0.2) { |
| | | console.log('å缩å' + file.size); |
| | | console.log("å缩å" + file.size); |
| | | file = await this.compressImg(file); |
| | | file.compress = true; |
| | | this.files[index] = file; |
| | | this.files[index].input = true; |
| | | console.log('å缩å' + file.size); |
| | | console.log("å缩å" + file.size); |
| | | } |
| | | } |
| | | forms.append('fileInput', file, file.name); |
| | | forms.append("fileInput", file, file.name); |
| | | } |
| | | } |
| | | // forms.append("fileInput", this.files); |
| | | |
| | | this.http |
| | | .post(this.url+paramText, forms, this.autoUpload ? 'æ£å¨ä¸ä¼ æä»¶' : '') |
| | | .post(this.url + paramText, forms, this.autoUpload ? "æ£å¨ä¸ä¼ æä»¶" : "") |
| | | .then( |
| | | (x) => { |
| | | // this.$refs.uploadFile.clearFiles(); |
| | | this.loadingStatus = false; |
| | | this.loadText = 'ä¸ä¼ æä»¶'; |
| | | this.loadText = "ä¸ä¼ æä»¶"; |
| | | if (!this.uploadAfter(x, this.files)) { |
| | | this.changed = false; |
| | | return; |
| | |
| | | let _files = this.files.map((file) => { |
| | | return { |
| | | name: file.name, |
| | | path: file.path || x.data + file.name |
| | | path: file.path || x.data + file.name, |
| | | }; |
| | | }); |
| | | this.fileInfo.push(..._files); |
| | |
| | | this.files = _files; |
| | | }, |
| | | (error) => { |
| | | this.loadText = 'ä¸ä¼ æä»¶'; |
| | | this.loadText = "ä¸ä¼ æä»¶"; |
| | | this.loadingStatus = false; |
| | | } |
| | | ); |
| | | }, |
| | | format(file, checkFileType) { |
| | | const format = |
| | | file.name |
| | | .split('.') |
| | | .pop() |
| | | .toLocaleLowerCase() || ''; |
| | | let fileIcon = 'el-icon-document'; |
| | | const format = file.name.split(".").pop().toLocaleLowerCase() || ""; |
| | | let fileIcon = "el-icon-document"; |
| | | if (this.fileTypes.length > 0 && checkFileType != undefined) { |
| | | if (this.fileTypes.indexOf(format) != -1) { |
| | | return true; |
| | |
| | | if ( |
| | | checkFileType && |
| | | !(checkFileType instanceof Array) && |
| | | checkFileType != 'img' && |
| | | checkFileType != 'excel' |
| | | checkFileType != "img" && |
| | | checkFileType != "excel" |
| | | ) { |
| | | if (checkFileType.indexOf(format) > -1) { |
| | | return true; |
| | |
| | | } |
| | | } |
| | | |
| | | if (checkFileType == 'img' || this.imgTypes.indexOf(format) > -1) { |
| | | if (checkFileType == 'img') { |
| | | if (checkFileType == "img" || this.imgTypes.indexOf(format) > -1) { |
| | | if (checkFileType == "img") { |
| | | if (this.imgTypes.indexOf(format) > -1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | fileIcon = 'el-icon-picture-outline'; |
| | | fileIcon = "el-icon-picture-outline"; |
| | | } |
| | | if ( |
| | | ['mp4', 'm3u8', 'rmvb', 'avi', 'swf', '3gp', 'mkv', 'flv'].indexOf( |
| | | format |
| | | ) > -1 |
| | | ["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"].indexOf(format) > -1 |
| | | ) { |
| | | fileIcon = 'el-icon-document'; |
| | | fileIcon = "el-icon-document"; |
| | | } |
| | | if (['mp3', 'wav', 'wma', 'ogg', 'aac', 'flac'].indexOf(format) > -1) { |
| | | fileIcon = 'el-icon-document'; |
| | | if (["mp3", "wav", "wma", "ogg", "aac", "flac"].indexOf(format) > -1) { |
| | | fileIcon = "el-icon-document"; |
| | | } |
| | | if (['doc', 'txt', 'docx', 'pages', 'epub', 'pdf'].indexOf(format) > -1) { |
| | | fileIcon = 'el-icon-document'; |
| | | if (["doc", "txt", "docx", "pages", "epub", "pdf"].indexOf(format) > -1) { |
| | | fileIcon = "el-icon-document"; |
| | | } |
| | | if ( |
| | | checkFileType == 'excel' || |
| | | ['numbers', 'csv', 'xls', 'xlsx'].indexOf(format) > -1 |
| | | checkFileType == "excel" || |
| | | ["numbers", "csv", "xls", "xlsx"].indexOf(format) > -1 |
| | | ) { |
| | | if (checkFileType == 'excel') { |
| | | if (['numbers', 'csv', 'xls', 'xlsx'].indexOf(format) > -1) { |
| | | if (checkFileType == "excel") { |
| | | if (["numbers", "csv", "xls", "xlsx"].indexOf(format) > -1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | fileIcon = 'el-icon-document'; |
| | | fileIcon = "el-icon-document"; |
| | | } |
| | | return fileIcon; |
| | | }, |
| | |
| | | files.length + (inputFiles || []).length > (this.maxFile || 5) |
| | | ) { |
| | | this.$message.error( |
| | | 'æå¤åªè½éã' + |
| | | "æå¤åªè½éã" + |
| | | (this.maxFile || 5) + |
| | | 'ã' + |
| | | (this.img ? 'å¼ å¾ç' : '个æä»¶') + |
| | | '' |
| | | "ã" + |
| | | (this.img ? "å¼ å¾ç" : "个æä»¶") + |
| | | "" |
| | | ); |
| | | return false; |
| | | } |
| | |
| | | for (let index = 0; index < inputFiles.length; index++) { |
| | | const file = inputFiles[index]; |
| | | if (names.indexOf(file.name) != -1) { |
| | | file.name = '(' + index + ')' + file.name; |
| | | file.name = "(" + index + ")" + file.name; |
| | | } |
| | | names.push(file.name); |
| | | if (this.img && !this.format(file, 'img')) { |
| | | this.$message.error('éæ©çæä»¶ã' + file.name + 'ãåªè½æ¯å¾çæ ¼å¼'); |
| | | if (this.img && !this.format(file, "img")) { |
| | | this.$message.error("éæ©çæä»¶ã" + file.name + "ãåªè½æ¯å¾çæ ¼å¼"); |
| | | return false; |
| | | } |
| | | if (this.excel && !this.format(file, 'excel')) { |
| | | this.$message.error('éæ©çæä»¶ã' + file.name + 'ãåªè½æ¯excelæä»¶'); |
| | | if (this.excel && !this.format(file, "excel")) { |
| | | this.$message.error("éæ©çæä»¶ã" + file.name + "ãåªè½æ¯excelæä»¶"); |
| | | return false; |
| | | } |
| | | if ( |
| | |
| | | !this.format(file, this.fileTypes) |
| | | ) { |
| | | this.$message.error( |
| | | 'éæ©çæä»¶ã' + |
| | | "éæ©çæä»¶ã" + |
| | | file.name + |
| | | 'ãåªè½æ¯ã' + |
| | | this.fileTypes.join(',') + |
| | | 'ãæ ¼å¼' |
| | | "ãåªè½æ¯ã" + |
| | | this.fileTypes.join(",") + |
| | | "ãæ ¼å¼" |
| | | ); |
| | | return false; |
| | | } |
| | | if (file.size > (this.maxSize || 50) * 1024 * 1024) { |
| | | this.$message.error( |
| | | 'éæ©çæä»¶ã' + |
| | | file.name + |
| | | 'ãä¸è½è¶
è¿:' + |
| | | (this.maxSize || 50) + |
| | | 'M' |
| | | "éæ©çæä»¶ã" + file.name + "ãä¸è½è¶
è¿:" + (this.maxSize || 50) + "M" |
| | | ); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | .img-selector { |
| | | position: relative; |
| | | cursor: pointer; |
| | | margin: 0 10px 10px 0; |
| | | // margin: 0 10px 10px 0; |
| | | margin: 0px; |
| | | float: left; |
| | | width: 65px; |
| | | height: 65px; |
| | | width: 365px; |
| | | height: 365px; |
| | | border: 1px solid #c7c7c7; |
| | | overflow: hidden; |
| | | border-radius: 5px; |
| | | box-sizing: content-box; |
| | | background-image: url("~@/assets/test.png"); |
| | | background-repeat: no-repeat; |
| | | background-position: center; |
| | | background-size: contain; |
| | | img { |
| | | margin: 0; |
| | | padding: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | object-fit: cover; |
| | | // background-image: url("@/assets/logo.png"); |
| | | } |
| | | |
| | | .operation { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showDetialBox" |
| | | :lazy="true" |
| | | width="1200px" |
| | | :padding="15" |
| | | title="ä»»å¡è¯¦æ
" |
| | | > |
| | | <el-row height="50"> |
| | | <el-col :span="24"> |
| | | <div class="grid-content right-text"> |
| | | <el-link type="primary" @click="switchView">忢è§å¾</el-link> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div :style="{ height: height }"> |
| | | <div v-if="viewType == 1"> |
| | | <el-row height="50"> |
| | | <el-col :span="8"> |
| | | <div |
| | | class="grid-content content-text" |
| | | style="font-weight: bold; font-size: 18px" |
| | | > |
| | | <span>ä»»å¡ç¼å·ï¼{{ row.taskNum }}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div |
| | | class="grid-content content-text" |
| | | style="font-weight: bold; font-size: 18px" |
| | | > |
| | | <span>æçç¼å·ï¼{{ row.palletCode }}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div |
| | | class="grid-content content-text" |
| | | style="font-weight: bold; font-size: 18px" |
| | | > |
| | | <span>ä»»å¡ç¶æï¼{{ row.taskState }}</span> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="height: 100px; margin-top: 3%"> |
| | | <el-steps :active="active" align-center finish-status="success"> |
| | | <el-step |
| | | v-for="item in steps" |
| | | :key="item.title" |
| | | :title="item.title" |
| | | :description="item.description" |
| | | ></el-step> |
| | | </el-steps> |
| | | </div> |
| | | <el-row height="50" v-show="previousShow || nextShow"> |
| | | <el-col :span="8"> |
| | | <div v-show="previousShow" class="grid-content content-text"> |
| | | <el-button type="danger" @click="previous" |
| | | >åæ»å°ä¸ä¸æ¥</el-button |
| | | > |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div v-show="recoveryShow" class="grid-content content-text"> |
| | | <el-button type="primary" @click="recovery">ä»»å¡æèµ·æ¢å¤</el-button> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div v-show="nextShow" class="grid-content content-text"> |
| | | <el-button type="warning" @click="next">跳转å°ä¸ä¸æ¥</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-else> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | :row-class-name="tableRowClassName" |
| | | > |
| | | <el-table-column type="index" width="50"> </el-table-column> |
| | | <el-table-column prop="taskNum" label="ä»»å¡å·" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="taskState" label="ä»»å¡ç¶æ" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="currentAddress" label="å½åä½ç½®" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="nextAddress" label="ä¸ä¸ä½ç½®" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="isManual" label="æ¯å¦äººå·¥æä½" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="isNormal" label="æ¯å¦æ£å¸¸" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="description" label="æè¿°"> </el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" width="180"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </vol-box> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | | return { |
| | | active: 0, |
| | | showDetialBox: false, |
| | | row: {}, |
| | | steps: [], |
| | | viewType: 1, |
| | | height: "200px", |
| | | tableData: [], |
| | | previousShow: false, |
| | | nextShow: false, |
| | | recoveryShow: true, |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | if (this.viewType == 1) { |
| | | this.getSteps(); |
| | | } else { |
| | | this.getDetailDatas(); |
| | | } |
| | | |
| | | this.$emit("parentCall", ($vue) => { |
| | | var previousButton = $vue.buttons.find((x) => x.value == "Previous"); |
| | | this.previousShow = previousButton != null; |
| | | |
| | | var nextButton = $vue.buttons.find((x) => x.value == "Next"); |
| | | this.nextShow = nextButton != null; |
| | | }); |
| | | }, |
| | | getSteps() { |
| | | this.http |
| | | .post( |
| | | "/api/TaskExecuteDetail/GetDetailInfo?taskNum=" + this.row.taskNum, |
| | | {}, |
| | | true |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.steps = x.data.list; |
| | | this.active = x.data.active; |
| | | }); |
| | | }, |
| | | getDetailDatas() { |
| | | this.http |
| | | .post( |
| | | "/api/TaskExecuteDetail/GetDetailDatas?taskNum=" + this.row.taskNum, |
| | | {}, |
| | | true |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.tableData = x.data; |
| | | }); |
| | | }, |
| | | previous() { |
| | | this.http |
| | | .post( |
| | | "/api/Task/RollbackTaskStatusToLast?taskNum=" + this.row.taskNum, |
| | | {}, |
| | | true |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.getSteps(); |
| | | }); |
| | | }, |
| | | recovery(){ |
| | | this.http |
| | | .post( |
| | | "/api/Task/TaskStatusRecovery?taskNum=" + this.row.taskNum, |
| | | {}, |
| | | true |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.getSteps(); |
| | | }); |
| | | }, |
| | | next() { |
| | | this.http |
| | | .post( |
| | | "/api/Task/UpdateTaskStatusToNext?taskNum=" + this.row.taskNum, |
| | | {}, |
| | | true |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.getSteps(); |
| | | }); |
| | | }, |
| | | switchView() { |
| | | this.viewType = this.viewType == 1 ? 2 : 1; |
| | | if (this.viewType == 2) { |
| | | this.height = "600px"; |
| | | this.getDetailDatas(); |
| | | } else { |
| | | this.height = "200px"; |
| | | } |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (!row.isNormal) { |
| | | return "error-row"; |
| | | } else if (row.isManual) { |
| | | return "warning-row"; |
| | | } |
| | | return "success-row"; |
| | | }, |
| | | }, |
| | | created() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-col { |
| | | border-radius: 4px; |
| | | } |
| | | .grid-content { |
| | | border-radius: 4px; |
| | | min-height: 36px; |
| | | } |
| | | .content-text { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .right-text { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | } |
| | | </style> |
| | | <style> |
| | | .el-table .warning-row { |
| | | background: #fcf1e2; |
| | | } |
| | | |
| | | .el-table .success-row { |
| | | background: #f0f9eb; |
| | | } |
| | | |
| | | .el-table .error-row { |
| | | background: #fde2e2; |
| | | } |
| | | </style> |
| | |
| | | buttons: [],//æ©å±çæé® |
| | | methods: {//äºä»¶æ©å± |
| | | onInit() { |
| | | |
| | | }, |
| | | onInited() { |
| | | } |
| | |
| | | buttons: [],//æ©å±çæé® |
| | | methods: {//äºä»¶æ©å± |
| | | onInit() { |
| | | |
| | | }, |
| | | onInited() { |
| | | } |
| | |
| | | buttons: [],//æ©å±çæé® |
| | | methods: {//äºä»¶æ©å± |
| | | onInit() { |
| | | let ExportProcessCardBtn = this.buttons.find(x => x.value == 'ExportProcessCard'); |
| | | if (ExportProcessCardBtn) { |
| | | ExportProcessCardBtn.onClick = function () { |
| | | this.http |
| | | .post("api/scanStation/ExportData", null, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | onInited() { |
| | | } |
| | |
| | | v-model="leftPartCodes[index]" |
| | | disabled |
| | | /> |
| | | <!-- æ°å¢ï¼ä¾æ¹ä»£ç è¾å
¥æ¡ --> |
| | | <input |
| | | type="text" |
| | | class="input-box supplier-code-input" |
| | | v-model="leftPartSupplierCodes[index]" |
| | | disabled |
| | | placeholder="便¹ä»£ç " |
| | | /> |
| | | <label class="checkbox-container"> |
| | | <input |
| | | type="checkbox" |
| | |
| | | <div class="right-top"> |
| | | <div class="form-row input-submit-row"> |
| | | <span class="label">å½å
¥æ¡ï¼</span> |
| | | <input type="text" class="input-box" v-model="rightTopInput" /> |
| | | <!-- å
³é®ä¿®æ¹1ï¼æ·»å refæ è¯ --> |
| | | <input |
| | | ref="inputBoxRef" |
| | | type="text" |
| | | class="input-box" |
| | | v-model="rightTopInput" |
| | | @blur="handleInputBlur" |
| | | /> |
| | | <button class="btn save-btn submit-input-btn" @click="saveData"> |
| | | <i class="icon icon-submit"></i>æäº¤ |
| | | </button> |
| | |
| | | /> |
| | | <button class="btn clear-btn" @click="clearFinishedProductCode"> |
| | | <i class="icon icon-clear"></i>æ¸
é¤ |
| | | </button> |
| | | <!-- æ°å¢ï¼å é¤å½åæçæé® --> |
| | | <button |
| | | class="btn delete-tray-btn" |
| | | @click="deleteCurrentTray" |
| | | :disabled="deleteLoading" |
| | | > |
| | | <i class="icon icon-delete"></i>å é¤å½åæç |
| | | </button> |
| | | </div> |
| | | <div |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { ref, onMounted, onUnmounted, watch, computed } from "vue"; |
| | | import { ref, onMounted, onUnmounted, watch, computed, nextTick } from "vue"; |
| | | import axios from "axios"; |
| | | |
| | | export default { |
| | |
| | | const finishedProductId = ref(""); // 左侧æåIDï¼æ¥å£è¿åï¼ |
| | | const rightTopInput = ref(""); // å³ä¾§æ ¸å¿å½å
¥æ¡ |
| | | const leftPartCodes = ref(Array(10).fill("")); // 左侧é¶ä»¶ç¼å·æ°ç» |
| | | // æ°å¢ï¼å·¦ä¾§ä¾æ¹ä»£ç æ°ç» |
| | | const leftPartSupplierCodes = ref(Array(10).fill("")); |
| | | const rightPartCodes = ref(Array(10).fill("")); // å³ä¾§é¶ä»¶ç¼å·æ°ç» |
| | | const leftPartChecked = ref(Array(10).fill(false)); // 左侧é¶ä»¶å¾éç¶æ |
| | | const leftPartIds = ref(Array(10).fill("")); // 左侧é¶ä»¶IDï¼æ¥å£è¿åï¼ |
| | | const finishedProductCode = ref(""); // å³ä¾§æåç¼å·è¾å
¥æ¡ |
| | | const fillIndex = ref(-1); // å½å
¥æ¡èªå¨å¡«å
ç´¢å¼ |
| | | const checkLoading = ref(Array(10).fill(false)); // é¶ä»¶å¾éå è½½é |
| | | // æ°å¢ï¼å 餿çå è½½ç¶æ |
| | | const deleteLoading = ref(false); |
| | | |
| | | // å
³é®ä¿®æ¹2ï¼å®ä¹å½å
¥æ¡ref |
| | | const inputBoxRef = ref(null); |
| | | |
| | | // ä¿¡å·ç¯ç¸å
³ |
| | | const signalStates = ref([false, false, false, false, false]); |
| | |
| | | const destroyDelayTime = 500; // å½å
¥æ¡å¡«å
å»¶è¿500ms |
| | | let autoSubmitDebounceTimer = null; |
| | | let submitLock = ref(false); // æäº¤éï¼é²æ¢éå¤æäº¤ |
| | | |
| | | // å
³é®ä¿®æ¹3ï¼å°è£
èç¦æ¹æ³ |
| | | const focusInputBox = () => { |
| | | nextTick(() => { |
| | | if (inputBoxRef.value) { |
| | | inputBoxRef.value.focus(); |
| | | // å¯éï¼éä¸è¾å
¥æ¡å
å®¹ï¼æ¹ä¾¿ç´æ¥è¦çè¾å
¥ |
| | | // inputBoxRef.value.select(); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 计ç®å±æ§ - ç»è®¡ææå¾é/å¡«å
æ°éï¼è¿æ»¤ç©ºå¼ï¼ |
| | | const checkedCount = computed(() => { |
| | |
| | | for (let i = 0; i < 10; i++) { |
| | | leftPartCodes.value[i] = data.leftPartCodes[i] || ""; |
| | | leftPartIds.value[i] = data.leftPartIds?.[i] || ""; |
| | | // æ°å¢ï¼èµå¼ä¾æ¹ä»£ç |
| | | leftPartSupplierCodes.value[i] = data.leftPartSupplierCodes?.[i] || ""; |
| | | } |
| | | } |
| | | if (Array.isArray(data.leftPartChecked) && data.leftPartChecked.length >= 10) { |
| | |
| | | } |
| | | } catch (error) { |
| | | console.error("è·å左侧åå§æ°æ®å¤±è´¥ï¼", error); |
| | | } finally { |
| | | // æ°æ®å è½½å®æåèç¦ |
| | | focusInputBox(); |
| | | } |
| | | }; |
| | | |
| | |
| | | if (!finishedProductId.value) { |
| | | alert("æåIDä¸åå¨ï¼æ æ³æ´æ°é¶ä»¶æ«ç ç¶æï¼"); |
| | | leftPartChecked.value[index] = !isChecked; |
| | | focusInputBox(); // æç¤ºåèç¦ |
| | | return; |
| | | } |
| | | if (!partId) { |
| | | alert(`é¶ä»¶${index + 1}æ°æ®åºIDä¸åå¨ï¼æ æ³æ´æ°æ«ç ç¶æï¼`); |
| | | leftPartChecked.value[index] = !isChecked; |
| | | focusInputBox(); // æç¤ºåèç¦ |
| | | return; |
| | | } |
| | | if (!partCode.trim()) { |
| | | alert(`é¶ä»¶${index + 1}ç¼å·ä¸ºç©ºï¼æ æ³æ´æ°æ«ç ç¶æï¼`); |
| | | leftPartChecked.value[index] = !isChecked; |
| | | focusInputBox(); // æç¤ºåèç¦ |
| | | return; |
| | | } |
| | | |
| | |
| | | checkLoading.value[index] = false; |
| | | if (checkDebounceTimer) clearTimeout(checkDebounceTimer); |
| | | checkDebounceTimer = null; |
| | | focusInputBox(); // æä½å®æåèç¦ |
| | | } |
| | | }; |
| | | |
| | |
| | | fillIndex.value++; |
| | | } else { |
| | | alert("æåç¼å·åé¶ä»¶1-10å·²å
¨é¨å¡«å
宿,æ æ³ç»§ç»å½å
¥!"); |
| | | rightTopInput.value = ""; |
| | | destroyDelayTimer = null; |
| | | return; |
| | | } |
| | | rightTopInput.value = ""; |
| | | destroyDelayTimer = null; |
| | | focusInputBox(); // å¡«å
宿åèç¦ |
| | | }, destroyDelayTime); |
| | | }; |
| | | |
| | |
| | | { immediate: false } |
| | | ); |
| | | |
| | | // å
³é®ä¿®æ¹4ï¼å¤±å»ç¦ç¹æ¶éæ°èç¦ |
| | | const handleInputBlur = () => { |
| | | // å»¶è¿ä¸ç¹æ§è¡ï¼é¿å
åå
¶ä»æä½å²çª |
| | | setTimeout(() => { |
| | | focusInputBox(); |
| | | }, 50); |
| | | }; |
| | | |
| | | // å³ä¾§è¾å
¥æ¡æ¸
餿¹æ³ |
| | | const clearRightPart = (index) => (rightPartCodes.value[index] = ""); |
| | | const clearFinishedProductCode = () => (finishedProductCode.value = ""); |
| | | const clearRightPart = (index) => { |
| | | rightPartCodes.value[index] = ""; |
| | | focusInputBox(); // æ¸
é¤åèç¦ |
| | | }; |
| | | const clearFinishedProductCode = () => { |
| | | finishedProductCode.value = ""; |
| | | focusInputBox(); // æ¸
é¤åèç¦ |
| | | }; |
| | | |
| | | // æ ¸å¿ä¿®æ¹ï¼æ¢å¤æåç¼å·å¿
å¡«æ ¡éªï¼æªå¡«åç´æ¥æç¤ºå¹¶ç»æ¢æäº¤ |
| | | const saveData = async () => { |
| | |
| | | const productCode = finishedProductCode.value.trim(); |
| | | if (!productCode) { |
| | | alert("请å
å¡«åæåç¼å·ï¼æåç¼å·ä¸ºå¿
填项ï¼"); |
| | | focusInputBox(); // æç¤ºåèç¦ |
| | | return; |
| | | } |
| | | // 2. æäº¤éï¼é²æ¢éå¤ç¹å» |
| | |
| | | rightPartCodes.value = Array(10).fill(""); |
| | | rightTopInput.value = ""; |
| | | fillIndex.value = -1; |
| | | const msg = resData.message; |
| | | |
| | | // æ ¸å¿ä¿®æ¹ï¼ä»
å½ msg 䏿¯ null æ¶æå¼¹åºæç¤º |
| | | if (msg !== null) { |
| | | alert(msg); |
| | | } |
| | | } else { |
| | | // ä¸å¡é误ï¼ç´æ¥å±ç¤ºå端è¿åçmessageï¼å¦ç©æéè¯¯ãæ é
æ¹ï¼ |
| | | const errorMsg = resData.message || "æäº¤å¤±è´¥ï¼æªç¥ä¸å¡é误"; |
| | | alert(`æäº¤å¤±è´¥ï¼${errorMsg}`); |
| | | alert(`${resData.message || "æªç¥é误"}`); |
| | | } |
| | | } catch (error) { |
| | | // 6. å¼å¸¸æè·ï¼å
¼å®¹åç«¯æªæè·å¼å¸¸ï¼å¦PLCé讯å¼å¸¸ãæ°ç»è¶çã500éè¯¯ï¼ |
| | |
| | | } finally { |
| | | // 7. éæ¾æäº¤éï¼æ 论æå/失败é½è¦éæ¾ |
| | | submitLock.value = false; |
| | | focusInputBox(); // æäº¤å®æåèç¦ |
| | | } |
| | | }; |
| | | |
| | |
| | | if (!hasProductCode) { |
| | | console.log("â ï¸ æåç¼å·æªå¡«åï¼è·³è¿èªå¨æäº¤"); |
| | | autoSubmitDebounceTimer = null; |
| | | focusInputBox(); // æ ¡éªåèç¦ |
| | | return; |
| | | } |
| | | |
| | |
| | | }, 300); // 300ms鲿ï¼é¿å
è¾å
¥é¢ç¹è§¦å |
| | | }; |
| | | |
| | | // æ°å¢ï¼å é¤å½åæçæ¹æ³ |
| | | const deleteCurrentTray = async () => { |
| | | // 确认æä½ï¼é²æ¢è¯¯å |
| | | if (!confirm("确认è¦å é¤å½åæçæ°æ®åï¼æ¤æä½ä¸å¯æ¢å¤ï¼")) { |
| | | focusInputBox(); |
| | | return; |
| | | } |
| | | |
| | | // 设置å è½½ç¶æï¼é²æ¢éå¤ç¹å» |
| | | deleteLoading.value = true; |
| | | try { |
| | | console.log("ð¤ è°ç¨å é¤å½åæçæ¥å£ï¼/api/boxing/DeleteCurrentTray"); |
| | | // è°ç¨å 餿¥å£ï¼æ ¹æ®å®é
鿱鿩GET/POSTï¼è¿éé»è®¤ç¨POSTï¼è¥å端æ¯GET坿¹ä¸ºgetï¼ |
| | | const response = await axios.post( |
| | | "/api/boxing/DeleteCurrentTray", |
| | | {}, // è¥æ åæ°ä¼ ç©ºå¯¹è±¡ |
| | | { timeout: 8000 } |
| | | ); |
| | | const resData = response.data; |
| | | console.log("ð¥ å é¤å½åæçæ¥å£è¿åï¼", resData); |
| | | |
| | | // éé
å端è¿åæ ¼å¼ |
| | | const isSuccess = resData.status === true || resData.Status === true; |
| | | if (isSuccess) { |
| | | // å 餿å忏
空å³ä¾§è¾å
¥æ¡ |
| | | finishedProductCode.value = ""; |
| | | rightPartCodes.value = Array(10).fill(""); |
| | | rightTopInput.value = ""; |
| | | fillIndex.value = -1; |
| | | alert(resData.message || "å½åæçå 餿åï¼"); |
| | | } else { |
| | | alert(`å é¤å¤±è´¥ï¼${resData.message || "æªç¥é误"}`); |
| | | } |
| | | } catch (error) { |
| | | // å¼å¸¸å¤ç |
| | | let errorMsg = "å 餿ç请æ±å¼å¸¸ï¼"; |
| | | if (error.code === "ECONNABORTED") { |
| | | errorMsg = "å é¤è¯·æ±è¶
æ¶ï¼è¯·ç¨åéè¯"; |
| | | } else if (error.response) { |
| | | errorMsg = `æå¡å¨é误ï¼${error.response.status} - ${error.response.statusText}`; |
| | | console.error("â å 餿çæå¡å¨é误详æ
ï¼", error.response.data); |
| | | } else if (error.request) { |
| | | errorMsg = "ç½ç»å¼å¸¸ï¼æªæ¶å°å端ååºï¼è¯·æ£æ¥æ¥å£å°ååç½ç»"; |
| | | } else { |
| | | errorMsg = `请æ±é误ï¼${error.message}`; |
| | | } |
| | | alert(errorMsg); |
| | | console.error("â å é¤æçæ¥å£å¼å¸¸è¯¦æ
ï¼", error); |
| | | } finally { |
| | | // éæ¾å è½½ç¶æ |
| | | deleteLoading.value = false; |
| | | focusInputBox(); // æä½å®æåèç¦å½å
¥æ¡ |
| | | } |
| | | }; |
| | | |
| | | // çå¬èªå¨æäº¤ç¸å
³æ°æ®ååï¼è§¦åæ ¡éª |
| | | watch([checkedCount, filledPartCount, finishedProductCode], () => checkAutoSubmit(), { |
| | | deep: true, |
| | |
| | | const detectFillIndex = () => { |
| | | if (!finishedProductCode.value.trim()) { |
| | | fillIndex.value = -1; |
| | | return; |
| | | } |
| | | } else { |
| | | for (let i = 0; i < 10; i++) { |
| | | if (!rightPartCodes.value[i].trim()) { |
| | | fillIndex.value = i; |
| | |
| | | } |
| | | } |
| | | fillIndex.value = 10; |
| | | } |
| | | }; |
| | | |
| | | // ç嬿å/é¶ä»¶è¾å
¥ï¼æ´æ°å¡«å
ç´¢å¼ |
| | |
| | | await fetchLeftInitialData(); |
| | | startPolling(); |
| | | detectFillIndex(); |
| | | focusInputBox(); // é¡µé¢æè½½åç«å³èç¦ |
| | | }); |
| | | |
| | | // çå½å¨æï¼å¸è½½æ¶æ¸
餿æå®æ¶å¨/鲿ï¼é²æ¢å
åæ³æ¼ |
| | |
| | | finishedProduct, |
| | | rightTopInput, |
| | | leftPartCodes, |
| | | // æ°å¢ï¼æ´é²ä¾æ¹ä»£ç æ°ç» |
| | | leftPartSupplierCodes, |
| | | rightPartCodes, |
| | | leftPartChecked, |
| | | signalStates, |
| | | signalLabels, |
| | | finishedProductCode, |
| | | checkLoading, |
| | | deleteLoading, // æ´é²å é¤å è½½ç¶æ |
| | | handlePartCheck, |
| | | saveData, |
| | | deleteCurrentTray, // æ´é²å é¤æçæ¹æ³ |
| | | clearRightPart, |
| | | clearFinishedProductCode, |
| | | inputBoxRef, // æ´é²ref |
| | | handleInputBlur, // æ´é²æ¹æ³ |
| | | }; |
| | | }, |
| | | }; |
| | |
| | | transition: all 0.2s ease; |
| | | background-color: #ffffff; |
| | | } |
| | | /* æ°å¢ï¼ä¾æ¹ä»£ç è¾å
¥æ¡æ ·å¼ï¼å®½åº¦ç¨çªï¼ */ |
| | | .supplier-code-input { |
| | | flex: 0 0 150px; |
| | | min-width: 120px; |
| | | } |
| | | .input-box:focus { |
| | | border-color: #3b82f6; |
| | | box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); |
| | |
| | | gap: 8px; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | /* æ°å¢ï¼å 餿çæé®å®½åº¦éé
*/ |
| | | .delete-tray-btn { |
| | | width: 140px !important; |
| | | } |
| | | .submit-input-btn { |
| | | width: 110px !important; |
| | |
| | | .icon-submit { |
| | | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M2.01 21L15 13.4 23 21V5H2.01V21zM17 15l-5-5-5 5V7h10v8z'/%3E%3C/svg%3E"); |
| | | } |
| | | /* æ°å¢ï¼å é¤å¾æ */ |
| | | .icon-delete { |
| | | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E"); |
| | | } |
| | | |
| | | /* æé®ä¸»é¢æ ·å¼ */ |
| | | .clear-btn { |
| | |
| | | .save-btn:hover:not(:disabled) { |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15); |
| | | } |
| | | /* æ°å¢ï¼å 餿çæé®æ ·å¼ */ |
| | | .delete-tray-btn { |
| | | background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); |
| | | color: #fff; |
| | | padding: 0 12px; |
| | | } |
| | | .delete-tray-btn:hover:not(:disabled) { |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 8px rgba(245, 158, 11, 0.15); |
| | | } |
| | | |
| | | /* ä¿¡å·ç¯æ ·å¼ */ |
| | |
| | | .input-box { |
| | | width: 100%; |
| | | } |
| | | /* éé
ç§»å¨ç«¯ä¾æ¹ä»£ç è¾å
¥æ¡ */ |
| | | .supplier-code-input { |
| | | flex: 1; |
| | | min-width: 100%; |
| | | margin-top: 6px; |
| | | } |
| | | /* ç§»å¨ç«¯æé®å®½åº¦éé
*/ |
| | | .btn, |
| | | .submit-input-btn { |
| | | .submit-input-btn, |
| | | .delete-tray-btn { |
| | | width: 100% !important; |
| | | margin-top: 6px; |
| | | } |
| | |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | |
| | | <!-- å³ä¾§å¾çä¾§è¾¹æ - å¢å z-indexå±çº§ --> |
| | | <div class="image-sidebar" :class="{ 'sidebar-open': isSidebarOpen }"> |
| | | <div class="sidebar-toggle" @click="toggleSidebar"> |
| | | <span>{{ isSidebarOpen ? ">" : "<" }}</span> |
| | | </div> |
| | | <div class="sidebar-content"> |
| | | <div class="image-container"> |
| | | <img :src="logoUrl" alt="åèå¾ç" class="reference-image" /> |
| | | <div class="image-description">é
æ¹å¸å±åèå¾</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import extend from "@/extension/basicinfo/formula.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | import { ref, defineComponent, computed } from "vue"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | const isSidebarOpen = ref(false); |
| | | |
| | | // å¾çè·¯å¾ |
| | | const logoUrl = computed(() => { |
| | | try { |
| | | return require("@/assets/test.png"); |
| | | } catch (e) { |
| | | console.log("使ç¨ç¸å¯¹è·¯å¾å è½½å¾ç"); |
| | | return "/assets/test.png"; |
| | | } |
| | | }); |
| | | |
| | | const toggleSidebar = () => { |
| | | isSidebarOpen.value = !isSidebarOpen.value; |
| | | }; |
| | | |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | |
| | | sortName: "createDate", |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨ååæ®µ - æ°å¢pressFastenTorqueï¼åè£
ä½ç´§åºæç©ï¼ |
| | | // ç¼è¾è¡¨ååæ®µ - å®å
¨å¹é
å端Dt_Formulaå®ä½ç±» |
| | | const editFormFields = ref({ |
| | | id: "", |
| | | productCode: "", |
| | |
| | | productWidth: "", |
| | | productHeight: "", |
| | | pressNoTighten: "", |
| | | screwDownsetDistance: "", |
| | | screwTorqueOutput: "", |
| | | pressFastenTorque: "", // ãæ°å¢ãåè£
ä½ç´§åºæç© |
| | | pressNoCheckBottomPlate: "", |
| | | screwDownsetDistance: "", // å端注é为ï¼ä¿ååå |
| | | screwTorqueOutput: "", // å端注é为ï¼ä¸å¿é«åº¦ |
| | | dintAutoScrewOn: "", |
| | | pressFastenTorque: "", |
| | | p0P1Width: "", |
| | | p0P2Width: "", |
| | | p0P3Width: "", |
| | | p1P3Height: "", |
| | | p2P3Height: "", |
| | | productImagePath: "", |
| | | pressPressureDiff: "", |
| | | pressTorqueDiff: "", |
| | | detectHeightDiff: "", |
| | | screwPositionDiff: "", |
| | | // ç§»é¤äºcenterHeightåæ®µï¼åç«¯æ æ¤å段ï¼åå端é
ç½®é误æ å°ï¼ |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨åé
ç½®-æ°å¢åè£
ä½ç´§åºæç©ï¼å¸å±éé
åæç´§åæ§ |
| | | // ç¼è¾è¡¨åé
ç½® - ä¿®æ£åæ®µä¸æåç§°åæ³¨éï¼å¹é
å端å®ä½ |
| | | // éç¹ï¼ä¸ºæ ¸å¿å段补å
å¿
å¡«é
ç½®ï¼require: trueï¼ |
| | | const editFormOptions = ref([ |
| | | // 第ä¸è¡ï¼åºç¡æ è¯ |
| | | [ |
| | | { |
| | | title: "æåç¼å·", |
| | | required: true, |
| | | field: "productCode", |
| | | type: "input", |
| | | type: "string", |
| | | width: 200, |
| | | require: true, |
| | | }, |
| | | { |
| | | title: "æååç§°", |
| | | field: "productName", |
| | | type: "input", |
| | | type: "string", |
| | | width: 200, |
| | | require: true, |
| | | required: true, |
| | | }, |
| | | { |
| | | title: "æ§ç´§ç¨åºå·", |
| | | field: "dintAutoScrewOn", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 180, |
| | | placeholder: "请è¾å
¥æ´æ°", |
| | | }, |
| | | { |
| | | title: "产åé¿åº¦", |
| | | field: "productLength", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "产å宽度", |
| | | title: "产åé¿åº¦", // ä¿®æ£å端注é |
| | | field: "productLength", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 100, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, |
| | | }, |
| | | { |
| | | title: "产å宽度", // ä¿®æ£å端注é |
| | | field: "productWidth", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | width: 100, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, |
| | | }, |
| | | { |
| | | title: "产åé«åº¦", |
| | | title: "产åé«åº¦", // ä¿®æ£å端注é |
| | | field: "productHeight", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | width: 100, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "åè£
ä½ä¸æ§ç´§", |
| | | title: "䏿§ç´§", |
| | | field: "pressNoTighten", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | defaultValue: "0", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | required: true, // æ°å¢ï¼å¼å
³ç±»å段å¿
å¡« |
| | | }, |
| | | { |
| | | title: "䏿µåºæ¿", |
| | | field: "pressNoCheckBottomPlate", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | defaultValue: "0", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | required: true, // æ°å¢ï¼å¼å
³ç±»å段å¿
å¡« |
| | | }, |
| | | { |
| | | title: "ä¿ååå", |
| | | field: "screwDownsetDistance", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 150, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ä¸å¿é«åº¦", |
| | | field: "screwTorqueOutput", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å·¥èºåæ°å¿
å¡« |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ä¸å¿é«åº¦", // ä¿®æ£åæ®µä¸æåç§°ï¼å端注éï¼ |
| | | field: "screwTorqueOutput", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å·¥èºåæ°å¿
å¡« |
| | | }, |
| | | { |
| | | title: "ç´§åºæç©", |
| | | title: "ç´§åºæç©", // è¡¥å
宿´å段åç§° |
| | | field: "pressFastenTorque", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 150, |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°ï¼é»è®¤0.00", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å·¥èºåæ°å¿
å¡« |
| | | }, |
| | | { |
| | | title: "P0P1宽度", |
| | | field: "p0P1Width", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å°ºå¯¸åæ°å¿
å¡« |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "P0P2宽度", |
| | | field: "p0P2Width", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å°ºå¯¸åæ°å¿
å¡« |
| | | }, |
| | | ], |
| | | // 第åè¡ï¼Pç³»åé«åº¦ + 产åå¾çè·¯å¾ |
| | | [ |
| | | { |
| | | title: "P0P3宽度", |
| | | field: "p0P3Width", |
| | | type: "input", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å°ºå¯¸åæ°å¿
å¡« |
| | | }, |
| | | { |
| | | title: "P1P3é«åº¦", |
| | | field: "p1P3Height", |
| | | type: "input", |
| | | title: "ååå·®å¼", |
| | | field: "pressPressureDiff", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 150, |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å·®å¼åæ°å¿
å¡« |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "P2P3é«åº¦", |
| | | field: "p2P3Height", |
| | | type: "input", |
| | | title: "æåå·®å¼", |
| | | field: "pressTorqueDiff", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 150, |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å·®å¼åæ°å¿
å¡« |
| | | }, |
| | | { |
| | | title: "产åå¾çè·¯å¾", |
| | | field: "productImagePath", |
| | | type: "textarea", |
| | | width: 400, |
| | | rows: 2, |
| | | placeholder: "请è¾å
¥å¾ç宿´è·¯å¾ï¼æ¯æ500å符以å
", |
| | | title: "é«åº¦å·®å¼", |
| | | field: "detectHeightDiff", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å·®å¼åæ°å¿
å¡« |
| | | }, |
| | | { |
| | | title: "èºçº¹å·®å¼", |
| | | field: "screwPositionDiff", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, // æ°å¢ï¼å·®å¼åæ°å¿
å¡« |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "å«çé«åº¦", |
| | | field: "gasketHeight", |
| | | type: "string", |
| | | inputType: "number", |
| | | width: 120, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | attrs: { step: 0.01, min: 0 }, |
| | | required: true, |
| | | }, |
| | | ], |
| | | ]); |
| | | |
| | | // æç´¢è¡¨ååæ®µ - æ éä¿®æ¹ |
| | | // æç´¢è¡¨ååæ®µ |
| | | const searchFormFields = ref({ |
| | | productCode: "", |
| | | productName: "", |
| | |
| | | createDate: "", |
| | | }); |
| | | |
| | | // æç´¢è¡¨åé
ç½® - æ éä¿®æ¹ |
| | | // æç´¢è¡¨åé
ç½® |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "æåç¼å·", field: "productCode", type: "like", width: 200 }, |
| | |
| | | ], |
| | | ]); |
| | | |
| | | // è¡¨æ ¼åé
ç½® - æ°å¢åè£
ä½ç´§åºæç©å |
| | | // è¡¨æ ¼åé
ç½® - ä¿®æ£åæ®µä¸æåç§°åæ³¨éï¼å¹é
å端å®ä½ |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "åºå·", |
| | | title: "id", |
| | | type: "int", |
| | | width: 80, |
| | | hidden: true, |
| | | // hidden: true, |
| | | align: "center", |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | field: "productLength", |
| | | title: "产åé¿åº¦", |
| | | title: "产åé¿åº¦", // ä¿®æ£å端注é |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "productWidth", |
| | | title: "产å宽度", |
| | | title: "产å宽度", // ä¿®æ£å端注é |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "productHeight", |
| | | title: "产åé«åº¦", |
| | | title: "产åé«åº¦", // ä¿®æ£å端注é |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "pressNoTighten", |
| | | title: "åè£
ä½ä¸æ§ç´§", |
| | | title: "䏿§ç´§", |
| | | type: "select", |
| | | width: 100, |
| | | align: "center", |
| | |
| | | }, |
| | | }, |
| | | { |
| | | field: "pressNoCheckBottomPlate", |
| | | title: "䏿µåºæ¿", |
| | | type: "select", |
| | | width: 110, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | field: "screwDownsetDistance", |
| | | title: "ä¿ååå", |
| | | title: "ä¿ååå", // ä¿®æ£åæ®µä¸æåç§° |
| | | type: "decimal", |
| | | width: 110, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "screwTorqueOutput", |
| | | title: "ä¸å¿é«åº¦", |
| | | title: "ä¸å¿é«åº¦", // ä¿®æ£åæ®µä¸æåç§° |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "pressFastenTorque", // ãæ°å¢ãè¡¨æ ¼å |
| | | title: "åè£
ä½ç´§åºæç©", |
| | | field: "pressFastenTorque", |
| | | title: "ç´§åºæç©", // è¡¥å
宿´å段åç§° |
| | | type: "decimal", |
| | | width: 120, |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | { |
| | |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | // Pç³»å宽度 |
| | | { |
| | | field: "p0P1Width", |
| | | title: "P0P1宽度", |
| | |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | // Pç³»åé«åº¦ |
| | | { |
| | | field: "p1P3Height", |
| | | title: "P1P3é«åº¦", |
| | | field: "pressPressureDiff", |
| | | title: "ååå·®å¼", |
| | | type: "decimal", |
| | | width: 90, |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "p2P3Height", |
| | | title: "P2P3é«åº¦", |
| | | field: "pressTorqueDiff", |
| | | title: "æç©å·®å¼", |
| | | type: "decimal", |
| | | width: 90, |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "productImagePath", |
| | | title: "å¾çè·¯å¾", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | overflow: "ellipsis", |
| | | field: "detectHeightDiff", |
| | | title: "é«åº¦å·®å¼", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | // å
Œ
±å段 |
| | | { |
| | | field: "screwPositionDiff", |
| | | title: "èºçº¹å·®å¼", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "gasketHeight", |
| | | title: "å«çé«åº¦", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | |
| | | }, |
| | | ]); |
| | | |
| | | // é
æ¹æç»é
ç½® - æ éä¿®æ¹ |
| | | // é
æ¹æç»é
ç½® - åæ ·ç»æç»å段添å å¿
å¡« |
| | | const detail = ref({ |
| | | cnName: "é
æ¹ä¿¡æ¯è¯¦æ
", |
| | | table: "FormulaDetail", |
| | |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | required: true, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "componentCode", |
| | | title: "é¶ä»¶ç¼å·", |
| | | type: "string", |
| | | edit: { type: "" }, |
| | | edit: { type: "input" }, |
| | | width: 120, |
| | | require: true, |
| | | required: true, // æç»æ ¸å¿å段å¿
å¡« |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "componentName", |
| | | title: "é¶ä»¶åç§°", |
| | | type: "string", |
| | | edit: { type: "" }, |
| | | edit: { type: "input" }, |
| | | width: 150, |
| | | required: true, // æç»æ ¸å¿å段å¿
å¡« |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "supplierCode", |
| | | title: "便¹ä»£ç ", |
| | | type: "string", |
| | | edit: { type: "" }, |
| | | edit: { type: "input" }, |
| | | width: 150, |
| | | required: true, // æç»æ ¸å¿å段å¿
å¡« |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | }, |
| | | required: true, // æç»å¼å
³å段å¿
å¡« |
| | | }, |
| | | ], |
| | | sortName: "createDate", |
| | |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | isSidebarOpen, |
| | | logoUrl, |
| | | toggleSidebar, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* ä¾§è¾¹æ æ ·å¼ - å¢å z-indexå±çº§ */ |
| | | .image-sidebar { |
| | | position: fixed; |
| | | top: 0; |
| | | right: -600px; |
| | | width: 600px; |
| | | height: 100vh; |
| | | background: #fff; |
| | | box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); |
| | | transition: right 0.3s ease; |
| | | z-index: 9999; |
| | | display: flex; |
| | | } |
| | | |
| | | .sidebar-open { |
| | | right: 0; |
| | | } |
| | | |
| | | .sidebar-toggle { |
| | | position: absolute; |
| | | left: -40px; |
| | | top: 50%; |
| | | transform: translateY(-50%); |
| | | width: 40px; |
| | | height: 80px; |
| | | background: #409eff; |
| | | color: white; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | cursor: pointer; |
| | | border-radius: 8px 0 0 8px; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | transition: all 0.3s ease; |
| | | box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); |
| | | z-index: 10000; /* 忢æé®çz-indexæ´é« */ |
| | | } |
| | | |
| | | .sidebar-toggle:hover { |
| | | background: #66b1ff; |
| | | } |
| | | |
| | | .sidebar-toggle span { |
| | | transition: transform 0.3s ease; |
| | | } |
| | | |
| | | .sidebar-open .sidebar-toggle span { |
| | | transform: rotate(180deg); |
| | | } |
| | | |
| | | .sidebar-content { |
| | | flex: 1; |
| | | padding: 20px; |
| | | overflow-y: auto; |
| | | z-index: 9999; /* å
容åºåä¹è®¾ç½®é«z-index */ |
| | | } |
| | | |
| | | .image-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | .reference-image { |
| | | max-width: 100%; |
| | | max-height: 60vh; |
| | | object-fit: contain; |
| | | border: 1px solid #ddd; |
| | | border-radius: 8px; |
| | | padding: 10px; |
| | | background: #f8f9fa; |
| | | } |
| | | |
| | | .image-description { |
| | | margin-top: 15px; |
| | | padding: 10px; |
| | | background: #409eff; |
| | | color: white; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (max-width: 768px) { |
| | | .image-sidebar { |
| | | width: 250px; |
| | | right: -250px; |
| | | } |
| | | |
| | | .sidebar-toggle { |
| | | left: -30px; |
| | | width: 30px; |
| | | height: 60px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | // å·¥å
·å½æ°ï¼æ ¼å¼åæ°å为两ä½å°æ° |
| | | const formatTwoDecimal = (value) => { |
| | | if (value === "" || value === null || value === undefined) return ""; |
| | | const num = parseFloat(value); |
| | | return isNaN(num) ? "" : num.toFixed(2); |
| | | }; |
| | | |
| | | // è¡¨æ ¼åºç¡é
ç½® |
| | | const table = ref({ |
| | | key: "id", |
| | |
| | | name: "processInfo", |
| | | url: "/processInfo/", |
| | | sortName: "createDate", |
| | | sortOrder: "desc", // æ°å¢ï¼å建æ¶é´é»è®¤ååºï¼ç¬¦å常è§ä½¿ç¨ |
| | | sortOrder: "desc", // å建æ¶é´é»è®¤ååº |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨ååæ®µ - å®å
¨å¹é
å端Dt_ProcessInfoå®ä½ |
| | | // æ°å¢ï¼pressPressureï¼åè£
ä½ä¸åååï¼ï¼è¡¥å
¨ææåç«¯åæ®µ |
| | | // ç¼è¾è¡¨ååæ®µ - ä¸¥æ ¼å¹é
å端Dt_ProcessInfoå®ä½ |
| | | const editFormFields = ref({ |
| | | id: "", |
| | | id: 0, // 主é®é»è®¤å¼æ¹ä¸ºæ°å0 |
| | | palletCode: "", |
| | | productCode: "", |
| | | productName: "", |
| | | productSn: "", // æµæ°´å· |
| | | pressTightenNg: "", // åè£
æ§ç´§_æ§ç´§NG |
| | | pressTightenOk: "", // åè£
æ§ç´§_æ§ç´§OK |
| | | pressTightenUnfinished: "", // åè£
æ§ç´§_æ¬æ¬¡å å·¥æªå®æ |
| | | checkUnfinished: "", // æ£æµ_æ¬æ¬¡æ£æµæªå®æ |
| | | //componentQty: "", // é¶ä»¶æ°é |
| | | // torsioValue: "", // æåå¼ |
| | | // torsioValueStandard: "", // æå弿 å |
| | | // stiffnessValue: "", // ååº¦å¼ |
| | | // stiffnessValueStandard: "", // ååº¦å¼æ å |
| | | // testResult: "", // æµè¯ç»æ |
| | | pressHeight: "", // åè£
ä½ä¸åé«åº¦ |
| | | screwTorque: "", // åè£
使§ç´§æå |
| | | screwAngle: "", // åè£
使§ç´§è§åº¦ |
| | | pressPressure: "", // ãæ°å¢ãåè£
ä½ä¸åååï¼å¹é
å端å®ä½ï¼ |
| | | height1: "", // æ§ç´§ä½æ£æµé«åº¦1 |
| | | height2: "", // æ§ç´§ä½æ£æµé«åº¦2 |
| | | height3: "", // æ§ç´§ä½æ£æµé«åº¦3 |
| | | productSn: "", |
| | | pressTightenOk: 0, // æ¹ä¸ºæ°åé»è®¤å¼ |
| | | pressTightenUnfinished: 0, // æ¹ä¸ºæ°åé»è®¤å¼ |
| | | productStatus: 0, // æ°å¢ï¼äº§åç¶æåæ®µ |
| | | screwTorque: "", |
| | | screwAngle: "", |
| | | pressPressure: "", |
| | | productCheckHeight: "", |
| | | threadPositionHeight: "", |
| | | height1: "", |
| | | height2: "", |
| | | height3: "", |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨åé
ç½®-ãåæ¶åç±»ï¼ååæå¸ãï¼ä¿çææåææ ¡éª/é»è®¤å¼/屿§ |
| | | // 产åç¶æä¸æé项ï¼å¹é
å端注éï¼ |
| | | const productStatusOptions = [ |
| | | { key: "0", value: "ä¸åæ ¼" }, |
| | | { key: "1", value: "åæ ¼" }, |
| | | { key: "2", value: "äººå·¥ç¡®è®¤åæ ¼" }, |
| | | ]; |
| | | |
| | | // å¸å°å䏿é项ï¼éç¨ï¼ |
| | | const booleanOptions = [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ]; |
| | | |
| | | // ç¼è¾è¡¨åé
ç½® - ä¿®æ£å段å¹é
ï¼ä¼åå¸å±åå½å |
| | | const editFormOptions = ref([ |
| | | // 第ä¸è¡ï¼5ä¸ªåæ®µï¼åºç¡æ è¯+1ä¸ªç¶æï¼ï¼å®½åº¦åè° |
| | | // åºç¡ä¿¡æ¯è¡ |
| | | [ |
| | | { |
| | | title: "å·¥è£
æ¿ç¼å·", |
| | | field: "palletCode", |
| | | type: "input", |
| | | width: 160, |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥å·¥è£
æ¿ç¼å·", |
| | | }, |
| | |
| | | title: "æåç¼å·", |
| | | field: "productCode", |
| | | type: "input", |
| | | width: 160, |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥æåç¼å·", |
| | | }, |
| | |
| | | title: "æååç§°", |
| | | field: "productName", |
| | | type: "input", |
| | | width: 160, |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥æååç§°", |
| | | }, |
| | |
| | | title: "æµæ°´å·", |
| | | field: "productSn", |
| | | type: "input", |
| | | width: 180, |
| | | width: 200, |
| | | require: false, |
| | | placeholder: "请è¾å
¥äº§åæµæ°´å·", |
| | | }, |
| | | ], |
| | | // å å·¥ç¶æè¡ - ç§»é¤ä¸åå¨çcheckUnfinishedï¼æ°å¢äº§åç¶æ |
| | | [ |
| | | { |
| | | title: "æ§ç´§NG", |
| | | field: "pressTightenNg", |
| | | type: "select", |
| | | width: 150, |
| | | align: "center", |
| | | defaultValue: "0", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "æ§ç´§OK", |
| | | title: "åè£
æ§ç´§_æ§ç´§OK", |
| | | field: "pressTightenOk", |
| | | type: "select", |
| | | width: 150, |
| | | width: 160, |
| | | align: "center", |
| | | defaultValue: "0", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | defaultValue: 0, |
| | | data: booleanOptions, |
| | | }, |
| | | { |
| | | title: "æ§ç´§æªå®æ", |
| | | title: "åè£
æ§ç´§_æ¬æ¬¡å å·¥æªå®æ", |
| | | field: "pressTightenUnfinished", |
| | | type: "select", |
| | | width: 170, |
| | | width: 180, |
| | | align: "center", |
| | | defaultValue: "0", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | defaultValue: 0, |
| | | data: booleanOptions, |
| | | }, |
| | | { |
| | | title: "æ£æµæªå®æ", |
| | | field: "checkUnfinished", |
| | | title: "产åç¶æ", |
| | | field: "productStatus", |
| | | type: "select", |
| | | width: 150, |
| | | align: "center", |
| | | defaultValue: "0", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | }, |
| | | // { |
| | | // title: "é¶ä»¶æ°é", |
| | | // field: "componentQty", |
| | | // type: "input", |
| | | // inputType: "number", |
| | | // width: 140, |
| | | // require: false, |
| | | // attrs: { min: 0, step: 1 }, |
| | | // placeholder: "请è¾å
¥æ£æ´æ°", |
| | | // }, |
| | | { |
| | | title: "主é®ID", |
| | | field: "id", |
| | | type: "input", |
| | | width: 100, |
| | | hidden: true, |
| | | readonly: true, |
| | | }, |
| | | ], |
| | | // // 第ä¸è¡ï¼5ä¸ªåæ®µï¼æå/å度ç¸å
³+æµè¯ç»æï¼ï¼å°æ°æ ¡éª |
| | | // [ |
| | | // { |
| | | // title: "æåå¼", |
| | | // field: "torsioValue", |
| | | // type: "input", |
| | | // inputType: "number", |
| | | // width: 140, |
| | | // require: false, |
| | | // attrs: { step: 0.01, min: 0 }, |
| | | // placeholder: "ä¿ç2ä½å°æ°", |
| | | // }, |
| | | // { |
| | | // title: "æå弿 å", |
| | | // field: "torsioValueStandard", |
| | | // type: "input", |
| | | // inputType: "number", |
| | | // width: 160, |
| | | // require: false, |
| | | // attrs: { step: 0.01, min: 0 }, |
| | | // placeholder: "ä¿ç2ä½å°æ°", |
| | | // }, |
| | | // { |
| | | // title: "å度å¼", |
| | | // field: "stiffnessValue", |
| | | // type: "input", |
| | | // inputType: "number", |
| | | // width: 140, |
| | | // require: false, |
| | | // attrs: { step: 0.01, min: 0 }, |
| | | // placeholder: "ä¿ç2ä½å°æ°", |
| | | // }, |
| | | // { |
| | | // title: "ååº¦å¼æ å", |
| | | // field: "stiffnessValueStandard", |
| | | // type: "input", |
| | | // inputType: "number", |
| | | // width: 160, |
| | | // require: false, |
| | | // attrs: { step: 0.01, min: 0 }, |
| | | // placeholder: "ä¿ç2ä½å°æ°", |
| | | // }, |
| | | // { |
| | | // title: "æµè¯ç»æ", |
| | | // field: "testResult", |
| | | // type: "input", |
| | | // inputType: "number", |
| | | // width: 140, |
| | | // require: false, |
| | | // placeholder: "请è¾å
¥æ°åç»æ", |
| | | // }, |
| | | // ], |
| | | // 第åè¡ï¼4ä¸ªåæ®µï¼åè£
ä½å
¨åæ°ï¼ï¼å°æ°æ ¡éªï¼æ°å¢åè£
åå |
| | | [ |
| | | { |
| | | title: "åè£
é«åº¦", |
| | | field: "pressHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | align: "center", |
| | | defaultValue: 0, |
| | | data: productStatusOptions, |
| | | }, |
| | | { |
| | | title: "åè£
åå", |
| | | title: "åè£
ä½ä¸ååå", |
| | | field: "pressPressure", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | // åè£
æ£æµåæ°è¡ - ä¼åæ é¢ï¼å¹é
å端注é |
| | | [ |
| | | { |
| | | title: "åè£
æå", |
| | | title: "åè£
使§ç´§æ£æµæå", |
| | | field: "screwTorque", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ§ç´§è§åº¦", |
| | | title: "åè£
使§ç´§æ£æµè§åº¦", |
| | | field: "screwAngle", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "äº§åæ£æµé«åº¦", |
| | | field: "productCheckHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "èºçº¹ä½ç½®é«åº¦", |
| | | field: "threadPositionHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | // 第äºè¡ï¼3ä¸ªåæ®µï¼æ§ç´§ä½æ£æµé«åº¦ï¼ï¼å°æ°æ ¡éªï¼å±
ä¸æå¸ |
| | | // æ§ç´§ä½æ£æµé«åº¦è¡ |
| | | [ |
| | | { |
| | | title: "æ£æµé«åº¦1", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦1", |
| | | field: "height1", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 200, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ£æµé«åº¦2", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦2", |
| | | field: "height2", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 200, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ£æµé«åº¦3", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦3", |
| | | field: "height3", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 200, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | ]); |
| | | |
| | | // æç´¢è¡¨ååæ®µ - æ ¸å¿æç´¢é¡¹ï¼æµæ°´å·+åºç¡ä¿¡æ¯+å建信æ¯ï¼ |
| | | // æç´¢è¡¨ååæ®µ - å¹é
å端å®ä½ï¼ç§»é¤æ å
³å段 |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | | productCode: "", |
| | | productName: "", |
| | | productSn: "", // æµæ°´å·æç´¢ |
| | | creater: "", |
| | | productSn: "", |
| | | productStatus: "", // æ°å¢ï¼äº§åç¶ææç´¢ |
| | | createDate: "", |
| | | }); |
| | | |
| | | // æç´¢è¡¨åé
ç½® - ä¼å宽度ï¼å¹é
å¸å± |
| | | // æç´¢è¡¨åé
ç½® - ä¼åå¸å±ï¼æ°å¢äº§åç¶ææç´¢ |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "å·¥è£
æ¿ç¼å·", field: "palletCode", type: "like", width: 180 }, |
| | |
| | | { title: "æµæ°´å·", field: "productSn", type: "like", width: 200 }, |
| | | ], |
| | | [ |
| | | { title: "å建人", field: "creater", type: "like", width: 200 }, |
| | | { |
| | | title: "产åç¶æ", |
| | | field: "productStatus", |
| | | type: "select", |
| | | width: 180, |
| | | data: productStatusOptions, |
| | | }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime", width: 380 }, |
| | | ], |
| | | ]); |
| | | |
| | | // è¡¨æ ¼åé
ç½® - å®å
¨å¹é
å端å®ä½ï¼æ°å¢pressPressureåï¼ä¼åå宽/å¯¹é½ |
| | | // è¡¨æ ¼åé
ç½® - ä¿®æ£å段å¹é
ï¼æ°å¢äº§åç¶æåï¼ä¼åæ é¢ |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | |
| | | align: "left", |
| | | overflow: "ellipsis", |
| | | }, |
| | | // 4ä¸ªç¶æå - æ¯å¦æ ¼å¼åæ¾ç¤º |
| | | { |
| | | field: "pressTightenNg", |
| | | title: "æ§ç´§NG", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | }, |
| | | }, |
| | | // ç¶æå - ç§»é¤checkUnfinishedï¼æ°å¢äº§åç¶æ |
| | | { |
| | | field: "pressTightenOk", |
| | | title: "æ§ç´§OK", |
| | | type: "select", |
| | | width: 120, |
| | | width: 100, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | data: booleanOptions, |
| | | }, |
| | | }, |
| | | { |
| | | field: "pressTightenUnfinished", |
| | | title: "æ§ç´§æªå®æ", |
| | | type: "select", |
| | | width: 140, |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | data: booleanOptions, |
| | | }, |
| | | }, |
| | | { |
| | | field: "checkUnfinished", |
| | | title: "æ£æµæªå®æ", |
| | | field: "productStatus", |
| | | title: "产åç¶æ", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | data: productStatusOptions, |
| | | }, |
| | | }, |
| | | // { |
| | | // field: "componentQty", |
| | | // title: "é¶ä»¶æ°é", |
| | | // type: "int", |
| | | // width: 90, |
| | | // align: "center", |
| | | // }, |
| | | // // æå/å度ç¸å
³ - decimalç±»åï¼ä¿ç2ä½å°æ°ï¼ |
| | | // { |
| | | // field: "torsioValue", |
| | | // title: "æåå¼", |
| | | // type: "decimal", |
| | | // width: 90, |
| | | // align: "center", |
| | | // }, |
| | | // { |
| | | // field: "torsioValueStandard", |
| | | // title: "æåæ å", |
| | | // type: "decimal", |
| | | // width: 100, |
| | | // align: "center", |
| | | // }, |
| | | // { |
| | | // field: "stiffnessValue", |
| | | // title: "å度å¼", |
| | | // type: "decimal", |
| | | // width: 90, |
| | | // align: "center", |
| | | // }, |
| | | // { |
| | | // field: "stiffnessValueStandard", |
| | | // title: "å度æ å", |
| | | // type: "decimal", |
| | | // width: 100, |
| | | // align: "center", |
| | | // }, |
| | | // { |
| | | // field: "testResult", |
| | | // title: "æµè¯ç»æ", |
| | | // type: "int", |
| | | // width: 90, |
| | | // align: "center", |
| | | // }, |
| | | // åè£
使£æµåæ° - ãæ°å¢pressPressureåãdecimalç±»å |
| | | // åè£
æ£æµåæ°å - ä¼åæ é¢ï¼ç»ä¸æ ¼å¼å |
| | | { |
| | | field: "pressHeight", |
| | | title: "åè£
é«åº¦", |
| | | field: "pressPressure", |
| | | title: "åè£
ä½ä¸ååå", |
| | | type: "decimal", |
| | | width: 100, |
| | | width: 120, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "pressPressure", // ãæ°å¢ãåè£
ä½ä¸ååå |
| | | title: "åè£
åå", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | columnDescription: "åè£
ä½ä¸ååå", |
| | | formatter: (row) => formatTwoDecimal(row.pressPressure), |
| | | }, |
| | | { |
| | | field: "screwTorque", |
| | | title: "åè£
æå", |
| | | title: "æ§ç´§æ£æµæå", |
| | | type: "decimal", |
| | | width: 100, |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.screwTorque), |
| | | }, |
| | | { |
| | | field: "screwAngle", |
| | | title: "æ§ç´§è§åº¦", |
| | | title: "æ§ç´§æ£æµè§åº¦", |
| | | type: "decimal", |
| | | width: 100, |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.screwAngle), |
| | | }, |
| | | // æ§ç´§ä½æ£æµé«åº¦ |
| | | // äº§åæ£æµé«åº¦å |
| | | { |
| | | field: "productCheckHeight", |
| | | title: "äº§åæ£æµé«åº¦", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.productCheckHeight), |
| | | }, |
| | | { |
| | | field: "threadPositionHeight", |
| | | title: "èºçº¹ä½ç½®é«åº¦", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.threadPositionHeight), |
| | | }, |
| | | { |
| | | field: "height1", |
| | | title: "æ£æµé«åº¦1", |
| | | title: "é«åº¦1", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height1), |
| | | }, |
| | | { |
| | | field: "height2", |
| | | title: "æ£æµé«åº¦2", |
| | | title: "é«åº¦2", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height2), |
| | | }, |
| | | { |
| | | field: "height3", |
| | | title: "æ£æµé«åº¦3", |
| | | title: "é«åº¦3", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height3), |
| | | }, |
| | | // å
Œ
±å段 - å建/ä¿®æ¹ä¿¡æ¯ |
| | | // å
Œ
±å段 |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | |
| | | }, |
| | | ]); |
| | | |
| | | // å å·¥ä¿¡æ¯æ æç»ï¼ä¿æç©ºé
ç½® |
| | | // å å·¥ä¿¡æ¯æ æç» |
| | | const detail = ref({ |
| | | cnName: "", |
| | | table: "", |
| | |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | // è¡¨æ ¼åºç¡é
ç½® - æ°å¢é»è®¤ååºãç»ä¸è§è |
| | | // å·¥å
·å½æ°ï¼æ ¼å¼åæ°å为两ä½å°æ° |
| | | const formatTwoDecimal = (value) => { |
| | | if (value === "" || value === null || value === undefined) return ""; |
| | | const num = parseFloat(value); |
| | | return isNaN(num) ? "" : num.toFixed(2); |
| | | }; |
| | | |
| | | // è¡¨æ ¼åºç¡é
ç½® |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | |
| | | name: "processInfoDetail", |
| | | url: "/processInfoDetail/", |
| | | sortName: "createDate", |
| | | sortOrder: "desc", // æ°å¢ï¼å建æ¶é´é»è®¤ååºï¼å主页é¢ä¿æä¸è´ |
| | | sortOrder: "desc", // å建æ¶é´é»è®¤ååº |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨ååæ®µ - 忥䏻页é¢ï¼æ°å¢pressPressureï¼åè£
ååï¼ï¼å¹é
å端å®ä½ |
| | | // ç¼è¾è¡¨ååæ®µ - ä¸¥æ ¼å¹é
å端Dt_ProcessInfoå®ä½ |
| | | const editFormFields = ref({ |
| | | id: "", |
| | | id: 0, // 主é®é»è®¤å¼æ¹ä¸ºæ°å0 |
| | | palletCode: "", |
| | | productCode: "", |
| | | productName: "", |
| | | productSn: "", // æµæ°´å· |
| | | pressTightenNg: "", // åè£
æ§ç´§_æ§ç´§NG |
| | | pressTightenOk: "", // åè£
æ§ç´§_æ§ç´§OK |
| | | pressTightenUnfinished: "", // åè£
æ§ç´§_æ¬æ¬¡å å·¥æªå®æ |
| | | checkUnfinished: "", // æ£æµ_æ¬æ¬¡æ£æµæªå®æ |
| | | pressHeight: "", // åè£
ä½ä¸åé«åº¦ |
| | | screwTorque: "", // åè£
使§ç´§æå |
| | | screwAngle: "", // åè£
使§ç´§è§åº¦ |
| | | pressPressure: "", // ãæ°å¢ãåè£
ä½ä¸åååï¼å¹é
å端å®ä½ï¼ |
| | | height1: "", // æ§ç´§ä½æ£æµé«åº¦1 |
| | | height2: "", // æ§ç´§ä½æ£æµé«åº¦2 |
| | | height3: "", // æ§ç´§ä½æ£æµé«åº¦3 |
| | | productSn: "", |
| | | pressTightenOk: 0, // æ¹ä¸ºæ°åé»è®¤å¼ |
| | | pressTightenUnfinished: 0, // æ¹ä¸ºæ°åé»è®¤å¼ |
| | | productStatus: 0, // æ°å¢ï¼äº§åç¶æåæ®µ |
| | | screwTorque: "", |
| | | screwAngle: "", |
| | | pressPressure: "", |
| | | productCheckHeight: "", |
| | | threadPositionHeight: "", |
| | | height1: "", |
| | | height2: "", |
| | | height3: "", |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨åé
ç½® - åæ¶åä½åç±»ãååæå¸ï¼æ°å¢åè£
åå项ï¼è¡¥å
¨é»è®¤å¼/æ ¡éªï¼ç»ä¸å®½åº¦ |
| | | // 产åç¶æä¸æé项ï¼å¹é
å端注éï¼ |
| | | const productStatusOptions = [ |
| | | { key: "0", value: "ä¸åæ ¼" }, |
| | | { key: "1", value: "åæ ¼" }, |
| | | { key: "2", value: "äººå·¥ç¡®è®¤åæ ¼" }, |
| | | ]; |
| | | |
| | | // å¸å°å䏿é项ï¼éç¨ï¼ |
| | | const booleanOptions = [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ]; |
| | | |
| | | // ç¼è¾è¡¨åé
ç½® - ä¿®æ£å段å¹é
ï¼ä¼åå¸å±åå½å |
| | | const editFormOptions = ref([ |
| | | // 第ä¸è¡ï¼åºç¡æ è¯ï¼å®½åº¦åè°ï¼å主页é¢å¸å±ä¸è´ |
| | | // åºç¡ä¿¡æ¯è¡ |
| | | [ |
| | | { |
| | | title: "å·¥è£
æ¿ç¼å·", |
| | | field: "palletCode", |
| | | type: "input", |
| | | width: 160, |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥å·¥è£
æ¿ç¼å·", |
| | | }, |
| | |
| | | title: "æåç¼å·", |
| | | field: "productCode", |
| | | type: "input", |
| | | width: 160, |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥æåç¼å·", |
| | | }, |
| | |
| | | title: "æååç§°", |
| | | field: "productName", |
| | | type: "input", |
| | | width: 160, |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥æååç§°", |
| | | }, |
| | |
| | | title: "æµæ°´å·", |
| | | field: "productSn", |
| | | type: "input", |
| | | width: 180, |
| | | width: 200, |
| | | require: false, |
| | | placeholder: "请è¾å
¥äº§åæµæ°´å·", |
| | | }, |
| | | ], |
| | | // 第äºè¡ï¼4ä¸ªç¶æå+主é®ï¼è¡¥å
¨é»è®¤å¼0ï¼å¦ï¼ï¼ç»ä¸å®½åº¦/对é½ï¼éèä¸»é® |
| | | // å å·¥ç¶æè¡ - ç§»é¤ä¸åå¨çcheckUnfinishedï¼æ°å¢äº§åç¶æ |
| | | [ |
| | | { |
| | | title: "æ§ç´§NG", |
| | | field: "pressTightenNg", |
| | | type: "select", |
| | | width: 150, |
| | | align: "center", |
| | | defaultValue: "0", // æ°å¢é»è®¤å¼ï¼å主页é¢ä¸è´ |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "æ§ç´§OK", |
| | | title: "åè£
æ§ç´§_æ§ç´§OK", |
| | | field: "pressTightenOk", |
| | | type: "select", |
| | | width: 150, |
| | | width: 160, |
| | | align: "center", |
| | | defaultValue: "0", // æ°å¢é»è®¤å¼ |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | defaultValue: 0, |
| | | data: booleanOptions, |
| | | }, |
| | | { |
| | | title: "æ§ç´§æªå®æ", |
| | | title: "åè£
æ§ç´§_æ¬æ¬¡å å·¥æªå®æ", |
| | | field: "pressTightenUnfinished", |
| | | type: "select", |
| | | width: 170, |
| | | width: 180, |
| | | align: "center", |
| | | defaultValue: "0", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | defaultValue: 0, |
| | | data: booleanOptions, |
| | | }, |
| | | { |
| | | title: "æ£æµæªå®æ", |
| | | field: "checkUnfinished", |
| | | title: "产åç¶æ", |
| | | field: "productStatus", |
| | | type: "select", |
| | | width: 150, |
| | | width: 160, |
| | | align: "center", |
| | | defaultValue: "0", // æ°å¢é»è®¤å¼ï¼ç»ä¸è§è |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | defaultValue: 0, |
| | | data: productStatusOptions, |
| | | }, |
| | | { |
| | | title: "主é®ID", |
| | | field: "id", |
| | | title: "åè£
ä½ä¸ååå", |
| | | field: "pressPressure", |
| | | type: "input", |
| | | width: 100, |
| | | hidden: true, |
| | | readonly: true, |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | // åè£
æ£æµåæ°è¡ - ä¼åæ é¢ï¼å¹é
å端注é |
| | | [ |
| | | { |
| | | title: "åè£
é«åº¦", |
| | | field: "pressHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | }, |
| | | { |
| | | title: "åè£
åå", |
| | | field: "pressPressure", // æ°å¢åè£
åå项 |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | }, |
| | | { |
| | | title: "åè£
æå", |
| | | title: "åè£
使§ç´§æ£æµæå", |
| | | field: "screwTorque", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ§ç´§è§åº¦", |
| | | title: "åè£
使§ç´§æ£æµè§åº¦", |
| | | field: "screwAngle", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 160, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "äº§åæ£æµé«åº¦", |
| | | field: "productCheckHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "èºçº¹ä½ç½®é«åº¦", |
| | | field: "threadPositionHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | // 第äºè¡ï¼æ§ç´§ä½æ£æµé«åº¦ï¼å°æ°æ ¡éªï¼å±
䏿å¸ï¼ç»ä¸å®½åº¦ |
| | | // æ§ç´§ä½æ£æµé«åº¦è¡ |
| | | [ |
| | | { |
| | | title: "æ£æµé«åº¦1", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦1", |
| | | field: "height1", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 200, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ£æµé«åº¦2", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦2", |
| | | field: "height2", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 200, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ£æµé«åº¦3", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦3", |
| | | field: "height3", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 200, |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | ]); |
| | | |
| | | // æç´¢è¡¨ååæ®µ - ä¿æå主页é¢ãåæä»£ç ä¸è´ï¼æ ¸å¿æç´¢é¡¹æ è°æ´ |
| | | // æç´¢è¡¨ååæ®µ - å¹é
å端å®ä½ï¼ç§»é¤æ å
³å段 |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | | productCode: "", |
| | | productName: "", |
| | | productSn: "", // æµæ°´å·æç´¢ |
| | | creater: "", |
| | | productSn: "", |
| | | productStatus: "", // æ°å¢ï¼äº§åç¶ææç´¢ |
| | | createDate: "", |
| | | }); |
| | | |
| | | // æç´¢è¡¨åé
ç½® - ä¼å宽度å¹é
å¸å±ï¼å主页é¢å®å
¨ä¸è´ |
| | | // æç´¢è¡¨åé
ç½® - ä¼åå¸å±ï¼æ°å¢äº§åç¶ææç´¢ |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "å·¥è£
æ¿ç¼å·", field: "palletCode", type: "like", width: 180 }, |
| | |
| | | { title: "æµæ°´å·", field: "productSn", type: "like", width: 200 }, |
| | | ], |
| | | [ |
| | | { title: "å建人", field: "creater", type: "like", width: 200 }, |
| | | { |
| | | title: "产åç¶æ", |
| | | field: "productStatus", |
| | | type: "select", |
| | | width: 180, |
| | | data: productStatusOptions, |
| | | }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime", width: 380 }, |
| | | ], |
| | | ]); |
| | | |
| | | // è¡¨æ ¼åé
ç½® - ãæ°å¢pressPressureåãï¼ç»ä¸åå/宽度/ç±»åï¼ä¿®å¤é¦åæ¯å¤§åé®é¢ï¼ä¼åå¯¹é½ |
| | | // è¡¨æ ¼åé
ç½® - ä¿®æ£å段å¹é
ï¼æ°å¢äº§åç¶æåï¼ä¼åæ é¢ |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | |
| | | align: "left", |
| | | overflow: "ellipsis", |
| | | }, |
| | | // 4ä¸ªç¶æå - ä¿®å¤åæPressTightenNgé¦åæ¯å¤§åé®é¢ï¼ç»ä¸è§è |
| | | { |
| | | field: "pressTightenNg", |
| | | title: "æ§ç´§NG", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | }, |
| | | }, |
| | | // ç¶æå - ç§»é¤checkUnfinishedï¼æ°å¢äº§åç¶æ |
| | | { |
| | | field: "pressTightenOk", |
| | | title: "æ§ç´§OK", |
| | | type: "select", |
| | | width: 120, |
| | | width: 100, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | data: booleanOptions, |
| | | }, |
| | | }, |
| | | { |
| | | field: "pressTightenUnfinished", |
| | | title: "æ§ç´§æªå®æ", |
| | | type: "select", |
| | | width: 140, |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | data: booleanOptions, |
| | | }, |
| | | }, |
| | | { |
| | | field: "checkUnfinished", |
| | | title: "æ£æµæªå®æ", |
| | | field: "productStatus", |
| | | title: "产åç¶æ", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ], |
| | | data: productStatusOptions, |
| | | }, |
| | | }, |
| | | // åè£
æ£æµåæ°å - ä¼åæ é¢ï¼ç»ä¸æ ¼å¼å |
| | | { |
| | | field: "pressHeight", |
| | | title: "åè£
é«åº¦", |
| | | field: "pressPressure", |
| | | title: "åè£
ä½ä¸ååå", |
| | | type: "decimal", |
| | | width: 100, |
| | | width: 120, |
| | | align: "center", |
| | | }, |
| | | { |
| | | field: "pressPressure", // æ°å¢åè£
ååå |
| | | title: "åè£
åå", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | columnDescription: "åè£
ä½ä¸ååå", |
| | | formatter: (row) => formatTwoDecimal(row.pressPressure), |
| | | }, |
| | | { |
| | | field: "screwTorque", |
| | | title: "åè£
æå", |
| | | title: "æ§ç´§æ£æµæå", |
| | | type: "decimal", |
| | | width: 100, |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.screwTorque), |
| | | }, |
| | | { |
| | | field: "screwAngle", |
| | | title: "æ§ç´§è§åº¦", |
| | | title: "æ§ç´§æ£æµè§åº¦", |
| | | type: "decimal", |
| | | width: 100, |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.screwAngle), |
| | | }, |
| | | // æ§ç´§ä½æ£æµé«åº¦ |
| | | // äº§åæ£æµé«åº¦å |
| | | { |
| | | field: "productCheckHeight", |
| | | title: "äº§åæ£æµé«åº¦", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.productCheckHeight), |
| | | }, |
| | | { |
| | | field: "threadPositionHeight", |
| | | title: "èºçº¹ä½ç½®é«åº¦", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.threadPositionHeight), |
| | | }, |
| | | { |
| | | field: "height1", |
| | | title: "æ£æµé«åº¦1", |
| | | title: "é«åº¦1", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height1), |
| | | }, |
| | | { |
| | | field: "height2", |
| | | title: "æ£æµé«åº¦2", |
| | | title: "é«åº¦2", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height2), |
| | | }, |
| | | { |
| | | field: "height3", |
| | | title: "æ£æµé«åº¦3", |
| | | title: "é«åº¦3", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height3), |
| | | }, |
| | | // å
Œ
±å段 - å建/ä¿®æ¹ä¿¡æ¯ï¼å主页é¢ä¸è´ |
| | | // å
Œ
±å段 |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | |
| | | }, |
| | | ]); |
| | | |
| | | // æ äºçº§æç»ï¼ä¿æç©ºé
ç½®ä¸å |
| | | // å å·¥ä¿¡æ¯æ æç» |
| | | const detail = ref({ |
| | | cnName: "", |
| | | table: "", |
| | |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.BasicInfo; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | |
| | |
| | | private readonly IBoxingService _boxingService; |
| | | private readonly IFormulaService _formulaService; |
| | | private readonly IFormulaDetailService _formulaDetailService; |
| | | private readonly IProcessInfoDetailService _processInfoDetailService; |
| | | private readonly IScanStationService _scanStationService; |
| | | |
| | | |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | public BoxingDetailService( |
| | |
| | | IFormulaService formulaService, |
| | | IBoxingService boxingService, |
| | | IFormulaDetailService formulaDetailService, |
| | | IProcessInfoDetailService processInfoDetailService, |
| | | IScanStationService scanStationService, |
| | | IUnitOfWorkManage unitOfWorkManage |
| | | ) : base(BaseDal) |
| | | { |
| | | _formulaService = formulaService; |
| | | _boxingService = boxingService; |
| | | _formulaDetailService = formulaDetailService; |
| | | _processInfoDetailService = processInfoDetailService; |
| | | _scanStationService = scanStationService; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | |
| | | } |
| | | |
| | | public IRepository<Dt_BoxingDetail> Repository => BaseDal; |
| | |
| | | /// <returns></returns> |
| | | public string IsComponentCodesEqual(List<string> boxingDetails, List<string> formulaDetails) |
| | | { |
| | | |
| | | // å¤çnulléåï¼è§é¿ç©ºæéå¼å¸¸ |
| | | var boxList = boxingDetails ?? new List<string>(); |
| | | var formulaList = formulaDetails ?? new List<string>(); |
| | |
| | | return WebResponseContent.Instance.Error("æäº¤åæ°ä¸è½ä¸ºç©º"); |
| | | } |
| | | string productCode = toolingBoardSubmitDto.FinishedProductCode?.Trim(); |
| | | if (!string.IsNullOrWhiteSpace(productCode)) |
| | | { |
| | | |
| | | string proCode = string.Empty; |
| | | string proOther = string.Empty; |
| | | |
| | | if (!string.IsNullOrWhiteSpace(productCode)) |
| | | { |
| | | |
| | | var proCodeMatch = System.Text.RegularExpressions.Regex.Match(productCode, @"TX(\d+)(?=\s|\||$)", System.Text.RegularExpressions.RegexOptions.IgnoreCase); |
| | | if (proCodeMatch.Success) |
| | | { |
| | | proCode = $"TX{proCodeMatch.Groups[1].Value.Trim()}"; // æ¼æ¥TX+æ°åï¼ä¿ææ ¼å¼ç»ä¸ |
| | | proCode = $"TX{proCodeMatch.Groups[1].Value.Trim()}"; |
| | | } |
| | | |
| | | // æ£å2ï¼å¹é
è¿ç»ç10ä½çº¯æ°åï¼å
¨å±å¹é
ï¼å第ä¸ä¸ªç¬¦åçå³å¯ï¼ |
| | |
| | | if (formulaModel == null) |
| | | { |
| | | return WebResponseContent.Instance.Error("æ æåé
æ¹ï¼è¯·æ ¸å¯¹æåç¼ç "); |
| | | } |
| | | |
| | | Dt_ScanStation dt_ScanStation = _scanStationService.Repository.QueryFirst(x => x.StationCode == "001"); |
| | | if (dt_ScanStation.StationEndProduct != proCode) |
| | | { |
| | | return WebResponseContent.Instance.Error("æåç¼å·é误"); |
| | | } |
| | | |
| | | List<Dt_FormulaDetail> dt_FormulaDetails = _formulaDetailService.Repository.QueryData(x => x.FormulaId == formulaModel.Id && x.IsScanned == 1); |
| | |
| | | if (!PalletCode.IsNotEmptyOrNull() || PalletCode == "NoRead") |
| | | { |
| | | throw new InvalidOperationException("æçç æªæ«å°ï¼è¯·éè¯"); |
| | | } |
| | | Dt_Boxing dt_Boxing = _boxingService.Repository.QueryFirst(x => x.PalletCode == PalletCode); |
| | | if(dt_Boxing != null) |
| | | { |
| | | throw new InvalidOperationException("æçç é夿«æ"); |
| | | } |
| | | Dt_Boxing existBoxinModel = new Dt_Boxing(); |
| | | existBoxinModel.PalletCode = PalletCode; |
| | |
| | | // #endregion |
| | | //} |
| | | //uow.Commit(); |
| | | //string msg = existBoxinModel == null ? "ç»çä¿¡æ¯æ°å¢æåï¼" : "ç»çä¿¡æ¯ä¿®æ¹æåï¼"; |
| | | string msg = null; |
| | | List<Dt_ProcessInfoDetail> dt_ProcessInfoDetail = _processInfoDetailService.Repository |
| | | .QueryData(x => x.ProductSn == proOther && x.ProductCode == proCode).ToList(); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | // 3. 夿æ¥è¯¢ç»æï¼åå¨åèµå¼æç¤ºä¿¡æ¯ |
| | | if (dt_ProcessInfoDetail.Count<=3 && dt_ProcessInfoDetail.Count != 0) |
| | | { |
| | | msg = "å·²ææµæ°´å·"; |
| | | } |
| | | |
| | | // 4. è¿åååºï¼åå¨éå¤åmsgæ¯"å·²ææµæ°´å·"ï¼ä¸åå¨åmsg为nullï¼ |
| | | return WebResponseContent.Instance.OK(msg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | using System; |
| | | using Autofac.Core; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_BasicInfoService |
| | | { |
| | | public class BoxingService : ServiceBase<Dt_Boxing, IRepository<Dt_Boxing>>, IBoxingService |
| | | { |
| | | public BoxingService(IRepository<Dt_Boxing> BaseDal) : base(BaseDal) |
| | | private readonly IProcessInfoService _processInfoService; |
| | | // ç´æ¥æ³¨å
¥ BoxingDetail çä»å¨ï¼æ¿ä»£æ³¨å
¥ BoxingDetailService |
| | | private readonly IRepository<Dt_BoxingDetail> _boxingDetailRepo; |
| | | |
| | | public BoxingService( |
| | | IRepository<Dt_Boxing> BaseDal, |
| | | IProcessInfoService processInfoService, |
| | | // æ°å¢æ³¨å
¥ BoxingDetail ä»å¨ |
| | | IRepository<Dt_BoxingDetail> boxingDetailRepo |
| | | ) : base(BaseDal) |
| | | { |
| | | _processInfoService = processInfoService; |
| | | _boxingDetailRepo = boxingDetailRepo; // èµå¼ |
| | | } |
| | | |
| | | public IRepository<Dt_Boxing> Repository => BaseDal; |
| | | |
| | | //å é¤å½åæç |
| | | public WebResponseContent DeleteCurrentTray() |
| | | { |
| | | try |
| | | { |
| | | var PalletCode = TcpClientExample.Start("192.168.2.120", 2001); |
| | | if (!PalletCode.IsNotEmptyOrNull() || PalletCode == "NoRead") |
| | | { |
| | | return WebResponseContent.Instance.Error("æçç æªæ«å°ï¼è¯·éè¯"); |
| | | } |
| | | Db.Ado.BeginTran(); |
| | | |
| | | // 1. å é¤ Boxing ä¸»è¡¨æ°æ® |
| | | Dt_Boxing dt_Boxing = BaseDal.QueryFirst(x => x.PalletCode == PalletCode); |
| | | if (dt_Boxing != null) |
| | | { |
| | | BaseDal.DeleteData(dt_Boxing); |
| | | |
| | | // 2. ç´æ¥éè¿ä»å¨å é¤ BoxingDetail æ°æ®ï¼æ ¸å¿ä¿®æ¹ï¼ |
| | | Dt_BoxingDetail dt_BoxingDetail = _boxingDetailRepo.QueryFirst(x => x.BoxingId == dt_Boxing.Id); |
| | | if (dt_BoxingDetail != null) |
| | | { |
| | | _boxingDetailRepo.DeleteData(dt_BoxingDetail); |
| | | } |
| | | } |
| | | |
| | | // 3. å é¤ ProcessInfo æ°æ® |
| | | Dt_ProcessInfo dt_ProcessInfo = _processInfoService.Repository.QueryFirst(x => x.PalletCode == PalletCode); |
| | | if (dt_ProcessInfo != null) |
| | | { |
| | | _processInfoService.Repository.DeleteData(dt_ProcessInfo); |
| | | } |
| | | |
| | | Db.Ado.CommitTran(); |
| | | return WebResponseContent.Instance.OK("å 餿å"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Db.Ado.RollbackTran(); |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using Autofac.Core; |
| | | using OfficeOpenXml; |
| | | using OfficeOpenXml.Style; |
| | | using Spire.Xls; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | /// <exception cref="Exception"></exception> |
| | | public WebResponseContent GetSignalStates() |
| | | { |
| | | |
| | | try |
| | | { |
| | | OtherDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceName == "主æ§PLC") as OtherDevice; |
| | | if (device == null) throw new Exception("æªæ¾å°ä¸»æ§PLC设å¤ä¿¡æ¯"); |
| | | if (!device.IsConnected) throw new Exception($"主æ§PLC设å¤é讯å¼å¸¸"); |
| | |
| | | }; |
| | | return WebResponseContent.Instance.OK(data: responseData); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæåä¿¡æ¯ |
| | |
| | | } |
| | | List<Dt_FormulaDetail> dt_FormulaDetails = _formulaDetailService.Repository.QueryData(x => x.FormulaId == dt_Formula.Id); |
| | | |
| | | // æ°å¢leftPartSupplierCodesåæ®µåå¨ä¾æ¹ä»£ç |
| | | var responseData = new |
| | | { |
| | | finishedProductId = dt_Formula.Id, |
| | | finishedProduct = dt_Formula.ProductCode, |
| | | leftPartCodes = new List<string>(), |
| | | leftPartIds = new List<int>(), |
| | | leftPartChecked = new List<int>() |
| | | leftPartChecked = new List<int>(), |
| | | // å卿¯ä¸ªé¶ä»¶ç便¹ä»£ç |
| | | leftPartSupplierCodes = new List<string>() |
| | | }; |
| | | |
| | | foreach (var detail in dt_FormulaDetails.Take(10)) |
| | |
| | | responseData.leftPartCodes.Add(detail.ComponentCode ?? ""); |
| | | responseData.leftPartIds.Add(detail.Id); |
| | | responseData.leftPartChecked.Add(detail.IsScanned); |
| | | // æ·»å 便¹ä»£ç ï¼ä¸ºç©ºæ¶è¿å空å符串 |
| | | responseData.leftPartSupplierCodes.Add(detail.SupplierCode ?? ""); |
| | | } |
| | | |
| | | int needFillCount = 10 - responseData.leftPartCodes.Count; |
| | |
| | | responseData.leftPartCodes.Add(""); |
| | | responseData.leftPartIds.Add(0); |
| | | responseData.leftPartChecked.Add(0); |
| | | //补足10æ¡æ°æ®ï¼ç©ºç便¹ä»£ç è¿å空å符串 |
| | | responseData.leftPartSupplierCodes.Add(""); |
| | | } |
| | | return WebResponseContent.Instance.OK("è·å左侧åå§æ°æ®æå", responseData); |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="dt_ProcessInfo"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent ExportData(Dt_ScanStation dt_ScanStation) |
| | | public WebResponseContent ExportData() |
| | | { |
| | | try |
| | | { |
| | | Dt_ScanStation dt_ScanStation = BaseDal.QueryFirst(x => x.StationCode == "001"); |
| | | |
| | | string fileName = $"{DateTime.Now.ToString("yyyyMMddHHssmm")}.xlsx"; |
| | | string fileName = $"{DateTime.Now.ToString("yyyyMMddHHssmm")}" + $"{dt_ScanStation.StationEndProduct}.xlsx"; |
| | | string templatePath = $"{AppDomain.CurrentDomain.BaseDirectory}ExprotTemplate\\åçµæºå¼¹æ§æ¯æä¿¡æ¯åæµç¨å¡.xlsx";//模æ¿è·¯å¾ |
| | | string savePath = $"{AppDomain.CurrentDomain.BaseDirectory}Download\\{fileName}";//ä¿åæä»¶è·¯å¾ |
| | | // è·åç³»ç»æ¡é¢è·¯å¾ |
| | | string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\æµç¨å¡"; |
| | | //string desktopPath = "C:\\Users\\Administrator\\Desktop"; |
| | | string savePath = Path.Combine(desktopPath, fileName); |
| | | |
| | | using Stream templateStream = new FileStream(templatePath, FileMode.Open); |
| | | using Stream saveStream = new FileStream(savePath, FileMode.Create); |
| | |
| | | dt_FormulaDetails.Add(new Dt_FormulaDetail()); |
| | | } |
| | | |
| | | |
| | | |
| | | worksheet.Cells[3, 5].Value = dt_ScanStation.StationEndProduct;//æåç¼å· |
| | | worksheet.Cells[3, 17].Value = dt_ScanStation.LastProductSn.ObjToInt() - dt_ScanStation.FirstProductSn.ObjToInt() + 1;//æ°é; |
| | | worksheet.Cells[3, 29].Value = dt_ScanStation.FirstProductSn + "-" + dt_ScanStation.LastProductSn;//æµæ°´å· |
| | | worksheet.Cells[4, 5].Value = DateTime.Now.ToString("yyyy/MM/dd");//ç»è£
æ¥æ |
| | | worksheet.Cells[4, 17].Value = dt_ScanStation.AssembleUser;//ç»è£
人å |
| | | |
| | | |
| | | int row = 7; |
| | | for (int j = 0; j < 5; j++) |
| | |
| | | worksheet.Cells[17, 12].Value = "â æ¯ â¡ å¦"; |
| | | worksheet.Cells[23, 5].Value = "â æ¯ â¡ å¦"; |
| | | |
| | | worksheet.Cells[26, 7].Value = formula.ProductHeight; |
| | | worksheet.Cells[26, 13].Value = formula.ScrewTorqueOutput; |
| | | worksheet.Cells[26, 19].Value = formula.ScrewDownsetDistance; |
| | | worksheet.Cells[26, 25].Value = formula.PressFastenTorque; |
| | | |
| | | |
| | | List<Dt_ProcessInfoDetail> dt_ProcessInfoDetails = _processInfoDetailService.Repository |
| | | .QueryData(x => x.ProductCode == dt_ScanStation.StationEndProduct |
| | | && x.ProductSn.CompareTo(dt_ScanStation.LastProductSn) >= 0 |
| | | && x.ProductSn.CompareTo(dt_ScanStation.FirstProductSn) >= 0 |
| | | && x.ProductSn.CompareTo(dt_ScanStation.LastProductSn) <= 0) |
| | | .OrderBy(x => x.CreateDate) |
| | | .ToList(); |
| | |
| | | var targetRange = worksheet.Cells[row, 1, row, 36]; |
| | | |
| | | // 1. å¤å¶åå¹¶è§åï¼åæé»è¾ä¿çï¼ |
| | | this.CopyCellMerge(worksheet, sourceRange, targetRange); |
| | | CopyCellMerge(worksheet, sourceRange, targetRange); |
| | | // 2. å¤å¶æ ·å¼ï¼å
¼å®¹ææEPPlusçæ¬ï¼ |
| | | targetRange.StyleID = sourceRange.StyleID; |
| | | // 3. 忥è¡é« |
| | |
| | | } |
| | | |
| | | worksheet.Cells[row, 1].Value = item.ProductSn; |
| | | worksheet.Cells[row, 7].Value = item.Height2; |
| | | worksheet.Cells[row, 13].Value = item.Height1; |
| | | worksheet.Cells[row, 7].Value = item.ProductCheckHeight; |
| | | worksheet.Cells[row, 7].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; |
| | | worksheet.Cells[row, 7].Style.Fill.BackgroundColor.SetColor(SixLabors.ImageSharp.Color.Yellow); |
| | | |
| | | worksheet.Cells[row, 13].Value = item.ThreadPositionHeight; |
| | | worksheet.Cells[row, 13].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; |
| | | worksheet.Cells[row, 13].Style.Fill.BackgroundColor.SetColor(SixLabors.ImageSharp.Color.Yellow); |
| | | |
| | | worksheet.Cells[row, 19].Value = item.PressPressure; |
| | | worksheet.Cells[row, 19].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; |
| | | worksheet.Cells[row, 19].Style.Fill.BackgroundColor.SetColor(SixLabors.ImageSharp.Color.Yellow); |
| | | |
| | | worksheet.Cells[row, 25].Value = item.ScrewTorque; |
| | | if (item.PressTightenUnfinished == 1) |
| | | { |
| | | worksheet.Cells[row, 31].Value = "åè£
æ§ç´§å¼å¸¸"; |
| | | } |
| | | else if (item.CheckUnfinished == 1) |
| | | { |
| | | worksheet.Cells[row, 31].Value = "æ£æµå¼å¸¸"; |
| | | } |
| | | else |
| | | { |
| | | worksheet.Cells[row, 31].Value = "æ£å¸¸"; |
| | | } |
| | | worksheet.Cells[row, 25].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; |
| | | worksheet.Cells[row, 25].Style.Fill.BackgroundColor.SetColor(SixLabors.ImageSharp.Color.Yellow); |
| | | |
| | | worksheet.Cells[row, 31].Value = item.ProductStatus == 0 ? "ä¸åæ ¼" : item.ProductStatus == 1 ? "åæ ¼" : "äººå·¥ç¡®è®¤åæ ¼"; |
| | | //if (item.PressTightenUnfinished == 1) |
| | | //{ |
| | | // worksheet.Cells[row, 31].Value = "åè£
æ§ç´§å¼å¸¸"; |
| | | //} |
| | | //else |
| | | //{ |
| | | // worksheet.Cells[row, 31].Value = "æ£å¸¸"; |
| | | //} |
| | | row++; |
| | | |
| | | } |
| | |
| | | |
| | | package.Save(); |
| | | |
| | | string pdfFileName = $"{DateTime.Now.ToString("yyyyMMddHHssmm")}.pdf"; |
| | | string pdfPath = $"{AppDomain.CurrentDomain.BaseDirectory}Download\\{pdfFileName}"; |
| | | string pdfFileName = $"{DateTime.Now.ToString("yyyyMMddHHssmm")}" + $"{dt_ScanStation.StationEndProduct}.pdf"; |
| | | //string pdfPath = $"{AppDomain.CurrentDomain.BaseDirectory}Download\\{pdfFileName}"; |
| | | string pdfPath = Path.Combine(desktopPath, pdfFileName); |
| | | |
| | | Workbook workbook = new Workbook(); |
| | | workbook.LoadFromFile(savePath); |
| | | |
| | | // 转æ¢ç¬¬ä¸ä¸ªå·¥ä½è¡¨å°PDF |
| | | workbook.SaveToFile(pdfPath, FileFormat.PDF); |
| | | return WebResponseContent.Instance.OK(data: new { path = pdfPath, fileName = pdfFileName }); |
| | | // 设置转æ¢é项ï¼å
嫿æå·¥ä½è¡¨ |
| | | workbook.ConverterSetting.SheetFitToPage = true; |
| | | |
| | | // ä¿åææå·¥ä½è¡¨å°åä¸ä¸ªPDFæä»¶ |
| | | workbook.SaveToFile(pdfPath, FileFormat.PDF); |
| | | |
| | | //// 转æ¢ç¬¬ä¸ä¸ªå·¥ä½è¡¨å°PDF |
| | | //workbook.SaveToFile(pdfPath, FileFormat.PDF); |
| | | return WebResponseContent.Instance.OK(data: new { path = pdfPath, fileName = pdfFileName }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | /// åè£
ä½ä¸æ§ç´§ |
| | | /// </summary> |
| | | wboolLocation8ScanDone, |
| | | /// <summary> |
| | | /// åè£
ä½ä¸æµåºæ¿ |
| | | /// </summary> |
| | | wboolLocation9ScanDone, |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½äº§åé¿åº¦ |
| | |
| | | /// </summary> |
| | | wrealCheckPalletCode, |
| | | |
| | | /// <summary> |
| | | /// åè£
ååå·®å¼ |
| | | /// </summary> |
| | | wrealPressPressure, |
| | | /// <summary> |
| | | /// åè£
æåå·®å¼ |
| | | /// </summary> |
| | | wrealTighteningTorque, |
| | | /// <summary> |
| | | /// æ£æµé«åº¦å·®å¼ |
| | | /// </summary> |
| | | wrealProdHeightDiff, |
| | | /// <summary> |
| | | /// èºçº¹ä½ç½®å·®å¼ |
| | | /// </summary> |
| | | wrealScrewHeight, |
| | | /// <summary> |
| | | /// ç´§åºæç©å·®å¼ |
| | | /// </summary> |
| | | wrealFastenTorque, |
| | | |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Model.Models; |
| | |
| | | public interface IBoxingService : IService<Dt_Boxing> |
| | | { |
| | | public IRepository<Dt_Boxing> Repository { get; } |
| | | |
| | | public WebResponseContent DeleteCurrentTray(); |
| | | } |
| | | } |
| | |
| | | public WebResponseContent UpdatePartScannedStatus(UpdatePartScannedStatusRequest updatePartScannedStatusRequest); |
| | | |
| | | // ä¸è½½æµç¨å¡ |
| | | public WebResponseContent ExportData(Dt_ScanStation dt_ScanStation); |
| | | public WebResponseContent ExportData(); |
| | | |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Numeric; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Numeric; |
| | | using SqlSugar; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | using Magicodes.IE.Core; |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_Formula), "é
æ¹ä¿¡æ¯è¡¨")] |
| | |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | /// |
| | | [ImporterHeader(IsIgnore = true)] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "主é®")] |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æåç¼å·")] |
| | | /// |
| | | [ImporterHeader(Name = "æåç¼å·")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "æåç¼å·")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "æåç¼å·")] |
| | | public string ProductCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æååç§° |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æååç§°")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "æååç§°")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æååç§°")] |
| | | public string ProductName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½äº§åé¿åº¦ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "产åé¿åº¦")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "产åé¿åº¦")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
ä½äº§åé¿åº¦")] |
| | | public decimal? ProductLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½äº§å宽度 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "产å宽度")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "产å宽度")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
ä½äº§å宽度")] |
| | | public decimal? ProductWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½äº§åé«åº¦ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "产åé«åº¦")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "产åé«åº¦")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
ä½äº§åé«åº¦")] |
| | | public decimal? ProductHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½ä¸æ§ç´§ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "䏿§ç´§")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "䏿§ç´§")] |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "åè£
ä½ä¸æ§ç´§")] |
| | | public int? PressNoTighten { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
使§ç´§ä¸éé«åº¦ |
| | | /// åè£
ä½ä¸æµåºæ¿ |
| | | /// 0-æ£æµ 1-䏿£æµ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
使§ç´§ä¸éé«åº¦")] |
| | | [ImporterHeader(Name = "䏿µåºæ¿")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "䏿µåºæ¿")] |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "åè£
ä½ä¸æµåºæ¿")] |
| | | public int? PressNoCheckBottomPlate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿ååå |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿ååå")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "ä¿ååå")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "ä¿ååå")] |
| | | public decimal? ScrewDownsetDistance { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
使§ç´§æå |
| | | /// ä¸å¿é«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
使§ç´§æå")] |
| | | [ImporterHeader(Name = "ä¸å¿é«åº¦")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "ä¸å¿é«åº¦")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "ä¸å¿é«åº¦")] |
| | | public decimal? ScrewTorqueOutput { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½èªå¨æ§ç´§ç¨åºå· |
| | | /// </summary> |
| | | [ImporterHeader(Name = "èªå¨æ§ç´§ç¨åºå·")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "èªå¨æ§ç´§ç¨åºå·")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åè£
ä½èªå¨æ§ç´§ç¨åºå·")] |
| | | public int? DintAutoScrewOn { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½ç´§åºæç© |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç´§åºæç©")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "ç´§åºæç©")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
ä½ç´§åºæç©", DefaultValue = "0.00")] |
| | | public decimal? PressFastenTorque { get; set; } |
| | | |
| | | /// <summary> |
| | | /// P0P1宽度 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "P0P1宽度")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "P0P1宽度")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "P0P1宽度")] |
| | | public decimal? P0P1Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// P0P2宽度 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "P0P2宽度")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "P0P2宽度")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "P0P2宽度")] |
| | | public decimal? P0P2Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// P0P3宽度 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "P0P3宽度")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "P0P3宽度")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "P0P3宽度")] |
| | | public decimal? P0P3Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// P1P3é«åº¦ |
| | | /// å«çé«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "P1P3é«åº¦")] |
| | | public decimal? P1P3Height { get; set; } |
| | | [ImporterHeader(Name = "å«çé«åº¦")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "å«çé«åº¦")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "å«çé«åº¦")] |
| | | public decimal? GasketHeight { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// P2P3é«åº¦ |
| | | /// åè£
ååå·®å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "P2P3é«åº¦")] |
| | | public decimal? P2P3Height { get; set; } |
| | | [ImporterHeader(Name = "ååå·®å¼")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "ååå·®å¼")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
ååå·®å¼")] |
| | | public decimal? PressPressureDiff { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产åå¾çè·¯å¾ |
| | | /// åè£
æåå·®å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 500, ColumnDescription = "产åå¾çè·¯å¾")] |
| | | public string ProductImagePath { get; set; } |
| | | [ImporterHeader(Name = "æåå·®å¼")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "æåå·®å¼")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
æåå·®å¼")] |
| | | public decimal? PressTorqueDiff { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ£æµé«åº¦å·®å¼ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "é«åº¦å·®å¼")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "é«åº¦å·®å¼")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æ£æµé«åº¦å·®å¼")] |
| | | public decimal? DetectHeightDiff { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èºçº¹ä½ç½®å·®å¼ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "èºçº¹å·®å¼")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "èºçº¹å·®å¼")] |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "èºçº¹ä½ç½®å·®å¼")] |
| | | public decimal? ScrewPositionDiff { get; set; } |
| | | |
| | | [SugarColumn(IsIgnore = true)]//ä¸å䏿°æ®åºæ å°ï¼æµè¯ä½¿ç¨ |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_FormulaDetail.FormulaId), nameof(Id))] |
| | | public List<Dt_FormulaDetail> Details { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | using Magicodes.IE.Core; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(IsIgnore = true)] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "主é®")] |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | /// <summary> |
| | | /// é
æ¹ä¿¡æ¯ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "é
æ¹ä¿¡æ¯ä¸»é®")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "é
æ¹ä¿¡æ¯ä¸»é®")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "é
æ¹ä¿¡æ¯ä¸»é®")] |
| | | public int FormulaId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¶ä»¶ç¼å· |
| | | /// </summary> |
| | | [ImporterHeader(Name = "é¶ä»¶ç¼å·")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "é¶ä»¶ç¼å·")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶ç¼å·")] |
| | | public string ComponentCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¶ä»¶åç§° |
| | | /// </summary> |
| | | [ImporterHeader(Name = "é¶ä»¶åç§°")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "é¶ä»¶åç§°")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶åç§°")] |
| | | public string ComponentName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 便¹ä»£ç |
| | | /// </summary> |
| | | [ImporterHeader(Name = "便¹ä»£ç ")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "便¹ä»£ç ")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "便¹ä»£ç ")] |
| | | public string SupplierCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦æ«ç |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æ¯å¦æ«ç ")] |
| | | [ExporterHeader(null, 11f, null, true, true, false, 0, KnownColor.Empty, DisplayName = "æ¯å¦æ«ç ")] |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "æ¯å¦æ«ç ")] |
| | | public int IsScanned { get; set; } |
| | | |
| | |
| | | public string ProductSn { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
æ§ç´§_æ§ç´§NG |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "åè£
æ§ç´§_æ§ç´§NG")] |
| | | public int? PressTightenNg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
æ§ç´§_æ§ç´§OK |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "åè£
æ§ç´§_æ§ç´§OK")] |
| | |
| | | public int? PressTightenUnfinished { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ£æµ_æ¬æ¬¡æ£æµæªå®æ |
| | | /// 产åç¶æ |
| | | /// 0 - ä¸åæ ¼ |
| | | /// 1 - åæ ¼ |
| | | /// 2 - äººå·¥ç¡®è®¤åæ ¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "æ£æµ_æ¬æ¬¡æ£æµæªå®æ")] |
| | | public int? CheckUnfinished { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¶ä»¶æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "é¶ä»¶æ°é")] |
| | | public int? ComponentQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåå¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æåå¼")] |
| | | public decimal? TorsioValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå弿 å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æå弿 å")] |
| | | public decimal? TorsioValueStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååº¦å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "å度å¼")] |
| | | public decimal? StiffnessValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååº¦å¼æ å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "ååº¦å¼æ å")] |
| | | public decimal? StiffnessValueStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æµè¯ç»æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æµè¯ç»æ")] |
| | | public int? TestResult { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½ä¸åæ£æµé«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
ä½ä¸åæ£æµé«åº¦")] |
| | | public decimal? PressHeight { get; set; } |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "产åç¶æ")] |
| | | public int? ProductStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
使§ç´§æ£æµæå |
| | |
| | | public decimal? PressPressure { get; set; } |
| | | |
| | | /// <summary> |
| | | /// äº§åæ£æµé«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "äº§åæ£æµé«åº¦")] |
| | | public decimal? ProductCheckHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èºçº¹ä½ç½®é«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "èºçº¹ä½ç½®é«åº¦")] |
| | | public decimal? ThreadPositionHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ§ç´§ä½æ£æµé«åº¦1 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æ§ç´§ä½æ£æµé«åº¦1")] |
| | |
| | | public string ProductSn { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
æ§ç´§_æ§ç´§NG |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "åè£
æ§ç´§_æ§ç´§NG")] |
| | | public int? PressTightenNg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
æ§ç´§_æ§ç´§OK |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "åè£
æ§ç´§_æ§ç´§OK")] |
| | |
| | | public int? PressTightenUnfinished { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ£æµ_æ¬æ¬¡æ£æµæªå®æ |
| | | /// 产åç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "æ£æµ_æ¬æ¬¡æ£æµæªå®æ")] |
| | | public int? CheckUnfinished { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¶ä»¶æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "é¶ä»¶æ°é")] |
| | | public int? ComponentQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåå¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æåå¼")] |
| | | public decimal? TorsioValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå弿 å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æå弿 å")] |
| | | public decimal? TorsioValueStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååº¦å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "å度å¼")] |
| | | public decimal? StiffnessValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååº¦å¼æ å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "ååº¦å¼æ å")] |
| | | public decimal? StiffnessValueStandard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æµè¯ç»æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æµè¯ç»æ")] |
| | | public int? TestResult { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
ä½ä¸åæ£æµé«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "åè£
ä½ä¸åæ£æµé«åº¦")] |
| | | public decimal? PressHeight { get; set; } |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "产åç¶æ")] |
| | | public int? ProductStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åè£
使§ç´§æ£æµæå |
| | |
| | | public decimal? PressPressure { get; set; } |
| | | |
| | | /// <summary> |
| | | /// äº§åæ£æµé«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "äº§åæ£æµé«åº¦")] |
| | | public decimal? ProductCheckHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èºçº¹ä½ç½®é«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "èºçº¹ä½ç½®é«åº¦")] |
| | | public decimal? ThreadPositionHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ§ç´§ä½æ£æµé«åº¦1 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æ§ç´§ä½æ£æµé«åº¦1")] |
| | |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, DecimalDigits = 2, ColumnDescription = "æ§ç´§ä½æ£æµé«åº¦3")] |
| | | public decimal? Height3 { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | [SugarColumn(IsNullable = true, DefaultValue = "0", ColumnDescription = "æ¯å¦æ«ç ")] |
| | | public int IsScanned { get; set; } |
| | | |
| | | ///// <summary> |
| | | ///// é¶ä»¶æ°é |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, ColumnDescription = "é¶ä»¶æ°é")] |
| | | //public int StationComponentQty { get; set; } |
| | | |
| | | ///// <summary> |
| | | ///// é¶ä»¶1 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶1")] |
| | | //public string StationComponent1 { get; set; } |
| | | |
| | | ///// <summary> |
| | | ///// é¶ä»¶2 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶2")] |
| | | //public string StationComponent2 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶3 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶3")] |
| | | //public string StationComponent3 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶4 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶4")] |
| | | //public string StationComponent4 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶5 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶5")] |
| | | //public string StationComponent5 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶6 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶6")] |
| | | //public string StationComponent6 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶7 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶7")] |
| | | //public string StationComponent7 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶8 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶8")] |
| | | //public string StationComponent8 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶9 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶9")] |
| | | //public string StationComponent9 { get; set; } |
| | | ///// <summary> |
| | | ///// é¶ä»¶10 |
| | | ///// </summary> |
| | | //[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¶ä»¶10")] |
| | | //public string StationComponent10 { get; set; } |
| | | } |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Autofac.Core; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_BasicInfoService; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.BoxingInfo |
| | |
| | | [ApiController] |
| | | public class BoxingController : ApiBaseController<IBoxingService, Dt_Boxing> |
| | | { |
| | | |
| | | public BoxingController(IBoxingService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | |
| | | //å é¤å½åæç |
| | | [HttpPost, Route("DeleteCurrentTray"), AllowAnonymous] |
| | | public WebResponseContent DeleteCurrentTray() |
| | | { |
| | | return Service.DeleteCurrentTray(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Route("api/boxingDetail")] |
| | | [ApiController] |
| | | public class BoxingDetailController : ApiBaseController<IBoxingDetailService, Dt_Boxing> |
| | | public class BoxingDetailController : ApiBaseController<IBoxingDetailService, Dt_BoxingDetail> |
| | | { |
| | | public BoxingDetailController(IBoxingDetailService service) : base(service) |
| | | { |
| | |
| | | /// <param name="dt_ProcessInfo"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ExportData"), AllowAnonymous] |
| | | public WebResponseContent ExportData([FromBody] Dt_ScanStation dt_ScanStation) |
| | | public WebResponseContent ExportData() |
| | | { |
| | | return Service.ExportData(dt_ScanStation); |
| | | return Service.ExportData(); |
| | | } |
| | | |
| | | } |
| | |
| | | [assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEAWCS_TaskInfoService")] |
| | | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] |
| | | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] |
| | | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+15b3879cd259108e7ebb755fe02c190f28f1e20c")] |
| | | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8aa5f0e094e6ff51aa7c47d5b4e8331a16eb09ff")] |
| | | [assembly: System.Reflection.AssemblyProductAttribute("WIDESEAWCS_TaskInfoService")] |
| | | [assembly: System.Reflection.AssemblyTitleAttribute("WIDESEAWCS_TaskInfoService")] |
| | | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] |
| | |
| | | 2fcc0eeacc37ee31f32434a719cbb8cb3eedf35ecc022754a7ce9ac39f254105 |
| | | c97e13df12cbbd7b4f052106b0c5e3e54606d4e7d7c3571cbd36adfdc2f442d8 |
| | |
| | | private readonly IProcessInfoDetailService _processDetailInfoService;
|
| | | private readonly IUnitOfWorkManage _unitOfWorkManage;
|
| | | private readonly IScanStationService _scanStationService;
|
| | | //private readonly string PalletCode = "PL107";
|
| | |
|
| | | public PLCJob(IBoxingService boxingService,
|
| | | IBoxingDetailService boxingDetailService,
|
| | |
| | | {
|
| | | device.SetValue(W_PLCDBName.wboolLocation8ScanDone,true);
|
| | | }
|
| | | else
|
| | | {
|
| | | device.SetValue(W_PLCDBName.wboolLocation8ScanDone, false);
|
| | | }
|
| | |
|
| | | device.SetValue(W_PLCDBName.wrealProductLength, dt_Formula.ProductLength);
|
| | | device.SetValue(W_PLCDBName.wrealProductWidth, dt_Formula.ProductWidth);
|
| | | device.SetValue(W_PLCDBName.wrealProductHeight, dt_Formula.ProductHeight);
|
| | | device.SetValue(W_PLCDBName.wrealProductHeight, dt_Formula.ProductHeight + dt_Formula.GasketHeight);
|
| | | device.SetValue(W_PLCDBName.wrealScrewDownsetDistance, dt_Formula.ScrewDownsetDistance);
|
| | | //ä¸å¿é«åº¦
|
| | | device.SetValue(W_PLCDBName.wrealScrewTorque, dt_Formula.ScrewTorqueOutput);
|
| | | device.SetValue(W_PLCDBName.wrealScrewTorque, dt_Formula.ScrewTorqueOutput + dt_Formula.GasketHeight);
|
| | | device.SetValue(W_PLCDBName.wrealAutoScrewProgramNo, dt_Formula.DintAutoScrewOn);
|
| | | device.SetValue(W_PLCDBName.wrealPressPressure, dt_Formula.PressPressureDiff);
|
| | | device.SetValue(W_PLCDBName.wrealTighteningTorque, dt_Formula.PressTorqueDiff);
|
| | | device.SetValue(W_PLCDBName.wrealFastenTorque, dt_Formula.PressFastenTorque);
|
| | |
|
| | |
|
| | | //åè£
æ«ç 宿
|
| | | device.SetValue(W_PLCDBName.wboolLocation2ScanDone, true);
|
| | |
|
| | |
| | |
|
| | |
|
| | | //æ¥æ¶æ°æ®
|
| | | decimal PressHeight = (decimal)device.GetValue<R_PLCDBName, float>(R_PLCDBName.rrealDetectPressHeight);
|
| | | decimal ScrewTorque = (decimal)device.GetValue<R_PLCDBName, float>(R_PLCDBName.rrealDetectScrewTorque);
|
| | | decimal ScrewAngle = (decimal)device.GetValue<R_PLCDBName, float>(R_PLCDBName.rrealDetectScrewAngle);
|
| | | decimal PressPressure = (decimal)device.GetValue<R_PLCDBName, float>(R_PLCDBName.rrealDetectPressForce);
|
| | | bool PressTightenNg = device.GetValue<R_PLCDBName, bool>(R_PLCDBName.rrealPressScrewByScrewNG);
|
| | | bool PressTightenOk = device.GetValue<R_PLCDBName, bool>(R_PLCDBName.rrealPressScrewByScrewOK);
|
| | | bool PressTightenUnfinished = device.GetValue<R_PLCDBName, bool>(R_PLCDBName.rrealPressScrewByProcessUnfinished);
|
| | |
|
| | |
| | | ProductCode = dt_Formula.ProductCode,
|
| | | ProductName = dt_Formula.ProductName,
|
| | | ProductSn = dt_Boxing.BoxingNo,
|
| | | PressTightenNg = PressTightenNg?1:0,
|
| | | ProductStatus = 1,
|
| | | PressTightenOk = PressTightenOk?1:0,
|
| | | PressTightenUnfinished = PressTightenUnfinished?1:0,
|
| | | PressHeight = PressHeight,
|
| | | ScrewTorque = ScrewTorque,
|
| | | ScrewAngle = ScrewAngle,
|
| | | PressPressure = PressPressure,
|
| | | };
|
| | |
|
| | | if (
|
| | | PressPressure > dt_Formula.ScrewDownsetDistance + dt_Formula.PressPressureDiff || PressPressure < dt_Formula.ScrewDownsetDistance - dt_Formula.PressPressureDiff ||
|
| | | ScrewTorque > dt_Formula.PressFastenTorque + dt_Formula.PressTorqueDiff || ScrewTorque < dt_Formula.PressFastenTorque - dt_Formula.PressTorqueDiff
|
| | | )
|
| | | {
|
| | | dt_ProcessInfo.ProductStatus = 0;
|
| | | }
|
| | |
|
| | | _processInfoService.Repository.AddData(dt_ProcessInfo);
|
| | |
|
| | | // åè£
ä¿¡æ¯ä¸ä¼ 宿
|
| | |
| | | return;
|
| | | }
|
| | | Dt_Formula dt_Formula = _formulaService.Repository.QueryFirst(x => x.ProductCode == dt_Boxing.ProductCode);
|
| | | if(dt_Formula.PressNoCheckBottomPlate == 1)
|
| | | {
|
| | | device.SetValue(W_PLCDBName.wboolLocation9ScanDone, true);
|
| | | }
|
| | | else
|
| | | {
|
| | | device.SetValue(W_PLCDBName.wboolLocation9ScanDone, false);
|
| | | }
|
| | |
|
| | | //åå
¥PLC
|
| | | device.SetValue(W_PLCDBName.wrealCheckPalletCode, dt_Boxing.Id % 100);
|
| | | device.SetValue(W_PLCDBName.wrealP0P1Width, dt_Formula.P0P1Width);
|
| | | device.SetValue(W_PLCDBName.wrealP0P2Width, dt_Formula.P0P2Width);
|
| | | device.SetValue(W_PLCDBName.wrealP0P3Width, dt_Formula.P0P3Width);
|
| | | device.SetValue(W_PLCDBName.wrealP0P3Width, dt_Formula.P0P3Width);
|
| | | device.SetValue(W_PLCDBName.wrealP1P3Height, dt_Formula.P1P3Height);
|
| | | device.SetValue(W_PLCDBName.wrealP2P3Height, dt_Formula.P2P3Height);
|
| | | device.SetValue(W_PLCDBName.wrealP1P3Height, dt_Formula.ScrewTorqueOutput + dt_Formula.GasketHeight);
|
| | | device.SetValue(W_PLCDBName.wrealP2P3Height, dt_Formula.ProductHeight + dt_Formula.GasketHeight);
|
| | | device.SetValue(W_PLCDBName.wrealProdHeightDiff, dt_Formula.DetectHeightDiff);
|
| | | device.SetValue(W_PLCDBName.wrealScrewHeight, dt_Formula.ScrewPositionDiff);
|
| | | |
| | |
|
| | |
|
| | |
|
| | | //æ£æµæ«ç 宿
|
| | | device.SetValue(W_PLCDBName.wboolLocation3ScanDone, true);
|
| | |
| | | decimal Height1 = (decimal)device.GetValue<R_PLCDBName, float>(R_PLCDBName.rrealDetectHeight1);//113
|
| | | decimal Height2 = (decimal)device.GetValue<R_PLCDBName, float>(R_PLCDBName.rrealDetectHeight2);//92
|
| | | decimal Height3 = (decimal)device.GetValue<R_PLCDBName, float>(R_PLCDBName.rrealDetectHeight3);//11
|
| | | bool CheckUnfinished = device.GetValue<R_PLCDBName, bool>(R_PLCDBName.rrealDetectByInspectUnfinished);
|
| | | if(dt_Formula.PressNoCheckBottomPlate == 1)
|
| | | {
|
| | | Height3 = 0;
|
| | | }
|
| | |
|
| | | //bool CheckUnfinished = device.GetValue<R_PLCDBName, bool>(R_PLCDBName.rrealDetectByInspectUnfinished);
|
| | |
|
| | | |
| | |
|
| | | Dt_ProcessInfo dt_ProcessInfo = _processInfoService.Repository.QueryFirst(x => x.PalletCode == dt_Boxing.PalletCode);
|
| | | int id = 0;
|
| | |
| | | ProductCode = dt_Formula.ProductCode,
|
| | | ProductName = dt_Formula.ProductName,
|
| | | ProductSn = dt_Boxing.BoxingNo,
|
| | | CheckUnfinished = CheckUnfinished?1:0,
|
| | | };
|
| | | id = _processInfoService.Repository.AddData(dt_ProcessInfo);
|
| | | }
|
| | |
| | | {
|
| | | id = dt_ProcessInfo.Id;
|
| | | }
|
| | | decimal? ThreadPositionHeight = Height1 - Height3 - dt_Formula.GasketHeight;
|
| | | decimal? ProductCheckHeight = Height2 - Height3 - dt_Formula.GasketHeight;
|
| | |
|
| | | dt_ProcessInfo.Id = id;
|
| | | dt_ProcessInfo.Height1 = Height1 = Height1 - Height3;
|
| | | dt_ProcessInfo.Height2 = Height2 = Height2 - Height3;
|
| | | dt_ProcessInfo.ThreadPositionHeight = ThreadPositionHeight;
|
| | | dt_ProcessInfo.ProductCheckHeight = ProductCheckHeight;
|
| | | dt_ProcessInfo.Height1 = Height1;
|
| | | dt_ProcessInfo.Height2 = Height2;
|
| | | dt_ProcessInfo.Height3 = Height3;
|
| | |
|
| | | if(
|
| | | ProductCheckHeight > dt_Formula.ProductHeight + dt_Formula.DetectHeightDiff || ProductCheckHeight < dt_Formula.ProductHeight - dt_Formula.DetectHeightDiff ||
|
| | | ThreadPositionHeight > dt_Formula.ScrewTorqueOutput + dt_Formula.ScrewPositionDiff || ThreadPositionHeight < dt_Formula.ScrewTorqueOutput - dt_Formula.ScrewPositionDiff
|
| | | )
|
| | | {
|
| | | dt_ProcessInfo.ProductStatus = 0;
|
| | | }
|
| | |
|
| | | _processInfoService.Repository.UpdateData(dt_ProcessInfo);
|
| | | //æ£æµä¿¡æ¯ä¸ä¼ 宿
|
| | |
| | | throw new InvalidOperationException("æç为空");
|
| | | }
|
| | | Dt_Boxing dt_Boxing = _boxingService.Repository.QueryFirst(x => x.PalletCode == PalletCode);
|
| | | WriteInfo("ä¸çº¿æ«ç ç»çæ°æ®",$"{PalletCode}_boxingServiceæ¥è¯¢{dt_Boxing}");
|
| | |
|
| | | if (dt_Boxing != null)
|
| | | {
|
| | | WriteInfo("ä¸çº¿æ«ç ç»çæ°æ®", $"{PalletCode}_boxingServiceå é¤{dt_Boxing}");
|
| | | _boxingService.Repository.DeleteData(dt_Boxing);
|
| | | |
| | | List<Dt_BoxingDetail> dt_BoxingDetails = _boxingDetailService.Repository.QueryData(x => x.BoxingId == dt_Boxing.Id);
|
| | | if (dt_BoxingDetails != null)
|
| | | {
|
| | | WriteInfo("ä¸çº¿æ«ç ç»çæ°æ®", $"{PalletCode}_boxingServiceå é¤{dt_BoxingDetails}");
|
| | | _boxingDetailService.Repository.DeleteData(dt_BoxingDetails);
|
| | | }
|
| | | }
|
| | | Dt_ProcessInfo dt_ProcessInfo = _processInfoService.Repository.QueryFirst(x => x.PalletCode == PalletCode);
|
| | | WriteInfo("ä¸çº¿æ«ç ç»çæ°æ®", $"{PalletCode}_processInfoServiceæ¥è¯¢{dt_ProcessInfo}");
|
| | | if (dt_ProcessInfo != null)
|
| | | {
|
| | | Dt_ProcessInfoDetail dt_ProcessInfoDetail = new Dt_ProcessInfoDetail()
|
| | |
| | | ProductCode = dt_ProcessInfo.ProductCode?.ToString() ?? "",
|
| | | ProductName = dt_ProcessInfo.ProductName?.ToString() ?? "",
|
| | | ProductSn = dt_ProcessInfo.ProductSn,
|
| | | PressTightenNg = dt_ProcessInfo.PressTightenNg,
|
| | | PressTightenOk = dt_ProcessInfo.PressTightenOk,
|
| | | PressTightenUnfinished = dt_ProcessInfo.PressTightenUnfinished,
|
| | | CheckUnfinished = dt_ProcessInfo.CheckUnfinished,
|
| | | PressHeight = dt_ProcessInfo.PressHeight,
|
| | | ProductStatus = dt_ProcessInfo.ProductStatus,
|
| | | ScrewTorque = dt_ProcessInfo.ScrewTorque,
|
| | | ScrewAngle = dt_ProcessInfo.ScrewAngle,
|
| | | PressPressure = dt_ProcessInfo.PressPressure,
|
| | | ThreadPositionHeight = dt_ProcessInfo.ThreadPositionHeight,
|
| | | ProductCheckHeight = dt_ProcessInfo.ProductCheckHeight,
|
| | | Height1 = dt_ProcessInfo.Height1,
|
| | | Height2 = dt_ProcessInfo.Height2,
|
| | | Height3 = dt_ProcessInfo.Height3,
|
| | |
| | | CreateDate = DateTime.Now
|
| | | };
|
| | | _processDetailInfoService.Repository.AddData(dt_ProcessInfoDetail);
|
| | | WriteInfo("ä¸çº¿æ«ç ç»çæ°æ®", $"{PalletCode}_processInfoServiceå é¤{dt_ProcessInfo}");
|
| | | _processInfoService.DeleteData(dt_ProcessInfo);
|
| | | |
| | | }
|
| | | uow.Commit();
|
| | | //ä¸çº¿æ«ç 宿
|