采购、装配

This commit is contained in:
hedekun
2018-11-14 09:22:04 +08:00
parent f7eb22e5bb
commit 666c65dd0f
101 changed files with 14504 additions and 266 deletions

View File

@@ -21,6 +21,7 @@
"node-sass": "^4.9.3",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"qrcode": "^1.3.2",
"time-formater": "^1.0.3",
"vue": "2.5.17",
"vue-router": "3.0.1",

View File

@@ -0,0 +1,98 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床_查询数据',
param: '项目流水号=' + num
}
})
}
// 查询组件工艺
export function searchDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_组件工艺_查询数据',
param: '机床流水号=' + num
}
})
}
// 查询工序
export function searchProcess(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_装配工序_查询数据',
param: '组件工艺流水号=' + num
}
})
}
// 编辑
export function update(num, num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序工时_编辑数据',
param: '装配工序流水号=' + num + '&实际工时=' + num1 + '&完成情况=' + num2 + '&检验情况=' + num3 + '&备注=' + num4
}
})
}
export function getTree() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '人事档案管理_部门关系_查询节点',
param: '子节点=0=int'
}
})
}
export function getTable8(code) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + code + '=int'
}
})
}
export function fn(data, pid) {
const result = []
let temp
for (let i = 0; i < data.length; i++) {
if (data[i].父节点 === pid) {
const obj = { label: data[i].节点名称, id: data[i].子节点 }
temp = fn(data, data[i].子节点)
if (temp.length > 0) {
obj.children = temp
}
result.push(obj)
}
}
return result
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 机床查询
export function searchmachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_计划下达_机床_查询数据',
param: '项目流水号=' + num
}
})
}
// 主表查询
export function searchTable(check, projectValue, check1, machineNumberValue, check2, time, time1, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_计划信息_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + projectValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue + '&计划完成日期_check=' + check2 + '=int&开始时间=' + time + '&结束时间=' + time1,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 计划下发
export function goDown(ProjectSerialNumber, MachineSerialNumber, ProcessStartTime, ProcessEndTime, TimeToGo) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配计划_下发',
param: '项目流水号=' + ProjectSerialNumber + '&机床流水号=' + MachineSerialNumber + '&工艺开始时间=' + ProcessStartTime + '&工艺结束时间=' + ProcessEndTime + '&下发时间=' + TimeToGo
}
})
}

View File

@@ -0,0 +1,61 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 机床查询
export function searchmachine(num, check) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
}
})
}
export function initPerson() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=17=int'
}
})
}
// 主表查询
export function searchTable(check, projectValue, check1, machineNumberValue, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_工艺任务_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + projectValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 任务分配
export function Preservation(ProcessSerialNumber, PersonnelNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工艺_任务分配',
param: '工艺计划流水号=' + ProcessSerialNumber + '&人员编号=' + PersonnelNumber
}
})
}

View File

@@ -0,0 +1,276 @@
import request from '@/utils/request'
// 初始化 工艺员A
export function initCraftmen() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=17'
}
})
}
// 初始化 工序分类
export function initprocessNameClass() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_工序分类_查询数据'
}
})
}
// 初始化 机床分类
export function initmachineType() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床分类_查询数据'
}
})
}
// 查询机床编号
export function SearchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_典型机床_查询数据',
param: '机床分类流水号=' + num
}
})
}
// 查询工序名称
export function initProcessName(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_工序名称_查询数据',
param: '工序分类流水号=' + num
}
})
}
// 查询机床
export function searchMachine(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床编号_查询数据',
param: '人员编号=' + num + '&是否编制=' + num1
}
})
}
// 查询组件
export function searchGroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 查询组件工艺
export function searchDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_组件工艺_查询数据',
param: '机床流水号=' + num
}
})
}
// 增加组件工艺
export function submitAdd(machineNumberValue, SerialNumber, Group, AssemblyTask) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_组件工艺_增加数据',
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask
}
})
}
// 编辑组件工艺
export function submitEdit(GroupProcessNumber, SerialNumber, Group, AssemblyTask) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_组件工艺_编辑数据',
param: '组件工艺流水号=' + GroupProcessNumber + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask
}
})
}
// 删除组件工艺
export function deleteGroup(GroupProcessNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_组件工艺_删除数据',
param: '组件工艺流水号=' + GroupProcessNumber
}
})
}
// 查询工序
export function searchProcess(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_装配工序_查询数据',
param: '组件工艺流水号=' + num
}
})
}
// 增加工序
export function insertOne(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序_增加数据',
param: '组件工艺流水号=' + num
}
})
}
// 编辑工序
export function update(num, num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序_编辑数据',
param: '装配工序流水号=' + num + '&序号=' + num1 + '&工序名称=' + num2 + '&工艺内容及装配具体要求=' + num3 + '&质检=' + num4
}
})
}
// 编辑工序1
export function update1(num, num1, num2, num3) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序_编辑数据',
param: '装配工序流水号=' + num + '&序号=' + num1 + '&工序名称=' + num2 + '&工艺内容及装配具体要求=' + num3
}
})
}
// 上移
export function upOne(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序_上移',
param: '装配工序流水号=' + num + '&组件工艺流水号=' + num1 + '&工序顺序=' + num2
}
})
}
// 下移
export function downOne(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序_下移',
param: '装配工序流水号=' + num + '&组件工艺流水号=' + num1 + '&工序顺序=' + num2
}
})
}
// 删除工序
export function deleteOne(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序_删除数据',
param: '装配工序流水号=' + num
}
})
}
// 保存
export function saveApprove(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_机床工艺_编制完成',
param: '机床流水号=' + num
}
})
}
// 工艺调整
export function returnEdit(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_机床工艺_调整',
param: '机床流水号=' + num
}
})
}
// 工艺删除
export function deleteTable(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_机床工艺_删除数据',
param: '机床流水号=' + num
}
})
}
// 增加已完组件工艺 工艺拷贝
export function processCopy1(machineNumberValue, SerialNumber, Group, AssemblyTask) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_已完组件工艺_增加数据',
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件工艺流水号=10=int=output'
}
})
}
// 增加已完装配工序 工艺拷贝
export function procedureCopy1(GroupNum, SerialNumberGroup, ProcedureNameGroup, ProcessContentGroup, QualityTesting, ProcessSequence) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_已完装配工序_增加数据',
param: '组件工艺流水号=' + GroupNum + '&序号=' + SerialNumberGroup + '&工序名称=' + ProcedureNameGroup + '&工艺内容及装配具体要求=' + ProcessContentGroup + '&质检=' + QualityTesting + '&工序顺序=' + ProcessSequence
}
})
}

View File

@@ -0,0 +1,86 @@
import request from '@/utils/request'
// 初始化 工艺员A
export function initCraftmen() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=17'
}
})
}
// 查询机床
export function searchMachine(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床编号_查询数据_根据定额',
param: '是否定额=' + num1
}
})
}
// 查询组件工艺
export function searchDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_组件工艺_查询数据',
param: '机床流水号=' + num
}
})
}
// 查询工序
export function searchProcess(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_装配工序_查询数据',
param: '组件工艺流水号=' + num
}
})
}
// 编辑工时
export function update(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_装配工序工时_编辑数据',
param: '装配工序流水号=' + num + '&工艺工时=' + num1
}
})
}
// 保存
export function saveApprove(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_机床工艺_定额完成',
param: '机床流水号=' + num
}
})
}
// 工艺调整
export function returnEdit(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_机床工艺_定额调整',
param: '机床流水号=' + num
}
})
}

View File

@@ -0,0 +1,123 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床_查询数据',
param: '项目流水号=' + num
}
})
}
// 关键节点查询
export function searchTable(num, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_安装调试_关键节点_查询数据',
param: '机床流水号=' + num,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 工作记录查询
export function searchTable1(num, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_安装调试_工作记录_查询数据',
param: '机床流水号=' + num,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 增加关键节点
export function addData(machineNumberValue, KeyNode, completion, Remarks) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_安装调试_关键节点_增加数据',
param: '机床流水号=' + machineNumberValue + '&关键节点=' + KeyNode + '&完成情况=' + completion + '&备注=' + Remarks
}
})
}
// 编辑关键节点
export function editData(KeyNodeNum, KeyNode, completion, Remarks) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_安装调试_关键节点_编辑数据',
param: '关键节点流水号=' + KeyNodeNum + '&关键节点=' + KeyNode + '&完成情况=' + completion + '&备注=' + Remarks
}
})
}
// 删除关键节点
export function deleteData(KeyNodeNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_安装调试_关键节点_删除数据',
param: '关键节点流水号=' + KeyNodeNum
}
})
}
// 增加工作记录
export function addData1(machineNumberValue, WorkRecord, WorkDay) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_安装调试_工作记录_增加数据',
param: '机床流水号=' + machineNumberValue + '&工作情况=' + WorkRecord + '&工作日期=' + WorkDay
}
})
}
// 编辑工作记录
export function editData1(WorkRecordNum, WorkRecord, WorkDay) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_安装调试_工作记录_编辑数据',
param: '工作记录流水号=' + WorkRecordNum + '&工作情况=' + WorkRecord + '&工作日期=' + WorkDay
}
})
}
// 删除工作记录
export function deleteData1(WorkRecordNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_安装调试_工作记录_删除数据',
param: '工作记录流水号=' + WorkRecordNum
}
})
}

View File

@@ -0,0 +1,62 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床_查询数据',
param: '项目流水号=' + num
}
})
}
// 查询组件工艺
export function searchDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_组件工艺_查询数据',
param: '机床流水号=' + num
}
})
}
// 查询工序
export function searchProcess(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_装配工序_查询数据',
param: '组件工艺流水号=' + num
}
})
}
// 主表查询
export function searchTable(check, projectValue, check1, machineNumberValue, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_项目打印_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + projectValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -0,0 +1,314 @@
import request from '@/utils/request'
// 初始化 项目名称
export function getEntryNameValue() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据',
param: '考核状态=5=int'
}
})
}
// 项目名称
export function getToolNum(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_机床名称_查询数据',
param: '项目流水号=' + num + '=int&是否传递=2=int&考核状态=5=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
}
})
}
// 组号
export function getNum(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_组件名称_查询数据',
param: '机床流水号=' + num + '=int&是否传递=2=int&考核状态=5=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
}
})
}
// 获取表格数据
export function getTable(num, a, b, c, d, e, f, g, pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_能力平衡_查询数据_要平衡的零件',
param: '项目流水号_check=' + num + '=string&项目流水号=' + a + '=int&机床流水号_check=' + b + '=string&机床流水号=' + c + '=int&组件流水号_check=' + d + '=string&组件流水号=' + e + '=int&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=1=int&考核状态=5=int',
Pagination: pageList + '&' + pageSize
}
})
}
// 全部选入专用
export function getTable12580(num, a, b, c, d, e, f, g, pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_能力平衡_查询数据_要平衡的零件',
param: '项目流水号_check=' + num + '=string&项目流水号=' + a + '=int&机床流水号_check=' + b + '=string&机床流水号=' + c + '=int&组件流水号_check=' + d + '=string&组件流水号=' + e + '=int&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=1=int&考核状态=5=int'
}
})
}
// 扫描查询
export function getTable5(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_能力平衡_查询数据_要平衡的零件_扫描平衡',
Pagination: pageList + '&' + pageSize
}
})
}
// 选入
export function selection(num, a, b, c) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_要排产零件_增加数据',
param: '工艺计划流水号=' + num + '=int&工序数量=' + a + '=int&排序顺序=' + b + '=string&人员编号=' + c
}
})
}
// 选入后查询
export function selection1(a, pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_要排产零件_查询数据',
param: '人员编号=' + a,
Pagination: pageList + '&' + pageSize
}
})
}
// 全部选出查询专用
export function selection10086(a) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_要排产零件_查询数据',
param: '人员编号=' + a
}
})
}
export function selection2(a) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_能力平衡_工序信息查询_根据工艺计划流水号',
param: '工艺计划流水号=' + a + '=int'
}
})
}
// 排产
export function discharge(a) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_工序应完成时间_平均算法',
param: '工艺计划流水号=' + a + '=int'
}
})
}
// 确定零件计划4.1
export function plan(a) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_要排产零件_删除数据',
param: '工艺计划流水号=' + a + '=int&操作类型=2=int'
}
})
}
// 判断板焊
export function han(a) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_设备能力_清除占用_板焊后序能力',
param: '工艺计划流水号=' + a + '=int'
}
})
}
// 全部选出
export function allOut(a) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_要排产零件_删除数据',
param: '工艺计划流水号=' + a + '=int&操作类型=1=int'
}
})
}
// 是否划为外协
export function out(a, b) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_划为外协',
param: '工艺计划流水号=' + a + '=int&单件是否外协=' + b + '=int&单件是否外协分类=1=int'
}
})
}
// 选出
export function xuanchu(a) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_要排产零件_删除数据',
param: '工艺计划流水号=' + a + '=int&操作类型=1=int'
}
})
}
// 板焊
export function platewelding(a, b, c) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_修改数据_修改板焊工段计划完成时间_new',
param: '工艺计划流水号=' + a + '=int&板焊工段计划完成时间=' + b + '=string&是否焊接=' + c + '=int'
}
})
}
// 确定零件计划 车间生产管理工艺_新排产算法_设备能力_系数有效时间设定
export function partPlan(a, b, c) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_修改数据_机加工时间',
param: '工艺计划流水号=' + a + '=int&机加工开始时间=' + b + '=string&机加工结束时间=' + c + '=string&state=1=int=output'
}
})
}
// 刷新
export function refreshChart(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_调整工序计划_查询数据',
param: '零件图号=' + num
}
})
}
// 更新
export function updateDate(num1, num2, date) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_新排产算法_制定计划_调整计划_增加数据New',
param: '工序流水号=' + num1 + '&调整人编号=' + num2 + '&调整计划完成日期=' + date
}
})
}
// 查图表1
export function searchChart1(num, start, end) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_调整工序计划_设备情况_查询数据1',
param: '工序流水号=' + num + '&开始日期=' + start + '&结束日期=' + end
}
})
}
// 查图表的表1
export function searchChartTable1(num, start, end) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_调整工序计划_设备情况_查询数据2',
param: '工序流水号=' + num + '&开始日期=' + start + '&结束日期=' + end
}
})
}
// 查图表2
export function searchChart2(start, end, type) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_新排产算法_工时统计_总工时与总能力对比',
param: '开始=' + start + '&结束=' + end + '&查询类型=' + type
}
})
}
// 导出
export function Export(num, a, b, c, d, e, f, g) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_New_外协报表',
param: '项目流水号_check=' + num + '=string&项目流水号=' + a + '=int&机床流水号_check=' + b + '=string&机床流水号=' + c + '=int&组件流水号_check=' + d + '=string&组件流水号=' + e + '=int&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=1=int&考核状态=5=int'
}
})
}
// 主表1外协改变
export function table1Out(num, preOut) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_外协平衡',
param: '工艺计划流水号=' + num + '&是否预计外协=' + preOut + '&是否预计外协分类=1'
}
})
}
// 修改加工件合格时间
export function timeChange(num, a) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_修改数据_修改加工件合格时间',
param: '工艺计划流水号=' + num + '&加工件合格时间=' + a
}
})
}

View File

@@ -0,0 +1,38 @@
import request from '@/utils/request'
// 初始化合同
export function initArrivalStateContact() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_到货情况_查询数据'
}
})
}
// 查询到货情况
export function searchArrivalState(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_到货情况_查询数据',
param: `采购合同流水号_check=${check1}&采购合同流水号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询到货情况
export function searchArrivalNum(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_合同物料到货情况_查询数据',
param: `采购合同流水号=${num}`
}
})
}

View File

@@ -0,0 +1,87 @@
import request from '@/utils/request'
// 查询供应商
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 searchTable1(pageCurrent, pageSize, check1, start, end, check2, num1, check3, name1, check4, name2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_请款表_查询数据',
param: '时间段_check=' + check1 + '&开始时间=' + start + '&结束时间=' + end + '&合同号_check=' + check2 + '&采购合同编号=' + num1 + '&采购员_check=' + check3 + '&采购员姓名=' + name1 + '&供应商_check=' + check4 + '&供应商名称=' + name2,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 请款
export function requestFund(num1, money, time, id) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_请款表_增加数据',
param: `采购合同流水号=${num1}&请款金额=${money}&请款人=${id}&请款时间=${time}`
}
})
}
// 查询请款付款情况
export function searchCondition(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_请款表_查询数据_已请款',
param: '采购合同流水号=' + num1
}
})
}
// 取消请款
export function cancelRequestFund(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_请款表_删除数据',
param: '采购科请款流水号=' + num1
}
})
}
// 查询请款表
export function searchRequestTable(check, start, end) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_请款表_查询数据_请款Excel',
param: '请款时间段_check=' + check + '&开始时间=' + start + '&结束时间=' + end
}
})
}
// 初始化采购员 考核部门编号采购部改16
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}

View File

@@ -0,0 +1,121 @@
import request from '@/utils/request'
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同_查询_采购部采购'
}
})
}
// 初始化采购员(考核部门编号采购部16)
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}
// 采购合同查询
export function searchTable1(pageCurrent, pageSize, check1, start, end, check2, contract, check3, name, check4, supplier) {
return request({
url: '',
method: 'post',
data: {
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: {
type: '1',
name: '采购管理_采购合同明细_查询数据',
param: '采购合同流水号=' + num
}
})
}
// 采购合同变更
export function contractChange(num, reason) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购合同变更_增加数据',
param: '采购合同流水号=' + num + '&合同变更原因=' + reason
}
})
}
// 查询变更合同
export function searchChangeContract(pageCurrent, pageSize, check1, start, end, check2, contract, check3, person, check4, supplier, check5, project, check6, payType) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同变更_查询数据_根据条件_cjn',
param: '时间段_check=' + check1 + '&开始时间=' + start + '=datetime&结束时间=' + end + '=datetime&采购合同流水号_check=' + check2 + '&采购合同流水号=' + contract + '&人员编号_check=' + check3 + '&人员编号=' + person + '&供应商名称_check=' + check4 + '&供应商名称=' + supplier + '&项目流水号_check=' + check5 + '&项目流水号=' + project + '&付款方式流水号_check=' + check6 + '&付款方式流水号=' + payType,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 初始化变更合同号
export function initChangeContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同变更_查询_cjn'
}
})
}
// 采购变更合同明细查询
export function searchTable4(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同明细变更_查询数据',
param: '采购合同变更流水号=' + num
}
})
}
// 初始化付款方式
export function initPayMethod() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款方式_查询数据'
}
})
}
// 合同作废
export function deleteContract(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购合同_删除数据',
param: `采购合同流水号=${num}`
}
})
}

View File

@@ -0,0 +1,38 @@
import request from '@/utils/request'
// 初始化项目(车间传递来的)
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_采购部采购_查询数据'
}
})
}
// 初始化采购员 考核部门编号采购部16
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}
// 查询表1
export function searchTable1(pageCurrent, pageSize, check1, num1, check2, name, check3, num2, state) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_采购情况查询',
param: `项目流水号_check=${check1}&项目流水号=${num1}&物料名称_check=${check2}&物料名称=${name}&人员编号_check=${check3}&人员编号=${num2}&采购情况=${state}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -0,0 +1,97 @@
import request from '@/utils/request'
// 查询询价单列表 表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 searchSheetContract(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单明细_查询数据_根据询价单',
param: '询价单流水号=' + num1
}
})
}
// 查询合同模板
export function searchContractDemo(num1 = null) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_合同模板_查询数据',
param: '合同模板流水号=' + num1
}
})
}
// 初始化付款方式
export function initPayMethod() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款方式_查询数据'
}
})
}
// 初始化付款时间节点
export function initPayTimeNode() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款时间节点_查询数据'
}
})
}
// 生成采购合同
export function doneContract(num1, name1, time1, time2, method, num2, text, freight, num3, numGroup, priceGroup, dayGroup, payGroup, planGroup, taxGroup, currency, cala, weight, id, groupPartGroup) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购合同_增加数据',
param: `采购合同编号=${num1}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&付款方式=${method}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&运费=${freight}&物料流水号组=${num3}&数量组=${numGroup}&单价组=${priceGroup}&发货天数组=${dayGroup}&付款比例组=${payGroup}&计划付款时间组=${planGroup}&税率组=${taxGroup}&币种流水号组=${currency}&采购合同计算方式流水号组=${cala}&重量组=${weight}&组件零件流水号组=${groupPartGroup}`
}
})
}
// 生成采购合同
export function insertFile(name, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_图片附件_增加数据',
param: `文件名=${name}&采购合同编号=${num}`
}
})
}
// 生成采购合同
export function searchFile(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_图片附件_查询数据',
param: `采购合同编号=${num}`
}
})
}

View File

@@ -0,0 +1,159 @@
import request from '@/utils/request'
// 初始化询价状态
export function initInquiryState() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购部采购_询价状态_查询'
}
})
}
// 根据续表查物料表
export function searchMaterial(pageCurrent, pageSize, check1, num1, check2, num2, person) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `询价状态编号_check=${check1}&询价状态编号=${num1}&物料名称_check=${check2}&物料名称=${num2}&人员编号=${person}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询供应商
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
}
})
}
// 查询询价单
export function searchCreateInquirySheet(pageCurrent, pageSize, check1, name, check2, num, id) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单_查询数据',
param: `供应商名称_check=${check1}&供应商名称=${name}&询价单编号_check=${check2}&询价单编号=${num}&采购员流水号_check=1&采购员流水号=${id}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询询价单--不分页
export function searchCreateInquirySheet2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单_查询数据',
param: `供应商名称_check=0&供应商名称=0&询价单编号_check=0&询价单编号=0&采购员流水号_check=0&采购员流水号=0`
}
})
}
// 查询询价单明细
export function searchSheetDetail(num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单明细_查询数据',
param: '询价单流水号_check=1&询价单流水号=' + num2
}
})
}
// 创建询价单
export function createInquirySheet(num1, num2, remark, id) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单_增加数据',
param: `询价单编号=${num1}&采购员=${id}&供应商流水号=${num2}&备注=${remark}&identity=1=output`
}
})
}
// 删除询价单
export function deleteInquirySheet(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单_删除数据',
param: '询价单流水号=' + num1
}
})
}
// 追加现有询价单
export function addInquirySheet(num1, num2, num3, num4, remark) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单明细_增加数据',
param: '询价单流水号=' + num1 + '&组件零件流水号=' + num2 + '&总数量=' + num3 + '&备量=' + num4 + '&备注=' + remark + '&identity=1=output'
}
})
}
// 移出询价单
export function outInquirySheet(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单明细_删除数据',
param: '询价单流水号=' + num1 + '&组件零件流水号=' + num2
}
})
}
// 查询物料
export function searchAllMaterial(MaterialName, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_物料主文件_基本_查询数据_分页',
param: '物料名称_check=1&物料名称=' + MaterialName + '&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
}
})
}
// 物料变更
export function materialChange(num1, num2, num3, num4, person) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购物料修改_修改数据',
param: `组件零件流水号=${num1}&标准件和外购件流水号=${num2}&原物料流水号=${num3}&新物料流水号=${num4}&申请人=${person}`
}
})
}
// 编辑询价单
export function editInquirySheet(num1, num2, num3) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单_修改数据',
param: `询价单流水号=${num1}&询价单编号=${num2}&供应商流水号=${num3}`
}
})
}

View File

@@ -0,0 +1,64 @@
import request from '@/utils/request'
// 查询审核/审批/付款
export function initApproval(pageCurrent, pageSize, state) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_请款表_查询数据_审核审批',
param: `审核_审批_付款状态=${state}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 执行审核/审批/付款
export function execApproval(num1, num2, reason, person, state) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_请款表_修改数据_审核审批',
param: `采购科请款流水号=${num1}&审核_审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审核_审批_付款状态=${state}`
}
})
}
// 查询离线合同审核/审批/付款
export function initApprovalOffline(pageCurrent, pageSize, state) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_审核审批付款_查询数据',
param: `审核_审批_付款状态=${state}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询离线合同请款信息明细
export function searchRequsetFundDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_请款明细_查询数据',
param: `离线合同请款流水号=${num}`
}
})
}
// 执行审核/审批/付款(离线合同)
export function execApprovalOffline(num1, num2, reason, person, state) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_审核审批付款_修改数据',
param: `离线合同请款流水号=${num1}&审核_审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审核_审批_付款状态=${state}`
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 发票合同
export function searchContractInvoice(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_到票情况_查询数据',
param: `采购合同流水号_check=${check1}&采购合同流水号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 发票查询
export function searchInvoice(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票_查询数据',
param: '采购合同流水号_check=1&采购合同流水号=' + num
}
})
}
// 传送人接收人初始化 采购科改16
export function initPerson() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款情况_查询数据'
}
})
}

View File

@@ -0,0 +1,170 @@
import request from '@/utils/request'
// 查询库存数
export function searchInventoryNum(pageCurrent, pageSize, check1, name, check2, state1, state2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_物料余量_查询数据',
param: `物料名称_check=${check1}&物料名称=${name}&库存状态_check=${check2}&库存状态=${state1}&采购状态=${state2}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询离线合同
export function searchOfflineContract(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_查询数据',
param: `离线合同编号_check=${check1}&离线合同编号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询离线合同 (不分页)
export function searchOfflineContract2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_查询数据',
param: `离线合同编号_check=0&离线合同编号=0&供应商名称_check=0&供应商名称=0`
}
})
}
// 查询供应商
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
}
})
}
// 初始化付款方式
export function initPayMethod() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款方式_查询数据'
}
})
}
// 初始化付款时间节点
export function initPayTimeNode() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款时间节点_查询数据'
}
})
}
// 增加离线合同
export function addOfflineContract(contractNum, contractName, supplier, person, date, freight, type, one, two, three, four) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_增加数据',
param: `离线合同编号=${contractNum}&离线合同名称=${contractName}&供应商流水号=${supplier}&人员编号=${person}&规定到货时间=${date}&运费=${freight}&付款方式流水号=${type}&第一次付款时间节点流水号=${one}&第二次付款时间节点流水号=${two}&第三次付款时间节点流水号=${three}&第四次付款时间节点流水号=${four}`
}
})
}
// 编辑离线合同
export function editOfflineContract(contractNumValue, contractNum, contractName, supplier, person, date, freight, type, one, two, three, four) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_修改数据',
param: `离线合同流水号=${contractNumValue}&离线合同编号=${contractNum}&离线合同名称=${contractName}&供应商流水号=${supplier}&人员编号=${person}&规定到货时间=${date}&运费=${freight}&付款方式流水号=${type}&第一次付款时间节点流水号=${one}&第二次付款时间节点流水号=${two}&第三次付款时间节点流水号=${three}&第四次付款时间节点流水号=${four}`
}
})
}
// 作废离线合同
export function deleteOfflineContract(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_删除数据',
param: '离线合同流水号=' + num
}
})
}
// 查询离线合同明细
export function searchMateriel(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同明细_查询数据',
param: `离线合同流水号=${num}`
}
})
}
// 增加离线合同明细
export function addMateriel(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同明细_增加数据',
param: `离线合同流水号=${num1}&物料流水号组=${num2}`
}
})
}
// 删除离线合同明细
export function deleteMateriel(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同明细_删除数据',
param: `离线合同明细流水号=${num}`
}
})
}
// 生成离线合同
export function doneOfflineContact(contractNum, total, text, partGroup, numGroup, priceGroup) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_生成合同',
param: `离线合同流水号=${contractNum}&合同总额=${total}&合同文本=${text}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}`
}
})
}
// 查询合同模板
export function searchContractDemo(num1 = null) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_合同模板_查询数据',
param: '合同模板流水号=' + num1
}
})
}

View File

@@ -0,0 +1,63 @@
import request from '@/utils/request'
// 查询请款表
export function searchRequestFund(pageCurrent, pageSize, check1, start, end) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_请款_查询数据',
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询离线合同待请款信息
export function searchOfflineContract(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_待请款_查询数据',
param: `供应商流水号=${num}`
}
})
}
// 查询离线合同待请款信息
export function submitRequestFund(contractGroup, sumGroup, supplier, money, person) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_请款_增加数据',
param: `离线合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person}`
}
})
}
// 查询离线合同待请款信息
export function searchRequsetFundDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_请款明细_查询数据',
param: `离线合同请款流水号=${num}`
}
})
}
// 取消请款
export function cancelRequestFund(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_请款_删除数据',
param: `离线合同请款流水号=${num}`
}
})
}

View File

@@ -0,0 +1,26 @@
import request from '@/utils/request'
// 初始化合同
export function initPayState() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款情况_查询数据'
}
})
}
// 查询表1
export function searchPayState(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款情况_查询数据',
param: `采购合同流水号_check=${check1}&采购合同流水号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -0,0 +1,25 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 初始化项目金额统计表
export function searchProjectTotal(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_项目总价_明细_查询数据',
param: `项目流水号=${num}`
}
})
}

View File

