| | |
| | | <view class="bill-of-lading-details"> |
| | | <view class="top-banner" |
| | | style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/loadingbanner.png') no-repeat;background-size: cover;"> |
| | | <u-notice-bar :text="originInfoNotice" |
| | | v-if="originInfoVisible" |
| | | fontSize='36'></u-notice-bar> |
| | | <view class="top-information"> |
| | | <view class="cutomer-name" |
| | | v-if="orderType == '转入' || orderType == '转出'">煤场:{{ coalDetailsData.toFiledName || '' }}</view> |
| | |
| | | <view class="status-button" |
| | | style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/statusbutton.png') no-repeat; |
| | | background-size: cover;"> |
| | | {{ coalStatus[coalDetailsData.status] || '' }} |
| | | {{coalStatus[correctStatus]||''}} |
| | | </view> |
| | | </view> |
| | | <view class="time"> |
| | |
| | | <view class="origin-info_content"> |
| | | <view class="first-line"><combined-title title="原发信息"></combined-title></view> |
| | | <u-form :model="originInfoForm" |
| | | :rules="rules" |
| | | label-position="top" |
| | | label-width="160" |
| | | :label-style="{'marginLeft':'9px'}" |
| | |
| | | plain |
| | | @click="rcsqClick" |
| | | shape="circle" |
| | | :disabled="coalDetailsData.status === 3"></u-button> |
| | | :disabled="correctStatus>= 3"></u-button> |
| | | </view> |
| | | <view class="bottom-button"> |
| | | <u-button text="放空" |
| | |
| | | components: { |
| | | combinedTitle |
| | | }, |
| | | onPullDownRefresh() { |
| | | this.getTakeCoal(); //获取提煤单详情 |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | onLoad(value) { |
| | | this.orderPlanId = value.orderPlanId; |
| | | this.yyId = value.yyId; |
| | |
| | | this.getTakeCoal(); //获取提煤单详情 |
| | | } |
| | | this.init(); //获取日志 |
| | | this.getgetService(); //获取客服 |
| | | }, |
| | | onShow() { |
| | | this.coalDayPage(); //获取日志 定时任务 |
| | |
| | | serviecePhone: '' |
| | | }, |
| | | coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤仓', '出煤仓', '放空', '作废', '入场申请', |
| | | '进入场院', '异常审核中' |
| | | '进入场院', '异常审核中', '返回加减吨', '超时', '打印中', '打印中' |
| | | ], // 状态 |
| | | weighHouseCode: '', |
| | | // 放空弹窗控制变量 |
| | |
| | | originInfoVisible: false, |
| | | fileList1: [], //图片列表 |
| | | deletable: true, |
| | | rules: { |
| | | contactPicture: { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请上传原发磅单图片', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | coalContactHair: { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入毛重', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | coalContactSkin: { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请输入皮重', |
| | | trigger: ['blur', 'change'] |
| | | } |
| | | }, |
| | | rules: {}, |
| | | timeout: '0', |
| | | wsgShow: false |
| | | |
| | | wsgShow: false, |
| | | timeLineStatus: null, |
| | | originInfoNotice: '填写原发信息后可上磅计量' |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | return this.coalDetailsData.hair !== 0 || this.coalDetailsData.skin !== 0; |
| | | }, |
| | | isapproach() { |
| | | return this.currentPageCoalStatus !== 3; |
| | | return this.correctStatus !== 3 |
| | | }, |
| | | coalContactClean() { |
| | | let xx = BigNumber(this.originInfoForm.coalContactHair ? this.originInfoForm.coalContactHair : 0) |
| | |
| | | let minutes = ("0" + currentDate.getMinutes()).slice(-2); |
| | | let formattedDate = year + "-" + month + "-" + date + " " + hours + ":" + minutes; |
| | | return formattedDate |
| | | }, |
| | | correctStatus() { |
| | | return this.currentPageCoalStatus === this.timeLineStatus ? this.currentPageCoalStatus : this |
| | | .timeLineStatus |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | init() { |
| | | this.$reqGet('coalDayPage', { id: this.orderPlanId, timeout: this.timeout }).then(res => { |
| | | if (res.code == 0) { |
| | | // this.dayRZ = res.data; |
| | | this.timeLineStatus = res.data[0].taskStatus |
| | | this.dayRZ = res.data.map(v => { |
| | | let slicedate = v.taskStatusDes.slice(0, 10); |
| | | if (slicedate == this.currentDate) { |
| | |
| | | uni.setStorageSync('customeropenId', this.serviceInfoObj.openId); |
| | | uni.setStorageSync('customerName', this.serviceInfoObj.openName); |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | // 获取提煤单详情 |
| | | getTakeCoal() { |
| | |
| | | // 原发信息回显以及控制是否可修改 |
| | | this.haveInputOrigin = !this.coalDetailsData.skinTwo && this.coalDetailsData.orderType === |
| | | '外购' |
| | | this.deletable = this.isModifyoriginInfo = this.coalDetailsData.status > 3 |
| | | this.deletable = this.coalDetailsData.status > 3 |
| | | this.originInfoForm.coalContactSkin = this.coalDetailsData.skinTwo; |
| | | this.originInfoForm.coalContactHair = this.coalDetailsData.hairTwo; |
| | | this.originInfoForm.contactPicture = this.coalDetailsData.contactPicture |
| | | if (this.coalDetailsData.contactPicture) { |
| | | this.fileList1 = this.coalDetailsData.contactPicture.split(',').map(v => { |
| | | return { |
| | |
| | | } |
| | | } |
| | | }).then(() => { |
| | | this.getgetService(); //获取客服 |
| | | }).then(() => { |
| | | // 判断当前时间是否超出预约时间 |
| | | setTimeout(() => { |
| | | let endTime = this.coalDetailsData.yuYueSection.slice(0, 10) + ' ' + this |
| | |
| | | this.interval = setInterval(() => { |
| | | this.$reqGet('coalDayPage', { id: this.orderPlanId, timeout: this.timeout }).then(res => { |
| | | if (res.code == 0) { |
| | | this.timeLineStatus = res.data[0].taskStatus |
| | | this.dayRZ = res.data.map(v => { |
| | | let slicedate = v.taskStatusDes.slice(0, 10); |
| | | if (slicedate == this.currentDate) { |
| | |
| | | this.weighData.gateCameraId = res.data.lastEquipmentId; |
| | | this.weighData.equipmentCode = res.data.lastEquipmentCode; |
| | | this.weighData.sceneInOut = res.data.sceneInOut; |
| | | let form = { |
| | | sceneId: this.weighData.sceneId, |
| | | gateCameraId: this.weighData.gateCameraId, |
| | | equipmentCode: this.weighData.equipmentCode, |
| | | sceneInOut: this.weighData.sceneInOut, |
| | | } |
| | | uni.setStorageSync('WeighHouseForm', JSON.stringify(form)) |
| | | this.weighHouseCode = res.data.code; |
| | | uni.navigateTo({ |
| | | url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${ |
| | |
| | | title: '正在打印中,请稍后' |
| | | }) |
| | | this.enterLoading = true |
| | | this.$reqGet('printer', { type: 2, tmId: this.coalDetailsData.id }).then(res => { |
| | | uni.hideLoading() |
| | | this.enterLoading = false |
| | | console.log(res); |
| | | if (res.code === 0) { |
| | | this.$u.toast('打印成功') |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '打印失败') |
| | | } |
| | | }) |
| | | let form = { |
| | | deptId: this.getWeightHouseObj.deptId, |
| | | tmId: this.getWeightHouseObj.tmId, |
| | | carNo: uni.getStorageSync('carNo'), |
| | | type: 2, |
| | | weighingNumber: 1 |
| | | } |
| | | this.$reqPost('printer', Object.assign(form, JSON.parse(uni.getStorageSync('WeighHouseForm'))), |
| | | 'json').then( |
| | | res => { |
| | | uni.hideLoading() |
| | | this.enterLoading = false |
| | | console.log(res); |
| | | if (res.code === 0) { |
| | | this.$u.toast('打印成功') |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '打印失败') |
| | | } |
| | | }) |
| | | }, |
| | | // 打印出门证 |
| | | printExitPermit() { |
| | | uni.showLoading({ |
| | | title: '正在打印中,请稍后' |
| | | }) |
| | | let form = { |
| | | deptId: this.getWeightHouseObj.deptId, |
| | | tmId: this.getWeightHouseObj.tmId, |
| | | carNo: uni.getStorageSync('carNo'), |
| | | type: 3, |
| | | weighingNumber: 2 |
| | | } |
| | | this.outLoading = true |
| | | this.$reqGet('printer', { type: 3, tmId: this.coalDetailsData.id }).then(res => { |
| | | this.$reqPost('printer', Object.assign(form, JSON.parse(uni.getStorageSync('WeighHouseForm'))), |
| | | 'json').then(res => { |
| | | uni.hideLoading() |
| | | this.outLoading = false |
| | | if (res.code === 0) { |
| | |
| | | this.isfocus2 = false; |
| | | }, |
| | | inputChange() { |
| | | if (Number(this.originInfoForm.coalContactHair) > 0 && Number(this.originInfoForm.coalContactSkin > 0)) { |
| | | if (Number(this.originInfoForm.coalContactHair) > 0 && Number(this.originInfoForm.coalContactSkin > |
| | | 0)) { |
| | | this.isInputOrigin = true; |
| | | } |
| | | }, |
| | |
| | | name: 'file', |
| | | success: res => { |
| | | if (num == 1) { |
| | | this.originInfoForm.contactPicture = JSON.parse(res.data).data.url; |
| | | this.originInfoForm.contactPicture = JSON.parse(res.data) |
| | | .data.url; |
| | | resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`); |
| | | } |
| | | } |
| | |
| | | taskCoalCode: this.coalDetailsData.code, |
| | | carNo: this.coalDetailsData.carNo, |
| | | } |
| | | this.$refs.originInfoRef.validate().then(res => { |
| | | if (this.originInfoForm.coalContactSkin && this.originInfoForm.coalContactHair && this |
| | | .originInfoForm |
| | | .contactPicture) { |
| | | this.$reqPost('appSaveContact', form, 'json').then(res => { |
| | | if (res.code === 0) { |
| | | this.$u.toast('提交成功') |
| | | this.getTakeCoal() |
| | | } else { |
| | | this.isModifyoriginInfo = true |
| | | this.$u.toast(res.msg ? res.msg : '提交失败') |
| | | |
| | | } |
| | | }).then(() => { |
| | | setTimeout(() => { |
| | | this.getTakeCoal() |
| | | }, 1000) |
| | | }) |
| | | }).catch(errors => { |
| | | } else { |
| | | uni.$u.toast('请填写完整原发信息') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }; |