From 4fa0cbae96cde47e4878e16c87da294903a457ae Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 11 九月 2023 17:41:21 +0800
Subject: [PATCH] 同步素材库商品
---
minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue | 160 +++++++++++++++++++++++++++++++---------------------
1 files changed, 95 insertions(+), 65 deletions(-)
diff --git a/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue b/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
index 192b5f4..7f7965e 100644
--- a/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
+++ b/minipro_standard/pages_adjust/pages/workOrderReporting/workOrderReporting.vue
@@ -189,7 +189,7 @@
</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>
@@ -247,8 +247,10 @@
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
@@ -291,7 +293,7 @@
undesirableId: '',
undesirable: '' // 涓嶈壇
},
- triggered: false,
+ triggered: false,
finished: true,
djData: [],
cateList: [],
@@ -306,12 +308,15 @@
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: {
@@ -410,7 +415,7 @@
},
clickIten(index) {
this.typeView = index
- if (this.typeView == 1) {
+ if (this.typeView == 1) {
this.pages.page = 1
this.pageDJs()
}
@@ -514,67 +519,71 @@
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)
@@ -639,6 +648,27 @@
// 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 => {})
+ }
+ }
+ })
}
}
}
--
Gitblit v1.9.3