| | |
| | | <view>{{item.stepname}}</view> |
| | | <view>{{item.planqty}}</view> |
| | | <view>{{item.noreportqty}}/{{item.reportqty}}</view> |
| | | <view>{{item.nextstepname}}</view> |
| | | <view>{{item.nextstepname?item.nextstepname:'/'}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | </view> |
| | | |
| | | <u-icon @click="deleteUser(item)" style="width: 50rpx;text-align: center;" name="trash" |
| | | min='0' max='100' color="#2979ff" size="40"> |
| | | min='0' max='100' color="#2979ff" size="24"> |
| | | </u-icon> |
| | | |
| | | </view> |
| | |
| | | <u-checkbox-group @change="checkboxChange" size='20px' v-model="checkBoxValue" iconPlacement="right" |
| | | placement="column"> |
| | | <view v-for="(item,index) in badSelectArr"> |
| | | <u-checkbox activeColor="rgb(0, 102, 255)" labelSize='40' :key="item.code" :name='item.name' |
| | | <u-checkbox activeColor="rgb(0, 102, 255)" labelSize='18' :key="item.code" :name='item.name' |
| | | :label="item.name"> |
| | | </u-checkbox> |
| | | <u-divider :key="item.code"></u-divider> |
| | |
| | | |
| | | <script> |
| | | import { |
| | | MesOrderStepStart |
| | | MesOrderStepStart, |
| | | PersonPermissions, |
| | | EqpPermissionsPlus, |
| | | GroupsPermissions, |
| | | GroupsPersonPermissions, |
| | | DefectPermissions |
| | | } from '../../config/api.js'; |
| | | // import scanCode from '@/components/scan-code/scan-code.vue' |
| | | export default { |
| | |
| | | |
| | | |
| | | this.getMesOrderStepStart('SGPO20231110_1;101') |
| | | // this.getMesOrderStepReportSelectUserGroup() //获取生产班组 |
| | | // this.getMesOrderStepStartSelectEqp('MO-2023-02-1502;GX002') //获取设备名称 |
| | | // this.getMesOrderStepSelectCause('MO-2023-02-1502;GX002') |
| | | // this.getMesOrderSelectUser() //获取操作人员 |
| | | // this.getMesOrderGroupSelectUser('BZ001') //根据班组获取人员 |
| | | this.getGroupsPermissions() //获取生产班组 |
| | | this.getEqpPermissionsPlus() //获取设备名称 |
| | | this.getDefectPermissions() //获取缺陷下拉 |
| | | this.getPersonPermissions() //获取操作人员 |
| | | // this.getGroupsPersonPermissions('BZ001') //根据班组获取人员 |
| | | }, |
| | | methods: { |
| | | init() { |
| | |
| | | }, |
| | | |
| | | //获取生产班组 |
| | | async getMesOrderStepReportSelectUserGroup(wkshopcode) { |
| | | const data = { |
| | | stu_torgcode: uni.getStorageSync('stu_torgcode'), |
| | | stu_torgtypecode: uni.getStorageSync('description'), |
| | | wkshopcode |
| | | } |
| | | async getGroupsPermissions(wkshopcode) { |
| | | |
| | | const res = await MesOrderStepReportSelectUserGroup(this.global.formatData(data)) |
| | | const res = await GroupsPermissions() |
| | | if (res.code === '200') { |
| | | // 数组对象 替换对象键名 |
| | | this.userGroupSheetList = res.data.map(({ |
| | | group_code, |
| | | group_name |
| | | usergroupcode, |
| | | usergroupname |
| | | }) => ({ |
| | | code: group_code, |
| | | name: group_name |
| | | code: usergroupcode, |
| | | name: usergroupname |
| | | })) |
| | | |
| | | this.userGroupColumns = [this.userGroupSheetList.map(i => i.name)] |
| | | } |
| | | }, |
| | | // 获取设备名称 |
| | | async getMesOrderStepStartSelectEqp(orderstepqrcode) { |
| | | const res = await MesOrderStepStartSelectEqp(this.global.formatData({ |
| | | orderstepqrcode |
| | | })) |
| | | async getEqpPermissionsPlus() { |
| | | const res = await EqpPermissionsPlus() |
| | | if (res.code === '200') { |
| | | this.eqpSheetList = res.data |
| | | this.eqpColumns = [this.eqpSheetList.map(i => i.name)] |
| | | } |
| | | }, |
| | | // 获取不良原因 |
| | | async getMesOrderStepSelectCause(orderstepqrcode) { |
| | | const res = await MesOrderStepSelectCause(this.global.formatData({ |
| | | orderstepqrcode |
| | | })) |
| | | async getDefectPermissions(orderstepqrcode) { |
| | | const res = await DefectPermissions() |
| | | if (res.code === '200') { |
| | | this.badSelectArr = res.data |
| | | } |
| | | }, |
| | | // 获取操作人员 |
| | | async getMesOrderSelectUser() { |
| | | const res = await MesOrderSelectUser() |
| | | async getPersonPermissions() { |
| | | const res = await PersonPermissions() |
| | | if (res.code === '200') { |
| | | // this.operSheetList = res.data |
| | | this.operSheetList = res.data.map(({ |
| | | usercode, |
| | | username |
| | |
| | | } |
| | | }, |
| | | // 根据生产班组获取人员 |
| | | async getMesOrderGroupSelectUser(usergroupcode) { |
| | | const data = { |
| | | usergroupcode, |
| | | stu_torgcode: uni.getStorageSync('stu_torgcode') |
| | | } |
| | | const res = await MesOrderGroupSelectUser(this.global.formatData(data)) |
| | | async getGroupsPersonPermissions(usergroupcode) { |
| | | const res = await GroupsPersonPermissions() |
| | | if (res.code === '200') { |
| | | this.userArr = res.data |
| | | this.calculatedValue() |
| | |
| | | if (res.code === '200' && res.count === 1) { |
| | | this.formData = res.data |
| | | this.topContent.unshift(res.data) |
| | | this.getMesOrderStepReportSelectUserGroup(res.data.wkshopcode) |
| | | let o = res.data.wo_code + ';' + res.data.stepcode |
| | | this.getMesOrderStepStartSelectEqp(o) |
| | | this.getMesOrderStepSelectCause(o) |
| | | this.getMesOrderSelectUser() |
| | | // this.getGroupsPermissions(res.data.wkshopcode) |
| | | // let o = res.data.wo_code + ';' + res.data.stepcode |
| | | // this.getEqpPermissionsPlus(o) |
| | | // this.getDefectPermissions(o) |
| | | // this.getPersonPermissions() |
| | | |
| | | } else if (res.code === '200' && res.count !== 1) { |
| | | this.$u.toast('此工序已报工!') |
| | |
| | | }, |
| | | userGroupPickerConfirm(val) { |
| | | console.log(val, 11) |
| | | this.getMesOrderGroupSelectUser(this.userGroupSheetList.find(i => i.name === val.value[0]).code) |
| | | this.getGroupsPersonPermissions(this.userGroupSheetList.find(i => i.name === val.value[0]).code) |
| | | this.userGroupSheetValue = val.value[0] |
| | | this.userGroupSheetShow = false |
| | | }, |