Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
[0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
[0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
[0531/081503.881:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
[0531/081503.881:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
|
[0605/094355.406:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export function searchListDetail(...params) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查看领料单明细相关的物料货位数量
|
// 查看领料单明细相关的物料货位数量
|
||||||
export function searchStockNumber(...params) {
|
export function searchStockNumber1(...params) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -71,6 +71,30 @@ export function searchStockNumber(...params) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查看领料单明细相关的物料货位数量
|
||||||
|
export function searchStockNumber2(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料出库_基本件_查询数据',
|
||||||
|
param: `基本件流水号=${params[0]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查看领料单明细相关的物料货位数量
|
||||||
|
export function searchStockNumber3(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料出库_车间采购件_查询数据',
|
||||||
|
param: `请购单明细流水号=${params[0]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 出库
|
// 出库
|
||||||
export function submitOutStore(...params) {
|
export function submitOutStore(...params) {
|
||||||
return request({
|
return request({
|
||||||
@@ -79,7 +103,19 @@ export function submitOutStore(...params) {
|
|||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '库存管理_物料出库_出库记录_增加数据',
|
name: '库存管理_物料出库_出库记录_增加数据',
|
||||||
param: `物料流水号=${params[0]}&货位流水号=${params[1]}&出库数量=${params[2]}&出库人流水号=${params[3]}&基本件流水号=${params[4]}&标准件和外购件流水号=${params[5]}`
|
param: `物料流水号=${params[0]}&货位流水号=${params[1]}&出库数量=${params[2]}&出库人流水号=${params[3]}&基本件流水号=${params[4]}&标准件和外购件流水号=${params[5]}&请购单明细流水号=${params[6]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 出库
|
||||||
|
export function errorRecord(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料出库_异常记录_增加数据',
|
||||||
|
param: `异常数量=${params[0]}&异常原因=${params[1]}&物料流水号=${params[2]}&基本件流水号=${params[3]}&货位流水号=${params[4]}}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,14 +32,14 @@ export function searchgroup(num, pageCurrent, pageSize) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function searchTable(check, entryNameValue, check1, machine, check2, groupNum, check3, year, check4, month, check5, time, pageCurrent, pageSize) {
|
export function searchTable(check, entryNameValue, check1, machine, check2, groupNum, pageCurrent, pageSize) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间生产管理工艺_基本件成组配套_查询数据',
|
name: '车间生产管理工艺_基本件成组配套_查询数据',
|
||||||
param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&年_check=' + check3 + '=int&年=' + year + '=string&月_check=' + check4 + '=int&月=' + month + '=int&入库时间_check=' + check5 + '=int&入库时间=' + time + '=string',
|
param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int',
|
||||||
pagination: pageCurrent + '&' + pageSize
|
pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -67,14 +67,14 @@ export function searchPurchaseTable(check, entryNameValue, check1, machine, chec
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function searchTable1(check, entryNameValue, check1, machine, check2, groupNum, check3, year, check4, month, check5, time, pageCurrent, pageSize) {
|
export function searchTable1(check, entryNameValue, check1, machine, check2, groupNum, pageCurrent, pageSize) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '库存管理_车间采购出库_零件查询',
|
name: '库存管理_车间采购出库_零件查询',
|
||||||
param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&年_check=' + check3 + '=int&年=' + year + '=string&月_check=' + check4 + '=int&月=' + month + '=int&入库时间_check=' + check5 + '=int&入库时间=' + time + '=string',
|
param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '=int&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int',
|
||||||
pagination: pageCurrent + '&' + pageSize
|
pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -90,3 +90,29 @@ export function processingStatus(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询表1标准件和外购件
|
||||||
|
export function searchTable01(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_采购部采购_查询物料_分配后_加供应商',
|
||||||
|
param: `项目流水号_check=${params[0]}&项目流水号=${params[1]}&机床流水号_check=${params[2]}&机床流水号=${params[3]}&组件流水号_check=${params[4]}&组件流水号=${params[5]}`,
|
||||||
|
Pagination: params[6] + '&' + params[7]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询表1基本件
|
||||||
|
export function searchTable02(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_采购部采购_查询物料_基本件_分配后_加供应商',
|
||||||
|
param: `项目流水号_check=${params[0]}&项目流水号=${params[1]}&机床流水号_check=${params[2]}&机床流水号=${params[3]}&组件流水号_check=${params[4]}&组件流水号=${params[5]}`,
|
||||||
|
Pagination: params[6] + '&' + params[7]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ inner join 车间生产管理工艺_零件工艺计划 on 当前加工工序表.
|
|||||||
inner join 车间生产管理工艺_零件工序 on 当前加工工序表.工艺计划流水号 = 车间生产管理工艺_零件工序.工艺计划流水号 and 当前加工工序表.待加工工序顺序 = 车间生产管理工艺_零件工序.工序顺序
|
inner join 车间生产管理工艺_零件工序 on 当前加工工序表.工艺计划流水号 = 车间生产管理工艺_零件工序.工艺计划流水号 and 当前加工工序表.待加工工序顺序 = 车间生产管理工艺_零件工序.工序顺序
|
||||||
inner join 车间生产管理工艺_基础表_工艺名称 on 车间生产管理工艺_基础表_工艺名称.工艺编号 = 车间生产管理工艺_零件工序.工艺编号
|
inner join 车间生产管理工艺_基础表_工艺名称 on 车间生产管理工艺_基础表_工艺名称.工艺编号 = 车间生产管理工艺_零件工序.工艺编号
|
||||||
inner join 车间生产管理工艺_零件工序_视图 on 车间生产管理工艺_零件工序_视图.工艺计划流水号 = 车间生产管理工艺_零件工艺计划.工艺计划流水号 and 当前加工工序表.待加工工序顺序 = 车间生产管理工艺_零件工序_视图.工序顺序
|
inner join 车间生产管理工艺_零件工序_视图 on 车间生产管理工艺_零件工序_视图.工艺计划流水号 = 车间生产管理工艺_零件工艺计划.工艺计划流水号 and 当前加工工序表.待加工工序顺序 = 车间生产管理工艺_零件工序_视图.工序顺序
|
||||||
where 组件流水号 = ${num}`
|
where 机床流水号 = ${num}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export function doneContract(...params) {
|
|||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_采购合同_增加数据',
|
name: '采购管理_采购合同_增加数据',
|
||||||
param: `采购合同编号=${params[0]}\\&采购合同名称=${params[1]}\\&交货日期=${params[2]}\\&支付日期=${params[3]}\\&支付方式=${params[4]}\\&开票信息=${params[5]}\\&其他说明=${params[6]}\\&合同总额=${params[7]}\\&采购员流水号=${params[8]}\\&供应商流水号=${params[9]}\\&单价是否含税=${params[10]}\\&组件零件流水号组=${params[11]}\\&组件零件基本件流水号组=${params[12]}\\&数量组=${params[13]}\\&单价组=${params[14]}\\&交货期组=${params[15]}\\&合同内容\\=${params[16]}`
|
param: `采购合同编号=${params[0]}\\&采购合同名称=${params[1]}\\&交货日期=${params[2]}\\&支付日期=${params[3]}\\&支付方式=${params[4]}\\&开票信息=${params[5]}\\&其他说明=${params[6]}\\&合同总额=${params[7]}\\&采购员流水号=${params[8]}\\&供应商流水号=${params[9]}\\&单价是否含税=${params[10]}\\&组件零件流水号组=${params[11]}\\&组件零件基本件流水号组=${params[12]}\\&数量组=${params[13]}\\&单价组=${params[14]}\\&交货期组=${params[15]}\\&合同内容\\=${params[16]}\\&税率=${params[17]}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,26 +135,26 @@ export function deleteMateriel(num) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 保存离线合同
|
// 保存离线合同
|
||||||
export function saveOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
|
export function saveOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup, taxRate) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_离线合同_保存合同',
|
name: '采购管理_离线合同_保存合同',
|
||||||
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}`
|
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}&税率=${taxRate}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 生成离线合同
|
// 生成离线合同
|
||||||
export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
|
export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup, taxRate) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_离线合同_生成合同',
|
name: '采购管理_离线合同_生成合同',
|
||||||
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}`
|
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}&交货期要求组=${dateGroup}&备注组=${remarkGroup}&税率=${taxRate}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,3 +81,14 @@ export function deletePurchaseData(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getFileData(MachineDrawValue) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_机床总图_查询数据',
|
||||||
|
param: `机床流水号=${MachineDrawValue}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,14 +11,16 @@ export const name1 = `OP1000`
|
|||||||
export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice
|
export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice
|
||||||
export const readImg = `http://192.168.1.231:8411/webpage/img/` // delivery/MS/performancebond
|
export const readImg = `http://192.168.1.231:8411/webpage/img/` // delivery/MS/performancebond
|
||||||
export const upload = `http://192.168.1.231:8411/submit/uploadFile.ashx` // ContractInformationManagement
|
export const upload = `http://192.168.1.231:8411/submit/uploadFile.ashx` // ContractInformationManagement
|
||||||
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231
|
|
||||||
export const upload2 = `http://192.168.1.231:8411/submit/upload2.ashx` // delivery
|
export const upload2 = `http://192.168.1.231:8411/submit/upload2.ashx` // delivery
|
||||||
export const upload3 = `http://192.168.1.231:8411/submit/upload3.ashx` // performancebond
|
export const upload3 = `http://192.168.1.231:8411/submit/upload3.ashx` // performancebond
|
||||||
export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoiceScan.ashx` // invoice
|
export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoiceScan.ashx` // invoice
|
||||||
export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoiceScan1.ashx` // invoice(workshop)
|
export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoiceScan1.ashx` // invoice(workshop)
|
||||||
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
|
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
|
||||||
export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231
|
|
||||||
|
|
||||||
|
// 技术中心程序发布时要更改下面所有的IP到0段
|
||||||
|
export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
|
||||||
|
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231
|
||||||
|
export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||||
timeout: 1500000 // 请求超时时间
|
timeout: 1500000 // 请求超时时间
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export function sleep(time) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function groupBy(datas, keys, callBack) {
|
export function groupBy(datas, keys) {
|
||||||
const list = datas || []
|
const list = datas || []
|
||||||
const groups = []
|
const groups = []
|
||||||
const result = []
|
const result = []
|
||||||
@@ -125,8 +125,10 @@ export function groupBy(datas, keys, callBack) {
|
|||||||
}
|
}
|
||||||
groups.push(group)
|
groups.push(group)
|
||||||
}
|
}
|
||||||
group.key.数量 = callBack(group.data, v)
|
group.data1 = group.data1 || 0
|
||||||
group.data = callBack(group.data, v)
|
group.key.数量 = group.data1 += v.数量
|
||||||
|
group.data2 = group.data2 || ''
|
||||||
|
group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + ';'
|
||||||
})
|
})
|
||||||
groups.map(v => {
|
groups.map(v => {
|
||||||
result.push(v.key)
|
result.push(v.key)
|
||||||
|
|||||||
@@ -122,6 +122,15 @@
|
|||||||
{{ scope.row.备注 }}
|
{{ scope.row.备注 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="viewPicture(scope.row)">查看图片</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -135,6 +144,11 @@
|
|||||||
@current-change="handleCurrentChange"/>
|
@current-change="handleCurrentChange"/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog :visible.sync="dialogFormVisible" title="图片" center style="" width="600px">
|
||||||
|
<div class="demo-image__lazy">
|
||||||
|
<el-image v-for="url in urls" :key="url" :src="url" lazy/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -148,12 +162,15 @@ export default {
|
|||||||
machineNumber: [],
|
machineNumber: [],
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
|
urls: [],
|
||||||
|
number: '',
|
||||||
groupNumberValue: '',
|
groupNumberValue: '',
|
||||||
groupNumber: [],
|
groupNumber: [],
|
||||||
QualityTypeNumber: [],
|
QualityTypeNumber: [],
|
||||||
QualityTypeValue: '',
|
QualityTypeValue: '',
|
||||||
tableData1: [],
|
tableData1: [],
|
||||||
SpareParts: '',
|
SpareParts: '',
|
||||||
|
dialogFormVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
total: null, // 总条数
|
total: null, // 总条数
|
||||||
pageSize: 10, // 每页显示条数
|
pageSize: 10, // 每页显示条数
|
||||||
@@ -161,7 +178,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initProject()
|
this.initProject()
|
||||||
@@ -216,6 +232,9 @@ export default {
|
|||||||
this.total = response.data.total
|
this.total = response.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
viewPicture(row) {
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
},
|
||||||
// 分页
|
// 分页
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageCurrent = 1
|
this.pageCurrent = 1
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
|
<el-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
|
||||||
<el-input-number v-model="form1.outNumber" :min="0.01" :precision="2" size="small" placeholder="出库数量" style="width: 200px"/>
|
<el-input-number v-model="form1.outNumber" :min="0.01" :max="form1.outNumberMax" :precision="2" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="出库人" prop="personValue" label-width="100px">
|
<el-form-item label="出库人" prop="personValue" label-width="100px">
|
||||||
<el-select v-model="form1.personValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">
|
<el-select v-model="form1.personValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber, submitOutStore } from '@/api/Inventory/MaterialOut'
|
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber1, searchStockNumber2, submitOutStore, errorRecord, searchStockNumber3 } from '@/api/Inventory/MaterialOut'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'MaterialOut',
|
name: 'MaterialOut',
|
||||||
@@ -230,6 +230,7 @@ export default {
|
|||||||
machineValue: '',
|
machineValue: '',
|
||||||
groupNumValue: '',
|
groupNumValue: '',
|
||||||
outNumber: '',
|
outNumber: '',
|
||||||
|
outNumberMax: '', // 出库最大值
|
||||||
personValue: ''
|
personValue: ''
|
||||||
},
|
},
|
||||||
form2: {
|
form2: {
|
||||||
@@ -237,7 +238,6 @@ export default {
|
|||||||
reason: '',
|
reason: '',
|
||||||
物料流水号: '',
|
物料流水号: '',
|
||||||
基本件流水号: '',
|
基本件流水号: '',
|
||||||
仓库流水号: '',
|
|
||||||
货位流水号: ''
|
货位流水号: ''
|
||||||
},
|
},
|
||||||
rules1: {
|
rules1: {
|
||||||
@@ -256,7 +256,8 @@ export default {
|
|||||||
materialNum: '', // 中间变量物料流水号
|
materialNum: '', // 中间变量物料流水号
|
||||||
machineValue: '', // 中间变量机床流水号
|
machineValue: '', // 中间变量机床流水号
|
||||||
groupNumValue: '', // 中间变量组件流水号
|
groupNumValue: '', // 中间变量组件流水号
|
||||||
basePartNum: '', // 中间变量基本件流水u和
|
basePartNum: '', // 中间变量基本件流水号
|
||||||
|
purchaseBillNum: '', // 中间变量请购单明细流水号
|
||||||
parchasePartNum: '', // 中间变量标准件和外购件流水号
|
parchasePartNum: '', // 中间变量标准件和外购件流水号
|
||||||
locationNum: '', // 中间变量货位流水号
|
locationNum: '', // 中间变量货位流水号
|
||||||
outNumber: 0 // 中间变量出库数量
|
outNumber: 0 // 中间变量出库数量
|
||||||
@@ -335,29 +336,36 @@ export default {
|
|||||||
},
|
},
|
||||||
// 查看领料单明细相关的物料货位数量
|
// 查看领料单明细相关的物料货位数量
|
||||||
clickListDetail(row) {
|
clickListDetail(row) {
|
||||||
row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = '', this.parchasePartNum = '') : this.basePartNum
|
console.log(row, 111)
|
||||||
row && row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = '') : this.materialNum
|
row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = null, this.parchasePartNum = null, this.purchaseBillNum = null) : this.basePartNum
|
||||||
row && row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = '') : this.parchasePartNum
|
row && row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = null, this.purchaseBillNum = null) : this.materialNum
|
||||||
|
row && row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = null, this.purchaseBillNum = null) : this.parchasePartNum
|
||||||
|
row && row.请购单明细流水号 ? (this.purchaseBillNum = row.请购单明细流水号, this.basePartNum = null, this.materialNum = null, this.parchasePartNum = null) : this.parchasePartNum
|
||||||
row && row.机床流水号 ? this.machineValue = row.机床流水号 : this.machineValue
|
row && row.机床流水号 ? this.machineValue = row.机床流水号 : this.machineValue
|
||||||
row && row.组件流水号 ? this.groupNumValue = row.组件流水号 : this.groupNumValue
|
row && row.组件流水号 ? this.groupNumValue = row.组件流水号 : this.groupNumValue
|
||||||
row && row.总数量 ? this.outNumber = row.总数量 : this.outNumber
|
row && row.总数量 ? this.outNumber = row.总数量 : this.outNumber
|
||||||
if (this.materialNum) {
|
if (this.materialNum) {
|
||||||
searchStockNumber(this.materialNum).then(res => {
|
searchStockNumber1(this.materialNum).then(res => {
|
||||||
this.StockNumberTable = res.data
|
this.StockNumberTable = res.data
|
||||||
})
|
})
|
||||||
} else if (this.basePartNum) {
|
} else if (this.basePartNum) {
|
||||||
console.log(this.basePartNum)
|
searchStockNumber2(this.basePartNum).then(res => {
|
||||||
|
this.StockNumberTable = res.data
|
||||||
|
})
|
||||||
|
} else if (this.purchaseBillNum) {
|
||||||
|
searchStockNumber3(this.purchaseBillNum).then(res => {
|
||||||
|
this.StockNumberTable = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 出库
|
// 出库
|
||||||
outStore(row) {
|
outStore(row) {
|
||||||
console.log(this.form1.machineValue, this.form1.groupNumValue, row, this.id)
|
|
||||||
if (this.$refs['form1'] !== undefined) {
|
if (this.$refs['form1'] !== undefined) {
|
||||||
this.$refs['form1'].resetFields()
|
this.$refs['form1'].resetFields()
|
||||||
}
|
}
|
||||||
this.form1.machineValue = this.machineValue
|
this.form1.machineValue = this.machineValue
|
||||||
this.locationNum = row.货位流水号
|
this.locationNum = row.货位流水号
|
||||||
this.form1.outNumber = this.outNumber
|
this.outNumber > row.货位存量 ? (this.form1.outNumber = row.货位存量, this.form1.outNumberMax = row.货位存量) : (this.form1.outNumber = this.outNumber, this.form1.outNumberMax = this.outNumber) // 货位存量和领料数量对比取小
|
||||||
this.form1.personValue = Number(this.id)
|
this.form1.personValue = Number(this.id)
|
||||||
this.group = []
|
this.group = []
|
||||||
this.form1.groupNumValue = ''
|
this.form1.groupNumValue = ''
|
||||||
@@ -378,9 +386,8 @@ export default {
|
|||||||
this.$refs['form1'].validate((valid) => {
|
this.$refs['form1'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
|
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
|
||||||
// 物料流水号,货位流水号,出库数量 => 剪掉货位物料数
|
// 物料流水号,货位流水号,出库数量 => 减掉货位物料数
|
||||||
console.log(this.materialNum, this.locationNum)
|
submitOutStore(this.materialNum, this.locationNum, this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum, this.purchaseBillNum).then(response => {
|
||||||
submitOutStore(this.materialNum, this.locationNum, this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum).then(response => {
|
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('出库成功')
|
this.$message.success('出库成功')
|
||||||
this.dialogFormVisible1 = false
|
this.dialogFormVisible1 = false
|
||||||
@@ -402,7 +409,6 @@ export default {
|
|||||||
this.form2.reason = ''
|
this.form2.reason = ''
|
||||||
this.form2.物料流水号 = row.物料流水号
|
this.form2.物料流水号 = row.物料流水号
|
||||||
this.form2.基本件流水号 = row.基本件流水号
|
this.form2.基本件流水号 = row.基本件流水号
|
||||||
this.form2.仓库流水号 = row.仓库流水号
|
|
||||||
this.form2.货位流水号 = row.货位流水号
|
this.form2.货位流水号 = row.货位流水号
|
||||||
this.dialogFormVisible2 = true
|
this.dialogFormVisible2 = true
|
||||||
},
|
},
|
||||||
@@ -410,9 +416,12 @@ export default {
|
|||||||
submitErrorRecord() {
|
submitErrorRecord() {
|
||||||
this.$refs['form2'].validate((valid) => {
|
this.$refs['form2'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(this.form2.errorNumber, this.form2.reason, this.form2.物料流水号, this.form2.基本件流水号, this.form2.仓库流水号, this.form2.货位流水号)
|
errorRecord(this.form2.errorNumber, this.form2.reason, this.form2.物料流水号, this.form2.基本件流水号, this.form2.货位流水号).then(response => {
|
||||||
this.dialogFormVisible2 = false
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('记录成功')
|
this.$message.success('记录成功')
|
||||||
|
this.dialogFormVisible2 = false
|
||||||
|
} else { this.$message.error('操作失败') }
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,44 +20,20 @@
|
|||||||
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||||
<span>组号:</span>
|
<span>组号:</span>
|
||||||
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||||
<span>年:</span>
|
<el-button type="success" icon="el-icon-search" size="small" style="margin-top: 15px;margin-left: 10px" @click="total=0;pageSize=10;pageCurrent=1;searchData();searchTable()">查询</el-button>
|
||||||
<el-date-picker
|
|
||||||
v-model="year"
|
|
||||||
type="year"
|
|
||||||
size="small"
|
|
||||||
format="yyyy"
|
|
||||||
value-format="yyyy"
|
|
||||||
placeholder="选择年"/>
|
|
||||||
<span>月:</span>
|
|
||||||
<el-select v-model="month" placeholder="选择月" size="small" clearable style="width:180px">
|
|
||||||
<el-option
|
|
||||||
v-for="item in monthes"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
<span>入库时间:</span>
|
|
||||||
<el-date-picker
|
|
||||||
v-model="time"
|
|
||||||
type="date"
|
|
||||||
size="small"
|
|
||||||
style="margin-top: 20px;width: 200px"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择日期"/>
|
|
||||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-top: 15px;margin-left: 10px" @click="total=0;pageSize=10;pageCurrent=1;searchData()">查询</el-button>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
|
<h3 style="text-align: center;">车间生产</h3>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
style="width: 100%;max-height: 600px"
|
style="width: 100%"
|
||||||
height="400"
|
height="400"
|
||||||
|
size="mini"
|
||||||
show-summary
|
show-summary
|
||||||
highlight-current-row
|
border
|
||||||
border>
|
stripe>
|
||||||
<el-table-column align="center" label="序号" type="index" width="60"/>
|
|
||||||
<el-table-column align="center" label="零件图号">
|
<el-table-column align="center" label="零件图号">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件图号 }}
|
{{ scope.row.零件图号 }}
|
||||||
@@ -111,105 +87,188 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<h3 style="text-align: center;">采购部采购</h3>
|
||||||
:data="tableDataPurchase"
|
<el-tabs v-model="PartType" type="border-card" @tab-click="searchTable()">
|
||||||
border
|
<el-tab-pane label="标准件" name="标准件">
|
||||||
style="width: 100%;"
|
<el-table :data="tableData00" size="mini" height="400px" border stripe>
|
||||||
height="400">
|
<el-table-column align="center" label="机床图号">
|
||||||
<el-table-column
|
<template slot-scope="scope">
|
||||||
label="序号"
|
{{ scope.row.机床图号 }}
|
||||||
align="center"
|
</template>
|
||||||
type="index"
|
</el-table-column>
|
||||||
width="50"/>
|
<el-table-column align="center" label="组号">
|
||||||
<el-table-column label="物料名称" align="center" min-width="80">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.组号 }}
|
||||||
{{ scope.row.物料名称 }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column align="center" label="名称">
|
||||||
<el-table-column label="物料规格" align="center" min-width="80">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.物料名称 }}
|
||||||
{{ scope.row.物料规格 }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column align="center" label="型号">
|
||||||
<el-table-column label="物料型号" align="center" min-width="80">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.物料型号 }}
|
||||||
{{ scope.row.物料型号 }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column align="center" label="规格">
|
||||||
<el-table-column label="项目名称" align="center" min-width="80">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.物料规格 }}
|
||||||
{{ scope.row.项目名称 }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column align="center" label="技术下达数量">
|
||||||
<el-table-column label="机床图号" align="center" min-width="80">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.零件数量 || '—' }}
|
||||||
{{ scope.row.机床图号 }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column align="center" label="合同采购数量">
|
||||||
<el-table-column label="组号" align="center" min-width="80">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || scope.row.离线采购数量 || '—' }}
|
||||||
{{ scope.row.组号 }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column align="center" label="到货数量">
|
||||||
<el-table-column label="零件数量" align="center" min-width="80">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
|
||||||
{{ scope.row.数量 }}
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table>
|
||||||
<el-table-column label="到货数量" align="center" min-width="80">
|
<div class="block">
|
||||||
<template slot-scope="scope">
|
<el-pagination
|
||||||
{{ scope.row.实际到货数量 }}
|
:current-page="pageCurrent00"
|
||||||
</template>
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
</el-table-column>
|
:page-size="pageSize00"
|
||||||
<el-table-column label="到货时间" align="center" min-width="80">
|
:total="total00"
|
||||||
<template slot-scope="scope">
|
style="margin-top:10px;display:inline-block;width:50%"
|
||||||
{{ scope.row.到货时间 }}
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
</template>
|
@size-change="handleSizeChange00"
|
||||||
</el-table-column>
|
@current-change="handleCurrentChange00"/>
|
||||||
</el-table>
|
</div>
|
||||||
<div class="block" style="margin-top: 10px;">
|
</el-tab-pane>
|
||||||
<el-pagination
|
<el-tab-pane label="外购件" name="外购件">
|
||||||
:current-page="pageCurrent4"
|
<el-table :data="tableData01" size="mini" height="400px" border stripe>
|
||||||
:page-sizes="[10, 20, 30, 40]"
|
<el-table-column align="center" label="机床图号">
|
||||||
:page-size="pageSize4"
|
<template slot-scope="scope">
|
||||||
:total="total4"
|
{{ scope.row.机床图号 }}
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
</template>
|
||||||
@size-change="handleSizeChange4"
|
</el-table-column>
|
||||||
@current-change="handleCurrentChange4"/>
|
<el-table-column align="center" label="组号">
|
||||||
</div>
|
<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">
|
||||||
|
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || scope.row.离线采购数量 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="到货数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent01"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="pageSize01"
|
||||||
|
:total="total01"
|
||||||
|
style="margin-top:10px;display:inline-block;width:50%"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange01"
|
||||||
|
@current-change="handleCurrentChange01"/>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="基本件" name="基本件">
|
||||||
|
<el-table :data="tableData02" size="mini" height="400px" border stripe>
|
||||||
|
<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="技术下达数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.零件数量 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="采购数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="到货数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent02"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="pageSize02"
|
||||||
|
:total="total02"
|
||||||
|
style="margin-top:10px;display:inline-block;width:50%"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange02"
|
||||||
|
@current-change="handleCurrentChange02"/>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
|
<h3 style="text-align: center;">制造部采购</h3>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData1"
|
:data="tableData1"
|
||||||
border
|
border
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
height="400">
|
height="400">
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
align="center"
|
|
||||||
type="index"
|
|
||||||
width="50"/>
|
|
||||||
<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="80">
|
|
||||||
<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="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.项目名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="机床图号" align="center" min-width="80">
|
<el-table-column label="机床图号" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.机床图号 }}
|
{{ scope.row.机床图号 }}
|
||||||
@@ -220,19 +279,29 @@
|
|||||||
{{ scope.row.组号 }}
|
{{ scope.row.组号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="80">
|
||||||
|
<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="80">
|
<el-table-column label="零件数量" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.货位存量 }}
|
{{ scope.row.零件数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件类型" align="center" min-width="80">
|
<el-table-column label="已到货数量" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.类型名称 }}
|
{{ scope.row.已到货数量 }}
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="入库时间" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.入库时间 }}
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -400,7 +469,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1, processingStatus, searchTable22 } from '@/api/ManufacturingCenter/GroupMatching'
|
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1, processingStatus, searchTable22, searchTable01, searchTable02 } from '@/api/ManufacturingCenter/GroupMatching'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -414,6 +483,13 @@ export default {
|
|||||||
groupNum: null, // 组件流水号
|
groupNum: null, // 组件流水号
|
||||||
partNumber: '', // 零件号
|
partNumber: '', // 零件号
|
||||||
num: null,
|
num: null,
|
||||||
|
PartType: '标准件',
|
||||||
|
pageCurrent00: 1,
|
||||||
|
pageSize00: 10,
|
||||||
|
pageCurrent01: 1,
|
||||||
|
pageSize01: 10,
|
||||||
|
pageCurrent02: 1,
|
||||||
|
pageSize02: 10,
|
||||||
pageCurrent: 1,
|
pageCurrent: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageCurrent1: 1,
|
pageCurrent1: 1,
|
||||||
@@ -429,9 +505,15 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
tableData1: [],
|
tableData1: [],
|
||||||
tableData5: [],
|
tableData5: [],
|
||||||
|
tableData00: [],
|
||||||
|
tableData01: [],
|
||||||
|
tableData02: [],
|
||||||
state: null,
|
state: null,
|
||||||
listLoading1: false,
|
listLoading1: false,
|
||||||
listLoading2: false,
|
listLoading2: false,
|
||||||
|
total00: 0,
|
||||||
|
total01: 0,
|
||||||
|
total02: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
total1: 0,
|
total1: 0,
|
||||||
total2: 0,
|
total2: 0,
|
||||||
@@ -518,22 +600,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.check2 = 0
|
this.check2 = 0
|
||||||
}
|
}
|
||||||
if (this.year !== null && this.year !== '') {
|
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.pageCurrent, this.pageSize).then(response => {
|
||||||
this.check3 = 1
|
|
||||||
} else {
|
|
||||||
this.check3 = 0
|
|
||||||
}
|
|
||||||
if (this.month !== null && this.month !== '') {
|
|
||||||
this.check4 = 1
|
|
||||||
} else {
|
|
||||||
this.check4 = 0
|
|
||||||
}
|
|
||||||
if (this.time !== '' && this.time !== null) {
|
|
||||||
this.check5 = 1
|
|
||||||
} else {
|
|
||||||
this.check5 = 0
|
|
||||||
}
|
|
||||||
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
|
||||||
for (let i = 0; i < response.data.rows.length; i++) {
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
if (response.data.rows[i].入库时间 !== '') {
|
if (response.data.rows[i].入库时间 !== '') {
|
||||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||||
@@ -563,7 +630,7 @@ export default {
|
|||||||
this.tableDataPurchase = response.data.rows
|
this.tableDataPurchase = response.data.rows
|
||||||
this.total4 = parseInt(response.data.total)
|
this.total4 = parseInt(response.data.total)
|
||||||
})
|
})
|
||||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.pageCurrent, this.pageSize).then(response => {
|
||||||
this.tableData1 = response.data.rows
|
this.tableData1 = response.data.rows
|
||||||
this.total5 = parseInt(response.data.total)
|
this.total5 = parseInt(response.data.total)
|
||||||
})
|
})
|
||||||
@@ -647,6 +714,44 @@ export default {
|
|||||||
this.groupNumber = this.groupNumber1
|
this.groupNumber = this.groupNumber1
|
||||||
this.dialogFormVisible3 = false
|
this.dialogFormVisible3 = false
|
||||||
},
|
},
|
||||||
|
searchTable() {
|
||||||
|
if (this.PartType === '标准件') {
|
||||||
|
this.searchTable0()
|
||||||
|
} else if (this.PartType === '外购件') {
|
||||||
|
this.searchTable1()
|
||||||
|
} else if (this.PartType === '基本件') {
|
||||||
|
this.searchTable2()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchTable0() { // 查询标准件
|
||||||
|
let check1, check2
|
||||||
|
this.machine ? check1 = 1 : check1 = 0
|
||||||
|
this.groupNum ? check2 = 1 : check2 = 0
|
||||||
|
searchTable01(check1, this.machine, check2, this.groupNum, this.pageCurrent00, this.pageSize00, 1).then(response => {
|
||||||
|
this.tableData00 = response.data.rows
|
||||||
|
this.total00 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchTable1() { // 查询外购件
|
||||||
|
let check1, check2, check3
|
||||||
|
this.machine ? check1 = 1 : check1 = 0
|
||||||
|
this.groupNum ? check2 = 1 : check2 = 0
|
||||||
|
this.entryNameValue ? check3 = 1 : check3 = 0
|
||||||
|
searchTable01(check3, this.entryNameValue, check1, this.machine, check2, this.groupNum, this.pageCurrent01, this.pageSize01, 2).then(response => {
|
||||||
|
this.tableData01 = response.data.rows
|
||||||
|
this.total01 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchTable2() { // 查询基本件
|
||||||
|
let check1, check2, check3
|
||||||
|
this.machine ? check1 = 1 : check1 = 0
|
||||||
|
this.groupNum ? check2 = 1 : check2 = 0
|
||||||
|
this.entryNameValue ? check3 = 1 : check3 = 0
|
||||||
|
searchTable02(check3, this.entryNameValue, check1, this.machine, check2, this.groupNum, this.pageCurrent02, this.pageSize02).then(response => {
|
||||||
|
this.tableData02 = response.data.rows
|
||||||
|
this.total02 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageCurrent = 1
|
this.pageCurrent = 1
|
||||||
this.pageSize = val
|
this.pageSize = val
|
||||||
@@ -946,6 +1051,33 @@ export default {
|
|||||||
this.$message.warning('请先选择项目')
|
this.$message.warning('请先选择项目')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleSizeChange00(val) {
|
||||||
|
this.pageCurrent00 = 1
|
||||||
|
this.pageSize00 = val
|
||||||
|
this.searchTable0()
|
||||||
|
},
|
||||||
|
handleCurrentChange00(val) {
|
||||||
|
this.pageCurrent00 = val
|
||||||
|
this.searchTable0()
|
||||||
|
},
|
||||||
|
handleSizeChange01(val) {
|
||||||
|
this.pageCurrent01 = 1
|
||||||
|
this.pageSize01 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
handleCurrentChange01(val) {
|
||||||
|
this.pageCurrent01 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
handleSizeChange02(val) {
|
||||||
|
this.pageCurrent02 = 1
|
||||||
|
this.pageSize02 = val
|
||||||
|
this.searchTable2()
|
||||||
|
},
|
||||||
|
handleCurrentChange02(val) {
|
||||||
|
this.pageCurrent02 = val
|
||||||
|
this.searchTable2()
|
||||||
|
},
|
||||||
getSummaries(param) {
|
getSummaries(param) {
|
||||||
const { columns } = param
|
const { columns } = param
|
||||||
const sums = []
|
const sums = []
|
||||||
|
|||||||
@@ -391,11 +391,11 @@ export default {
|
|||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
if (!this.Group) {
|
if (!this.Machine) {
|
||||||
this.$message.warning('请选择分组')
|
this.$message.warning('请选择机床')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
getExport(this.Group).then(res => {
|
getExport(this.Machine).then(res => {
|
||||||
console.log(res.data)
|
console.log(res.data)
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
const tHeader = ['机床', '组号', '图号及规格', '制品名称', '计划数', '材料', '当前工序名']
|
const tHeader = ['机床', '组号', '图号及规格', '制品名称', '计划数', '材料', '当前工序名']
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
@click="pageCurrent11=1;pageSize11=10;total11=0;searchTable11()">查询</el-button>
|
@click="pageCurrent11=1;pageSize11=150;total11=0;searchTable11()">查询</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
@click="pageCurrent12=1;pageSize12=10;total12=0;searchTable12()">查询</el-button>
|
@click="pageCurrent12=1;pageSize12=150;total12=0;searchTable12()">查询</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -877,11 +877,11 @@ export default {
|
|||||||
tableData11: [], // 外购件列表
|
tableData11: [], // 外购件列表
|
||||||
total11: 0,
|
total11: 0,
|
||||||
pageCurrent11: 1,
|
pageCurrent11: 1,
|
||||||
pageSize11: 10,
|
pageSize11: 150,
|
||||||
tableData12: [], // 基本件列表
|
tableData12: [], // 基本件列表
|
||||||
total12: 0,
|
total12: 0,
|
||||||
pageCurrent12: 1,
|
pageCurrent12: 1,
|
||||||
pageSize12: 10,
|
pageSize12: 150,
|
||||||
remarkFilters: [],
|
remarkFilters: [],
|
||||||
supplierFilters: [],
|
supplierFilters: [],
|
||||||
tableData2: [], // 询价单列表
|
tableData2: [], // 询价单列表
|
||||||
|
|||||||
@@ -518,11 +518,10 @@ export default {
|
|||||||
<tbody id="tbody">
|
<tbody id="tbody">
|
||||||
<tr id="tableHead">
|
<tr id="tableHead">
|
||||||
<td>序号</td>
|
<td>序号</td>
|
||||||
<td>产品名称</td>
|
<td>机床号-组号</td>
|
||||||
<td>产品规格型号</td>
|
|
||||||
<td>图号</td>
|
|
||||||
<td>名称</td>
|
<td>名称</td>
|
||||||
<td>规格型号</td>
|
<td>图号或型号</td>
|
||||||
|
<td>规格</td>
|
||||||
<td>数量</td>
|
<td>数量</td>
|
||||||
<td>单位</td>
|
<td>单位</td>
|
||||||
<td>单价</td>
|
<td>单价</td>
|
||||||
@@ -572,6 +571,8 @@ export default {
|
|||||||
const merge = []
|
const merge = []
|
||||||
this.tableData1.map(v => {
|
this.tableData1.map(v => {
|
||||||
merge.push({
|
merge.push({
|
||||||
|
机床图号: v.机床图号,
|
||||||
|
组号: v.组号,
|
||||||
图号: v.图号,
|
图号: v.图号,
|
||||||
名称: v.名称,
|
名称: v.名称,
|
||||||
规格: v.规格,
|
规格: v.规格,
|
||||||
@@ -584,18 +585,13 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
let mergeData = []
|
let mergeData = []
|
||||||
mergeData = groupBy(merge, ['图号', '名称', '规格', '计量单位', '单价', '合计', '交货期', '备注'], (mergeData, v) => {
|
mergeData = groupBy(merge, ['图号', '名称', '规格', '计量单位', '单价', '合计', '交货期', '备注'])
|
||||||
mergeData = mergeData || 0
|
|
||||||
mergeData += v.数量
|
|
||||||
return mergeData
|
|
||||||
})
|
|
||||||
console.log(mergeData)
|
|
||||||
// 放入新数据
|
// 放入新数据
|
||||||
const tr = []
|
const tr = []
|
||||||
for (let i = 0; i < mergeData.length; i++) {
|
for (let i = 0; i < mergeData.length; i++) {
|
||||||
tr[i] = document.createElement('tr')
|
tr[i] = document.createElement('tr')
|
||||||
tr[i].setAttribute('class', 'tableData')
|
tr[i].setAttribute('class', 'tableData')
|
||||||
tr[i].innerHTML = '<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>'
|
tr[i].innerHTML = '<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>'
|
||||||
const tableHead = $('#tableHead')
|
const tableHead = $('#tableHead')
|
||||||
tableHead ? tableHead.after(tr[i]) : ''
|
tableHead ? tableHead.after(tr[i]) : ''
|
||||||
}
|
}
|
||||||
@@ -610,15 +606,16 @@ export default {
|
|||||||
for (let j = 0; j < mergeData.length; j++) {
|
for (let j = 0; j < mergeData.length; j++) {
|
||||||
if (document.getElementsByClassName('tableData')[j]) {
|
if (document.getElementsByClassName('tableData')[j]) {
|
||||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
|
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
|
||||||
|
document.getElementsByClassName('tableData')[j].children[1].innerHTML = mergeData[j].机床图号_组号
|
||||||
|
document.getElementsByClassName('tableData')[j].children[2].innerHTML = mergeData[j].名称
|
||||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = mergeData[j].图号
|
document.getElementsByClassName('tableData')[j].children[3].innerHTML = mergeData[j].图号
|
||||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = mergeData[j].名称
|
document.getElementsByClassName('tableData')[j].children[4].innerHTML = mergeData[j].规格
|
||||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = mergeData[j].规格
|
document.getElementsByClassName('tableData')[j].children[5].innerHTML = mergeData[j].数量
|
||||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = mergeData[j].数量
|
document.getElementsByClassName('tableData')[j].children[6].innerHTML = mergeData[j].计量单位
|
||||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = mergeData[j].计量单位
|
document.getElementsByClassName('tableData')[j].children[7].innerHTML = mergeData[j].单价
|
||||||
document.getElementsByClassName('tableData')[j].children[8].innerHTML = mergeData[j].单价
|
document.getElementsByClassName('tableData')[j].children[8].innerHTML = (Number(mergeData[j].数量) * Number(mergeData[j].单价)).toFixed(2)
|
||||||
document.getElementsByClassName('tableData')[j].children[9].innerHTML = (Number(mergeData[j].数量) * Number(mergeData[j].单价)).toFixed(2)
|
document.getElementsByClassName('tableData')[j].children[9].innerHTML = mergeData[j].交货期
|
||||||
document.getElementsByClassName('tableData')[j].children[10].innerHTML = mergeData[j].交货期
|
document.getElementsByClassName('tableData')[j].children[10].innerHTML = mergeData[j].备注
|
||||||
document.getElementsByClassName('tableData')[j].children[11].innerHTML = mergeData[j].备注
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.actualTotal = this.actualTotal.toFixed(2)
|
this.actualTotal = this.actualTotal.toFixed(2)
|
||||||
@@ -669,7 +666,7 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content).then(response => {
|
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content, this.taxRate * 100).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('合同生成成功')
|
this.$message.success('合同生成成功')
|
||||||
this.reload()
|
this.reload()
|
||||||
|
|||||||
@@ -344,6 +344,17 @@
|
|||||||
@current-change="handleCurrentChange2"/>
|
@current-change="handleCurrentChange2"/>
|
||||||
<el-button :disabled="disable" type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
|
<el-button :disabled="disable" type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
|
||||||
<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
|
<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
|
||||||
|
<el-tooltip :content="hasTax" placement="top">
|
||||||
|
<el-switch
|
||||||
|
v-model="hasTax"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-value="含税"
|
||||||
|
inactive-value="未税"
|
||||||
|
style="margin: 3px;float:right"/>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-input v-model="taxRate" style="float:right;width:100px" placeholder="税率" size="mini"/>
|
||||||
|
<h4 style="float:right;width: 40px;margin: 5px">税率:</h4>
|
||||||
</div>
|
</div>
|
||||||
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
||||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||||
@@ -381,14 +392,26 @@
|
|||||||
{{ scope.row.参考价格 }}
|
{{ scope.row.参考价格 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单价" align="center" min-width="100" prop="单价">
|
<el-table-column label="单价(未税)" align="center" min-width="100" prop="单价">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.单价" :disabled="disable" size="mini" style="width:70px"/>
|
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" :disabled="disable" size="mini" style="width:70px"/>
|
||||||
|
<b v-show="hasTax!=='未税'">{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}</b>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
<el-table-column label="单价(含税)" align="center" min-width="100" prop="单价">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ (Number(scope.row.单价||0) * Number(scope.row.数量||0)).toFixed(2) }}
|
<el-input v-show="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:70px"/>
|
||||||
|
<b v-show="hasTax!=='含税'">{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}</b>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总额(未税)" align="center" min-width="100" prop="合计">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ hasTax==='未税' ? scope.row.未税总额 = (Number(scope.row.数量) * Number(scope.row.未税单价)).toFixed(2) : scope.row.未税总额 = (scope.row.含税总额 / (1+taxRate)).toFixed(2) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总额(含税)" align="center" min-width="100" prop="合计">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ hasTax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
||||||
@@ -669,6 +692,8 @@ export default {
|
|||||||
name: '', // 离线合同
|
name: '', // 离线合同
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
hasTax: '含税',
|
||||||
|
taxRate: 0.13,
|
||||||
source: [
|
source: [
|
||||||
{
|
{
|
||||||
text: 'BZ',
|
text: 'BZ',
|
||||||
@@ -1052,7 +1077,10 @@ export default {
|
|||||||
searchMateriel(this.offlineContractNum).then(response => {
|
searchMateriel(this.offlineContractNum).then(response => {
|
||||||
this.tableData3 = response.data
|
this.tableData3 = response.data
|
||||||
this.tableData3.map(v => {
|
this.tableData3.map(v => {
|
||||||
|
this.$set(v, '未税总额', 0)
|
||||||
|
this.$set(v, '含税总额', 0)
|
||||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||||
|
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else { this.$message.error('数据占用,删除失败') }
|
} else { this.$message.error('数据占用,删除失败') }
|
||||||
@@ -1124,7 +1152,10 @@ export default {
|
|||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
this.tableData3 = response.data
|
this.tableData3 = response.data
|
||||||
this.tableData3.map(v => {
|
this.tableData3.map(v => {
|
||||||
|
this.$set(v, '未税总额', 0)
|
||||||
|
this.$set(v, '含税总额', 0)
|
||||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||||
|
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
Number(row.离线合同状态) !== 1 ? this.disable = true : this.disable = false // 是否为编辑模式
|
Number(row.离线合同状态) !== 1 ? this.disable = true : this.disable = false // 是否为编辑模式
|
||||||
@@ -1135,8 +1166,23 @@ export default {
|
|||||||
columns.forEach((column, index) => {
|
columns.forEach((column, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
sums[index] = '总价'
|
sums[index] = '总价'
|
||||||
} else if (index === 7) {
|
} else if (index === 9) {
|
||||||
const values = data.map(item => Number(Number(item['单价']) * Number(item['数量'])))
|
const values = data.map(item => Number(item['未税总额']))
|
||||||
|
if (!values.every(value => isNaN(value))) {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return Number((prev + curr).toFixed(2))
|
||||||
|
} else {
|
||||||
|
return Number((prev).toFixed(2))
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
sums[index] += ' 元'
|
||||||
|
} else {
|
||||||
|
sums[index] = 'N/A'
|
||||||
|
}
|
||||||
|
} else if (index === 10) {
|
||||||
|
const values = data.map(item => Number(item['含税总额']))
|
||||||
if (!values.every(value => isNaN(value))) {
|
if (!values.every(value => isNaN(value))) {
|
||||||
sums[index] = values.reduce((prev, curr) => {
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
const value = Number(curr)
|
const value = Number(curr)
|
||||||
@@ -1168,7 +1214,10 @@ export default {
|
|||||||
searchMateriel(this.offlineContractNum).then(response => {
|
searchMateriel(this.offlineContractNum).then(response => {
|
||||||
this.tableData3 = response.data
|
this.tableData3 = response.data
|
||||||
this.tableData3.map(v => {
|
this.tableData3.map(v => {
|
||||||
|
this.$set(v, '未税总额', 0)
|
||||||
|
this.$set(v, '含税总额', 0)
|
||||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||||
|
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else { this.$message.error('选入失败') }
|
} else { this.$message.error('选入失败') }
|
||||||
@@ -1187,7 +1236,10 @@ export default {
|
|||||||
searchMateriel(this.offlineContractNum).then(response => {
|
searchMateriel(this.offlineContractNum).then(response => {
|
||||||
this.tableData3 = response.data
|
this.tableData3 = response.data
|
||||||
this.tableData3.map(v => {
|
this.tableData3.map(v => {
|
||||||
|
this.$set(v, '未税总额', 0)
|
||||||
|
this.$set(v, '含税总额', 0)
|
||||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||||
|
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else { this.$message.error('移除失败') }
|
} else { this.$message.error('移除失败') }
|
||||||
@@ -1215,18 +1267,21 @@ export default {
|
|||||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||||
this.numGroup.push(this.tableData3[i].数量)
|
this.numGroup.push(this.tableData3[i].数量)
|
||||||
this.priceGroup.push(this.tableData3[i].单价)
|
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
|
||||||
dateGroup.push(this.tableData3[i].交货期要求)
|
dateGroup.push(this.tableData3[i].交货期要求)
|
||||||
remarkGroup.push(this.tableData3[i].备注)
|
remarkGroup.push(this.tableData3[i].备注)
|
||||||
}
|
}
|
||||||
saveOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup).then(response => {
|
saveOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('离线合同保存成功')
|
this.$message.success('离线合同保存成功')
|
||||||
this.searchTable2()
|
this.searchTable2()
|
||||||
searchMateriel(this.offlineContractNum).then(response => {
|
searchMateriel(this.offlineContractNum).then(response => {
|
||||||
this.tableData3 = response.data
|
this.tableData3 = response.data
|
||||||
this.tableData3.map(v => {
|
this.tableData3.map(v => {
|
||||||
|
this.$set(v, '未税总额', 0)
|
||||||
|
this.$set(v, '含税总额', 0)
|
||||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||||
|
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else { this.$message.error('离线合同保存失败') }
|
} else { this.$message.error('离线合同保存失败') }
|
||||||
@@ -1254,18 +1309,21 @@ export default {
|
|||||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||||
this.numGroup.push(this.tableData3[i].数量)
|
this.numGroup.push(this.tableData3[i].数量)
|
||||||
this.priceGroup.push(this.tableData3[i].单价)
|
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
|
||||||
dateGroup.push(this.tableData3[i].交货期要求)
|
dateGroup.push(this.tableData3[i].交货期要求)
|
||||||
remarkGroup.push(this.tableData3[i].备注)
|
remarkGroup.push(this.tableData3[i].备注)
|
||||||
}
|
}
|
||||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup).then(response => {
|
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('离线合同生成成功')
|
this.$message.success('离线合同生成成功')
|
||||||
this.searchTable2()
|
this.searchTable2()
|
||||||
searchMateriel(this.offlineContractNum).then(response => {
|
searchMateriel(this.offlineContractNum).then(response => {
|
||||||
this.tableData3 = response.data
|
this.tableData3 = response.data
|
||||||
this.tableData3.map(v => {
|
this.tableData3.map(v => {
|
||||||
|
this.$set(v, '未税总额', 0)
|
||||||
|
this.$set(v, '含税总额', 0)
|
||||||
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
!v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||||
|
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||||
})
|
})
|
||||||
this.disable = true // 是否为编辑模式
|
this.disable = true // 是否为编辑模式
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -194,10 +194,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 在什么情况下需要查询上传的附件,调用this.getFileData()即可根据
|
// 在什么情况下需要查询上传的附件,调用this.getFileData()即可根据
|
||||||
getFileData(machineDrawValue) {
|
getFileData(machineDrawValue) {
|
||||||
console.log(machineDrawValue, 88)
|
|
||||||
this.hadFile = []
|
this.hadFile = []
|
||||||
getFileData(machineDrawValue).then(res => {
|
getFileData(machineDrawValue).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
res.data.map(item => {
|
res.data.map(item => {
|
||||||
this.hadFile.push({
|
this.hadFile.push({
|
||||||
@@ -492,4 +490,5 @@ a{
|
|||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #999;
|
color: #999;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -30,6 +30,22 @@
|
|||||||
|
|
||||||
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData()">查询</el-button>
|
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData()">查询</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<div v-for="(file, key) in hadFile" :key="key">
|
||||||
|
<div class="wrapper">
|
||||||
|
<div class="content">
|
||||||
|
<div class="action"/>
|
||||||
|
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||||
|
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||||
|
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||||
|
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||||
|
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||||
|
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||||
|
<a :href="file.url" target="view_window"><div class="info">{{ file.name }}</div></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
@@ -225,8 +241,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { projectSelect, machineSelect, groupSelect, basicPartsData, deleteBasicParts, purchasePartsData, deletePurchaseData } from '@/api/TechnologyCenter/QueryParts'
|
import { projectSelect, machineSelect, groupSelect, basicPartsData, deleteBasicParts, purchasePartsData, deletePurchaseData, getFileData } from '@/api/TechnologyCenter/QueryParts'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import { ServerIP } from '@/utils/request'
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
data() {
|
data() {
|
||||||
@@ -246,7 +263,8 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageCurrentWB: 1,
|
pageCurrentWB: 1,
|
||||||
pageSizeWB: 10,
|
pageSizeWB: 10,
|
||||||
totalWB: 0
|
totalWB: 0,
|
||||||
|
hadFile: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -309,6 +327,22 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 在什么情况下需要查询上传的附件,调用this.getFileData()即可根据
|
||||||
|
getFileData(machineValue) {
|
||||||
|
this.hadFile = []
|
||||||
|
getFileData(machineValue).then(res => {
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
res.data.map(item => {
|
||||||
|
this.hadFile.push({
|
||||||
|
url: `${ServerIP}${item.文件标识}.${item.文件后缀}`,
|
||||||
|
name: `${item.文件名称}.${item.文件后缀}`,
|
||||||
|
suffix: item.文件后缀,
|
||||||
|
id: item.文件标识
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.getSelect(projectSelect, ['项目名称', '项目流水号'], 'project')
|
this.getSelect(projectSelect, ['项目名称', '项目流水号'], 'project')
|
||||||
},
|
},
|
||||||
@@ -319,6 +353,8 @@ export default {
|
|||||||
this.getSelect(groupSelect, ['组号', '组件流水号'], 'group', val)
|
this.getSelect(groupSelect, ['组号', '组件流水号'], 'group', val)
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
this.getFileData(this.machineValue)
|
||||||
|
console.log(this.hadFile, 88899)
|
||||||
const project_check = this.projectValue ? 1 : 0
|
const project_check = this.projectValue ? 1 : 0
|
||||||
const machine_check = this.machineValue ? 1 : 0
|
const machine_check = this.machineValue ? 1 : 0
|
||||||
const group_check = this.groupValue ? 1 : 0
|
const group_check = this.groupValue ? 1 : 0
|
||||||
@@ -388,4 +424,49 @@ export default {
|
|||||||
span{
|
span{
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
|
.wrapper{
|
||||||
|
width: 225px;
|
||||||
|
height: 50px;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #b8c7d9;
|
||||||
|
float: left;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
position: relative;
|
||||||
|
padding: 8px 8px 0 8px;
|
||||||
|
}
|
||||||
|
.action{
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
right: 8px;
|
||||||
|
}
|
||||||
|
.delete{
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #0f84b0;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.delete:hover{
|
||||||
|
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 7px;
|
||||||
|
margin-top: 2px;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
position: absolute;
|
||||||
|
left: 44px;
|
||||||
|
line-height: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user