feat: supplieraudit改动
This commit is contained in:
parent
f450de1de8
commit
115869eace
|
|
@ -29,12 +29,12 @@
|
|||
</uni-forms>
|
||||
</scroll-view>
|
||||
<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>
|
||||
<ticketd_b v-if="form.ticket_" :t_id="form.id" :ticket_="form.ticket_"
|
||||
:ticket_data="ticket_data" @success="submitSuccess" ref="ticketd_b"></ticketd_b>
|
||||
<button v-else size="mini" @click="handleSave" :loading="saveLoading" :disabled="saveloading" type="primary">
|
||||
: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>
|
||||
|
|
@ -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()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<uni-easyinput v-model="form.material_name" placeholder="请输入物料名称" :disabled="mode=='show'"/>
|
||||
</uni-forms-item>
|
||||
<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 label="营业执照" required>
|
||||
<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>
|
||||
</scroll-view>
|
||||
<view class="footer_fixed">
|
||||
<ticketd_b :workflow_key="'wf_resignation'" :title="form.employee_name + '-离职申请'" :t_id="form.id" :ticket_="form.ticket_"
|
||||
@success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
|
||||
<button v-if="mode=='edit'" size="mini" @click="handleDel" :loading="saveLoading" :disabled="saveLoading" type="warn">
|
||||
删除
|
||||
</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>
|
||||
</template>
|
||||
|
|
@ -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)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
}
|
||||
Loading…
Reference in New Issue