| | |
| | | <view class="label-text"> |
| | | 扣渣后净重 |
| | | </view> |
| | | <view class="count">{{ item.weight }}</view> |
| | | <view class="count">{{ item.weight || item.clean}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- 判断是否检验质量 --> |
| | |
| | | <view class="num-show" |
| | | v-else-if="flag"> |
| | | {{item.weight1}} |
| | | </view> |
| | | </view> |
| | | <!-- 新增扣罚种类、 扣罚金额,不合格判定种类--> |
| | | <view class="notice-num"> |
| | | <view class="num-text" |
| | | style="margin-left: 10rpx;"> |
| | | <u--text text="扣罚种类" |
| | | size='32'></u--text> |
| | | </view> |
| | | <view class="num-input" |
| | | v-if='roleType===4&&!flag' |
| | | > |
| | | <u-radio-group v-model="item.penaltyType"> |
| | | <u-radio :name="0" :label="'无扣罚'" :disabled="disabled">无扣罚</u-radio> |
| | | <u-radio :name="'其他扣罚'" :label="'其他扣罚'" :disabled="disabled">其他扣罚</u-radio> |
| | | </u-radio-group> |
| | | </view> |
| | | <view class="num-show" |
| | | v-else-if="flag"> |
| | | {{item.penaltyType}} |
| | | </view> |
| | | </view> |
| | | <!-- 扣罚金额 --> |
| | | <view class="notice-num"> |
| | | <view class="num-text" |
| | | style="margin-left: 10rpx;"> |
| | | <u--text text="扣罚金额" |
| | | size='32'></u--text> |
| | | </view> |
| | | <view class="num-input" |
| | | v-if='roleType===4&&!flag' |
| | | > |
| | | <u--input placeholder="请输入扣罚金额" |
| | | border="bottom" |
| | | clearable |
| | | v-model="item.penaltyAmount"></u--input> |
| | | </view> |
| | | <view class="num-show" |
| | | v-else-if="flag"> |
| | | {{item.penaltyAmount}} |
| | | </view> |
| | | </view> |
| | | <!--不合格判定种类 --> |
| | | <view class="notice-num"> |
| | | <view class="num-text" |
| | | style="margin-left: 10rpx;"> |
| | | <u--text text="不合格判定种类" |
| | | size='32'></u--text> |
| | | </view> |
| | | <view class="num-input" |
| | | v-if='roleType===4&&!flag' |
| | | > |
| | | <!-- <u--input placeholder="请输入扣罚金额" |
| | | border="bottom" |
| | | clearable |
| | | v-model="item.penaltyAmount"></u--input> --> |
| | | <u-select v-model="item.unqualifiedType" mode="mutil-column-auto" :list="list" @confirm="confirm"></u-select> |
| | | </view> |
| | | <view class="num-show" |
| | | v-else-if="flag"> |
| | | {{item.unqualifiedType}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | return { |
| | | orderPlanId: "", |
| | | title: '素胚勾勒出青花,笔锋浓转淡', |
| | | isWeighingType:'', |
| | | subTitle: '2020-05-15', |
| | | thumb: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg', |
| | | coalDetailsData: {}, |
| | |
| | | if(!this.coalDetailsData.tmTaskCoalItems.length){ |
| | | this.current = 0; |
| | | } |
| | | this.isWeighingType = res.data.weighingType //当前磅单是否回磅 |
| | | } else { |
| | | this.$u.toast('加载失败') |
| | | uni.hideLoading() |
| | |
| | | } |
| | | }) |
| | | }, |
| | | // 校验数据是否合格 |
| | | checkValue(data,target){ |
| | | if(!data.length){ |
| | | return |
| | | } |
| | | let flag = data.find(item=>item[target] <=0); |
| | | console.log(flag,'flag'); |
| | | if(flag){ |
| | | return false |
| | | }else{ |
| | | return true; |
| | | } |
| | | |
| | | }, |
| | | // 物资明细 |
| | | goodsPopoverShow(index) { |
| | | if (this.roleType === 4 && !this.flag) { |
| | |
| | | // 折扣率输入 |
| | | discountInputHandle(value, index, clean) { |
| | | console.log('计算净重',value, index, clean) |
| | | value = Number(value) |
| | | this.showWeigh[index].cinderWeight = Number(value) |
| | | if (clean) { |
| | | let x = new BigNumber(clean) |
| | | let y = new BigNumber(value) |
| | | this.showWeigh[index].weight = x.minus(y).toFixed(2) |
| | | } |
| | | this.showWeigh[index].cinderWeight = (value - 0) |
| | | let x = new BigNumber(clean - 0) |
| | | let y = new BigNumber(value - 0) |
| | | let z = new BigNumber(this.showWeigh[index].unqualifiedWeight - 0) |
| | | console.log(clean,value,this.showWeigh[index].unqualifiedWeight - 0,'扣渣'); |
| | | if(x.minus(y).minus(z).toFixed(2) <= 0){ |
| | | this.showWeigh[index].weight = '0'; |
| | | this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确') |
| | | }else{ |
| | | this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2) |
| | | } |
| | | |
| | | |
| | | }, |
| | | // 选择不合格品名 |
| | |
| | | }, |
| | | // 不合格重量输入 |
| | | unqualifiedWeightInputHandle(value, index, clean) { |
| | | console.log(value, typeof value ,'value') |
| | | if(!value){ |
| | | value = 0; |
| | | } |
| | | let x = new BigNumber(clean) |
| | | let y = new BigNumber(value) |
| | | let z = new BigNumber(this.showWeigh[index].cinderWeight) |
| | | console.log(value, index, clean,'不合格重量输入') |
| | | this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2) || '' |
| | | // 判断是不是有净重才进行计算 |
| | | let x = new BigNumber(clean - 0) |
| | | let y = new BigNumber(value - 0) |
| | | let z = new BigNumber(this.showWeigh[index].cinderWeight - 0); |
| | | if(x.minus(y).minus(z).toFixed(2) <= 0){ |
| | | this.showWeigh[index].weight = '0'; |
| | | this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确') |
| | | }else{ |
| | | this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2) ; |
| | | } |
| | | |
| | | |
| | | }, |
| | | // 删除图片 |
| | | deletePic(event) { |