| | |
| | | label-width="160" |
| | | :label-style="{'marginLeft':'9px'}" |
| | | ref="originInfoRef"> |
| | | <!-- 外购---isweight === 1 称重 皮毛净 --> |
| | | <view v-if="isWeight"> |
| | | <u-form-item prop="coalContactSkin"> |
| | | <view class="second-line"> |
| | | <view class="label-text" |
| | |
| | | <view class="unit">吨</view> |
| | | </view> |
| | | </u-form-item> |
| | | <u-form-item prop='contactPicture'> |
| | | |
| | | </view> |
| | | <view v-else class="table-div"> |
| | | <uni-table |
| | | border |
| | | id="table-box" |
| | | emptyText="暂无更多数据"> |
| | | <uni-tr> |
| | | <uni-th align="center" >产品</uni-th> |
| | | <!-- <uni-th align="center">皮重</uni-th> |
| | | <uni-th align="center">毛重</uni-th> |
| | | <uni-th align="center">净重</uni-th> --> |
| | | <uni-th align="center">数量</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(subItem, index) in coalData.tmTaskCoalList" :key="index"> |
| | | <uni-td align="center"> |
| | | <view class="name">{{ subItem.productName }}</view></uni-td> |
| | | <!-- <uni-td align='right'> |
| | | <view v-if="subItem.skin">{{ Number( subItem.skin).toFixed(2) || ''}}</view> |
| | | </uni-td> |
| | | <uni-td align='right'> |
| | | <view class="name" v-if="subItem.hair">{{ Number(subItem.hair) .toFixed(2) || '' }}</view> |
| | | </uni-td> |
| | | <uni-td align='right'> |
| | | <view class="name" v-if="subItem.clean">{{ Number( subItem.clean).toFixed(2) || '' }}</view> |
| | | </uni-td> --> |
| | | |
| | | <uni-td align="right"> |
| | | <view> |
| | | <u--input |
| | | placeholder="请输入产品数量" |
| | | type='number' |
| | | v-model="subItem.productQuantity" |
| | | ></u--input> |
| | | </view></uni-td> |
| | | |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | |
| | | <u-form-item prop='contactPicture'> |
| | | <view class="label-text"> |
| | | <text style="color: #f56c6c;">*</text>原发磅单 |
| | | </view> |
| | |
| | | height="150" |
| | | :previewFullImage="true"></u-upload> |
| | | </u-form-item> |
| | | |
| | | </u-form> |
| | | <view class="submit-button"> |
| | | <u-button text="无需提交" |
| | | type="primary" |
| | | @click.stop="directAppointment" |
| | | v-if="isSpecial===1"></u-button> |
| | | <u-button text="提交" |
| | | type="primary" |
| | | @click.stop="submitOriginInfo" |
| | | :loading="submitOriginInfoLoading"></u-button> |
| | | <view class=""> |
| | | <u-button text="立即预约" |
| | | type="primary" |
| | | @click.stop="directAppointment" |
| | | v-if="isSpecial"></u-button> |
| | | </view> |
| | | <view class=""> |
| | | <u-button text="提交信息" |
| | | type="primary" |
| | | @click.stop="submitOriginInfo" |
| | | :loading="submitOriginInfoLoading" |
| | | :disabled="!coalContactClean"></u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | orderPlanId: "", |
| | | // 聚焦时改变样式 |
| | | isfocus1: false, |
| | | tmTaskCoalList:[], |
| | | isfocus2: false, |
| | | // 输入的原发信息 |
| | | originInfoForm: { |
| | |
| | | sendDate: '', |
| | | deptId: '', |
| | | filedId: '', |
| | | isSpecial: false |
| | | isSpecial: null, |
| | | isWeight:null, |
| | | } |
| | | }, |
| | | computed: { |
| | | coalContactClean() { |
| | | let xx = BigNumber(this.originInfoForm.coalContactHair ? this.originInfoForm.coalContactHair : 0) |
| | | let yy = BigNumber(this.originInfoForm.coalContactSkin ? this.originInfoForm.coalContactSkin : 0) |
| | | return xx.minus(yy).toNumber() > 0 ? xx.minus(yy).toNumber().toFixed(2) : 0 |
| | | if(this.isWeight){ |
| | | let xx = BigNumber(this.originInfoForm.coalContactHair ? this.originInfoForm.coalContactHair : 0) |
| | | let yy = BigNumber(this.originInfoForm.coalContactSkin ? this.originInfoForm.coalContactSkin : 0) |
| | | return xx.minus(yy).toNumber() > 0 ? xx.minus(yy).toNumber().toFixed(2) : 0 |
| | | }else{ |
| | | //数量 |
| | | if(!this.coalData.tmTaskCoalList.length){ |
| | | return false |
| | | }else{ |
| | | const reslut = this.coalData.tmTaskCoalList.find(item=>!item.productQuantity); |
| | | console.log(reslut); |
| | | if(reslut){ |
| | | return false |
| | | }else{ |
| | | return true |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | }, |
| | | onLoad(params) { |
| | |
| | | this.sendDate = params.sendDate || '' |
| | | this.deptId = params.deptId || '' |
| | | this.filedId = params.filedId || '' |
| | | this.isSpecial = params.isSpecial || 0 |
| | | this.isSpecial = Number(params.isSpecial); |
| | | this.isWeight = Number(params.isWeight) |
| | | console.log(params.isSpecial, typeof params.isSpecial,params,'paramssssss'); |
| | | this.getTakeCoal() |
| | | }, |
| | | methods: { |
| | |
| | | taskCoalCode: this.coalData.code, |
| | | carNo: this.coalData.carNo, |
| | | } |
| | | if (this.originInfoForm.coalContactSkin && this.originInfoForm.coalContactHair && this |
| | | //称重 |
| | | if(this.isWeight){ |
| | | if (this.originInfoForm.coalContactSkin && this.originInfoForm.coalContactHair && this |
| | | .originInfoForm |
| | | .contactPicture) { |
| | | this.submitOriginInfoLoading = true |
| | |
| | | } else { |
| | | uni.$u.toast('请填写完整原发信息') |
| | | } |
| | | }else{ |
| | | //数量 |
| | | form.numDtoList = this.coalData.tmTaskCoalList.map(item=>{ |
| | | let obj = { |
| | | tmId:item.id, |
| | | num:Number(item.productQuantity) |
| | | } |
| | | return obj; |
| | | }); |
| | | //删除皮毛净 |
| | | delete form.clean; |
| | | delete form.hair; |
| | | delete form.skin; |
| | | if (this.coalContactClean && this |
| | | .originInfoForm |
| | | .contactPicture) { |
| | | this.submitOriginInfoLoading = true; |
| | | console.log(form,'form') |
| | | this.$reqPost('appSaveContact', form, 'json').then(res => { |
| | | if (res.code === 0) { |
| | | this.$u.toast('提交成功') |
| | | this.submitOriginInfoLoading = false |
| | | setTimeout(() => { |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/appointment/appointment?takeCoalId=${this.orderPlanId}&filedId=${this.filedId}&deptId=${this.deptId}&sendDate=${this.sendDate}` |
| | | }); |
| | | }, 1500) |
| | | } else { |
| | | this.submitOriginInfoLoading = false |
| | | this.$u.toast(res.msg ? res.msg : '提交失败') |
| | | } |
| | | }) |
| | | } else { |
| | | uni.$u.toast('请填写完整原发信息') |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | <style lang="scss" |
| | | scoped> |
| | | .table-div{ |
| | | /deep/ .uni-table{ |
| | | width: 95%; |
| | | min-width: 0!important; |
| | | margin-left: 20rpx; |
| | | } |
| | | |
| | | } |
| | | /deep/.u-button { |
| | | font-size: 28rpx; |
| | | font-weight: 300; |
| | |
| | | .origin-info_content { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: scroll; |
| | | // overflow-y: scroll; |
| | | |
| | | .first-line, |
| | | .second-line { |
| | |
| | | } |
| | | |
| | | .submit-button { |
| | | width: 180rpx; |
| | | width: 450rpx; |
| | | margin: vww(8) auto; |
| | | @include flex; |
| | | |
| | | .u-button { |
| | | width: 45%; |
| | | font-size: 28rpx; |
| | | font-weight: 300; |
| | | color: #ffffff; |