| | |
| | | @click="confirmWeigh"> |
| | | </u-button> |
| | | </view> |
| | | <view class="chengzhong-btn" v-if="weighData.tmId && roleType == 4"> |
| | | <!-- 收发单信息时 status: 领取(0),预约(1),签到(2),入场(3),称皮(4),称毛(5),离场(6), 入磅房(7),出磅房(8),入煤仓(9),出煤仓(10) |
| | | ,放空(11),作废(12),入场申请(13),进入场院(14),申请计量(15); --> |
| | | <!-- <view class="chengzhong-btn" v-if="weighData.tmId && roleType == 4"> |
| | | <!– 收发单信息时 status: 领取(0),预约(1),签到(2),入场(3),称皮(4),称毛(5),离场(6), 入磅房(7),出磅房(8),入煤仓(9),出煤仓(10) |
| | | ,放空(11),作废(12),入场申请(13),进入场院(14),申请计量(15); –> |
| | | <u-button type="primary" |
| | | text="复磅" |
| | | :loading="repeatWeighLoading" |
| | | loadingText="确认" |
| | | @click="confirmRepeatWeigh"></u-button> |
| | | </view> |
| | | :disabled="isFuBangSHow" |
| | | @click="showModal = true"></u-button> |
| | | </view>--> |
| | | <view class="chengzhong-btn" v-if="weighData.tmId && outBuy && roleType == 4"> |
| | | <u-button type="primary" |
| | | text="返回加减吨" |
| | | :disabled="addAndSubtractCoalDisabled" |
| | | @click="addAndSubtractCoal" |
| | | class="jiajian" |
| | | ></u-button> |
| | | ></u-button> |
| | | </view> |
| | | <view class="chengzhong-btn" v-if='weighData.tmId && canUnload && isJixuxiehuo && roleType == 4'> |
| | | <div>{{!isJixuxiehuo}}</div> |
| | | <u-button type="primary" |
| | | text="继续卸货" |
| | | @click="UnloadingAgainHandle" |
| | | :loading="UnloadingAgainLoading" |
| | | |
| | | loadingText="确认" |
| | | :disabled="isweigh||realTimeWeigh == 0" |
| | | ></u-button> |
| | | :disabled="isweigh||realTimeWeigh == 0 || statusWeigh == 3" |
| | | ></u-button> |
| | | </view> |
| | | <!-- 放空 --> |
| | | <view class="chengzhong-btn" v-if="weighData.tmId && roleType == 4"> |
| | |
| | | throttleTime="500" |
| | | :disabled="!isEvacuation"></u-button> |
| | | </view> |
| | | <!--二次确认--> |
| | | <u-modal :show="showModal" |
| | | :asyncClose="true" |
| | | @cancel="showModal = false" |
| | | :content="modalContent" |
| | | :showCancelButton="true" |
| | | :cancelButtonText="'取消'" |
| | | :showConfirmButton="true" |
| | | :confirmButtonText="'确认'" |
| | | @confirm="confirmRepeatWeigh" /> |
| | | </view> |
| | | <!-- 放空弹窗 --> |
| | | <view class="evacuationModal"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | statusWeigh: '', //状态 |
| | | isWeighing:'', |
| | | timer:null, |
| | | weighData: { |
| | |
| | | applyHouseId:'', //磅房号 |
| | | noCarNo:0, //是否有车牌号(有车牌0,无车牌1) |
| | | status:null, //状态 |
| | | orderCode:'', |
| | | showModal: false, |
| | | modalContent: '确认要复磅吗?' |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | } |
| | | }, |
| | | isJixuxiehuo() { //是否显示继续卸货按钮 |
| | | console.log(this.weighList?.tmTaskCoalItems.length - 1 > 0,'this.weighList?.tmTaskCoalItems===') |
| | | if(this.weighList?.tmTaskCoalItems) { |
| | | return this.weighList?.tmTaskCoalItems.length - 1 > 0 |
| | | if(this.weighList?.tmTaskCoalItems && this.weighList?.tmTaskCoalItems.length > 0) { |
| | | return this.weighList?.tmTaskCoalItems.length > 0 |
| | | }else { |
| | | return false |
| | | } |
| | | }, |
| | | isFuBangSHow() { //复磅是否可以点击 |
| | | console.log(this.globalweigh,'this.globalweigh====') |
| | | if(this.noCarNo == 1) { //无车牌的时候复磅都能点击 |
| | | //条件: 不是称重完成+不是未称重+有车牌+司机 【未称重0,称重中1,验质中2,称重完成3,验质完成4】 noCarNo 是否有车牌号(有车牌0,无车牌1) |
| | | if(this.statusWeigh == 0 || this.statusWeigh == 3 || this.globalweigh == 0) { |
| | | // if( this.statusWeigh == 3 || this.globalweigh == 0) { |
| | | return true |
| | | }else { |
| | | return false |
| | | } |
| | | }else { //有车牌的话 |
| | | console.log(this.isJixuxiehuo,'this.isJixuxiehuo------') |
| | | if(this.weighHistory && this.weighHistory.length > 0) { |
| | | if(!this.isJixuxiehuo) { //只有一条 tmTaskCoalItems |
| | | let data = this.weighHistory[0] |
| | | if(!data.hair && !data.skin) { //皮重和毛重都没有的话 复磅 不能点击 |
| | | return true |
| | | }else if(data.hair && data.skin) { //皮重和毛重都有的话 复磅 也不能点击 (称重结束) |
| | | return true |
| | | }else { |
| | | return false |
| | | } |
| | | |
| | | }else { |
| | | let hairAndSkin = this.weighHistory.every(item => item.hair && item.skin) //皮重毛重都有 |
| | | if(hairAndSkin) { |
| | | return true |
| | | }else { |
| | | return false |
| | | } |
| | | } |
| | | }else { |
| | | return true |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | console.log(this.weighData.sceneId,'磅房----') |
| | | // 获取称重信息 |
| | | // uni.request({ //根据磅房查询提煤单信息 |
| | | // url: `${BaseUrl}/wrzs/jccoalweighhouse/getTmTaskCoalNoCar/${this.weighData.sceneId}`, |
| | | // method: 'GET', |
| | | // header: { |
| | | // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), |
| | | // clientToc: 'Y', |
| | | // 'CLIENT_TOC': 'Y', |
| | | // }, |
| | | // success: (res) => { |
| | | // console.log(res,'res.datra----------') |
| | | // if(res.data.code == 0) { |
| | | // this.weighList = res.data; |
| | | // this.weighData.deptId = res.data.deptId; |
| | | // this.weighData.tmId = res.data.id; |
| | | // this.weighData.carNo = res.data.carNo; |
| | | // this.weighData.tmCode = res.data.code; |
| | | // this.weighData.filedId = res.data.filedId; |
| | | // this.noCarNo = res.data.noCarNo |
| | | // this.applyHouseId = res.data.applyHouseId |
| | | // this.status = res.data.status |
| | | // this.outBuy = (this.weighList.orderType.indexOf('销') !== -1) && this.showWeigh.skin > 0; |
| | | // // 继续卸货只有外购类型第二次会有 |
| | | // this.canUnload = this.weighList.orderType === '外购' && this.showWeigh.hair > 0; |
| | | // }else { |
| | | // this.$u.toast(res.data.msg); |
| | | // } |
| | | // } |
| | | // }) |
| | | let params = {} |
| | | this.tmId ? params = { tmId: this.tmId, houseId: this.weighData.sceneId } : params = { houseId: this.weighData.sceneId } |
| | | console.log(params,'参数===') |
| | |
| | | this.noCarNo = res.data.noCarNo |
| | | this.applyHouseId = res.data.applyHouseId |
| | | this.status = res.data.status |
| | | this.statusWeigh = res.data.statusWeigh |
| | | this.orderCode = res.data.orderCode |
| | | this.outBuy = (this.weighList.orderType.indexOf('销') !== -1) && this.showWeigh.skin > 0; |
| | | // 继续卸货只有外购类型第二次会有 |
| | | this.canUnload = this.weighList.orderType === '外购' && this.showWeigh.hair > 0; |
| | | this.getShebeiData() //获取设备信息 |
| | | }else { |
| | | this.weighList = {} |
| | | Object.keys(this.weighList).forEach(key => { |
| | | this.weighList[key] = ''; |
| | | }); |
| | | this.$u.toast(res.msg ? res.msg : '占无磅单信息'); |
| | | } |
| | | }); |
| | | }, |
| | | getShebeiData() { //获取设备信息 |
| | | let params = { |
| | | deptId: this.weighData.deptId, |
| | | filedId: this.weighData.filedId, |
| | | tmId: this.weighData.tmId, |
| | | tmCode: this.weighData.tmCode, |
| | | carNo: this.weighData.carNo |
| | | } |
| | | console.log(params,'params=====') |
| | | this.$reqGet('getWeighHouse',params).then(res => { |
| | | console.log(res, '获取设备信息res'); |
| | | if(res.code == 0) { |
| | | this.weighData.gateCameraId = res.data.lastEquipmentId; |
| | | this.weighData.equipmentCode = res.data.lastEquipmentCode; |
| | | this.weighData.sceneInOut = res.data.sceneInOut; |
| | | }else { |
| | | this.$u.toast(res.msg); |
| | | } |
| | | }) |
| | | }, |
| | | refreshClick() { |
| | | this.init() |
| | |
| | | // 确认称重接口 |
| | | saveWeigh() { //点击确认称重按钮 |
| | | // this.weighData.coalContactClean = this.coalContactClean; |
| | | this.$reqPost('saveWeighYZY', this.weighData, 'json') |
| | | console.log(this.weighData,'复磅参数----') |
| | | this.$reqPost('saveWeigh', this.weighData, 'json') |
| | | .then(res => { |
| | | console.log(res, '称重接口'); |
| | | if (res.code == 0) { |
| | |
| | | this.isConfirmWeighLoading = false; |
| | | }); |
| | | }, |
| | | confirmRepeatWeigh() { //复磅 |
| | | confirmAction() { //复磅 |
| | | this.showModal = true |
| | | }, |
| | | confirmRepeatWeigh() { //复磅二次确认 |
| | | this.repeatWeighLoading = true |
| | | setTimeout(() => { |
| | | // 3秒后自动关闭 |
| | | this.showModal = false; |
| | | }, 2000) |
| | | console.log(this.weighData.weigh,'this.weighData.weigh======') |
| | | if(this.weighData.weigh && this.weighData.weigh != 0) { |
| | | this.$reqPost('reWeighYZY', this.weighData, 'json').then(res => { |
| | | if (res.code == 0) { |
| | | this.repeatWeighLoading = false; |
| | | this.init() |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | |
| | | deptId: this.weighData.deptId, |
| | | sceneId: this.weighData.sceneId, |
| | | carNo: this.weighData.carNo, |
| | | tmId: this.weighData.tmId, |
| | | filedId: this.weighData.filedId, |
| | | tmId: this.weighData.tmId, |
| | | gateCameraId: this.weighData.gateCameraId, |
| | |
| | | carNo: this.weighData.carNo, |
| | | tmId: this.weighData.tmId, |
| | | filedId: this.weighData.filedId, |
| | | tmId: this.weighData.tmId, |
| | | gateCameraId: this.weighData.gateCameraId, |
| | | equipmentCode: this.weighData.equipmentCode, |
| | | tmCode: this.weighData.tmCode, |
| | |
| | | flex-wrap: wrap; |
| | | padding: 0 40rpx; |
| | | box-sizing: border-box; |
| | | justify-content: center; |
| | | justify-content: start; |
| | | .u-button{ |
| | | width: 200rpx; |
| | | margin: 0 10rpx; |
| | | margin: 10rpx 10rpx; |
| | | } |
| | | } |
| | | |