feat: supplieraudit改动
This commit is contained in:
parent
f450de1de8
commit
115869eace
|
|
@ -29,12 +29,12 @@
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="footer_fixed">
|
<view class="footer_fixed">
|
||||||
<button v-if="mode=='edit'" size="mini" @click="handleDel" :loading="saveLoading" :disabled="saveloading" type="warn">
|
<button v-if="mode=='edit'" size="mini" @click="handleDel" :loading="saveLoading" :disabled="saveLoading" type="warn">
|
||||||
删除
|
删除
|
||||||
</button>
|
</button>
|
||||||
<ticketd_b v-if="form.ticket_" :t_id="form.id" :ticket_="form.ticket_"
|
<ticketd_b v-if="form.ticket_" :t_id="form.id" :ticket_="form.ticket_"
|
||||||
:ticket_data="ticket_data" @success="submitSuccess" ref="ticketd_b"></ticketd_b>
|
:ticket_data="ticket_data" @success="()=>{uni.navigateBack()}" ref="ticketd_b"></ticketd_b>
|
||||||
<button v-else size="mini" @click="handleSave" :loading="saveLoading" :disabled="saveloading" type="primary">
|
<button v-else size="mini" @click="handleSave" :loading="saveLoading" :disabled="saveLoading" type="primary">
|
||||||
提交审批
|
提交审批
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -49,7 +49,7 @@ import {actStateEnum} from "@/utils/enum.js"
|
||||||
components: { ticketd_b, ticketd },
|
components: { ticketd_b, ticketd },
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
saveloading: false,
|
saveLoading: false,
|
||||||
mode:"show",
|
mode:"show",
|
||||||
t_id: null,
|
t_id: null,
|
||||||
form:{
|
form:{
|
||||||
|
|
@ -123,9 +123,6 @@ import {actStateEnum} from "@/utils/enum.js"
|
||||||
await that.$api.resignationCreate(that.form)
|
await that.$api.resignationCreate(that.form)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
submitSuccess(){
|
|
||||||
uni.navigateBack()
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
<uni-easyinput v-model="form.material_name" placeholder="请输入物料名称" :disabled="mode=='show'"/>
|
<uni-easyinput v-model="form.material_name" placeholder="请输入物料名称" :disabled="mode=='show'"/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="调查表" required>
|
<uni-forms-item label="调查表" required>
|
||||||
<uni-file-picker limit="1" file-mediatype="all" v-model="form.survery_form" @success="uploadSuccess('1')"></uni-file-picker>
|
<uni-file-picker limit="1" file-mediatype="all" v-model="form.survery_form" @success="(e)=>{uploadSuccess('1', e)}"></uni-file-picker>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="营业执照" required>
|
<uni-forms-item label="营业执照" required>
|
||||||
<uni-file-picker limit="1" file-mediatype="all" v-model="form.business_license" @success="uploadSuccess('2')"></uni-file-picker>
|
<uni-file-picker limit="1" file-mediatype="all" v-model="form.business_license" @success="uploadSuccess('2')"></uni-file-picker>
|
||||||
|
|
@ -25,8 +25,14 @@
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="footer_fixed">
|
<view class="footer_fixed">
|
||||||
<ticketd_b :workflow_key="'wf_resignation'" :title="form.employee_name + '-离职申请'" :t_id="form.id" :ticket_="form.ticket_"
|
<button v-if="mode=='edit'" size="mini" @click="handleDel" :loading="saveLoading" :disabled="saveLoading" type="warn">
|
||||||
@success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
|
删除
|
||||||
|
</button>
|
||||||
|
<ticketd_b v-if="form.ticket_" :t_id="form.id" :ticket_="form.ticket_"
|
||||||
|
:ticket_data="ticket_data" @success="()=>{uni.navigateBack()}" ref="ticketd_b"></ticketd_b>
|
||||||
|
<button v-else size="mini" @click="handleSave" :loading="saveLoading" :disabled="saveLoading" type="primary">
|
||||||
|
提交审批
|
||||||
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -39,6 +45,7 @@ import {actStateEnum} from "@/utils/enum.js"
|
||||||
components: { ticketd_b, ticketd },
|
components: { ticketd_b, ticketd },
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
saveLoading: false,
|
||||||
mode:"add",
|
mode:"add",
|
||||||
t_id: null,
|
t_id: null,
|
||||||
form:{
|
form:{
|
||||||
|
|
@ -71,42 +78,28 @@ import {actStateEnum} from "@/utils/enum.js"
|
||||||
that.t_id = options.t_id?options.t_id:null;
|
that.t_id = options.t_id?options.t_id:null;
|
||||||
if(that.mode != "add"){
|
if(that.mode != "add"){
|
||||||
if(that.t_id) {
|
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 ) {
|
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
|
||||||
that.mode = "edit";
|
that.mode = "edit";
|
||||||
}else{
|
}else{
|
||||||
that.mode = "show";
|
that.mode = "show";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
that.getEmployee();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
async getEmployee(){
|
uploadSuccess(type, e){
|
||||||
let that = this;
|
console.log('type', type, e);
|
||||||
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);
|
|
||||||
console.log('form.material_type',this.form.material_type)
|
console.log('form.material_type',this.form.material_type)
|
||||||
},
|
},
|
||||||
async submit_b_func(id){
|
async handleSave(id){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$refs.customForm.validate().then(res => {
|
that.$refs.customForm.validate().then(res => {
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log('err', err);
|
console.log('err', err);
|
||||||
})
|
})
|
||||||
let res = await that.$api.pfCreate(that.form)
|
let res = await that.$api.supplierauditCreate(that.form)
|
||||||
that.form.id = res.id;
|
|
||||||
},
|
|
||||||
submitSuccess(){
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/index/index"
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,5 +77,7 @@ export default {
|
||||||
resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data),
|
resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data),
|
||||||
resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data),
|
resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data),
|
||||||
resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'),
|
resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'),
|
||||||
|
//供应商审核
|
||||||
|
supplierauditCreate:(data) => http(`/pum/supplieraudit/`, 'POST' , data),
|
||||||
|
supplierauditItem:(id,data) => http(`/pum/supplieraudit/${id}/`, 'GET', data),
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue