From 115869eace363513ad0ec2c6d32f5b9991925428 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 1 Dec 2025 14:28:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20supplieraudit=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/hrm/resignation_form.vue | 11 ++++------ pages/pum/supplieraudit_form.vue | 37 +++++++++++++------------------- utils/api.js | 4 +++- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/pages/hrm/resignation_form.vue b/pages/hrm/resignation_form.vue index 96c3cb6..7a0ea48 100644 --- a/pages/hrm/resignation_form.vue +++ b/pages/hrm/resignation_form.vue @@ -29,12 +29,12 @@ - - @@ -49,7 +49,7 @@ import {actStateEnum} from "@/utils/enum.js" components: { ticketd_b, ticketd }, data(){ return{ - saveloading: false, + saveLoading: false, mode:"show", t_id: null, form:{ @@ -123,9 +123,6 @@ import {actStateEnum} from "@/utils/enum.js" await that.$api.resignationCreate(that.form) uni.navigateBack() }, - submitSuccess(){ - uni.navigateBack() - }, } } diff --git a/pages/pum/supplieraudit_form.vue b/pages/pum/supplieraudit_form.vue index 294d4a1..8025740 100644 --- a/pages/pum/supplieraudit_form.vue +++ b/pages/pum/supplieraudit_form.vue @@ -14,7 +14,7 @@ - + @@ -25,8 +25,14 @@ - + + + @@ -39,6 +45,7 @@ import {actStateEnum} from "@/utils/enum.js" components: { ticketd_b, ticketd }, data(){ return{ + saveLoading: false, mode:"add", t_id: null, form:{ @@ -71,42 +78,28 @@ import {actStateEnum} from "@/utils/enum.js" that.t_id = options.t_id?options.t_id:null; if(that.mode != "add"){ if(that.t_id) { - that.form = await that.$api.pfItem(that.t_id); + that.form = await that.$api.supplierauditItem(that.t_id); if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) { that.mode = "edit"; }else{ that.mode = "show"; } } - }else{ - that.getEmployee(); } }, methods:{ - async getEmployee(){ - let that = this; - let obj = {search:that.form.employee_name,page:0,query:'{name,id}'} - let res = await that.$api.employeeList(obj); - that.form.employee = res[0].id; - }, - uploadSuccess(type){ - console.log('type', type); + uploadSuccess(type, e){ + console.log('type', type, e); console.log('form.material_type',this.form.material_type) }, - async submit_b_func(id){ + async handleSave(id){ let that = this; that.$refs.customForm.validate().then(res => { }).catch(err => { console.log('err', err); }) - let res = await that.$api.pfCreate(that.form) - that.form.id = res.id; - }, - submitSuccess(){ - uni.navigateTo({ - url: "/pages/index/index" - }) + let res = await that.$api.supplierauditCreate(that.form) }, } } diff --git a/utils/api.js b/utils/api.js index 0518389..8d000bd 100644 --- a/utils/api.js +++ b/utils/api.js @@ -77,5 +77,7 @@ export default { resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data), resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data), resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'), - + //供应商审核 + supplierauditCreate:(data) => http(`/pum/supplieraudit/`, 'POST' , data), + supplierauditItem:(id,data) => http(`/pum/supplieraudit/${id}/`, 'GET', data), } \ No newline at end of file