| | |
| | | <view class="edc-sampling-card" v-for="(item,index) in edcList" :key="index"> |
| | | <view class="edc-sampling-line"> |
| | | <h1>{{item.carNo}}</h1> |
| | | <view class="status red" v-if="item.status">{{statusComputed(item.status)}}</view> |
| | | <view class="status" :class="statusClassComputed(item.status)" v-if="item.status">{{statusComputed(item.status)}}</view> |
| | | </view> |
| | | <view class="edc-sampling-line"> |
| | | <h2>供应商:{{item.customerName}}</h2> |
| | |
| | | return '' |
| | | } |
| | | }, |
| | | statusClassComputed(status) { |
| | | if(status == 1) { |
| | | return 'blue' |
| | | }else if(status == 2) { |
| | | return 'red' |
| | | }else if(status == 3) { |
| | | return 'red' |
| | | }else if(status == 4) { |
| | | return 'red' |
| | | }else if(status == 5) { |
| | | return 'red' |
| | | }else if(status == 6) { |
| | | return 'red' |
| | | }else if(status == 7) { |
| | | return 'black' |
| | | }else { |
| | | return '' |
| | | } |
| | | }, |
| | | async getPageList(callBack) { |
| | | uni.showLoading({ |
| | | title: "加载中" |
| | |
| | | }) |
| | | }, |
| | | handleEDCClick(item) { //创建EDC质检单 |
| | | uni.showLoading({ |
| | | title: "加载中" |
| | | }) |
| | | uni.showModal({ |
| | | title: '确认', |
| | | content: '确认创建EDC质检单吗', |
| | |
| | | this.$reqPost('edcSampling',item,'json').then(res => { |
| | | console.log(res,'res=====-----') |
| | | if(res.code == 0) { |
| | | uni.hideLoading() |
| | | this.$u.toast('创建成功'); |
| | | this.edcList = [] |
| | | this.getPageList() |
| | |
| | | }) |
| | | |
| | | }else if(res.cancel){ |
| | | uni.hideLoading() |
| | | return true |
| | | } |
| | | } |
| | |
| | | display: flex; |
| | | align-self: baseline; |
| | | } |
| | | .blue{ |
| | | color: #184edd; |
| | | border: 1px solid #184edd; |
| | | } |
| | | .red{ |
| | | color: #f56c6c; |
| | | border: 1px solid #f56c6c; |
| | | } |
| | | .black{ |
| | | color: black; |
| | | border: 1px solid black; |
| | | } |
| | | .yellow{ |
| | | color: #f9ae3d; |
| | | border: 1px solid #f9ae3d; |
| | | color: #fcbd20; |
| | | border: 1px solid #fcbd20; |
| | | } |
| | | } |
| | | .edc-sampling-btn-box{ |