| | |
| | | <u--image :showLoading="true" |
| | | :src="`${BaseUrl}${val}`" |
| | | width="80px" |
| | | height="80px"> |
| | | height="80px" |
| | | @click="imageClick(val)" |
| | | > |
| | | <view slot="error" |
| | | style="font-size: 24rpx;">加载失败</view> |
| | | </u--image> |
| | |
| | | height="150" |
| | | :previewFullImage="true"> |
| | | </u-upload> |
| | | </view> |
| | | </view> |
| | | <u--list |
| | | :height="0" |
| | | style=" margin-left: 50rpx;margin-top: 30rpx;" |
| | |
| | | @select="selectUnqualifiedClick"></u-action-sheet> |
| | | </view> |
| | | </view> |
| | | <!-- 原发出场时间 --> |
| | | <view v-if="roleType!==4"> |
| | | <view> |
| | | <text>货物发货地出场时间或发货磅单时间:</text> |
| | | </view> |
| | | <view> |
| | | <uni-datetime-picker |
| | | v-model="outDate" |
| | | type="datetime" |
| | | @change="datechange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <!-- 新增 验质备注。验质说明 --> |
| | | <view v-if=" isYanz()"> |
| | | <view v-if="coalDetailsData.orderType == '外购'"> |
| | |
| | | @close='unqualifiedClose' |
| | | @select="selectUnqualifiedClick"></u-action-sheet> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 图片预览弹出框 --> |
| | | <view class="previewImage-container"> |
| | | <u-popup :show="previewImageShow" |
| | | mode="center" |
| | | @close="previewImageClose" |
| | | @open="previewImageOpen"> |
| | | <u--image :src="previewImageSrc != null ? BaseUrl + previewImageSrc : ''" |
| | | width="400px" |
| | | height="400px"></u--image> |
| | | </u-popup> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import BigNumber from "bignumber.js" |
| | | import formatDate from '@/utils/date' |
| | | import { BaseUrl } from '@/api/publicInterface.js'; |
| | | import { onlineurl } from '@/api/request.js' |
| | | import { mapState, mapMutations } from "vuex" |
| | | export default { |
| | | data() { |
| | | return { |
| | | dateInpShow:false, |
| | | outDate:'', |
| | | dateValue:'', |
| | | previewImageShow:false, |
| | | qualityInstructions:"", |
| | | previewImageSrc: '', |
| | | penaltyType:[], |
| | | indexFlag:0, // 下标标志位 |
| | | remarks:'', |
| | |
| | | }, |
| | | cleanWeight(){ |
| | | return function(item){ |
| | | if(!item.weight){ |
| | | // if(!item.weight){ |
| | | // return '' |
| | | // }else if(item.weight && !item.unqualifiedWeight){ |
| | | // return item.weight |
| | | // }else if(item.weight && item.unqualifiedWeight){ |
| | | // return item.weight |
| | | // } |
| | | if(item.weight){ |
| | | return item.weight |
| | | }else if(!item.clean){ |
| | | return '' |
| | | }else if(item.weight && !item.unqualifiedWeight){ |
| | | return item.weight |
| | | }else if(item.weight && item.unqualifiedWeight){ |
| | | return item.weight |
| | | |
| | | } else if(item.clean && !item.unqualifiedWeight){ |
| | | return item.clean |
| | | }else if(item.clean && item.cinderWeight){ |
| | | return new BigNumber(item.clean - 0).minus(item.cinderWeight - 0); |
| | | } |
| | | console.log(item,'clearnWeight') |
| | | } |
| | | }, |
| | | //合格净重 |
| | |
| | | let z = new BigNumber(znums.reduce((p,n)=>{ |
| | | return (p - 0) + (n - 0) |
| | | },0)) |
| | | return (item.weight - z).toFixed(2); |
| | | let y = new BigNumber(item.cinderWeight) |
| | | return new BigNumber(item.clean - 0).minus(z).minus(y); |
| | | } |
| | | } |
| | | |
| | |
| | | uni.hideLoading() |
| | | this.coalDetailsData = res.data; |
| | | this.remarks = res.data.remarks; |
| | | this.dateValue = res.data.startTime; |
| | | this.outDate = res.data.startTime; |
| | | this.qualityInstructions = res.data.qualityInstructions |
| | | this.orderCode = res.data.orderCode |
| | | this.showWeigh = this.coalDetailsData.tmTaskCoalItems ? this.coalDetailsData |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | previewImageClose() { |
| | | this.previewImageShow = false; |
| | | }, |
| | | previewImageOpen() { |
| | | this.previewImageShow = true; |
| | | console.log('preview open'); |
| | | }, |
| | | GetOrderPlan() { |
| | | uni.showLoading({ title: '加载中...' }); |
| | | this.$reqGet('GetOrderPlan').then(res => { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | imageClick(imgStr){ |
| | | console.log(imgStr,'触发') |
| | | this.previewImageSrc = imgStr; |
| | | |
| | | this.$nextTick(() => { |
| | | this.previewImageShow = true; |
| | | }); |
| | | |
| | | |
| | | }, |
| | | // 点击确认 |
| | | confirmInput() { |
| | | let flag = true; |
| | | let params = {},unqualifiedWeightAll; |
| | | params.qualityInstructions = this.qualityInstructions; |
| | | params.remarks = this.remarks; |
| | | params.startTime = this.dateValue; |
| | | console.log( this.showWeigh,' this.showWeigh') |
| | | this.showWeigh = this.showWeigh.map((v, i) => { |
| | | console.log(this.penaltyType,this.$refs.checkbox,'123') |
| | |
| | | // } |
| | | console.log(event,'event') |
| | | |
| | | }, |
| | | dateInpFoucs(){ |
| | | console.log('聚焦'); |
| | | this.dateInpShow = true; |
| | | }, |
| | | datechange(value){ |
| | | console.log('dateChange',value,formatDate.formatDate(new Date(value)) ); |
| | | this.dateValue = (formatDate.formatDate(new Date(value)) + ':' + '00'); |
| | | |
| | | |
| | | } |
| | | }, |
| | | } |