| | |
| | | <template> |
| | | <view> |
| | | <uni-card v-for="item in inspections" @click="gotoInfo(item)"> |
| | | <uni-card v-for="item in inspections" @click="gotoInfo(item)" class="card-box" > |
| | | <view :class="new Date().getTime()-new Date(item.BEGIN_TIME).getTime()>(3600000*item.FREQUENCY)?'red':''"> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>检验单号:</label> |
| | |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>检验单创建时间:</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label>{{item.BEGIN_TIME}}</label> |
| | | </u-col> |
| | | </u-row> |
| | | <view class="f_type"> |
| | | {{item.FTYPE}} |
| | | </view> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>机台号:</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label>{{item.MACHINE_NO}}</label> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-row customStyle="margin-bottom: 10px" v-if="item.PROC_NAME"> |
| | | <u-col span="2"> |
| | | <label>工序名称:</label> |
| | | </u-col> |
| | |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>检验频率(H):</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label></label> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>产品名称:</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label>{{item.ITEM_NAME}}</label> |
| | | <u-col> |
| | | <label>{{item.ITEM_NO}} | {{item.ITEM_NAME}}</label> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>产品编号:</label> |
| | | <label>图号颜色:</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label>{{item.ITEM_NO}}</label> |
| | | <u-col> |
| | | <label>{{item.ENGINEERING_NO}} / {{item.COLOR_NAME}}</label> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>规格材质:</label> |
| | | </u-col> |
| | | <u-col> |
| | | <label>{{item.MODEL}} / {{item.MATERIAL}}</label> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px" v-if="item.OPERATE_MAN"> |
| | | <u-col span="2"> |
| | | <label>操作员:</label> |
| | | </u-col> |
| | |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>检验类型</label> |
| | | <label>检验类型:</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label>{{item.REMEKE}}</label> |
| | | <label>{{item.FTYPE}}</label> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | | <u-col span="2"> |
| | | <label>上次检验时间</label> |
| | | <label>检验频率(H):</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label></label> |
| | | <label>{{item.FREQUENCY}}小时</label> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row customStyle="margin-bottom: 10px"> |
| | |
| | | <label>下次检验时间</label> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <label></label> |
| | | <label>{{item.NEXT_TIME}}</label> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | |
| | | </uni-card> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | inspections: [] |
| | | inspections: [], |
| | | moduleKey:0 |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getInspections() |
| | | }, |
| | | onBackPress() { |
| | | uni.navigateBack({delta:1}) |
| | | }, |
| | | //onShow:function(){ |
| | | // this.getInspections() |
| | | //}, |
| | | methods: { |
| | | getInspections() { |
| | | getInspectionList().then(res => { |
| | |
| | | gotoInfo(e) { |
| | | console.log(e) |
| | | uni.navigateTo({ |
| | | url:'/pages/inspection/inspectionInfo?item='+ encodeURIComponent(JSON.stringify(e)) , |
| | | url:'/pages/inspection/inspectionInfo?item='+ encodeURIComponent(JSON.stringify(e).replace(/\%/g, '%25').replace(/\ /g,'%20').replace(/\?/g,'%3F').replace(/\+/g,'%2B').replace(/\&/g,'%26')) , |
| | | }) |
| | | } |
| | | }, |
| | | reload(){ |
| | | this.$nextTick(()=>{ |
| | | this.$refs.uToast.show({ |
| | | message: "提交成功", |
| | | type: 'success' |
| | | }) |
| | | this.getInspections() |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | .red{ |
| | | color: red; |
| | | } |
| | | .card-box{ |
| | | position: relative; |
| | | } |
| | | .f_type{ |
| | | position: absolute; |
| | | right: 13%; |
| | | top:12%; |
| | | width: 20px; |
| | | line-height: 100px; |
| | | font-size: 8vh; |
| | | margin: 0 auto; |
| | | } |
| | | </style> |