Files
JY1.0/src/api/WorkshopProcurement/CreatingProcurementContracts.js
2018-11-15 11:31:19 +08:00

131 lines
4.5 KiB
JavaScript

import request from '@/utils/request'
// 初始化付款方式
export function initPayMethod() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款方式_查询数据'
}
})
}
// 查询合同模板
export function searchContractDemo(num1 = null) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_合同模板_查询数据',
param: '合同模板流水号=' + num1
}
})
}
export function initPurchaseOrder() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间管理_基本件采购_请购单_查询数据'
}
})
}
export function searchData(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间管理_基本件采购_请购单明细_查询数据',
param: '请购单流水号=' + num
}
})
}
// 初始化付款时间节点
export function initPayTimeNode() {
return request({
url: '',
method: 'post',
data: {
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: {
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
}
})
}
// 查询询价单列表 表1
export function searchInquirySheet(check1, value1, check2, value2, check3, id) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单_查询数据',
param: `供应商流水号_check=${check1}&供应商流水号=${value1}&询价单编号_check=${check2}&询价单编号=${value2}&采购员流水号_check=${check3}&采购员流水号=${id}`
}
})
}
// 根据询价单流水号查询询价单详情
export function searchSheetDetail(num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单明细_查询数据',
param: '询价单流水号_check=1&询价单流水号=' + num2
}
})
}
// 移出询价单1
export function outInquirySheet(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单明细_删除数据',
param: '询价单流水号=' + num1 + '&组件零件流水号=' + num2
}
})
}
// 根据询价单流水号查询询价单详情(合同内容)
export function searchSheetContract(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单明细_查询数据_根据询价单',
param: '询价单流水号=' + num1
}
})
}
// 生成采购合同
export function doneContract(num1, RequisitionNumber, name1, time1, time2, method, num2, text, freight, num3, partsNum, priceGroup, dayGroup, payGroup, planGroup, taxGroup, currency, num4, id) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_基本件采购_请购单和请购单明细_增加数据',
param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&付款方式=${method}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&运费=${freight}&物料流水号组=${num3}&请购单明细流水号组=${num4}&数量组=${partsNum}&单价组=${priceGroup}&发货天数组=${dayGroup}&付款比例组=${payGroup}&计划付款时间组=${planGroup}&税率组=${taxGroup}&币种流水号组=${currency}`
}
})
}