| | |
| | | { |
| | | "path": "pages/QC/SJ/Add", |
| | | "style": { |
| | | "navigationBarTitleText": "馿£", |
| | | // "navigationBarTitleText": "馿£", |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | |
| | | <view class="sheet-header"> |
| | | <h1>æ¥ææ£éªå</h1> |
| | | <view class="inspection-number">æ£éªåå·ï¼{{formData.releaseNo}}</view> |
| | | |
| | | <!-- é æ¢¦è
ç¹æ®åè½ --> |
| | | <view style="text-align: right;" v-if="this.current"><a class="sysLike" @click="toSysSubmitFrom(formData.releaseNo)">å®éªå®¤éæ£</a></view> |
| | | </view> |
| | | |
| | |
| | | <view class="info-block"> |
| | | <view class="info-label">ç©æç¼ç ï¼</view> |
| | | <view class="info-value">{{formData.itemNo}}</view> |
| | | <!-- é æ¢¦è
ç¹æ®åè½ --> |
| | | <view class="doc-links"> |
| | | <a class="doc-link" @click="toFileUrlByU9List(1,formData.itemNo)">å¾çº¸è§æ ¼ä¹¦</a> |
| | | <a class="doc-link" @click="toFileUrlByU9List(2,formData.itemNo)">è¿ææ£éªæä»¶</a> |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form-container"> |
| | | <form :modelValue="formData"> |
| | | <view class="form-group"> |
| | | <label class="form-label">馿£åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.billNo"/> |
| | | <view class="inspection-sheet"> |
| | | <!-- 头é¨ä¿¡æ¯ --> |
| | | <view class="sheet-header"> |
| | | <h1>馿£æ£éªå</h1> |
| | | <view class="inspection-number">æ£éªåå·ï¼{{formData.billNo}}</view> |
| | | |
| | | |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">å建æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.createTime"/> |
| | | |
| | | <!-- åºæ¬ä¿¡æ¯åº --> |
| | | <view class="basic-info"> |
| | | <view class="info-row"> |
| | | <span class="info-label">å建人ï¼</span> |
| | | <span class="info-value">{{formData.fName}}</span> |
| | | </view> |
| | | <view class="uni-form-item uni-column form-item edit"> |
| | | <text class="form-label">ç产线å«:</text> |
| | | <superwei-combox v-if="isUpdate" :candidates="DAA020List" placeholder="è¯·éæ©æè¾å
¥" |
| | | v-model="formData.line" |
| | | @select="onDaa020Change" |
| | | class="picker form-input" |
| | | style="border: none;"></superwei-combox> |
| | | <input v-else class="form-input" disabled="true" type="text" v-model="formData.line"/> |
| | | <view class="info-row"> |
| | | <span class="info-label">å建æ¶é´ï¼</span> |
| | | <span class="info-value">{{formData.createTime}}</span> |
| | | <!-- <span class="info-label"> è´è´£äººï¼</span> |
| | | <span class="info-value">{{formData.statusUser}}</span> --> |
| | | </view> |
| | | <view class="uni-form-item uni-column form-item edit"> |
| | | <text class="form-label">ç©æç¼ç :</text> |
| | | <superwei-combox v-if="isUpdate" :candidates="boardItems" placeholder="è¯·éæ©æè¾å
¥" |
| | | v-model="formData.itemNo" |
| | | :isJSON="true" keyName="itemName" |
| | | @select="onItemChange" |
| | | class="picker form-input" |
| | | style="border: none;"></superwei-combox> |
| | | <input v-else class="form-input" disabled="true" type="text" v-model="formData.itemNo"/> |
| | | </view> |
| | | <view class="uni-form-item uni-column form-item edit"> |
| | | <text class="form-label">计åç¼å·:</text> |
| | | <picker v-if="isUpdate" class="picker form-input" name="selector" :range="DAA001List" |
| | | @change="onDaa001Change"> |
| | | <text>{{ DAA001List[DAA001Index] }}</text> |
| | | </picker> |
| | | <input v-else class="form-input" disabled="true" type="text" v-model="formData.daa001"/> |
| | | |
| | | <!-- ç©æä¿¡æ¯åº --> |
| | | <view class="material-info"> |
| | | <view class="info-block"> |
| | | <view class="info-label">ç©æç¼ç ï¼</view> |
| | | <view class="info-value">{{formData.itemNo}}</view> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">产ååç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.daa003"/> |
| | | <view class="info-block"> |
| | | <view class="info-label">产ååç§°ï¼</view> |
| | | <view class="info-value">{{formData.daa003}}</view> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">è§æ ¼åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.daa004"/> |
| | | <view class="info-block"> |
| | | <view class="info-label">è§æ ¼åå·ï¼</view> |
| | | <view class="info-value">{{formData.daa004}}</view> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">工忰é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.daa008"/> |
| | | <view class="info-block"> |
| | | <view class="info-label">ç产线å«ï¼</view> |
| | | <view class="info-value">{{formData.line}}</view> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.remarks"/> |
| | | |
| | | <view class="info-block"> |
| | | |
| | | <view class="info-label" v-if="formData.extendNo1!=null">ææ¹ç¶æï¼</view> |
| | | <view class="info-value" v-if="formData.extendNo1!=null">{{formData.extendNo1}}</view> |
| | | <!-- <view class="info-label">项ç®ï¼</view> |
| | | <view class="info-value">{{formData.projectCodes}}</view> --> |
| | | |
| | | <view class="info-label">æ°éï¼</view> |
| | | <view class="info-value highlight">{{formData.daa008}}</view> |
| | | </view> |
| | | </form> |
| | | <view class="info-block" v-if="formData.fngDesc!=null"> |
| | | <view class="info-label">ä¸è¯æè¿°ï¼</view> |
| | | <view class="info-value">{{formData.fngDesc}}</view> |
| | | </view> |
| | | <view class="list-container"> |
| | | <uni-table ref="table" border emptyText="ææ æ´å¤æ°æ®"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;">æ£éªé¡¹ç®</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">æ¯å¦åæ ¼</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">è®°å½(ç¹å»)</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.projName"/> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.result"/> |
| | | </uni-td> |
| | | <uni-td> |
| | | <view class="uni-group"> |
| | | <button v-if="item.isCheck >=item.levelNum" type="default" @click="toDetail(item)"> |
| | | {{ item.levelNum + '/' + item.isCheck }} |
| | | </button> |
| | | <button v-else type="warn" @click="toDetail(item)"> {{ item.levelNum + '/' + item.isCheck }}</button> |
| | | <view class="info-block" v-if="formData.newFngDesc!=null"> |
| | | <view class="info-label">䏿¬¡ä¸è¯ï¼</view> |
| | | <view class="info-value">{{formData.newFngDesc}}</view> |
| | | </view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="isUpdate && !isShowTable" @click="save">å建æ£éªåå¹¶çæé¨åé»è®¤å¼</button> |
| | | |
| | | <!-- æä½æé®åº --> |
| | | <!-- <view class="action-buttons" v-if="this.current" > |
| | | <button class="secondary-btn" @click="getInspectionItems">è·åæ£éªé¡¹ç®</button> |
| | | </view> --> |
| | | |
| | | <!-- æ£éªé¡¹ç®è¡¨æ ¼ --> |
| | | <view class="inspection-table"> |
| | | <table> |
| | | <thead> |
| | | <tr> |
| | | <th width="15%" style="text-align: center;">æ£éªé¡¹ç®</th> |
| | | <th width="50%" style="text-align: center;">è´¨éè¦æ±</th> |
| | | <th width="20%" style="text-align: center;">è®°å½(ç¹å»)</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="(item, index) in tableData" :key="index"> |
| | | <td>{{ item.projName }}</td> |
| | | <td> |
| | | <view v-if="item.result=='åæ ¼'" class="watermark approved">{{ getStatusText(item.result) }} |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="!isUpdate && !isShowTable" @click="toImage">ä¸ä¼ /æ¥çå¾ç</button> |
| | | <view v-if="item.result=='ä¸åæ ¼'" class="watermark rejected">{{ getStatusText(item.result) }} |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="!isUpdate && formData.result == 'æªå®æ' && !isShowTable" @click="removeXJ">å é¤åæ® |
| | | </button> |
| | | <view v-if="item.result=='æªå®æ'" class="watermark pending">{{ getStatusText(item.result) }} |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="!isUpdate && !isShowTable" @click="saveRemarks">æ·»å ä¸åæ ¼æè¿°</button> |
| | | <view class="description-text">{{ item.itemMod }}</view> |
| | | </td> |
| | | <td> |
| | | <button v-if="item.current" class="record-btn" @click="fillRecord(item,index)">å¡«å</button> |
| | | <button v-if="!item.current" class="record-btn" @click="fillRecord(item,index)">æ¥ç</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="isShowTable" @click="getTable">è·åæ£éªé¡¹ç®</button> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable">çææ£éªé¡¹ç®</button> |
| | | |
| | | <!-- æä½æé®åº --> |
| | | <view class="action-buttons"> |
| | | <button class="secondary-btn" @click="uploadImages">ä¸ä¼ /æ¥çå¾ç</button> |
| | | <button class="secondary-btn" @click="addDefectDescription" v-if="this.current">æ·»å ä¸è¯æè¿°</button> |
| | | <!-- 馿£è¿è¾¹ä¼å¡«å®æ£éªé¡¹ç®èªå¨æäº¤ï¼ä¸ç¨åæäº¤é»è¾ --> |
| | | <!-- <button class="primary-btn" @click="submitInspection" v-if="this.current">æ£éªæäº¤</button> --> |
| | | </view> |
| | | <view v-if="remarksPopup" class="overlay"> |
| | | <view class="popup"> |
| | |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" type="text" v-model="remarks"/> |
| | | </view> |
| | | <button type="warn" @click="editRemarks">ä¿®æ¹</button> |
| | | <button @click="remarksPopup = !remarksPopup">åæ¶</button> |
| | | |
| | | </form> |
| | | <button class="updateBut" @click="editRemarks">ä¿®æ¹</button> |
| | | <button @click="remarksPopup = !remarksPopup">åæ¶</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | formData: { |
| | | createTime: "", |
| | | id: "", |
| | | billNo: "", |
| | | releaseNo: "", |
| | | createBy: "", |
| | | createDate: "", |
| | | lotNo: "", |
| | | itemNo: "", |
| | | itemName: "", |
| | | workshopCode: "", |
| | | workshopName: "", |
| | | line: "", |
| | | lineName: "", |
| | | comments: "", |
| | | statusUser: "" |
| | | billNo: "", |
| | | fcovertQty: "", |
| | | detailMem: "", |
| | | taskNo: "", |
| | | fcheckResu: "", |
| | | boardModel: "", |
| | | planQty: "", |
| | | mocode: "", |
| | | boardStyle: "" |
| | | }, |
| | | |
| | | DAA020List: [], |
| | | |
| | | DAA001List: [], |
| | | schemeResult: [], |
| | | DAA001Index: -1, |
| | | |
| | | ItemList: [], |
| | | |
| | | boardItems: [], |
| | | |
| | | womdaaList: [], |
| | | |
| | | tableData: [], |
| | | |
| | | isSubmit: true, |
| | | |
| | | isUpdate: true, |
| | | |
| | | isShowTable: false, |
| | | |
| | | remarks: "", |
| | | remarksPopup: false, |
| | | }; |
| | | current: true |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | |
| | | let params = options; |
| | | |
| | | if (params["id"]) { |
| | | this.isUpdate = false; |
| | | this.formData.id = params["id"]; |
| | | this.formData.billNo = params["billNo"]; |
| | | this.init(); |
| | | this.formData.releaseNo = params["releaseNo"]; |
| | | this.formData.lotNo = params["lotNo"]; |
| | | this.msgId = params["msgId"]; |
| | | |
| | | if (params["current"] === 'A') { |
| | | this.current = true; |
| | | } else if (params["current"] === 'B') { |
| | | this.current = false; |
| | | } |
| | | |
| | | if (this.msgId > 0) { |
| | | this.msgRead(); |
| | | } |
| | | |
| | | } else { |
| | | //åå§åæ£éªåå· |
| | | this.$post({ |
| | | url: "/SJ/GetMaxBillNo" |
| | | url: "/LLJ/getMaxReleaseNo" |
| | | }).then(res => { |
| | | this.formData.billNo = res.data.tbBillList; |
| | | this.formData.createTime = this.$getDate("yyyy-mm-dd"); |
| | | this.formData.releaseNo = res.data.tbBillList; |
| | | this.formData.createBy = this.$loginInfo.account; |
| | | this.formData.createDate = this.$getDate("yyyy-mm-dd"); |
| | | }); |
| | | |
| | | //产åç¼ç 䏿æ¡çåå§å |
| | | this.$post({ |
| | | url: "/XJ/getLineAll" |
| | | }).then(res => { |
| | | this.lineList = res.data.tbBillList; |
| | | this.DAA020List = res.data.tbBillList.map(item => item.lineName); |
| | | this.formData.itemNo = ""; |
| | | this.formData.itemName = ""; |
| | | this.formData.workshopCode = ""; |
| | | this.formData.workshopName = ""; |
| | | this.formData.line = ""; |
| | | this.formData.lineName = ""; |
| | | this.formData.pbaid = null; |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | removeXJ() { |
| | | if (this.formData.id) { |
| | | getStatusText(status) { |
| | | const statusMap = { |
| | | approved: 'åæ ¼', |
| | | rejected: 'ä¸åæ ¼', |
| | | pending: 'å¾
确认' |
| | | } |
| | | if (status == 'æªå®æ') { |
| | | return statusMap['pending'] || '' |
| | | } else if (status == 'åæ ¼') { |
| | | return statusMap['approved'] || '' |
| | | } else { |
| | | return statusMap['rejected'] || '' |
| | | } |
| | | |
| | | }, |
| | | getInspectionItems() { |
| | | // è·åæ£éªé¡¹ç®çé»è¾ |
| | | this.$post({ |
| | | url: "/SJ/removeSJ", |
| | | url: "/LLJ/setJYItem", |
| | | data: { |
| | | id: this.formData.id |
| | | itemNo: this.formData.itemNo, |
| | | quantity: this.formData.fcovertQty, |
| | | releaseNo: this.formData.releaseNo |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.$showMessage("å 餿å"); |
| | | //å
³éå½å页é¢ï¼è¿åä¸ä¸é¡µé¢æå¤çº§é¡µé¢ |
| | | uni.navigateBack(); |
| | | if (res.status == 0) { |
| | | uni.showToast({ |
| | | title: res.message.toString(), |
| | | //å°å¼è®¾ç½®ä¸º success æè
ç´æ¥ä¸ç¨åiconè¿ä¸ªåæ° |
| | | icon: 'success', |
| | | //æ¾ç¤ºæç»æ¶é´ä¸º 2ç§ |
| | | duration: 2000 |
| | | }) |
| | | // 妿æé¡µé¢è·³è½¬ï¼éè¦ç¨å®æ¶å¨å»¶è¿ |
| | | setTimeout(() => { |
| | | this.init(); |
| | | }, 2000); |
| | | |
| | | } else { |
| | | this.$showMessage("å é¤å¤±è´¥"); |
| | | uni.showToast({ |
| | | title: res.message.toString(), |
| | | //å°å¼è®¾ç½®ä¸º success æè
ç´æ¥ä¸ç¨åiconè¿ä¸ªåæ° |
| | | icon: 'error', |
| | | //æ¾ç¤ºæç»æ¶é´ä¸º 2ç§ |
| | | duration: 2000 |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | fillRecord(item, index) { |
| | | // å¡«åè®°å½çé»è¾ |
| | | uni.navigateTo({ |
| | | url: 'detail?mainId=' + item.id + '&formID=' + this.formData.id + '&releaseNo=' + this.formData |
| | | .billNo + '&index=' + index + '¤t=' + this.current |
| | | }); |
| | | }, |
| | | uploadImages() { |
| | | // ä¸ä¼ /æ¥çå¾ççé»è¾ |
| | | uni.navigateTo({ |
| | | url: 'ImageItem?id=' + this.formData.id |
| | | }); |
| | | }, |
| | | addDefectDescription() { |
| | | // æ·»å ä¸è¯æè¿°çé»è¾ |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.remarks = this.formData.remarks; |
| | | }, |
| | | submitInspection() { |
| | | // æ£éªæäº¤çé»è¾ |
| | | this.$post({ |
| | | url: "/LLJ/IqcQaSubmit", |
| | | data: { |
| | | userNo: this.$loginInfo.account, |
| | | releaseNo: this.formData.releaseNo |
| | | } |
| | | }).then(res => { |
| | | if (res.status == 0) { |
| | | |
| | | uni.showToast({ |
| | | title: res.message.toString(), |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | // 妿æé¡µé¢è·³è½¬ï¼éè¦ç¨å®æ¶å¨å»¶è¿ |
| | | setTimeout(() => { |
| | | uni.navigateTo({ |
| | | url: 'List' |
| | | }); |
| | | }, 2000); // ä¿æä¸ duration ç¸åçæ¶é¿ |
| | | |
| | | } else { |
| | | this.$showMessage("请å
éæ©æ£éªåå·"); |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: res.message.toString(), |
| | | confirmText: "ç¡®å®", |
| | | showCancel: false, |
| | | success: (res) => { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onShow() { |
| | | //æ¯æ¬¡è¿å
¥é¡µé¢é½ä¼æ§è¡çæ¹æ³ |
| | | if (this.formData.id) { |
| | | this.init(); |
| | | } |
| | | }, |
| | | init() { |
| | | if (this.formData.id) { |
| | | let userName = this.$loginInfo.account; |
| | | |
| | | this.$post({ |
| | | url: "/SJ/GetPage", |
| | | data: { |
| | |
| | | id: this.formData.id |
| | | } |
| | | }).then(res => { |
| | | let tbBillListElement = res.data.tbBillList[0]; |
| | | if (tbBillListElement) { |
| | | this.formData = tbBillListElement; |
| | | let data = res.data.tbBillList[0]; |
| | | if (data) { |
| | | this.formData = data; |
| | | |
| | | this.$post({ |
| | | url: "/SJ/getQSItems", |
| | | data: { |
| | | pid: this.formData.id |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList; |
| | | |
| | | this.tableData.sort((a, b) => { |
| | | }).then(res1 => { |
| | | let tableData = res1.data.tbBillList |
| | | //å½å·²æ£éªä¸ªæ°é½ä¸ä¸ºç©ºæ¶æç
§æ£æµç»ææåº |
| | | tableData.sort((a, b) => { |
| | | if (a.result === 'æªå®æ' && b.result === 'åæ ¼') { |
| | | return -1; |
| | | } else if (a.result === 'åæ ¼' && b.result === 'æªå®æ') { |
| | |
| | | return 0; |
| | | } |
| | | }); |
| | | |
| | | if (this.tableData.length <= 0) { |
| | | this.tableData = tableData; |
| | | if (this.tableData.length === 0) { |
| | | this.isShowTable = true; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onDaa020Change(event) { |
| | | //è·åç产线å«ç䏿 å°å |
| | | //this.formData.line = event; |
| | | |
| | | this.lineNo = this.lineList[this.DAA020List.indexOf(event)].lineNo; |
| | | |
| | | this.formData.line = this.lineNo; |
| | | |
| | | this.$post({ |
| | | url: "/XJ/getBoardItem", |
| | | data: { |
| | | lineNo: this.lineNo |
| | | } |
| | | }).then(res => { |
| | | //å¡«å
å·¥åå·çæ°æ®æº |
| | | this.boardItems = res.data.tbBillList; |
| | | |
| | | this.ItemList = this.boardItems.map(item => item.itemName); |
| | | }) |
| | | |
| | | }, |
| | | onItemChange(event) { |
| | | |
| | | this.formData.itemNo = event.itemNo; |
| | | |
| | | this.$post({ |
| | | url: "/XJ/getDaa001", |
| | | data: { |
| | | daa020: this.lineNo, |
| | | item: this.formData.itemNo |
| | | } |
| | | }).then(res => { |
| | | //å¡«å
å·¥åå·çæ°æ®æº |
| | | this.schemeResult = res.data.tbBillList; |
| | | this.DAA001List = this.schemeResult.map(s => s.daa001); |
| | | //å为é»è®¤ç©ºå¼çç¶æ |
| | | this.DAA001Index = -1; |
| | | this.formData.daa001 = ""; |
| | | }) |
| | | }, |
| | | //éåå·¥åå¡«å
ç©æå·åå
¶ä»ä¿¡æ¯ |
| | | onDaa001Change(event) { |
| | | this.DAA001Index = event.mp.detail.value; |
| | | |
| | | this.formData.daa001 = this.schemeResult[this.DAA001Index].daa001; |
| | | |
| | | //表åä¸çé¨ååæ®µèµå¼ |
| | | this.$post({ |
| | | url: "/XJ/getItem", |
| | | data: { |
| | | daa001: this.formData.daa001 |
| | | } |
| | | }).then(res => { |
| | | let data = res.data.tbBillList[0]; |
| | | //å½è¿åçç»æé为空æ¶ç½®ç©ºåæçå¼ |
| | | if (!data) { |
| | | this.formData.billNo = ""; |
| | | this.formData.taskNo = ""; |
| | | this.formData.itemNo = ""; |
| | | this.tableData = []; |
| | | return; |
| | | } |
| | | //ä¸ä¸ºç©ºæ¶èµå¼ |
| | | this.formData.daa001 = data.daa001; |
| | | this.formData.daa003 = data.daa003; |
| | | this.formData.daa004 = data.daa004; |
| | | this.formData.daa008 = data.daa008; |
| | | this.formData.pbaid = data.id; |
| | | |
| | | |
| | | this.$post({ |
| | | url: "/SJ/SetQSItems", |
| | | data: { |
| | | itemNo: this.formData.itemNo |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList.length > 0) { |
| | | this.tableData = res.data.tbBillList; // å¨ç®å¤´å½æ°ä¸ï¼this æåå¤å±ä½ç¨åç this |
| | | this.isSubmit = false; |
| | | } else { |
| | | this.$showMessage("æ¤ç©ææ²¡æå¯ç¨çæ£éªé¡¹ç®ï¼è¯·ç»´æ¤!"); |
| | | this.isSubmit = true; |
| | | this.tableData = []; |
| | | } |
| | | }); |
| | | this.tableData.forEach((item, index) => { |
| | | this.$set(item, 'current', this.current); |
| | | |
| | | }); |
| | | |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | toDetail(item) { |
| | | if (this.isUpdate) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请å
çææ£éªé¡¹ç®", |
| | | duration: 2000, |
| | | msgRead() { |
| | | msgRead(this.msgId, this.$loginInfo.account); |
| | | }, |
| | | //廿件å表页é¢ï¼æä»¶ç±»åï¼ç©æç¼å·ï¼ |
| | | toFileUrlByU9List(type, u9No) { |
| | | if (type === 1) { |
| | | uni.navigateTo({ |
| | | url: 'FileUrlByU9List?type=' + type + '&itemID=' + u9No |
| | | }); |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData.id |
| | | url: 'FileUrlByU9List2?type=' + type + '&itemID=' + u9No |
| | | }); |
| | | } |
| | | }, |
| | | getTable() { |
| | | this.$post({ |
| | | url: "/SJ/SetQSItems", |
| | | data: { |
| | | itemNo: this.formData.itemNo |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList.length > 0) { |
| | | this.tableData = res.data.tbBillList; // å¨ç®å¤´å½æ°ä¸ï¼this æåå¤å±ä½ç¨åç this |
| | | this.isShowTable = true; |
| | | this.isUpdate = true; |
| | | } else { |
| | | this.$showMessage("æ¤ç©ææ²¡æå¯ç¨çæ£éªé¡¹ç®ï¼è¯·ç»´æ¤!"); |
| | | this.isShowTable = true; |
| | | this.isUpdate = false; |
| | | this.tableData = []; |
| | | } |
| | | }); |
| | | }, |
| | | saveTable() { |
| | | if (this.tableData.length === 0) { |
| | | return; |
| | | } |
| | | |
| | | this.$post({ |
| | | url: "/SJ/SaveItem", |
| | | data: { |
| | | gid: this.formData.id, |
| | | items: this.tableData, |
| | | statusUser: this.$loginInfo.account |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList.items; |
| | | this.isShowTable = false; |
| | | this.isUpdate = false; |
| | | }) |
| | | }, |
| | | save() { |
| | | |
| | | if (this.tableData.length === 0) { |
| | | this.$showMessage(this.formData.itemNo + "ç©ææ²¡ææ£éªé¡¹ç®"); |
| | | return; |
| | | } |
| | | |
| | | if (!this.formData.daa001) { |
| | | this.$showMessage("è¯·éæ©è®¡åç¼å·"); |
| | | return; |
| | | } |
| | | |
| | | this.formData.statusUser = this.$loginInfo.account; |
| | | |
| | | this.$post({ |
| | | url: "/SJ/Save", |
| | | data: { |
| | | from: this.formData, |
| | | items: this.tableData |
| | | } |
| | | }).then(res => { |
| | | this.formData = res.data.tbBillList.result; |
| | | this.tableData = res.data.tbBillList.items; |
| | | this.isUpdate = false; |
| | | }) |
| | | }, saveRemarks() { |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.remarks = this.formData.remarks; |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks) { |
| | | //saveRemarksGid |
| | |
| | | this.$showMessage("ä¿åæå"); |
| | | } |
| | | }) |
| | | } else { |
| | | this.$post({ |
| | | url: "/SJ/saveRemarksGid", |
| | | data: { |
| | | gid: this.formData.id, |
| | | remarks: '' |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.formData.remarks = this.remarks; |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.$showMessage("ä¿åæå"); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | toImage() { |
| | | uni.navigateTo({ |
| | | url: 'ImageItem?id=' + this.formData.id |
| | | }); |
| | | } |
| | | }, |
| | | onShow() { |
| | | //æ¯æ¬¡è¿å
¥é¡µé¢é½ä¼æ§è¡çæ¹æ³ |
| | | this.init(); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .form-group { |
| | | /* åºç¡æ ·å¼ */ |
| | | .inspection-sheet { |
| | | font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif; |
| | | max-width: 1000px; |
| | | margin: 0 auto; |
| | | padding: 20px; |
| | | background-color: #fff; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | /* 头鍿 ·å¼ */ |
| | | .sheet-header { |
| | | text-align: center; |
| | | margin-bottom: 20px; |
| | | padding-bottom: 15px; |
| | | border-bottom: 2px solid #e0e0e0; |
| | | } |
| | | |
| | | .sheet-header h1 { |
| | | color: #2c3e50; |
| | | font-size: 24px; |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .inspection-number { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | color: #3498db; |
| | | } |
| | | |
| | | /* åºæ¬ä¿¡æ¯åºæ ·å¼ */ |
| | | .basic-info, |
| | | .material-info { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .info-row { |
| | | display: flex; |
| | | margin-bottom: 10px; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .info-label { |
| | | font-weight: bold; |
| | | color: #34495e; |
| | | min-width: 80px; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .info-value { |
| | | color: #2c3e50; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .highlight { |
| | | font-weight: bold; |
| | | color: #e74c3c; |
| | | } |
| | | |
| | | /* ç©æä¿¡æ¯åºæ ·å¼ */ |
| | | .material-info { |
| | | border: 1px solid #eee; |
| | | padding: 15px; |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | .info-block { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1px solid #c9c9c9; |
| | | margin-bottom: 10px; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .form-label { |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | .doc-links { |
| | | margin-left: auto; |
| | | } |
| | | |
| | | .form-input { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | } |
| | | |
| | | |
| | | .picker { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | .doc-link { |
| | | color: #3498db; |
| | | text-decoration: none; |
| | | margin-left: 15px; |
| | | padding: 3px 8px; |
| | | border: 1px solid #3498db; |
| | | border-radius: 3px; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .uni-form-item { |
| | | .sysLike { |
| | | color: #3498db; |
| | | text-decoration: none; |
| | | margin-left: 15px; |
| | | padding: 3px 8px; |
| | | border-radius: 3px; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .doc-link:hover { |
| | | background-color: #f0f8ff; |
| | | } |
| | | |
| | | /* è¡¨æ ¼æ ·å¼ */ |
| | | .inspection-table { |
| | | margin: 25px 0; |
| | | } |
| | | |
| | | .inspection-table table { |
| | | width: 100%; |
| | | border-collapse: collapse; |
| | | } |
| | | |
| | | .inspection-table th, |
| | | .inspection-table td { |
| | | padding: 12px 15px; |
| | | border: 1px solid #ddd; |
| | | text-align: left; |
| | | } |
| | | |
| | | .inspection-table th { |
| | | background-color: #f8f9fa; |
| | | font-weight: bold; |
| | | color: #34495e; |
| | | } |
| | | |
| | | .inspection-table tr:nth-child(even) { |
| | | background-color: #f9f9f9; |
| | | } |
| | | |
| | | .inspection-table tr:hover { |
| | | background-color: #f1f5f9; |
| | | } |
| | | |
| | | /* æé®æ ·å¼ */ |
| | | .action-buttons { |
| | | display: flex; |
| | | border-bottom: 1px solid #c9c9c9; |
| | | justify-content: flex-end; |
| | | gap: 10px; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .edit { |
| | | background-color: white; |
| | | } |
| | | |
| | | /* é»è®¤æ ·å¼ */ |
| | | .list-container { |
| | | height: 60vh; |
| | | /* 设置å表容å¨çé«åº¦ä¸ºå©ä½ç©ºé´ï¼å¹¶åå»è¡¨å容å¨çé«åº¦ */ |
| | | overflow-y: auto; |
| | | /* å
许å表容å¨åç´æ»å¨ */ |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿å表å
容æ´ç¾è§ */ |
| | | } |
| | | |
| | | /* å¨å°å±å¹è®¾å¤ä¸ï¼éç½®é«åº¦ä¸ºéåºå±å¹ */ |
| | | @media (max-width: 768px) { |
| | | .list-container { |
| | | height: calc(100vh - 376px); |
| | | /* éå½è°æ´é«åº¦ */ |
| | | } |
| | | } |
| | | |
| | | |
| | | .form-container { |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿è¡¨åå
容æ´ç¾è§ */ |
| | | } |
| | | |
| | | .th { |
| | | background-color: lightskyblue; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | |
| | | .plus-button { |
| | | line-height: 59px; |
| | | font-size: 24px; |
| | | .primary-btn, |
| | | .secondary-btn { |
| | | padding: 10px 20px; |
| | | border: none; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | z-index: 1000; |
| | | margin-bottom: 10px; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .primary-btn { |
| | | background-color: #3498db; |
| | | color: white; |
| | | } |
| | | |
| | | .primary-btn:hover { |
| | | background-color: #2980b9; |
| | | } |
| | | |
| | | .secondary-btn { |
| | | background-color: #ecf0f1; |
| | | color: #7f8c8d; |
| | | } |
| | | |
| | | .secondary-btn:hover { |
| | | background-color: #d5dbdb; |
| | | } |
| | | |
| | | .record-btn { |
| | | padding: 6px 12px; |
| | | background-color: #f8f9fa; |
| | | border: 1px solid #ddd; |
| | | /* border-radius: 3px; */ |
| | | cursor: pointer; |
| | | transition: all 0.2s; |
| | | } |
| | | |
| | | .record-btn:hover { |
| | | background-color: #e9ecef; |
| | | } |
| | | |
| | | /* æ°´å°æ ·å¼ */ |
| | | .watermark { |
| | | position: absolute; |
| | | font-size: 40px; |
| | | font-weight: bold; |
| | | opacity: 1; |
| | | z-index: 1; |
| | | pointer-events: none; |
| | | transform: rotate(-15deg); |
| | | width: 100%; |
| | | text-align: center; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%) rotate(-15deg); |
| | | } |
| | | |
| | | .watermark.approved { |
| | | color: #2ecc71; |
| | | /* ç»¿è² */ |
| | | } |
| | | |
| | | .watermark.rejected { |
| | | color: #e74c3c; |
| | | /* çº¢è² */ |
| | | } |
| | | |
| | | .watermark.pending { |
| | | color: #f39c12; |
| | | /* æ©è² */ |
| | | } |
| | | |
| | | /* æè¿°ææ¬å®¹å¨ */ |
| | | .description-text { |
| | | position: relative; |
| | | z-index: 2; |
| | | padding: 25px; |
| | | background-color: rgba(255, 255, 255, 0.7); |
| | | } |
| | | |
| | | /* è°æ´è¡¨æ ¼åå
æ ¼ */ |
| | | .inspection-table td:nth-child(2) { |
| | | position: relative; |
| | | overflow: hidden; |
| | | padding: 0; |
| | | } |
| | | |
| | | .overlay { |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | z-index: 10; |
| | | } |
| | | |
| | | .popup { |
| | |
| | | height: 25vh; |
| | | /* 设置é«åº¦ä¸ºè§å£é«åº¦ç80% */ |
| | | } |
| | | |
| | | .form-group { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1px solid #c9c9c9; |
| | | } |
| | | |
| | | .updateBut { |
| | | background-color: #3498db; |
| | | color: white; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (max-width: 500px) { |
| | | |
| | | .info-row, |
| | | .info-block { |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | |
| | | .doc-links { |
| | | margin-left: 0; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .action-buttons { |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .inspection-table table { |
| | | display: block; |
| | | overflow-x: auto; |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form-container"> |
| | | <form :modelValue="formData"> |
| | | <view class="form-group"> |
| | | <label class="form-label">馿£åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.billNo"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">å建æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.createTime"/> |
| | | </view> |
| | | <view class="uni-form-item uni-column form-item edit"> |
| | | <text class="form-label">ç产线å«:</text> |
| | | <superwei-combox v-if="isUpdate" :candidates="DAA020List" placeholder="è¯·éæ©æè¾å
¥" |
| | | v-model="formData.line" |
| | | @select="onDaa020Change" |
| | | class="picker form-input" |
| | | style="border: none;"></superwei-combox> |
| | | <input v-else class="form-input" disabled="true" type="text" v-model="formData.line"/> |
| | | </view> |
| | | <view class="uni-form-item uni-column form-item edit"> |
| | | <text class="form-label">ç©æç¼ç :</text> |
| | | <superwei-combox v-if="isUpdate" :candidates="boardItems" placeholder="è¯·éæ©æè¾å
¥" |
| | | v-model="formData.itemNo" |
| | | :isJSON="true" keyName="itemName" |
| | | @select="onItemChange" |
| | | class="picker form-input" |
| | | style="border: none;"></superwei-combox> |
| | | <input v-else class="form-input" disabled="true" type="text" v-model="formData.itemNo"/> |
| | | </view> |
| | | <view class="uni-form-item uni-column form-item edit"> |
| | | <text class="form-label">计åç¼å·:</text> |
| | | <picker v-if="isUpdate" class="picker form-input" name="selector" :range="DAA001List" |
| | | @change="onDaa001Change"> |
| | | <text>{{ DAA001List[DAA001Index] }}</text> |
| | | </picker> |
| | | <input v-else class="form-input" disabled="true" type="text" v-model="formData.daa001"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">产ååç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.daa003"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">è§æ ¼åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.daa004"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">工忰é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.daa008"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.remarks"/> |
| | | </view> |
| | | </form> |
| | | </view> |
| | | <view class="list-container"> |
| | | <uni-table ref="table" border emptyText="ææ æ´å¤æ°æ®"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF;">æ£éªé¡¹ç®</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">æ¯å¦åæ ¼</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">è®°å½(ç¹å»)</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.projName"/> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.result"/> |
| | | </uni-td> |
| | | <uni-td> |
| | | <view class="uni-group"> |
| | | <button v-if="item.isCheck >=item.levelNum" type="default" @click="toDetail(item)"> |
| | | {{ item.levelNum + '/' + item.isCheck }} |
| | | </button> |
| | | <button v-else type="warn" @click="toDetail(item)"> {{ item.levelNum + '/' + item.isCheck }}</button> |
| | | </view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="isUpdate && !isShowTable" @click="save">å建æ£éªåå¹¶çæé¨åé»è®¤å¼</button> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="!isUpdate && !isShowTable" @click="toImage">ä¸ä¼ /æ¥çå¾ç</button> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="!isUpdate && formData.result == 'æªå®æ' && !isShowTable" @click="removeXJ">å é¤åæ® |
| | | </button> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="!isUpdate && !isShowTable" @click="saveRemarks">æ·»å ä¸åæ ¼æè¿°</button> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="isShowTable" @click="getTable">è·åæ£éªé¡¹ç®</button> |
| | | </view> |
| | | <view class="plus-button"> |
| | | <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable">çææ£éªé¡¹ç®</button> |
| | | </view> |
| | | <view v-if="remarksPopup" class="overlay"> |
| | | <view class="popup"> |
| | | <h3>ä¿®æ¹ä¸åæ ¼æè¿°</h3> |
| | | <form> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" type="text" v-model="remarks"/> |
| | | </view> |
| | | <button type="warn" @click="editRemarks">ä¿®æ¹</button> |
| | | <button @click="remarksPopup = !remarksPopup">åæ¶</button> |
| | | </form> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | formData: { |
| | | createTime: "", |
| | | id: "", |
| | | billNo: "", |
| | | itemNo: "", |
| | | itemName: "", |
| | | workshopCode: "", |
| | | workshopName: "", |
| | | line: "", |
| | | lineName: "", |
| | | comments: "", |
| | | statusUser: "" |
| | | }, |
| | | |
| | | DAA020List: [], |
| | | |
| | | DAA001List: [], |
| | | schemeResult: [], |
| | | DAA001Index: -1, |
| | | |
| | | ItemList: [], |
| | | |
| | | boardItems: [], |
| | | |
| | | womdaaList: [], |
| | | |
| | | tableData: [], |
| | | |
| | | isSubmit: true, |
| | | |
| | | isUpdate: true, |
| | | |
| | | isShowTable: false, |
| | | |
| | | remarks: "", |
| | | remarksPopup: false, |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | |
| | | let params = options; |
| | | |
| | | if (params["id"]) { |
| | | this.isUpdate = false; |
| | | this.formData.id = params["id"]; |
| | | this.formData.billNo = params["billNo"]; |
| | | this.init(); |
| | | } else { |
| | | //åå§åæ£éªåå· |
| | | this.$post({ |
| | | url: "/SJ/GetMaxBillNo" |
| | | }).then(res => { |
| | | this.formData.billNo = res.data.tbBillList; |
| | | this.formData.createTime = this.$getDate("yyyy-mm-dd"); |
| | | }); |
| | | |
| | | //产åç¼ç 䏿æ¡çåå§å |
| | | this.$post({ |
| | | url: "/XJ/getLineAll" |
| | | }).then(res => { |
| | | this.lineList = res.data.tbBillList; |
| | | this.DAA020List = res.data.tbBillList.map(item => item.lineName); |
| | | this.formData.itemNo = ""; |
| | | this.formData.itemName = ""; |
| | | this.formData.workshopCode = ""; |
| | | this.formData.workshopName = ""; |
| | | this.formData.line = ""; |
| | | this.formData.lineName = ""; |
| | | this.formData.pbaid = null; |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | removeXJ() { |
| | | if (this.formData.id) { |
| | | this.$post({ |
| | | url: "/SJ/removeSJ", |
| | | data: { |
| | | id: this.formData.id |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.$showMessage("å 餿å"); |
| | | //å
³éå½å页é¢ï¼è¿åä¸ä¸é¡µé¢æå¤çº§é¡µé¢ |
| | | uni.navigateBack(); |
| | | } else { |
| | | this.$showMessage("å é¤å¤±è´¥"); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$showMessage("请å
éæ©æ£éªåå·"); |
| | | } |
| | | }, |
| | | init() { |
| | | if (this.formData.id) { |
| | | this.$post({ |
| | | url: "/SJ/GetPage", |
| | | data: { |
| | | pageIndex: 1, |
| | | limit: 1, |
| | | id: this.formData.id |
| | | } |
| | | }).then(res => { |
| | | let tbBillListElement = res.data.tbBillList[0]; |
| | | if (tbBillListElement) { |
| | | this.formData = tbBillListElement; |
| | | this.$post({ |
| | | url: "/SJ/getQSItems", |
| | | data: { |
| | | pid: this.formData.id |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList; |
| | | |
| | | this.tableData.sort((a, b) => { |
| | | if (a.result === 'æªå®æ' && b.result === 'åæ ¼') { |
| | | return -1; |
| | | } else if (a.result === 'åæ ¼' && b.result === 'æªå®æ') { |
| | | return 1; |
| | | } else { |
| | | return 0; |
| | | } |
| | | }); |
| | | |
| | | if (this.tableData.length <= 0) { |
| | | this.isShowTable = true; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onDaa020Change(event) { |
| | | //è·åç产线å«ç䏿 å°å |
| | | //this.formData.line = event; |
| | | |
| | | this.lineNo = this.lineList[this.DAA020List.indexOf(event)].lineNo; |
| | | |
| | | this.formData.line = this.lineNo; |
| | | |
| | | this.$post({ |
| | | url: "/XJ/getBoardItem", |
| | | data: { |
| | | lineNo: this.lineNo |
| | | } |
| | | }).then(res => { |
| | | //å¡«å
å·¥åå·çæ°æ®æº |
| | | this.boardItems = res.data.tbBillList; |
| | | |
| | | this.ItemList = this.boardItems.map(item => item.itemName); |
| | | }) |
| | | |
| | | }, |
| | | onItemChange(event) { |
| | | |
| | | this.formData.itemNo = event.itemNo; |
| | | |
| | | this.$post({ |
| | | url: "/XJ/getDaa001", |
| | | data: { |
| | | daa020: this.lineNo, |
| | | item: this.formData.itemNo |
| | | } |
| | | }).then(res => { |
| | | //å¡«å
å·¥åå·çæ°æ®æº |
| | | this.schemeResult = res.data.tbBillList; |
| | | this.DAA001List = this.schemeResult.map(s => s.daa001); |
| | | //å为é»è®¤ç©ºå¼çç¶æ |
| | | this.DAA001Index = -1; |
| | | this.formData.daa001 = ""; |
| | | }) |
| | | }, |
| | | //éåå·¥åå¡«å
ç©æå·åå
¶ä»ä¿¡æ¯ |
| | | onDaa001Change(event) { |
| | | this.DAA001Index = event.mp.detail.value; |
| | | |
| | | this.formData.daa001 = this.schemeResult[this.DAA001Index].daa001; |
| | | |
| | | //表åä¸çé¨ååæ®µèµå¼ |
| | | this.$post({ |
| | | url: "/XJ/getItem", |
| | | data: { |
| | | daa001: this.formData.daa001 |
| | | } |
| | | }).then(res => { |
| | | let data = res.data.tbBillList[0]; |
| | | //å½è¿åçç»æé为空æ¶ç½®ç©ºåæçå¼ |
| | | if (!data) { |
| | | this.formData.billNo = ""; |
| | | this.formData.taskNo = ""; |
| | | this.formData.itemNo = ""; |
| | | this.tableData = []; |
| | | return; |
| | | } |
| | | //ä¸ä¸ºç©ºæ¶èµå¼ |
| | | this.formData.daa001 = data.daa001; |
| | | this.formData.daa003 = data.daa003; |
| | | this.formData.daa004 = data.daa004; |
| | | this.formData.daa008 = data.daa008; |
| | | this.formData.pbaid = data.id; |
| | | |
| | | |
| | | this.$post({ |
| | | url: "/SJ/SetQSItems", |
| | | data: { |
| | | itemNo: this.formData.itemNo |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList.length > 0) { |
| | | this.tableData = res.data.tbBillList; // å¨ç®å¤´å½æ°ä¸ï¼this æåå¤å±ä½ç¨åç this |
| | | this.isSubmit = false; |
| | | } else { |
| | | this.$showMessage("æ¤ç©ææ²¡æå¯ç¨çæ£éªé¡¹ç®ï¼è¯·ç»´æ¤!"); |
| | | this.isSubmit = true; |
| | | this.tableData = []; |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | }, |
| | | toDetail(item) { |
| | | if (this.isUpdate) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请å
çææ£éªé¡¹ç®", |
| | | duration: 2000, |
| | | }); |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData.id |
| | | }); |
| | | } |
| | | }, |
| | | getTable() { |
| | | this.$post({ |
| | | url: "/SJ/SetQSItems", |
| | | data: { |
| | | itemNo: this.formData.itemNo |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList.length > 0) { |
| | | this.tableData = res.data.tbBillList; // å¨ç®å¤´å½æ°ä¸ï¼this æåå¤å±ä½ç¨åç this |
| | | this.isShowTable = true; |
| | | this.isUpdate = true; |
| | | } else { |
| | | this.$showMessage("æ¤ç©ææ²¡æå¯ç¨çæ£éªé¡¹ç®ï¼è¯·ç»´æ¤!"); |
| | | this.isShowTable = true; |
| | | this.isUpdate = false; |
| | | this.tableData = []; |
| | | } |
| | | }); |
| | | }, |
| | | saveTable() { |
| | | if (this.tableData.length === 0) { |
| | | return; |
| | | } |
| | | |
| | | this.$post({ |
| | | url: "/SJ/SaveItem", |
| | | data: { |
| | | gid: this.formData.id, |
| | | items: this.tableData, |
| | | statusUser: this.$loginInfo.account |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList.items; |
| | | this.isShowTable = false; |
| | | this.isUpdate = false; |
| | | }) |
| | | }, |
| | | save() { |
| | | |
| | | if (this.tableData.length === 0) { |
| | | this.$showMessage(this.formData.itemNo + "ç©ææ²¡ææ£éªé¡¹ç®"); |
| | | return; |
| | | } |
| | | |
| | | if (!this.formData.daa001) { |
| | | this.$showMessage("è¯·éæ©è®¡åç¼å·"); |
| | | return; |
| | | } |
| | | |
| | | this.formData.statusUser = this.$loginInfo.account; |
| | | |
| | | this.$post({ |
| | | url: "/SJ/Save", |
| | | data: { |
| | | from: this.formData, |
| | | items: this.tableData |
| | | } |
| | | }).then(res => { |
| | | this.formData = res.data.tbBillList.result; |
| | | this.tableData = res.data.tbBillList.items; |
| | | this.isUpdate = false; |
| | | }) |
| | | }, saveRemarks() { |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.remarks = this.formData.remarks; |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks) { |
| | | //saveRemarksGid |
| | | this.$post({ |
| | | url: "/SJ/saveRemarksGid", |
| | | data: { |
| | | gid: this.formData.id, |
| | | remarks: this.remarks |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.formData.remarks = this.remarks; |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.$showMessage("ä¿åæå"); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | toImage() { |
| | | uni.navigateTo({ |
| | | url: 'ImageItem?id=' + this.formData.id |
| | | }); |
| | | } |
| | | }, |
| | | onShow() { |
| | | //æ¯æ¬¡è¿å
¥é¡µé¢é½ä¼æ§è¡çæ¹æ³ |
| | | this.init(); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .form-group { |
| | | display: flex; |
| | | align-items: center; |
| | | border-bottom: 1px solid #c9c9c9; |
| | | } |
| | | |
| | | .form-label { |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | } |
| | | |
| | | .form-input { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | } |
| | | |
| | | |
| | | .picker { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .uni-form-item { |
| | | display: flex; |
| | | border-bottom: 1px solid #c9c9c9; |
| | | } |
| | | |
| | | .edit { |
| | | background-color: white; |
| | | } |
| | | |
| | | /* é»è®¤æ ·å¼ */ |
| | | .list-container { |
| | | height: 60vh; |
| | | /* 设置å表容å¨çé«åº¦ä¸ºå©ä½ç©ºé´ï¼å¹¶åå»è¡¨å容å¨çé«åº¦ */ |
| | | overflow-y: auto; |
| | | /* å
许å表容å¨åç´æ»å¨ */ |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿å表å
容æ´ç¾è§ */ |
| | | } |
| | | |
| | | /* å¨å°å±å¹è®¾å¤ä¸ï¼éç½®é«åº¦ä¸ºéåºå±å¹ */ |
| | | @media (max-width: 768px) { |
| | | .list-container { |
| | | height: calc(100vh - 376px); |
| | | /* éå½è°æ´é«åº¦ */ |
| | | } |
| | | } |
| | | |
| | | |
| | | .form-container { |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿è¡¨åå
容æ´ç¾è§ */ |
| | | } |
| | | |
| | | .th { |
| | | background-color: lightskyblue; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | |
| | | .plus-button { |
| | | line-height: 59px; |
| | | font-size: 24px; |
| | | cursor: pointer; |
| | | z-index: 1000; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .overlay { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .popup { |
| | | background-color: #fff; |
| | | padding: 20px; |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | width: 68vw; |
| | | /* 设置宽度为è§å£å®½åº¦ç80% */ |
| | | height: 25vh; |
| | | /* 设置é«åº¦ä¸ºè§å£é«åº¦ç80% */ |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <!-- å·æ°é¡µé¢åçé¡¶é¨æç¤ºæ¡ --> |
| | | <view class="tips" :class="{ 'tips-ani': tipShow }">å·æ°æå</view> |
| | | |
| | | <view class="newsTab"> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="button" |
| | | active-color="#87cefa"></uni-segmented-control> |
| | | <view class="content"> |
| | | <view v-show="current===0"> |
| | | <!-- åºäº uni-list ç页é¢å¸å± --> |
| | | <uni-list> |
| | | <!-- to 屿§æºå¸¦åæ°è·³è½¬è¯¦æ
页é¢ï¼å½ååªä¸ºåè --> |
| | | <uni-list-item style="margin-top: 10px;background-color: #EFEFF4;border-radius: 5px;" |
| | | class="list-item" direction="column" v-for="item in data" :key="item.id" |
| | | :to="'Add?id='+item.id+'&billNo='+item.billNo"> |
| | | <!-- éè¿headerææ§½å®ä¹åè¡¨çæ é¢ --> |
| | | <template v-slot:header> |
| | | <view class="form-group uni-title" style="margin-bottom: 0;"> |
| | | <label class="form-label">æ£éªåå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.billNo"/> |
| | | </view> |
| | | </template> |
| | | <!-- éè¿bodyææ§½å®ä¹å表å
容æ¾ç¤º --> |
| | | <template v-slot:body> |
| | | <view style="margin-top: 0;"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusDate"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">产线:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.line"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">ç©æç¼ç :</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.itemNo"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">产ååç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">è§æ ¼åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">工忰é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建人:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fName"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£éªäºº:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusUser"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£æµç»æ:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.result"/> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | <!-- éè¿ loadMore ç»ä»¶å®ç°ä¸æå è½½ææï¼å¦éèªå®ä¹æ¾ç¤ºå
容ï¼å¯åèï¼https://ext.dcloud.net.cn/plugin?id=29 --> |
| | | <!-- <uni-load-more v-if="loading || options.status === 'noMore' " :status="options.status" /> --> |
| | | |
| | | <!-- <view class="fab" @click="handleFabClick"> |
| | | <text class="fab-icon">+</text> |
| | | </view> --> |
| | | <view class="plus-button" @click="handleFabClick"> |
| | | + |
| | | </view> |
| | | </view> |
| | | <view v-show="current===1"> |
| | | <uni-list> |
| | | <!-- to 屿§æºå¸¦åæ°è·³è½¬è¯¦æ
页é¢ï¼å½ååªä¸ºåè --> |
| | | <uni-list-item style="margin-top: 10px;background-color: #EFEFF4;border-radius: 5px;" |
| | | class="list-item" direction="column" v-for="item in data" :key="item.id" |
| | | :to="'Add?id='+item.id+'&billNo='+item.billNo"> |
| | | <!-- éè¿headerææ§½å®ä¹åè¡¨çæ é¢ --> |
| | | <template v-slot:header> |
| | | <view class="form-group uni-title" style="margin-bottom: 0;"> |
| | | <label class="form-label">æ£éªåå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.billNo"/> |
| | | </view> |
| | | </template> |
| | | <!-- éè¿bodyææ§½å®ä¹å表å
容æ¾ç¤º --> |
| | | <template v-slot:body> |
| | | <view style="margin-top: 0;"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusDate"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">产线:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.line"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">ç©æç¼ç :</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.itemNo"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">产ååç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">è§æ ¼åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">工忰é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建人:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fName"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£éªäºº:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusUser"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£æµç»æ:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.result"/> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | items: ['æªå®æ', '已宿'], |
| | | current: 0, |
| | | data: [], |
| | | tipShow: false // æ¯å¦æ¾ç¤ºé¡¶é¨æç¤ºæ¡ |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | //页é¢å è½½æ¶è°ç¨çäºä»¶ |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | let result = "æªå®æ"; |
| | | if (this.current === 1) { |
| | | result = "已宿"; |
| | | } |
| | | //页é¢å è½½æ¶è°ç¨çäºä»¶ |
| | | this.$post({ |
| | | url: "/SJ/GetPage", |
| | | data: { |
| | | pageIndex: 1, |
| | | limit: 20, |
| | | statusUser: this.$loginInfo.account, |
| | | result: result |
| | | } |
| | | }).then(res => { |
| | | this.data = res.data.tbBillList; |
| | | }) |
| | | }, |
| | | handleFabClick() { |
| | | uni.navigateTo({ |
| | | url: 'Add?id' |
| | | }); |
| | | }, |
| | | onClickItem(index) { |
| | | if (this.current !== index.currentIndex) { |
| | | this.current = index.currentIndex; |
| | | this.init(); |
| | | } |
| | | }, |
| | | }, |
| | | /** |
| | | * 䏿巿°åè°å½æ° |
| | | */ |
| | | onPullDownRefresh() { |
| | | //éæ°æ§è¡ä¸éæ¥è¯¢ |
| | | this.init(); |
| | | this.tipShow = true; |
| | | //å
³éå¨ç» |
| | | uni.stopPullDownRefresh(); |
| | | |
| | | setTimeout(function () { |
| | | this.tipShow = false; |
| | | }, 3000); |
| | | }, |
| | | /** |
| | | * 䏿å è½½åè°å½æ° |
| | | */ |
| | | onReachBottom() { |
| | | this.init(); |
| | | }, |
| | | onShow() { |
| | | //æ¯æ¬¡è¿å
¥é¡µé¢é½ä¼æ§è¡çæ¹æ³ |
| | | this.init(); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .uni-note { |
| | | margin-top: 0; |
| | | } |
| | | |
| | | /* Set the input backgrounds to be gray */ |
| | | .form-input { |
| | | background-color: #f2f2f2; /* Or any other shade of gray you prefer */ |
| | | } |
| | | |
| | | /* Ensure automatic adaptation based on page size */ |
| | | .form-group { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .form-label { |
| | | margin-bottom: 0; |
| | | border-bottom: 1px solid #FFFFFF; |
| | | padding: 5px; |
| | | font-size: 12px; |
| | | width: 60px; |
| | | /* Adjust the font size as per your requirement */ |
| | | } |
| | | |
| | | .form-input { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | border-bottom: 1px solid #c7c7c7; |
| | | padding: 5px; |
| | | font-size: 12px; |
| | | background-color: #FFFFFF; |
| | | /* Adjust the font size as per your requirement */ |
| | | } |
| | | |
| | | .plus-button { |
| | | position: fixed; |
| | | bottom: 20px; |
| | | right: 20px; |
| | | width: 60px; |
| | | height: 60px; |
| | | border-radius: 50%; |
| | | background-color: #007bff; |
| | | color: #ffffff; |
| | | text-align: center; |
| | | line-height: 59px; |
| | | font-size: 24px; |
| | | cursor: pointer; |
| | | z-index: 1000; |
| | | margin-bottom: 35px; |
| | | } |
| | | |
| | | page { |
| | | display: flex; |
| | | flex-direction: column; |
| | | box-sizing: border-box; |
| | | background-color: #efeff4; |
| | | min-height: 100%; |
| | | height: auto; |
| | | } |
| | | |
| | | .tips { |
| | | color: #67c23a; |
| | | font-size: 14px; |
| | | line-height: 40px; |
| | | text-align: center; |
| | | background-color: #f0f9eb; |
| | | height: 0; |
| | | opacity: 0; |
| | | transform: translateY(-100%); |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .tips-ani { |
| | | transform: translateY(0); |
| | | height: 40px; |
| | | opacity: 1; |
| | | } |
| | | |
| | | .content { |
| | | width: 100%; |
| | | } |
| | | |
| | | .list-picture { |
| | | width: 100%; |
| | | height: 145px; |
| | | } |
| | | |
| | | .thumb-image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .ellipsis { |
| | | display: flex; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .uni-ellipsis-1 { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .uni-ellipsis-2 { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <!-- å·æ°é¡µé¢åçé¡¶é¨æç¤ºæ¡ --> |
| | | <view class="tips" :class="{ 'tips-ani': tipShow }">å·æ°æå</view> |
| | | <view class="inspection-app"> |
| | | <view class="filter-section"> |
| | | <view class="filter-controls"> |
| | | |
| | | <view class="newsTab"> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="button" |
| | | active-color="#87cefa"></uni-segmented-control> |
| | | <view class="content"> |
| | | <view v-show="current===0"> |
| | | <!-- åºäº uni-list ç页é¢å¸å± --> |
| | | <uni-list> |
| | | <!-- to 屿§æºå¸¦åæ°è·³è½¬è¯¦æ
页é¢ï¼å½ååªä¸ºåè --> |
| | | <uni-list-item style="margin-top: 10px;background-color: #EFEFF4;border-radius: 5px;" |
| | | class="list-item" direction="column" v-for="item in data" :key="item.id" |
| | | :to="'Add?id='+item.id+'&billNo='+item.billNo"> |
| | | <!-- éè¿headerææ§½å®ä¹åè¡¨çæ é¢ --> |
| | | <template v-slot:header> |
| | | <view class="form-group uni-title" style="margin-bottom: 0;"> |
| | | <label class="form-label">æ£éªåå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.billNo"/> |
| | | </view> |
| | | </template> |
| | | <!-- éè¿bodyææ§½å®ä¹å表å
容æ¾ç¤º --> |
| | | <template v-slot:body> |
| | | <view style="margin-top: 0;"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusDate"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">产线:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.line"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">ç©æç¼ç :</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.itemNo"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">产ååç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">è§æ ¼åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">工忰é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建人:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fName"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£éªäºº:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusUser"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£æµç»æ:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.result"/> |
| | | </view> |
| | | <view class="status-tabs"> |
| | | <button :class="['tab-button', activeTab === 0 ? 'active' : '']" |
| | | @click="switchTab(0)">æªæ£éª</button> |
| | | <button :class="['tab-button', activeTab === 1 ? 'active' : '']" |
| | | @click="switchTab(1)">{{checkedCount}}</button> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | <!-- éè¿ loadMore ç»ä»¶å®ç°ä¸æå è½½ææï¼å¦éèªå®ä¹æ¾ç¤ºå
容ï¼å¯åèï¼https://ext.dcloud.net.cn/plugin?id=29 --> |
| | | <!-- <uni-load-more v-if="loading || options.status === 'noMore' " :status="options.status" /> --> |
| | | |
| | | <!-- <view class="fab" @click="handleFabClick"> |
| | | <text class="fab-icon">+</text> |
| | | </view> --> |
| | | <view class="plus-button" @click="handleFabClick"> |
| | | + |
| | | <!-- æ£éªåå表 --> |
| | | <view class="inspection-list"> |
| | | <!-- æ£éªåå¡ç1 --> |
| | | <view class="inspection-card" v-for="(item, index) in inspectionList" :key="index"> |
| | | <view class="card-header"> |
| | | <text class="badge urgent" v-if="item.urgentFlag == 1">æ¥æ</text> |
| | | <text class="badge urgent" v-if="item.jycs == 1">è¶
æ¶</text> |
| | | <text class="badge normal" v-if="item.ftype == 1">å§å¤</text> |
| | | <text class="badge normal" v-if="item.first == 1">馿¬¡æ¥æ</text> |
| | | <text class="card-title">æ£éªåå·: {{item.billNo}}</text> |
| | | <text class="status pass" v-if="item.result=='åæ ¼' && item.activeTab==1">åæ ¼</text> |
| | | <text class="status Unqualified" v-if="item.result=='ä¸åæ ¼' && item.activeTab==1">ä¸åæ ¼</text> |
| | | </view> |
| | | |
| | | <view class="card-body"> |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | | <text class="info-label">ç©æä¿¡æ¯</text> |
| | | <text class="info-content">{{item.itemNo}} </text> |
| | | </view> |
| | | <view class="info-item"> |
| | | <text class="info-label">产线</text> |
| | | <text class="info-content">{{item.line}}</text> |
| | | </view> |
| | | <view class="info-item"> |
| | | <text class="info-label">工忰é</text> |
| | | <text class="info-content highlight">{{item.daa008}}</text> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | | <text class="info-label">产åä¿¡æ¯</text> |
| | | <text class="info-content">{{item.daa003}} |{{item.daa004}} </text> |
| | | </view> |
| | | </view> |
| | | <view v-show="current===1"> |
| | | <uni-list> |
| | | <!-- to 屿§æºå¸¦åæ°è·³è½¬è¯¦æ
页é¢ï¼å½ååªä¸ºåè --> |
| | | <uni-list-item style="margin-top: 10px;background-color: #EFEFF4;border-radius: 5px;" |
| | | class="list-item" direction="column" v-for="item in data" :key="item.id" |
| | | :to="'Add?id='+item.id+'&billNo='+item.billNo"> |
| | | <!-- éè¿headerææ§½å®ä¹åè¡¨çæ é¢ --> |
| | | <template v-slot:header> |
| | | <view class="form-group uni-title" style="margin-bottom: 0;"> |
| | | <label class="form-label">æ£éªåå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.billNo"/> |
| | | <view class="info-row"> |
| | | <view class="info-item" v-if="item.newFngDesc!=null"> |
| | | <text class="info-label">䏿¬¡ä¸è¯æè¿°</text> |
| | | <text class="info-content">{{item.newFngDesc}}</text> |
| | | </view> |
| | | </template> |
| | | <!-- éè¿bodyææ§½å®ä¹å表å
容æ¾ç¤º --> |
| | | <template v-slot:body> |
| | | <view style="margin-top: 0;"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusDate"/> |
| | | <view class="info-item" v-if="item.fngDesc!=null"> |
| | | <text class="info-label">ä¸è¯æè¿°</text> |
| | | <text class="info-content">{{item.fngDesc}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">产线:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.line"/> |
| | | <view class="meta-info"> |
| | | <text class="meta-item"><uni-icons type="calendar" size="14" color="#95a5a6"></uni-icons> |
| | | {{item.statusDate}}</text> |
| | | <text class="meta-item"><uni-icons type="person" size="14" color="#95a5a6"></uni-icons> |
| | | {{item.statusUser}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">ç©æç¼ç :</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.itemNo"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">产ååç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">è§æ ¼åå·:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-title-sub uni-ellipsis-2"> |
| | | <view class="form-group"> |
| | | <label class="form-label">工忰é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">å建人:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fName"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£éªäºº:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.statusUser"/> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-note" style="color: red"> |
| | | <view class="form-group"> |
| | | <label class="form-label lab">æ£æµç»æ:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.result"/> |
| | | <view class="card-actions"> |
| | | <button v-if="item.activeTab==0" class="primary" @click="startInspection(item)">å¼å§æ£éª</button> |
| | | <button v-if="item.activeTab==1" class="primary" @click="startInspection(item)">æ¥ç</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | items: ['æªå®æ', '已宿'], |
| | | current: 0, |
| | | data: [], |
| | | tipShow: false // æ¯å¦æ¾ç¤ºé¡¶é¨æç¤ºæ¡ |
| | | }; |
| | | projectIndex: 0, |
| | | optionsIndex: 0, |
| | | projects: ['å½å', 'å
¨é¨'], |
| | | activeTab: 0, // 0-æªæ£éª, 1-å·²æ£éª |
| | | uncheckedCount: 0, |
| | | checkedCount: 'å·²æ£éª', |
| | | inspectionList: [], |
| | | pageIndex: 1, |
| | | limit: 20, |
| | | IQCJL: 0, |
| | | options: ['项ç®', 'ç©æç¼å·', 'ç©æåç§°', 'ä¾åºå', 'éè´å'], |
| | | searchValue: '' |
| | | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | //页é¢å è½½æ¶è°ç¨çäºä»¶ |
| | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | let result = "æªå®æ"; |
| | | if (this.current === 1) { |
| | | if (this.activeTab === 1) { |
| | | result = "已宿"; |
| | | } |
| | | |
| | | if (this.isLoading) return; // 妿æ£å¨å è½½åä¸ç»§ç»æ§è¡ |
| | | |
| | | this.isLoading = true; |
| | | |
| | | //è·åå½åç»å½çç¨æ· |
| | | let userName = this.$loginInfo.account; |
| | | |
| | | |
| | | //页é¢å è½½æ¶è°ç¨çäºä»¶ |
| | | this.$post({ |
| | | url: "/SJ/GetPage", |
| | | data: { |
| | | pageIndex: 1, |
| | | pageIndex: this.pageIndex , |
| | | limit: 20, |
| | | statusUser: this.$loginInfo.account, |
| | | result: result |
| | | } |
| | | }).then(res => { |
| | | this.data = res.data.tbBillList; |
| | | }) |
| | | }, |
| | | handleFabClick() { |
| | | uni.navigateTo({ |
| | | url: 'Add?id' |
| | | |
| | | if (this.pageIndex === 1) { |
| | | // 妿æ¯ç¬¬ä¸é¡µï¼ç´æ¥è¦çåæ°æ® |
| | | this.inspectionList = res.data.tbBillList; |
| | | //æ·»å Tabä¿¡æ¯ï¼å¤ææ¯å·²æ£è¿æ¯æªæ£æ°æ® |
| | | this.inspectionList.forEach((item, index) => { |
| | | this.$set(item, 'activeTab', this.activeTab); |
| | | this.$set(item, 'IQCJL', this.IQCJL); |
| | | }); |
| | | } else { |
| | | |
| | | if (res.data.tbBillList.length > 0) { |
| | | // 妿æ¯ä¸ä¸é¡µï¼è¿½å æ°æ°æ® |
| | | this.inspectionList = [...this.inspectionList, ...res.data.tbBillList]; |
| | | //æ·»å Tabä¿¡æ¯ï¼å¤ææ¯å·²æ£è¿æ¯æªæ£æ°æ® |
| | | this.inspectionList.forEach((item, index) => { |
| | | this.$set(item, 'activeTab', this.activeTab); |
| | | this.$set(item, 'IQCJL', this.IQCJL); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | console.log(this.inspectionList) |
| | | this.totalCount = res.data.totalCount; |
| | | this.totalPage = Math.ceil(this.totalCount / this.limit); |
| | | |
| | | this.noData = this.pageIndex >= this.totalPage; |
| | | this.isLoading = false; // ç»æå è½½ |
| | | if (this.activeTab === 1) { |
| | | // this.checkedCount = 'å·²æ£éªï¼' + res.totalCount + 'ï¼'; |
| | | this.checkedCount = 'å·²æ£éª'; |
| | | } else { |
| | | this.uncheckedCount = res.totalCount; |
| | | } |
| | | }).catch(() => { |
| | | this.isLoading = false; // åºç°é误æ¶ç»æå è½½ |
| | | }); |
| | | }, |
| | | onClickItem(index) { |
| | | if (this.current !== index.currentIndex) { |
| | | this.current = index.currentIndex; |
| | | switchTab(index) { |
| | | this.activeTab = index |
| | | // è¿éå¯ä»¥æ·»å 忢æ ç¾é¡µçé»è¾ |
| | | this.inspectionList = []; |
| | | this.init(); |
| | | } |
| | | }, |
| | | //跳转æ£éªå |
| | | startInspection(item) { |
| | | |
| | | if (this.activeTab === 1) { |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '¤t=B' |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '¤t=A' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | /** |
| | | * 䏿巿°åè°å½æ° |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | this.pageIndex = 1; |
| | | //éæ°æ§è¡ä¸éæ¥è¯¢ |
| | | this.init(); |
| | | this.tipShow = true; |
| | | // this.tipShow = true; |
| | | //å
³éå¨ç» |
| | | uni.stopPullDownRefresh(); |
| | | |
| | | setTimeout(function () { |
| | | this.tipShow = false; |
| | | }, 3000); |
| | | // setTimeout(function () { |
| | | // this.tipShow = false; |
| | | // }, 6000); |
| | | |
| | | }, |
| | | /** |
| | | * 䏿å è½½åè°å½æ° |
| | | */ |
| | | onReachBottom() { |
| | | this.init(); |
| | | if (this.noData || this.isLoading) return; |
| | | this.pageIndex++; |
| | | this.init(); // å è½½æ´å¤æ°æ® |
| | | }, |
| | | onShow() { |
| | | //æ¯æ¬¡è¿å
¥é¡µé¢é½ä¼æ§è¡çæ¹æ³ |
| | | // this.pageIndex = 1; |
| | | // this.data = []; |
| | | // //this.current = 0 |
| | | this.init(); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .uni-note { |
| | | margin-top: 0; |
| | | <style scoped> |
| | | /* åºç¡æ ·å¼éç½® */ |
| | | .inspection-app { |
| | | padding: 10px; |
| | | background-color: #f5f7fa; |
| | | min-height: 100vh; |
| | | } |
| | | |
| | | /* Set the input backgrounds to be gray */ |
| | | .form-input { |
| | | background-color: #f2f2f2; /* Or any other shade of gray you prefer */ |
| | | /* é¡¶é¨çéåº */ |
| | | .filter-section { |
| | | margin-bottom: 24px; |
| | | } |
| | | |
| | | /* Ensure automatic adaptation based on page size */ |
| | | .form-group { |
| | | .filter-section h1 { |
| | | font-size: 24px; |
| | | font-weight: 600; |
| | | color: #2c3e50; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | /* æ°å¢æç´¢æ¡æ ·å¼ */ |
| | | .search-container { |
| | | display: flex; |
| | | flex: 1; |
| | | margin: 0 10px; |
| | | height: 36px; |
| | | /* ä¸å
¶ä»æ§ä»¶é«åº¦ä¸è´ */ |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | padding: 8px 12px; |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px 0 0 4px; |
| | | font-size: 14px; |
| | | background-color: white; |
| | | } |
| | | |
| | | .search-button { |
| | | padding: 0 12px; |
| | | border: 1px solid #3498db; |
| | | border-radius: 0 4px 4px 0; |
| | | background-color: #3498db; |
| | | color: white; |
| | | font-size: 14px; |
| | | margin: 0; |
| | | } |
| | | |
| | | /* .filter-controls { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | gap: 16px; |
| | | } |
| | | |
| | | .dropdown-filter { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } */ |
| | | .filter-controls { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .dropdown-filter { |
| | | min-width: 70px; |
| | | } |
| | | |
| | | .filter-label { |
| | | font-size: 14px; |
| | | color: #7f8c8d; |
| | | } |
| | | |
| | | .picker { |
| | | padding: 8px 12px; |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px; |
| | | background-color: white; |
| | | font-size: 14px; |
| | | min-width: 120px; |
| | | } |
| | | |
| | | .status-tabs { |
| | | display: flex; |
| | | border-radius: 4px; |
| | | overflow: hidden; |
| | | background-color: #ecf0f1; |
| | | } |
| | | |
| | | .status-tabs { |
| | | flex: 1; |
| | | min-width: 200px; |
| | | } |
| | | |
| | | .tab-button { |
| | | padding: 0px 16px; |
| | | border: none; |
| | | background: none; |
| | | font-size: 14px; |
| | | transition: all 0.3s; |
| | | margin: 0; |
| | | height: 35px; |
| | | } |
| | | |
| | | .tab-button.active { |
| | | background-color: #3498db; |
| | | color: white; |
| | | } |
| | | |
| | | /* æ£éªåå表 */ |
| | | .inspection-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20px; |
| | | } |
| | | |
| | | /* æ£éªåå¡ç */ |
| | | .inspection-card { |
| | | background-color: white; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); |
| | | overflow: hidden; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .card-header { |
| | | padding: 16px; |
| | | border-bottom: 1px solid #eee; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .form-label { |
| | | margin-bottom: 0; |
| | | border-bottom: 1px solid #FFFFFF; |
| | | padding: 5px; |
| | | font-size: 12px; |
| | | width: 60px; |
| | | /* Adjust the font size as per your requirement */ |
| | | } |
| | | |
| | | .form-input { |
| | | .card-title { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | border-bottom: 1px solid #c7c7c7; |
| | | padding: 5px; |
| | | margin: 0 8px; |
| | | } |
| | | |
| | | .badge { |
| | | font-size: 12px; |
| | | background-color: #FFFFFF; |
| | | /* Adjust the font size as per your requirement */ |
| | | padding: 2px 6px; |
| | | border-radius: 10px; |
| | | margin-right: 8px; |
| | | } |
| | | |
| | | .plus-button { |
| | | position: fixed; |
| | | bottom: 20px; |
| | | right: 20px; |
| | | width: 60px; |
| | | height: 60px; |
| | | border-radius: 50%; |
| | | background-color: #007bff; |
| | | color: #ffffff; |
| | | text-align: center; |
| | | line-height: 59px; |
| | | font-size: 24px; |
| | | cursor: pointer; |
| | | z-index: 1000; |
| | | margin-bottom: 35px; |
| | | .badge.urgent { |
| | | background-color: #e74c3c; |
| | | color: white; |
| | | } |
| | | |
| | | page { |
| | | .badge.normal { |
| | | background-color: #ffaa00; |
| | | color: white; |
| | | } |
| | | |
| | | .status { |
| | | font-size: 12px; |
| | | padding: 4px 8px; |
| | | border-radius: 4px; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .status.pending { |
| | | background-color: #f39c12; |
| | | color: white; |
| | | } |
| | | |
| | | .status.assigned { |
| | | background-color: #3498db; |
| | | color: white; |
| | | } |
| | | |
| | | .status.pass { |
| | | background-color: #00cd00; |
| | | color: white; |
| | | } |
| | | |
| | | .status.Unqualified { |
| | | background-color: #ff0000; |
| | | color: white; |
| | | } |
| | | |
| | | .card-body { |
| | | padding: 16px; |
| | | } |
| | | |
| | | .info-row { |
| | | display: flex; |
| | | flex-direction: column; |
| | | box-sizing: border-box; |
| | | background-color: #efeff4; |
| | | min-height: 100%; |
| | | height: auto; |
| | | margin-bottom: 12px; |
| | | gap: 16px; |
| | | } |
| | | |
| | | .tips { |
| | | color: #67c23a; |
| | | .info-item { |
| | | flex: 1; |
| | | } |
| | | |
| | | .info-label { |
| | | display: block; |
| | | font-size: 12px; |
| | | color: #7f8c8d; |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .info-content { |
| | | font-size: 14px; |
| | | line-height: 40px; |
| | | text-align: center; |
| | | background-color: #f0f9eb; |
| | | height: 0; |
| | | opacity: 0; |
| | | transform: translateY(-100%); |
| | | transition: all 0.3s; |
| | | color: #2c3e50; |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | .tips-ani { |
| | | transform: translateY(0); |
| | | height: 40px; |
| | | opacity: 1; |
| | | .highlight { |
| | | font-weight: 600; |
| | | color: #2c3e50; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .content { |
| | | width: 100%; |
| | | } |
| | | |
| | | .list-picture { |
| | | width: 100%; |
| | | height: 145px; |
| | | } |
| | | |
| | | .thumb-image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .ellipsis { |
| | | .meta-info { |
| | | display: flex; |
| | | overflow: hidden; |
| | | gap: 16px; |
| | | font-size: 12px; |
| | | color: #95a5a6; |
| | | margin-top: 12px; |
| | | } |
| | | |
| | | .uni-ellipsis-1 { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | .meta-item { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 4px; |
| | | } |
| | | |
| | | .uni-ellipsis-2 { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | .card-actions { |
| | | padding: 12px 16px; |
| | | border-top: 1px solid #eee; |
| | | display: flex; |
| | | gap: 8px; |
| | | } |
| | | |
| | | button { |
| | | padding: 8px 16px; |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px; |
| | | background-color: white; |
| | | font-size: 14px; |
| | | transition: all 0.2s; |
| | | flex: 1; |
| | | } |
| | | |
| | | button.primary { |
| | | background-color: #3498db; |
| | | color: white; |
| | | border-color: #2980b9; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (min-width: 768px) { |
| | | .inspection-list { |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); |
| | | } |
| | | |
| | | .info-row { |
| | | flex-direction: row; |
| | | } |
| | | |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (min-width: 300px) { |
| | | .inspection-list { |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); |
| | | } |
| | | |
| | | .info-row { |
| | | flex-direction: row; |
| | | } |
| | | |
| | | .picker { |
| | | padding: 8px 12px; |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px; |
| | | background-color: white; |
| | | font-size: 14px; |
| | | min-width: 10px; |
| | | } |
| | | |
| | | /* .search-container { |
| | | order: 3; |
| | | width: 100%; |
| | | margin: 0px 0 0 0; |
| | | } |
| | | |
| | | .status-tabs { |
| | | order: 4; |
| | | width: 100%; |
| | | } */ |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form-container"> |
| | | <form :modelValue="formData"> |
| | | <view class="form-group"> |
| | | <label class="form-label">项ç®åç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.projName"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">è´¨éè¦æ±:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.itemMod"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ£éªæ¹æ³:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.inspectionMethod"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">使ç¨ä»ªè¡¨:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.usingInstruments"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ£éªæ°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.levelNum"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.minValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ åå¼:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.standardValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.maxValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ´æ°äºº:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.updater"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ´æ°æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.updateTime"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">é¢è§ç»æ:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.result"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.remarks"/> |
| | | </view> |
| | | <view class="form-group edit"> |
| | | <input class="form-input" style="color: red" disabled="true" type="text" |
| | | value="没ææå¤§å¼åæå°å¼æ¶å¡«å0ï¼æªéè¿æ£éªï¼æ1ï¼éè¿æ£éªï¼"/> |
| | | </view> |
| | | <view class="form-group edit"> |
| | | <label class="form-label">æ£æµç»æ:</label> |
| | | <input class="form-input" type="number" v-model="formData.fcheckResu"/> |
| | | </view> |
| | | <button type="primary" v-if="tableData.length < formData.levelNum" @click="submit">ä¿å</button> |
| | | </form> |
| | | </view> |
| | | <view> |
| | | <img v-if="isShowImg" :src="base64Image" style="width:100%" @click="previewImage"/> |
| | | </view> |
| | | <view class="list-container"> |
| | | <uni-table ref="table" border emptyText="ææ æ´å¤æ°æ®"> |
| | | <uni-tr> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">ç¼å·</uni-th> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">å¤å®æ è¯</uni-th> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">æ£éªç»æ</uni-th> |
| | | <uni-th width="150" align="center" style="color: #FFFFFF;background-color: lightskyblue;">ä¿®æ¹</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center"> |
| | | {{ index + 1 }} |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fstand"/> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fcheckResu"/> |
| | | </uni-td> |
| | | <uni-td> |
| | | <view class="uni-group edit"> |
| | | <button type="warn" v-if="isNumber" @click="toDetail(item)">ä¿®æ¹</button> |
| | | <button type="warn" v-if="!isNumber" @click="numberEdit(item)">{{ editResult(item.fcheckResu) }}</button> |
| | | </view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | <view class="container"> |
| | | <!-- å¤´é¨ --> |
| | | <view class="header"> |
| | | <view class="title">馿£æ£éªé¡¹ç®æç»</view> |
| | | <view class="order-number">å½åæ£éªåå·: {{releaseNo}}</view> |
| | | </view> |
| | | |
| | | <view class="plus-button"> |
| | | <button type="warn" @click="saveRemarks">æ·»å ä¸åæ ¼æè¿°</button> |
| | | <!-- æ ç¾æ --> |
| | | <view class="tabs"> |
| | | <view v-for="(tab, index) in tabs" :key="index" class="tab" :class="{active: currentTab === index}" |
| | | @tap="switchTab(index,tab.id)"> |
| | | {{ tab.projName }} |
| | | </view> |
| | | </view> |
| | | <view class="tab-content"> |
| | | <!-- åºæ¬ä¿¡æ¯ --> |
| | | <view class="section"> |
| | | <view class="section-header">åºæ¬ä¿¡æ¯</view> |
| | | <view class="section-body"> |
| | | <view class="info-grid"> |
| | | <view class="info-item"> |
| | | <view class="info-label">项ç®åç§°</view> |
| | | <view class="info-value">{{ formData.projName }}</view> |
| | | </view> |
| | | <view class="info-item"> |
| | | <view class="info-label">使ç¨ä»ªè¡¨</view> |
| | | <view class="info-value">{{ formData.usingInstruments }}</view> |
| | | </view> |
| | | <view class="info-item"> |
| | | <view class="info-label">æ£éªæ°é</view> |
| | | <view class="info-value">{{ formData.levelNum }}</view> |
| | | </view> |
| | | |
| | | <view v-if="formData.minValue!=null" class="info-item"> |
| | | <view class="info-label">ä¸é</view> |
| | | <view class="info-value">{{ formData.minValue }}</view> |
| | | </view> |
| | | <view v-if="formData.standardValue!=null" class="info-item"> |
| | | <view class="info-label">æ åå¼</view> |
| | | <view class="info-value">{{ formData.standardValue }}</view> |
| | | </view> |
| | | <view v-if="formData.maxValue!=null" class="info-item"> |
| | | <view class="info-label">ä¸é</view> |
| | | <view class="info-value">{{ formData.maxValue }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- è§æ ¼è¦æ± --> |
| | | <view class="section"> |
| | | <view class="section-header">è´¨éè¦æ±</view> |
| | | <view class="section-body"> |
| | | <text class="spec-text">{{ formData.itemMod }}</text> |
| | | </view> |
| | | </view> |
| | | <!-- è§æ ¼è¦æ± --> |
| | | <view class="section"> |
| | | <view class="section-header">æ£éªæè¿°</view> |
| | | <view class="section-body"> |
| | | <text class="spec-text">{{ formData.inspectionMethod }}</text> |
| | | </view> |
| | | </view> |
| | | <!-- æ£éªç»æ --> |
| | | <view class="section"> |
| | | <view class="section-header">æ£éªç»æ</view> |
| | | <view class="section-body"> |
| | | <view v-if="formData.result!=null" class="result-preview"> |
| | | <view class="info-label">é¢è§ç»æ</view> |
| | | <view class="info-value"><b>{{formData.result}}</b></view> |
| | | </view> |
| | | |
| | | <view v-if="formData.remarks!=null" class="result-ng"> |
| | | <view class="info-label">ä¸è¯æè¿°</view> |
| | | <view class="info-value danger">{{formData.remarks}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- ç»æå½å
¥ --> |
| | | <view class="section"> |
| | | <view class="section-header">æ£éªç»æå½å
¥</view> |
| | | <view class="section-body"> |
| | | <view class="input-group input1"> |
| | | <view class="input-wrapper"> |
| | | |
| | | <button class="btn upload-btn" @tap="chooseImage"> |
| | | <uni-icons type="upload" size="16" color="#fff"></uni-icons> |
| | | ä¸ä¼ /æ¥çå¾ç |
| | | </button> |
| | | <button v-if="this.current" class="btn upload-btn" @tap="upRemarks"> |
| | | <uni-icons type="compose" size="16" color="#fff"></uni-icons> |
| | | ä¸è¯æè¿° |
| | | </button> |
| | | <input v-if="(tableData.length < formData.levelNum)" @input="search($event)" |
| | | v-model="inputTxt" type="text" class="result-input" placeholder="请è¾å
¥æ£éªç»æ..." |
| | | placeholder-class="placeholder" /> |
| | | <button v-if="(tableData.length < formData.levelNum)" |
| | | style="margin: 0px;background-color: #3498db;color:#ffffff ;" class="btn primary-btn" |
| | | @tap="saveResult">ä¿åç»æ</button> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="input-group input2"> |
| | | <view class="input-wrapper"> |
| | | |
| | | <button class="btn upload-btn" @tap="chooseImage"> |
| | | <uni-icons type="upload" size="16" color="#fff"></uni-icons> |
| | | ä¸ä¼ /æ¥çå¾ç |
| | | </button> |
| | | <button v-if="this.current" class="btn upload-btn" @tap="upRemarks"> |
| | | <uni-icons type="compose" size="16" color="#fff"></uni-icons> |
| | | ä¸è¯æè¿° |
| | | </button> |
| | | </view> |
| | | <view class="input-wrapper" style="margin-top: 15px;"> |
| | | |
| | | <input v-if="(tableData.length < formData.checkQyt)" @input="search($event)" |
| | | v-model="inputTxt" type="text" class="result-input" placeholder="请è¾å
¥æ£éªç»æ..." |
| | | placeholder-class="placeholder" /> |
| | | <button v-if="(tableData.length < formData.checkQyt)" |
| | | style="margin: 0px;background-color: #3498db;color:#ffffff ;" class="btn primary-btn" |
| | | @tap="saveResult">ä¿åç»æ</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- ç»æè¡¨æ ¼ --> |
| | | <view v-if="tableData.length>0" class="table-container"> |
| | | <view class="table-header"> |
| | | <view class="th">ç¼å·</view> |
| | | <view class="th">æ£éªç»æ<i style="color: rgb(0 212 68);" |
| | | v-if="!(tableData.length < formData.levelNum)">ï¼è¾å
¥å·²å®æï¼</i></view> |
| | | <view class="th" v-if="current">æä½</view> |
| | | </view> |
| | | |
| | | <view v-for="(item, index) in tableData" :key="index" class="table-row"> |
| | | <view class="td">{{ index + 1 }}</view> |
| | | <view v-if="!isNumber" class="td"> |
| | | <view :class="['result-badge', 'OK']" v-if="item.fcheckResu==1"> |
| | | OK |
| | | </view> |
| | | <view :class="['result-badge', 'NG']" v-if="item.fcheckResu==0"> |
| | | NG |
| | | </view> |
| | | </view> |
| | | <view v-if="isNumber" class="td"> |
| | | <view :class="['result-badge', item.fcheckResu]"> |
| | | {{ item.fcheckResu }} |
| | | </view> |
| | | </view> |
| | | <view class="td" v-if="current"> |
| | | <button v-if="!isNumber" class="btn danger-btn" @tap="toggleResult(item)"> |
| | | {{ editResult(item.fcheckResu) }} |
| | | </button> |
| | | <button v-if="isNumber" class="btn danger-btn" @tap="toDetail(item)"> |
| | | ä¿®æ¹ |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-if="remarksPopup" class="overlay"> |
| | | <view class="popup"> |
| | | <h3>ä¿®æ¹ä¸åæ ¼æè¿°</h3> |
| | |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" type="text" v-model="remarks"/> |
| | | </view> |
| | | <button type="warn" @click="editRemarks">ä¿®æ¹</button> |
| | | <button class="updateBut" type="warn" @click="editRemarks">ä¿®æ¹</button> |
| | | <button @click="remarksPopup = !remarksPopup">åæ¶</button> |
| | | </form> |
| | | </view> |
| | | </view> |
| | | |
| | | <view v-if="showPopup" class="overlay"> |
| | | <view class="popup"> |
| | | <h3>ä¿®æ¹æ£éªç»æ</h3> |
| | |
| | | </form> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | compile |
| | | } from "vue"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | formData: {}, |
| | | tableData: {}, |
| | | mainId: '', |
| | | isNumber: false, |
| | | checkItem: "", |
| | | id: 0, |
| | | gid: 0, |
| | | billNo: "", |
| | | currentTab: 0, |
| | | tabs: [], |
| | | inputResult: '', |
| | | remarksPopup: false, |
| | | showPopup: false, |
| | | editData: {}, |
| | | tableData: [], |
| | | base64Image: "", |
| | | isShowImg: false, |
| | | remarks: "", |
| | | remarksPopup: false, |
| | | inputTxt: '', |
| | | formID: '', |
| | | releaseNo: '', |
| | | current: false |
| | | } |
| | | }, |
| | | methods: { |
| | | switchTab(index, mainIds) { |
| | | this.currentTab = index |
| | | this.mainId = mainIds; |
| | | this.refreshResult(); |
| | | }, |
| | | //æ£æµè¾å
¥æ¡çè¾å
¥ï¼å¹¶ç»åéèµå¼ |
| | | search(event) { |
| | | this.formData.fcheckResu = event.detail.value; |
| | | }, |
| | | toggleResult(item) { |
| | | let fstand = "â"; |
| | | let fcheckResu = 1; |
| | | |
| | | previewImage() { |
| | | uni.previewImage({ |
| | | urls: [this.base64Image], |
| | | if (item.fcheckResu == '1') { |
| | | fstand = "Ã"; |
| | | fcheckResu = 0; |
| | | } |
| | | |
| | | this.$post({ |
| | | url: "/SJ/UpdateQSItemDetail", |
| | | data: { |
| | | id: item.id, |
| | | pid: item.pid, |
| | | gid: item.gid, |
| | | fstand: fstand, |
| | | fcheckResu: fcheckResu, |
| | | updateBy: this.$loginInfo.account, |
| | | } |
| | | }).then(res => { |
| | | this.$showMessage("ä¿®æ¹æå"); |
| | | this.refreshResult(); //å·æ°é¡µé¢ |
| | | }) |
| | | }, |
| | | chooseImage() { |
| | | uni.navigateTo({ |
| | | url: 'ImageItem?id=' + this.formData.id |
| | | }); |
| | | }, |
| | | editResult(fcheckResu) { |
| | | if (fcheckResu == '1') { |
| | | return "æ¹ä¸ºä¸åæ ¼"; |
| | | } else { |
| | | return "æ¹ä¸ºåæ ¼"; |
| | | } |
| | | upRemarks() { |
| | | this.remarksPopup = true; |
| | | }, |
| | | submit() { |
| | | |
| | | saveResult() { |
| | | let count = this.formData.levelNum; |
| | | let fstand = "â"; |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (this.formData.fcheckResu >= this.formData.minValue && this.formData.fcheckResu <= this.formData.maxValue) { |
| | | if (this.formData.fcheckResu >= this.formData.minValue && this.formData.fcheckResu <= this.formData |
| | | .maxValue) { |
| | | fstand = "â" |
| | | } else { |
| | | fstand = "Ã"; |
| | |
| | | this.$post({ |
| | | url: "/SJ/SetQSItemDetail", |
| | | data: { |
| | | pid: this.id, |
| | | gid: this.gid, |
| | | pid: this.mainId, |
| | | gid: this.formID, |
| | | fstand: fstand, |
| | | fcheckResu: this.formData.fcheckResu, |
| | | updateBy: this.formData.updater, |
| | |
| | | this.refreshResult(); |
| | | }) |
| | | |
| | | |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | //è·åæ£éªå详æ
|
| | | refreshResult() { |
| | | this.$post({ |
| | | url: "/SJ/getQSItems", |
| | | data: { |
| | | id: this.id |
| | | id: this.mainId |
| | | } |
| | | }).then(res => { |
| | | this.formData = res.data.tbBillList[0]; |
| | | this.formData.billNo = this.billNo; |
| | | if (this.formData.imageData) { |
| | | this.isShowImg = true; |
| | | this.base64Image = 'data:image/jpeg;base64,' + this.formData.imageData; |
| | | } |
| | | if (this.formData.maxValue && this.formData.minValue && this.formData.standardValue) { |
| | | this.isNumber = true; |
| | | } |
| | | }) |
| | | |
| | | this.formData = res.data.tbBillList[0]; |
| | | this.$post({ |
| | | url: "/SJ/getQSItemDetail", |
| | | data: { |
| | | pid: this.id, |
| | | gid: this.gid |
| | | pid: this.mainId, |
| | | gid: this.formID |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList; |
| | | }) |
| | | // this.tableData = res.data.tbBillList.itemXj02s; |
| | | |
| | | if (this.formData.imageData) { |
| | | this.isShowImg = true; |
| | | this.base64Image = 'data:image/jpeg;base64,' + this.formData.imageData; |
| | | } |
| | | |
| | | //fupAllow fdownAllow standardValue |
| | | if (this.formData.maxValue && this.formData.minValue && this.formData.standardValue) { |
| | | this.isNumber = true; |
| | | } else { |
| | | this.isNumber = false; |
| | | } |
| | | }) |
| | | }, |
| | | editResult(fcheckResu) { |
| | | if (fcheckResu == '1') { |
| | | return "æ¹ä¸ºä¸åæ ¼"; |
| | | } else { |
| | | return "æ¹ä¸ºåæ ¼"; |
| | | } |
| | | }, |
| | | toDetail(item) { |
| | | this.showPopup = !this.showPopup; |
| | | this.editData = item; |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks) { |
| | | //saveRemarksGid |
| | | this.$post({ |
| | | url: "/SJ/saveRemarksPid", |
| | | data: { |
| | | pid: this.formData.id, |
| | | remarks: this.remarks |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.formData.remarks = this.remarks; |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.$showMessage("ä¿åæå"); |
| | | } |
| | | }) |
| | | } else { |
| | | this.$post({ |
| | | url: "/SJ/saveRemarksPid", |
| | | data: { |
| | | pid: this.formData.id, |
| | | remarks: '' |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.formData.remarks = this.remarks; |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.$showMessage("ä¿åæå"); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | eidt() { |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (this.editData.fcheckResu >= this.formData.minValue && this.editData.fcheckResu <= this.formData.maxValue) { |
| | | if (parseFloat(this.editData.fcheckResu) >= parseFloat(this.formData.fdownAllow) && parseFloat(this |
| | | .editData |
| | | .fcheckResu) <= parseFloat(this.formData.fupAllow)) { |
| | | this.editData.isPass = 1 |
| | | } else { |
| | | this.editData.isPass = 0 |
| | |
| | | url: "/SJ/UpdateQSItemDetail", |
| | | data: { |
| | | id: this.editData.id, |
| | | pid: this.id, |
| | | gid: this.gid, |
| | | pid: this.mainId, |
| | | gid: this.formID, |
| | | fstand: fstand, |
| | | fcheckResu: this.editData.fcheckResu, |
| | | updateBy: this.editData.updater, |
| | |
| | | this.refreshResult();//å·æ°é¡µé¢ |
| | | }) |
| | | }, |
| | | numberEdit(item) { |
| | | |
| | | let fstand = "â"; |
| | | let fcheckResu = 1; |
| | | |
| | | if (item.fcheckResu == '1') { |
| | | fstand = "Ã"; |
| | | fcheckResu = 0; |
| | | } |
| | | |
| | | this.$post({ |
| | | url: "/SJ/UpdateQSItemDetail", |
| | | data: { |
| | | id: item.id, |
| | | pid: item.pid, |
| | | gid: item.gid, |
| | | fstand: fstand, |
| | | fcheckResu: fcheckResu, |
| | | updateBy: this.$loginInfo.account, |
| | | } |
| | | }).then(res => { |
| | | this.$showMessage("ä¿®æ¹æå"); |
| | | this.refreshResult(); //å·æ°é¡µé¢ |
| | | }) |
| | | }, |
| | | saveRemarks() { |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.remarks = this.formData.remarks; |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks) { |
| | | //saveRemarksGid |
| | | this.$post({ |
| | | url: "/SJ/saveRemarksPid", |
| | | data: { |
| | | pid: this.formData.id, |
| | | remarks: this.remarks |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.formData.remarks = this.remarks; |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.$showMessage("ä¿åæå"); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | let params = options; |
| | | |
| | | this.id = params["id"]; |
| | | this.billNo = params["billNo"]; |
| | | this.gid = params["gid"]; |
| | | |
| | | this.mainId = params["mainId"]; |
| | | this.refreshResult(); |
| | | this.formID = params["formID"]; |
| | | this.releaseNo = params["releaseNo"]; |
| | | this.currentTab = parseInt(params["index"]); |
| | | this.current = params["current"] === 'true' ? true : false; |
| | | this.$post({ |
| | | url: "/SJ/getQSItems", |
| | | data: { |
| | | pid: this.formID |
| | | } |
| | | }).then(res1 => { |
| | | let tableData = res1.data.tbBillList |
| | | //å½å·²æ£éªä¸ªæ°é½ä¸ä¸ºç©ºæ¶æç
§æ£æµç»ææåº |
| | | tableData.sort((a, b) => { |
| | | if (a.result === 'æªå®æ' && b.result === 'åæ ¼') { |
| | | return -1; |
| | | } else if (a.result === 'åæ ¼' && b.result === 'æªå®æ') { |
| | | return 1; |
| | | } else { |
| | | return 0; |
| | | } |
| | | }); |
| | | this.tabs = tableData; |
| | | // if (this.tableData.length === 0) { |
| | | // this.isShowTable = true; |
| | | // } |
| | | this.tableData.forEach((item, index) => { |
| | | this.set(item, 'current', this.current); |
| | | }); |
| | | console.log(this.tableData); |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="scss"> |
| | | $primary-color: #409EFF; |
| | | $success-color: #67C23A; |
| | | $danger-color: #F56C6C; |
| | | $border-color: #DCDFE6; |
| | | $bg-color: #f5f7fa; |
| | | |
| | | .form-group { |
| | | .container { |
| | | padding: 20px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .header { |
| | | padding: 20px; |
| | | border-bottom: 1px solid $border-color; |
| | | background: linear-gradient(90deg, #f0f7ff, #e1f0ff); |
| | | |
| | | .title { |
| | | font-size: 24px; |
| | | color: #333; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .order-number { |
| | | color: #666; |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | |
| | | .tabs { |
| | | display: flex; |
| | | background-color: $bg-color; |
| | | border-bottom: 1px solid $border-color; |
| | | |
| | | .tab { |
| | | flex: 1; |
| | | text-align: center; |
| | | padding: 12px 0; |
| | | border-right: 1px solid $border-color; |
| | | color: #666; |
| | | transition: all 0.3s; |
| | | |
| | | &:last-child { |
| | | border-right: none; |
| | | } |
| | | |
| | | &.active { |
| | | background-color: #fff; |
| | | color: $primary-color; |
| | | font-weight: bold; |
| | | position: relative; |
| | | |
| | | &::after { |
| | | content: ''; |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | height: 2px; |
| | | background-color: $primary-color; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .section { |
| | | margin: 20px 0; |
| | | border: 1px solid $border-color; |
| | | border-radius: 4px; |
| | | |
| | | &-header { |
| | | padding: 12px 16px; |
| | | background-color: $bg-color; |
| | | border-bottom: 1px solid $border-color; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | &-body { |
| | | padding: 16px; |
| | | } |
| | | } |
| | | |
| | | .info-grid { |
| | | display: grid; |
| | | grid-template-columns: repeat(3, 1fr); |
| | | gap: 16px; |
| | | |
| | | .info-item { |
| | | margin-bottom: 12px; |
| | | |
| | | .info-label { |
| | | color: #909399; |
| | | font-size: 14px; |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .info-value { |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .input-group { |
| | | margin: 16px 0; |
| | | |
| | | .input-wrapper { |
| | | display: flex; |
| | | gap: 12px; |
| | | |
| | | .result-input { |
| | | flex: 1; |
| | | height: 45px; |
| | | padding: 0 12px; |
| | | border: 1px solid $border-color; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .upload-btn { |
| | | background-color: #909399; |
| | | color: #fff; |
| | | padding: 0 10px; |
| | | margin: 0; |
| | | //height: 40rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .table-container { |
| | | border: 1px solid $border-color; |
| | | border-radius: 4px; |
| | | margin-top: 20px; |
| | | |
| | | .table-header { |
| | | display: flex; |
| | | background-color: $bg-color; |
| | | border-bottom: 1px solid $border-color; |
| | | |
| | | .th { |
| | | flex: 1; |
| | | padding: 12px; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .table-row { |
| | | display: flex; |
| | | border-bottom: 1px solid $border-color; |
| | | padding: 12px; |
| | | |
| | | &:last-child { |
| | | border-bottom: none; |
| | | } |
| | | |
| | | .td { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #c9c9c9; |
| | | background-color: #d4d4d4; |
| | | } |
| | | |
| | | .form-label { |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | } |
| | | |
| | | .form-input { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | } |
| | | |
| | | /* é»è®¤æ ·å¼ */ |
| | | .list-container { |
| | | height: calc(100vh - 750px); |
| | | /* 设置å表容å¨çé«åº¦ä¸ºå©ä½ç©ºé´ï¼å¹¶åå»è¡¨å容å¨çé«åº¦ */ |
| | | overflow-y: auto; |
| | | /* å
许å表容å¨åç´æ»å¨ */ |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿å表å
容æ´ç¾è§ */ |
| | | } |
| | | |
| | | /* å¨å°å±å¹è®¾å¤ä¸ï¼éç½®é«åº¦ä¸ºéåºå±å¹ */ |
| | | @media (max-width: 768px) { |
| | | .list-container { |
| | | height: calc(100vh - 485px); |
| | | /* éå½è°æ´é«åº¦ */ |
| | | } |
| | | } |
| | | |
| | | .form-container { |
| | | /* 设置表å容å¨çé«åº¦ï¼ä½¿å
¶å¯ä»¥æ»å¨ */ |
| | | overflow-y: auto; |
| | | /* å
许表å容å¨åç´æ»å¨ */ |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿è¡¨åå
容æ´ç¾è§ */ |
| | | .result-badge { |
| | | display: inline-block; |
| | | padding: 4px 8px; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | font-weight: bold; |
| | | |
| | | &.OK { |
| | | background-color: rgba($success-color, 0.1); |
| | | color: $success-color; |
| | | } |
| | | |
| | | &.NG { |
| | | background-color: rgba($danger-color, 0.1); |
| | | color: $danger-color; |
| | | } |
| | | } |
| | | |
| | | .action-buttons { |
| | | margin-top: 20px; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | gap: 12px; |
| | | |
| | | .btn { |
| | | padding: 8px 20px; |
| | | border-radius: 4px; |
| | | |
| | | &.primary-btn { |
| | | background-color: $primary-color; |
| | | color: #fff; |
| | | |
| | | } |
| | | |
| | | &.cancel-btn { |
| | | background-color: #909399; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .danger { |
| | | color: $danger-color; |
| | | } |
| | | |
| | | .overlay { |
| | |
| | | padding: 20px; |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | width: 68vw; /* 设置宽度为è§å£å®½åº¦ç80% */ |
| | | height: 25vh; /* 设置é«åº¦ä¸ºè§å£é«åº¦ç80% */ |
| | | width: 68vw; |
| | | /* 设置宽度为è§å£å®½åº¦ç80% */ |
| | | height: 25vh; |
| | | /* 设置é«åº¦ä¸ºè§å£é«åº¦ç80% */ |
| | | } |
| | | |
| | | .edit { |
| | | background-color: white; |
| | | .updateBut { |
| | | background-color: #3498db; |
| | | color: white; |
| | | } |
| | | |
| | | .input1 { |
| | | display: block; |
| | | } |
| | | |
| | | .input2 { |
| | | display: none; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (max-width: 500px) { |
| | | .input1 { |
| | | display: none; |
| | | } |
| | | |
| | | .input2 { |
| | | display: block; |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form-container"> |
| | | <form :modelValue="formData"> |
| | | <view class="form-group"> |
| | | <label class="form-label">项ç®åç§°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.projName"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">è´¨éè¦æ±:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.itemMod"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ£éªæ¹æ³:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.inspectionMethod"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">使ç¨ä»ªè¡¨:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.usingInstruments"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ£éªæ°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.levelNum"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.minValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ åå¼:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.standardValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸é:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.maxValue"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ´æ°äºº:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.updater"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ´æ°æ¶é´:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.updateTime"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">é¢è§ç»æ:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.result"/> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" disabled="true" type="text" v-model="formData.remarks"/> |
| | | </view> |
| | | <view class="form-group edit"> |
| | | <input class="form-input" style="color: red" disabled="true" type="text" |
| | | value="没ææå¤§å¼åæå°å¼æ¶å¡«å0ï¼æªéè¿æ£éªï¼æ1ï¼éè¿æ£éªï¼"/> |
| | | </view> |
| | | <view class="form-group edit"> |
| | | <label class="form-label">æ£æµç»æ:</label> |
| | | <input class="form-input" type="number" v-model="formData.fcheckResu"/> |
| | | </view> |
| | | <button type="primary" v-if="tableData.length < formData.levelNum" @click="submit">ä¿å</button> |
| | | </form> |
| | | </view> |
| | | <view> |
| | | <img v-if="isShowImg" :src="base64Image" style="width:100%" @click="previewImage"/> |
| | | </view> |
| | | <view class="list-container"> |
| | | <uni-table ref="table" border emptyText="ææ æ´å¤æ°æ®"> |
| | | <uni-tr> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">ç¼å·</uni-th> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">å¤å®æ è¯</uni-th> |
| | | <uni-th align="center" style="color: #FFFFFF;background-color: lightskyblue;">æ£éªç»æ</uni-th> |
| | | <uni-th width="150" align="center" style="color: #FFFFFF;background-color: lightskyblue;">ä¿®æ¹</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center"> |
| | | {{ index + 1 }} |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fstand"/> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.fcheckResu"/> |
| | | </uni-td> |
| | | <uni-td> |
| | | <view class="uni-group edit"> |
| | | <button type="warn" v-if="isNumber" @click="toDetail(item)">ä¿®æ¹</button> |
| | | <button type="warn" v-if="!isNumber" @click="numberEdit(item)">{{ editResult(item.fcheckResu) }}</button> |
| | | </view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | |
| | | <view class="plus-button"> |
| | | <button type="warn" @click="saveRemarks">æ·»å ä¸åæ ¼æè¿°</button> |
| | | </view> |
| | | |
| | | <view v-if="remarksPopup" class="overlay"> |
| | | <view class="popup"> |
| | | <h3>ä¿®æ¹ä¸åæ ¼æè¿°</h3> |
| | | <form> |
| | | <view class="form-group"> |
| | | <label class="form-label">ä¸åæ ¼æè¿°:</label> |
| | | <input class="form-input" type="text" v-model="remarks"/> |
| | | </view> |
| | | <button type="warn" @click="editRemarks">ä¿®æ¹</button> |
| | | <button @click="remarksPopup = !remarksPopup">åæ¶</button> |
| | | </form> |
| | | </view> |
| | | </view> |
| | | |
| | | <view v-if="showPopup" class="overlay"> |
| | | <view class="popup"> |
| | | <h3>ä¿®æ¹æ£éªç»æ</h3> |
| | | <form :modelValue="editData"> |
| | | <view class="form-group"> |
| | | <label class="form-label">æ£éªç»æ:</label> |
| | | <input class="form-input" type="text" v-model="editData.fcheckResu"/> |
| | | </view> |
| | | <button type="warn" @click="eidt">ä¿®æ¹</button> |
| | | <button @click="showPopup = !showPopup">åæ¶</button> |
| | | </form> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | formData: {}, |
| | | isNumber: false, |
| | | checkItem: "", |
| | | id: 0, |
| | | gid: 0, |
| | | billNo: "", |
| | | showPopup: false, |
| | | editData: {}, |
| | | tableData: [], |
| | | base64Image: "", |
| | | isShowImg: false, |
| | | remarks: "", |
| | | remarksPopup: false, |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | previewImage() { |
| | | uni.previewImage({ |
| | | urls: [this.base64Image], |
| | | }); |
| | | }, |
| | | editResult(fcheckResu) { |
| | | if (fcheckResu == '1') { |
| | | return "æ¹ä¸ºä¸åæ ¼"; |
| | | } else { |
| | | return "æ¹ä¸ºåæ ¼"; |
| | | } |
| | | }, |
| | | submit() { |
| | | |
| | | let count = this.formData.levelNum; |
| | | let fstand = "â"; |
| | | |
| | | //ææå¤§å¼åæå°å¼å°±æ ¹æ®æ¯å¦ç¬¦åæ å弿´æ°å¤å®ç»æï¼æ²¡ææå¤§å¼åæå°å¼å°±æ ¹æ®æ¯å¦éè¿æ£éªå¤å®ç»æ |
| | | if (this.formData.maxValue && this.formData.minValue) { |
| | | |
| | | if (!this.formData.fcheckResu) { |
| | | this.$showMessage("请è¾å
¥æ£éªå¼"); |
| | | return; |
| | | } |
| | | |
| | | if (this.formData.fcheckResu >= this.formData.minValue && this.formData.fcheckResu <= this.formData.maxValue) { |
| | | fstand = "â" |
| | | } else { |
| | | fstand = "Ã"; |
| | | } |
| | | count = 1; |
| | | } else { |
| | | |
| | | if (!this.formData.fcheckResu) { |
| | | this.formData.fcheckResu = 1 |
| | | } |
| | | |
| | | if (this.formData.fcheckResu == 0 || this.formData.fcheckResu == 1) { |
| | | this.formData.isPass = this.formData.fcheckResu |
| | | } else { |
| | | this.$showMessage("æ æ å弿¶ï¼æ£éªç»æåªè½ä¸º0æ1!"); |
| | | return; |
| | | } |
| | | count = count - this.tableData.length; |
| | | } |
| | | |
| | | this.formData.updater = this.$loginInfo.account; |
| | | |
| | | this.$post({ |
| | | url: "/SJ/SetQSItemDetail", |
| | | data: { |
| | | pid: this.id, |
| | | gid: this.gid, |
| | | fstand: fstand, |
| | | fcheckResu: this.formData.fcheckResu, |
| | | updateBy: this.formData.updater, |
| | | count: count |
| | | } |
| | | }).then(res => { |
| | | this.formData.fcheckResu = null; |
| | | this.$showMessage("ä¿åæå"); |
| | | this.refreshResult(); |
| | | }) |
| | | |
| | | }, |
| | | refreshResult() { |
| | | this.$post({ |
| | | url: "/SJ/getQSItems", |
| | | data: { |
| | | id: this.id |
| | | } |
| | | }).then(res => { |
| | | this.formData = res.data.tbBillList[0]; |
| | | this.formData.billNo = this.billNo; |
| | | if (this.formData.imageData) { |
| | | this.isShowImg = true; |
| | | this.base64Image = 'data:image/jpeg;base64,' + this.formData.imageData; |
| | | } |
| | | if (this.formData.maxValue && this.formData.minValue && this.formData.standardValue) { |
| | | this.isNumber = true; |
| | | } |
| | | }) |
| | | |
| | | this.$post({ |
| | | url: "/SJ/getQSItemDetail", |
| | | data: { |
| | | pid: this.id, |
| | | gid: this.gid |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data.tbBillList; |
| | | }) |
| | | }, |
| | | toDetail(item) { |
| | | this.showPopup = !this.showPopup; |
| | | this.editData = item; |
| | | }, |
| | | eidt() { |
| | | |
| | | if (!this.editData.fcheckResu) { |
| | | this.$showMessage("请è¾å
¥æ£éªç»æ"); |
| | | } |
| | | |
| | | if (this.formData.fcheckResu == this.editData.fcheckResu) { |
| | | this.$showMessage("ä¿®æ¹æå"); |
| | | return; |
| | | } |
| | | |
| | | let fstand = "â"; |
| | | |
| | | if (this.formData.maxValue && this.formData.minValue) { |
| | | |
| | | if (!this.editData.fcheckResu) { |
| | | this.$showMessage("请è¾å
¥æ£éªå¼"); |
| | | return; |
| | | } |
| | | |
| | | if (this.editData.fcheckResu >= this.formData.minValue && this.editData.fcheckResu <= this.formData.maxValue) { |
| | | this.editData.isPass = 1 |
| | | } else { |
| | | this.editData.isPass = 0 |
| | | fstand = "Ã"; |
| | | } |
| | | } else { |
| | | |
| | | if (!this.editData.fcheckResu) { |
| | | this.editData.fcheckResu = 1 |
| | | } |
| | | |
| | | if (this.editData.fcheckResu == 0 || this.editData.fcheckResu == 1) { |
| | | if (this.editData.fcheckResu == 0) { |
| | | fstand = "Ã"; |
| | | } |
| | | } else { |
| | | this.$showMessage("æ æ å弿¶ï¼æ£éªç»æåªè½ä¸º0æ1!"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | this.editData.updater = this.$loginInfo.account; |
| | | |
| | | this.$post({ |
| | | url: "/SJ/UpdateQSItemDetail", |
| | | data: { |
| | | id: this.editData.id, |
| | | pid: this.id, |
| | | gid: this.gid, |
| | | fstand: fstand, |
| | | fcheckResu: this.editData.fcheckResu, |
| | | updateBy: this.editData.updater, |
| | | } |
| | | }).then(res => { |
| | | this.showPopup = !this.showPopup; |
| | | this.$showMessage("ä¿®æ¹æå"); |
| | | this.refreshResult();//å·æ°é¡µé¢ |
| | | }) |
| | | }, |
| | | numberEdit(item) { |
| | | |
| | | let fstand = "â"; |
| | | let fcheckResu = 1; |
| | | |
| | | if (item.fcheckResu == '1') { |
| | | fstand = "Ã"; |
| | | fcheckResu = 0; |
| | | } |
| | | |
| | | this.$post({ |
| | | url: "/SJ/UpdateQSItemDetail", |
| | | data: { |
| | | id: item.id, |
| | | pid: item.pid, |
| | | gid: item.gid, |
| | | fstand: fstand, |
| | | fcheckResu: fcheckResu, |
| | | updateBy: this.$loginInfo.account, |
| | | } |
| | | }).then(res => { |
| | | this.$showMessage("ä¿®æ¹æå"); |
| | | this.refreshResult(); //å·æ°é¡µé¢ |
| | | }) |
| | | }, |
| | | saveRemarks() { |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.remarks = this.formData.remarks; |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks) { |
| | | //saveRemarksGid |
| | | this.$post({ |
| | | url: "/SJ/saveRemarksPid", |
| | | data: { |
| | | pid: this.formData.id, |
| | | remarks: this.remarks |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.formData.remarks = this.remarks; |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.$showMessage("ä¿åæå"); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | //optionsä¸å
å«äºurlé带çåæ° |
| | | let params = options; |
| | | |
| | | this.id = params["id"]; |
| | | this.billNo = params["billNo"]; |
| | | this.gid = params["gid"]; |
| | | |
| | | this.refreshResult(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | .form-group { |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #c9c9c9; |
| | | background-color: #d4d4d4; |
| | | } |
| | | |
| | | .form-label { |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | } |
| | | |
| | | .form-input { |
| | | flex: 1; |
| | | margin-bottom: 0; |
| | | padding: 5px; |
| | | } |
| | | |
| | | /* é»è®¤æ ·å¼ */ |
| | | .list-container { |
| | | height: calc(100vh - 750px); |
| | | /* 设置å表容å¨çé«åº¦ä¸ºå©ä½ç©ºé´ï¼å¹¶åå»è¡¨å容å¨çé«åº¦ */ |
| | | overflow-y: auto; |
| | | /* å
许å表容å¨åç´æ»å¨ */ |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿å表å
容æ´ç¾è§ */ |
| | | } |
| | | |
| | | /* å¨å°å±å¹è®¾å¤ä¸ï¼éç½®é«åº¦ä¸ºéåºå±å¹ */ |
| | | @media (max-width: 768px) { |
| | | .list-container { |
| | | height: calc(100vh - 485px); |
| | | /* éå½è°æ´é«åº¦ */ |
| | | } |
| | | } |
| | | |
| | | .form-container { |
| | | /* 设置表å容å¨çé«åº¦ï¼ä½¿å
¶å¯ä»¥æ»å¨ */ |
| | | overflow-y: auto; |
| | | /* å
许表å容å¨åç´æ»å¨ */ |
| | | padding: 10px; |
| | | /* å¯éï¼æ·»å ä¸äºå
è¾¹è·ï¼ä½¿è¡¨åå
容æ´ç¾è§ */ |
| | | } |
| | | |
| | | .overlay { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .popup { |
| | | background-color: #fff; |
| | | padding: 20px; |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | width: 68vw; /* 设置宽度为è§å£å®½åº¦ç80% */ |
| | | height: 25vh; /* 设置é«åº¦ä¸ºè§å£é«åº¦ç80% */ |
| | | } |
| | | |
| | | .edit { |
| | | background-color: white; |
| | | } |
| | | </style> |