| | |
| | | :borderBottom="false" |
| | | :model="dataForm" |
| | | ref="uForm"> |
| | | <u-form-item label="煤场" |
| | | <u-form-item label="仓库" |
| | | prop="firstClass" |
| | | :borderBottom="false"> |
| | | <u-cell-group> |
| | |
| | | size="30"></u-icon></u-cell> |
| | | </u-cell-group> |
| | | </u-form-item> |
| | | <u-form-item label="煤仓" |
| | | <!-- <u-form-item label="煤仓" |
| | | prop="secondClass" |
| | | :borderBottom="false"> |
| | | <u-cell-group> |
| | |
| | | </view> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | </u-form-item> |
| | | </u-form-item> --> |
| | | </u--form> |
| | | <view class="coal-name" |
| | | v-show="coalList.length!==0"> |
| | |
| | | <view style="margin-top: 20rpx;"> |
| | | <u-button type="primary" |
| | | shape="circle" |
| | | text="提交" |
| | | text="查看该仓库收发单" |
| | | @click.stop="formHandle"></u-button> |
| | | </view> |
| | | <!-- 煤场 --> |
| | |
| | | @close='firstClassClose' |
| | | @select="firstClassSelectClick"></u-action-sheet> |
| | | <!-- 煤仓 --> |
| | | <u-action-sheet :actions="secondClassActionsList" |
| | | <!-- <u-action-sheet :actions="secondClassActionsList" |
| | | :show="secondClassShow" |
| | | cancelText='取消' |
| | | :closeOnClickOverlay='true' |
| | | @close='secondClassClose' |
| | | @select="secondClassSelectClick"></u-action-sheet> |
| | | @select="secondClassSelectClick"></u-action-sheet> --> |
| | | <!--磅单类型 --> |
| | | <u-action-sheet :actions="orderTypeList" |
| | | <!-- <u-action-sheet :actions="orderTypeList" |
| | | :show="orderTypeShow" |
| | | cancelText='取消' |
| | | :closeOnClickOverlay='true' |
| | | @close='orderTypeClose' |
| | | @select="orderTypeSelectClick"></u-action-sheet> |
| | | @select="orderTypeSelectClick"></u-action-sheet> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | dataForm: { |
| | | firstClass: "", |
| | | secondClass: "", |
| | | orderType: '' |
| | | orderType: '', |
| | | bunkerId:"" |
| | | }, |
| | | index: '', |
| | | // 煤场操作菜单 |
| | |
| | | uni.showLoading({ |
| | | title: "加载中" |
| | | }) |
| | | this.$reqGet('getDeptIdFiled').then(res => { |
| | | this.$reqGet('getWarehouseList').then(res => { |
| | | uni.hideLoading() |
| | | if (res.code === 0) { |
| | | this.firstClassActionsList = res.data |
| | | this.firstClassActionsList = res.data; |
| | | if(res.data.length === 1){ |
| | | this.dataForm.bunkerId = res.data[0].id; |
| | | this.dataForm.firstClass = res.data[0].name; |
| | | setTimeout(()=>{ |
| | | uni.navigateTo({ |
| | | url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?bunkerId=${this.dataForm.bunkerId}` |
| | | }) |
| | | },300) |
| | | |
| | | } |
| | | } else { |
| | | this.$u.toast('加载失败') |
| | | } |
| | |
| | | this.firstClassShow = false |
| | | }, |
| | | firstClassSelectClick(val) { |
| | | this.dataForm.firstClass = val.name |
| | | this.getFiledIdCoalBunker(val.id) |
| | | this.dataForm.firstClass = val.name; |
| | | this.dataForm.bunkerId= val.id; |
| | | this.filedId = val.id |
| | | }, |
| | | // 获取煤仓 |
| | | getFiledIdCoalBunker(filedId) { |
| | | this.$reqGet('getFiledIdCoalBunker', { filedId, }).then(res => { |
| | | this.secondClassActionsList = res.data |
| | | }) |
| | | }, |
| | | // getFiledIdCoalBunker(filedId) { |
| | | // this.$reqGet('getFiledIdCoalBunker', { filedId, }).then(res => { |
| | | // this.secondClassActionsList = res.data |
| | | // }) |
| | | // }, |
| | | //煤仓菜单 |
| | | secondClassSelect() { |
| | | this.secondClassShow = true |
| | | }, |
| | | secondClassClose() { |
| | | this.secondClassShow = false |
| | | }, |
| | | secondClassSelectClick(val) { |
| | | this.dataForm.secondClass = val.name |
| | | this.coalList = this.secondClassActionsList.find(v => v.id === val.id).coalNames.split(',').map(v => { |
| | | return { |
| | | name: v, |
| | | id: Math.floor(Math.random() * 100) + 1, |
| | | checked: false |
| | | } |
| | | }) |
| | | }, |
| | | orderTypeSelect() { |
| | | this.orderTypeShow = true |
| | | }, |
| | | orderTypeClose() { |
| | | this.orderTypeShow = false |
| | | }, |
| | | orderTypeSelectClick(val) { |
| | | this.orderTypeShow = false |
| | | this.dataForm.orderType = val.name |
| | | this.isOrderType = '' |
| | | }, |
| | | cleanOrderType() { |
| | | this.dataForm.orderType = null |
| | | this.isOrderType = '请选择' |
| | | this.orderTypeShow = false |
| | | }, |
| | | checkboxChange(e) { |
| | | this.selectedCoal = e |
| | | }, |
| | | // secondClassSelect() { |
| | | // this.secondClassShow = true |
| | | // }, |
| | | // secondClassClose() { |
| | | // this.secondClassShow = false |
| | | // }, |
| | | // secondClassSelectClick(val) { |
| | | // this.dataForm.secondClass = val.name |
| | | // this.coalList = this.secondClassActionsList.find(v => v.id === val.id).coalNames.split(',').map(v => { |
| | | // return { |
| | | // name: v, |
| | | // id: Math.floor(Math.random() * 100) + 1, |
| | | // checked: false |
| | | // } |
| | | // }) |
| | | // }, |
| | | // orderTypeSelect() { |
| | | // this.orderTypeShow = true |
| | | // }, |
| | | // orderTypeClose() { |
| | | // this.orderTypeShow = false |
| | | // }, |
| | | // orderTypeSelectClick(val) { |
| | | // this.orderTypeShow = false |
| | | // this.dataForm.orderType = val.name |
| | | // this.isOrderType = '' |
| | | // }, |
| | | // cleanOrderType() { |
| | | // this.dataForm.orderType = null |
| | | // this.isOrderType = '请选择' |
| | | // this.orderTypeShow = false |
| | | // }, |
| | | // checkboxChange(e) { |
| | | // this.selectedCoal = e |
| | | // }, |
| | | formHandle() { |
| | | if (!this.dataForm.firstClass || !this.dataForm.secondClass) return this.$u.toast('请选择煤场或者煤仓') |
| | | if (this.selectedCoal.length === 0) return this.$u.toast('请选择煤种') |
| | | this.$reqPost('updateUser', Object.assign(this.userInfo, { |
| | | responsibilityCoal: this.selectedCoal.join(), |
| | | filedId: this.filedId |
| | | }), 'json').then(res => { |
| | | uni.navigateTo({ |
| | | url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?orderType=${this.dataForm.orderType}` |
| | | if (!this.dataForm.firstClass) return this.$u.toast('请选择煤场或者煤仓'); |
| | | this.$nextTick(()=>{ |
| | | uni.navigateTo({ |
| | | url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?bunkerId=${this.dataForm.bunkerId}` |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | onShow(){ |
| | | uni.showLoading({ |
| | | title: "加载中" |
| | | }) |
| | | this.$reqGet('getWarehouseList').then(res => { |
| | | uni.hideLoading() |
| | | if (res.code === 0) { |
| | | this.firstClassActionsList = res.data; |
| | | if(res.data.length === 1){ |
| | | this.dataForm.bunkerId = res.data[0].id; |
| | | this.dataForm.firstClass = res.data[0].name; |
| | | |
| | | } |
| | | } else { |
| | | this.$u.toast('加载失败') |
| | | } |
| | | }).then(() => { |
| | | this.getUserInfo() |
| | | }) |
| | | } |
| | | } |
| | | </script> |