Files
JY1.0/src/api/PurchasingCenter/PurchaseContractApproval.js
2020-03-14 12:09:10 +08:00

88 lines
3.3 KiB
JavaScript

import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_合同审批_查询数据'
}
})
}
// 初始化采购员
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '人事档案管理_人员与角色_查询数据_采购员'
}
})
}
// 查询供应商
export function searchSupplier(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, check9, value9, check10, value10, check11, value11, check12, value12) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_供应商_查询数据_根据条件',
param: '供应商名称_check=' + check1 + '&供应商名称=' + value1 + '&企业性质_check=' + check2 + '&企业性质=' + value2 + '&创立日期_check=' + check3 + '&创立日期=' + value3 + '&注册资本_check=' + check4 + '&注册资本=' + value4 + '&税号_check=' + check5 + '&税号=' + value5 + '&电子信箱_check=' + check6 + '&电子信箱=' + value6 + '&地址_check=' + check7 + '&地址=' + value7 + '&帐号_check=' + check8 + '&帐号=' + value8 + '&开户行_check=' + check9 + '&开户行=' + value9 + '&电话号码_check=' + check10 + '&电话号码=' + value10 + '&传真_check=' + check11 + '&传真=' + value11 + '&货期_check=' + check12 + '&货期=' + value12
}
})
}
// 采购合同查询
export function searchTable1(pageCurrent, pageSize, check1, start, end, check2, contract, check3, name, check4, supplier) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_合同审批_查询数据',
param: '时间段_check=' + check1 + '&开始时间=' + start + '=datetime&结束时间=' + end + '=datetime&采购合同流水号_check=' + check2 + '&采购合同流水号=' + contract + '&人员编号_check=' + check3 + '&人员编号=' + name + '&供应商名称_check=' + check4 + '&供应商名称=' + supplier,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 采购合同明细查询
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num
}
})
}
// 执行审批
export function submitApproval(num, num1, num2, id) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '采购管理_合同审批_采购部_修改数据',
param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2 + '&审核人=' + id
}
})
}