@@ -0,0 +1,62 @@
import request from '@/utils/request'
// 初始化合同
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款情况_查询数据'
}
})
}
// 查询合同付款时间节点
export function searchPayTimeNode(pageCurrent, pageSize, check1, num, check2, name) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购预算_合同付款时间节点_查询数据',
param: `采购合同流水号_check=${check1}&采购合同流水号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询合同付款时间节点及金额
export function searchPayTimeNodeMoney(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购预算_合同付款时间节点及金额_查询数据',
param: `采购合同流水号=${num}`
}
})
}
// 设置合同付款时间节点其他
export function editPayTimeNodeOther(num, date1, date2, date3, date4, date5) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_合同付款时间节点_其他_修改数据',
param: `采购合同流水号=${num}&项目预验收日期=${date1}&项目终验收日期=${date2}&发货日期=${date3}&货到用户现场日期=${date4}&用户现场开通日期=${date5}`
}
})
}
// 查询采购预算
export function searchPurchaseBudget(check, date1, date2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购预算_查询数据',
param: `时间段_check=${check}&开始时间=${date1}&结束时间=${date2}`
}
})
}

View File

@@ -0,0 +1,74 @@
import request from '@/utils/request'
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_合同审批_查询数据'
}
})
}
// 初始化采购员 考核部门编号采购部16
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}
// 查询供应商
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
}
})
}
// 采购合同查询
export function searchTable1(pageCurrent, pageSize, check1, start, end, check2, contract, check3, name, check4, supplier) {
return request({
url: '',
method: 'post',
data: {
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: {
type: '1',
name: '采购管理_采购合同明细_查询数据',
param: '采购合同流水号=' + num
}
})
}
// 执行审批
export function submitApproval(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_合同审批_修改数据',
param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2
}
})
}

View File

@@ -0,0 +1,73 @@
import request from '@/utils/request'
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同_查询_采购部采购'
}
})
}
// 初始化采购员(考核部门编号采购部16)
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}
// 查询供应商
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
}
})
}
// 采购合同查询
export function searchTable1(pageCurrent, pageSize, check1, start, end, check2, contract, check3, name, check4, supplier, check5, approval) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_合同_查询数据_采购部采购',
param: '时间段_check=' + check1 + '&开始时间=' + start + '=datetime&结束时间=' + end + '=datetime&采购合同流水号_check=' + check2 + '&采购合同流水号=' + contract + '&人员编号_check=' + check3 + '&人员编号=' + name + '&供应商名称_check=' + check4 + '&供应商名称=' + supplier + '&审批情况流水号_check=' + check5 + '&审批情况流水号=' + approval,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 采购合同明细查询
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同明细_查询数据',
param: '采购合同流水号=' + num
}
})
}
export function submitApproval(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_合同审批_修改数据',
param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2
}
})
}

View File

@@ -0,0 +1,25 @@
import request from '@/utils/request'
export function searchTable(PageCurrent, PageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购物料修改确认_查询数据',
Pagination: PageCurrent + '&' + PageSize
}
})
}
export function edit(num, num1, num2, num3, num4, num5) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购物料修改确认_是否通过',
param: '组件零件流水号=' + num + '&标准件和外购件流水号=' + num1 + '&物料变更记录流水号=' + num2 + '&确认通过状态=' + num3 + '&确认人=' + num4 + '&原物料流水号=' + num5
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 初始化项目(车间传递来的)
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_采购部采购_查询数据'
}
})
}
// 初始化采购员 考核部门编号采购部16
export function initBuyer() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}
// 查询表1
export function searchTable1(pageCurrent, pageSize, check1, num1, check2, name, state) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料',
param: `项目流水号_check=${check1}&项目流水号=${num1}&物料名称_check=${check2}&物料名称=${name}&分配状态=${state}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 分配任务
export function allocateTask(group, person) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购部采购_分配任务',
param: `标准件和外购件流水号组=${group}&人员编号=${person}`
}
})
}

View File

@@ -0,0 +1,74 @@
import request from '@/utils/request'
// 发票查询
export function searchInvoice(pageCurrent, pageSize, check1, num1, check2, time, check3, transmit, check4, recipient, check5, num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票_查询数据',
param: '发票号_check=' + check1 + '&发票号=' + num1 + '&开票时间_check=' + check2 + '&开票时间=' + time + '&传送人_check=' + check3 + '&传送人=' + transmit + '&接收人_check=' + check4 + '&接收人=' + recipient + '&采购合同流水号_check=' + check5 + '&采购合同流水号=' + num2,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 发票增加
export function addInvoice(num1, num2, time1, money, send, receive, remark, time2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票_增加数据',
param: '采购合同流水号=' + num1 + '&发票号=' + num2 + '&开票时间=' + time1 + '&开票金额=' + money + '&传送人=' + send + '&接收人=' + receive + '&备注=' + remark + '&操作时间=' + time2 + '&identity_receiptLiushuihao=1=int=output'
}
})
}
// 发票编辑
export function editInvoice(num1, num2, num3, time1, money, send, receive, remark) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票_修改数据',
param: '发票流水号=' + num1 + '&采购合同流水号=' + num2 + '&发票号=' + num3 + '&开票时间=' + time1 + '&开票金额=' + money + '&传送人=' + send + '&接收人=' + receive + '&备注=' + remark
}
})
}
// 发票删除
export function deleteInvoice(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票_删除数据',
param: '发票流水号=' + num1
}
})
}
// 传送人接收人初始化 采购科改16
export function initPerson() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
}
})
}
// 初始化合同号
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_付款情况_查询数据'
}
})
}

View File

