| pages.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/SJ/Add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/SJ/List.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/SJ/ScanCode.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/SJ/UpdateCheckBy.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
pages.json
@@ -195,6 +195,12 @@ "enablePullDownRefresh": false } },{ "path": "pages/QC/SJ/UpdateCheckBy", "style": { "navigationBarTitleText": "åæ´è´è´£äºº", "enablePullDownRefresh": false } },{ "path": "pages/QC/LLJ/ScanCode", "style": { "navigationBarTitleText": "", @@ -202,6 +208,13 @@ } }, { "path": "pages/QC/SJ/ScanCode", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } }, { "path": "pages/QC/XJ/List", "style": { "enablePullDownRefresh": true, pages/QC/SJ/Add.vue
@@ -11,7 +11,7 @@ <view class="info-row"> <span class="info-label">å建æ¶é´ï¼</span> <span class="info-value">{{ formData.createTime }}</span> <span class="info-label">è´è´£äººï¼</span> <span class="info-label">æ£éªäººï¼</span> <span class="info-value">{{ formData.statusUser }}</span> </view> </view> @@ -33,7 +33,7 @@ @select="onItemChange"></superwei-combox> </view> <view class="info-block"> <view class="info-label">计åç¼å·ï¼</view> <view class="info-label">å·¥åç¼å·ï¼</view> <view v-if="!isUpdate" class="info-value">{{ formData.daa001 }}</view> <picker v-else :range="DAA001List" class="picker info-value-input" name="selector" @change="onDaa001Change"> @@ -49,9 +49,13 @@ <view class="info-value">{{ formData.daa004 }}</view> </view> <view class="info-block"> <view class="info-label">工忰éï¼</view> <view class="info-value highlight">{{ formData.daa008 }}</view> <view class="info-label">项ç®ï¼</view> <view class="info-value">{{ formData.projecT_CODE }}</view> </view> <view class="info-block"> <view class="info-label">工忰éï¼</view> <view class="info-value highlight">{{ formData.daa008 }}</view> </view> <view v-if="formData.remarks" class="info-block"> <view class="info-label">夿³¨ï¼</view> <view class="info-value">{{ formData.remarks }}</view> @@ -59,8 +63,10 @@ </view> <!-- æä½æé®åº --> <view v-if="isUpdate" class="action-buttons"> <button class="secondary-btn" @click="getTable">è·åæ£éªé¡¹ç®</button> <view v-if="this.current" class="action-buttons"> <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toSNScanCode(formData.releaseNo)">SN确认</button> <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toYzxSubmitFrom(formData.releaseNo)">ä¸è´æ§æ ¸å¯¹</button> <button class="secondary-btn" @click="getTable">è·åæ£éªé¡¹ç®</button> </view> <!-- æ£éªé¡¹ç®è¡¨æ ¼ --> @@ -130,14 +136,13 @@ <view class="action-buttons"> <button v-if="isUpdate && !isShowTable" class="secondary-btn" @click="save">å建æ£éªåå¹¶çæé¨åé»è®¤å¼</button> <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toImage">ä¸ä¼ /æ¥çå¾ç</button> <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toYzxSubmitFrom(formData.releaseNo)">ä¸è´æ§æ ¸å¯¹</button> <button v-if="!isUpdate && !formData.statusUser && !isShowTable" class="secondary-btn" @click="removeXJ"> <!-- <button v-if="!isUpdate && !formData.statusUser && !isShowTable" class="secondary-btn" @click="removeXJ"> å é¤åæ® </button> </button> --> <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="saveRemarks">æ·»å 夿³¨</button> <button v-if="!isUpdate && !isShowTable && formData.fSubmit != 1" class="primary-btn" @click="submit">å®¡æ ¸åæ®</button> <button v-if="isShowTable" class="secondary-btn" @click="getTable">è·åæ£éªé¡¹ç®</button> <button v-if="isShowTable && isUpdate" class="primary-btn" @click="saveTable">çææ£éªé¡¹ç®</button> <button v-if="!isUpdate && !isShowTable && formData.fSubmit != 1" class="primary-btn" @click="submit">æ£éªæäº¤</button> <!-- <button class="secondary-btn" @click="getTable">è·åæ£éªé¡¹ç®</button> --> <!-- <button v-if="isShowTable && isUpdate" class="primary-btn" @click="saveTable">çææ£éªé¡¹ç®</button> --> </view> <!-- å¼¹çª --> @@ -460,9 +465,28 @@ } }).then(res => { if (res.data.tbBillList.length > 0) { this.tableData = res.data.tbBillList; // å¨ç®å¤´å½æ°ä¸ï¼this æåå¤å±ä½ç¨åç this this.isShowTable = true; this.isUpdate = true; //çææ£éªé¡¹ç® if (this.tableData.length === 0) { return; } this.$post({ url: "/SJ/SaveItem", data: { gid: this.formData.id, items: this.tableData, statusUser: this.$loginInfo.account, ItemNo:this.formData.itemNo } }).then(res => { this.tableData = res.data.tbBillList.items; this.isShowTable = false; this.isUpdate = false; }) } else { this.$showMessage("æ¤ç©ææ²¡æå¯ç¨çæ£éªé¡¹ç®ï¼è¯·ç»´æ¤!"); this.isShowTable = true; @@ -494,6 +518,11 @@ url: 'yzxFrom?id=' +this.formData.id+'¤t='+this.current }); }, toSNScanCode(releaseNo){ uni.navigateTo({ url: 'ScanCode?id=' +this.formData.id+'¤t='+this.current }); }, save() { // if (this.tableData.length === 0) { pages/QC/SJ/List.vue
@@ -57,31 +57,53 @@ <view class="info-row"> <view class="info-item"> <view class="info-label">项ç®</view> <view class="info-content">{{ item.projecT_CODE }}</view> </view> <view class="info-item"> <view class="info-label">å¼å·¥ç¶æ</view> <view class="info-content">{{ item.daa018 }}</view> </view> <view class="info-item"> <view class="info-label">é½å¥ç¶æ</view> <view class="info-content">{{ item.daA019 }}</view> </view> </view> <view class="info-row"> <view class="info-item"> <view class="info-label">产线</view> <view class="info-content">{{ item.line }}</view> </view> <view class="info-item"> <view class="info-label">工忰é</view> <view class="info-content highlight">{{ item.daa008 }}</view> <view class="info-label">å·¥åå·</view> <view class="info-content">{{ item.daa001 }}</view> </view> <view class="info-item"> <view class="info-label">工忰</view> <view class="info-content highlight">{{ item.daa008 }}</view> </view> </view> <view class="info-row"> <view class="info-item"> <view class="info-label">å建人</view> <!-- <view class="info-item"> <view class="info-label">å建人1</view> <view class="info-content">{{ item.fName }}</view> </view> <view v-if="item.statusUser" class="info-item"> </view> --> <!-- <view v-if="item.statusUser" class="info-item"> <view class="info-label">æ£éªäºº</view> <view class="info-content">{{ item.statusUser }}</view> </view> </view> --> </view> <!-- 卿ªå®æç¶æä¸æ¾ç¤ºå建æ¶é´ï¼å·²å®æç¶æä¸æ¾ç¤ºæ£æµç»æ --> <view v-if="current === 0" class="meta-info"> <view class="meta-item">{{ item.statusDate }}</view> <view class="meta-item">å建人: {{ item.fName }}</view> <view class="meta-item">æ£éªäºº: {{ item.statusUser }}</view> </view> <view v-if="current === 0" class="meta-info"> <view class="meta-item">å建æ¶é´: {{ item.createTime }}</view> </view> <view v-if="current === 1" class="meta-info"> <view class="meta-item">{{ item.statusDate }}</view> @@ -90,7 +112,9 @@ </view> <view class="card-actions"> <button class="primary">{{ current === 0 ? 'ç»§ç»æ£éª' : 'æ¥ç详æ ' }}</button> <button v-if="current === 0 && IQCJL==1" @click.stop="assignTask(item)">{{item.statusUser == null ? 'åé ' : 'éæ°åé '}}</button> <button class="primary">{{ current === 0 ? 'å¼å§æ£éª' : 'æ¥ç详æ ' }}</button> </view> </view> </view> @@ -104,7 +128,6 @@ <script> export default { components: {}, data() { return { items: ['æªå®æ', '已宿'], @@ -114,73 +137,96 @@ limit: 20, totalPage: 0, totalCount: 0, noData: false, // æ²¡ææ´å¤æ°æ®äº isLoading: false, // æ¯å¦æ£å¨å è½½ tipShow: false, // æ¯å¦æ¾ç¤ºé¡¶é¨æç¤ºæ¡ noData: false, isLoading: false, tipShow: false, searchValue: '', uncheckedCount: 0, checkedCount: '已宿' checkedCount: '已宿', IQCJL: 0, // IQC æ£éªåæ è¯ userId:"" }; }, onLoad() { //页é¢å è½½æ¶è°ç¨çäºä»¶ this.init(); }, methods: { init() { let result = "æªå®æ"; if (this.current === 1) { result = "已宿"; } if (this.isLoading) return; // 妿æ£å¨å è½½åä¸ç»§ç»æ§è¡ // 页é¢å è½½æ¶åªæ§è¡ä¸æ¬¡ async onLoad() { // 夿å½åç»å½äººæ¯å¦ä¸ºIQCæ£éªåæç¹å®è´¦å· const user = this.$loginInfo; this.userId=user.account; if (user.roleid && user.roleid.indexOf("90134") !== -1 || user.account === "PL017") { this.IQCJL = 1; } else { this.IQCJL = 0; } console.log("IQCæ£éªåæ è¯ IQCJL =", this.IQCJL); // åå§åå è½½æ°æ® await this.init(); }, // æ¯æ¬¡é¡µé¢éæ°æ¾ç¤ºæ¶è§¦åï¼è¿å页é¢ä¹ä¼è§¦åï¼ onShow() { console.log("onShow 触åï¼IQCJL =", this.IQCJL); // é¿å éå¤å è½½ï¼åªå¨ç¬¬ä¸æ¬¡ææ°æ®ä¸ºç©ºæ¶éæ°å è½½ if (this.data.length === 0) { this.pageIndex = 1; this.init(); } }, methods: { async init() { let result = this.current === 1 ? "已宿" : "æªå®æ"; if (this.isLoading) return; this.isLoading = true; const userName = this.$loginInfo.account; //è·åå½åç»å½çç¨æ· let userName = this.$loginInfo.account; //页é¢å è½½æ¶è°ç¨çäºä»¶ this.$post({ url: "/SJ/GetPage", data: { pageIndex: this.pageIndex, limit: this.limit, statusUser: userName, result: result, searchValue: this.searchValue } }).then(res => { if (this.pageIndex === 1) { // 妿æ¯ç¬¬ä¸é¡µï¼ç´æ¥è¦çåæ°æ® this.data = res.data.tbBillList; } else { if (res.data.tbBillList.length > 0) { // 妿æ¯ä¸ä¸é¡µï¼è¿½å æ°æ°æ® this.data = [...this.data, ...res.data.tbBillList]; try { const res = await this.$post({ url: "/SJ/GetPage", data: { pageIndex: this.pageIndex, limit: this.limit, statusUser: userName, result: result, searchValue: this.searchValue } }); const list = res.data.tbBillList || []; if (this.pageIndex === 1) { this.data = list; } else { this.data.push(...list); } this.totalCount = res.totalCount; this.totalPage = Math.ceil(this.totalCount / this.limit); this.noData = this.pageIndex >= this.totalPage; this.isLoading = false; // ç»æå è½½ // æ´æ°è®¡æ° if (this.current === 1) { this.checkedCount = '已宿ï¼' + this.totalCount + 'ï¼'; } else { this.uncheckedCount = this.totalCount; } }).catch(() => { this.isLoading = false; // åºç°é误æ¶ç»æå è½½ }); } catch (e) { console.error("å è½½æ£éªåæ°æ®å¤±è´¥:", e); } finally { this.isLoading = false; } }, handleFabClick() { uni.navigateTo({ url: 'Add?id' }); // æç´¢ handleSearch() { this.pageIndex = 1; this.data = []; this.init(); }, // Tab 忢 onClickItem(index) { if (this.current !== index.currentIndex) { this.current = index.currentIndex; @@ -189,59 +235,50 @@ this.init(); } }, handleSearch() { this.pageIndex = 1; this.data = []; this.init(); }, // 跳转详æ navigateToDetail(item) { if (this.current === 1) { uni.navigateTo({ url: 'Add?id=' + item.id + '&billNo=' + item.billNo+ '¤t=B' }); }else{ uni.navigateTo({ url: 'Add?id=' + item.id + '&billNo=' + item.billNo+ '¤t=A' }); } const type = this.current === 1 ? "B" : "A"; uni.navigateTo({ url: `Add?id=${item.id}&billNo=${item.billNo}¤t=${type}` }); }, assignTask(item) { console.log(item); // è¿éå¯ä»¥æ·»å åé ä»»å¡çé»è¾ uni.navigateTo({ url: 'UpdateCheckBy?releaseNo=' + item.billNo + '&userID=' + this.userId + '&staffName=' + item.statusUser }); }, // æ·»å æé® handleFabClick() { uni.navigateTo({ url: 'Add?id' }); } }, /** * 䏿巿°åè°å½æ° */ // 䏿巿° onPullDownRefresh() { this.pageIndex = 1; //éæ°æ§è¡ä¸éæ¥è¯¢ this.init(); this.tipShow = true; //å ³éå¨ç» uni.stopPullDownRefresh(); setTimeout(() => { this.tipShow = false; }, 3000); this.init().then(() => { this.tipShow = true; uni.stopPullDownRefresh(); setTimeout(() => (this.tipShow = false), 3000); }); }, /** * 䏿å è½½åè°å½æ° */ // 䏿å è½½æ´å¤ onReachBottom() { if (this.noData || this.isLoading) return; this.pageIndex++; this.init(); // å è½½æ´å¤æ°æ® }, onShow() { //æ¯æ¬¡è¿å ¥é¡µé¢é½ä¼æ§è¡çæ¹æ³ this.pageIndex = 1; this.data = []; //this.current = 0 this.init(); } }; </script> <style scoped> /* åºç¡æ ·å¼éç½® */ .inspection-app { pages/QC/SJ/ScanCode.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,242 @@ <template> <view class="sn-scan-page"> <view class="title">SN æ«ç 页é¢</view> <view class="remark"> 夿³¨ï¼ç¹å»"æ«ç "æé®æ«æSNç ï¼å次ç¹å»å¯è¦ç䏿¬¡è®°å½ </view> <view class="scan-table"> <view class="table-header"> <text class="col name">项ç®åç§°</text> <text class="col sn">SNç </text> <text class="col action">æä½</text> </view> <view class="table-row" v-for="(item, index) in scanItems" :key="item.id"> <text class="col name">{{ item.scanItem }}</text> <input class="col sn-input" type="text" v-model="item.snNo" placeholder="请è¾å ¥ææ«ç " /> <button class="col scan-btn" type="primary" @click="onScan(index)" >æ«ç </button> </view> </view> <view class="action-bar"> <button type="success" @click="submit">ä¿å</button> </view> </view> </template> <script> export default { data() { return { mid: null, // MES主表ID scanItems: [], // ä» MES_SJ_SCAN_ITEM_CK è·å }; }, onLoad(options) { // å设ä»ä¸ä¸é¡µä¼ å ¥ mid this.mid = options.id || null; this.getScanItems(); }, methods: { // ä» MES_SJ_SCAN_ITEM_CK è·åæ°æ® getScanItems() { if (!this.mid) return; uni.showLoading({ title: "å è½½ä¸..." }); this.$post({ url: "/SJ/GetList", data: { mid: this.mid } }).then(res => { if (res.status === 0) { this.scanItems = res.data.map(x => ({ id: x.id, scanItem: x.scanItem, snNo: x.snNo || "", })); } else { uni.showToast({ title: res.message || "å 载失败", icon: "none" }); } }).catch(err => { console.error("å è½½æ«ç 项ç®åºéï¼", err); uni.showToast({ title: "å è½½å¼å¸¸", icon: "none" }); }).finally(() => { uni.hideLoading(); }); }, // æ«ç åè½ onScan(index) { const self = this; // #ifdef MP-WEIXIN uni.scanCode({ success(res) { self.scanItems[index].snNo = res.result; }, fail(err) { console.log("æ«ç 失败", err); }, }); // #endif // #ifdef H5 uni.showToast({ title: "è¯·ä½¿ç¨æ«ç æªè¾å ¥å°SNè¾å ¥æ¡", icon: "none", }); // #endif // #ifdef APP-PLUS uni.scanCode({ success(res) { self.scanItems[index].snNo = res.result; }, }); // #endif }, // ä¿å SN æ°æ®å° MES_SJ_SCAN_ITEM_CK submit() { this.$post({ url: "/SJ/SaveSn", data: { mid: this.mid, items: this.scanItems.map(x => ({ id: x.id, snNo: x.snNo, })), } }).then(res => { if (res.status === 0) { uni.showToast({ title: "ä¿åæå", icon: "success" }); } else { uni.showToast({ title: res.message || "ä¿å失败", icon: "none" }); } }).catch(err => { console.error("ä¿ååºéï¼", err); uni.showToast({ title: "ä¿åå¼å¸¸", icon: "none" }); }); }, }, }; </script> <style lang="scss" scoped> .sn-scan-page { padding: 20rpx; font-size: 28rpx; font-family: "Microsoft YaHei"; } .title { font-size: 36rpx; font-weight: bold; margin-bottom: 20rpx; text-align: center; } .remark { color: #666; font-size: 22rpx; margin-bottom: 30rpx; background-color: #f9f9f9; border-left: 6rpx solid #007aff; padding: 16rpx 20rpx; border-radius: 8rpx; line-height: 1.6; } .scan-table { border: 1rpx solid #ccc; border-radius: 10rpx; overflow: hidden; } .table-header { display: flex; background-color: #f5f5f5; font-weight: bold; padding: 20rpx 10rpx; } .table-row { display: flex; align-items: center; border-top: 1rpx solid #eee; padding: 20rpx 10rpx; } .col { flex: 1; text-align: center; } .name { flex: 1; } .sn { flex: 2; } .action { flex: 1; } .sn-input { flex: 2; border: 1rpx solid #ccc; border-radius: 6rpx; padding: 10rpx; } .scan-btn { flex: 1; font-size: 26rpx; background-color: #007aff; color: #fff; border-radius: 6rpx; line-height: 60rpx; height: 60rpx; } .scan-btn:active { background-color: #005bb5; } .action-bar { margin-top: 40rpx; text-align: center; } </style> pages/QC/SJ/UpdateCheckBy.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,160 @@ <template> <view class="form-container"> <u--form :model="formData" ref="uForm"> <u-form-item label="æ£éªåå·" label-width="150rpx"> <u-input v-model="formData.PI_BILLNO" placeholder="请è¾å ¥æ£éªåå·" disabled /> </u-form-item> <u-form-item label="è´è´£äºº" label-width="150rpx"> <u-input v-model="formData.PI_staffName" placeholder="æ¤åæ®ææ è´è´£äºº" disabled /> </u-form-item> <u-form-item label="æ°è´è´£äºº" label-width="150rpx" prop="PI_NEW_staffName" @click.native="show_PI_NEW_staffName = true" :required="true"> <u-input class="input_Form" v-model="formData.PI_NEW_staffName" disabled placeholder="è¯·éæ©æ°è´è´£äºº" disabled-color="#ffffff" /> <u-icon slot="right" name="arrow-down" /> </u-form-item> <!-- æ°è´è´£äººéæ©å¨ --> <u-picker :show="show_PI_NEW_staffName" :columns="[PI_NEW_staffName_Options]" keyName="label" @confirm="confirm_PI_NEW_staffName" @cancel="show_PI_NEW_staffName = false" /> <!-- æäº¤æé® --> <u-button type="primary" @click="submitForm" class="submit-btn"> æäº¤ </u-button> </u--form> </view> </template> <script> export default { data() { return { show_PI_NEW_staffName: false, formData: { PI_BILLNO: '', //æ£éªåå· PI_USER: '', //å§æäºº PI_NEW_staffName: '', //æ°è´è´£äºº PI_NEW_staffUserID: '', //æ°è´è´£äººID PI_Roleids:"", IQCJL:false }, PI_NEW_staffName_Options: [] , // æ·»å æ ¡éªè§å rules: { PI_NEW_staffName: [{ required: true, message: 'è¯·éæ©æ°è´è´£äºº', trigger: ['change'] }] } }; }, mounted() { this.loadInspectorsList(); }, methods: { confirm_PI_NEW_staffName(e) { const selected = e.value[0]; this.formData.PI_NEW_staffName = selected.label; this.formData.PI_NEW_staffUserID=selected.value; this.show_PI_NEW_staffName = false; }, onReady() { this.$refs.uForm.setRules(this.rules); }, onLoad(options) { //optionsä¸å å«äºurlé带çåæ° let params = options; this.formData.PI_BILLNO = params["releaseNo"]; this.formData.PI_USER = params["userID"]; this.formData.PI_staffName = params["staffName"]; this.formData.PI_Roleids=params["roleids"]; if(this.formData.PI_staffName=='null') { this.formData.PI_staffName=''; } }, loadInspectorsList() { // ä»APIè·åæ£éªåå表 this.$post({ url: "/sj/getAllInspectors", data: { } }).then(res => { this.PI_NEW_staffName_Options = res.data; }); }, //æäº¤ async submitForm() { try { const valid = await this.$refs.uForm.validate() if (valid) { uni.showToast({ title: 'æäº¤æå', icon: 'success' }) // è¿éæ·»å åç»ä¸å¡é»è¾ this.$post({ url: "/SJ/SaveCheckBy", data: { releaseNo:this.formData.PI_BILLNO, userID:this.formData.PI_USER, NewStaffName:this.formData.PI_NEW_staffName, NewStaffUserID:this.formData.PI_NEW_staffUserID } }).then(res => { if (res.status == 0) { uni.showToast({ title: res.message, icon: 'success' }) //å ³éå½å页é¢ï¼è¿åä¸ä¸é¡µé¢æå¤çº§é¡µé¢ setTimeout(() => { uni.navigateBack(); }, 2000); } else { uni.showToast({ title: res.message, icon: 'error' }) } }); } } catch (error) { console.error('éªè¯å¤±è´¥:', error) uni.showToast({ title: '请填åå¿ å¡«é¡¹', icon: 'error', duration: 2000 }) } } } }; </script> <style> .form-container { padding: 30rpx; } .submit-btn { margin-top: 60rpx; } .input_Form { pointer-events: none; } </style>