| | |
| | | <page-nav title="生产报工"></page-nav> |
| | | |
| | | |
| | | <view v-show="topContent.length===0"> |
| | | <!-- <view v-show="topContent.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">请扫描任务条码</div> |
| | | </div> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view v-show="topContent.length!==0"> |
| | | <view class="mainContent" :style="{maxHeight:'1260rpx',overflow: 'scroll'}"> |
| | | <view class="mainContent" :style="{maxHeight:'72vh',overflow: 'scroll'}"> |
| | | |
| | | <!-- 报工信息 --> |
| | | <u-gap height="5" bgColor="#eff0f1"></u-gap> |
| | |
| | | onLoad(option) { |
| | | if (option.orderstep) { |
| | | this.fromType = '1' |
| | | this.currentpage = option.currentpage |
| | | this.getMesOrderStepStart(option.orderstep) |
| | | } else { |
| | | this.fromType = '2' |
| | |
| | | userSheetShow: false, |
| | | |
| | | fromType: '1', //来源于哪里 是页面1还是2 |
| | | |
| | | currentpage: 1, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // this.operSheetList = res.data |
| | | this.operSheetList = res.data.map(({ |
| | | usercode, |
| | | username |
| | | username, |
| | | payrate |
| | | }) => ({ |
| | | code: usercode, |
| | | name: username |
| | | name: username, |
| | | payrate: payrate |
| | | })) |
| | | this.operColumns = [this.operSheetList.map(i => i.name)] |
| | | this.userSelectArrAll = this.operSheetList |
| | |
| | | }, |
| | | userCheckboxChange(val) { |
| | | this.userCheckBoxValue = val.join(',') |
| | | this.operSheetValue = this.userCheckBoxValue |
| | | }, |
| | | |
| | | //获取开工信息 |
| | |
| | | }, |
| | | |
| | | async submit() { |
| | | // 下午写生产报工提交 |
| | | |
| | | if (this.reckway === '班组' && this.userGroupSheetValue === "") { |
| | | return uni.$u.toast('生产班组不能为空!') |
| | | } |
| | | if (this.reckway === '个人' && this.operSheetValue === "") { |
| | | return uni.$u.toast('报工人员不能为空!') |
| | | } |
| | | if (this.eqpSheetValue === "") { |
| | | return uni.$u.toast('设备名称不能为空!') |
| | | } |
| | | // if (this.eqpSheetValue === "") { |
| | | // return uni.$u.toast('设备名称不能为空!') |
| | | // } |
| | | if (this.reportqty === "") { |
| | | return uni.$u.toast('报工数量不能为空!') |
| | | } |
| | |
| | | stepcode: this.topContent[0].stepcode, |
| | | stepprice: this.topContent[0].stepprice, |
| | | |
| | | eqpcode: this.eqpSheetList.find(i => i.name === this.eqpSheetValue).code, |
| | | eqpcode: this.eqpSheetValue ? this.eqpSheetList.find(i => i.name === this.eqpSheetValue).code : |
| | | '', |
| | | |
| | | reckway: this.reckway === '班组' ? 'group' : 'person', |
| | | |
| | |
| | | .userGroupSheetValue).code : '', // 班组编码 |
| | | reportuser: this.reckway === '班组' ? reportuser.join(',') : this.userSelectArrAll.find(i => i |
| | | .name === this.operSheetValue).code, |
| | | payrate: this.reckway === '班组' ? reportuser.join(',') : this.userSelectArrAll.find(i => i |
| | | .name === this.operSheetValue).payrate, |
| | | taskqty: this.topContent[0].planqty, |
| | | startqty: parseFloat(this.reportqty), |
| | | reportqty: parseFloat(this.reportqty), |
| | |
| | | if (this.fromType === '1') { |
| | | let pages = getCurrentPages(); // 页面集合 |
| | | let beforePage = pages[pages.length - 2]; //上一个页面 |
| | | beforePage.$vm.getProductionScheduleKanban() |
| | | // beforePage.$vm.getProductionScheduleKanban() |
| | | beforePage.$vm.getProductOrderSearch(this.currentpage) |
| | | |
| | | uni.navigateBack() |
| | | } |