@@ -0,0 +1,26 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 初始化项目金额统计表
export function searchReceiveCheck(pageCurrent, pageSize, check, num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_领用核算_查询数据',
param: `项目流水号_check=${check}&项目流水号=${num}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -0,0 +1,98 @@
import request from '@/utils/request'
export function searchData(check1, supplierName, check2, businessNature, check3, creationDate, check4, registeredCapital, check5, taxNumber, check6, bank, check7, account, check8, email, check9, address, check10, telephone, check11, fax, check12, deliveryPeriod, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件',
param: '供应商名称_check=' + check1 + '=int&供应商名称=' + supplierName + '&企业性质_check=' + check2 + '=int&企业性质=' + businessNature + '&创立日期_check=' + check3 + '=int&创立日期=' + creationDate + '&注册资本_check=' + check4 + '=int&注册资本=' + registeredCapital + '&税号_check=' + check5 + '=int&税号=' + taxNumber + '&开户行_check=' + check6 + '=int&开户行=' + bank + '&帐号_check=' + check7 + '=int&帐号=' + account + '&电子信箱_check=' + check8 + '=int&电子信箱=' + email + '&地址_check=' + check9 + '=int&地址=' + address + '&电话号码_check=' + check10 + '=int&电话号码=' + telephone + '&传真_check=' + check11 + '=int&传真=' + fax + '&货期_check=' + check12 + '=int&货期=' + deliveryPeriod,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 增加新的数据
export function addTable(supplierName, businessNature, creationDate, registeredCapital, taxNumber, bank, account, email, address, telephone, fax, deliveryPeriod) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_供应商_增加数据',
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&电话号码=' + telephone + '&传真=' + fax + '&货期=' + deliveryPeriod
}
})
}
export function editTable(supplierName, businessNature, creationDate, registeredCapital, taxNumber, bank, account, email, address, supplierSerialNumber, fax, deliveryPeriod, telephone) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_供应商_修改数据',
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&供应商流水号=' + supplierSerialNumber + '&传真=' + fax + '&货期=' + deliveryPeriod + '&电话号码=' + telephone
}
})
}
export function deleteData(supplierSerialNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_供应商_删除数据',
param: '供应商流水号=' + supplierSerialNumber
}
})
}
export function getName(supplierSerialNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商联系人_查询数据',
param: '供应商流水号=' + supplierSerialNumber
}
})
}
// 增加联系人
export function addPerson(name, work, phone, telephone, fax, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_供应商联系人_增加数据',
param: '姓名=' + name + '&职务=' + work + '&电话=' + phone + '&手机=' + telephone + '&传真=' + fax + '&供应商流水号=' + num
}
})
}
// 编辑联系人
export function editPerson(name, work, phone, telephone, fax, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_供应商联系人_修改数据',
param: '姓名=' + name + '&职务=' + work + '&电话=' + phone + '&手机=' + telephone + '&传真=' + fax + '&供应商联系人流水号=' + num
}
})
}
// 删除联系人
export function deletePerson(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_供应商联系人_删除数据',
param: '供应商联系人流水号=' + num
}
})
}

View File

@@ -76,7 +76,7 @@ export function specificationQueryWB(projectCheck, project, machineCheck, machin
method: 'post',
data: {
type: '1',
name: 'PDM_零件明细表_外购件和标准件_规范数据查询_gj',
name: 'PDM_零件明细表_外购件和标准件_规范数据查询_gj2',
param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`
}
})
@@ -98,7 +98,7 @@ export function unSpecificationQueryWB(projectCheck, project, machineCheck, mach
method: 'post',
data: {
type: '1',
name: 'PDM_零件明细表_外购件和标准件_不规范数据查询gj',
name: 'PDM_零件明细表_外购件和标准件_不规范数据查询gj2',
param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`
}
})

View File

@@ -0,0 +1,49 @@
// Inspired by https://github.com/Inndy/vue-clipboard2
const Clipboard = require('clipboard')
if (!Clipboard) {
throw new Error('you shold npm install `clipboard` --save at first ')
}
export default {
bind(el, binding) {
if (binding.arg === 'success') {
el._v_clipboard_success = binding.value
} else if (binding.arg === 'error') {
el._v_clipboard_error = binding.value
} else {
const clipboard = new Clipboard(el, {
text() { return binding.value },
action() { return binding.arg === 'cut' ? 'cut' : 'copy' }
})
clipboard.on('success', e => {
const callback = el._v_clipboard_success
callback && callback(e) // eslint-disable-line
})
clipboard.on('error', e => {
const callback = el._v_clipboard_error
callback && callback(e) // eslint-disable-line
})
el._v_clipboard = clipboard
}
},
update(el, binding) {
if (binding.arg === 'success') {
el._v_clipboard_success = binding.value
} else if (binding.arg === 'error') {
el._v_clipboard_error = binding.value
} else {
el._v_clipboard.text = function() { return binding.value }
el._v_clipboard.action = function() { return binding.arg === 'cut' ? 'cut' : 'copy' }
}
},
unbind(el, binding) {
if (binding.arg === 'success') {
delete el._v_clipboard_success
} else if (binding.arg === 'error') {
delete el._v_clipboard_error
} else {
el._v_clipboard.destroy()
delete el._v_clipboard
}
}
}

View File

@@ -0,0 +1,13 @@
import Clipboard from './clipboard'
const install = function(Vue) {
Vue.directive('Clipboard', Clipboard)
}
if (window.Vue) {
window.clipboard = Clipboard
Vue.use(install); // eslint-disable-line
}
Clipboard.install = install
export default Clipboard

View File

@@ -0,0 +1,46 @@
export default{
bind(el, binding) {
const dialogHeaderEl = el.querySelector('.el-dialog__header')
const dragDom = el.querySelector('.el-dialog')
dialogHeaderEl.style = 'cursor:move;'
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
dialogHeaderEl.onmousedown = (e) => {
// 鼠标按下,计算当前元素距离可视区的距离
const disX = e.clientX - dialogHeaderEl.offsetLeft
const disY = e.clientY - dialogHeaderEl.offsetTop
// 获取到的值带px 正则匹配替换
let styL, styT
// 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
if (sty.left.includes('%')) {
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
} else {
styL = +sty.left.replace(/\px/g, '')
styT = +sty.top.replace(/\px/g, '')
}
document.onmousemove = function(e) {
// 通过事件委托,计算移动的距离
const l = e.clientX - disX
const t = e.clientY - disY
// 移动当前元素
dragDom.style.left = `${l + styL}px`
dragDom.style.top = `${t + styT}px`
// 将此时的位置传出去
// binding.value({x:e.pageX,y:e.pageY})
}
document.onmouseup = function(e) {
document.onmousemove = null
document.onmouseup = null
}
}
}
}

View File

@@ -0,0 +1,13 @@
import drag from './drag'
const install = function(Vue) {
Vue.directive('el-drag-dialog', drag)
}
if (window.Vue) {
window['el-drag-dialog'] = drag
Vue.use(install); // eslint-disable-line
}
drag.install = install
export default drag

91
src/directive/sticky.js Normal file
View File

@@ -0,0 +1,91 @@
const vueSticky = {}
let listenAction
vueSticky.install = Vue => {
Vue.directive('sticky', {
inserted(el, binding) {
const params = binding.value || {}
const stickyTop = params.stickyTop || 0
const zIndex = params.zIndex || 1000
const elStyle = el.style
elStyle.position = '-webkit-sticky'
elStyle.position = 'sticky'
// if the browser support css stickyCurrently Safari, Firefox and Chrome Canary
// if (~elStyle.position.indexOf('sticky')) {
// elStyle.top = `${stickyTop}px`;
// elStyle.zIndex = zIndex;
// return
// }
const elHeight = el.getBoundingClientRect().height
const elWidth = el.getBoundingClientRect().width
elStyle.cssText = `top: ${stickyTop}px; z-index: ${zIndex}`
const parentElm = el.parentNode || document.documentElement
const placeholder = document.createElement('div')
placeholder.style.display = 'none'
placeholder.style.width = `${elWidth}px`
placeholder.style.height = `${elHeight}px`
parentElm.insertBefore(placeholder, el)
let active = false
const getScroll = (target, top) => {
const prop = top ? 'pageYOffset' : 'pageXOffset'
const method = top ? 'scrollTop' : 'scrollLeft'
let ret = target[prop]
if (typeof ret !== 'number') {
ret = window.document.documentElement[method]
}
return ret
}
const sticky = () => {
if (active) {
return
}
if (!elStyle.height) {
elStyle.height = `${el.offsetHeight}px`
}
elStyle.position = 'fixed'
elStyle.width = `${elWidth}px`
placeholder.style.display = 'inline-block'
active = true
}
const reset = () => {
if (!active) {
return
}
elStyle.position = ''
placeholder.style.display = 'none'
active = false
}
const check = () => {
const scrollTop = getScroll(window, true)
const offsetTop = el.getBoundingClientRect().top
if (offsetTop < stickyTop) {
sticky()
} else {
if (scrollTop < elHeight + stickyTop) {
reset()
}
}
}
listenAction = () => {
check()
}
window.addEventListener('scroll', listenAction)
},
unbind() {
window.removeEventListener('scroll', listenAction)
}
})
}
export default vueSticky

View File

@@ -0,0 +1,13 @@
import waves from './waves'
const install = function(Vue) {
Vue.directive('waves', waves)
}
if (window.Vue) {
window.waves = waves
Vue.use(install); // eslint-disable-line
}
waves.install = install
export default waves

View File

@@ -0,0 +1,26 @@
.waves-ripple {
position: absolute;
border-radius: 100%;
background-color: rgba(0, 0, 0, 0.15);
background-clip: padding-box;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
opacity: 1;
}
.waves-ripple.z-active {
opacity: 0;
-webkit-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
transition: opacity 1.2s ease-out, -webkit-transform 0.6s ease-out;
transition: opacity 1.2s ease-out, transform 0.6s ease-out;
transition: opacity 1.2s ease-out, transform 0.6s ease-out, -webkit-transform 0.6s ease-out;
}

View File

@@ -0,0 +1,42 @@
import './waves.css'
export default{
bind(el, binding) {
el.addEventListener('click', e => {
const customOpts = Object.assign({}, binding.value)
const opts = Object.assign({
ele: el, // 波纹作用元素
type: 'hit', // hit点击位置扩散center中心点扩展
color: 'rgba(0, 0, 0, 0.15)' // 波纹颜色
}, customOpts)
const target = opts.ele
if (target) {
target.style.position = 'relative'
target.style.overflow = 'hidden'
const rect = target.getBoundingClientRect()
let ripple = target.querySelector('.waves-ripple')
if (!ripple) {
ripple = document.createElement('span')
ripple.className = 'waves-ripple'
ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'
target.appendChild(ripple)
} else {
ripple.className = 'waves-ripple'
}
switch (opts.type) {
case 'center':
ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px'
ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'
break
default:
ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px'
ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px'
}
ripple.style.backgroundColor = opts.color
ripple.className = 'waves-ripple z-active'
return false
}
}, false)
}
}

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M794.796 352.927c-8.837 6.628-11.047 22.094-4.418 30.931l68.49 95.002c6.627 8.837 22.093 11.047 30.93 4.419s11.047-22.094 4.419-30.931l-68.49-95.002c-4.419-6.628-19.884-11.047-30.93-4.419zM467.813 461.185c46.396-55.234 48.606-139.189 0-198.841-55.234-66.28-152.445-75.118-218.725-19.884s-75.118 152.445-19.884 218.725c48.605 57.443 130.351 72.908 194.422 35.35l66.28 83.955c8.838 11.046 26.513 13.256 39.769 4.418 11.046-8.837 13.256-26.512 4.418-39.768l-66.28-83.955zm-48.606-15.465c-46.396 39.768-117.095 33.14-154.654-15.466-39.768-46.396-33.14-117.095 15.466-154.654 46.396-39.768 117.095-33.14 154.654 15.465 37.559 46.397 30.93 117.096-15.466 154.655z"/><path d="M856.658 262.344H668.864v-81.746c0-24.303-19.885-44.187-44.187-44.187H70.13c-24.303 0-44.187 19.884-44.187 44.187v530.243c0 48.606 39.768 88.374 88.374 88.374h66.28c11.047 50.815 55.234 88.374 108.258 88.374s97.211-37.56 108.258-88.374h231.981c11.047 50.815 55.234 88.374 108.258 88.374s97.211-37.56 108.258-88.374h66.28c48.606 0 88.374-39.768 88.374-88.374V467.813c0-8.837 0-13.256-4.418-19.884L872.123 271.181c-6.628-8.837-15.465-8.837-15.465-8.837zM291.065 843.402c-37.558 0-66.28-28.722-66.28-66.28s28.722-66.28 66.28-66.28 66.28 28.72 66.28 66.28-33.14 66.28-66.28 66.28zm448.498 0c-37.56 0-66.28-28.722-66.28-66.28s28.72-66.28 66.28-66.28 66.28 28.72 66.28 66.28-30.93 66.28-66.28 66.28zm214.306-154.654c0 35.35-24.303 66.28-61.862 66.28H847.82c-11.046-50.815-55.233-88.374-108.257-88.374s-97.212 37.559-108.258 88.374H399.323c-11.046-50.815-55.233-88.374-108.258-88.374s-97.21 37.559-108.257 88.374H138.62c-37.56 0-66.28-30.93-66.28-66.28v-97.212h291.633c11.047 0 22.093-11.046 22.093-22.093s-11.046-22.093-22.093-22.093H114.318c-24.303 0-44.187-19.885-44.187-44.187V224.785c0-24.303 19.884-44.187 44.187-44.187h468.381c24.303 0 44.187 19.884 44.187 44.187v344.658c0 11.047 11.047 22.093 22.093 22.093s22.094-11.046 22.094-22.093V306.531h172.329l110.467 161.282v220.935z"/></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M504.954 1023.366c-278.057 0-503.461-225.452-503.461-503.46 0-278.058 225.404-503.46 503.46-503.46 278.01 0 503.462 225.402 503.462 503.46 0 278.008-225.452 503.46-503.461 503.46zm0-943.988c-243.294 0-440.527 197.234-440.527 440.528 0 243.293 197.233 440.48 440.527 440.48 243.294 0 440.48-197.187 440.48-440.48 0-243.294-197.186-440.528-440.48-440.528zm31.467 755.191h-62.934V677.19H284.691v-62.884h188.796v-94.399H284.691v-62.934h153.598L284.206 239.326l53.964-34.133 156.022 220.313h35.733l139.488-208.531 52.315 35.006-137.163 204.99h140.653v62.935H542.481l-6.061 9.017v85.382h188.797v62.884H536.421v157.38z"/></svg>

After

Width:  |  Height:  |  Size: 752 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M549.9 662.2v113.4c21.3-11.5 32.8-31.1 32.8-55.8 0-24.8-10.2-42.7-32.8-57.6M456.1 524.5c0 21.3 8.1 36.2 25.6 49v-95.1c-17.9 11.6-25.6 29.5-25.6 46.1"/><path d="M586.1 245.3c55.4-55 91.2-147.5 100.2-172.2 4.3-11.9.9-25.6-9-33.7-9.8-8.1-23.9-9.4-35-3.4-.4 0-33.2 18.3-63.5 18.3-5.1 0-6.8-.9-16.6-11.9C550.7 29.6 533.2 10 500 10s-50.7 19.6-62.2 32.4c-9.8 11.1-11.5 11.9-16.2 11.9-30.3 0-63.1-17.9-63.1-18.3-11.1-6.4-25.1-4.7-35 3.4-9.8 8.1-13.2 21.7-9 33.7 9 24.7 44.8 117.2 100.2 172.2C247.2 313.9 81 557.3 81 719.3 81 958 292.8 990 500 990s419-32 419-270.7c0-162-166.2-405.4-332.9-474M549.9 822v49.4h-68.2v-43.1c-33.3-2.6-66.5-12.8-84.8-25.2l13.2-42.6c18.8 11.9 43.9 21.3 71.6 24.3V630.7c-48.2-22.6-76.7-54.1-76.7-100.6s29.4-83.5 76.7-98.9v-50.3h68.2V424c30.7 2.1 54.1 10.2 68.2 18.3L604 483.6c-9.8-6-29-14.5-54.6-17.5v139.8c55.8 25.2 84 55.8 84 108.7.4 48.2-26.8 91.2-83.5 107.4"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M549.9 662.2v113.4c21.3-11.5 32.8-31.1 32.8-55.8 0-24.8-10.2-42.7-32.8-57.6m-93.8-137.7c0 21.3 8.1 36.2 25.6 49v-95.1c-17.9 11.6-25.6 29.5-25.6 46.1"/><path d="M586.1 245.3c55.4-55 91.2-147.5 100.2-172.2 4.3-11.9.9-25.6-9-33.7-9.8-8.1-23.9-9.4-35-3.4-.4 0-33.2 18.3-63.5 18.3-5.1 0-6.8-.9-16.6-11.9C550.7 29.6 533.2 10 500 10s-50.7 19.6-62.2 32.4c-9.8 11.1-11.5 11.9-16.2 11.9-30.3 0-63.1-17.9-63.1-18.3-11.1-6.4-25.1-4.7-35 3.4-9.8 8.1-13.2 21.7-9 33.7 9 24.7 44.8 117.2 100.2 172.2C247.2 313.9 81 557.3 81 719.3 81 958 292.8 990 500 990s419-32 419-270.7c0-162-166.2-405.4-332.9-474M549.9 822v49.4h-68.2v-43.1c-33.3-2.6-66.5-12.8-84.8-25.2l13.2-42.6c18.8 11.9 43.9 21.3 71.6 24.3V630.7c-48.2-22.6-76.7-54.1-76.7-100.6s29.4-83.5 76.7-98.9v-50.3h68.2V424c30.7 2.1 54.1 10.2 68.2 18.3L604 483.6c-9.8-6-29-14.5-54.6-17.5v139.8c55.8 25.2 84 55.8 84 108.7.4 48.2-26.8 91.2-83.5 107.4"/></svg>

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 960 B

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1038 1024" xmlns="http://www.w3.org/2000/svg" data-spm-anchor-id="a313x.7781069.0.i1" width="223.008" height="220"><defs><style/></defs><path d="M941.176 157.501c-26.234-26.234-69.08-26.234-95.313 0L548.981 454.383l95.313 95.313 296.882-296.882c26.234-26.234 26.234-69.08 0-95.313zM519.451 562.617c-1.846 9.756 6.724 18.324 16.611 16.611l96.631-17.797-95.313-95.313-17.929 96.5zm334.383 366.24c0 17.439-14.24 31.679-31.679 31.679H169.382c-17.439 0-31.679-14.24-31.679-31.679V137.85c0-17.439 14.24-31.679 31.679-31.679h652.773c11.04 0 20.639 5.6 26.239 14.079l34.238-34.078c-14.559-17.12-36.158-27.998-60.477-27.998H169.382c-43.838 0-79.517 35.678-79.517 79.676v791.168c0 43.838 35.678 79.676 79.676 79.676h652.773c43.838 0 79.676-35.678 79.676-79.676V328.083l-47.998 47.998v552.777zM746.638 697.506H245.059c-10.56 0-19.199 8.64-19.199 19.199v11.999c0 10.56 8.64 19.199 19.199 19.199h501.579c10.56 0 19.199-8.64 19.199-19.199v-11.999c0-10.56-8.64-19.199-19.199-19.199zm-95.996-378.704H245.059c-10.56 0-19.199 8.64-19.199 19.199V350c0 10.56 8.64 19.199 19.199 19.199h355.185l50.398-50.398zm-1.28 258.869L518.647 601.83c-13.28 2.4-24.799-9.12-22.399-22.399l1.44-8.16H245.059c-10.56 0-19.199 8.64-19.199 19.199v11.999c0 10.56 8.64 19.199 19.199 19.199h501.579c10.56 0 19.199-8.64 19.199-19.199V590.47c0-10.56-8.64-19.199-19.199-19.199H642.963l6.399 6.399zm-404.304-82.236h232.47l50.398-50.398H245.058c-10.56 0-19.199 8.64-19.199 19.199v11.999c0 10.56 8.64 19.199 19.199 19.199zm520.779-19.2v-11.199l-30.398 30.398h11.199c10.56 0 19.199-8.64 19.199-19.199z"/></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M23.85 26.83c-3.46 2.12-7.89 6.54-10 10C10 43.18 10 47.6 10 500c0 452.4 0 456.82 3.85 463.17 2.12 3.46 6.54 7.89 10 10 6.35 3.85 10.58 3.85 362.38 3.85h356.03l6.54-4.42c13.85-9.04 13.27-4.04 12.89-137.91l-.58-119.83-26.35 28.28-26.55 28.26v151.77H63.86V76.84h644.36l.39 189.65.58 189.46 26.54-37.7 26.35-37.7V212.83c0-187.15.77-176.19-13.27-185.42l-6.54-4.42H386.23c-351.8-.01-356.03-.01-362.38 3.84z"/><path d="M154.64 210.71c-3.85 2.69-4.23 4.62-4.23 18.85 0 13.08.58 16.54 3.46 19.04 3.27 3.08 22.12 3.27 231.39 3.27 203.12 0 228.31-.39 232.16-3.08 3.85-2.5 4.23-4.62 4.23-18.27 0-25.77 29.04-22.89-235.24-22.89-202.72 0-227.92.39-231.77 3.08zM905.75 251.87c-10.58 2.69-25 10.58-32.51 17.7-4.81 4.62-245.24 345.65-254.09 360.45-2.31 3.85-34.04 150.61-34.04 157.34 0 7.69 4.04 11.54 9.81 9.81 2.31-.77 34.43-20.58 71.17-44.05l66.94-42.51 124.44-177.72c68.48-97.9 126.18-181.77 128.49-186.57 3.08-6.92 3.85-12.89 4.04-26.16 0-15.77-.58-18.66-6.16-30.01-11.54-23.27-32.89-37.7-57.7-39.24-7.12-.38-16.35 0-20.39.96zm-25.39 124.64c12.69 8.85 24.23 17.12 25.58 18.47 1.73 1.73-17.89 31.16-93.67 139.45-52.7 75.4-96.56 137.14-97.33 137.14-.77.19-13.46-8.27-28.08-18.47l-26.74-18.66 12.89-18.85c97.71-140.41 180.8-257.36 182.34-256.4.97.59 12.32 8.48 25.01 17.32zM682.63 694.27c4.23 3.27 3.85 3.46-21.93 19.81-14.43 9.23-26.54 16.35-26.93 15.96-.58-.38 5.58-29.62 11.93-56.55.96-4.23 1.73-4.04 16.93 6.54 8.65 6.16 17.69 12.51 20 14.24zM154.26 346.12c-5.39 5.39-5.58 32.31-.39 37.12 3.27 3.08 22.12 3.27 232.55 3.27 264.09 0 235.24 2.69 235.24-21.73 0-25.2 28.85-22.5-235.62-22.5-225.43 0-227.93 0-231.78 3.84zM157.14 479.23c-5.96 3.46-6.73 5.39-6.73 20.77 0 7.89.77 15.39 1.54 16.54 4.23 6.35 7.89 6.54 234.66 6.54 262.75 0 235.05 2.69 235.05-23.08s27.7-23.08-235.43-23.08c-164.27.19-226.2.77-229.09 2.31zM163.88 613.1c-11.35 1.16-13.46 4.62-13.46 21.93 0 24.81-11.35 22.7 117.33 22.7s117.33 2.12 117.33-22.7c0-23.85 10.39-21.73-110.98-22.12-56.94-.2-106.57-.2-110.22.19zM552.41 673.11c-1.54.77-13.66 23.27-26.93 49.82-13.27 26.54-24.43 48.28-25.01 48.28s-5.96-10-12.12-22.12c-8.08-16.54-12.31-22.7-15.77-24.04-9.62-3.66-13.66.19-25.39 24.04-6.15 12.12-11.54 22.12-12.12 22.12s-5.96-10-12.12-22.12c-11.73-23.85-15.77-27.7-25.39-24.04-3.46 1.35-7.69 7.5-15.77 24.04-6.15 12.12-11.54 22.12-12.12 22.12s-5.96-10-12.12-22.12c-11.73-23.85-15.77-27.7-25.39-24.04-3.46 1.35-7.69 7.5-15.77 24.04-6.15 12.12-11.54 22.12-12.12 22.12s-5.96-10-12.12-22.12c-8.27-16.93-12.12-22.7-15.96-24.04-10.96-4.23-13.08-1.35-46.36 64.44-17.12 33.85-31.16 63.86-31.35 66.74 0 10 11.54 16.35 20.77 11.35 1.73-.96 14.04-23.46 27.31-50.01 13.27-26.54 24.43-48.28 25-48.28s6.16 10.19 12.5 22.7c9.23 18.08 12.5 22.7 16.16 23.08 10.77 1.54 13.27-.77 24.62-23.66 6.15-12.12 11.54-22.12 12.12-22.12s6.16 10.19 12.5 22.7c9.23 18.08 12.5 22.7 16.16 23.08 10.77 1.54 13.27-.77 24.62-23.66 6.15-12.12 11.54-22.12 12.12-22.12s6.16 10.19 12.5 22.7l11.54 22.5h17.32l11.54-22.5c6.35-12.5 11.93-22.7 12.5-22.7s6.16 10.19 12.5 22.7l11.54 22.5h17.32l32.12-63.47c17.7-35.01 32.12-65.4 32.31-67.9.21-8.86-12.67-15.2-21.14-10.01z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M23.85 26.83c-3.46 2.12-7.89 6.54-10 10C10 43.18 10 47.6 10 500c0 452.4 0 456.82 3.85 463.17 2.12 3.46 6.54 7.89 10 10 6.35 3.85 10.58 3.85 362.38 3.85h356.03l6.54-4.42c13.85-9.04 13.27-4.04 12.89-137.91l-.58-119.83-26.35 28.28-26.55 28.26v151.77H63.86V76.84h644.36l.39 189.65.58 189.46 26.54-37.7 26.35-37.7V212.83c0-187.15.77-176.19-13.27-185.42l-6.54-4.42H386.23c-351.8-.01-356.03-.01-362.38 3.84z"/><path d="M154.64 210.71c-3.85 2.69-4.23 4.62-4.23 18.85 0 13.08.58 16.54 3.46 19.04 3.27 3.08 22.12 3.27 231.39 3.27 203.12 0 228.31-.39 232.16-3.08 3.85-2.5 4.23-4.62 4.23-18.27 0-25.77 29.04-22.89-235.24-22.89-202.72 0-227.92.39-231.77 3.08zm751.11 41.16c-10.58 2.69-25 10.58-32.51 17.7-4.81 4.62-245.24 345.65-254.09 360.45-2.31 3.85-34.04 150.61-34.04 157.34 0 7.69 4.04 11.54 9.81 9.81 2.31-.77 34.43-20.58 71.17-44.05l66.94-42.51 124.44-177.72c68.48-97.9 126.18-181.77 128.49-186.57 3.08-6.92 3.85-12.89 4.04-26.16 0-15.77-.58-18.66-6.16-30.01-11.54-23.27-32.89-37.7-57.7-39.24-7.12-.38-16.35 0-20.39.96zm-25.39 124.64c12.69 8.85 24.23 17.12 25.58 18.47 1.73 1.73-17.89 31.16-93.67 139.45-52.7 75.4-96.56 137.14-97.33 137.14-.77.19-13.46-8.27-28.08-18.47l-26.74-18.66 12.89-18.85c97.71-140.41 180.8-257.36 182.34-256.4.97.59 12.32 8.48 25.01 17.32zM682.63 694.27c4.23 3.27 3.85 3.46-21.93 19.81-14.43 9.23-26.54 16.35-26.93 15.96-.58-.38 5.58-29.62 11.93-56.55.96-4.23 1.73-4.04 16.93 6.54 8.65 6.16 17.69 12.51 20 14.24zM154.26 346.12c-5.39 5.39-5.58 32.31-.39 37.12 3.27 3.08 22.12 3.27 232.55 3.27 264.09 0 235.24 2.69 235.24-21.73 0-25.2 28.85-22.5-235.62-22.5-225.43 0-227.93 0-231.78 3.84zm2.88 133.11c-5.96 3.46-6.73 5.39-6.73 20.77 0 7.89.77 15.39 1.54 16.54 4.23 6.35 7.89 6.54 234.66 6.54 262.75 0 235.05 2.69 235.05-23.08s27.7-23.08-235.43-23.08c-164.27.19-226.2.77-229.09 2.31zm6.74 133.87c-11.35 1.16-13.46 4.62-13.46 21.93 0 24.81-11.35 22.7 117.33 22.7s117.33 2.12 117.33-22.7c0-23.85 10.39-21.73-110.98-22.12-56.94-.2-106.57-.2-110.22.19zm388.53 60.01c-1.54.77-13.66 23.27-26.93 49.82-13.27 26.54-24.43 48.28-25.01 48.28s-5.96-10-12.12-22.12c-8.08-16.54-12.31-22.7-15.77-24.04-9.62-3.66-13.66.19-25.39 24.04-6.15 12.12-11.54 22.12-12.12 22.12s-5.96-10-12.12-22.12c-11.73-23.85-15.77-27.7-25.39-24.04-3.46 1.35-7.69 7.5-15.77 24.04-6.15 12.12-11.54 22.12-12.12 22.12s-5.96-10-12.12-22.12c-11.73-23.85-15.77-27.7-25.39-24.04-3.46 1.35-7.69 7.5-15.77 24.04-6.15 12.12-11.54 22.12-12.12 22.12s-5.96-10-12.12-22.12c-8.27-16.93-12.12-22.7-15.96-24.04-10.96-4.23-13.08-1.35-46.36 64.44-17.12 33.85-31.16 63.86-31.35 66.74 0 10 11.54 16.35 20.77 11.35 1.73-.96 14.04-23.46 27.31-50.01 13.27-26.54 24.43-48.28 25-48.28s6.16 10.19 12.5 22.7c9.23 18.08 12.5 22.7 16.16 23.08 10.77 1.54 13.27-.77 24.62-23.66 6.15-12.12 11.54-22.12 12.12-22.12s6.16 10.19 12.5 22.7c9.23 18.08 12.5 22.7 16.16 23.08 10.77 1.54 13.27-.77 24.62-23.66 6.15-12.12 11.54-22.12 12.12-22.12s6.16 10.19 12.5 22.7l11.54 22.5h17.32l11.54-22.5c6.35-12.5 11.93-22.7 12.5-22.7s6.16 10.19 12.5 22.7l11.54 22.5h17.32l32.12-63.47c17.7-35.01 32.12-65.4 32.31-67.9.21-8.86-12.67-15.2-21.14-10.01z"/></svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M813.935 991.447H209.164c-49.6 0-89.949-36.306-89.949-80.931V113.134c0-44.625 40.349-80.931 89.949-80.931h480.553l214.196 175.942v702.371c0 44.625-40.349 80.931-89.978 80.931zM209.164 91.171c-16.815 0-31.011 10.036-31.011 21.964v797.382c0 11.898 14.197 21.964 31.011 21.964h604.771c16.815 0 31.011-10.065 31.011-21.964V246.808H679.157V99.812l-10.531-8.64H209.164zm563.811 280.087c0 9.774-7.913 17.687-17.687 17.687H495.943c-9.774 0-17.687-7.912-17.687-17.687 0-9.774 7.912-17.687 17.687-17.687h259.345c9.774 0 17.687 7.912 17.687 17.687zm-405.964 88.786h-44.305c-36.742 0-66.618-29.876-66.618-66.618v-44.305c0-36.742 29.876-66.618 66.618-66.618h44.305c36.713 0 66.589 29.876 66.589 66.618v44.305c0 36.742-29.876 66.618-66.589 66.618zm31.214-110.924c0-17.222-13.993-31.244-31.215-31.244h-44.305c-17.251 0-31.244 14.022-31.244 31.244v44.305c0 17.251 13.993 31.244 31.244 31.244h44.305c17.222 0 31.215-13.993 31.215-31.244V349.12zm-111.97 174.574h465.629c9.774 0 17.687 7.913 17.687 17.687 0 9.774-7.912 17.687-17.687 17.687H286.255c-9.774 0-17.687-7.912-17.687-17.687 0-9.774 7.912-17.687 17.687-17.687zm0 116.917h465.629c9.774 0 17.687 7.912 17.687 17.687 0 9.745-7.912 17.687-17.687 17.687H286.255c-9.774 0-17.687-7.942-17.687-17.687 0-9.774 7.912-17.687 17.687-17.687zm0 122.793H545.6c9.774 0 17.687 7.912 17.687 17.687 0 9.745-7.912 17.687-17.687 17.687H286.255c-9.774 0-17.687-7.942-17.687-17.687 0-9.774 7.912-17.687 17.687-17.687z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M1008.37 984.192c.493 2.2.762 4.483.762 6.831a30.92 30.92 0 0 1-5.604 17.79c-5.512 8.668-15.196 14.425-26.23 14.425-2.893 0-5.69-.405-8.347-1.144H55.049a31.083 31.083 0 0 1-8.348 1.144c-11.034 0-20.717-5.757-26.23-14.426a30.916 30.916 0 0 1-5.603-17.789c0-2.348.269-4.631.763-6.83v-671.77c0-17.16 13.91-31.07 31.07-31.07s31.071 13.91 31.071 31.07v647.53h868.456V62.902H328.816c-17.16 0-31.07-13.91-31.07-31.07s13.91-31.07 31.07-31.07h649.245c17.16 0 31.07 13.91 31.07 31.07 0 2.348-.268 4.632-.762 6.83v945.53zM201.077 312.554h638.19v57.948h-638.19v-57.948zm0 157.236h638.19v57.948h-638.19V469.79zm638.19 358.636h-638.19v-57.948h638.19v57.948zm-638.19-210.442h638.19v57.947h-638.19v-57.947zm65.525-444.212h-76.438v76.438c0 17.16-13.91 31.07-31.07 31.07s-31.071-13.91-31.071-31.07v-76.438H51.586c-17.16 0-31.07-13.91-31.07-31.07s13.91-31.072 31.07-31.072h76.438V35.193c0-17.16 13.91-31.071 31.07-31.071s31.071 13.91 31.071 31.07v76.438h76.438c17.16 0 31.07 13.911 31.07 31.071 0 17.16-13.91 31.071-31.07 31.071z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1026 1024" xmlns="http://www.w3.org/2000/svg" width="200.391" height="200"><defs><style/></defs><path d="M992 799.232H800V991.04a32 32 0 1 1-64 0V799.232H544a32 32 0 1 1 0-63.936h192V543.488a32 32 0 0 1 64 0v191.808h192a32 32 0 1 1 0 63.936zM832 283.136C832 153.472 752.64 64 612.608 64H283.456c-140.16 0-219.52 84.288-219.52 219.136v328.832c0 129.728 86.208 219.264 219.52 219.264h116.48v63.872H256c-141.312 0-256-114.432-256-255.68V255.808A255.872 255.872 0 0 1 256 0h384c141.376 0 256 114.56 256 255.808v143.808h-64v-116.48z"/></svg>

After

Width:  |  Height:  |  Size: 567 B

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M768 992H256c-89.6 0-160-70.4-160-160V320L377.6 32H768c89.6 0 160 70.4 160 160v640c0 89.6-70.4 160-160 160zM160 345.6V832c0 51.2 44.8 96 96 96h512c51.2 0 96-44.8 96-96V192c0-51.2-44.8-96-96-96H403.2L160 345.6z"/><path d="M300.8 352H147.2v-64h153.6c32 0 51.2-25.6 51.2-51.2V64h64v172.8c0 64-51.2 115.2-115.2 115.2zm134.4 358.4c-6.4 0-19.2 0-25.6-6.4l-128-140.8c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l134.4 134.4c12.8 12.8 12.8 32 0 44.8-6.4 6.4-12.8 12.8-25.6 12.8z"/><path d="M435.2 710.4c-6.4 0-19.2 0-25.6-6.4-12.8-12.8-12.8-32 0-44.8L684.8 384c12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8L460.8 697.6c-6.4 6.4-12.8 12.8-25.6 12.8z"/></svg>

After

Width:  |  Height:  |  Size: 781 B

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M672.461 566.616H285.033c-14.137 0-25.639 11.5-25.639 25.637 0 14.138 11.502 25.64 25.64 25.64H672.46c14.138 0 25.641-11.501 25.641-25.64 0-14.137-11.502-25.637-25.64-25.637zm0 146.957H285.033c-14.137 0-25.639 11.5-25.639 25.637 0 14.138 11.502 25.64 25.64 25.64H672.46c14.138 0 25.641-11.501 25.641-25.64 0-14.137-11.502-25.637-25.64-25.637zM792.7 352.86c-14.138 0-25.641 11.501-25.641 25.64v494.3l-.001.433c-.9.28-2.666.645-5.765.645H198.001c-4.312 0-7.564-2.972-7.564-6.914V160.13c0-4.493.974-8.289 1.811-9.822h373.338c14.137 0 25.64-11.502 25.64-25.64 0-14.137-11.502-25.639-25.64-25.639h-374.07c-30.337 0-52.357 25.697-52.357 61.1v706.836c0 32.087 26.396 58.192 58.841 58.192h563.293c34.12 0 57.042-21.041 57.042-52.357V378.502c.001-14.138-11.498-25.641-25.635-25.641zm83.485-243.45c-10.003-10.002-26.218-10.002-36.221 0L669.787 279.59l-76.035-76.035c-10.002-10.002-26.218-10.002-36.22 0-10.001 10.002-10.001 26.218 0 36.221l94.145 94.145a25.614 25.614 0 0 0 36.22 0l188.288-188.288c10.002-10.004 10.002-26.22 0-36.222zM485.428 259.345H285.034c-14.137 0-25.639 11.502-25.639 25.64 0 14.137 11.502 25.638 25.64 25.638h200.393c14.138 0 25.64-11.501 25.64-25.638 0-14.138-11.503-25.64-25.64-25.64zM672.461 406.3H285.033c-14.137 0-25.639 11.5-25.639 25.639s11.502 25.639 25.64 25.639H672.46c14.138 0 25.641-11.502 25.641-25.64s-11.502-25.638-25.64-25.638z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M317.154 354.322a170.332 170.332 0 0 0 14.462 47.404 160.69 160.69 0 0 0 26.112 40.173 146.228 146.228 0 0 0 35.754 28.522 131.766 131.766 0 0 0 35.753 14.06v69.098a27.317 27.317 0 0 0 54.233 0v-68.294a195.239 195.239 0 0 0 40.173-8.838 135.783 135.783 0 0 0 40.173-21.291 108.868 108.868 0 0 0 29.326-34.95 105.252 105.252 0 0 0 11.248-50.216 90.388 90.388 0 0 0-22.898-57.045 110.475 110.475 0 0 0-20.89-20.488 222.556 222.556 0 0 0-25.309-16.471c-8.838-4.82-18.48-9.642-28.12-14.06l-24.908-10.847v-128.15a73.918 73.918 0 0 1 59.054 52.625v3.616a26.916 26.916 0 0 0 53.43 0 26.112 26.112 0 0 0-2.41-10.847 120.518 120.518 0 0 0-14.463-38.164 120.518 120.518 0 0 0-26.514-30.933 120.518 120.518 0 0 0-33.745-18.88 160.69 160.69 0 0 0-34.147-8.437V26.916a27.317 27.317 0 0 0-54.233 0v44.19a148.639 148.639 0 0 0-35.352 9.24 126.945 126.945 0 0 0-35.351 22.094 102.842 102.842 0 0 0-24.104 32.138 92.397 92.397 0 0 0-8.838 40.173 88.38 88.38 0 0 0 9.641 40.172 112.082 112.082 0 0 0 25.31 31.335 173.947 173.947 0 0 0 34.95 23.702c10.846 5.624 22.094 10.847 33.744 16.069v139.8a73.114 73.114 0 0 1-14.462-7.23 87.175 87.175 0 0 1-19.283-16.873 102.842 102.842 0 0 1-14.863-21.291 125.74 125.74 0 0 1-8.437-28.121v-5.223a27.317 27.317 0 0 0-54.635 0zm166.716-42.984l17.274 10.043a150.647 150.647 0 0 1 23.702 15.266 77.935 77.935 0 0 1 16.07 17.274 32.138 32.138 0 0 1 5.623 18.077 53.43 53.43 0 0 1-5.222 21.694 60.259 60.259 0 0 1-14.06 18.88 75.525 75.525 0 0 1-22.095 14.061 96.013 96.013 0 0 1-22.899 6.428zm-68.293-88.782a98.825 98.825 0 0 1-18.881-13.658 54.635 54.635 0 0 1-12.052-16.07 43.788 43.788 0 0 1-4.017-19.282 40.173 40.173 0 0 1 3.615-17.275 47.404 47.404 0 0 1 11.248-14.863 71.106 71.106 0 0 1 18.48-12.052 87.175 87.175 0 0 1 15.667-5.223v105.654zm492.516 271.165l-83.157-80.345a52.224 52.224 0 0 0-37.763-15.667 51.823 51.823 0 0 0-38.164 15.667L427.63 731.543 274.57 578.084a59.455 59.455 0 0 0-38.164-15.667 59.857 59.857 0 0 0-40.173 15.667l-80.345 82.354a52.224 52.224 0 0 0 0 75.524l273.174 271.567a52.224 52.224 0 0 0 38.164 16.07 53.831 53.831 0 0 0 40.172-16.07l441.9-437.881a51.02 51.02 0 0 0 15.265-37.763 52.626 52.626 0 0 0-16.471-38.164zM426.022 970.17L153.249 698.602l83.158-80.345 190.418 188.81L788.379 451.54l80.345 82.354z"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M339.647 484.9c-9.394 0-18.789-5.78-23.125-15.175l-25.293-56.367c-5.78-13.008 0-27.461 13.008-33.242 13.008-5.781 27.461 0 33.242 13.008l25.293 56.366c5.781 13.008 0 27.461-13.008 33.243-2.89 1.445-6.504 2.167-10.117 2.167zm88.164 0c-3.613 0-7.227-.722-10.117-2.167-13.008-5.782-18.79-20.235-13.008-33.243l25.293-56.367c5.781-13.007 20.234-18.788 33.242-13.007 13.008 5.781 18.789 20.234 13.008 33.242l-25.293 56.367c-4.336 9.394-13.73 15.175-23.125 15.175z"/><path d="M491.404 497.908H265.936c-13.73 0-25.292-11.562-25.292-25.293s11.562-25.292 25.292-25.292h225.468c13.73 0 25.293 11.562 25.293 25.292s-11.562 25.293-25.293 25.293zm0 109.844H265.936c-13.73 0-25.292-11.563-25.292-25.293s11.562-25.293 25.292-25.293h225.468c13.73 0 25.293 11.562 25.293 25.293s-11.562 25.293-25.293 25.293z"/><path d="M378.67 700.974c-13.73 0-25.292-11.563-25.292-25.293V473.338c0-13.73 11.562-25.293 25.292-25.293s25.293 11.563 25.293 25.293v202.343c0 13.73-11.562 25.293-25.293 25.293zM732.771 826.716a28.183 28.183 0 1 0 56.367 0 28.183 28.183 0 1 0-56.367 0zM844.0590000000001 826.716a28.183 28.183 0 1 0 56.367 0 28.183 28.183 0 1 0-56.367 0zM847.673 713.259a28.183 28.183 0 1 0 56.367 0 28.183 28.183 0 1 0-56.367 0zM776.853 500.076H622.205c-13.73 0-25.293-11.562-25.293-25.293s11.562-25.293 25.293-25.293h154.648c13.73 0 25.292 11.563 25.292 25.293s-10.84 25.293-25.292 25.293zM726.267 608.474H622.205c-13.73 0-25.293-11.562-25.293-25.293s11.562-25.293 25.293-25.293h104.062c13.73 0 25.293 11.563 25.293 25.293s-10.84 25.293-25.293 25.293z"/><path d="M667.01 853.454H207.401c-45.528 0-83.106-37.578-83.106-83.105V253.65c0-45.527 37.578-83.105 83.106-83.105h41.19c11.563 0 22.403 7.95 24.571 19.512 4.336 17.344 19.512 29.629 37.578 29.629s33.242-12.285 37.578-29.63c2.89-11.562 13.008-19.51 24.57-19.51h86.719c11.562 0 22.402 7.948 24.57 19.51 4.336 17.345 19.511 29.63 37.578 29.63s33.242-12.285 37.578-29.63c2.89-11.562 13.008-19.51 24.57-19.51h79.492c11.562 0 22.402 7.948 24.57 19.51 4.336 17.345 19.512 29.63 37.578 29.63s33.242-12.285 37.578-29.63c2.89-11.562 13.008-19.51 24.57-19.51h31.074c45.528 0 83.106 37.577 83.106 83.104v356.991c0 13.73-11.563 25.293-25.293 25.293s-25.293-11.562-25.293-25.293v-356.99c0-18.067-14.453-32.52-32.52-32.52h-13.73c-14.453 29.629-44.805 49.863-79.492 49.863s-65.039-19.512-79.492-49.863H601.97c-14.453 29.629-44.804 49.863-79.492 49.863s-65.038-19.512-79.491-49.863h-51.309c-14.453 29.629-44.804 49.863-79.492 49.863s-65.039-19.512-79.492-49.863h-23.847c-18.066 0-32.52 14.453-32.52 32.52v516.697c0 18.066 14.454 32.519 32.52 32.519h459.607c13.73 0 25.293 11.562 25.293 25.293s-13.007 25.293-26.738 25.293z"/></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M255.435 63.177v639.437H63.6c0 254.53 125.33 255.78 127.89 255.78h575.564c191.775 0 191.775-127.891 191.775-127.891V63.177H255.435zM703.05 894.448l-508.125.124c-15.614-1.998-52.705-29.85-64.01-128.014H703.05v127.89zm191.835-63.945c0 .624 0 63.945-127.89 63.945V702.614H319.38V127.121h575.504v703.382z"/><path d="M383.326 255.012H830.94v63.944H383.326v-63.944zM383.326 382.9H830.94v63.946H383.326v-63.945zM383.326 510.791H830.94v63.934H383.326V510.79z"/></svg>

After

Width:  |  Height:  |  Size: 591 B

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M327 564.9c-16.6 0-30 13.4-30 30s13.4 30 30 30h155V697c0 16.6 13.4 30 30 30s30-13.4 30-30v-72.1h155c16.6 0 30-13.4 30-30s-13.4-30-30-30H542v-48.7h155c16.6 0 30-13.4 30-30s-13.4-30-30-30H552.5l108-108c11.7-11.7 11.7-30.7 0-42.4s-30.7-11.7-42.4 0L512 411.9 405.9 305.8c-11.7-11.7-30.7-11.7-42.4 0s-11.7 30.7 0 42.4l108 108H327c-16.6 0-30 13.4-30 30s13.4 30 30 30h155v48.7H327zM102.3 717.6c-21 0-38.3 17.2-38.3 38.3v165.8c0 21 17.2 38.3 38.3 38.3 21 0 38.3-17.2 38.3-38.3V755.9c-.1-21.1-17.3-38.3-38.3-38.3z"/><path d="M581.6 733.4C557.1 794.9 512 844 458.2 857.9H315.7v-38.3h74.7c24.7 0 44.6-20 44.6-44.6 0-24.7-20-44.6-44.6-44.6h-52.5C315.1 711 288.6 700 260.2 700c-28.4 0-54.9 10.9-77.7 30.4h-10v216.7h285.8c93.3-7.9 167.1-106.4 167.1-227 0-5.2-.5-10.1-.8-15.2-18.9 0-36.1 11.1-43 28.5z"/><path d="M959.8 497.7C952.3 258.1 752.9 64.6 513.2 64 265.2 63.4 64 264.2 64 512v1.1c0 13 10.8 23.4 23.8 23.4h12.5c13.3 0 23.7-10.9 23.7-24.2v-.2c0-223.1 189.3-402.9 415.8-387 191.9 13.4 347 169.4 359.4 361.4 11.4 176.5-96 330-249.8 388.4-11.6 4.4-19.2 15.5-19.2 27.9 0 20.9 20.9 35.6 40.5 28.2C844 865.3 965.9 695.3 959.8 497.7z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M391.81 95.36h217.462c5.718 0 10.355-5.102 10.355-11.396v-8.546c0-6.294-4.637-11.396-10.355-11.396H391.809c-5.72 0-10.356 5.102-10.356 11.396v8.546c0 6.294 4.637 11.396 10.356 11.396zM305.649 389.747H695.43c5.718 0 10.355-5.103 10.355-11.396v-8.547c0-6.293-4.637-11.395-10.355-11.395H305.65c-5.72 0-10.356 5.102-10.356 11.395v8.547c0 6.293 4.637 11.396 10.356 11.396z"/><path d="M860.413 595.755v-493.17c0-20.977-15.43-37.986-34.464-37.986H704.582c-10.744 1.199-15.274 14.72-15.274 14.72l-38.393 69.362s-2.835 4.306-4.257 5.184c-1.22.756-4.739.95-4.739.95H357.808s-2.675-.34-3.662-.95c-.724-.448-2.59-2.174-2.59-2.174l-40.059-72.372s-4.53-13.521-15.273-14.72H175.202c-19.034 0-34.464 17.008-34.464 37.986V857.02c0 20.979 15.43 37.985 34.464 37.985h382.28l-.006-.006c38.684 39.76 92.76 64.47 152.617 64.47 117.593 0 212.924-95.329 212.924-212.922 0-58.917-23.934-112.242-62.604-150.792zm-6.102-5.836c-.22-.2-.433-.407-.653-.608.22.2.435.406.653.608zm-3.346-3.016c-.288-.255-.574-.513-.863-.767.29.254.575.512.863.767zM175.202 863.667c-3.326 0-6.032-2.983-6.032-6.647V102.585c0-3.665 2.706-6.647 6.032-6.647H287.39l39.894 72.074 2.424 4.38 3.566 3.3c3.911 3.619 6.049 4.941 6.952 5.5 1.478.915 5.973 3.696 14.329 4.755l1.62.206h286.456l.71-.04c10.194-.563 15.498-3.847 17.225-4.917 3.195-1.975 7.598-5.362 13.358-14.106l.669-1.018.594-1.072 38.225-69.063h112.534c3.324 0 6.031 2.982 6.031 6.647v469.372c-34.53-24.154-76.55-38.334-121.886-38.334-1.44 0-2.874.026-4.307.056v-7.185c0-6.293-4.637-11.395-10.355-11.395H305.65c-5.72 0-10.356 5.102-10.356 11.395v8.547c0 6.295 4.637 11.396 10.356 11.396h331.538c1.386-.505 2.781-.995 4.18-1.472-60.281 20.547-108.39 67.375-130.688 126.825H305.65c-5.72 0-10.356 5.102-10.356 11.396v8.547c0 6.295 4.637 11.396 10.356 11.396h195.958a213.632 213.632 0 0 0-4.436 43.42c0 43.28 12.924 83.534 35.107 117.14l-.012-.019H175.202zm672.103-279.923c-.266-.224-.53-.45-.797-.673.267.223.531.45.797.673zm-3.757-3.097c-.221-.178-.441-.357-.661-.533.22.176.44.355.66.533zm-3.813-3l-.493-.38c.164.127.33.253.493.38zm-3.866-2.903l-.264-.192.264.192zm-134.011-40.947l-.913.034.913-.034zm-4.626.225l-1.03.064c.344-.021.686-.045 1.03-.064zm-4.772.333c-.173.015-.345.032-.518.046.174-.014.346-.032.518-.046zm-12.397 1.387c-.395.055-.79.106-1.184.164.394-.057.79-.109 1.184-.164zm-4.376.663zm-4.624.801c-.569.105-1.134.216-1.702.325.568-.109 1.134-.22 1.702-.325zm-4.663.914c-.523.108-1.042.228-1.562.34.52-.113 1.04-.232 1.562-.34zm-6.89 1.566c-.655.158-1.31.313-1.962.478.652-.166 1.308-.32 1.961-.478zm-4.458 1.135c-.728.194-1.455.388-2.178.59.723-.202 1.45-.395 2.178-.59zm-4.582 1.275zm-4.567 1.384c-.799.252-1.595.514-2.39.776.796-.262 1.591-.524 2.39-.776zM509.358 675.416l-.145.41.145-.41zm-3.728 11.553c-.027.093-.057.187-.083.28l.083-.28zm-.928 3.302zm-1.13 4.293c-.156.627-.308 1.258-.46 1.887.154-.63.303-1.26.46-1.887zm50.433 196.782c.01.011.022.021.03.032l-.03-.032zm-18.924-23.52c.01.012.019.025.027.038l-.027-.038zm2.925 4.108c.009.012.018.023.025.035l-.025-.035zm3.018 4.034l.028.037c-.009-.013-.02-.024-.028-.037zm3.106 3.956l.037.046c-.011-.017-.024-.031-.037-.046zm3.202 3.884l.037.044c-.011-.015-.025-.029-.037-.044zm3.292 3.808l.036.04-.036-.04zm288.32-12.217c-34.417 34.416-80.178 53.371-128.85 53.371-48.674 0-94.435-18.955-128.852-53.371-34.418-34.418-53.373-80.18-53.373-128.852 0-48.674 18.955-94.434 53.373-128.852s80.178-53.372 128.851-53.372 94.434 18.954 128.852 53.372 53.372 80.18 53.372 128.852-18.954 94.433-53.372 128.852z"/><path d="M801.835 756.008c8.477 0 15.35-6.872 15.35-15.35s-6.873-15.349-15.35-15.349H742.09l65.67-85.421c5.167-6.721 3.907-16.358-2.814-21.525-6.72-5.168-16.358-3.907-21.524 2.814l-72.494 94.297-72.496-94.297c-5.167-6.72-14.802-7.982-21.524-2.814-6.72 5.167-7.98 14.804-2.813 21.525l65.671 85.421h-59.744c-8.477 0-15.35 6.873-15.35 15.35s6.873 15.35 15.35 15.35h75.557v33.44h-71.92c-8.477 0-15.35 6.873-15.35 15.35s6.873 15.35 15.35 15.35h71.92v57.341c0 8.477 6.872 15.35 15.35 15.35s15.349-6.873 15.349-15.35v-57.342h71.919c8.477 0 15.35-6.872 15.35-15.35s-6.873-15.349-15.35-15.349h-71.92v-33.44h75.557z"/></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M634.49 422.752L755.173 272.44h-91.054l-119.96 150.312h-59.981L363.495 272.44h-90.332l120.683 150.312H273.163v59.98h211.015v90.332H273.163v59.98h211.015v120.684h59.98V633.044H754.45v-59.98H544.158v-90.331H754.45v-59.98H634.49zM32.52 513.084c0 265.936 215.35 481.287 481.287 481.287 265.936 0 481.287-215.35 481.287-481.287S779.744 31.797 513.807 31.797 32.519 247.147 32.519 513.084zm59.98 0c0-232.694 188.612-421.307 421.307-421.307 232.694 0 421.307 188.613 421.307 421.307 0 232.694-188.613 421.307-421.307 421.307-232.695 0-421.307-188.613-421.307-421.307zm0 0"/></svg>

After

Width:  |  Height:  |  Size: 705 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M896 928H128c-17.6 0-32-14.4-32-32s14.4-32 32-32h768c17.6 0 32 14.4 32 32s-14.4 32-32 32zm0-128H128c-17.6 0-32-14.4-32-32V608c0-52.8 43.2-96 96-96h204.8c-6.4-38.4-25.6-75.2-52.8-107.2-36.8-41.6-56-94.4-56-148.8 0-60.8 24-118.4 68.8-161.6 44.8-43.2 102.4-64 164.8-62.4C636.8 36.8 734.4 136 736 251.2c1.6 57.6-20.8 113.6-59.2 156.8-27.2 28.8-43.2 64-49.6 104H832c52.8 0 96 43.2 96 96v160c0 17.6-14.4 32-32 32zm-736-64h704V608c0-17.6-14.4-32-32-32H592c-17.6 0-32-14.4-32-32 0-67.2 24-131.2 68.8-179.2 28.8-30.4 43.2-70.4 43.2-112-1.6-83.2-70.4-153.6-153.6-156.8-44.8-1.6-86.4 14.4-116.8 44.8-32 30.4-49.6 72-49.6 115.2 0 38.4 14.4 76.8 40 105.6 46.4 52.8 72 116.8 72 182.4 0 17.6-14.4 32-32 32H192c-17.6 0-32 14.4-32 32v128z"/></svg>

After

Width:  |  Height:  |  Size: 862 B

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1045 1024" xmlns="http://www.w3.org/2000/svg" width="204.102" height="200"><defs><style/></defs><path d="M229.836 177.192h461.986v57.748H229.836v-57.748zm-1.54 116.063h461.986v57.748H228.297v-57.748zm-113.955-232.5h692.977v461.984h57.748V60.754c0-31.893-25.855-57.748-57.748-57.748H114.34c-31.893 0-57.748 25.855-57.748 57.748v808.473c0 31.893 25.855 57.748 57.748 57.748h404.237v-57.748H114.34V60.754zm115.11 463.486v57.748h140.453c0-20.068 2.94-39.447 8.386-57.748H229.451zm236.111-115.496H228.297v57.748H403.84a203.177 203.177 0 0 1 61.722-57.748zm437.246 464.777L770.39 742.678c30.444-35.382 48.852-81.417 48.852-131.754 0-111.627-90.493-202.119-202.117-202.119-111.626 0-202.118 90.492-202.118 202.119 0 111.624 90.492 202.118 202.118 202.118 40.412 0 78.05-11.867 109.63-32.299l135.218 133.614c11.276 11.276 29.558 11.276 40.834 0 11.274-11.277 11.274-29.558 0-40.835zM472.754 610.924c0-79.734 64.639-144.37 144.372-144.37 79.731 0 144.369 64.636 144.369 144.37 0 79.731-64.638 144.37-144.37 144.37s-144.37-64.639-144.37-144.37z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M620.544 137.6c103.936 10.432 187.328 72.96 205.12 180.224h-60.16l97.088 144.448 97.152-144.448h-67.008C874.944 173.376 765.568 79.488 627.392 66.112c-19.136-1.536-36.864 14.848-36.864 35.712 1.28 17.92 13.568 34.24 30.016 35.776zm-150.4-73.024H132.416c-19.136 0-34.176 16.384-34.176 37.248v321.728c0 20.864 15.04 37.248 34.176 37.248h337.728c19.136 0 34.176-16.384 34.176-37.248V101.824c0-20.864-15.04-37.248-34.176-37.248zm-32.832 324.736H165.248V136.064h272.128v253.248h-.064zM404.48 883.84c-116.224-10.432-205.12-87.872-209.216-216h64.256l-97.024-144.448L65.408 667.84h64.256c2.688 165.376 118.912 272.576 268.032 287.488 19.136 1.472 36.928-14.912 36.928-35.776a35.648 35.648 0 0 0-30.144-35.712zm489.6-323.264H556.288c-19.2 0-34.176 16.448-34.176 37.248v323.264c0 20.8 14.976 37.184 34.176 37.184h337.728c19.136 0 34.112-16.384 34.112-37.184V597.824c.064-20.8-16.32-37.248-34.048-37.248zm-32.896 324.736H589.12V633.536h272.064v251.776z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M819.2 409.6H546.133V307.2H614.4c37.547 0 68.267-30.72 68.267-68.267v-102.4c0-37.546-30.72-68.266-68.267-68.266H409.6c-37.547 0-68.267 30.72-68.267 68.266v102.4c0 37.547 30.72 68.267 68.267 68.267h68.267v102.4H204.8c-37.547 0-68.267 30.72-68.267 68.267v102.4c0 20.48 13.654 34.133 34.134 34.133s34.133-13.653 34.133-34.133v-102.4h273.067v102.4c0 20.48 13.653 34.133 34.133 34.133s34.133-13.653 34.133-34.133v-102.4H819.2v102.4c0 20.48 13.653 34.133 34.133 34.133s34.134-13.653 34.134-34.133v-102.4c0-37.547-30.72-68.267-68.267-68.267zM409.6 238.933v-102.4h204.8v102.4H409.6zM170.667 921.6c-75.094 0-136.534-61.44-136.534-136.533s61.44-136.534 136.534-136.534S307.2 709.973 307.2 785.067 245.76 921.6 170.667 921.6zm0-204.8c-37.547 0-68.267 30.72-68.267 68.267s30.72 68.266 68.267 68.266 68.266-30.72 68.266-68.266-30.72-68.267-68.266-68.267zM512 921.6c-75.093 0-136.533-61.44-136.533-136.533S436.907 648.533 512 648.533s136.533 61.44 136.533 136.534S587.093 921.6 512 921.6zm0-204.8c-37.547 0-68.267 30.72-68.267 68.267s30.72 68.266 68.267 68.266 68.267-30.72 68.267-68.266S549.547 716.8 512 716.8zm341.333 204.8c-75.093 0-136.533-61.44-136.533-136.533s61.44-136.534 136.533-136.534 136.534 61.44 136.534 136.534S928.427 921.6 853.333 921.6zm0-204.8c-37.546 0-68.266 30.72-68.266 68.267s30.72 68.266 68.266 68.266 68.267-30.72 68.267-68.266-30.72-68.267-68.267-68.267z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M284.16 614.4h453.12c15.36 0 28.16-12.8 28.16-25.6 0-15.36-12.8-25.6-28.16-25.6H284.16c-15.36 0-28.16 10.24-28.16 25.6 0 12.8 12.8 25.6 28.16 25.6zm-2.56-153.6h460.8c12.8 0 25.6-12.8 25.6-25.6s-12.8-25.6-25.6-25.6H281.6c-12.8 0-25.6 12.8-25.6 25.6s12.8 25.6 25.6 25.6zm0-153.6h460.8c12.8 0 25.6-12.8 25.6-25.6S755.2 256 742.4 256H281.6c-12.8 0-25.6 12.8-25.6 25.6s12.8 25.6 25.6 25.6z"/><path d="M870.4 102.4v780.8c-15.36-7.68-33.28-12.8-51.2-12.8-38.4 0-71.68 20.48-89.6 51.2h-28.16c-17.92-30.72-51.2-51.2-89.6-51.2s-71.68 20.48-89.6 51.2h-28.16c-17.92-30.72-51.2-51.2-89.6-51.2s-71.68 20.48-89.6 51.2h-28.16c-17.92-30.72-51.2-51.2-89.6-51.2-17.92 0-35.84 5.12-51.2 12.8V102.4H870.4M896 51.2H128c-15.36 0-25.6 10.24-25.6 25.6v870.4c0 15.36 10.24 25.6 25.6 25.6h2.56c10.24 0 20.48-5.12 25.6-15.36 7.68-20.48 25.6-35.84 48.64-35.84s40.96 15.36 48.64 35.84c2.56 10.24 12.8 15.36 25.6 15.36h58.88c10.24 0 20.48-5.12 25.6-15.36 7.68-20.48 25.6-35.84 48.64-35.84s40.96 15.36 48.64 35.84c2.56 10.24 12.8 15.36 25.6 15.36h58.88c10.24 0 20.48-5.12 25.6-15.36 7.68-20.48 25.6-35.84 48.64-35.84s40.96 15.36 48.64 35.84c2.56 10.24 12.8 15.36 25.6 15.36h58.88c10.24 0 20.48-5.12 25.6-15.36 7.68-20.48 25.6-35.84 48.64-35.84s40.96 15.36 48.64 35.84c2.56 10.24 12.8 15.36 25.6 15.36h2.56c15.36 0 25.6-10.24 25.6-25.6V76.8C921.6 61.44 911.36 51.2 896 51.2z"/></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M900.608 936.96H131.584c-14.336 0-25.6-11.264-25.6-25.6V294.4c0-14.336 11.264-25.6 25.6-25.6h769.024c14.336 0 25.6 11.264 25.6 25.6v616.96c0 14.336-11.264 25.6-25.6 25.6zm-743.424-51.2h717.824V320H157.184v565.76z"/><path d="M984.576 316.416H48.64c-14.336 0-25.6-11.264-25.6-25.6V92.16c0-14.336 11.264-25.6 25.6-25.6h935.936c14.336 0 25.6 11.264 25.6 25.6v198.656c0 14.336-11.264 25.6-25.6 25.6zm-910.336-51.2h884.736V117.76H74.24v147.456zM723.456 486.4H309.76c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h413.696c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM516.608 839.168c-83.968 0-152.064-68.096-152.064-152.064S432.64 535.04 516.608 535.04s152.064 68.096 152.064 152.064-68.096 152.064-152.064 152.064zm0-252.928c-55.808 0-100.864 45.056-100.864 100.864S460.8 787.968 516.608 787.968c55.808 0 100.864-45.056 100.864-100.864S572.416 586.24 516.608 586.24z"/></svg>

After

Width:  |  Height:  |  Size: 1018 B

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M281.2 119.7s124.7 129.9 109.1 223.5-275.4 83.2-296.2 301.5c-20.8 218.3 78 337.8 233.9 343 155.9 5.2 223.5 0 223.5 0"/><path d="M718.8 119.7S594.1 249.6 609.7 343.2s275.5 83.2 296.2 301.4c20.8 218.3-78 337.8-233.9 343-155.9 5.2-223.5 0-223.5 0"/><path d="M281.2 119.7s83.2 88.4 119.5 98.7c36.4 10.4 31.2-46.8 83.2-49.4s23.9 57.1 92.5 50.6 94.6-42.8 141.4-100c46.8-57.2-64.4-46.8-141.4-31.2-76.9 15.6-27.8-67-74-75-76.2-13.3-49.7 12.7-86.1 54.2-36.3 41.7-135.1 52.1-135.1 52.1zM374.8 348.4s176.7 72.8 265.1 0c11.3-9.3 22.4-18.2 33.4-26.6 75.2-57.3 145.5-88.2 231.7-20.2M639.8 364.6s142.9-45.1 240.4 16.1M515.5 496.3V859 496.3z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M281.2 119.7s124.7 129.9 109.1 223.5-275.4 83.2-296.2 301.5c-20.8 218.3 78 337.8 233.9 343 155.9 5.2 223.5 0 223.5 0"/><path d="M718.8 119.7S594.1 249.6 609.7 343.2s275.5 83.2 296.2 301.4c20.8 218.3-78 337.8-233.9 343-155.9 5.2-223.5 0-223.5 0"/><path d="M281.2 119.7s83.2 88.4 119.5 98.7c36.4 10.4 31.2-46.8 83.2-49.4s23.9 57.1 92.5 50.6 94.6-42.8 141.4-100c46.8-57.2-64.4-46.8-141.4-31.2-76.9 15.6-27.8-67-74-75-76.2-13.3-49.7 12.7-86.1 54.2-36.3 41.7-135.1 52.1-135.1 52.1zm93.6 228.7s176.7 72.8 265.1 0c11.3-9.3 22.4-18.2 33.4-26.6 75.2-57.3 145.5-88.2 231.7-20.2m-265.2 63s142.9-45.1 240.4 16.1M515.5 496.3V859 496.3z"/></svg>

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 704 B

View File

@@ -0,0 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M991.121 483.273C991.121 216.788 774.333 0 507.848 0S24.576 216.788 24.576 483.273c0 127.428 49.938 243.16 130.811 329.597v210.51l109.734.374 115.015-.367.007-74.495c40.755 11.198 83.442 17.681 127.705 17.681 43.616 0 85.69-6.333 125.91-17.216l.006 74.031 115.012.367 109.738-.373V814.847c81.952-86.638 132.607-203.186 132.607-331.574zM324.644 965.039H209.162V862.466c34.975 27.61 73.691 50.61 115.482 67.802v34.771zM81.308 483.273c0-235.183 191.36-426.54 426.54-426.54S934.39 248.09 934.39 483.272c0 235.21-191.36 426.568-426.54 426.568S81.307 718.483 81.307 483.273zm607.944 481.766v-34.11c41.76-16.985 80.475-39.742 115.486-67.12v101.23H689.252zM390.354 210.738c-18.653-3.753-41.697-11.829-62.308-21.83-4.935 33.654-20.548 94.107-36.09 131.478-22.438 54.201-69.59 128.04-99.46 161.66 17.436 11.864 35.934 12.768 44.653 27.095 20.544-29.264 35.477-51.058 54.806-88.464v204.365c0 44.84-3.108 98.432-6.893 133.944h56.092V315.387c19.33-39.233 42.373-78.498 49.875-85.965 13.044-13.077 12.435-16.185-.675-18.684zm160.777 401.226c-19.33-6.249-36.765-14.328-55.487-23.684-19.935 39.87-82.851 114.007-129.551 142.661 26.156 6.862 47.985 20.58 53.593 32.408 99.006-110.902 118.333-129.588 127.728-133.95 18.65-8.106 18.045-13.073 3.717-17.435zm112.726-234.269c36.76.64 66.7 3.109 91.639 5.608V328.46c-25.547 2.503-54.877 5.002-91.64 5.612v-92.18c0-20.58 2.5-32.405 8.716-36.157 8.787-4.967 8.11-9.97-2.432-9.97-23.11 0-37.438-.604-56.092-3.713 1.894 13.683 2.5 43.588 2.5 97.18v44.84h-89.14v-91.57c0-20.545 2.503-32.409 8.787-36.122 8.72-5.002 8.044-9.969-2.499-9.969-23.047.61-38.05-.644-56.7-3.752 1.823 14.327 2.499 31.763 2.499 97.183v44.232c-29.94-1.218-55.483-3.11-81.639-5.612v54.842c26.156-2.499 51.093-4.358 81.639-4.967v139.556c-38.656-.64-69.204-2.499-96.575-5.607v56.665c46.09-4.358 110.902-6.216 196.257-6.216s150.772 1.858 196.863 6.216v-56.665c-32.44 3.713-65.417 5.607-112.183 5.607V377.695zm-47.31 140.198h-89.14V377.695h89.14v140.198zm36.09 74.136l-42.306 31.763c36.09 32.404 84.07 90.963 111.51 131.446l49.805-42.373c-41.088-47.95-72.852-79.104-119.009-120.836z"/></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,11 +1,13 @@
import { login, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import Cookies from 'js-cookie'
import { Message } from 'element-ui'
const user = {
state: {
token: getToken(),
name: '',
roles: []
name: Cookies.get('name'),
roles: [],
id: Cookies.get('id')
},
mutations: {
@@ -17,6 +19,9 @@ const user = {
},
SET_ROLES: (state, roles) => {
state.roles = roles
},
SET_ID: (state, id) => {
state.id = id
}
},
@@ -32,7 +37,11 @@ const user = {
this.$router.push({ path: '/login' })
} else {
setToken(data[0].角色编号)
Cookies.set('id', data[0].人员编号, { expires: 1 })
Cookies.set('name', data[0].姓名, { expires: 1 })
commit('SET_TOKEN', data[0].角色编号)
commit('SET_NAME', data[0].姓名)
commit('SET_ID', data[0].人员编号)
resolve()
}
}).catch(error => {
@@ -43,10 +52,10 @@ const user = {
// 获取用户信息
GetInfo({ commit, state }) {
console.log(state.token)
return new Promise((resolve, reject) => {
getInfo(state.token).then(response => {
commit('SET_ROLES', 'admin')
commit('SET_NAME', 'admin')
resolve(response)
}).catch(error => {
reject(error)
@@ -57,6 +66,8 @@ const user = {
FedLogOut({ commit }) {
return new Promise(resolve => {
commit('SET_TOKEN', '')
Cookies.remove('name')
Cookies.remove('id')
removeToken()
resolve()
})

View File

@@ -7,7 +7,7 @@ import axios from 'axios'
export const upload = `http://123.56.95.229:8411/submit/uploadFile.ashx`
export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx`
const service = axios.create({
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.122:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间
})

View File

@@ -99,3 +99,9 @@ export function SectionToChinese(section) {
}
return chnStr
}
export function sleep(time) {
return new Promise(resolve => {
setTimeout(resolve, time)
})
}

View File

@@ -0,0 +1,258 @@
<template>
<div class="app-container">
<el-card style="margin-bottom: 20px">
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchDetail()">查询</el-button>
</el-row>
</el-card>
<el-card style="background-color: #DCDCDC">
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
<el-table
:data="item.table1"
border
style="width: 100%;margin-top: 15px">
<el-table-column
label="序号"
width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column
label="组号"
width="240"
align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column
label="装配任务"
align="center">
<template slot-scope="scope">
{{ scope.row.装配任务 }}
</template>
</el-table-column>
</el-table>
<el-table :data="item.table2" size="mini" border style="width: 100%">
<el-table-column label="序号" width="90" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.序号" size="mini" style="width:60px" readonly/>
</template>
</el-table-column>
<el-table-column label="工序名称" width="230" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.工序名称" size="mini" style="width:200px" readonly/>
</template>
</el-table-column>
<el-table-column label="工艺内容及装配具体要求" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.工艺内容及装配具体要求" :rows="1" size="mini" type="textarea" readonly/>
</template>
</el-table-column>
<el-table-column label="质检" align="center" width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.质检" size="mini" readonly align="center"/>
</template>
</el-table-column>
<el-table-column label="工时/时" align="center">
<el-table-column label="工艺工时" align="center" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.工艺工时" size="mini" readonly align="center"/>
</template>
</el-table-column>
<el-table-column label="实际工时" align="center" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.实际工时" size="mini" align="center" @change="update(scope.row)"/>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="完成情况/装配工" align="center" width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.装配员" size="mini" readonly align="center" @click.native="param=0;selectPerson(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="检验情况/检验员" align="center" width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.检验员" size="mini" readonly align="center" @click.native="param=1;selectPerson(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini" align="center" @change="update(scope.row)"/>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible" title="人员信息" center>
<div style="height: 500px;">
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px;width: 30%">
<el-tree
:data="data2"
:props="defaultProps"
node-key="id"
style="width: 150px;float: left"
height="400"
accordion
@node-click="handleNodeClick"/>
</div>
<el-table :data="List1" highlight-current-row height="400" style="width: 60%;float: left;margin-left: 30px" @row-click="handleCurrentChange2">
<el-table-column label="考勤编号" align="center" >
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column label="姓名" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column label="工作岗位" align="center">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
<el-button style="margin-left: 120px;margin-top: 20px" @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initProject, searchMachine, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
export default {
data() {
return {
projectValue: '',
project: [],
machineNumberValue: '',
machineNumber: [],
floatNum: '',
workingHours: '',
Completion: '',
Inspection: '',
Remarks: '',
name: '',
staffNum: '',
dialogFormVisible: false,
data2: [],
List1: [],
loading: false,
result: 0,
defaultProps: {
children: 'children',
label: 'label'
},
dataAll: []
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
getTree().then(response => { // 获取人员信息树
const data = response.data
this.data2 = fn(data, 0)
})
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
async searchDetail() { // 主表查询
this.dataAll = []
if (this.machineNumberValue !== '') {
const response = await searchDetail(this.machineNumberValue)
const data = response.data
for (let i = 0; i < data.length; i++) {
const response2 = await searchProcess(data[i].组件工艺流水号)
this.dataAll.push({
table1: [data[i]],
table2: response2.data
})
}
} else {
this.$message.warning('请先选择机床编号')
}
},
selectPerson(row) { // 点击查询按钮
this.floatNum = row.装配工序流水号
this.workingHours = row.实际工时
this.Completion = row.完成情况
this.Inspection = row.检验情况
this.Remarks = row.备注
this.dialogFormVisible = true
},
handleCurrentChange2(row) { // 获取当前行人员信息
this.staffNum = row.人员编号
},
getName() { // 提交人员
if (this.param === 0) {
update(this.floatNum, this.workingHours, this.staffNum, this.Inspection, this.Remarks).then(response => {
this.searchDetail()
console.log(response.data, '工艺要求修改成功', 505)
})
} else if (this.param === 1) {
update(this.floatNum, this.workingHours, this.Completion, this.staffNum, this.Remarks).then(response => {
this.searchDetail()
console.log(response.data, '工艺要求修改成功', 505)
})
}
this.dialogFormVisible = false
},
handleNodeClick(data) { // 树节点点击
getTable8(data.id).then(response => {
this.List1 = response.data
})
},
update(row) {
console.log(row)
update(row.装配工序流水号, row.实际工时, row.完成情况, row.检验情况, row.备注).then(response => {
console.log(response.data, '工艺要求修改成功', 505)
})
}
}
}
</script>
<style scoped>
span{
margin: 10px 0px 10px 10px;
}
</style>

View File

@@ -0,0 +1,219 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>计划完成日期:</span>
<el-date-picker
v-model="startEndDate"
style="width:250px"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="goDown()">下达</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
size="small"
min-height="450px"
height="450px"
highlight-current-row
border
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
align="center"
width="35"/>
<el-table-column align="center" label="项目名称">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床编号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床名称">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划完成日期">
<template slot-scope="scope">
{{ scope.row.项目计划完成时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="客户名称">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, searchmachine, searchTable, goDown } from '@/api/Assembly/AssemblyPlan'
export default {
data() {
return {
projectValue: '',
project: [],
ProjectSerialNumber: [],
machineNumberValue: '',
machineNumber: [],
MachineSerialNumber: [],
ProcessStartTime: '',
ProcessEndTime: '',
TimeToGo: '',
startEndDate: '',
time: '',
time1: '',
check: 0,
check1: 0,
check2: 0,
check3: 0,
tableData: [],
loading: false,
result: 0,
pageSize: 10,
pageCurrent: 1,
total: 0
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
projectChange() {
this.machineNumberValue = ''
this.machineNumber = []
searchmachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchTable() {
this.loading = true
console.log(this.startEndDate)
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
this.check2 = 0
this.startEndDate = ''
} else { this.check2 = 1 }
this.projectValue ? this.check = 1 : this.check = 0
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
},
handleSelectionChange(val) {
this.ProjectSerialNumber = []
this.MachineSerialNumber = []
this.ProcessStartTime = []
this.ProcessEndTime = []
for (let i = 0; i < val.length; i++) {
this.ProjectSerialNumber[i] = val[i].项目流水号
this.MachineSerialNumber[i] = val[i].机床流水号
}
},
getCurrentTime() {
this.ProcessStartTime = this.getTime0(0)
this.ProcessEndTime = this.getTime0(2)
this.TimeToGo = this.getTime0(0)
},
getTime0(num) {
var date0 = new Date()
var date = new Date(date0.getTime() + num * 24 * 60 * 60 * 1000)
var month = this.zeroFill(date.getMonth() + 1)
var day = this.zeroFill(date.getDate())
var hour = this.zeroFill(date.getHours())
var minute = this.zeroFill(date.getMinutes())
var second = this.zeroFill(date.getSeconds())
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
},
zeroFill(i) {
if (i >= 0 && i <= 9) {
return '0' + i
} else {
return i
}
},
goDown() {
this.getCurrentTime()
if (this.ProjectSerialNumber.length !== 0) {
this.result = 0
for (let i = 0; i < this.ProjectSerialNumber.length; i++) {
goDown(this.ProjectSerialNumber[i], this.MachineSerialNumber[i], this.ProcessStartTime, this.ProcessEndTime, this.TimeToGo).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.ProjectSerialNumber.length) {
this.$message.success('下达成功')
this.searchTable()
} else {
this.$message.error('下达失败')
}
})
}
} else {
this.$message.warning('至少选择一条')
}
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
span{
margin: 10px 0px 10px 10px;
}
</style>

View File

@@ -0,0 +1,257 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="Preservation()">保存</el-button>
</el-row>
</el-card>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
size="small"
highlight-current-row
min-height="500px"
height="500px"
border
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
align="center"
width="35"/>
<el-table-column align="center" label="机床编号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床名称">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺开始时间">
<template slot-scope="scope">
{{ scope.row.工艺开始时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺结束时间">
<template slot-scope="scope">
{{ scope.row.工艺结束时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺员">
<template slot-scope="scope">
<el-input v-model="tableData[scope.$index].工艺员" size="mini" style="width:150px" placeholder="工艺员" @click.native="selectPerson(scope.$index)"/>
</template>
</el-table-column>
<el-table-column align="center" label="下达时间">
<template slot-scope="scope">
{{ scope.row.下发时间 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible" title="工艺定额人员选择" center>
<el-table
:data="tableData2"
style="width: 100%;max-height: 200px"
border
size="mini"
height="200px"
highlight-current-row
@row-click="confirmPerson">
<el-table-column align="center" label="考勤编号">
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="性别">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column align="center" label="工作岗位">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogFormVisible=false">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initProject, searchmachine, initPerson, searchTable, Preservation } from '@/api/Assembly/AssemblyProcessAssignment'
export default {
data() {
return {
projectValue: '',
project: [],
machineNumberValue: '',
machineNumber: [],
tableData: [],
tableData2: [],
ProcessSerialNumber: [],
PersonnelNumber: [],
index: '',
check: 0,
check1: 0,
check2: 0,
result: 0,
loading: false,
dialogFormVisible: false,
multipleSelection: [],
pageSize: 1,
pageCurrent: 10,
total: 0
}
},
created() {
this.fetchData()
this.initPerson()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
initPerson() { // 初始化工艺员
initPerson().then(response => {
this.tableData2 = response.data
})
},
projectChange() {
this.machineNumberValue = ''
this.machineNumber = []
if (this.projectValue !== '') {
this.check2 = 1
searchmachine(this.projectValue, this.check2).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
} else {
this.check2 = 0
}
},
selectPerson(index) { // 点击查询按钮
this.index = index
this.dialogFormVisible = true
console.log(this.index)
},
confirmPerson(row) { // 选择一行
this.tableData[this.index].工艺员 = row.姓名
this.tableData[this.index].人员编号 = row.人员编号
console.log(this.tableData)
},
searchTable() {
this.tableData = []
this.loading = true
this.projectValue ? this.check = 1 : this.check = 0
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
工艺计划流水号: response.data.rows[i].工艺计划流水号,
机床流水号: response.data.rows[i].机床流水号,
机床名称: response.data.rows[i].机床名称,
机床图号: response.data.rows[i].机床图号,
工艺开始时间: response.data.rows[i].工艺开始时间,
工艺结束时间: response.data.rows[i].工艺结束时间,
工艺员: '',
人员编号: '',
下发时间: response.data.rows[i].下发时间
})
}
this.total = response.data.total
this.loading = false
})
},
handleSelectionChange(val) {
this.multipleSelection = val
console.log(this.multipleSelection)
// this.ProcessSerialNumber = []
// this.PersonnelNumber = []
// for (let i = 0; i < val.length; i++) {
// this.ProcessSerialNumber[i] = val[i].工艺计划流水号
// this.PersonnelNumber[i] = val[i].人员编号
// }
},
Preservation() {
if (this.multipleSelection.length !== 0) {
this.result = 0
for (let i = 0; i < this.multipleSelection.length; i++) {
console.log(this.multipleSelection[i].人员编号)
if (this.multipleSelection[i].人员编号 === '') {
this.$message.error('请选择工艺员')
} else {
Preservation(this.multipleSelection[i].工艺计划流水号, this.multipleSelection[i].人员编号).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) {
this.$message.success('分配成功')
this.searchTable()
}
})
}
}
} else {
this.$message.warning('至少选择一条')
}
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
span{
margin: 10px 0px 10px 10px;
}
</style>

View File

@@ -0,0 +1,834 @@
<template>
<div class="app-container">
<el-card style="margin-bottom: 20px">
<el-radio-group
v-model="radio"
size="small"
style="margin: 10px;"
@change="Organization()">
<el-radio :label="0">未编制</el-radio>
<el-radio :label="1">已编制</el-radio>
</el-radio-group>
<span>工艺员:</span>
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();searchMachine()">
<el-option
v-for="item in Craftmen"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small" @change="searchGroup()">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchDetail">查询</el-button>
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">装配工艺调整</el-button>
</el-card>
<el-card style="background-color: #DCDCDC">
<el-row>
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" style="margin-left: 20px" @click="DYbtn">典艺</el-button>
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="WYbtn">完艺</el-button>
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="handleAdd">增加</el-button>
<el-button :disabled="disabled" type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
</el-row>
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
<el-table
:data="item.table1"
border
style="width: 100%;margin-top: 15px">
<el-table-column
label="序号"
width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column
label="组号"
width="240"
align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column
label="装配任务"
align="center">
<template slot-scope="scope">
{{ scope.row.装配任务 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button
:disabled="disabled"
size="mini"
icon="el-icon-edit"
type="primary"
@click="handleEdit(scope.row, 'form2')">编辑</el-button>
<el-button
:disabled="disabled"
size="mini"
icon="el-icon-delete"
type="danger"
@click="deleteGroup(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table :data="item.table2" size="mini" border style="width: 100%">
<el-table-column label="序号" width="90" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.序号" :disabled="disabled" size="mini" style="width:60px" @change="update(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="工序名称" width="230" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.工序名称"
:disabled="disabled"
size="mini"
style="width:200px"
@dblclick.native="tableSearch(scope.row)"
@change="update(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="工艺内容及装配具体要求" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.工艺内容及装配具体要求"
:rows="1"
:disabled="disabled"
size="mini"
type="textarea"
@change="update(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="质检" align="center" width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.质检" :disabled="disabled" size="mini" align="center" @change="update(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button
:disabled="disabled"
size="mini"
icon="el-icon-arrow-up"
type="primary"
@click="upOne(scope.row)"/>
<el-button
:disabled="disabled"
size="mini"
icon="el-icon-arrow-down"
type="primary"
@click="downOne(scope.row)"/>
<el-button
:disabled="disabled"
size="mini"
icon="el-icon-circle-plus-outline"
type="primary"
@click="insertOne(scope.row)"/>
<el-button
:disabled="disabled"
size="mini"
icon="el-icon-delete"
type="danger"
@click="deleteOne(scope.row)"/>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible2" title="工序名称、工序要求选择" center width="400px">
<el-form ref="form2" :model="form2" label-position="left" label-width="125px" class="demo-ruleForm">
<el-form-item label="工序名称分类">
<el-select v-model="processNameClassValue" placeholder="分类" size="small" @change="cChange()">
<el-option
v-for="item in processNameClass"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="工序名称">
<el-select v-model="processNameValue" placeholder="名称" size="small" @change="nChange()">
<el-option
v-for="item in processName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="工序要求">
<el-input v-model="processRequestValue" placeholder="要求" size="small"/>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="confirmSelect()">确定选择</el-button>
</el-form-item>
</el-form>
</el-dialog>
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center width="400px">
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
<el-form-item label="序号" prop="序号">
<el-input v-model="form2.序号" placeholder="序号" size="small"/>
</el-form-item>
<el-form-item label="组件" prop="组件">
<el-select v-model="form2.组件" multiple placeholder="组件" size="small">
<el-option
v-for="item in GroupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="装配任务" prop="装配任务">
<el-input v-model="form2.装配任务" placeholder="装配任务" type="textarea" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible4=false">取消</el-button>
<el-button v-show="title==='增加组件工艺'" type="primary" @click="submitAdd()">确定</el-button>
<el-button v-show="title==='编辑组件工艺'" type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible5" title="典型工艺选择" center width="800px">
<el-form ref="form1" :model="form1" label-position="left" class="demo-ruleForm">
<el-row>
<el-col :span="9">
<el-form-item label="典型工艺机床分类">
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
<el-option
v-for="item in machineType"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="机床编号">
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px">
<el-option
v-for="item in machineNumber2"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-button size="small" type="success" icon="el-icon-search" @click="searchCompleted()">查询</el-button>
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
</el-col>
</el-row>
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
<el-table
:data="item.table1"
border
style="width: 100%;margin-top: 15px">
<el-table-column
label="序号"
width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column
label="组号"
width="240"
align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column
label="装配任务"
align="center">
<template slot-scope="scope">
{{ scope.row.装配任务 }}
</template>
</el-table-column>
</el-table>
<el-table :data="item.table2" size="mini" border style="width: 100%">
<el-table-column label="序号" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column label="工序名称" width="230" align="center">
<template slot-scope="scope">
{{ scope.row.工序名称 }}
</template>
</el-table-column>
<el-table-column label="工艺内容及装配具体要求" align="center">
<template slot-scope="scope">
{{ scope.row.工艺内容及装配具体要求 }}
</template>
</el-table-column>
<el-table-column label="质检" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.质检 }}
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible1" title="已完工艺选择" center width="800px">
<el-form ref="form1" :model="form1" label-position="left" class="demo-ruleForm">
<el-row>
<el-col :span="8">
<el-form-item label="工艺员">
<el-input v-model="CraftmanValue" size="small" readonly style="width: 150px;" @focus="dialogFormVisible3=true"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="机床编号">
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px">
<el-option
v-for="item in machineNumber1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-button size="small" type="success" icon="el-icon-search" @click="searchCompleted()">查询</el-button>
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
</el-col>
</el-row>
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
<el-table
:data="item.table1"
border
style="width: 100%;margin-top: 15px">
<el-table-column
label="序号"
width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column
label="组号"
width="240"
align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column
label="装配任务"
align="center">
<template slot-scope="scope">
{{ scope.row.装配任务 }}
</template>
</el-table-column>
</el-table>
<el-table :data="item.table2" size="mini" border style="width: 100%">
<el-table-column label="序号" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column label="工序名称" width="230" align="center">
<template slot-scope="scope">
{{ scope.row.工序名称 }}
</template>
</el-table-column>
<el-table-column label="工艺内容及装配具体要求" align="center">
<template slot-scope="scope">
{{ scope.row.工艺内容及装配具体要求 }}
</template>
</el-table-column>
<el-table-column label="质检" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.质检 }}
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible3"
title="工艺定额人员"
center
style="min-height: 300px">
<el-table
:data="tableData3"
size="mini"
style="width: 97%;max-height: 300px"
height="300"
highlight-current-row
border
@row-click="selectPerson">
<el-table-column align="center" label="考勤编号" width="150">
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="性别" width="150">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column align="center" label="工作岗位" width="150">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="tijiao()">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initCraftmen, searchMachine, searchGroup, submitAdd, submitEdit, searchDetail, searchProcess, insertOne, update, upOne, downOne, deleteOne,
deleteGroup, saveApprove, returnEdit, procedureCopy1, processCopy1, initprocessNameClass, initProcessName, update1, initmachineType, SearchMachine } from '@/api/Assembly/AssemblyProcessPlanning'
import '@/icon/iconfont.css'
export default {
data() {
return {
title: '',
radio: 0,
checked: false,
disabled: false,
CraftmenValue: '',
Craftmen: [],
CraftmanValue: '',
perNum: '',
Name: '',
Number: '',
machineNumberValue: '',
machineNumber: [],
machineNumberValue1: '',
machineNumber1: [],
machineNumberValue2: '',
machineNumber2: [],
machineTypeValue: '',
machineType: [],
AssemblyTask: '',
Group: '',
GroupNumberValue: [],
GroupNumber: [],
GroupNum: '',
GroupProcessNumber: '',
SerialNumber: '',
SerialNumberGroup: [],
isShow2: false,
processNameClassValue: '',
processNameClass: [],
processNameValue: '',
Process: '',
processName: [],
Procedure: '',
ProcedureNameGroup: [],
processRequestValue: '',
ProcessContentGroup: [],
QualityTesting: [],
ProcessSequence: [],
tableData: [],
tableData1: [],
tableData2: [],
tableData3: [],
loading: false,
form1: {},
form2: {
序号: '',
组件: [],
装配任务: ''
},
rules: {
序号: [{ required: true, message: '请输入序号', trigger: 'blur' }],
组件: [{ required: true, message: '请选择组件', trigger: 'change' }],
装配任务: [{ required: true, message: '请输入装配任务', trigger: 'blur' }]
},
num1: '',
result: 0,
dialogFormVisible: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
dialogFormVisible5: false,
dataAll: [],
dataAll1: []
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initCraftmen().then(response => { // 初始化工艺员
this.tableData3 = response.data
for (let i = 0; i < response.data.length; i++) {
this.Craftmen.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
initprocessNameClass().then(response => { // 初始化工序分类
for (let i = 0; i < response.data.length; i++) {
this.processNameClass.push({
label: response.data[i].工序分类名称,
value: response.data[i].工序分类流水号
})
}
})
initmachineType().then(response => { // 初始化机床分类
for (let i = 0; i < response.data.length; i++) {
this.machineType.push({
label: response.data[i].机床分类名称,
value: response.data[i].机床分类流水号
})
}
})
},
clearDetail() {
this.checked = false
this.machineNumberValue = ''
},
searchMachine() { // 根据条件查机床编号
this.machineNumber = []
searchMachine(this.CraftmenValue, this.radio).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchGroup() {
this.GroupNumber = []
this.GroupNumberValue = []
searchGroup(this.machineNumberValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.GroupNumber.push({
label: response.data[i].组号,
value: response.data[i].组号
})
}
})
},
async searchDetail() { // 主表查询
this.dataAll = []
if (this.machineNumberValue !== '') {
const response = await searchDetail(this.machineNumberValue)
const data = response.data
for (let i = 0; i < data.length; i++) {
const response2 = await searchProcess(data[i].组件工艺流水号)
this.dataAll.push({
table1: [data[i]],
table2: response2.data
})
}
} else {
this.$message.warning('请先选择机床编号')
}
},
Organization() {
this.CraftmenValue = ''
this.checked = false
this.machineNumberValue = ''
this.machineNumber = []
if (this.radio === 0) {
this.dataAll = []
this.isShow2 = false
this.disabled = false
} else if (this.radio === 1) {
this.dataAll = []
this.isShow2 = true
this.disabled = true
}
},
returnEdit() {
returnEdit(this.machineNumberValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('调整成功')
this.CraftmenValue = ''
this.machineNumberValue = ''
this.machineNumber = []
this.dataAll = []
} else { this.$message.error('调整失败') }
})
},
DYbtn() {
if (this.machineNumberValue !== '') {
this.dialogFormVisible5 = true
this.dataAll1 = []
this.machineTypeValue = ''
this.machineNumber2 = []
this.machineNumberValue1 = ''
} else {
this.$message.warning('请先选择机床')
}
},
SearchMachine() {
this.machineNumberValue1 = ''
this.machineNumber2 = []
SearchMachine(this.machineTypeValue).then(response => { // 典型机床查询
for (let i = 0; i < response.data.length; i++) {
this.machineNumber2.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
WYbtn() {
if (this.machineNumberValue !== '') {
this.dialogFormVisible1 = true
this.dataAll1 = []
this.machineNumber1 = []
this.machineNumberValue1 = ''
this.CraftmanValue = ''
} else {
this.$message.warning('请先选择机床')
}
},
selectPerson(row) { // 选择工艺员
this.Name = row.姓名
this.Number = row.人员编号
},
tijiao() {
this.dialogFormVisible3 = false
this.CraftmanValue = this.Name
this.perNum = this.Number
this.machineNumber = []
searchMachine(this.perNum, 1).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber1.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
async searchCompleted() { // 主表查询
this.dataAll1 = []
if (this.machineNumberValue1 !== '') {
const response = await searchDetail(this.machineNumberValue1)
const data = response.data
for (let i = 0; i < data.length; i++) {
const response2 = await searchProcess(data[i].组件工艺流水号)
this.dataAll1.push({
table1: [data[i]],
table2: response2.data
})
}
} else {
this.$message.warning('请先选择机床编号')
}
},
async processCopy1() {
this.result = 0
for (let i = 0; i < this.dataAll1.length; i++) {
processCopy1(this.machineNumberValue, this.dataAll1[i].table1[0].序号, this.dataAll1[i].table1[0].组号, this.dataAll1[i].table1[0].装配任务).then(response => {
this.GroupNum = parseInt(response.data.output[0].组件工艺流水号)
if (response.data.result[0].result === '1') {
for (let j = 0; j < this.dataAll1[i].table2.length; j++) {
procedureCopy1(this.GroupNum, this.dataAll1[i].table2[j].序号, this.dataAll1[i].table2[j].工序名称, this.dataAll1[i].table2[j].工艺内容及装配具体要求, this.dataAll1[i].table2[j].质检, this.dataAll1[i].table2[j].工序顺序).then(response => {
})
}
}
this.result += parseInt(response.data.result[0].result)
if (this.result === this.dataAll1.length) {
this.$message.success('拷贝成功')
this.dialogFormVisible1 = false
this.dialogFormVisible5 = false
this.searchDetail()
}
})
}
},
handleAdd() {
if (this.machineNumberValue !== '') {
// this.title = '增加组件工艺'
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = ''])
} else {
this.$message.warning('请先选择机床编号')
}
},
handleEdit(row, formName) {
console.log(this.$refs[formName])
if (this.$refs[formName] !== undefined) {
this.$refs[formName].resetFields()
}
// this.editForm(row, 'form2', [this.title = '编辑组件工艺', this.GroupProcessNumber = row.组件工艺流水号, this.dialogFormVisible4 = true, this.Group = '', this.form2.组件 = []])
this.title = '编辑组件工艺'
this.dialogFormVisible4 = true
this.form2.序号 = row.序号
this.form2.装配任务 = row.装配任务
this.Group = ''
this.form2.组件 = []
this.GroupProcessNumber = row.组件工艺流水号
},
submitAdd() {
for (var i = 0; i < this.form2.组件.length; i++) {
this.Group += this.form2.组件[i] + '组 '
}
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
},
submitEdit() {
for (var i = 0; i < this.form2.组件.length; i++) {
this.Group += this.form2.组件[i] + '组 '
}
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
},
deleteGroup(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteGroup(row.组件工艺流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchDetail()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
insertOne(row) {
insertOne(row.组件工艺流水号).then(response => {})
this.searchDetail()
},
update(row) {
update(row.装配工序流水号, row.序号, row.工序名称, row.工艺内容及装配具体要求, row.质检).then(response => {
console.log(response.data, '工艺要求修改成功', 505)
})
},
deleteTable() {
this.$confirm('此操作将永久删除该工艺, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.result = 0
for (var i = 0; i < this.dataAll.length; i++) {
deleteGroup(this.dataAll[i].table1[0].组件工艺流水号).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.dataAll.length) {
this.$message.success('删除成功')
this.searchDetail()
} else {
this.$message.error('删除失败')
}
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
saveApprove() {
if (this.checked === true) {
saveApprove(this.machineNumberValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('保存成功')
this.CraftmenValue = ''
this.machineNumberValue = ''
this.machineNumber = []
this.dataAll = []
} else { this.$message.error('保存失败') }
})
}
},
upOne(row) {
upOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
this.searchDetail()
},
downOne(row) {
downOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
this.searchDetail()
},
deleteOne(row) {
deleteOne(row.装配工序流水号).then(response => {})
this.searchDetail()
},
cChange() {
this.processName = []
this.processNameValue = ''
this.Process = ''
this.processRequestValue = ''
initProcessName(this.processNameClassValue).then(response => { // 初始化工序分类
this.tableData = response.data
for (let i = 0; i < response.data.length; i++) {
this.processName.push({
label: response.data[i].工序名称,
value: response.data[i].工序名称流水号
})
}
})
},
nChange() {
for (let i = 0; i < this.tableData.length; i++) {
if (this.processNameValue === this.tableData[i].工序名称流水号) {
this.Process = this.tableData[i].工序名称
this.processRequestValue = this.tableData[i].工艺内容及装配具体要求
}
}
},
tableSearch(row) {
this.dialogFormVisible2 = true
this.processNameClassValue = ''
this.processNameValue = ''
this.processRequestValue = ''
this.Procedure = row.装配工序流水号
this.number = row.序号
},
confirmSelect() {
console.log(this.Procedure, this.number, this.Process, this.processRequestValue)
update1(this.Procedure, this.number, this.Process, this.processRequestValue).then(response => {
if (response.data[0].result === '1') {
this.dialogFormVisible2 = false
this.$message.success('选择成功')
this.searchDetail()
} else {
this.$message.success('选择失败')
}
})
}
}
}
</script>
<style scoped>
span{
margin: 10px 0px 10px 10px;
}
</style>

View File

@@ -0,0 +1,213 @@
<template>
<div class="app-container">
<el-card style="margin-bottom: 20px">
<el-radio-group
v-model="radio"
size="small"
style="margin: 10px;"
@change="Organization()">
<el-radio :label="0">未编制</el-radio>
<el-radio :label="1">已编制</el-radio>
</el-radio-group>
<span>定额员:</span>
<el-select v-model="CraftmenValue" placeholder="定额员" size="small" style="width:100px" @change="searchMachine()">
<el-option
v-for="item in Craftmen"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" style="margin-left: 10px;" size="small" @click="searchDetail">查询</el-button>
<el-button v-show="isShow1" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">装配定额调整</el-button>
</el-card>
<el-card style="background-color: #DCDCDC">
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
<el-table
:data="item.table1"
border
style="width: 100%;margin-top: 15px">
<el-table-column
label="序号"
width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column
label="组号"
width="240"
align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column
label="装配任务"
align="center">
<template slot-scope="scope">
{{ scope.row.装配任务 }}
</template>
</el-table-column>
</el-table>
<el-table :data="item.table2" size="mini" border style="width: 100%">
<el-table-column label="序号" width="90" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.序号" size="mini" style="width:60px" readonly/>
</template>
</el-table-column>
<el-table-column label="工序名称" width="230" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.工序名称" size="mini" style="width:200px" readonly/>
</template>
</el-table-column>
<el-table-column label="工艺内容及装配具体要求" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.工艺内容及装配具体要求" :rows="1" size="mini" type="textarea" readonly/>
</template>
</el-table-column>
<el-table-column label="质检" align="center" width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.质检" size="mini" readonly align="center"/>
</template>
</el-table-column>
<el-table-column label="工艺工时" align="center" width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.工艺工时" :disabled="disabled" size="mini" align="center" @change="update(scope.row)"/>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
</div>
</template>
<script>
import { initCraftmen, searchMachine, searchDetail, searchProcess, update, saveApprove, returnEdit } from '@/api/Assembly/AssemblyQuotaSetting'
import '@/icon/iconfont.css'
export default {
data() {
return {
radio: 0,
checked: false,
disabled: false,
CraftmenValue: '',
Craftmen: [],
machineNumberValue: '',
machineNumber: [],
isShow1: true,
isShow2: false,
tableData: [],
tableData1: [],
tableData2: [],
tableData3: [],
loading: false,
result: 0,
dataAll: []
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initCraftmen().then(response => { // 初始化工艺员
this.tableData3 = response.data
for (let i = 0; i < response.data.length; i++) {
this.Craftmen.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.radio).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
async searchDetail() { // 主表查询
this.dataAll = []
if (this.machineNumberValue !== '') {
const response = await searchDetail(this.machineNumberValue)
const data = response.data
for (let i = 0; i < data.length; i++) {
const response2 = await searchProcess(data[i].组件工艺流水号)
this.dataAll.push({
table1: [data[i]],
table2: response2.data
})
}
} else {
this.$message.warning('请先选择机床编号')
}
},
Organization() {
this.CraftmenValue = ''
this.machineNumberValue = ''
this.machineNumber = []
if (this.radio === 0) {
this.dataAll = []
this.isShow1 = true
this.isShow2 = false
this.disabled = false
} else if (this.radio === 1) {
this.dataAll = []
this.isShow1 = false
this.isShow2 = true
this.disabled = true
}
},
returnEdit() {
returnEdit(this.machineNumberValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('调整成功')
this.CraftmenValue = ''
this.machineNumberValue = ''
this.machineNumber = []
this.dataAll = []
} else { this.$message.error('调整失败') }
})
},
update(row) {
update(row.装配工序流水号, row.工艺工时).then(response => {
console.log(response.data, '工艺要求修改成功', 505)
})
},
saveApprove() {
saveApprove(this.machineNumberValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('保存成功')
this.CraftmenValue = ''
this.machineNumberValue = ''
this.machineNumber = []
this.dataAll = []
} else { this.$message.error('保存失败') }
})
}
}
}
</script>
<style scoped>
span{
margin: 10px 0px 10px 10px;
}
</style>

View File

@@ -0,0 +1,381 @@
<template>
<div class="app-container">
<el-card style="margin-bottom: 20px">
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>客户名称:</span>
<el-input v-model="CustomerName" size="small" placeholder="客户名称" readonly style="width: 200px"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchTable()">查询</el-button>
</el-row>
</el-card>
<div style="width: 49.8%; float: left;margin-left: 2px">
<el-card>
<el-row>
<div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">关键节点记录</div>
</el-row>
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 90%;margin-top: 15px" @click="handleAdd()">增加</el-button>
<el-table
v-loading="loading"
:data="tableData"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 450px;margin-top: 10px"
height="450px"
highlight-current-row
size="small">
<el-table-column
type="index"
label="序号"
align="center"
width="50"/>
<el-table-column label="关键节点" align="center">
<template slot-scope="scope">
{{ scope.row.关键节点 }}
</template>
</el-table-column>
<el-table-column label="完成情况" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.完成情况 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200px">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
<div style="width: 49.8%; float: right; margin-right: 2px">
<el-card>
<el-row>
<div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">每日工作记录</div>
</el-row>
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 90%;margin-top: 15px" @click="handleAdd1()">增加</el-button>
<el-table v-loading="loading" :data="tableData1" border style="width: 100%;max-height: 450px;margin-top: 10px" height="450px" highlight-current-row size="small">
<el-table-column
type="index"
label="序号"
align="center"
width="50"/>
<el-table-column label="工作情况" align="center">
<template slot-scope="scope">
{{ scope.row.工作情况 }}
</template>
</el-table-column>
<el-table-column label="工作日期" align="center" width="130px">
<template slot-scope="scope">
{{ scope.row.工作日期 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200px">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleEdit1(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete1(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</div>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
<el-form-item label="关键节点" prop="关键节点">
<el-input v-model="form.关键节点" placeholder="关键节点" size="small"/>
</el-form-item>
<el-form-item label="完成情况" prop="完成情况">
<el-select v-model="form.完成情况" placeholder="完成情况" size="small">
<el-option
v-for="item in Completion"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.备注" placeholder="备注" type="textarea" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible=false">取消</el-button>
<el-button v-show="title==='增加关键节点'" type="primary" @click="submitAdd()">确定</el-button>
<el-button v-show="title==='编辑关键节点'" type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center width="400px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="125px" class="demo-ruleForm">
<el-form-item label="工作情况" prop="工作情况">
<el-input v-model="form1.工作情况" placeholder="工作情况" size="small"/>
</el-form-item>
<el-form-item label="工作日期" prop="工作日期">
<el-date-picker
v-model="form1.工作日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="date"
size="small"
placeholder="工作日期"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1=false">取消</el-button>
<el-button v-show="title1==='增加工作记录'" type="primary" @click="submitAdd1()">确定</el-button>
<el-button v-show="title1==='编辑工作记录'" type="primary" @click="submitEdit1()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initProject, searchMachine, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
export default {
data() {
return {
projectValue: '',
project: [],
CustomerName: '',
machineNumberValue: '',
machineNumber: [],
loading: false,
loading1: false,
dialogFormVisible: false,
dialogFormVisible1: false,
title: '',
title1: '',
Completion: [{
value: '未完成',
label: '未完成'
}, {
value: '完成',
label: '完成'
}],
form: {
关键节点: '',
完成情况: '',
备注: ''
},
rules: {
关键节点: [{ required: true, message: '请输入关键节点', trigger: 'blur' }],
完成情况: [{ required: true, message: '请选择完成情况', trigger: 'change' }]
},
form1: {
工作情况: '',
工作日期: ''
},
rules1: {
工作情况: [{ required: true, message: '请输入工作记录', trigger: 'blur' }],
工作日期: [{ required: true, message: '请选择工作日期', trigger: 'change' }]
},
KeyNodeNum: '',
WorkRecordNum: '',
tableData: [],
tableData1: [],
pageSize: 10,
pageSize1: 10,
pageCurrent: 1,
pageCurrent1: 1,
total: 0,
total1: 0
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
if (response.data.length !== 0) {
this.CustomerName = response.data[0].客户名称
}
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchTable() {
if (this.machineNumberValue !== '') {
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
console.log(response)
this.tableData = response.data.rows
this.total = response.data.total
})
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].工作日期 !== '') {
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
} else {
this.$message.warning('请选择机床')
}
},
handleAdd() {
if (this.machineNumberValue !== '') {
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加关键节点'])
} else {
this.$message.warning('请先选择机床')
}
},
submitAdd() {
this.addTable(addData, [this.machineNumberValue, this.form.关键节点, this.form.完成情况, this.form.备注], 'form', function() { this.dialogFormVisible = false; this.searchTable() })
},
handleEdit(row) {
this.editForm(row, 'form', [this.title = '编辑关键节点', this.KeyNodeNum = row.关键节点流水号, this.dialogFormVisible = true])
},
submitEdit() {
this.editTable(editData, [this.KeyNodeNum, this.form.关键节点, this.form.完成情况, this.form.备注], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
},
handleDelete(row) {
this.deleteRow(deleteData, row.关键节点流水号, function() { this.searchTable() })
},
handleAdd1() {
if (this.machineNumberValue !== '') {
this.addForm('form1', [this.dialogFormVisible1 = true, this.title1 = '增加工作记录'])
} else {
this.$message.warning('请先选择机床')
}
},
submitAdd1() {
this.addTable(addData1, [this.machineNumberValue, this.form1.工作情况, this.form1.工作日期], 'form1', function() { this.dialogFormVisible1 = false; this.searchTable() })
},
handleEdit1(row) {
this.editForm(row, 'form1', [this.title1 = '编辑工作记录', this.WorkRecordNum = row.工作记录流水号, this.dialogFormVisible1 = true])
},
submitEdit1() {
this.editTable(editData1, [this.WorkRecordNum, this.form1.工作情况, this.form1.工作日期], 'form1', function() { this.dialogFormVisible1 = false; this.searchTable() })
},
handleDelete1(row) {
this.deleteRow(deleteData1, row.工作记录流水号, function() { this.searchTable() })
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
})
},
handleCurrentChange(val) {
this.pageCurrent = val
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].工作日期 !== '') {
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].工作日期 !== '') {
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
tableRowClassName({ row, rowIndex }) {
if (row.完成情况 === '完成') {
return 'completion'
}
}
}
}
</script>
<style scoped>
span{
margin: 10px 0px 10px 10px;
}
</style>
<style>
.el-table .completion {
background: limegreen;
}
</style>

View File

@@ -0,0 +1,217 @@
<template>
<div class="app-container">
<el-card style="margin-bottom: 20px">
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchTable">查询</el-button>
<el-button type="primary" icon="el-icon-download" size="small" @click="exportTable('cjn')">导出</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
size="mini"
highlight-current-row
min-height="300px"
height="300px"
border
@row-click="searchDetail">
<el-table-column align="center" label="项目名称">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床编号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床名称">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="客户名称">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<table id="cjn" cellspacing="0px" border align="center" width="100%" style="">
<thead id="20">
<tr>
<td colspan="1" style="text-align: center;font-size: 30px;font-weight: bold;width: 10.25%;">GAOJING</td>
<td colspan="15" style="text-align:center;font-size: 30px;font-weight: bold">专机装配工艺过程卡</td>
</tr>
<tr class="tbodyHead">
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床编号:</td>
<td colspan="4" width="15%" align="center">{{ MachineNum }}</td>
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床名称:</td>
<td colspan="5" width="35%" align="center">{{ MachineName }}</td>
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">客户名称:</td>
<td colspan="4" width="31.25%" align="center">{{ CustomerName }}</td>
</tr>
<tr id="tableHead">
<th class="tg-0pky">序号</th>
<th class="tg-0lax" colspan="4">工序名称</th>
<th class="tg-0lax" colspan="6">工艺内容及装配具体要求</th>
<th class="tg-0lax">质检</th>
<th class="tg-0lax">工时/</th>
<th class="tg-0lax">完成情况/装配工</th>
<th class="tg-0lax">检验情况/检验员</th>
<th class="tg-0lax" width="100px">备注</th>
</tr>
</thead>
<tbody v-for="(item, index) in dataAll" :key="index">
<tr>
<td colspan="16" style="font-weight: bold">{{ item.table1 }}</td>
</tr>
<tr v-for="(list, index) in item.table2" :key="index">
<td align="center"> {{ list.序号 }}</td>
<td colspan="4">{{ list.工序名称 }}</td>
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
<td align="center">{{ list.质检 }}</td>
<td>{{ list.工时 }}</td>
<td>{{ list.完成情况 }}</td>
<td>{{ list.检验情况 }}</td>
<td width="100px">{{ list.备注 }}</td>
</tr>
</tbody>
</table>
</el-card>
</div>
</template>
<script>
import { initProject, searchMachine, searchDetail, searchProcess, searchTable } from '@/api/Assembly/PrintingAssemblyProcessCard'
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
export default {
data() {
return {
dataAll: [],
tableData: [],
radio: 0,
check: 0,
check1: 0,
loading: false,
projectValue: '',
project: [],
machineNumberValue: '',
machineNumber: [],
MachineNum: '',
MachineName: '',
CustomerName: '',
pageCurrent: 1,
pageSize: 10,
total: 0
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchTable() { // 主表查询
this.loading = true
this.projectValue ? this.check = 1 : this.check = 0
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
},
async searchDetail(row) { // 查询工艺
this.dataAll = []
this.MachineName = row.机床名称
this.MachineNum = row.机床图号
this.CustomerName = row.客户名称
const response = await searchDetail(row.机床流水号)
const data = response.data
for (let i = 0; i < data.length; i++) {
const response2 = await searchProcess(data[i].组件工艺流水号)
this.dataAll.push({
table1: data[i].序号 + ' ' + data[i].组号 + ' ' + data[i].装配任务,
table2: response2.data
})
}
},
exportTable(tableid) {
if (this.dataAll.length === 0) {
this.$message.warning('暂无数据')
} else {
getExplorer()
method5(tableid)
Cleanup()
}
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
span{
margin: 10px 0 10px 10px;
}
</style>
<style>
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}
.tg .tg-0lax{text-align:left;vertical-align:top}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@
<span style="margin-left: 10px">投标人</span>
<el-input v-model="Bidder" clearable size="small" style="width:100px" placeholder="请选择" readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 1" @clear="clear()"/>
<span style="margin-left: 10px">招标企业</span>
<el-input v-model="TenderingEnterprise" clearable size="small" style="width:180px" placeholder="请输入招标企业"/>
<el-input v-model="TenderingEnterprise" clearable size="small" style="width:140px" placeholder="请输入招标企业"/>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
@@ -346,7 +346,7 @@ export default {
联系人: '',
联系电话: '',
保证金金额: '',
保证金类型: '',
保证金类型: 1,
投标人: '',
投标日期: '',
计划收回日期: '',
@@ -542,6 +542,7 @@ export default {
})
},
editBidBond(row) {
this.editForm(row, 'form2')
this.title = '编辑'
this.dialogFormVisible2 = true
this.form2.招标企业 = row.招标企业

View File

@@ -9,18 +9,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input v-model="CustomerName" placeholder="请输入客户名称" size="small"></el-input>-->
<!--<span class="move">销售经理</span>-->
<!--<el-input clearable v-model="MarketingManagerValue" @dblclick.native="dialogFormVisiblePeople = true" size="small" style="width:200px" placeholder="请选择营销经理" clearable></el-input>-->
<!--<span class="move">信誉等级</span>-->
<!--<el-select v-model="CreditRatingValue" placeholder="请选择信誉等级" size="small">-->
<!--<el-option-->
<!--v-for="item in CreditRating"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value">-->
<!--</el-option>-->
<!--</el-select>-->
<el-button type="success" icon="el-icon-search" class="move" size="small" @click="selectCustomerOfName">查询</el-button>
</el-card>
<el-row>
@@ -34,7 +22,6 @@
tooltip-effect="dark"
style="width: 100%"
height="730"
highlight-current-row
border>
<el-table-column align="center" label="序号" width="80">
<template slot-scope="scope">
@@ -53,7 +40,7 @@
<el-card>
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click="addMarketingManager();flag = 1">添加销售经理</el-button>
<span style="float: right">销售经理</span>
<el-table v-loading="loading3" :data="tableData3" height="192" style="width: 100%;margin-top: 10px" border highlight-current-row>
<el-table v-loading="loading3" :data="tableData3" height="192" style="width: 100%;margin-top: 10px" border>
<el-table-column label="责权省份" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.省份 }}
@@ -98,7 +85,7 @@
<el-card>
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click = "addCustomer();flag1 = 1">新增客户</el-button>
<span style="float: right">客户信息</span>
<el-table v-loading="loading2" :data="tableData2" height="400" style="width: 100%;margin-top: 10px" border highlight-current-row>
<el-table v-loading="loading2" :data="tableData2" height="400" style="width: 100%;margin-top: 10px" border>
<el-table-column label="省份" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.省份 }}
@@ -196,7 +183,7 @@
@node-click="handleNodeClick"
/>
</div>
<el-table :data="ListPeople" highlight-current-row height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleChange">
<el-table :data="ListPeople" height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleChange">
<el-table-column label="考勤编号" align="center" >
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
@@ -226,7 +213,7 @@
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center width="400px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="营销经理" prop="营销经理">
<el-input v-model="form1.营销经理" clearable size="small" style="width:200px" placeholder="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true"/>
<el-input v-model="form1.营销经理" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="dialogFormVisiblePeople = true"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -236,27 +223,22 @@
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogFormVisible2" center width="700px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-row>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="省份:" prop="省份">
<el-input v-model="form2.省份" :disabled="true" clearable size="small" style="width:200px" placeholder="请选择省份"/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="客户名称:" prop="客户名称">
<el-input v-model="form2.客户名称" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="联系人:" prop="联系人">
<el-input v-model="form2.联系人" clearable size="small" style="width:200px" placeholder="请输入联系人"/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
@@ -266,42 +248,31 @@
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="传真:" prop="传真">
<el-input v-model="form2.传真" clearable size="small" style="width:200px" placeholder="请输入传真"/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="联系地址:" prop="联系地址">
<el-input v-model="form2.联系地址" clearable size="small" style="width:200px" placeholder="请输入联系地址"/>
<el-input v-model="form2.联系地址" clearable size="small" style="width:200px" placeholder="请输入联系地址" readonly/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="电子邮箱:" prop="电子邮箱">
<el-input v-model="form2.电子邮箱" clearable size="small" style="width:200px" placeholder="请输入电子邮箱"/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="税号:" prop="税号">
<el-input v-model="form2.税号" clearable size="small" style="width:200px" placeholder="请输入税号"/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="银行账号:" prop="银行账号">
<el-input v-model="form2.银行账号" clearable size="small" style="width:200px" placeholder="请输入银行账号" />
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="信用等级:" prop="信用等级">
<el-select v-model="form2.信用等级" placeholder="请选择信誉等级" size="small">
<el-option
@@ -311,16 +282,14 @@
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
</el-col>
<el-col :span="24">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="备注:" prop="备注">
<el-input v-model="form2.备注" clearable size="small" style="width:530px" placeholder="请输入备注"/>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff2()">取消</el-button>
<el-button type="primary" @click="submit2('form2')"> </el-button>
@@ -461,10 +430,18 @@ export default {
function a() {
if (this.CustomerNameValue === '') {
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
// this.loading3 = true
// selectMarketingManager(this.AdressID).then(response => {
// this.loading3 = false
// this.tableData3 = response.data
// })
}
if (this.CustomerNameValue !== '') {
selectCustomerOfName(row.客户流水号, this.pageCurrent, this.pageSize).then(response => {
// this.radio = parseInt(response.data.rows[0].客户名称省份流水号)
// this.AdressID = parseInt(response.data.rows[0].客户名称省份流水号)
this.tableData2 = response.data.rows
// return this.AdressID
})
}
}
@@ -514,12 +491,12 @@ export default {
this.a = row.营销经理地区流水号
},
addCustomer() {
this.addForm('form2')
if (this.AdressID === '' || this.AdressID === null) {
this.$message.warning('请选择一个省份')
} else {
this.dialogFormVisible2 = true
this.title2 = '增加'
this.addForm('form2')
}
selectAdressOfID(this.AdressID).then(response => {
this.form2.省份 = response.data[0].省份

View File

@@ -10,7 +10,7 @@
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">销售经理</span>
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询收款计划</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增收款计划</el-button>
<el-badge :value="value" :max="99" class="item">
@@ -119,6 +119,12 @@
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<!--<el-button-->
<!--size="mini"-->
<!--type="primary"-->
<!--icon="el-icon-tickets"-->
<!--:disabled="scope.row.是否禁用"-->
<!--@click.stop="handleEdit(scope.row, scope.$index)">付款</el-button>-->
<el-button
:disabled="scope.row.是否禁用编辑"
size="mini"
@@ -174,6 +180,11 @@
{{ scope.row.本次收款时间 }}
</template>
</el-table-column>
<!--<el-table-column label="是否开票" align="center">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.是否开票 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="操作" fixed="right" align="center" width="250">
<template slot-scope="scope">
<el-button
@@ -218,7 +229,7 @@
</el-table-column>
<el-table-column align="center" label="提前X天提醒">
<template slot-scope="scope">
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:80px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)" @blur="selectDay"/>
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:80px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)"/>
</template>
</el-table-column>
<el-table-column align="center" label="计划收款时间">
@@ -269,7 +280,7 @@
<el-dialog :visible.sync="dialogFormVisible2" title="新增付款计划" center width="380px">
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
<el-select v-model="form2.entryNameValue" clearable filterable placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" @change="searchProjectName">
<el-select v-model="form2.entryNameValue" placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" clearable filterable @change="searchProjectName">
<el-option
v-for="item in entryName"
:key="item.value"
@@ -293,7 +304,7 @@
<el-dialog :visible.sync="dialogFormVisible4" title="编辑付款计划" center width="400px">
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
<el-select v-model="form2.entryNameValue" :disabled="true" clearable filterable placeholder="请输入项目名称" style="width: 200px" size="small" @change="searchProjectName">
<el-select v-model="form2.entryNameValue" :disabled="true" clearable placeholder="请输入项目名称" style="width: 200px" size="small" filterable @change="searchProjectName">
<el-option
v-for="item in entryName"
:key="item.value"
@@ -407,7 +418,7 @@
<el-input-number v-model="form4.转移金额" :min="0" :max="max1" :precision="2" :step="1" controls-position="right" size="small" style="width: 200px" placeholder="请输入本次付款金额" @change="changeMoney"/>
</el-form-item>
<el-form-item label="计划阶段" prop="计划阶段" label-width="110px">
<el-select v-model="form4.计划阶段" clearable filterable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small">
<el-select v-model="form4.计划阶段" clearable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small" filterable>
<el-option
v-for="item in Planning"
:key="item.value"
@@ -473,7 +484,7 @@
</template>
<script>
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api/MarketingCenter/ContractCapitalManagement'
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
export default {
data() {
const validateValue = (rule, value, callback) => {
@@ -582,10 +593,10 @@ export default {
},
rules2: { // 表单验证规则
本次付款: [
{ required: true, message: '请输入本次付款金额', trigger: 'blur' },
{ required: true, message: '请输入本次付款金额' },
{ required: true, trigger: 'blur', validator: validateValue }],
付款时间: [{ required: true, message: '请输入付款时间', trigger: 'change' }],
付款阶段id: [{ required: true, message: '请输入付款阶段', trigger: 'change' }]
付款时间: [{ required: true, message: '请输入付款时间' }]
// 付款阶段id: [{ required: true, message: '请输入付款阶段', trigger: 'change' }]
},
rules3: { // 表单验证规则
转移金额: [
@@ -725,6 +736,7 @@ export default {
})
},
handleEdit2(row) {
this.editForm(row, 'form3')
this.title = '修改阶段收款'
this.max1 = parseFloat(this.max2) + parseFloat(row.本次收款金额)
this.dialogFormVisible3 = true
@@ -965,9 +977,9 @@ export default {
if (valid) {
if (this.temp === 1) {
this.addTableData1()
this.form2.ContractNumberValue = ''
this.form2.EntryName = ''
this.form2.TotalContractAmount = ''
// this.form2.ContractNumberValue = ''
// this.form2.EntryName = ''
// this.form2.TotalContractAmount = ''
this.temp = null
} else if (this.temp === 2) {
this.chaEdit()
@@ -1022,8 +1034,8 @@ export default {
})
},
ADD() {
this.dialogFormVisible2 = true
this.addForm('form2')
this.dialogFormVisible2 = true
this.temp = 1
},
addTableData1() {
@@ -1083,7 +1095,9 @@ export default {
this.id = row.批次资金id
this.id1 = row.资金id
},
submitEdit() {
submitEdit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.flag === 1) {
fukuan(this.id, this.form3.本次付款, this.form3.付款时间).then(response => {
this.dialogFormVisible3 = false
@@ -1199,8 +1213,11 @@ export default {
}
})
}
}
})
},
EditTableData(row) {
this.editForm(row, 'form2')
this.dialogFormVisible4 = true
this.form2.entryNameValue = parseInt(row.项目流水号)
this.form2.ContractNumberValue = row.合同编号
@@ -1210,7 +1227,9 @@ export default {
clear() {
this.peopleid = ''
},
editTableData() {
editTableData(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
editList(this.form2.entryNameValue, this.form2.TotalContractAmount, this.zijinID).then(response => {
if (response.data[0].result === '1') {
this.$message.success('更新信息成功')
@@ -1245,6 +1264,8 @@ export default {
this.$message.error('更新信息失败')
}
})
}
})
// this.editTable(editTableData, [this.zijinID, this.form2.TotalContractAmount], 'form2', function() { this.getTableData(); this.dialogFormVisible4 = false })
},
TransferPlan(row) {

View File

@@ -287,6 +287,47 @@
<el-button type="primary" @click="submit('form')"> </el-button>
</div>
</el-dialog>
<!--<el-dialog title="人员信息" :visible.sync="dialogFormVisiblePeople" center width="750px">-->
<!--<div style="height: 500px">-->
<!--<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">-->
<!--<el-tree-->
<!--:data="dataPeople"-->
<!--node-key="id"-->
<!--style="width: 150px;float: left"-->
<!--height="400"-->
<!--accordion-->
<!--@node-click="handleNodeClick"-->
<!--&gt;-->
<!--</el-tree>-->
<!--</div>-->
<!--<el-table :data="ListPeople" highlight-current-row height="400" @row-click="handleChange" style="width: 400px;float: left;margin-left: 30px">-->
<!--<el-table-column label="考勤编号" align="center" >-->
<!--<template slot-scope="scope">-->
<!--{{scope.row.考勤编号}}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="姓名" align="center" >-->
<!--<template slot-scope="scope">-->
<!--{{scope.row.姓名}}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="性别" align="center">-->
<!--<template slot-scope="scope">-->
<!--{{scope.row.性别}}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="工作岗位" align="center">-->
<!--<template slot-scope="scope">-->
<!--{{scope.row.岗位名称}}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table>-->
<!--</div>-->
<!--<el-button style="margin-left: 260px" @click="offName">取消</el-button>-->
<!--<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>-->
<!--</el-dialog>-->
<!--新增机床对话框-->
<el-dialog :title="title1" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="25%">
<el-form ref="form1" :model="form1" :rules="rules1" label-width="140px">
@@ -731,6 +772,7 @@ export default {
this.addForm('form1')
},
editMachine(row) {
this.editForm(row, 'form1')
this.dialogFormVisible2 = true
this.title1 = '编辑'
this.c = row.机床流水号

View File

@@ -460,9 +460,6 @@ export default {
this.init()
},
methods: {
change(data) {
return data + 1
},
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName1')
@@ -521,6 +518,7 @@ export default {
this.addForm('form')
},
editSafetyMargin(row) {
this.editForm(row, 'form')
this.title = '编辑'
this.dialogFormVisible1 = true
this.form.项目名称 = parseInt(row.项目流水号)
@@ -600,7 +598,7 @@ export default {
this.dialogFormVisible2 = true
this.code = row.安全保证金流水号
this.projectName = row.项目名称
this.maxMoney = row.保证金金额
this.maxMoney = parseFloat(row.保证金金额)
this.SurplusAmount = row.应收回金额
this.addForm('form2')
},
@@ -618,6 +616,7 @@ export default {
})
},
editWithdrawing(row) {
this.editForm(row, 'form3')
this.dialogFormVisible3 = true
this.maxMoney1 = parseFloat(this.SurplusAmount) + parseFloat(row.扣款金额)
this.form3.扣款金额 = row.扣款金额
@@ -625,7 +624,6 @@ export default {
this.form3.扣款原因 = row.扣款原因
this.form3.扣款日期 = row.扣款日期
this.WithdrawingCode = row.扣款流水号
console.log(row.扣款流水号)
},
edtTableData2() {
edtWithdrawing(this.WithdrawingCode, this.form3.扣款金额, this.form3.被扣款人, this.form3.扣款原因, this.form3.扣款日期).then(response => {

View File

@@ -0,0 +1,221 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>采购情况:</span>
<el-select v-model="purchaseStateValue" placeholder="采购情况" size="small" style="width: 100px">
<el-option
v-for="item in purchaseState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe>
<el-table-column align="center" label="采购情况" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="物料名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号" min-width="150px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格" min-width="150px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" min-width="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划到货时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="100px" prop="buyer">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, initBuyer, searchTable1 } from '@/api/PurchasingCenter/ContractStateSearch'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购任务分配
data() {
return {
projectValue: '',
project: [],
materialName: '',
personValue: '',
person: [],
purchaseStateValue: 0,
purchaseState: [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '未分配'
},
{
value: 2,
label: '未询价'
},
{
value: 3,
label: '已询价'
},
{
value: 4,
label: '已采购'
}
],
check1: 0,
check2: 0,
check3: 0,
tableData1: [],
pageCurrent1: 1,
pageSize1: 20,
total1: 0
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() {
this.fetchData()
},
methods: {
fetchData() { // 初始化
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.project.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
text: response.data[i].姓名,
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() { // 查询
this.projectValue ? this.check1 = 1 : this.check1 = 0
this.materialName ? this.check2 = 1 : this.check2 = 0
this.personValue ? this.check3 = 1 : this.check3 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.materialName, this.check3, this.personValue, this.purchaseStateValue).then(response => {
console.log(response.data)
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
filterHandler(value, row) {
console.log(row, value)
return parseInt(row['人员编号']) === parseInt(value)
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -0,0 +1,595 @@
<template>
<div class="app-container">
<el-card>
<el-form ref="form1" :model="form1" label-position="right" label-width="110px" class="searchForm">
<el-row>
<el-col :span="6">
<el-form-item label="合同号">
<el-select v-model="contractNumValue" placeholder="合同号" filterable clearable size="small" @change="stipulateArrivalTime='';searchTable1()">
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.supplierName }}</div>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同名称">
<el-input v-model="contractName" size="small"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规定到货时间">
<el-date-picker
v-model="stipulateArrivalTime"
:picker-options="endDateOpt"
:disabled="Boolean(!contractNumValue)"
size="small"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期"
@change="searchDemo();calcDay()"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="付款方式">
<el-select v-model="payMethodValue" placeholder="付款方式" size="small" @change="searchDemo();payMethodChange()">
<el-option
v-for="item in payMethod"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="第1次付款时间">
<el-select v-model="payTime1Value" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="第2次付款时间">
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="第3次付款时间">
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="第4次付款时间">
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="第5次付款时间">
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运费">
<el-input v-model="freight" size="small"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="税率">
<el-input v-model="taxRate" size="small"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="币种">
<el-select v-model="currencyValue" placeholder="币种" size="small" clearable>
<el-option
v-for="item in currency"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="参考价格" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.最低单价" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="发货天数" align="center" width="100">
<template slot-scope="scope">
<el-input v-model="deliveryDay[scope.$index]" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="物料计划到货时间" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="订货数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.订货数量 }}
</template>
</el-table-column>
<el-table-column label="金额" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.金额 }}
</template>
</el-table-column>
</el-table>
<el-button
type="primary"
size="small"
icon=""
style="margin-top:10px"
@click="calculateContractSum">计算合同总额</el-button>
<span>合同总额:</span>
<el-input v-model="contractSum" size="small"/>
</el-card>
<el-card>
<el-table
:data="tableData2"
:show-header="false"
highlight-current-row
border
height="280px"
style="width: 250px;display:inline-block;max-height: 280px;"
size="mini"
@row-click="searchDemo">
<el-table-column align="center" label="合同模板名称">
<template slot-scope="scope">
{{ scope.row.合同模板名称 }}
</template>
</el-table-column>
</el-table>
<el-input :rows="20" v-model="textArea" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
<!--将新一般处理页添加至通讯服务器-->
<el-upload
ref="upload"
:before-upload="beforeUpload"
:file-list="fileList"
:auto-upload="false"
style="display: inline-block;width:250px"
class="upload-demo"
action="http://localhost:8022/submit/uploadFile0.ashx"
list-type="picture">
<el-button slot="trigger" size="small" type="primary" style="margin:10px 10px 0 10px">添加图纸附件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">生成采购合同</el-button>
</el-upload>
</el-card>
<!--<el-button style="margin-left: 10px;" size="small" type="success" @click="test">test</el-button>-->
</div>
</template>
<script>
import { searchInquirySheet, searchSheetContract, initPayMethod, initPayTimeNode, searchContractDemo, doneContract, insertFile } from '@/api/PurchasingCenter/CreateContract'
import { mapGetters } from 'vuex'
export default {
inject: ['reload'],
data() {
return {
fileName: '',
hasFile: 0,
searchView: '',
fileList: [],
minDate: null,
endDateOpt: { // 为了让规定到货时间早于物料计划到货时间
disabledDate: (time) => {
if (this.minDate) {
return time.getTime() > this.minDate
}
}
},
form1: {},
contractNumValue: '', // 合同流水号
contractNum: [],
contractNameNum: '', // 合同编号/询价单号
contractName: '产品购销合同', // 合同名称
supplierName: '', // 供应商名称
stipulateArrivalTime: '', // 规定到货时间
payMethodValue: '', // 付款方式流水号
payMethodName: '', // 付款方式名称
payMethod: [],
payTime: [],
payTime1Value: '', // 付款时间
payTime2Value: '', // 付款时间
payTime3Value: '', // 付款时间
payTime4Value: '', // 付款时间
payTime5Value: '', // 付款时间
payTime6Value: '', // 付款时间
freight: '', // 运费
taxRate: '', // 税率
currencyValue: '', // 币种
currency: [
{
label: '人民币',
value: 1
}, {
label: '美元',
value: 2
}, {
label: '英镑',
value: 3
}, {
label: '欧元',
value: 4
}
], // 币种
calculateWayValue: [], // 计算方式(不要了)
calculateWay: [
{
label: '个数',
value: 1
}, {
label: '重量',
value: 2
}
],
weight: [], // 重量(不要了)
disable2: true,
disable3: true,
disable4: true,
disable5: true,
disable6: true,
tableData1: [], // 物料表
contractSum: '', // 合同总额
deliveryDay: [], // 发货天数
tableData2: [], // 合同模板表
textArea: '',
paramRow: '', // 参数row
materialGroup: '', // 物料流水号组
numberGroup: '', // 数量组
priceGroup: '', // 单价组
dayGroup: '', // 发货天数组
payGroup: '', // 付款方式组
planGroup: '', // 计划付款时间组
taxGroup: '', // 税率组
currencyGroup: '', // 币种组
groupPartGroup: '', // 组件零件流水号组
calculateWayGroup: '', // 计算方式组(不要了)
weightGroup: '', // 重量组(不要了)
supplierValue: '',
groupNum1: [] // 防止渲染不出来的中间变量
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() {
this.fetchData()
},
methods: {
test() {
this.$refs.upload.submit() // 图片传本地
},
beforeUpload(file) { // 传成功前
this.fileName = file.name
},
submitUpload() { // 生成采购合同+传图片附件
for (let i = 0; i < this.contractNum.length; i++) { // 在生成合同处也有
if (this.contractNum[i].value === this.contractNumValue) {
this.contractNameNum = this.contractNum[i].label // 获取询价单号
this.supplierValue = this.contractNum[i].supplierValue // 获取供应商流水号
}
}
this.$refs.upload.submit() // 图片传本地
if (this.fileName !== '') { // 有附件,先向数据库中插入一条记录(记录合同编号及文件名)
insertFile(this.fileName, this.contractNameNum).then(response => {
if (response.data[0].result === '1') {
this.doneContract()
} else {
this.$message.error('附件名插入数据库失败')
}
})
} else { // 无附件,直接执行生成合同
this.doneContract()
}
this.contractNameNum = ''
this.fileName = ''
},
fetchData() {
searchInquirySheet(0, 0, 0, 0, 1, this.id).then(response => { // 初始化询价单号
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
value: response.data[i].询价单流水号,
label: response.data[i].询价单编号,
supplierName: response.data[i].供应商名称,
supplierValue: response.data[i].供应商流水号
})
}
})
searchContractDemo().then(response => { // 初始化合同模板
this.tableData2 = response.data
})
initPayMethod().then(response => { // 初始化付款方式
for (let i = 0; i < response.data.length; i++) {
this.payMethod.push({
label: response.data[i].付款方式内容,
value: response.data[i].付款方式流水号
})
}
})
initPayTimeNode().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.payTime.push({
label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号
})
}
})
},
payMethodChange() { // 付款方式改变
for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label
}
}
const payTimeNum = this.payMethodName.split(':')
switch (payTimeNum.length) {
case 1:
this.disable2 = true
this.disable3 = true
this.disable4 = true
this.disable5 = true
this.disable6 = true
break
case 2:
this.disable2 = false
this.disable3 = true
this.disable4 = true
this.disable5 = true
this.disable6 = true
break
case 3:
this.disable2 = false
this.disable3 = false
this.disable4 = true
this.disable5 = true
this.disable6 = true
break
case 4:
this.disable2 = false
this.disable3 = false
this.disable4 = false
this.disable5 = true
this.disable6 = true
break
case 5:
this.disable2 = false
this.disable3 = false
this.disable4 = false
this.disable5 = false
this.disable6 = true
break
case 6:
this.disable2 = false
this.disable3 = false
this.disable4 = false
this.disable5 = false
this.disable6 = false
break
}
},
searchTable1() {
const numGroup = [] // 空数组,放物料的计划到货时间
searchSheetContract(this.contractNumValue).then(response => {
this.tableData1 = response.data
this.calcDay() // 先给表置0
for (let i = 0; i < response.data.length; i++) {
this.tableData1[i].金额 = parseFloat(this.tableData1[i].最低单价) * parseFloat(this.tableData1[i].订货数量)
numGroup.push(Date.parse(this.tableData1[i].物料计划到货时间))
}
this.minDate = new Date(Math.min(...numGroup))
}).then(() => {
this.groupNum1 = this.tableData1 // 给中间变量需要时重新push
})
this.calcDay() // 先给表置0
},
searchDemo(row = this.paramRow) {
for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label
}
}
this.paramRow = row
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
})
},
calcDay() { // 计算发货天数
this.deliveryDay = []
for (let i = 0; i < this.tableData1.length; i++) {
this.stipulateArrivalTime
? (this.deliveryDay[i] = parseInt((Date.parse(this.stipulateArrivalTime) - new Date()) / (1000 * 60 * 60 * 24)))
: (this.deliveryDay[i] = 0)
}
},
calculateContractSum() {
this.contractSum = 0
this.tableData1 = []
for (let i = 0; i < this.groupNum1.length; i++) {
this.groupNum1[i].金额 = parseFloat(this.groupNum1[i].最低单价) * parseFloat(this.groupNum1[i].订货数量)
this.contractSum += parseFloat(this.groupNum1[i].金额)
this.tableData1.push(this.groupNum1[i])
}
},
doneContract() { // 生成采购合同
for (let i = 0; i < this.contractNum.length; i++) {
if (this.contractNum[i].value === this.contractNumValue) {
this.contractNameNum = this.contractNum[i].label // 获取询价单号
this.supplierValue = this.contractNum[i].supplierValue // 获取供应商流水号
}
}
if (this.contractNum === '' || this.contractNum === null) {
this.$message.error('请选择生成合同的询价单')
} else if (this.stipulateArrivalTime === '' || this.stipulateArrivalTime === null) {
this.$message.error('请选择规定到货时间!')
} else {
for (let i = 0; i < this.deliveryDay.length; i++) {
if (parseInt(this.deliveryDay[i]) < 0) {
this.$message.error('规定到货日期不可小于当前日期')
return
}
}
this.materialGroup = ''
this.numberGroup = ''
this.priceGroup = ''
this.dayGroup = ''
this.payGroup = ''
this.planGroup = ''
this.taxGroup = ''
this.currencyGroup = ''
this.groupPartGroup = ''
for (let i = 0; i < this.tableData1.length; i++) {
this.materialGroup += this.tableData1[i].物料流水号 + ','
this.numberGroup += this.tableData1[i].订货数量 + ','
this.priceGroup += this.tableData1[i].最低单价 + ','
this.dayGroup += this.deliveryDay[i] + ','
this.taxGroup += this.taxRate + ','
this.currencyGroup += this.currencyValue + ','
this.groupPartGroup += this.tableData1[i].组件零件流水号 + ',' // fucking
}
for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label
}
}
const payTimeNum = this.payMethodName.split(':')
if (payTimeNum.length > 1) {
for (let i = 0; i < payTimeNum.length; i++) {
switch (i) {
case 0:
this.planGroup += this.payTime1Value + ','
break
case 1:
this.planGroup += this.payTime2Value + ','
break
case 2:
this.planGroup += this.payTime3Value + ','
break
case 3:
this.planGroup += this.payTime4Value + ','
break
case 4:
this.planGroup += this.payTime5Value + ','
break
case 5:
this.planGroup += this.payTime6Value + ','
break
}
this.payGroup += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划
}
} else {
this.payGroup = '10,' // 付款比例 付款方式 付款计划
this.planGroup = this.payTime1Value + ',' // 付款时间
}
this.materialGroup = this.materialGroup.substr(0, this.materialGroup.length - 1)
this.numberGroup = this.numberGroup.substr(0, this.numberGroup.length - 1)
this.priceGroup = this.priceGroup.substr(0, this.priceGroup.length - 1)
this.dayGroup = this.dayGroup.substr(0, this.dayGroup.length - 1)
this.payGroup = this.payGroup.substr(0, this.payGroup.length - 1)
this.planGroup = this.planGroup.substr(0, this.planGroup.length - 1)
this.taxGroup = this.taxGroup.substr(0, this.taxGroup.length - 1)
this.currencyGroup = this.currencyGroup.substr(0, this.currencyGroup.length - 1)
this.groupPartGroup = this.groupPartGroup.substr(0, this.groupPartGroup.length - 1)
doneContract(this.contractNameNum, this.contractName, this.stipulateArrivalTime, this.stipulateArrivalTime, this.payMethodName, this.supplierValue, this.textArea, this.freight, this.materialGroup, this.numberGroup, this.priceGroup, this.dayGroup, this.payGroup, this.planGroup, this.taxGroup, this.currencyGroup, this.calculateWayGroup, this.weightGroup, this.id, this.groupPartGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('生成合同成功')
this.reload()
} else { this.$message.error('生成合同失败') }
})
}
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:200px
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
</style>

View File

@@ -0,0 +1,835 @@
<template>
<div class="app-container">
<el-card>
<span>询价状态:</span>
<el-select v-model="inquiryStateValue" placeholder="询价状态" size="small" clearable>
<el-option
v-for="item in inquiryState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading=""
:data="tableData1"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 300px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column label="操作" align="center" width="100" fixed="left">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="materialChange(scope.row)">物料变更</el-button>
</template>
</el-table-column>
<el-table-column label="物料状态" align="center" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="supplier">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="计划到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="库存量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.库存量 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card>
<span>询价单号:</span>
<el-input v-model="inquirySheetNum" placeholder="询价单号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="createInquirySheet">创建单据</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-circle-plus-outline"
style="margin-left: 10px"
@click="addInquirySheet">追加物料</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData2" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="询价单编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.询价单编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="电话号码" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.电话号码 }}
</template>
</el-table-column>
<el-table-column label="传真" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column label="电子信箱" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.电子信箱 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="editInquirySheet(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteInquirySheet(scope.row)">删除</el-button>
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportInquirySheet(scope.row)">导出</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini">
<el-table-column label="物料名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.询价单编号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="outInquirySheet(scope.row)">移出</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
<el-col :span="12">
<el-form-item label="供应商名称">
<el-input v-model="supplierName" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业性质">
<el-input v-model="enterpriseNature" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="货期">
<el-input v-model="goodTime" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注册资本">
<el-input v-model="registeredCapital" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="税号">
<el-input v-model="taxNum" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电子邮箱">
<el-input v-model="EMail" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="地址">
<el-input v-model="address" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="账号">
<el-input v-model="account" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开户行">
<el-input v-model="openingBank" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话号码">
<el-input v-model="phone" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="传真">
<el-input v-model="fax" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-button
type="success"
size="small"
icon="el-icon-search"
@click="searchSupplier">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-check"
@click="submitSelectSupplier">确定</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
@click="emptySupplierDetail">清空</el-button>
</el-col>
</el-row>
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
<el-table-column align="center" label="供应商名称" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="企业性质" min-width="100">
<template slot-scope="scope">
{{ scope.row.企业性质 }}
</template>
</el-table-column>
<el-table-column align="center" label="创立日期" min-width="100">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="注册资本" min-width="100">
<template slot-scope="scope">
{{ scope.row.注册资本 }}
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="400px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px">
<el-form-item label="询价单号" prop="inquirySheetNum">
<el-input v-model="form2.inquirySheetNum" size="small"/>
</el-form-item>
<el-form-item label="供应商" prop="supplierName">
<el-input v-model="form2.supplierName" size="small" readonly>
<el-button slot="append" icon="el-icon-search" @click="dialogVisible1=true"/>
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建询价单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitCreateInquirySheet">确定</el-button>
<el-button
v-show="title2==='编辑询价单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitEditInquirySheet">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
<span>物料名称:</span>
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
<el-table :data="tableData02" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="400px" border highlight-current-row @row-click="selectNewMaterial">
<el-table-column align="center" label="物料名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent02"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize02"
:total="total02"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange02"
@current-change="handleCurrentChange02"/>
</div>
<span style="font-size: large;color: red">将原物料替换为: {{ materialNew }}</span>
<!--<el-input v-model="materialNew" size="small" readonly style="margin: 10px 10px 0 10px"></el-input>-->
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" icon="el-icon-check" @click="submitMaterialChange">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchMaterial, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet, outInquirySheet, searchAllMaterial, materialChange } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex'
export default {
name: '', // 创建询价单
data() {
return {
check1: 0, // 询价状态
check2: 0, // 物料名称
check3: 0, // 供应商
check4: 0, // 询价单号
inquiryStateValue: '', // 询价状态
inquiryState: [{
label: '未询价',
value: 1
}, {
label: '已询价',
value: 3
}],
materialName: '',
tableData1: [], // 采购任务单明细
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
supplierFilters: [{ text: '', value: '' }],
tableData2: [], // 询价单列表
total2: 0,
pageCurrent2: 1,
pageSize2: 10,
tableData3: [], // 询价单明细
dialogVisible1: false,
inquirySheetNum: '', // 询价单号
inquirySheetFlowNum: '', // 询价单流水号
form1: {},
supplierCheck1: 0,
supplierCheck2: 0,
supplierCheck3: 0,
supplierCheck4: 0,
supplierCheck5: 0,
supplierCheck6: 0,
supplierCheck7: 0,
supplierCheck8: 0,
supplierCheck9: 0,
supplierCheck10: 0,
supplierCheck11: 0,
supplierCheck12: 0,
supplierValue: '', // 供应商流水号
supplierName: '', // 供应商名称
goodTime: '', // 货期
enterpriseNature: '', // 企业性质
createDate: '', // 创立日期
registeredCapital: '', // 注册资本
taxNum: '', // 税号
EMail: '', // 电子邮箱
address: '', // 地址
account: '', // 账号
openingBank: '', // 开户行
phone: '', // 电话号码
fax: '', // 传真
tableData01: [],
dialogVisible2: false,
form2: {
inquirySheetNumValue: '', // 询价单流水号
inquirySheetNum: '',
supplierName: '',
supplierValue: ''
},
rules2: { // 表单验证规则
inquirySheetNum: [{ required: true, message: '请填写询价单号' }],
supplierName: [{ required: true, message: '请选择供应商' }]
},
groupPartNum: [], // 组件零件流水号
allNum: [], // 总数量
dialogVisible3: false,
materialName0: '',
tableData02: [],
total02: 0,
pageCurrent02: 1,
pageSize02: 10,
materialNew: '', // 替换为新物料全称
materialOldValue: '',
materialNewValue: '',
groupPartNumValue: '', // 组件零件流水号
standardAndPurchaseValue: '', // 标准件和外购件流水号
title2: ''
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
},
selectable(row, index) { // 控制某行是否可选
return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) === 1 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改
},
filterHandler(value, row) { // 筛选供货商
return row['供货商'] === value
},
searchTable1() { // 查询物料列表
this.inquiryStateValue !== '' && this.inquiryStateValue !== null ? this.check1 = 1 : this.check1 = 0
this.materialName ? this.check2 = 1 : this.check2 = 0
searchMaterial(this.pageCurrent1, this.pageSize1, this.check1, this.inquiryStateValue, this.check2, this.materialName, this.id).then(response => {
this.tableData1 = response.data.rows
console.log(response.data.rows)
this.total1 = response.data.total
})
},
handleSizeChange1(val) { // 物料列表分页
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) { // 物料列表分页
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2() { // 查询询价单列表
this.supplierName ? this.check3 = 1 : this.check3 = 0
this.inquirySheetNum ? this.check4 = 1 : this.check4 = 0
searchCreateInquirySheet(this.pageCurrent2, this.pageSize2, this.check3, this.supplierName, this.check4, this.inquirySheetNum, this.id).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) { // 询价单列表分页
this.pageSize2 = val
this.searchTable2()
},
handleCurrentChange2(val) { // 询价单列表分页
this.pageCurrent2 = val
this.searchTable2()
},
createInquirySheet() { // 创建空单据--询价单
this.title2 = '创建询价单'
this.form2.inquirySheetNum = ''
this.form2.supplierValue = ''
this.form2.supplierName = ''
this.dialogVisible2 = true
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
},
submitCreateInquirySheet() { // 提交创建询价单
this.$refs['form2'].validate((valid) => {
if (valid) {
const numGroup1 = [] // 空数组,放现有的询价单号
searchCreateInquirySheet2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].询价单编号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1) {
this.$message.error('该询价单号已存在')
} else {
createInquirySheet(this.form2.inquirySheetNum, this.form2.supplierValue, '', this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('创建成功')
this.inquirySheetNum = ''
this.supplierName = ''
this.supplierValue = ''
this.dialogVisible2 = false
this.searchTable2()
} else { this.$message.error('操作失败') }
})
}
})
} else {
console.log('表单验证未通过')
return false
}
})
},
deleteInquirySheet(row) { // 删除询价单
this.$confirm('确定删除该询价单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInquirySheet(row.询价单流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.inquirySheetNum = ''
this.supplierName = ''
this.supplierValue = ''
this.searchTable1()
this.searchTable2()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
editInquirySheet(row) { // 编辑询价单
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '编辑询价单'
this.form2.inquirySheetNumValue = row.询价单流水号
this.form2.inquirySheetNum = row.询价单编号
this.form2.supplierValue = row.供应商流水号
this.form2.supplierName = row.供应商名称
this.dialogVisible2 = true
},
submitEditInquirySheet() { // 提交编辑询价单
this.$refs['form2'].validate((valid) => {
if (valid) {
const numGroup1 = [] // 空数组,放现有的询价单号
const numGroup2 = [] // 空数组,放现有的询价单流水号
searchCreateInquirySheet2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].询价单编号)
numGroup2.push(response.data[i].询价单流水号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1 && numGroup1.indexOf(this.form2.inquirySheetNum) !== numGroup2.indexOf(parseInt(this.form2.inquirySheetNumValue))) {
this.$message.error('该询价单号已存在')
} else {
editInquirySheet(this.form2.inquirySheetNumValue, this.form2.inquirySheetNum, this.form2.supplierValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.inquirySheetNum = ''
this.supplierName = ''
this.supplierValue = ''
this.dialogVisible2 = false
this.searchTable2()
} else { this.$message.error('修改失败') }
})
}
})
} else {
console.log('表单验证未通过')
return false
}
})
},
exportInquirySheet(row) { // 导出询价单
alert('do not done')
},
handleSelectionChange(val) { // 表1多选
console.log(val)
this.groupPartNum = []
this.allNum = []
for (let i = 0; i < val.length; i++) {
this.groupPartNum[i] = val[i].组件零件流水号
this.allNum[i] = val[i].零件数量
}
},
addInquirySheet() { // 追加物料
const numGroup2 = [] // 空数组,放该询价单中已有的物料
if (this.inquirySheetNum === '' || this.inquirySheetNum === null) {
this.$message.error('请选择一个询价单')
} else {
searchSheetDetail(this.inquirySheetFlowNum).then(response => {
for (let i = 0; i < response.data.length; i++) {
numGroup2.push(response.data[i].组件零件流水号)
}
}).then(() => {
let x = true // 为了只执行一次的中间变量
for (let i = 0; i < this.groupPartNum.length; i++) {
if (numGroup2.indexOf(parseInt(this.groupPartNum[i])) !== -1) {
if (x) {
this.$notify({
title: '注意',
message: '无法向该询价单中追加重复物料,已自动跳过',
type: 'warning'
})
x = false
}
} else {
addInquirySheet(this.inquirySheetFlowNum, this.groupPartNum[i], this.allNum[i], 0, '').then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
searchSheetDetail(this.inquirySheetFlowNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('操作失败') }
})
}
}
})
}
},
outInquirySheet(row) {
outInquirySheet(row.询价单流水号, row.组件零件流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
searchSheetDetail(this.inquirySheetFlowNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('操作失败') }
})
},
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
this.registeredCapital ? this.supplierCheck4 = 1 : (this.supplierCheck4 = 0, this.registeredCapital = '')
this.taxNum ? this.supplierCheck5 = 1 : (this.supplierCheck5 = 0, this.taxNum = '')
this.EMail ? this.supplierCheck6 = 1 : (this.supplierCheck6 = 0, this.EMail = '')
this.address ? this.supplierCheck7 = 1 : (this.supplierCheck7 = 0, this.address = '')
this.account ? this.supplierCheck8 = 1 : (this.supplierCheck8 = 0, this.account = '')
this.openingBank ? this.supplierCheck9 = 1 : (this.supplierCheck9 = 0, this.openingBank = '')
this.phone ? this.supplierCheck10 = 1 : (this.supplierCheck10 = 0, this.phone = '')
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
this.tableData01 = response.data
})
},
showSupplierDetail(row) {
this.form2.supplierValue = row.供应商流水号
this.form2.supplierName = row.供应商名称
this.supplierValue = row.供应商流水号
this.supplierName = row.供应商名称
this.enterpriseNature = row.企业性质
this.createDate = row.创立日期
this.registeredCapital = row.注册资本
this.taxNum = row.税号
this.EMail = row.电子信箱
this.address = row.地址
this.account = row.帐号
this.openingBank = row.开户行
this.phone = row.电话号码
this.fax = row.传真
this.goodTime = row.货期
},
emptySupplierDetail() {
this.supplierValue = ''
this.supplierName = ''
this.enterpriseNature = ''
this.createDate = ''
this.registeredCapital = ''
this.taxNum = ''
this.EMail = ''
this.address = ''
this.account = ''
this.openingBank = ''
this.phone = ''
this.fax = ''
this.goodTime = ''
},
submitSelectSupplier() { // 确定选择供应商
this.dialogVisible1 = false
},
searchTable3(row) { // 查询该询价单中的物料
this.tableData3 = []
this.inquirySheetNum = row.询价单编号
this.inquirySheetFlowNum = row.询价单流水号
this.supplierValue = row.供应商流水号
this.supplierName = row.供应商名称
searchSheetDetail(row.询价单流水号).then(response => {
this.tableData3 = response.data
})
},
materialChange(row) { // 物料变更
this.dialogVisible3 = true
console.log(row)
this.groupPartNumValue = row.组件零件流水号
this.standardAndPurchaseValue = row.标准件和外购件流水号
this.materialOldValue = row.物料流水号
},
searchMaterial() {
searchAllMaterial(this.materialName0, this.pageCurrent02, this.pageSize02).then(response => {
this.tableData02 = response.data.result
this.total02 = parseInt(response.data.output[0].ItemCount)
})
},
handleSizeChange02(val) {
this.pageSize02 = val
this.searchMaterial()
},
handleCurrentChange02(val) {
this.pageCurrent02 = val
this.searchMaterial()
},
selectNewMaterial(row) {
this.materialNew = ''
this.materialNewValue = row.物料流水号
this.materialNew += row.物料名称 + ' ' + row.物料规格 + ' ' + row.物料型号
},
submitMaterialChange() {
materialChange(this.groupPartNumValue, this.standardAndPurchaseValue, this.materialOldValue, this.materialNewValue, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('提交变更申请成功')
this.dialogVisible3 = false
this.searchTable1()
} else { this.$message.error('操作失败') }
})
console.log(this.groupPartNumValue, this.standardAndPurchaseValue, this.materialOldValue, this.materialNewValue)
},
tableRowClassName({ row, rowIndex }) {
if (parseInt(row.是否确认) === 0) {
return 'MistyRose'
}
return ''
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>
<style>
.el-table .green {
background: lightgreen;
}
.el-table .white {
background: whitesmoke;
}
.el-table .red {
background: Tomato!important;
}
.el-table .MistyRose {
background: MistyRose!important;
}
.el-table .gray {
background: lightgray;
}
</style>

View File

@@ -0,0 +1,304 @@
<template>
<div class="app-container">
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="采购合同编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
</el-table-column>
<el-table-column label="欠款金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.欠款金额 }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="150" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="离线合同编号">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApprovalOffline(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApprovalOffline(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
</div>
</template>
<script>
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { mapGetters } from 'vuex'
export default {
name: '', // 财务审核
data() {
return {
tableData1: [],
pageSize1: 10,
pageCurrent1: 1,
total1: 0,
tableData2: [],
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.searchTable1()
this.searchTable2()
},
searchTable1() {
initApproval(this.pageCurrent1, this.pageSize1, 1).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2() {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 1).then(response => {
console.log(response.data.rows)
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
this.gridData = response.data
})
},
yesApproval(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购科请款流水号, 1, '通过', this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApproval(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购科请款流水号, 2, value, this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
yesApprovalOffline(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApprovalOffline(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -0,0 +1,303 @@
<template>
<div class="app-container">
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="采购合同编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
</el-table-column>
<el-table-column label="欠款金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.欠款金额 }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审批" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="150" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="离线合同编号">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApprovalOffline(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApprovalOffline(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
</div>
</template>
<script>
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { mapGetters } from 'vuex'
export default {
name: '', // 管理审批
data() {
return {
tableData1: [],
pageSize1: 10,
pageCurrent1: 1,
total1: 0,
tableData2: [],
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.searchTable1()
this.searchTable2()
},
searchTable1() {
initApproval(this.pageCurrent1, this.pageSize1, 2).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2() {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response => {
console.log(response.data.rows)
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
this.gridData = response.data
})
},
yesApproval(row) { // 通过审批
this.$confirm('确定审批通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购科请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApproval(row) { // 不通过审批
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购科请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
yesApprovalOffline(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApprovalOffline(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -0,0 +1,304 @@
<template>
<div class="app-container">
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="采购合同编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
</el-table-column>
<el-table-column label="欠款金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.欠款金额 }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="付款" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="150" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="离线合同编号">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApprovalOffline(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApprovalOffline(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
</div>
</template>
<script>
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { mapGetters } from 'vuex'
export default {
name: '', // 出纳付款
data() {
return {
tableData1: [],
pageSize1: 10,
pageCurrent1: 1,
total1: 0,
tableData2: [],
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.searchTable1()
this.searchTable2()
},
searchTable1() {
initApproval(this.pageCurrent1, this.pageSize1, 3).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2() {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 3).then(response => {
console.log(response.data.rows)
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
this.gridData = response.data
})
},
yesApproval(row) { // 通过付款
this.$confirm('确定付款通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购科请款流水号, 1, '通过', this.id, 3).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
// 记录付款金额及时间
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApproval(row) { // 不通过付款
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购科请款流水号, 2, value, this.id, 3).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
yesApprovalOffline(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 3).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApprovalOffline(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 3).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -0,0 +1,224 @@
<template>
<div class="app-container">
<el-card>
<span>采购合同号:</span>
<el-select v-model="contractNum" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNums"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 300px" height="300px" stripe border @row-click="searchTable2">
<el-table-column align="center" label="采购合同编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购合同名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="200px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总金额" min-width="100px">
<template slot-scope="scope">
{{ Number(scope.row.合同总金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="到票总金额" min-width="100px">
<template slot-scope="scope">
{{ Number(scope.row.到票总金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="到票情况" min-width="200px">
<template slot-scope="scope">
<el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))" status="success"/>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<el-table v-loading="" :data="tableData2" size="mini" style="max-height: 200px;margin-top: 10px" height="200px" stripe border>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="传送人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.传送人姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="接收人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.接收人姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购合同号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" min-width="200px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { searchContractInvoice, searchInvoice, initPerson, initContract } from '@/api/PurchasingCenter/InvoiceStateSearch'
import { mapGetters } from 'vuex'
export default {
name: '', // 到票情况查询
data() {
return {
contractNumValue: '',
contractNums: [],
supplierName: '',
invoiceNum: '',
invoiceTime: '',
transmitValue: '',
selectPerson: [], // 传送人接收人
recipientValue: '',
contractNum: '',
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
check1: 0,
check2: 0,
check3: 0,
check4: 0,
check5: 0,
tableData2: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
initPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.selectPerson.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
this.contractNum ? this.check1 = 1 : this.check1 = 0
this.supplierName ? this.check2 = 1 : this.check2 = 0
searchContractInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.contractNum, this.check2, this.supplierName).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2(row) {
searchInvoice(row.采购合同流水号).then(response => {
for (let j = 0; j < response.data.length; j++) {
if (response.data[j].开票时间 !== null) {
response.data[j].开票时间 = response.data[j].开票时间.substring(0, response.data[j].开票时间.indexOf(' '))
}
if (response.data[j].开票时间 === '1900/1/1') {
response.data[j].开票时间 = ''
}
}
this.tableData2 = response.data
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-top: 1px;
margin-bottom: 1px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,357 @@
<template>
<div class="app-container">
<el-card>
<span>请款时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="请款付款情况" align="center">
<el-table-column label="审核情况内容" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.审核情况内容 }}
</template>
</el-table-column>
<el-table-column label="未通过审核原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审核原因 }}
</template>
</el-table-column>
<el-table-column label="审批情况内容" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.审批情况内容 }}
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.付款情况内容 }}
</template>
</el-table-column>
<el-table-column label="未付款原因" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="离线合同编号">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1000px">
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin: 0 10px 10px 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable01()">查询</el-button>
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column label="离线合同编号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="离线合同名称" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.离线合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购员 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" min-width="100" prop="合同总额" fixed="right">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
</el-table>
<span>合计<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/></span>
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
</el-dialog>
</div>
</template>
<script>
import { searchRequestFund, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/OfflineContractRequestFund'
import { mapGetters } from 'vuex'
export default {
name: '', // 离线合同
data() {
return {
check1: 0,
check2: 0,
dateRange: '',
pickerOptions: {
shortcuts: [{
text: '上季度',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
picker.$emit('pick', [start, end])
}
}, {
text: '过去半年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
picker.$emit('pick', [start, end])
}
}, {
text: '过去一年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
picker.$emit('pick', [start, end])
}
}]
},
offlineContract: '',
supplierName0: '',
supplierValue: '',
supplier: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
tableData01: [],
dialogVisible2: false,
SUM: 0,
contractGroup: [],
sumGroup: [],
gridData: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.supplier = []
searchOfflineContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplier.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
},
searchTable1() { // 查询请款表
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1]).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
requestFund() { // 请款
this.dialogVisible2 = true
this.supplierValue = ''
this.fetchData() // 重新获取供应商
this.tableData01 = []
},
searchTable01() { // 查询待请款
if (this.supplierValue) {
this.contractGroup = []
searchOfflineContract(this.supplierValue).then(response => {
this.tableData01 = response.data
})
} else {
this.$message.error('请选择供应商')
}
},
handleSelectionChange(val) {
this.SUM = 0
this.contractGroup = []
this.sumGroup = []
for (let i = 0; i < val.length; i++) {
this.SUM += parseFloat(val[i].合同总额)
this.contractGroup.push(val[i].离线合同流水号)
this.sumGroup.push(val[i].合同总额)
}
},
selectable(row, index) { // 控制某行是否可选
return parseInt(row.已请款) !== 1 // 已经请款
},
submitRequestFund() { // 确认请款
if (this.supplierValue && this.contractGroup.length !== 0) {
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => { // 离线合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person
if (response.data[0].result === '1') {
this.$message.success('请款成功')
this.searchTable1()
this.dialogVisible2 = false
} else { this.$message.error('请款失败') }
})
} else {
this.$message.error('请选择需要请款的合同')
}
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
this.gridData = response.data
})
},
cancelRequestFund(row) { // 取消请款
this.$confirm('确定取消请款?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelRequestFund(row.离线合同请款流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('取消成功')
this.searchTable1()
} else { this.$message.error('取消失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.el-tag{
margin: 0
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
</style>

View File

@@ -0,0 +1,180 @@
<template>
<div class="app-container">
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
<el-table-column label="采购合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="70">
<template slot-scope="scope">
{{ Number(scope.row.总金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="欠款金额" align="center" min-width="70">
<template slot-scope="scope">
{{ Number(scope.row.欠款金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="70">
<template slot-scope="scope">
{{ Number(scope.row.总金额 - scope.row.欠款金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="付款情况" align="center" min-width="150">
<template slot-scope="scope">
<el-progress
:text-inside="true"
:stroke-width="18"
:percentage="parseFloat((100*(scope.row.总金额 - scope.row.欠款金额)/scope.row.总金额).toFixed(2))"
status="success"/>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</div>
</template>
<script>
import { initPayState, searchPayState } from '@/api/PurchasingCenter/PayStateSearch'
import { mapGetters } from 'vuex'
export default {
name: '', // 付款情况查询
data() {
return {
check1: 0,
check2: 0,
contractNumValue: '',
contractNum: [],
supplierName: '',
tableData1: [],
pageSize1: 10,
pageCurrent1: 1,
total1: 0,
dialogVisible1: false
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initPayState().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
},
searchTable1() {
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
this.supplierName ? this.check2 = 1 : this.check2 = 0
searchPayState(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -0,0 +1,145 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" show-summary border style="width: 100%;max-height: 500px;" height="500px" size="mini">
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="小计(元)" align="center" min-width="100" prop="金额">
<template slot-scope="scope">
{{ scope.row.金额 }}
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { initProject, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
import { mapGetters } from 'vuex'
export default {
name: '', // 项目总价查询
data() {
return {
projectValue: '',
project: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.project.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
searchTable1() {
if (this.projectValue) {
searchProjectTotal(this.projectValue).then(response => {
console.log(response.data)
this.tableData1 = response.data
})
} else {
this.$message.error('请选择项目')
}
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
.el-date-editor{
width:300px
}
</style>

View File

@@ -0,0 +1,397 @@
<template>
<div class="app-container">
<el-card>
<span>时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="searchTable3()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading=""
:data="tableData3"
:summary-method="getSummaries"
border
show-summary
style="width: 100%;max-height: 250px;margin-top: 10px"
height="250px"
size="mini">
<el-table-column label="采购合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="付款时间节点" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款时间节点名称 }}
</template>
</el-table-column>
<el-table-column label="预付款时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.预付时间 }}
</template>
</el-table-column>
<el-table-column label="付款比例" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款比例.toFixed(1) }}
</template>
</el-table-column>
<el-table-column label="付款预算(元)" align="center" min-width="100" prop="预付金额">
<template slot-scope="scope">
{{ scope.row.预付金额.toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading=""
:data="tableData1"
border
style="width: 100%;max-height: 250px;"
height="250px"
size="mini"
highlight-current-row
@row-click="searchTable2">
<el-table-column label="采购合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="合同生效日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.审批时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="规定到货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="项目预验收日期" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.项目预验收日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="项目终验收日期" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.项目终验收日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="发货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.发货日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="货到用户现场日期" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.货到用户现场日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="用户现场开通日期" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.用户现场开通日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="日期设置" align="center" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="editDate(scope.row)">设置</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 180px;margin-top: 10px" size="mini">
<el-table-column label="采购合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="付款时间节点" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款时间节点名称 }}
</template>
</el-table-column>
<el-table-column label="付款时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.预付时间 }}
</template>
</el-table-column>
<el-table-column label="付款比例" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款比例.toFixed(1) }}
</template>
</el-table-column>
<el-table-column label="付款预算" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.预付金额.toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="设置日期" center style="min-height: 300px" width="500px">
<el-form ref="form1" :model="form1" label-position="left" label-width="130px">
<el-form-item label="项目预验收日期">
<el-date-picker v-model="form1.项目预验收日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="项目终验收日期">
<el-date-picker v-model="form1.项目终验收日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="发货日期">
<el-date-picker v-model="form1.发货日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="货到用户现场日期">
<el-date-picker v-model="form1.货到用户现场日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="用户现场开通日期">
<el-date-picker v-model="form1.用户现场开通日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
type="primary"
size="small"
icon="el-icon-check"
@click="submitEdit">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initContract, searchPayTimeNode, searchPayTimeNodeMoney, editPayTimeNodeOther, searchPurchaseBudget } from '@/api/PurchasingCenter/PurchaseBudgetSearch'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购预算查询
data() {
return {
check: 0,
check1: 0,
check2: 0,
contractNumValue: '',
contractNum: [],
supplierName: '',
pickerOptions: {
shortcuts: [{
text: '未来一周',
onClick(picker) {
const end = new Date()
const start = new Date()
end.setTime(start.getTime() + 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
}
}, {
text: '未来一个月',
onClick(picker) {
const end = new Date()
const start = new Date()
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
}
}]
},
dateRange: '',
tableData1: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData2: [],
dialogVisible1: false,
form1: {
采购合同流水号: '',
项目预验收日期: '',
项目终验收日期: '',
发货日期: '',
货到用户现场日期: '',
用户现场开通日期: ''
},
tableData3: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
},
searchTable1() {
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
this.supplierName ? this.check2 = 1 : this.check2 = 0
searchPayTimeNode(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2(row) {
searchPayTimeNodeMoney(row.采购合同流水号).then(response => {
this.tableData2 = response.data
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
editDate(row) {
this.form1.采购合同流水号 = row.采购合同流水号
this.form1.项目预验收日期 = row.项目预验收日期
this.form1.项目终验收日期 = row.项目终验收日期
this.form1.发货日期 = row.发货日期
this.form1.货到用户现场日期 = row.货到用户现场日期
this.form1.用户现场开通日期 = row.用户现场开通日期
this.dialogVisible1 = true
},
submitEdit() {
editPayTimeNodeOther(this.form1.采购合同流水号, this.form1.项目预验收日期, this.form1.项目终验收日期, this.form1.发货日期, this.form1.货到用户现场日期, this.form1.用户现场开通日期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('设置成功')
this.dialogVisible1 = false
this.searchTable1()
this.tableData2 = []
} else { this.$message.error('设置失败') }
})
},
searchTable3() {
this.dateRange ? this.check = 1 : (this.check = 0, this.dateRange = '')
searchPurchaseBudget(this.check, this.dateRange[0], this.dateRange[1]).then(response => {
this.tableData3 = response.data
})
},
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价'
} else if (index === 4) {
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
} else {
sums[index] = 'N/A'
}
}
})
if (!isNaN(sums[4])) {
sums[4] = sums[4].toFixed(2)
}
return sums
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
.el-date-editor{
width:300px
}
</style>

View File

@@ -0,0 +1,374 @@
<template>
<div class="app-container">
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>采购员:</span>
<el-select v-model="personValue" placeholder="采购员" clearable size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading1"
:data="tableData1"
size="mini"
border
style="width: 100%;max-height: 300px;"
height="300px"
highlight-current-row
@row-click="searchTable2">
<el-table-column label="采购合同号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="预到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.预到货时间 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="300">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审批</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card>
<div style="width:900px;margin-left: 350px">
<el-card>
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="1" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="1" align="center">江苏盐城</td>
</tr>
</table>
<div> 产品名称型号数量单价品牌</div>
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="4">
<tr id="tableHead" style="height: 40px">
<td colspan="1" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">发货天数</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="6">运费</td>
<td colspan="1" align="center">{{ freight }}</td>
</tr>
<tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
</tfoot>
</table>
<div id="23"/>
</el-card>
</div>
</el-card>
<el-dialog :visible.sync="dialogVisible3" title="审批" center style="min-height: 300px;" width="20%">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="审批是否通过" prop="审批是否通过" center>
<el-select v-model="form2.审批是否通过" size="small" @change="selectChange">
<el-option
v-for="item in approval"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="未通过原因" prop="未通过原因">
<el-input v-model="form2.未通过原因" :disabled="disabled" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initContract, initBuyer, searchTable1, searchTable2, submitApproval } from '@/api/PurchasingCenter/PurchaseContractApproval'
export default {
data() {
return {
person: [],
personValue: '',
RMB: '',
TotalAmount: '',
check1: 0,
check2: 0,
check3: 0,
check4: 0,
startEndDate: '',
contract: '',
freight: '',
contractNumValue: '',
contractNum: [],
ProcurementContractNum: '',
supplier: '',
supplierName: '',
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
tableData1: [],
loading1: false,
dialogVisible3: false,
returns: [],
tableData01: [],
submitDisable: true,
approval: [
{
value: 1,
label: '是'
},
{
value: 2,
label: '否'
}
],
disabled: true,
form2: {
审批是否通过: '',
未通过原因: ''
},
rules2: {},
tableData2: [],
textarea: ``,
contractValue: '' // 显示表2和变更合同用的变量
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
text: response.data[i].姓名,
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
},
searchTable1() {
this.tableData2 = []
this.textarea = ``
this.loading1 = true
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
this.check1 = 0
this.startEndDate = ''
} else { this.check1 = 1 }
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
this.personValue ? this.check3 = 1 : this.check3 = 0
this.supplierName ? this.check4 = 1 : this.check4 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
this.loading1 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].预到货时间 !== null) {
response.data.rows[j].预到货时间 = response.data.rows[j].预到货时间.substring(0, response.data.rows[j].预到货时间.indexOf(' '))
}
if (response.data.rows[j].规定到货时间 !== null) {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
Open(row) {
this.dialogVisible3 = true
this.ProcurementContractNum = row.采购合同流水号
},
selectChange() {
if (this.form2.审批是否通过 === 2) {
this.disabled = false
}
},
submitApproval(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
submitApproval(this.ProcurementContractNum, this.form2.审批是否通过, this.form2.未通过原因).then(response => {
if (response.data[0].result === '1') {
this.$message.success('审批成功')
this.dialogVisible3 = false
this.searchTable1()
} else { this.$message.error('审批失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2(row) {
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本
this.TotalAmount = row.总金额
document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
}
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:200px
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
</style>
<style>
.tableData{
height: 30px;
}
</style>

View File

@@ -0,0 +1,412 @@
<template>
<div class="app-container">
<el-card>
<span>时间段:</span>
<el-date-picker
v-model="startEndDate"
style="width:250px"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
<span>审批情况:</span>
<el-select v-model="approvalValue" placeholder="审批情况" size="small" clearable>
<el-option
v-for="item in approval"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading1"
:data="tableData1"
:row-class-name="tableRowClassName"
size="mini"
border
style="width: 100%;max-height: 300px;"
height="300px"
highlight-current-row
@row-click="searchTable2">
<el-table-column label="采购合同号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="审批情况" align="center" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag>
<el-tag v-if="scope.row.审批情况内容==='通过审批'" type="success" size="small">通过审批</el-tag>
<el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="info" size="small">不通过审批</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过原因" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.未通过原因 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card>
<div style="float: left">
<b>二维码</b><br>
<img id="img">
</div>
<div style="width:900px;margin-left: 350px">
<el-card>
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="1" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="1" align="center">江苏盐城</td>
</tr>
</table>
<div> 产品名称型号数量单价品牌</div>
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="4">
<tr id="tableHead" style="height: 40px">
<td colspan="1" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">发货天数</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="6">运费</td>
<td colspan="1" align="center">{{ freight }}</td>
</tr>
<tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
</tfoot>
</table>
<div id="23"/>
</el-card>
</div>
</el-card>
<el-card v-show="searchView">
<!--将新一般处理页添加至通讯服务器-->
<div>附件图</div>
<img v-if="searchView" :src="searchView">
</el-card>
</div>
</template>
<script>
import { initContract, initBuyer, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseContractSearch'
import { searchFile } from '@/api/PurchasingCenter/CreateContract'
import QRCode from 'qrcode'
export default {
data() {
return {
searchView: '', // 图片预览
approval: [{
value: 0,
label: '全部'
}, {
value: 1,
label: '通过'
}, {
value: 2,
label: '未通过'
}, {
value: 3,
label: '未审批'
}],
approvalValue: '',
RMB: '',
TotalAmount: '',
check1: 0,
check2: 0,
check3: 0,
check4: 0,
check5: 0,
startEndDate: '',
contract: '',
freight: '',
contractNumValue: '',
contractNum: [],
ProcurementContractNum: '',
personValue: '',
person: [],
supplier: '',
supplierName: '',
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
tableData1: [],
loading1: false,
returns: [],
tableData01: [],
tableData02: [],
submitDisable: true,
tableData2: [],
textarea: ``,
contractValue: '' // 显示表2和变更合同用的变量
}
},
created() {
this.fetchData()
},
mounted() {
this.useqrcode()
},
methods: {
useqrcode() {
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
rendererOpts: {
quality: 0.3
}
}
QRCode.toDataURL('知道这是啥吗你就扫', opts, function(err, url) {
if (err) throw err
const img = document.getElementById('img')
img.src = url
})
},
searchPic() {
// 读取图片时查找合同流水号获取其下所有图片id根据拼接成的路径查询图片显示出来。
searchFile(this.contract).then(response => {
console.log(response.data)
if (response.data.length !== 0) {
this.searchView = 'http://localhost:8022/Img/' + response.data[0].文件名
} else {
this.searchView = ''
}
})
},
fetchData() {
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
text: response.data[i].姓名,
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
this.tableData2 = []
this.textarea = ``
this.loading1 = true
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
this.check1 = 0
this.startEndDate = ''
} else { this.check1 = 1 }
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
this.personValue ? this.check3 = 1 : this.check3 = 0
this.supplierName ? this.check4 = 1 : this.check4 = 0
if (this.approvalValue === '' || this.approvalValue === 0) {
this.check5 = 0
} else {
this.check5 = 1
}
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
this.loading1 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].操作日期 !== null) {
response.data.rows[j].操作日期 = response.data.rows[j].操作日期.substring(0, response.data.rows[j].操作日期.indexOf(' '))
}
if (response.data.rows[j].规定到货时间 !== null) {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
tableRowClassName({ row, rowIndex }) {
// if (row.审批情况流水号 === '1') {
// return 'adopt'
// } else if (row.审批情况流水号 === '2') {
// return 'NotThrough'
// }
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2(row) {
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
this.searchPic() // 显示图片
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本
this.TotalAmount = row.总金额
document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
}
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:200px
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>
<style>
.tableData{
height: 30px;
}
.el-table .adopt{
background: limegreen;
}
.el-table .NotThrough{
background: palevioletred;
}
</style>

View File

@@ -0,0 +1,169 @@
<template>
<div class="app-container">
<el-card>
<el-table :data="tableData1" highlight-current-row height="550" style="width: 100%;" size="mini" border>
<el-table-column label="序号" type="index" align="center" width="50"/>
<el-table-column label="项目名称" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="申请人" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.申请人姓名 }}
</template>
</el-table-column>
<el-table-column label="原物料" align="center">
<el-table-column label="原物料名称" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.原物料名称 }}
</template>
</el-table-column>
<el-table-column label="原物料规格" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.原物料规格 }}
</template>
</el-table-column>
<el-table-column label="原物料型号" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.原物料型号 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="新物料" align="center">
<el-table-column label="新物料名称" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.新物料名称 }}
</template>
</el-table-column>
<el-table-column label="新物料规格" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.新物料规格 }}
</template>
</el-table-column>
<el-table-column label="新物料型号" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.新物料型号 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="是否同意修改" width="200px" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleEdit1(scope.$index, scope.row)">同意</el-button>
<el-button
size="mini"
type="danger"
class="el-icon-edit"
@click="handleEdit2(scope.$index, scope.row)">不同意</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading1"
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</div>
</template>
<script>
import { searchTable, edit } from '@/api/PurchasingCenter/PurchaseMaterielModify'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购物料修改
data() {
return {
loading1: false,
tableData1: [], // 表格数据
total1: null, // 总条数
pageSize1: 10, // 每页显示条数
pageCurrent1: 1
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.searchTable()
},
methods: {
searchTable() {
this.loading1 = true
this.tableData1 = []
searchTable(this.pageCurrent1, this.pageSize1).then(response => {
console.log(response.data)
if (response.data.total === 0) {
this.loading1 = false
} else {
this.tableData1 = response.data.rows
this.total1 = response.data.total
}
}).then(() => {
this.loading1 = false
})
},
handleEdit1(index, row) {
edit(row.组件零件流水号, row.标准件和外购件流水号, row.物料变更记录流水号, 1, this.id, row.原物料流水号).then(response => {
if (response.data[0].result === '1') {
this.$message({
type: 'success',
message: '信息更新成功!'
})
this.searchTable()
} else {
this.$message.error('信息更新失败')
}
})
},
handleEdit2(index, row) {
edit(row.组件零件流水号, row.标准件和外购件流水号, row.物料变更记录流水号, 2, this.id, row.原物料流水号).then(response => {
if (response.data[0].result === '1') {
this.$message({
type: 'success',
message: '信息更新成功!'
})
this.searchTable()
} else {
this.$message.error('信息更新失败')
}
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable()
}
}
}
</script>
<style scoped>
span{
margin: 10px 0 10px 10px;
}
.el-card{
margin-bottom: 15px;
}
</style>

View File

@@ -0,0 +1,252 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>分配情况:</span>
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
<el-option
v-for="item in allocateState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
<span>采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask">分配</el-button>
</el-card>
<el-card>
<el-table
v-loading=""
:data="tableData1"
size="mini"
style="max-height: 600px"
height="600px"
border
stripe
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="项目名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号" min-width="150px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格" min-width="150px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" min-width="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商" min-width="150px">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划到货时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="100px" prop="buyer">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, initBuyer, searchTable1, allocateTask } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购任务分配
data() {
return {
projectValue: '',
project: [],
materialName: '',
allocateStateValue: 0,
allocateState: [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '未分配'
},
{
value: 2,
label: '已分配'
}
],
personValue: '',
person: [],
check1: 0,
check2: 0,
tableData1: [],
standardAndPurchase: [],
pageCurrent1: 1,
pageSize1: 20,
total1: 0
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() {
this.fetchData()
},
methods: {
fetchData() { // 初始化
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.project.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
text: response.data[i].姓名,
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() { // 查询
this.projectValue ? this.check1 = 1 : this.check1 = 0
this.materialName ? this.check2 = 1 : this.check2 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.materialName, this.allocateStateValue).then(response => {
console.log(response.data)
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSelectionChange1(val) { // 多选
this.standardAndPurchase = []
for (let i = 0; i < val.length; i++) {
this.standardAndPurchase.push(val[i].标准件和外购件流水号)
}
},
selectable(row) { // 多选禁用
return row.人员编号 === '' || row.人员编号 === null
},
allocateTask() { // 分配任务
if (!this.personValue) {
this.$message.error('请选择采购员')
} else if (this.standardAndPurchase.length === 0) {
this.$message.error('请选择需分配的物料')
} else {
this.$confirm('此操作执行后不可修改,是否确定分配?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
allocateTask(this.standardAndPurchase, this.personValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
},
filterHandler(value, row) {
console.log(row, value)
return parseInt(row['人员编号']) === parseInt(value)
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -0,0 +1,420 @@
<template>
<div class="app-container">
<el-card>
<span>发票号:</span>
<el-input v-model="invoiceNum" size="small" clearable/>
<!--<span>开票时间:</span>-->
<!--<el-date-picker v-model="invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>-->
<span>采购合同号:</span>
<el-select v-model="contractNum" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNums"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>传送人:</span>
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>接收人:</span>
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-circle-plus-outline"
style="margin-left: 10px"
@click="addTable1()">增加</el-button>
<el-button
type="warning"
size="small"
icon="el-icon-download"
style="margin-left: 10px"
>导出</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" stripe border>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购合同编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购合同名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="200px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="总金额" min-width="100px">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="传送人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.传送人姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="接收人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.接收人姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" min-width="200px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon="el-icon-edit"
@click="editTable1(scope.row)">编辑</el-button>
<el-button
type="danger"
size="mini"
icon="el-icon-delete"
@click="deleteTable1(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="25%">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px">
<el-form-item label="采购合同号" prop="contractNum">
<el-select v-model="form1.contractNum" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNums"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="发票号" prop="invoiceNum">
<el-input v-model="form1.invoiceNum" size="small"/>
</el-form-item>
<el-form-item label="开票时间" prop="invoiceTime">
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="开票金额" prop="money">
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
</el-form-item>
<el-form-item label="传送人" prop="sendPerson">
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="接收人" prop="receivePerson">
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
<el-option
v-for="item in selectPerson"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
<el-button v-show="title1==='增加'" size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initPerson, initContract } from '@/api/PurchasingCenter/ReceiptConnectionSheet'
import { mapGetters } from 'vuex'
export default {
name: '', // 发票交接单
data() {
return {
contractNumValue: '',
contractNums: [],
invoiceNum: '',
invoiceTime: '',
transmitValue: '',
selectPerson: [], // 传送人接收人
recipientValue: '',
contractNum: '',
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
check1: 0,
check2: 0,
check3: 0,
check4: 0,
check5: 0,
dialogVisible1: false,
title1: '',
form1: {
contractNum: '',
invoiceNum: '',
invoiceNumValue: '',
invoiceTime: '',
money: '',
sendPersonValue: '',
receivePersonValue: '',
remark: ''
},
rules1: {
contractNum: [
{ required: true, message: '请选择合同号', trigger: 'change' }
],
invoiceNum: [
{ required: true, message: '请输入发票号', trigger: 'blur' }
]
}
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
initPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.selectPerson.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
this.invoiceTime ? this.check2 = 1 : this.check2 = 0
this.transmitValue ? this.check3 = 1 : this.check3 = 0
this.recipientValue ? this.check4 = 1 : this.check4 = 0
this.contractNum ? this.check5 = 1 : this.check5 = 0
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.invoiceTime, this.check3, this.transmitValue, this.check4, this.recipientValue, this.check5, this.contractNum).then(response => {
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].开票时间 !== null) {
response.data.rows[j].开票时间 = response.data.rows[j].开票时间.substring(0, response.data.rows[j].开票时间.indexOf(' '))
}
if (response.data.rows[j].开票时间 === '1900/1/1') {
response.data.rows[j].开票时间 = ''
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
addTable1() {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '增加'
this.dialogVisible1 = true
this.form1.contractNum = ''
this.form1.invoiceNum = ''
this.form1.invoiceTime = ''
this.form1.money = ''
this.form1.sendPersonValue = Number(this.id)
this.form1.receivePersonValue = ''
this.form1.remark = ''
},
submitAdd1(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
const myDate = new Date()
const year = myDate.getFullYear()
const month = myDate.getMonth() + 1
const date = myDate.getDate()
const nowDate = year + '-' + month + '-' + date
addInvoice(this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark, nowDate).then(response => {
console.log(response.data)
if (response.data.result[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('增加失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
editTable1(row) {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '编辑'
this.dialogVisible1 = true
this.form1.contractNum = parseInt(row.采购合同流水号)
this.form1.invoiceNum = row.发票号
this.form1.invoiceNumValue = row.发票流水号
this.form1.invoiceTime = row.开票时间
this.form1.money = row.开票金额
this.form1.sendPersonValue = parseInt(row.传送人)
this.form1.receivePersonValue = parseInt(row.接收人)
this.form1.remark = row.备注
console.log(row.开票时间)
if (row.开票时间 === '1900/1/1') {
this.form1.invoiceTime = null
}
if (parseInt(row.传送人) === 0) {
this.form1.sendPersonValue = ''
}
if (parseInt(row.接收人) === 0) {
this.form1.receivePersonValue = ''
}
},
submitEdit1(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
editInvoice(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark).then(response => {
console.log(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark)
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
deleteTable1(row) {
console.log(row)
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInvoice(row.发票流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.dialogVisible1 = false
this.searchTable1()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-top: 1px;
margin-bottom: 1px;
}
</style>

View File

@@ -0,0 +1,130 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="searchProject()">查询</el-button>
</el-card>
<el-card style="margin-top: 15px">
<el-table
:data="tableData1"
style="width: 100%"
height="440"
size="mini"
show-summary
highlight-current-row
border>
<el-table-column align="center" label="项目名称">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="数量">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="单价">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column align="center" label="小计(元)" prop="小计">
<template slot-scope="scope">
{{ scope.row.小计 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, searchReceiveCheck } from '@/api/PurchasingCenter/ReceiveCheck'
export default {
data() {
return {
projectValue: '', // 项目名称
project: [],
tableData1: [],
check1: '',
pageCurrent: 1,
pageSize: 10,
total: 0,
form: {
项目名称: '',
物料名称: '',
物料规格: '',
物料型号: '',
数量: '',
单价: '',
小计: ''
}
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
searchProject() { // 查询
if (!this.projectValue) {
this.$message.error('请选择项目')
} else {
searchReceiveCheck(this.pageCurrent, this.pageSize, 1, this.projectValue).then(response => {
this.tableData1 = response.data.rows
this.total = response.data.total
})
}
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchProject()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchProject()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,675 @@
<template>
<div class="app-container">
<el-card>
<el-form ref="form1" :model="form1" label-position="right" label-width="110px" class="searchForm">
<el-row>
<el-col style="width: 300px">
<el-form-item label="供应商名称">
<el-input v-model="supplierName" placeholder="供应商名称" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="企业性质">
<el-input v-model="businessNature" placeholder="企业性质" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="创立日期">
<el-date-picker v-model="creationDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="注册资本">
<el-input v-model="registeredCapital" placeholder="注册资本" size="small" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col style="width: 300px">
<el-form-item label="税号">
<el-input v-model="taxNumber" placeholder="税号" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="电子信箱">
<el-input v-model="email" placeholder="电子信箱" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="电话号码">
<el-input v-model="telephone" placeholder="电话号码" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="开户行">
<el-input v-model="bank" placeholder="开户行" size="small" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col style="width: 300px">
<el-form-item label="帐号">
<el-input v-model="account" placeholder="帐号" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="地址">
<el-input v-model="address" placeholder="地址" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="传真">
<el-input v-model="fax" placeholder="传真" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 350px">
<el-form-item label="货期">
<el-input v-model="deliveryPeriod" placeholder="货期" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px;margin-top:2px">
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent = 1;fetchData()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">增加</el-button>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<div style="display: inline-block;margin-bottom: 20px">供应商列表</div>
<el-table :data="List" highlight-current-row border style="width: 100%;max-height: 400px;" height="400" size="mini" @row-click="rowClick">
<el-table-column label="供应商名称" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="开户行" align="center" width="250">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="帐号" align="center" width="170">
<template slot-scope="scope">
{{ scope.row.帐号 }}
</template>
</el-table-column>
<el-table-column label="税号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column label="电话号码" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.电话号码 }}
</template>
</el-table-column>
<el-table-column label="电子信箱" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.电子信箱 }}
</template>
</el-table-column>
<el-table-column label="地址" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column label="传真" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column label="企业性质" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.企业性质 }}
</template>
</el-table-column>
<el-table-column label="创立日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
</template>
</el-table-column>
<el-table-column label="注册资本" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.注册资本 }}
</template>
</el-table-column>
<el-table-column label="货期" align="center">
<template slot-scope="scope">
{{ scope.row.货期 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<div style="display: inline-block;margin-bottom: 20px;width:90%">供应商联系人列表</div>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-bottom:10px;float:right" @click="handleAdd2()">增加</el-button>
<el-table :data="List1" border size="mini">
<el-table-column label="姓名" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="职务" align="center">
<template slot-scope="scope">
{{ scope.row.职务 }}
</template>
</el-table-column>
<el-table-column label="电话" align="center" >
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column label="手机" align="center" >
<template slot-scope="scope">
{{ scope.row.手机 }}
</template>
</el-table-column>
<el-table-column label="传真" align="center" >
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit2(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete2(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="800px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="供应商名称" prop="供应商名称">
<el-input
v-model="form.供应商名称"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业性质" prop="企业性质">
<el-input
v-model="form.企业性质"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="创立日期" prop="创立日期">
<el-date-picker
v-model="form.创立日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="选择日期"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注册资本" prop="注册资本">
<el-input
v-model="form.注册资本"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="税号" prop="税号">
<el-input
v-model="form.税号"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行" prop="开户行">
<el-input
v-model="form.开户行"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="帐号" prop="帐号">
<el-input
v-model="form.帐号"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电子信箱" prop="电子信箱">
<el-input
v-model="form.电子信箱"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="地址" prop="地址">
<el-input
v-model="form.地址"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话号码" prop="电话号码">
<el-input
v-model="form.电话号码"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="传真" prop="传真">
<el-input
v-model="form.传真"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="货期" prop="货期">
<el-input
v-model="form.货期"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button>
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
</div>
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="400px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="80px" class="demo-ruleForm">
<el-form-item label="姓名" prop="姓名">
<el-input v-model="form2.姓名" size="small" clearable/>
</el-form-item>
<el-form-item label="职务" prop="职务">
<el-input v-model="form2.职务" size="small" clearable/>
</el-form-item>
<el-form-item label="电话" prop="电话">
<el-input v-model="form2.电话" size="small" clearable/>
</el-form-item>
<el-form-item label="手机" prop="手机">
<el-input v-model="form2.手机" size="small" clearable/>
</el-form-item>
<el-form-item label="传真" prop="传真">
<el-input v-model="form2.传真" size="small" clearable/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button>
<el-button v-show="title2==='增加'" type="primary" @click="submitAdd2('form2')">确定</el-button>
<el-button v-show="title2==='编辑'" type="primary" @click="submitEdit2('form2')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchData, addTable, editTable, deleteData, getName, addPerson, editPerson, deletePerson } from '@/api/PurchasingCenter/SupplierManagement'
export default {
data() {
return {
form1: {},
supplierName: '',
businessNature: '',
creationDate: '',
registeredCapital: '',
taxNumber: '',
email: '',
address: '',
account: '',
bank: '',
telephone: '',
fax: '',
deliveryPeriod: '',
check1: 0,
check2: 0,
check3: 0,
check4: 0,
check5: 0,
check6: 0,
check7: 0,
check8: 0,
check9: 0,
check10: 0,
check11: 0,
check12: 0,
List: [],
pageCurrent: 1,
pageSize: 10,
total: 0,
title: '',
dialogFormVisible: false,
form: {
供应商名称: '',
企业性质: '',
创立日期: '',
注册资本: '',
税号: '',
开户行: '',
帐号: '',
电子信箱: '',
地址: '',
电话号码: '',
传真: '',
货期: ''
},
rules: {
供应商名称: [{ required: true, message: '请填写供应商名称', change: 'blur' }]
},
supplierSerialNumber: '',
List1: [],
dialogFormVisible2: false,
title2: '',
form2: {
姓名: '',
职务: '',
电话: '',
手机: '',
传真: '',
供应商流水号: '',
供应商联系人流水号: ''
},
rules2: {
姓名: [{ required: true, message: '请填写联系人姓名', change: 'blur' }]
}
}
},
methods: {
fetchData() {
this.List1 = []
this.supplierName ? this.check1 = 1 : this.check1 = 0
this.businessNature ? this.check2 = 1 : this.check2 = 0
this.creationDate ? this.check3 = 1 : this.check3 = 0
this.registeredCapital ? this.check4 = 1 : this.check4 = 0
this.taxNumber ? this.check5 = 1 : this.check5 = 0
this.bank ? this.check6 = 1 : this.check6 = 0
this.account ? this.check7 = 1 : this.check7 = 0
this.email ? this.check8 = 1 : this.check8 = 0
this.address ? this.check9 = 1 : this.check9 = 0
this.telephone ? this.check10 = 1 : this.check10 = 0
this.fax ? this.check11 = 1 : this.check11 = 0
this.deliveryPeriod ? this.check12 = 1 : this.check12 = 0
searchData(this.check1, this.supplierName, this.check2, this.businessNature, this.check3, this.creationDate, this.check4, this.registeredCapital, this.check5, this.taxNumber, this.check6, this.bank, this.check7, this.account, this.check8, this.email, this.check9, this.address, this.check10, this.telephone, this.check11, this.fax, this.check12, this.deliveryPeriod, this.pageCurrent, this.pageSize).then(response => {
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].创立日期 !== null) {
response.data.rows[j].创立日期 = response.data.rows[j].创立日期.substring(0, response.data.rows[j].创立日期.indexOf(' '))
}
}
this.List = response.data.rows
this.total = response.data.total
})
},
handleAdd() {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.dialogFormVisible = true
this.title = '增加'
this.form.供应商名称 = ''
this.form.企业性质 = ''
this.form.创立日期 = ''
this.form.注册资本 = ''
this.form.税号 = ''
this.form.开户行 = ''
this.form.帐号 = ''
this.form.电子信箱 = ''
this.form.地址 = ''
this.form.电话号码 = ''
this.form.传真 = ''
this.form.货期 = ''
this.supplierSerialNumber = ''
},
submitAdd(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
addTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.form.电话号码, this.form.传真, this.form.货期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible = false
this.pageCurrent = 1
this.pageSize = 10
this.fetchData()
} else { this.$message.error('增加失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleEdit(row) {
console.log(row)
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.dialogFormVisible = true
this.title = '编辑'
this.form.供应商名称 = row.供应商名称
this.form.企业性质 = row.企业性质
this.form.创立日期 = row.创立日期
this.form.注册资本 = row.注册资本
this.form.税号 = row.税号
this.form.开户行 = row.开户行
this.form.帐号 = row.帐号
this.form.电子信箱 = row.电子信箱
this.form.地址 = row.地址
this.form.电话号码 = row.电话号码
this.form.传真 = row.传真
this.form.货期 = row.货期
this.supplierSerialNumber = row.供应商流水号
},
submitEdit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
editTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.supplierSerialNumber, this.form.传真, this.form.货期, this.form.电话号码).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogFormVisible = false
this.pageCurrent = 1
this.pageSize = 10
this.fetchData()
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
cancel() { // 取消
this.dialogFormVisible = false
},
handleDelete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteData(row.供应商流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.pageCurrent = 1
this.pageSize = 10
this.fetchData()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.fetchData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.fetchData()
},
rowClick(row) {
this.List1 = []
this.form2.供应商流水号 = row.供应商流水号
getName(this.form2.供应商流水号).then(response => {
this.List1 = response.data
})
},
handleAdd2() {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.dialogFormVisible2 = true
this.title2 = '增加'
this.form2.姓名 = ''
this.form2.职务 = ''
this.form2.电话 = ''
this.form2.手机 = ''
this.form2.传真 = ''
},
submitAdd2(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
addPerson(this.form2.姓名, this.form2.职务, this.form2.电话, this.form2.手机, this.form2.传真, this.form2.供应商流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible2 = false
getName(this.form2.供应商流水号).then(response => {
this.List1 = response.data
})
} else { this.$message.error('增加失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleEdit2(row) {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.dialogFormVisible2 = true
this.title2 = '编辑'
this.form2.姓名 = row.姓名
this.form2.职务 = row.职务
this.form2.电话 = row.电话
this.form2.手机 = row.手机
this.form2.传真 = row.传真
this.form2.供应商联系人流水号 = row.供应商联系人流水号
},
submitEdit2(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
editPerson(this.form2.姓名, this.form2.职务, this.form2.电话, this.form2.手机, this.form2.传真, this.form2.供应商联系人流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogFormVisible2 = false
getName(this.form2.供应商流水号).then(response => {
this.List1 = response.data
})
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleDelete2(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deletePerson(row.供应商联系人流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
getName(this.form2.供应商流水号).then(response => {
this.List1 = response.data
})
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:200px
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
</style>

View File

@@ -34,6 +34,7 @@
/* eslint-disable */
import UploadExcelComponent from './UploadExcel/index.vue'
import specificationData from './specificationData'
import { sleep } from '../../../utils/tool'
import { initProject, isExit, importBasics, importPurcharse, searchMachine, searchGroupNum } from '../../../api/TechnologyCenter/ImportParts'
export default {
@@ -144,11 +145,13 @@ export default {
manufacturer,
remarks,
classificationCode
// const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
// const res = response.data
// if (res[j].Column1 !== 0) {
// this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
// } else {
const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
const res = response.data
if (res[0].Column1 === 0) {
this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
this.loading = false
return
} else {
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
@@ -184,7 +187,7 @@ export default {
return
}
}
// }
}
}
this.itemFile.splice(j, 1)
this.worksheet.splice(j, 1)
@@ -201,12 +204,14 @@ export default {
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
try {
if (groupNum.indexOf('MX') > -1) {
await sleep(10)
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
if (res[0].result === '0') {
this.$notify.error(`${drawingNum}导入失败`)
}
} else {
await sleep(10)
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
if (res[0].result === '0') {

View File

@@ -259,6 +259,7 @@
</template>
<script>
import { sleep } from '../../../utils/tool'
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG } from '../../../api/TechnologyCenter/ImportParts'
export default {
name: 'SpecificationData',
@@ -479,13 +480,15 @@ export default {
},
async transferData() {
try {
this.err = 0
if (this.groupValue) {
this.listLoading = true
if (this.groupValue.indexOf('MX') > -1) {
for (let i = 0; i < this.tableDataAll.length; i++) {
const data = this.tableDataAll[i]
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.数据类型, data.是否传递, data.序号, data.id)
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id)
await sleep(10)
if (resp.data[0].result === '0') {
this.err++
}
@@ -496,11 +499,12 @@ export default {
const data = this.tableDataAll[i]
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
if (this.groupValue.indexOf('WG') > -1) {
dataType = 1
} else {
dataType = 2
} else {
dataType = 1
}
const resp = await transferWG(data.组件流水号, data.物料流水号, total, data.备注, data.标记, data.设计者编号, data.是否传递, dataType, data.序号, data.id)
await sleep(10)
if (resp.data[0].result === '0') {
this.err++
this.$notify.error(`传递零件失败`)

Some files were not shown because too many files have changed in this diff Show More