From d75dcb015c2739632061a48a29d784e84730fa40 Mon Sep 17 00:00:00 2001 From: sunshine <1467939124@qq.com> Date: Wed, 24 Jul 2024 17:20:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8A=A5=E5=B7=A5=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page_report/replaceForm.vue | 116 ++++++++++++++++++------------- src/page_report/reportForm.vue | 118 ++++++++++++++++++-------------- src/pages.json | 4 +- src/plugins/tab.ts | 6 +- 4 files changed, 144 insertions(+), 100 deletions(-) diff --git a/src/page_report/replaceForm.vue b/src/page_report/replaceForm.vue index 89996cb..5c04ffb 100644 --- a/src/page_report/replaceForm.vue +++ b/src/page_report/replaceForm.vue @@ -1,28 +1,41 @@ - + @@ -54,7 +67,7 @@ - + @@ -66,8 +79,8 @@ - - + + @@ -79,12 +92,15 @@ - - - + + + + 新增产品 + + + 保存 + + @@ -138,8 +154,6 @@ export default { produceReportDetails: {rules: [ {format: 'array', errorMessage: '产品列表格式错误'}, {validateFunction: function(rule, value, data, callback) { - console.log('value:'+value) - console.log('data:'+data) if (value.length < 2) { callback('产品信息不能为空') } @@ -160,7 +174,6 @@ export default { onLoad() { this.getUserList() this.updateId = tab.getParams() - console.log(this.updateId) if(this.updateId){ this.disableEnable = true //请求编辑数据 @@ -225,7 +238,7 @@ export default { }) } }).catch(err => { - console.log('err', err); + }) }, maskClick(e){ @@ -312,33 +325,42 @@ export default { this.getPlanProductList() }, handleProductChange(e){ - console.log(e) } } } - diff --git a/src/page_report/reportForm.vue b/src/page_report/reportForm.vue index f048051..6ee65c4 100644 --- a/src/page_report/reportForm.vue +++ b/src/page_report/reportForm.vue @@ -1,27 +1,40 @@ - + - + @@ -54,7 +67,7 @@ - + @@ -66,7 +79,7 @@ - + @@ -79,12 +92,15 @@ - - - + + + + 新增产品 + + + 保存 + + @@ -147,12 +163,10 @@ export default { updateId: undefined } }, - computed: { - }, onLoad() { this.getOrgIdList() // this.getPlanProductList() - this.updateId = tab.getParams() + this.updateId = tab.getParams(); if(this.updateId){ this.disableEnable = true //请求编辑数据 @@ -184,7 +198,6 @@ export default { submit(ref) { if(this.customFormData.reportDateString.length<11)this.customFormData.reportDateString+=' 00:00:00'; this.customFormData.reportType = '个人'; - console.log(this.customFormData); this.$refs[ref].validate().then(res => { var ok = 1; if(this.customFormData.produceReportDetails && this.customFormData.produceReportDetails.length > 0) { @@ -220,7 +233,6 @@ export default { }) } }).catch(err => { - console.log('err', err); }) }, maskClick(e){ @@ -290,34 +302,40 @@ export default { (Number(this.customFormData.produceReportDetails[index].qualityNumber)*100/Number(this.customFormData.produceReportDetails[index].totalNumber)).toFixed(2); }, handleOrgTypeChange(e){ - console.log(e) this.getPlanProductList() } } } - diff --git a/src/pages.json b/src/pages.json index 09f9613..dcc6366 100644 --- a/src/pages.json +++ b/src/pages.json @@ -72,7 +72,7 @@ { "path": "reportForm", "style": { - "navigationBarTitleText": "生产报工" + "navigationStyle": "custom" } }, { @@ -84,7 +84,7 @@ { "path": "replaceForm", "style": { - "navigationBarTitleText": "代报工" + "navigationStyle": "custom" } } , diff --git a/src/plugins/tab.ts b/src/plugins/tab.ts index bdb4eb0..571b79d 100644 --- a/src/plugins/tab.ts +++ b/src/plugins/tab.ts @@ -88,6 +88,10 @@ export default { * 获取当前页面参数 */ getParams(): any { - return JSON.parse(_params) + if(_params) { + return JSON.parse(_params) + } else { + return undefined + } } }