| | |
| | | </div>
|
| | | </div>
|
| | | <!-- v-if="info.status === 2 || info.procedureNeedcheck === 1" -->
|
| | | <template>
|
| | | <template v-if="info.status === 2 || info.procedureNeedcheck === 1">
|
| | | <div class="bh_zw"></div>
|
| | | <div class="bg_footer bg_f7">
|
| | | <div class="bg_footer_submit bg_m" v-if="typeView == 0" @click="submit">确认报工</div>
|
| | |
| | | categoryExtList,
|
| | | queryOne,
|
| | | queryList
|
| | | } from '@/util/api/PlanningAPI' |
| | | import { REGULAR } from '@/util/utils'
|
| | | } from '@/util/api/PlanningAPI'
|
| | | import {
|
| | | REGULAR
|
| | | } from '@/util/utils'
|
| | | export default {
|
| | | components: {
|
| | | workOrderInfo
|
| | |
| | | undesirableId: '',
|
| | | undesirable: '' // 不良
|
| | | },
|
| | | triggered: false, |
| | | triggered: false,
|
| | | finished: true,
|
| | | djData: [],
|
| | | cateList: [],
|
| | |
| | | this.workorderId = obj.id
|
| | | this.queryByIds()
|
| | | this.getOrocessRecords()
|
| | | this.getData() |
| | | uni.$on('spotAdd', () => { |
| | | if (this.typeView == 1) { |
| | | this.pages.page = 1 |
| | | this.pageDJs() |
| | | } |
| | | this.getData()
|
| | | uni.$on('spotAdd', () => {
|
| | | if (this.typeView == 1) {
|
| | | this.pages.page = 1
|
| | | this.pageDJs()
|
| | | }
|
| | | })
|
| | | uni.$on('addMaterial', () => {
|
| | | this.getOrocessRecords()
|
| | | })
|
| | | },
|
| | | computed: {
|
| | |
| | | },
|
| | | clickIten(index) {
|
| | | this.typeView = index
|
| | | if (this.typeView == 1) { |
| | | if (this.typeView == 1) {
|
| | | this.pages.page = 1
|
| | | this.pageDJs()
|
| | | }
|
| | |
| | | this.form.index = index
|
| | | this.form.type = item.type
|
| | | },
|
| | | submit() { |
| | | let createUnqualifiedDTOList = this.form.defective.map((item) => { |
| | | return { |
| | | categoryId: item.id, |
| | | unQualifiedNum: item.num |
| | | } |
| | | }) |
| | | let createWorkorderRecordDTO = { |
| | | workorderId: this.workorderId, |
| | | duration: this.form.duration ? this.form.duration : 0, |
| | | qualifiedNum: this.produceFrom.qualified ? this.produceFrom.qualified : 0, |
| | | unQualifiedNum: this.produceFrom.undesirable ? this.produceFrom.undesirable : 0 |
| | | } |
| | | // id: route.query.id |
| | | comfirmDoneStandard({ |
| | | createUnqualifiedDTOList, |
| | | createWorkorderRecordDTO |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | uni.$u.toast('报工成功') |
| | | setTimeout(() => { |
| | | uni.navigateBack({ data: 2}) |
| | | }, 2000) |
| | | } |
| | | }) |
| | | submit() {
|
| | | let createUnqualifiedDTOList = this.form.defective.map((item) => {
|
| | | return {
|
| | | categoryId: item.id,
|
| | | unQualifiedNum: item.num
|
| | | }
|
| | | })
|
| | | let createWorkorderRecordDTO = {
|
| | | workorderId: this.workorderId,
|
| | | duration: this.form.duration ? this.form.duration : 0,
|
| | | qualifiedNum: this.produceFrom.qualified ? this.produceFrom.qualified : 0,
|
| | | unQualifiedNum: this.produceFrom.undesirable ? this.produceFrom.undesirable : 0
|
| | | }
|
| | | // id: route.query.id
|
| | | comfirmDoneStandard({
|
| | | createUnqualifiedDTOList,
|
| | | createWorkorderRecordDTO
|
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | uni.$u.toast('报工成功')
|
| | | setTimeout(() => {
|
| | | uni.navigateBack({
|
| | | data: 2
|
| | | })
|
| | | }, 2000)
|
| | | }
|
| | | })
|
| | | },
|
| | | jumpdj() {
|
| | | uni.navigateTo({
|
| | | url: `/pages_adjust/pages/spotCheck/spotCheck?id=${this.workorderId}`
|
| | | })
|
| | | }, |
| | | getLists() { |
| | | if (!this.finished) { |
| | | return |
| | | } |
| | | this.finished = false |
| | | this.pages.page += 1 |
| | | this.pageDJs() |
| | | },
|
| | | pageDJs() { |
| | | |
| | | getLists() {
|
| | | if (!this.finished) {
|
| | | return
|
| | | }
|
| | | this.finished = false
|
| | | this.pages.page += 1
|
| | | this.pageDJs()
|
| | | },
|
| | | pageDJs() {
|
| | |
|
| | | pageDJ({
|
| | | capacity: this.pages.capacity,
|
| | | page: this.pages.page,
|
| | | model: {
|
| | | workorderId: this.workorderId
|
| | | }
|
| | | }).then(res => { |
| | | let {data} = res |
| | | if (data.page == 1) { |
| | | this.djData = [] |
| | | } |
| | | this.djData.push(...data.records)
|
| | | // loading.value = false
|
| | | }).catch(err => {
|
| | | // loading.value = false
|
| | | // finished.value = true
|
| | | }) |
| | | .finally(() => { |
| | | this.finished = true |
| | | })
|
| | | capacity: this.pages.capacity,
|
| | | page: this.pages.page,
|
| | | model: {
|
| | | workorderId: this.workorderId
|
| | | }
|
| | | }).then(res => {
|
| | | let {
|
| | | data
|
| | | } = res
|
| | | if (data.page == 1) {
|
| | | this.djData = []
|
| | | }
|
| | | this.djData.push(...data.records)
|
| | | // loading.value = false
|
| | | }).catch(err => {
|
| | | // loading.value = false
|
| | | // finished.value = true
|
| | | })
|
| | | .finally(() => {
|
| | | this.finished = true
|
| | | })
|
| | | },
|
| | | dele(id) {
|
| | | deletedj(id)
|
| | |
| | | // url: ''
|
| | | url: `/pages_adjust/pages/manualFeed/manualFeed?id=${this.workorderId}`
|
| | | })
|
| | | },
|
| | | deleItem(id, type) {
|
| | | uni.showModal({
|
| | | title: '提示',
|
| | | content: '确定删除此条记录吗?',
|
| | | success: (res) => {
|
| | | if (res.confirm) {
|
| | | console.log('用户点击确定');
|
| | | deleteCT(id)
|
| | | .then(res => { |
| | | this.getOrocessRecords()
|
| | | // if (type === 'C') {
|
| | | // this.getOrocessRecordCC()
|
| | | // } else if (type === 'T') {
|
| | | // this.getOrocessRecords()
|
| | | // }
|
| | | }) |
| | | .catch(err => {})
|
| | | }
|
| | | }
|
| | | })
|
| | | }
|
| | | }
|
| | | }
|