刘璐珈
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// var postData
|
||||
// 初始化人员
|
||||
export function initPickPerson() {
|
||||
return request({
|
||||
@@ -30,6 +30,8 @@ export function initMachineProject() {
|
||||
}
|
||||
// 组件查询
|
||||
export function searchgroup(num) {
|
||||
// postData = new URLSearchParams()
|
||||
// postData.append('param', num)
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
|
||||
@@ -308,7 +308,7 @@ export function selectBidBond() {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '投标保证金管理_投标保证金查询_新',
|
||||
name: '投标保证金管理_投标保证金查询',
|
||||
param: '保金类型_check=' + arguments[0] + '&保金类型=' + arguments[1] + '&投标人_check=' + arguments[2] + '&投标人=' + arguments[3] + '&招标企业_check=' + arguments[4] + '&招标企业=' + arguments[5] + '&开始日期_check=' + arguments[6] + '&开始日期=' + arguments[7] + '&结束日期_check=' + arguments[8] + '&结束日期=' + arguments[9]
|
||||
}
|
||||
})
|
||||
|
||||
@@ -100,7 +100,7 @@ export function changeNum(num, num1, num2, num3, num4) {
|
||||
})
|
||||
}
|
||||
// 查询分配后的标准件和外购件
|
||||
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10, check8, val11) {
|
||||
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10, check8, val11, ordername, order) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -108,14 +108,30 @@ export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'xqs_采购管理_采购部采购_查询物料_分配后_带库存_创建询价单',
|
||||
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&时间_check=${val8}&开始时间=${val9}&结束时间=${val10}&供货商_check=${check8}&供货商=${val11}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
// name: 'xqs_采购管理_采购部采购_查询物料_分配后_带库存_创建询价单',
|
||||
name: 'xqs_采购管理_采购部采购_查询物料_分配后_带库存_创建询价单_分页',
|
||||
param: `物料状态编号=${num1}=int&物料名称_check=${check1}=int&物料名称=${val1}&物料规格_check=${check2}=int&物料规格=${val2}&物料型号_check=${check3}=int&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}=int&项目流水号=${val4}&机床流水号_check=${check5}=int&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&时间_check=${val8}=int&开始时间=${val9}&结束时间=${val10}&供货商_check=${check8}=int&供货商=${val11}&排序名称=${ordername}=int&排序方式=${order}=int&PageCurrent=${pageCurrent}=int&PageSize=${pageSize}=int&PageCount=1=int=output&ItemCount=1=int=output`
|
||||
// Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// export function searchmaterial(check1, MaterialName, check2, FullNameOfMaterial, check3, MaterialSpecification, check4, MaterialModel, pageCurrent, pageSize, check5, MaterialCategoryValue, check6, MaterialVarietyValue, check7, MeasurementUnitValue, check8, MaterialSourceValue, check9, supplierValue) {
|
||||
// return request({
|
||||
// url: '',
|
||||
// method: 'post',
|
||||
// data: {
|
||||
// UserID: state.state.user.id,
|
||||
// ModularID: router.currentRoute.path,
|
||||
// type: '1',
|
||||
// name: '库存管理_物料主文件_基本_采购部_查询数据_分页',
|
||||
// param: '物料流水号_check=0&物料代码_check=0&物料名称_check=' + check1 + '=int&物料名称=' + MaterialName + '&物料全名_check=' + check2 + '=int&物料全名=' + FullNameOfMaterial + '&物料规格_check=' + check3 + '=int&物料规格=' + MaterialSpecification + '&物料型号_check=' + check4 + '=int&物料型号=' + MaterialModel + '&物料类别流水号_check=' + check5 + '=int&物料类别流水号=' + MaterialCategoryValue + '&物料品种流水号_check=' + check6 + '=int&物料品种流水号=' + MaterialVarietyValue + '&供货商流水号_check=' + check9 + '&供货商流水号=' + supplierValue + '&计量单位流水号_check=' + check7 + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号_check=' + check8 + '&物料来源流水号=' + MaterialSourceValue + '&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
// 查询分配后的基本件
|
||||
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10, check8, val11) {
|
||||
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10, check8, val11, ordername, order) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -124,8 +140,7 @@ export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, va
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_基本件_分配后_创建询价单',
|
||||
param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&时间_check=${val8}&开始时间=${val9}&结束时间=${val10}&供货商_check=${check8}&供货商=${val11}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
param: `物料状态编号=${num1}&零件图号_check=${check1}=int&零件图号=${val1}&零件名称_check=${check2}=int&零件名称=${val2}&零件规格_check=${check3}=int&零件规格=${val3}&人员编号=${person}&项目流水号_check=${check4}=int&项目流水号=${val4}&机床流水号_check=${check5}=int&机床流水号=${val5}&组件流水号_check=${check6}=int&组件流水号=${val6}&时间_check=${val8}=int&开始时间=${val9}&结束时间=${val10}&供货商_check=${check8}=int&供货商=${val11}&排序名称=${ordername}=int&排序方式=${order}=int&PageCurrent=${pageCurrent}=int&PageSize=${pageSize}=int&PageCount=1=int=output&ItemCount=1=int=output`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export function searchGroup(num) {
|
||||
})
|
||||
}
|
||||
// 初始化项目金额统计表
|
||||
export function searchReceiveCheck(check1, num1, check2, num2, check3, num3) {
|
||||
export function searchReceiveCheck(check1, num1, check2, num2, check3, num3, check4, num4, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -53,10 +53,24 @@ export function searchReceiveCheck(check1, num1, check2, num2, check3, num3) {
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '采购管理_领用核算_查询数据',
|
||||
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}`
|
||||
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}&机床号物料名称_check=${check4}&机床号物料名称=${num4}&PageCurrent=${pageCurrent}=int&PageSize=${pageSize}=int&PageCount=1=int=output&ItemCount=1=int=output`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchsum(check1, num1, check2, num2, check3, num3, check4, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '采购管理_领用核算_查询数据_合计',
|
||||
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}&机床号物料名称_check=${check4}&机床号物料名称=${num4}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 机床名称
|
||||
export function getMachines() {
|
||||
return request({
|
||||
|
||||
90
src/utils/setMethods.js
Normal file
90
src/utils/setMethods.js
Normal file
@@ -0,0 +1,90 @@
|
||||
|
||||
/**
|
||||
* Parse the time to string
|
||||
* @param {(Object|string|number)} time
|
||||
* @param {string} cFormat
|
||||
* @returns {string}
|
||||
*/
|
||||
export function parseTime(time, cFormat) {
|
||||
if (arguments.length === 0) {
|
||||
return null
|
||||
}
|
||||
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||
let date
|
||||
if (typeof time === 'object') {
|
||||
date = time
|
||||
} else {
|
||||
if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
|
||||
time = parseInt(time)
|
||||
}
|
||||
if (typeof time === 'number' && time.toString().length === 10) {
|
||||
time = time * 1000
|
||||
}
|
||||
date = new Date(time)
|
||||
}
|
||||
const formatObj = {
|
||||
y: date.getFullYear(),
|
||||
m: date.getMonth() + 1,
|
||||
d: date.getDate(),
|
||||
h: date.getHours(),
|
||||
i: date.getMinutes(),
|
||||
s: date.getSeconds(),
|
||||
a: date.getDay()
|
||||
}
|
||||
// eslint-disable-next-line
|
||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
||||
let value = formatObj[key]
|
||||
// Note: getDay() returns 0 on Sunday
|
||||
if (key === 'a') {
|
||||
return ['日', '一', '二', '三', '四', '五', '六'][value]
|
||||
}
|
||||
if (result.length > 0 && value < 10) {
|
||||
value = '0' + value
|
||||
}
|
||||
return value || 0
|
||||
})
|
||||
// eslint-disable-next-line
|
||||
return time_str
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the json to excel
|
||||
* tableJson 导出数据 ; filenames导出表的名字; autowidth表格宽度自动 true or false; bookTypes xlsx & csv & txt
|
||||
* @param {(Object)} tableJson
|
||||
* @param {string} filenames
|
||||
* @param {boolean} autowidth
|
||||
* @param {string} bookTypes
|
||||
*/
|
||||
export function json2excel(tableJson, filenames, autowidth, bookTypes) {
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
var tHeader = []
|
||||
var dataArr = []
|
||||
var sheetnames = []
|
||||
for (var i in tableJson) {
|
||||
tHeader.push(tableJson[i].tHeader)
|
||||
dataArr.push(formatJson(tableJson[i].filterVal, tableJson[i].tableDatas))
|
||||
sheetnames.push(tableJson[i].sheetName)
|
||||
}
|
||||
console.log(dataArr, 9191)
|
||||
excel.export_json_to_excel2({
|
||||
header: tHeader,
|
||||
data: dataArr,
|
||||
sheetname: sheetnames,
|
||||
filename: filenames,
|
||||
autoWidth: autowidth,
|
||||
bookType: bookTypes
|
||||
})
|
||||
})
|
||||
}
|
||||
// 数据过滤,时间过滤
|
||||
function formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v =>
|
||||
filterVal.map(j => {
|
||||
if (j === 'timestamp') {
|
||||
return parseTime(v[j])
|
||||
} else {
|
||||
return v[j]
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
103
src/vendor/Export2Excel.js
vendored
103
src/vendor/Export2Excel.js
vendored
@@ -218,3 +218,106 @@ export function export_json_to_excel({
|
||||
type: "application/octet-stream"
|
||||
}), `${filename}.${bookType}`);
|
||||
}
|
||||
|
||||
//主要修改此函数内的方法
|
||||
export function export_json_to_excel2({
|
||||
multiHeader = [],
|
||||
header,
|
||||
data,
|
||||
sheetname,
|
||||
filename,
|
||||
merges = [],
|
||||
autoWidth = true,
|
||||
bookType = "xlsx"
|
||||
} = {}) {
|
||||
/* original data */
|
||||
filename = filename || "excel-list"
|
||||
data = [...data]
|
||||
|
||||
for (var i = 0; i < header.length; i++) {
|
||||
data[i].unshift(header[i])
|
||||
}
|
||||
|
||||
// data.unshift(header)
|
||||
|
||||
for (let i = multiHeader.length - 1; i > -1; i--) {
|
||||
data.unshift(multiHeader[i])
|
||||
}
|
||||
|
||||
var ws_name = sheetname
|
||||
var wb = new Workbook(),
|
||||
ws = []
|
||||
for (var j = 0; j < header.length; j++) {
|
||||
ws.push(sheet_from_array_of_arrays(data[j]))
|
||||
}
|
||||
|
||||
if (merges.length > 0) {
|
||||
if (!ws["!merges"]) ws["!merges"] = []
|
||||
merges.forEach(item => {
|
||||
ws["!merges"].push(XLSX.utils.decode_range(item))
|
||||
})
|
||||
}
|
||||
// console.log("width", autoWidth)
|
||||
if (autoWidth) {
|
||||
/*设置worksheet每列的最大宽度*/
|
||||
var colWidth = []
|
||||
for (var k = 0; k < header.length; k++) {
|
||||
colWidth.push(
|
||||
data[k].map(row =>
|
||||
row.map(val => {
|
||||
/*先判断是否为null/undefined*/
|
||||
if (val == null) {
|
||||
return {
|
||||
wch: 10
|
||||
}
|
||||
} else if (val.toString().charCodeAt(0) > 255) {
|
||||
/*再判断是否为中文*/
|
||||
return {
|
||||
wch: val.toString().length * 2
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
wch: val.toString().length
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/*以第一行为初始值*/
|
||||
let result = []
|
||||
for (var k = 0; k < colWidth.length; k++) {
|
||||
result[k] = colWidth[k][0]
|
||||
for (let i = 1; i < colWidth[k].length; i++) {
|
||||
for (let j = 0; j < colWidth[k][i].length; j++) {
|
||||
if (result[k][j]["wch"] < colWidth[k][i][j]["wch"]) {
|
||||
result[k][j]["wch"] = colWidth[k][i][j]["wch"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分别给sheet表设置宽度
|
||||
for (var l = 0; l < result.length; l++) {
|
||||
ws[l]["!cols"] = result[l]
|
||||
}
|
||||
}
|
||||
|
||||
/* add worksheet to workbook */
|
||||
for (var k = 0; k < header.length; k++) {
|
||||
wb.SheetNames.push(ws_name[k])
|
||||
wb.Sheets[ws_name[k]] = ws[k]
|
||||
}
|
||||
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: bookType,
|
||||
bookSST: false,
|
||||
type: "binary"
|
||||
})
|
||||
saveAs(
|
||||
new Blob([s2ab(wbout)], {
|
||||
type: "application/octet-stream"
|
||||
}),
|
||||
`${filename}.${bookType}`
|
||||
)
|
||||
}
|
||||
|
||||
@@ -21,14 +21,16 @@
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<span style="margin-left: 10px">零件图号:</span>
|
||||
<el-input v-model="PartDrawingNumber" filterable placeholder="零件图号" style="width: 180px" size="small" clearable/>
|
||||
<span class="demonstration" style="margin-left: 10px">时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;margin-left: 10px"
|
||||
style="width: 240px;margin: 3px 0"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
@@ -50,18 +52,18 @@
|
||||
<!--type="date"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询备料出库记录" placement="top">
|
||||
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total=0;pageSize=40; pageCurrent=1;selecttable()">查询</el-button>
|
||||
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 15px" @click="total=0;pageSize=40; pageCurrent=1;selecttable()">查询</el-button>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 600px;margin-top: 3px" height="800px" @sort-change="sortChange">
|
||||
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 580px;margin-top: 3px" height="800px" @sort-change="sortChange">
|
||||
<!--<el-table-column label="项目名称" prop="项目名称" align="center" width="150" show-overflow-tooltip>-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.项目名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="150" show-overflow-tooltip>
|
||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="width: 58%">
|
||||
<el-card style="width: 72%">
|
||||
<div slot="header">
|
||||
<el-row>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable style="width: 120px" @change="machineChange">
|
||||
@@ -21,50 +21,50 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="Name" placeholder="物料名称、规格、型号" clearable style="width: 200px" size="small"/>
|
||||
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent0=1;pageSize0=300;pageCurrent1=1;pageSize1=300;pageCurrent2=1;pageSize2=300;pageCurrent4=1;pageSize4=20;searchTable()">查询</el-button>
|
||||
<el-switch
|
||||
v-model="PickingValue"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
style="margin-left: 5px"/>
|
||||
<span>已领用</span>
|
||||
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent0=1;pageSize0=300;pageCurrent1=1;pageSize1=300;pageCurrent2=1;pageSize2=300;pageCurrent4=1;pageSize4=20;searchTable()">查询</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-tabs v-model="PartType" type="card" @tab-click="searchTable()">
|
||||
<el-tab-pane label="标准件" name="标准件">
|
||||
<el-table ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px" height="500px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" width="130px" show-overflow-tooltip>
|
||||
<el-table ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px;width: 865px" height="500px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="43"/>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="组号" label="组号" width="80px">
|
||||
<el-table-column align="center" prop="组号" label="组号" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" width="100px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="物料名称" label="名称" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>date
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="型号" label="型号" min-width="120px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="型号" label="型号" min-width="900px" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="规格排序" label="规格" min-width="150px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="规格排序" label="规格" min-width="150px" width="150px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总数量" width="60px">
|
||||
<el-table-column align="center" label="总数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备件数" width="60px">
|
||||
<el-table-column align="center" label="备件数" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件总数量 }}
|
||||
</template>
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="外购件" name="外购件">
|
||||
<el-table ref="multipleTable" :data="tableData1" size="mini" style="max-height: 500px" height="600px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table ref="multipleTable" :data="tableData1" size="mini" style="max-height: 500px;width: 890px" height="600px" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" width="130px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已收回(万元)" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="parseInt(scope.row.是否收回) === 2" size="mini" type="success" style="width: 66px">{{ Number(scope.row.应收回金额).toFixed(2) }}</span>
|
||||
<span v-if="parseInt(scope.row.是否收回) === 2" size="mini" type="success" style="width: 66px">{{ scope.row.应收回金额 }}</span>
|
||||
<span v-else slot="reference" type="danger" size="mini" style="width: 66px">未收回</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -167,7 +167,7 @@
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="收回" placement="top" style="margin-left: 0px">
|
||||
<div style="display: inline-block">
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用||Number(scope.row.未收金额) ===0"
|
||||
:disabled="scope.row.是否禁用"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-money"
|
||||
@@ -390,10 +390,11 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
prop="投标结果公布日期"
|
||||
placeholder="请选择结果公布日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="中标服务费(万元)" prop="中标服务费">
|
||||
<el-input-number :disabled="tenderResultDisabled" v-model="Timeform.中标服务费" :precision="2" :min="0.00" style="width: 200px" size="small"/>
|
||||
<el-form-item v-if="!tenderResultDisabled" label="中标服务费(万元)" prop="中标服务费">
|
||||
<el-input-number v-model="Timeform.中标服务费" :precision="2" :min="0.00" style="width: 200px" size="small"/>
|
||||
<!--:max="tenderResultMax"-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -419,7 +420,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="转履约金额(万元)" prop="保证金金额">
|
||||
<el-form-item label="保证金金额(万元)" prop="保证金金额">
|
||||
<el-input-number v-model="PerformanceBondform.保证金金额" :precision="2" :step="1" :min="0" :max="PerformanceBondform.保证金金额max" style="width: 200px" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -565,7 +566,7 @@ export default {
|
||||
回收金额: 0
|
||||
},
|
||||
Timeform: {
|
||||
投标结果公布日期: '',
|
||||
投标结果公布日期: getNowShotTime(),
|
||||
中标服务费: ''
|
||||
},
|
||||
PerformanceBondform: {
|
||||
@@ -609,7 +610,7 @@ export default {
|
||||
保证金金额: [{ required: true, message: '请输入保证金金额', trigger: 'blur' }, { required: true, trigger: 'change', validator: validateValue }],
|
||||
保证金类型: [{ required: true, message: '请输入保证金类型', trigger: 'change' }],
|
||||
投标人: [{ required: true, message: '请输入投标人', trigger: 'change' }],
|
||||
投标日期: [{ required: true, message: '请选择收回日期', trigger: 'change' }],
|
||||
// 投标日期: [{ required: true, message: '请选择收回日期', trigger: 'change' }],
|
||||
计划收回日期: [{ required: true, message: '请选择计划收回日期', trigger: 'change' }],
|
||||
提前X天提醒我: [{ required: true, message: '提前X天提醒我', trigger: 'blur' }]
|
||||
}
|
||||
@@ -917,6 +918,7 @@ export default {
|
||||
if (row.投标结果 === '1') {
|
||||
this.radio = '1'
|
||||
this.dialogTimeVisible = true
|
||||
// this.Timeform.投标结果公布日期 = getNowShotTime()
|
||||
this.tenderResultDisabled = false
|
||||
} else if (row.投标结果 === '2') {
|
||||
this.radio = '2'
|
||||
@@ -928,7 +930,9 @@ export default {
|
||||
this.dialogTimeVisible = false
|
||||
this.fetchTableData1()
|
||||
},
|
||||
submitTime() {
|
||||
submitTime(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
winningBid(this.code, this.radio, this.Timeform.投标结果公布日期, this.Timeform.中标服务费).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.fetchTableData1()
|
||||
@@ -938,6 +942,8 @@ export default {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
callOffPerformanceBondform() {
|
||||
this.dialogPerformanceBondVisible = false
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
<el-table-column align="right" label="收款金额(万元)" width="120" prop="收款金额">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.收款金额" :min="0" style="width:100px" clearable size="mini"/>
|
||||
<el-input-number v-model="scope.row.收款金额" :min="0" :max="maxnomoney" style="width:100px" clearable size="mini"/>
|
||||
</template>
|
||||
<span v-else>{{ Number(scope.row.收款金额).toFixed(2) }}</span>
|
||||
</template>
|
||||
@@ -301,7 +301,9 @@ export default {
|
||||
num: '',
|
||||
contractTotal: '',
|
||||
dialogFormVisiblePeople: false,
|
||||
AccountsReceivableVisible: false
|
||||
AccountsReceivableVisible: false,
|
||||
maxnomoney: 0,
|
||||
row2: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -325,8 +327,8 @@ export default {
|
||||
}
|
||||
if (val.length !== 0) {
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['合同编号', '项目名称', '客户名称', '付款方式', '合同签订日期', '合同金额(万元)', '已收(万元)', '未收(万元)', '营销经理']
|
||||
const filterVal = ['合同编号', '项目名称', '客户名称', '付款方式', '合同签订日期', '合同总金额(万元)', '到账金额(万元)', '未收金额(万元)', '营销经理']
|
||||
const tHeader = ['合同编号', '项目名称', '客户名称', '付款方式', '合同金额(万元)', '已收(万元)', '未收(万元)', '营销经理']
|
||||
const filterVal = ['合同编号', '项目名称', '客户名称', '付款方式', '合同总金额(万元)', '到账金额(万元)', '未收金额(万元)', '营销经理']
|
||||
const list = val.data
|
||||
const data = this.formatJson(filterVal, list)
|
||||
excel.export_json_to_excel({
|
||||
@@ -464,17 +466,19 @@ export default {
|
||||
})
|
||||
},
|
||||
addMoney(row) {
|
||||
this.maxnomoney = Number(row.未收金额)
|
||||
this.tableData2 = []
|
||||
this.moneyID = row.资金id
|
||||
addMoney(row.资金id).then(response => {
|
||||
if (response.data[0].result !== '0') {
|
||||
this.$message.success('收款成功')
|
||||
searchTable2(row.资金id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData2.push({
|
||||
收款金额: response.data[i].金额,
|
||||
收款金额: Number(response.data[i].金额).toFixed(2),
|
||||
收款时间: response.data[i].入账时间,
|
||||
资金明细ID: response.data[i].资金明细ID,
|
||||
原收款金额: response.data[i].金额,
|
||||
原收款金额: Number(response.data[i].金额).toFixed(2),
|
||||
edit: false
|
||||
})
|
||||
}
|
||||
@@ -506,6 +510,7 @@ export default {
|
||||
}
|
||||
})
|
||||
this.getTableData()
|
||||
// this.getTableData2(this.row2)
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
@@ -569,6 +574,8 @@ export default {
|
||||
})
|
||||
},
|
||||
getTableData2(row) {
|
||||
console.log(Number(row.未收金额))
|
||||
this.maxnomoney = Number(row.未收金额)
|
||||
this.tableData2 = []
|
||||
this.moneyID = row.资金id
|
||||
searchTable2(this.moneyID).then(response => {
|
||||
|
||||
@@ -489,6 +489,7 @@
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { getNowShotTime } from '@/utils/tool'
|
||||
import { addMarketingManager, SelectMarketingManager1, SelectPartment, searchTimeAll, searchTime, selectBidBond, changeExecutionProgressID, initProject, searchTable1, fetchExecutionProgress, delList, addList, executionProgressID, editchar, getTree, tree, getTablePeople, fetchCustomerData, getFileData, deleteFileData, selectMachine, selectProvince, SelectMarketingManager, submitMachine, editMachine, delMachine, money } from '@/api/MarketingCenter/ContractInformationManagement'
|
||||
import { upload, download } from '@/utils/request'
|
||||
export default {
|
||||
@@ -627,7 +628,7 @@ export default {
|
||||
form: {
|
||||
MarketingManagerValue: '',
|
||||
EntryName: '', // 项目名称
|
||||
contractSigningDate: '',
|
||||
contractSigningDate: getNowShotTime(),
|
||||
drawingJointSignNode: '', // 图纸会签节点
|
||||
EquipmentPreAcceptanceNode: '', // 设备预验收节点
|
||||
ConsignmentNode: '', // 发货节点
|
||||
@@ -679,6 +680,7 @@ export default {
|
||||
this.fetchData()
|
||||
this.fetchTableData1()
|
||||
this.fetchCustomerData()
|
||||
console.log(this.$toTop(), 222)
|
||||
},
|
||||
methods: {
|
||||
// 2020 02 18 刘路加 增加
|
||||
@@ -1012,7 +1014,7 @@ export default {
|
||||
this.form.付款方式 = parseInt(row.付款方式代码)
|
||||
this.biddingNumber = row.招标保证金流水号
|
||||
this.form.bidding = Number(row.保证金金额).toFixed(2)
|
||||
this.form.contractAmount = row.合同总金额
|
||||
this.form.contractAmount = Number(row.合同总金额).toFixed(2)
|
||||
this.disabled = true
|
||||
this.temp = 2
|
||||
this.isTrue = false
|
||||
|
||||
@@ -153,6 +153,7 @@ export function export_json_to_excel({
|
||||
autoWidth = true,
|
||||
bookType= 'xlsx'
|
||||
} = {}) {
|
||||
console.log(header,111)
|
||||
/* original data */
|
||||
filename = filename || 'excel-list'
|
||||
data = [...data]
|
||||
@@ -218,3 +219,105 @@ export function export_json_to_excel({
|
||||
type: "application/octet-stream"
|
||||
}), `${filename}.${bookType}`);
|
||||
}
|
||||
export function export_json_to_excel2({
|
||||
multiHeader = [],
|
||||
header,
|
||||
data,
|
||||
sheetname,
|
||||
filename,
|
||||
merges = [],
|
||||
autoWidth = true,
|
||||
bookType = 'xlsx'
|
||||
} = {}) {
|
||||
/* original data */
|
||||
filename = filename || 'excel-list'
|
||||
data = [...data]
|
||||
|
||||
for (var i = 0; i < header.length; i++) {
|
||||
data[i].unshift(header[i])
|
||||
}
|
||||
|
||||
// data.unshift(header)
|
||||
|
||||
for (let i = multiHeader.length - 1; i > -1; i--) {
|
||||
data.unshift(multiHeader[i])
|
||||
}
|
||||
|
||||
var ws_name = sheetname
|
||||
var wb = new Workbook(),
|
||||
ws = []
|
||||
for (var j = 0; j < header.length; j++) {
|
||||
ws.push(sheet_from_array_of_arrays(data[j]))
|
||||
}
|
||||
|
||||
if (merges.length > 0) {
|
||||
if (!ws['!merges']) ws['!merges'] = []
|
||||
merges.forEach(item => {
|
||||
ws['!merges'].push(XLSX.utils.decode_range(item))
|
||||
})
|
||||
}
|
||||
// console.log("width", autoWidth)
|
||||
if (autoWidth) {
|
||||
/* 设置worksheet每列的最大宽度*/
|
||||
var colWidth = []
|
||||
for (var k = 0; k < header.length; k++) {
|
||||
colWidth.push(
|
||||
data[k].map(row =>
|
||||
row.map(val => {
|
||||
/* 先判断是否为null/undefined*/
|
||||
if (val == null) {
|
||||
return {
|
||||
wch: 10
|
||||
}
|
||||
} else if (val.toString().charCodeAt(0) > 255) {
|
||||
/* 再判断是否为中文*/
|
||||
return {
|
||||
wch: val.toString().length * 2
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
wch: val.toString().length
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/* 以第一行为初始值*/
|
||||
const result = []
|
||||
for (var k = 0; k < colWidth.length; k++) {
|
||||
result[k] = colWidth[k][0]
|
||||
for (let i = 1; i < colWidth[k].length; i++) {
|
||||
for (let j = 0; j < colWidth[k][i].length; j++) {
|
||||
if (result[k][j]['wch'] < colWidth[k][i][j]['wch']) {
|
||||
result[k][j]['wch'] = colWidth[k][i][j]['wch']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分别给sheet表设置宽度
|
||||
for (var l = 0; l < result.length; l++) {
|
||||
ws[l]['!cols'] = result[l]
|
||||
}
|
||||
}
|
||||
|
||||
/* add worksheet to workbook */
|
||||
for (var k = 0; k < header.length; k++) {
|
||||
wb.SheetNames.push(ws_name[k])
|
||||
wb.Sheets[ws_name[k]] = ws[k]
|
||||
}
|
||||
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: bookType,
|
||||
bookSST: false,
|
||||
type: 'binary'
|
||||
})
|
||||
saveAs(
|
||||
new Blob([s2ab(wbout)], {
|
||||
type: 'application/octet-stream'
|
||||
}),
|
||||
`${filename}.${bookType}`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div ref="height1" style="width:100%">
|
||||
<div ref="height1" style="width:100%;height: 300px; overflow:auto;">
|
||||
<el-divider content-position="right">
|
||||
<el-button type="text" @click="searchUnInquiryPartNumber">刷新</el-button> | 待询价零件数
|
||||
</el-divider>
|
||||
<el-row>
|
||||
<el-col v-for="(machine,index) in machines1" :key="index" style="width: 200px">
|
||||
<el-card shadow="hover" class="sudoku_item" style="height:80px;width: 90%" @click.native="clickCard1(machine.项目流水号, machine.机床流水号)">
|
||||
<el-badge :value="machine.未询价零件数">
|
||||
<el-card shadow="hover" class="sudoku_item" style="height:50px;width: 90%" @click.native="clickCard1(machine.项目流水号, machine.机床流水号)">
|
||||
<el-badge :value="machine.未询价零件数" style="margin-top: 17px">
|
||||
<div style="width: 100px;height:50px;margin:0" class="sudoku_item">
|
||||
{{ machine.机床图号 }}
|
||||
</div>
|
||||
@@ -55,20 +55,6 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<!--<el-select v-model="groupValue" placeholder="组号" style="width:100px" size="small" clearable filterable>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in group"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
|
||||
<!--<el-input v-model="materialSpec" placeholder="物料规格" size="small" style="width:120px" clearable/>-->
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable11()">查询</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="开启物料变更" placement="top">
|
||||
<el-switch v-model="switchValue" active-color="#13ce66" inactive-color="#ff4949" style="margin-left: 30px"/>
|
||||
</el-tooltip>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
size="small"
|
||||
@@ -80,6 +66,20 @@
|
||||
style="width:250px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<!--<el-select v-model="groupValue" placeholder="组号" style="width:100px" size="small" clearable filterable>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in group"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
|
||||
<!--<el-input v-model="materialSpec" placeholder="物料规格" size="small" style="width:120px" clearable/>-->
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable11()">查询</el-button>
|
||||
<el-button type="search" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="开启物料变更" placement="top">
|
||||
<el-switch v-model="switchValue" active-color="#13ce66" inactive-color="#ff4949" style="margin-left: 30px"/>
|
||||
</el-tooltip>
|
||||
<el-popover v-model="visible1" placement="top" width="140">
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-select v-model="PersonValue" style="width:100px" placeholder="人员" size="small" filterable clearable>
|
||||
@@ -116,9 +116,10 @@
|
||||
style="width: 100%;max-height: 500px;"
|
||||
height="500px"
|
||||
size="mini"
|
||||
@sort-change="sortChange"
|
||||
@selection-change="handleSelectionChange1"
|
||||
@select="handleSelection">
|
||||
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
|
||||
<el-table-column :selectable="selectable" align="center" width="43" type="selection"/>
|
||||
<el-table-column v-if="switchValue" 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>
|
||||
@@ -132,70 +133,74 @@
|
||||
<!--<span v-if="purchased(scope.row)">已采购</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商" show-overflow-tooltip>
|
||||
<!--供货商排序-->
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供应商" align="center" min-width="100" prop="供货商" sortable="custom" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注" show-overflow-tooltip>
|
||||
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" width="130" prop="机床图号" show-overflow-tooltip>
|
||||
<!--机床图号排序-->
|
||||
<el-table-column label="机床图号" align="center" width="120" prop="机床图号" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="50">
|
||||
<el-table-column label="组号" align="center" width="50">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" width="180" prop="名称">
|
||||
<!--物料名称排序-->
|
||||
<el-table-column label="名称" align="center" width="120" prop="物料名称" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" width="250" prop="物料规格" show-overflow-tooltip>
|
||||
<el-table-column label="规格" align="center" width="160" prop="物料规格" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="130" prop="物料型号">
|
||||
<!--物料排序-->
|
||||
<el-table-column label="图号或型号" align="center" width="130" prop="物料型号" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配数" align="center" min-width="60">
|
||||
<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">
|
||||
<el-table-column label="待询价数" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存(BZ)" align="center" min-width="70" prop="库存">
|
||||
<el-table-column label="库存(BZ)" align="center" width="80" prop="库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
|
||||
<el-table-column label="使用库存数量" align="center" width="145" prop="使用库存数">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.库存 === '0'">
|
||||
—
|
||||
</template>
|
||||
<el-input-number v-else v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
|
||||
<el-input-number v-else v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 130px" @change="changeNumber(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已用滞货" align="center" min-width="70">
|
||||
<el-table-column label="已用滞货" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用滞货" align="center" min-width="70">
|
||||
<el-table-column label="使用滞货" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<!--<el-tooltip class="item" effect="dark" content="使用滞货" placement="top-start">-->
|
||||
<template v-if="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0">
|
||||
@@ -208,7 +213,7 @@
|
||||
<!--</el-tooltip>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可用滞货" align="center" min-width="80">
|
||||
<el-table-column label="可用滞货" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.滞货数量) }}
|
||||
</template>
|
||||
@@ -218,7 +223,7 @@
|
||||
{{ scope.row.任务分配时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设计者" align="center" min-width="60">
|
||||
<el-table-column label="设计者" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }}
|
||||
</template>
|
||||
@@ -249,9 +254,8 @@
|
||||
<div style="display: inline-block; float: left">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
|
||||
<el-button
|
||||
type="warning"
|
||||
type="distribution"
|
||||
size="small"
|
||||
plain
|
||||
style="margin: 0px 20px; display: inline-block;"
|
||||
@click="addInquirySheet">选入物料</el-button>
|
||||
</el-tooltip>
|
||||
@@ -276,16 +280,6 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<!--<el-select v-model="groupValue" placeholder="组号" size="small" style="width: 100px" clearable filterable>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in group"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable12()">查询</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
size="small"
|
||||
@@ -297,6 +291,17 @@
|
||||
style="width:250px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<!--<el-select v-model="groupValue" placeholder="组号" size="small" style="width: 100px" clearable filterable>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in group"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable12()">查询</el-button>
|
||||
<el-button type="search" size="small" icon="el-icon-download" plain style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
|
||||
|
||||
<el-button type="primary" size="small" plain style="float: right" @click="visible2 = false;tiaozheng2()">调整采购任务</el-button>
|
||||
<el-select v-model="PersonValue" style="width:100px;float: right" placeholder="人员" size="small" filterable clearable>
|
||||
<el-option
|
||||
@@ -323,7 +328,7 @@
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-loading="loading2"
|
||||
:data="tableData12"
|
||||
:row-class-name="tableRowClassName2"
|
||||
border
|
||||
@@ -331,6 +336,7 @@
|
||||
height="500px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange2"
|
||||
@sort-change="sortChange"
|
||||
@select="handleSelection1">
|
||||
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
|
||||
<!--<el-table-column label="操作" align="center" width="100" fixed="left">-->
|
||||
@@ -346,7 +352,7 @@
|
||||
<!--<el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供应商" align="center" min-width="100" prop="供货商" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
@@ -356,12 +362,12 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号" align="center" min-width="130">
|
||||
<el-table-column label="图号" align="center" min-width="130" prop="零件图号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" min-width="60">
|
||||
<el-table-column label="名称" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -376,7 +382,7 @@
|
||||
<!-- {{ scope.row.项目名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="机床图号" align="center" min-width="130">
|
||||
<el-table-column label="机床图号" align="center" min-width="130" prop="机床图号" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
@@ -414,16 +420,18 @@
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div class="block">
|
||||
<div class="block" style="display: inline-block;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent12"
|
||||
:page-sizes="[10, 50, 100, 150]"
|
||||
:page-size="pageSize12"
|
||||
:total="total12"
|
||||
style="display:inline-block;width:50px"
|
||||
layout="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange12"
|
||||
@current-change="handleCurrentChange12"/>
|
||||
</div>
|
||||
<div style="display: inline-block; float: left">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
|
||||
<el-button
|
||||
type="warning"
|
||||
@@ -622,23 +630,28 @@
|
||||
<el-row>
|
||||
<el-input v-model="inquirySheetNum" placeholder="询价单号或供应商" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()"/>
|
||||
<el-button
|
||||
type="primary"
|
||||
type="search"
|
||||
size="mini"
|
||||
icon="el-icon-search"
|
||||
plain
|
||||
style="margin:0px 10px"
|
||||
@click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button>
|
||||
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
type="distribution"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
size="mini"
|
||||
plain
|
||||
style="margin-left: 10px"
|
||||
@click="createInquirySheet">创建</el-button>
|
||||
<el-button type="warning" size="mini" plain icon="el-icon-edit" style="margin-left: 10px" @click="editInquirySheet()">编辑</el-button>
|
||||
<el-button type="danger" size="mini" plain icon="el-icon-delete" style="margin-left: 10px" @click="deleteInquirySheet()">删除</el-button>
|
||||
<el-button :disabled="tableData3.length===0" type="primary" size="small" plain style="float: right" @click="printInquirySheet()">打印</el-button>
|
||||
<el-button :disabled="tableData3.length===0" type="warning" size="small" plain style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button>
|
||||
@click="createInquirySheet">询价单</el-button>
|
||||
<el-button type="distribution" size="mini" icon="el-icon-edit" style="margin-left: 10px" @click="editInquirySheet()">编辑</el-button>
|
||||
<!--<el-button-->
|
||||
<!--:disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')"-->
|
||||
<!--type="repulse"-->
|
||||
<!--plain-->
|
||||
<!--size="mini"-->
|
||||
<!--icon="el-icon-back"-->
|
||||
<!--@click="deleteInquirySheet">撤回</el-button>-->
|
||||
<el-button type="repulse" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="deleteInquirySheet()">删除</el-button>
|
||||
<el-button :disabled="tableData3.length===0" type="search" size="mini" style="float: right" icon="el-icon-printer" @click="printInquirySheet()">打印</el-button>
|
||||
<el-button :disabled="tableData3.length===0" type="search" size="mini" style="margin-left:10px;float: right" icon="el-icon-download" @click="exportInquirySheet()">导出</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-row>
|
||||
@@ -737,7 +750,7 @@
|
||||
{{ scope.row.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待询数" align="center" width="60">
|
||||
<el-table-column label="待询数" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术下达数量 }}
|
||||
</template>
|
||||
@@ -795,8 +808,8 @@
|
||||
<tr>
|
||||
<td style="border: none;" colspan="2">询价单编号:</td>
|
||||
<td id="inquirySheetNum" style="border: none;" colspan="4"/>
|
||||
<td style="border: none;" colspan="2">供应商名称:</td>
|
||||
<td id="supplier" style="border: none;" colspan="6"/>
|
||||
<td style="border: none;" colspan="3">供应商名称:</td>
|
||||
<td id="supplier" style="border: none;margin-left: -20px " colspan="5"/>
|
||||
</tr>
|
||||
<tr id="tablehead">
|
||||
<td width="8.3%">序号</td>
|
||||
@@ -954,16 +967,18 @@
|
||||
<!--</el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
|
||||
<el-button size="small" icon="el-icon-circle-close" @click="dialogVisible2=false">取消</el-button>
|
||||
<el-button
|
||||
v-show="title2==='创建询价单'"
|
||||
type="primary"
|
||||
type="distribution"
|
||||
size="small"
|
||||
icon="el-icon-circle-check"
|
||||
@click="submitCreateInquirySheet1">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑询价单'"
|
||||
type="primary"
|
||||
type="distribution"
|
||||
size="small"
|
||||
icon="el-icon-circle-check"
|
||||
@click="submitEditInquirySheet">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -1101,6 +1116,7 @@
|
||||
import { tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
|
||||
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge, changeNum } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
import { json2excel } from '@/utils/setMethods.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
import $ from 'jquery'
|
||||
@@ -1113,6 +1129,7 @@ export default {
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
loading: false,
|
||||
loading2: false,
|
||||
标准件和外购件流水号: [],
|
||||
基本件流水号: [],
|
||||
visible: false,
|
||||
@@ -1200,7 +1217,7 @@ export default {
|
||||
tableData12: [], // 基本件列表
|
||||
total12: 0,
|
||||
pageCurrent12: 1,
|
||||
pageSize12: 1000,
|
||||
pageSize12: 10,
|
||||
tableData13: [], // 外购件列表
|
||||
total13: 0,
|
||||
pageCurrent13: 1,
|
||||
@@ -1284,7 +1301,10 @@ export default {
|
||||
machines2: [],
|
||||
numbers: [],
|
||||
numbers1: [],
|
||||
row1: ''
|
||||
row1: '',
|
||||
ordername: '',
|
||||
order: '',
|
||||
printsupliername: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -1313,7 +1333,7 @@ export default {
|
||||
this.fetchData()
|
||||
this.projectChange()
|
||||
// this.searchTable11() // 查表1
|
||||
this.searchTable2() // 查表2
|
||||
// this.searchTable2() // 查表2
|
||||
this.searchUnInquiryPartNumber()
|
||||
this.searchUnBuyPartNumber()
|
||||
this.initDirection()
|
||||
@@ -1324,6 +1344,30 @@ export default {
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
// 2020 03 04 刘路加表头排序
|
||||
// 1 供货商 2 机床图号 3 物料名称 4 物料型号
|
||||
sortChange(column, prop, order) {
|
||||
console.log(column + '-' + column.prop + '-' + column.order, 11111)
|
||||
if (column.prop === '供货商') {
|
||||
this.ordername = 1
|
||||
} else if (column.prop === '机床图号') {
|
||||
this.ordername = 2
|
||||
} else if (column.prop === '物料名称') {
|
||||
this.ordername = 3
|
||||
} else if (column.prop === '物料型号') {
|
||||
this.ordername = 4
|
||||
} else {
|
||||
this.ordername = ''
|
||||
}
|
||||
if (column.order === 'ascending') {
|
||||
this.order = 1
|
||||
} else if (column.order === 'descending') { this.order = 2 } else {
|
||||
this.order = ''
|
||||
}
|
||||
this.searchTable11()
|
||||
this.searchTable12()
|
||||
// this.getTableData()
|
||||
},
|
||||
// timeSearch() {
|
||||
// timeSearch().then(response => {
|
||||
// this.startTime = [response.data[0].外购件开始时间, response.data[0].外购件结束时间]
|
||||
@@ -1600,7 +1644,7 @@ export default {
|
||||
v.供货商 = v.供货商 ? v.供货商 : ''
|
||||
v.备注 = v.备注 ? v.备注 : ''
|
||||
})
|
||||
import('./Export2Excel').then(excel => {
|
||||
var excelDatas = []
|
||||
const dataGroup = []
|
||||
const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
@@ -1608,17 +1652,56 @@ export default {
|
||||
dataGroup.push(data1)
|
||||
const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
dataGroup.push(data2)
|
||||
// const data3 = this.formatJson(filterVal1, data1)
|
||||
// dataGroup.push(data3)
|
||||
// const data4 = this.formatJson(filterVal1, data2)
|
||||
// dataGroup.push(data4)
|
||||
// console.log(dataGroup, 4444)
|
||||
const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
// const headerGroup = ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商']
|
||||
const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
excel.export_json_to_excel({
|
||||
headerGroup: headerGroup,
|
||||
dataGroup: dataGroup,
|
||||
sheetGroup: sheetGroup,
|
||||
filename: '未询价采购件明细',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
console.log(dataGroup)
|
||||
excelDatas.push({
|
||||
tHeader: headerGroup[0],
|
||||
filterVal: filterVal1,
|
||||
tableDatas: res1.data,
|
||||
sheetName: sheetGroup[0]
|
||||
},
|
||||
{
|
||||
tHeader: headerGroup[1],
|
||||
filterVal: filterVal2,
|
||||
tableDatas: res2.data,
|
||||
sheetName: sheetGroup[1]
|
||||
})
|
||||
console.log(excelDatas)
|
||||
json2excel(excelDatas, '未询价采购件明细', true, 'xlsx')
|
||||
// import('./Export2Excel').then(excel => {
|
||||
// const dataGroup = []
|
||||
// const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
// const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
// const data1 = res1.data.map(v => filterVal1.map(j => v[j]))
|
||||
// dataGroup.push(data1)
|
||||
// const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
// dataGroup.push(data2)
|
||||
// // const data3 = this.formatJson(filterVal1, data1)
|
||||
// // dataGroup.push(data3)
|
||||
// // const data4 = this.formatJson(filterVal1, data2)
|
||||
// // dataGroup.push(data4)
|
||||
// // console.log(dataGroup, 4444)
|
||||
// const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
// // const headerGroup = ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商']
|
||||
//
|
||||
// const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
// console.log(headerGroup, dataGroup, sheetGroup)
|
||||
// excel.export_json_to_excel2({
|
||||
// header: headerGroup,
|
||||
// data: dataGroup,
|
||||
// sheetname: sheetGroup,
|
||||
// filename: '未询价采购件明细',
|
||||
// autoWidth: true,
|
||||
// bookType: 'xlsx'
|
||||
// })
|
||||
// })
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -1766,14 +1849,17 @@ export default {
|
||||
this.groupValue ? check6 = 1 : check6 = 0
|
||||
this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
|
||||
this.supplierName ? check8 = 1 : check8 = 0
|
||||
searchMaterial(this.pageCurrent11, this.pageSize11, 3, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.startTime[0], this.startTime[1], check8, this.supplierName).then(response => {
|
||||
this.tableData11 = response.data.rows
|
||||
this.total11 = response.data.total
|
||||
console.log(this.ordername)
|
||||
searchMaterial(this.pageCurrent11, this.pageSize11, 3, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.startTime[0], this.startTime[1], check8, this.supplierName, this.ordername, this.order).then(response => {
|
||||
// this.tableData11 = response.data
|
||||
console.log(response.data)
|
||||
this.tableData11 = response.data.result
|
||||
this.total11 = parseInt(response.data.output[0].ItemCount)
|
||||
const remark = []
|
||||
const supplier = []
|
||||
this.remarkFilters = []
|
||||
this.supplierFilters = []
|
||||
response.data.rows.map(v => {
|
||||
response.data.result.map(v => {
|
||||
if (v.备注 === null) { v.备注 = '' }
|
||||
if (v.供货商 === null) { v.供货商 = '' }
|
||||
if (!remark.includes(v.备注)) {
|
||||
@@ -1786,6 +1872,8 @@ export default {
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSizeChange11(val) { // 标准件和外购件列表分页
|
||||
@@ -1798,7 +1886,7 @@ export default {
|
||||
this.searchTable11()
|
||||
},
|
||||
searchTable12() { // 查询基本件列表
|
||||
this.loading = true
|
||||
this.loading2 = true
|
||||
let check1, check2, check3, check4, check5, check6, check7, check8
|
||||
this.partNum ? check1 = 1 : check1 = 0
|
||||
this.partName ? check2 = 1 : check2 = 0
|
||||
@@ -1808,14 +1896,14 @@ export default {
|
||||
this.groupValue ? check6 = 1 : check6 = 0
|
||||
this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '')
|
||||
this.supplierName ? check8 = 1 : check8 = 0
|
||||
searchPart(this.pageCurrent12, this.pageSize12, 3, check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1], check8, this.supplierName).then(response => {
|
||||
this.tableData12 = response.data.rows
|
||||
this.total12 = response.data.total
|
||||
searchPart(this.pageCurrent12, this.pageSize12, 3, check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1], check8, this.supplierName, this.ordername, this.order).then(response => {
|
||||
this.tableData12 = response.data.result
|
||||
this.total12 = parseInt(response.data.output[0].ItemCount)
|
||||
const remark = []
|
||||
const supplier = []
|
||||
this.remarkFilters = []
|
||||
this.supplierFilters = []
|
||||
response.data.rows.map(v => {
|
||||
response.data.result.map(v => {
|
||||
if (!remark.includes(v.备注)) {
|
||||
remark.push(v.备注)
|
||||
supplier.push(v.供货商)
|
||||
@@ -1823,7 +1911,9 @@ export default {
|
||||
this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
this.loading2 = false
|
||||
}).catch(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange12(val) { // 基本件列表分页
|
||||
@@ -1952,7 +2042,7 @@ export default {
|
||||
this.$message.error('请选择询价单')
|
||||
} else {
|
||||
console.log(this.row1, 2)
|
||||
this.$confirm('确定删除该询价单?', '提示', {
|
||||
this.$confirm('删除询价单,将释放该询价单下所有采购任务?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -2061,7 +2151,7 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = res.data[j].备注
|
||||
}
|
||||
document.getElementById('inquirySheetNum').innerHTML = this.orderExport
|
||||
document.getElementById('supplier').innerHTML = ''
|
||||
document.getElementById('supplier').innerHTML = this.printsupliername
|
||||
}
|
||||
}).then(() => {
|
||||
const htmlNode = $('#inquirySheet').html()
|
||||
@@ -2119,7 +2209,7 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = res.data[j].备注
|
||||
}
|
||||
document.getElementById('inquirySheetNum').innerHTML = this.orderExport
|
||||
document.getElementById('supplier').innerHTML = ''
|
||||
document.getElementById('supplier').innerHTML = this.printsupliername
|
||||
exportExcelMethod('inquirySheet', '采购询价单', '采购询价单sheet')
|
||||
}
|
||||
})
|
||||
@@ -2293,6 +2383,8 @@ export default {
|
||||
},
|
||||
searchTable3(row) { // 查询该询价单中的物料和零件
|
||||
this.row1 = row
|
||||
console.log(row.供应商名称)
|
||||
this.printsupliername = row.供应商名称
|
||||
this.tableData3 = []
|
||||
this.inquirySheetFlowNum = row.询价单流水号
|
||||
this.orderExport = row.询价单编号
|
||||
|
||||
@@ -38,8 +38,10 @@
|
||||
active-value="含税"
|
||||
inactive-value="未税"/>
|
||||
</el-tooltip>
|
||||
<el-button v-if="quickChangePrice" size="mini" type="primary" plain style="margin: 0px 0 0 10px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
|
||||
<el-button v-else size="mini" style="margin: 10px 0 0 10px" @click="quickChangePrice=!quickChangePrice">还原</el-button>
|
||||
<el-tooltip content="修改表格内备注/交货期" placement="top">
|
||||
<el-button v-if="quickChangePrice" size="mini" type="success" plain style="margin: 0px 0 0 10px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
|
||||
<el-button v-else size="mini" type="distribution" style="margin: 10px 0 0 10px" @click="quickChangePrice=!quickChangePrice">编辑</el-button>
|
||||
</el-tooltip>
|
||||
<el-button v-show="isShowN" type="text" style="margin: 10px 0 0 10px" @click="isShowN=false">折叠</el-button>
|
||||
<el-button v-show="!isShowN" type="text" style="margin: 10px 0 0 10px" @click="isShowN=true">展开其他说明</el-button>
|
||||
<el-tooltip v-show="true" :open-delay="300" content="一键删除交货期" placement="right">
|
||||
@@ -59,9 +61,9 @@
|
||||
<el-input v-model="otherInfo" :disabled="!contractNumValue" size="small" placeholder="其他说明" type="textarea" rows="1" @blur="contractHeaderChange"/>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary tooltip-effect="dark">
|
||||
<el-table v-loading="loading" :data="tableData1" :summary-method="getSummaries" border style="margin: 10px 0;max-height: 480px;width: 1365px" height="480px" size="mini" show-summary tooltip-effect="dark">
|
||||
<el-table-column label="序号" align="center" width="50" type="index"/>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<el-table-column label="机床图号" align="center" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
@@ -71,17 +73,17 @@
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" min-width="120">
|
||||
<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="120">
|
||||
<el-table-column label="图号或型号" align="center" width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号 ? scope.row.图号 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="120">
|
||||
<el-table-column label="规格" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 ? scope.row.规格 : '—' }}
|
||||
</template>
|
||||
@@ -96,18 +98,18 @@
|
||||
{{ scope.row.计量单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="100">
|
||||
<el-table-column v-show="hasTax==='含税'" label="单价(含税)元" align="center" width="108">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%" @keyup.native="scope.row.含税单价 = scope.row.含税单价.replace(/[^\.\d]/g,'')" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
|
||||
<b v-show="hasTax!=='含税'">—</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总额(含税)" align="center" min-width="100" prop="含税总额">
|
||||
<el-table-column label="总额(含税)元" align="center" width="108" 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="80" show-overflow-tooltip>
|
||||
<el-table-column label="备注" align="center" width="80" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 1, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.备注" size="mini" style="width:100%" @change="remarkChange(scope.row.备注, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
|
||||
<b v-else>{{ scope.row.备注 || '—' }}</b>
|
||||
@@ -126,13 +128,13 @@
|
||||
<b v-else>{{ scope.row.交货期.split(' ')[0] || '—' }}</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="100">
|
||||
<el-table-column v-show="hasTax==='未税'" label="单价(未税)元" align="center" width="108">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 0, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%" @keyup.native="scope.row.未税单价 = scope.row.未税单价.replace(/[^\.\d]/g,'')" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
|
||||
<b v-show="hasTax!=='未税'">—</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总额(未税)" align="center" min-width="100" prop="未税总额">
|
||||
<el-table-column label="总额(未税)元" align="center" width="108" 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>
|
||||
@@ -144,7 +146,7 @@
|
||||
</el-radio-group>
|
||||
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>
|
||||
<span>递交审批:</span>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="生成合同并提交审批" placement="top">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="生成合同并提交审核" placement="top">
|
||||
<el-button type="primary" plain size="small" @click="generateContract()">递交</el-button>
|
||||
</el-tooltip>
|
||||
<hr>
|
||||
@@ -237,6 +239,13 @@ export default {
|
||||
'id'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
quickChangePrice: function(val) {
|
||||
if (val === false) {
|
||||
this.$message.success('成功修改表格中内容')
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData11()
|
||||
this.fetchData()
|
||||
@@ -244,6 +253,46 @@ export default {
|
||||
this.demo1()
|
||||
},
|
||||
methods: {
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
} else if (index === 9) {
|
||||
const values = data.map(item => Number(parseFloat(item['含税总额'])))
|
||||
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)
|
||||
sums[index] = sums[index].toFixed(2) + ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 12) {
|
||||
const values = data.map(item => Number(parseFloat(item['未税总额'])))
|
||||
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)
|
||||
sums[index] = sums[index].toFixed(2) + ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
fetchData11() {
|
||||
initSupplier11(this.id).then(res => {
|
||||
this.supplier11 = []
|
||||
@@ -352,8 +401,8 @@ export default {
|
||||
row.零件图号 = row.零件图号 || ''
|
||||
row.规格 = row.规格 || ''
|
||||
if (Number(v.物料流水号) === Number(row.物料流水号) && Number(v.询价单流水号) === Number(row.询价单流水号) && v.零件名称 === row.零件名称 && v.零件图号 === row.零件图号 && v.规格 === row.规格) {
|
||||
v.含税单价 = row.含税单价
|
||||
v.未税单价 = row.未税单价
|
||||
v.含税单价 = Number(row.含税单价).toFixed(2)
|
||||
v.未税单价 = Number(row.未税单价).toFixed(2)
|
||||
}
|
||||
})
|
||||
const group = this.tableData1
|
||||
@@ -510,9 +559,9 @@ export default {
|
||||
规格: response.data[i].组件零件流水号 ? response.data[i].物料规格 : response.data[i].规格,
|
||||
数量: response.data[i].数量,
|
||||
计量单位: response.data[i].计量单位,
|
||||
未税单价: response.data[i].单价,
|
||||
未税单价: Number(response.data[i].单价).toFixed(2),
|
||||
未税总额: 0,
|
||||
含税单价: response.data[i].单价,
|
||||
含税单价: Number(response.data[i].单价).toFixed(2),
|
||||
含税总额: 0,
|
||||
备注: response.data[i].备注
|
||||
})
|
||||
@@ -661,8 +710,8 @@ export default {
|
||||
<table style="border-collapse: collapse; width: 100%;" border="1">
|
||||
<tbody id="tbody">
|
||||
<tr id="tableHead">
|
||||
<td>序号</td>
|
||||
<td>机床号-组号</td>
|
||||
<td style="width: 30px">序号</td>
|
||||
<td style="width: 110px">机床号-组号</td>
|
||||
<td>名称</td>
|
||||
<td>图号或型号</td>
|
||||
<td>规格</td>
|
||||
@@ -670,7 +719,7 @@ export default {
|
||||
<td>单位</td>
|
||||
<td>单价</td>
|
||||
<td>合计</td>
|
||||
<td>交货时间</td>
|
||||
<td style="width:90px">交货时间</td>
|
||||
<td>备注</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -777,10 +826,10 @@ export default {
|
||||
document.getElementsByClassName('actualTotal')[0].innerHTML = this.actualTotal
|
||||
document.getElementsByClassName('actualTotal')[1].innerHTML = this.actualTotal
|
||||
document.getElementById('actualTotal_zh').innerHTML = convertCurrency(this.actualTotal)
|
||||
this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML
|
||||
// this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML
|
||||
// this.$refs.tinymce.initTinymce()
|
||||
setTimeout(() => {
|
||||
this.$refs.tinymce.setContent(this.contentNew)
|
||||
// this.$refs.tinymce.setContent(this.contentNew)
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$message.warning('请先选择合同模板,再预览')
|
||||
@@ -820,7 +869,7 @@ export default {
|
||||
})
|
||||
if (this.contractNumValue) {
|
||||
if (this.demoRadio) {
|
||||
this.$confirm('此采购合同将递交审批,递交后该合同不可删除,确认完成编辑?', '提示', {
|
||||
this.$confirm('此采购合同将递交审核,递交后该合同不可删除,确认完成编辑?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
||||
@@ -27,21 +27,21 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable />
|
||||
<el-input
|
||||
v-model="FullNameOfMaterial"
|
||||
placeholder="物料全称"
|
||||
size="small"
|
||||
clearable/>
|
||||
<el-input
|
||||
v-model="MaterialSpecification"
|
||||
placeholder="物料规格"
|
||||
size="small"
|
||||
clearable/>
|
||||
<el-input
|
||||
v-model="MaterialModel"
|
||||
placeholder="物料型号"
|
||||
size="small"
|
||||
clearable/>
|
||||
<!--<el-input-->
|
||||
<!--v-model="FullNameOfMaterial"-->
|
||||
<!--placeholder="物料全称"-->
|
||||
<!--size="small"-->
|
||||
<!--clearable/>-->
|
||||
<!--<el-input-->
|
||||
<!--v-model="MaterialSpecification"-->
|
||||
<!--placeholder="物料规格"-->
|
||||
<!--size="small"-->
|
||||
<!--clearable/>-->
|
||||
<!--<el-input-->
|
||||
<!--v-model="MaterialModel"-->
|
||||
<!--placeholder="物料型号"-->
|
||||
<!--size="small"-->
|
||||
<!--clearable/>-->
|
||||
<el-select
|
||||
v-model="MeasurementUnitValue"
|
||||
placeholder="计算单位"
|
||||
@@ -83,14 +83,14 @@
|
||||
size="small"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent=1;searchMaterial()">查询</el-button>
|
||||
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">新增采购物料申请</el-button>
|
||||
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">采购物料申请</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable/>
|
||||
<el-input v-model="MaterialSpecification" placeholder="物料规格" size="small" clearable/>
|
||||
<el-input v-model="MaterialModel" placeholder="物料型号" size="small" clearable/>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 10px" @click="pageCurrent=1;searchMaterial()">查询</el-button>
|
||||
<el-button type="warning" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" plain size="small" @click="handleAdd()">新增采购物料申请</el-button>
|
||||
<el-input v-model="MaterialName" placeholder="物料名称/物料规格/物料型号" style="width: 220px" size="small" clearable/>
|
||||
<!--<el-input v-model="MaterialSpecification" placeholder="物料规格" size="small" clearable/>-->
|
||||
<!--<el-input v-model="MaterialModel" placeholder="物料型号" size="small" clearable/>-->
|
||||
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 10px" @click="pageCurrent=1;PageSize = 30;searchMaterial()">查询</el-button>
|
||||
<el-button type="warning" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" plain size="small" @click="handleAdd()">采购物料申请</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
@@ -286,8 +286,8 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='新增物料申请'" type="primary" @click="submitAdd('form')">提交技术审核</el-button>
|
||||
<el-button size="small" icon="el-icon-circle-close" @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='新增物料申请'" type="distribution" size="small" icon="el-icon-circle-check" @click="submitAdd('form')">提交技术审核</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
@@ -39,84 +39,84 @@
|
||||
<el-button slot="reference" type="success" size="small" plain style="float: right;margin-right: 20px">调整采购任务</el-button>
|
||||
</el-popover>
|
||||
</el-row>
|
||||
<!--:row-class-name="tableRowClassName"-->
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData00"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 100%;max-height: 500px;"
|
||||
height="500px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange1"
|
||||
@select="handleSelection">
|
||||
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
|
||||
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
|
||||
<el-table-column :selectable="selectable" align="center" width="43" type="selection"/>
|
||||
<el-table-column label="名称" align="center" prop="物料名称" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" prop="物料规格" min-width="120" show-overflow-tooltip>
|
||||
<el-table-column label="规格" align="center" prop="物料规格" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="物料型号" align="center" min-width="100" show-overflow-tooltip>
|
||||
<el-table-column label="型号" prop="物料型号" align="center" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" min-width="120" show-overflow-tooltip>
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 === '0' ? '-' : scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" prop="机床图号" align="center" min-width="100" show-overflow-tooltip>
|
||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" prop="组号" align="center" min-width="50">
|
||||
<el-table-column label="组号" prop="组号" align="center" width="50">
|
||||
<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" width="80" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料品种" prop="物料品种" align="center" min-width="70">
|
||||
<el-table-column label="物料品种" prop="物料品种" align="center" width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料品种 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配数量" align="center" min-width="70" prop="零件数量">
|
||||
<el-table-column label="分配数量" align="center" width="80" prop="零件数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存(BZ)" align="center" min-width="70" prop="库存">
|
||||
<el-table-column label="库存(BZ)" align="center" width="80" prop="库存">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
|
||||
<el-table-column label="使用库存数量" align="center" width="105" prop="使用库存数">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="Number(scope.row.零件类型) !== 1">-</span>
|
||||
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量">
|
||||
<el-table-column label="待采数量" align="center" width="80" prop="待采购数量">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用滞货数量" align="center" min-width="100" prop="使用滞货数量">
|
||||
<el-table-column label="使用滞货数量" align="center" width="110" prop="使用滞货数量">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? Number(scope.row.使用滞货数量) : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用滞货" align="center" min-width="70">
|
||||
<el-table-column label="使用滞货" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0">
|
||||
—
|
||||
@@ -124,7 +124,7 @@
|
||||
<el-button v-else :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0" icon="el-icon-goods" plain type="primary" size="mini" @click="useInventory(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可用滞货数量" align="center" min-width="100">
|
||||
<el-table-column label="可用滞货数量" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 2 ? Number(scope.row.滞货数量) : '-' }}
|
||||
</template>
|
||||
@@ -134,7 +134,7 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="来源" min-width="60px" prop="零件类型筛选">
|
||||
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="来源" width="70px" prop="零件类型筛选">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
|
||||
</template>
|
||||
@@ -156,6 +156,7 @@
|
||||
@size-change="handleSizeChange11"
|
||||
@current-change="handleCurrentChange11"/>
|
||||
</div>
|
||||
<!--:row-class-name="tableRowClassName2"-->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="仓库" name="仓库">
|
||||
<el-row>
|
||||
@@ -165,7 +166,6 @@
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData22"
|
||||
:row-class-name="tableRowClassName2"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%;max-height: 500px;"
|
||||
@@ -213,8 +213,8 @@
|
||||
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" style="width: 140px" clearable/>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" size="small" style="width: 140px" clearable/>
|
||||
<el-input v-model="offlineContract" placeholder="离线合同号/供应商" size="small" style="width: 170px" clearable/>
|
||||
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" style="width: 140px" clearable/>-->
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
|
||||
<el-button type="warning" size="small" plain style="margin-left: 40px" @click="addMateriel">选入物料</el-button>
|
||||
@@ -303,7 +303,7 @@
|
||||
</div>
|
||||
<!--<h3>合同详细信息</h3>-->
|
||||
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="450px" size="mini" show-summary>
|
||||
<el-table-column label="物料名称" align="center" min-width="150" show-overflow-tooltip>
|
||||
<el-table-column label="物料名称" align="center" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -313,12 +313,12 @@
|
||||
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="200" show-overflow-tooltip>
|
||||
<el-table-column label="图号或型号" align="center" width="140" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<el-table-column label="采购数" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 0, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:60px" @change="saveContract()"/>
|
||||
<b v-else>{{ scope.row.数量 }}</b>
|
||||
@@ -329,29 +329,29 @@
|
||||
{{ scope.row.计量单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参考价格" align="center" min-width="70">
|
||||
<el-table-column label="参考价格" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.参考价格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价(未税)" align="center" width="110" prop="单价">
|
||||
<el-table-column label="单价(未税)元" align="center" width="110" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" :disabled="disable" size="mini" style="width:70px" @change="saveContract()"/>
|
||||
<b v-show="hasTax!=='未税'">{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价(含税)" align="center" min-width="140" prop="单价">
|
||||
<el-table-column label="单价(含税)元" align="center" width="110" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:120px" @change="saveContract()"/>
|
||||
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
|
||||
<b v-show="hasTax!=='含税'">{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总额(未税)" align="center" width="110" prop="合计">
|
||||
<el-table-column label="总额(未税)元" align="center" width="110" 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" width="110" prop="合计">
|
||||
<el-table-column label="总额(含税)元" align="center" width="110" 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>
|
||||
@@ -362,9 +362,9 @@
|
||||
<b v-else>{{ scope.row.备注 || '—' }}</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期" align="center" min-width="130" prop="交货期要求">
|
||||
<el-table-column label="交货期要求" align="center" min-width="130" prop="交货期要求">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
|
||||
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货要求" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
|
||||
<b v-else>{{ scope.row.交货期要求 || '—' }}</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -410,7 +410,7 @@
|
||||
<td>单价</td>
|
||||
<td>单位</td>
|
||||
<td colspan="2">合计</td>
|
||||
<td>交货期</td>
|
||||
<td>交货要求</td>
|
||||
<td colspan="2">备注</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -581,15 +581,15 @@
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title2==='创建离线合同'"
|
||||
type="primary"
|
||||
type="distribution"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
icon="el-icon-circle-check"
|
||||
@click="submitAddOfflineContract">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑离线合同'"
|
||||
type="primary"
|
||||
type="distribution"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
icon="el-icon-circle-check"
|
||||
@click="submitEditOfflineContract">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -1568,7 +1568,6 @@ export default {
|
||||
if (this.tabName === '外购件') { this.partType = 2 }
|
||||
if (this.tabName === '标准件') { this.partType = 1 }
|
||||
searchMaterial1(this.pageCurrent11, this.pageSize11, check1, this.materialName, this.id, check5, this.machineValue, check7, this.startTime[0], this.startTime[1]).then(response => {
|
||||
console.log(response.data, 111222)
|
||||
this.tableData00 = response.data.rows
|
||||
this.total11 = response.data.total
|
||||
const remark = []
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<el-row>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px;margin: 0px 10px"/>
|
||||
<el-input v-model="contractNumber" placeholder="合同编号" size="small" clearable style="width:180px;margin: 0px 10px"/>
|
||||
<el-input v-model="supplierName" placeholder="供应商/合同编号" size="small" clearable style="width:180px;margin: 0px 10px"/>
|
||||
<!--<el-input v-model="contractNumber" placeholder="合同编号" size="small" clearable style="width:180px;margin: 0px 10px"/>-->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@@ -55,7 +55,7 @@
|
||||
<!-- {{ scope.row.采购员 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="总金额" align="center" min-width="75">
|
||||
<el-table-column label="总金额(元)" align="center" min-width="75">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.合同总额).toFixed(2) }}
|
||||
</template>
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<!--<span>供应商:</span>-->
|
||||
<!--<el-input v-focus1="rec1" v-model="rec1" size="small"/>-->
|
||||
<!--<span>{{ rec1 }}</span>-->
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px" @keyup.enter.native="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()"/>
|
||||
<!--<span>合同编号:</span>-->
|
||||
<el-input v-model="contractNumber" placeholder="合同编号" size="small" clearable style="width:200px" @keyup.enter.native="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()"/>
|
||||
<!--<el-input v-model="contractNumber" placeholder="合同编号" size="small" clearable style="width:200px" @keyup.enter.native="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()"/>-->
|
||||
<!--<span>采购员:</span>-->
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
@@ -51,6 +53,18 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;margin: 3px 0"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@@ -75,42 +89,42 @@
|
||||
size="mini"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%"
|
||||
style="width: 1232px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="searchTable2">
|
||||
<el-table-column label="详情" type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-form-item label="交货日期">
|
||||
{{ scope.row.交货日期 }}
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="支付日期">
|
||||
{{ scope.row.支付日期 }}
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="支付方式">
|
||||
{{ scope.row.支付方式 }}
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="开票信息">
|
||||
{{ scope.row.开票信息 }}
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="其他说明">
|
||||
{{ scope.row.其他说明 }}
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="150" show-overflow-tooltip>
|
||||
<!--<el-table-column label="详情" type="expand">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-form label-position="left" inline class="demo-table-expand">-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="交货日期">-->
|
||||
<!--{{ scope.row.交货日期 }}-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="支付日期">-->
|
||||
<!--{{ scope.row.支付日期 }}-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="支付方式">-->
|
||||
<!--{{ scope.row.支付方式 }}-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="开票信息">-->
|
||||
<!--{{ scope.row.开票信息 }}-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="其他说明">-->
|
||||
<!--{{ scope.row.其他说明 }}-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--</el-form>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="180" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -120,12 +134,12 @@
|
||||
<!-- {{ scope.row.采购合同名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="采购合同号" prop="采购合同编号" align="center" min-width="150" show-overflow-tooltip>
|
||||
<el-table-column label="采购合同号" prop="采购合同编号" align="center" width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同审核" prop="审核情况内容" align="center" width="70">
|
||||
<el-table-column label="合同审核" prop="审核情况内容" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.审核情况内容==='未审核'">未审核</span>
|
||||
<span v-if="scope.row.审核情况内容==='通过审核'">已通过</span>
|
||||
@@ -135,7 +149,7 @@
|
||||
<!-- <el-tag v-if="scope.row.审核情况内容==='未通过审核'" type="danger" size="small">未通过</el-tag>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同审批" prop="审批情况内容" align="center" width="70">
|
||||
<el-table-column label="合同审批" prop="审批情况内容" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.审批情况内容==='未审批'">未审批</span>
|
||||
<span v-if="scope.row.审批情况内容==='通过审批'">已通过</span>
|
||||
@@ -145,32 +159,32 @@
|
||||
<!-- <el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="danger" size="small">未通过</el-tag>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未审核原因" align="center" min-width="90" show-overflow-tooltip>
|
||||
<el-table-column label="未审核原因" align="center" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审核原因 ? scope.row.未通过审核原因 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未审批原因" align="center" min-width="90" show-overflow-tooltip>
|
||||
<el-table-column label="未审批原因" align="center" width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过原因 ? scope.row.未通过原因 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" prop="姓名" align="center" width="60">
|
||||
<el-table-column label="采购员" prop="姓名" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" width="90">
|
||||
<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="90" show-overflow-tooltip>
|
||||
<el-table-column label="已付金额(元)" align="center" width="110" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" align="center" width="90" show-overflow-tooltip>
|
||||
<el-table-column label="欠款金额(元)" align="center" width="110" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
@@ -237,6 +251,36 @@ import $ from 'jquery'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rec1: '',
|
||||
dateRange: '',
|
||||
expands: [],
|
||||
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])
|
||||
}
|
||||
}]
|
||||
},
|
||||
contractNumber: '',
|
||||
searchView: '', // 图片预览
|
||||
approval: [{
|
||||
@@ -402,10 +446,11 @@ export default {
|
||||
this.textarea = ``
|
||||
this.loading1 = true
|
||||
this.disable = []
|
||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||
this.check1 = 0
|
||||
this.startEndDate = ''
|
||||
} else { this.check1 = 1 }
|
||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
||||
// 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
|
||||
@@ -417,7 +462,7 @@ export default {
|
||||
let check, check2
|
||||
this.contractNumber ? check = 1 : check = 0
|
||||
this.revieweValue ? check2 = 1 : check2 = 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, this.check5, this.approvalValue, check, this.contractNumber, check2, this.revieweValue).then(response => {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName, this.check5, this.approvalValue, check, this.contractNumber, check2, this.revieweValue).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].审批情况内容 === '未审批' ? this.disable.push(false) : this.disable.push(true) // 删除按钮禁用
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="">
|
||||
<div v-if="Number(token)===2" style="width:100%">
|
||||
<el-divider content-position="right">
|
||||
<div v-if="Number(token)===2" style="width:100%;height: 300px; overflow:auto;" >
|
||||
<el-divider content-position="right" style="background-color: #FFFFFF">
|
||||
<el-button type="text" @click="searchUnallocatePartNumber">刷新</el-button> | 待分配零件数
|
||||
</el-divider>
|
||||
<el-row >
|
||||
<el-row style="">
|
||||
<el-col v-for="(machine,index) in machines" :key="index" style="width: 200px">
|
||||
<el-card shadow="hover" class="sudoku_item" style="height:80px;width: 90%" @click.native="clickCard(machine.项目流水号, machine.机床流水号)">
|
||||
<el-badge :value="machine.未分配零件数">
|
||||
<el-card shadow="hover" class="sudoku_item" style="height:50px;width: 90%" @click.native="clickCard(machine.项目流水号, machine.机床流水号)">
|
||||
<el-badge :value="machine.未分配零件数" style="margin-top: 17px">
|
||||
<div style="width: 100px;height:50px;margin:0" class="sudoku_item">
|
||||
{{ machine.机床图号 }}
|
||||
</div>
|
||||
@@ -124,7 +124,7 @@
|
||||
:header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}"
|
||||
size="mini"
|
||||
height="740px"
|
||||
style="width: 1265px"
|
||||
style="width: 1363px"
|
||||
border
|
||||
stripe
|
||||
highlight-current-row
|
||||
@@ -193,6 +193,16 @@
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="radio===2" align="center" prop="分配日期" label="分配日期" min-width="100px" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务分配时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
|
||||
@@ -208,7 +218,7 @@
|
||||
<!--{{ scope.row.操作日期.split(' ')[0] }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column v-if="radio==='2'" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名">
|
||||
<el-table-column v-if="radio===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" width="80" prop="姓名">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
|
||||
</template>
|
||||
@@ -218,7 +228,7 @@
|
||||
<!--{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column v-if="radio==='2'" align="center" label="撤回分配" min-width="100px" fixed="right">
|
||||
<el-table-column v-if="radio===2" align="center" label="撤回分配" min-width="100px" width="120px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="撤回已分配的采购任务" placement="top">
|
||||
<el-button
|
||||
@@ -330,7 +340,7 @@
|
||||
<!--<el-button type="danger" size="small" icon="el-icon-back" style="margin-left: 10px" @click="executeReturn1">打回</el-button>-->
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-table v-loading="loading" :data="tableData1" size="mini" height="800px" style="width: 1255px" border stripe @selection-change="handleSelectionChange1">
|
||||
<el-table v-loading="loading" :data="tableData1" size="mini" height="800px" style="width: 1365px" border stripe @selection-change="handleSelectionChange1">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection" width="42px"/>
|
||||
<el-table-column align="center" prop="询价状态编号" label="进程" min-width="100px" width="60px">
|
||||
<template slot-scope="scope">
|
||||
@@ -390,6 +400,16 @@
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="radio===2" align="center" prop="分配日期" label="分配日期" min-width="100px" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务分配时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
|
||||
@@ -405,7 +425,7 @@
|
||||
<!--{{ scope.row.操作日期.split(' ')[0] }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column v-if="radio==='2'" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名">
|
||||
<el-table-column v-if="radio===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" width="80px" prop="姓名">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
|
||||
</template>
|
||||
@@ -415,11 +435,12 @@
|
||||
<!--{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column v-if="radio==='2'" align="center" label="撤回分配" min-width="100px" fixed="right">
|
||||
<el-table-column v-if="radio===2" align="center" label="撤回分配" min-width="100px" width="100px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')"
|
||||
plain
|
||||
type="repulse"
|
||||
size="mini"
|
||||
icon="el-icon-back"
|
||||
@click="retract(scope.row)">撤回</el-button>
|
||||
@@ -499,7 +520,7 @@
|
||||
<!--<el-button type="danger" size="small" icon="el-icon-back" style="margin-left: 10px" @click="executeReturn2">打回</el-button>-->
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-table v-loading="loading" :data="tableData2" size="mini" height="800px" style="width: 1303px" border stripe @selection-change="handleSelectionChange2">
|
||||
<el-table v-loading="loading" :data="tableData2" size="mini" height="800px" style="width: 1324px" border stripe @selection-change="handleSelectionChange2">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection" width="42px"/>
|
||||
<el-table-column align="center" prop="询价状态编号" label="进程" min-width="80px" width="60px">
|
||||
<template slot-scope="scope">
|
||||
@@ -514,7 +535,7 @@
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="零件名称" label="名称" width="160px" show-overflow-tooltip>
|
||||
<el-table-column align="center" prop="零件名称" label="名称" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -524,7 +545,7 @@
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="材料" width="180">
|
||||
<el-table-column align="center" label="材料" width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
@@ -539,7 +560,7 @@
|
||||
<!--{{ scope.row.项目名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px" width="120px">
|
||||
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
@@ -559,6 +580,16 @@
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="接收日期" label="接收日期" min-width="100px" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="radio===2" align="center" prop="分配日期" label="分配日期" min-width="100px" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务分配时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column align="center" label="计划到货时间" min-width="100px">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.物料计划到货时间.split(' ')[0] }}-->
|
||||
@@ -569,7 +600,7 @@
|
||||
<!--{{ scope.row.操作日期.split(' ')[0] }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column v-if="radio==='2'" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="buyer">
|
||||
<el-table-column v-if="radio===2" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" width="80px" prop="buyer">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
|
||||
</template>
|
||||
@@ -579,10 +610,11 @@
|
||||
<!--{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column v-if="radio==='2'" align="center" label="撤回分配" min-width="100px" fixed="right">
|
||||
<el-table-column v-if="radio===2" align="center" label="撤回分配" min-width="100px" width="100px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')"
|
||||
type="repulse"
|
||||
plain
|
||||
size="mini"
|
||||
icon="el-icon-back"
|
||||
@@ -656,6 +688,8 @@ export default {
|
||||
dateRange: '',
|
||||
timer2: '',
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
machines: [],
|
||||
source: [
|
||||
{
|
||||
@@ -901,8 +935,8 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable0() { // 查询标准件
|
||||
console.log(this.checked)
|
||||
this.checked ? this.radio = 2 : this.radio = 1
|
||||
console.log(this.checked, this.radio, 991)
|
||||
this.loading = true
|
||||
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
|
||||
@@ -931,8 +965,8 @@ export default {
|
||||
this.materialName ? this.check4 = 1 : this.check4 = 0
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
this.materialModel ? check3 = 1 : check3 = 0
|
||||
this.checked2 ? this.radio = 2 : this.radio = 1
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, parseInt(this.radio), check2, this.materialSpec, check3, this.materialModel, 2).then(response => {
|
||||
this.checked2 ? this.radio1 = 2 : this.radio1 = 1
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, parseInt(this.radio1), check2, this.materialSpec, check3, this.materialModel, 2).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.loading = false
|
||||
@@ -948,8 +982,8 @@ export default {
|
||||
this.partMaterial ? check4 = 1 : check4 = 0
|
||||
this.machineValue ? check5 = 1 : check5 = 0
|
||||
this.groupValue ? check6 = 1 : check6 = 0
|
||||
this.checked3 ? this.radio = 2 : this.radio = 1
|
||||
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, check5, this.machineValue, check6, this.groupValue, parseInt(this.radio), check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
|
||||
this.checked3 ? this.radio2 = 2 : this.radio2 = 1
|
||||
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, check5, this.machineValue, check6, this.groupValue, parseInt(this.radio2), check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
this.loading = false
|
||||
@@ -1192,6 +1226,7 @@ export default {
|
||||
line-height: 46px;
|
||||
}
|
||||
}
|
||||
|
||||
/*.el-table td.gutter,.el-table th.gutter{*/
|
||||
/*width: 15px;*/
|
||||
/*border-right-width: 0;*/
|
||||
@@ -1201,6 +1236,29 @@ export default {
|
||||
/*}*/
|
||||
</style>
|
||||
<style>
|
||||
/*!*滚动条凹槽的颜色,还可以设置边框属性 *!*/
|
||||
/*::-webkit-scrollbar-track-piece {*/
|
||||
/*background-color:#f8f8f8;*/
|
||||
/*-webkit-border-radius: 2em;*/
|
||||
/*-moz-border-radius: 2em;*/
|
||||
/*border-radius: 2em;*/
|
||||
/*}*/
|
||||
/*!*滚动条的宽度*!*/
|
||||
/*::-webkit-scrollbar {*/
|
||||
/*width:9px;*/
|
||||
/*}*/
|
||||
/*!*滚动条的设置*!*/
|
||||
/*::-webkit-scrollbar-thumb {*/
|
||||
/*background-color:#dddddd;*/
|
||||
/*background-clip:padding-box;*/
|
||||
/*-webkit-border-radius: 2em;*/
|
||||
/*-moz-border-radius: 2em;*/
|
||||
/*border-radius: 2em;*/
|
||||
/*}*/
|
||||
/*!*滚动条鼠标移上去*!*/
|
||||
/*::-webkit-scrollbar-thumb:hover {*/
|
||||
/*background-color:#bbb;*/
|
||||
/*}*/
|
||||
/*.el-table td.gutter,.el-table th.gutter{*/
|
||||
/*width: 15px;*/
|
||||
/*border-right-width: 0;*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container receiveCheck">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<el-select v-model="machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="machineChange">
|
||||
<el-select v-show="false" v-model="machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machines"
|
||||
:key="item.value"
|
||||
@@ -12,6 +12,7 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input v-model="machinenum" placeholder="机床图号/物料名称" size="small" style="width:200px;margin-left: 5px" clearable/>
|
||||
<!-- <span>项目名称:</span>-->
|
||||
<!-- <el-select v-model="projectValue" style="width:200px" placeholder="请选择" size="small" clearable filterable @change="projectChange">-->
|
||||
<!-- <el-option-->
|
||||
@@ -37,22 +38,25 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 10px" @click="searchProject()">查询</el-button>
|
||||
<el-tooltip v-show="true" :open-delay="1000" effect="dark" content="导出领用核算表" placement="top">
|
||||
<el-button type="primary" plain class="el-icon-download" size="small" style="margin: 10px 0 0 410px" @click="exportExcel">导出</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
:summary-method="getSummaries"
|
||||
style="width: 100%"
|
||||
style="width: 990px"
|
||||
height="650"
|
||||
size="mini"
|
||||
show-summary
|
||||
stripe
|
||||
border>
|
||||
<el-table-column align="center" label="序号" type="index"/>
|
||||
<el-table-column align="center" label="项目名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column align="center" label="序号" type="index"/>-->
|
||||
<!--<el-table-column align="center" label="项目名称">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.项目名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column align="center" label="机床图号" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
@@ -63,48 +67,66 @@
|
||||
{{ scope.row.组号 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料名称" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="物料名称" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料规格">
|
||||
<el-table-column align="center" label="物料规格" width="110px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料型号" min-width="150" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="物料型号" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="小计(元)" prop="小计">
|
||||
|
||||
<el-table-column label="采购数量" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.小计 ? scope.row.小计.toFixed(2) : 0 }}
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单价">
|
||||
<el-table-column align="center" label="采购单价" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
{{ Number(scope.row.单价).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用数量">
|
||||
<el-table-column align="center" label="领用数量" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用时间" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="小计(元)" prop="小计" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.小计 ? scope.row.小计.toFixed(2) : 0.00 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用时间" width="110px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间.substr(0,10) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div class="block" style="display: inline-block;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 50, 100, 150]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="display:inline-block;width:50px"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchGroup, searchReceiveCheck, getMachines } from '@/api/PurchasingCenter/ReceiveCheck'
|
||||
import { initProject, searchGroup, searchReceiveCheck, getMachines, searchsum } from '@/api/PurchasingCenter/ReceiveCheck'
|
||||
import Cookie from 'js-cookie'
|
||||
export default {
|
||||
data() {
|
||||
@@ -118,8 +140,10 @@ export default {
|
||||
tableData1: [],
|
||||
check1: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
pageSize: 50,
|
||||
total: 0,
|
||||
sum: 0,
|
||||
machinenum: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -196,28 +220,31 @@ export default {
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const { columns } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
return
|
||||
} else if (index === 7) {
|
||||
sums[index] = this.sum
|
||||
return
|
||||
}
|
||||
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)
|
||||
sums[index] = sums[index].toFixed(2)
|
||||
sums[index] += ' 元'
|
||||
} else {
|
||||
sums[index] = ''
|
||||
}
|
||||
// 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)
|
||||
// sums[index] = this.sum.toFixed(2)
|
||||
// sums[index] += ' 元'
|
||||
// } else {
|
||||
// sums[index] = ''
|
||||
// }
|
||||
})
|
||||
return sums
|
||||
},
|
||||
@@ -225,12 +252,46 @@ export default {
|
||||
// if (!this.projectValue) {
|
||||
// this.$message.error('请选择项目')
|
||||
// } else {
|
||||
let check2, check3
|
||||
let check2, check3, check4
|
||||
this.machine ? check2 = 1 : check2 = 0
|
||||
this.groupValue ? check3 = 1 : check3 = 0
|
||||
searchReceiveCheck(0, this.projectValue, check2, this.machine, check3, this.groupValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
this.machinenum ? check4 = 1 : check4 = 0
|
||||
searchReceiveCheck(0, this.projectValue, check2, this.machine, check3, this.groupValue, check4, this.machinenum, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData1 = response.data.result
|
||||
this.total = parseInt(response.data.output[0].ItemCount)
|
||||
}).then(() => {
|
||||
searchsum(0, this.projectValue, check2, this.machine, check3, this.groupValue, check4, this.machinenum).then(res => {
|
||||
console.log(res.data)
|
||||
this.sum = Number(res.data[0].合计).toFixed(2)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) { // 基本件列表分页
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchProject()
|
||||
},
|
||||
handleCurrentChange(val) { // 基本件列表分页
|
||||
this.pageCurrent = val
|
||||
this.searchProject()
|
||||
},
|
||||
exportExcel() {
|
||||
let check2, check3, check4
|
||||
this.machine ? check2 = 1 : check2 = 0
|
||||
this.groupValue ? check3 = 1 : check3 = 0
|
||||
this.machinenum ? check4 = 1 : check4 = 0
|
||||
// this.listLoading = true
|
||||
var param = []
|
||||
param[0] = ['项目流水号_check', 0]
|
||||
param[1] = ['项目流水号', this.projectValue]
|
||||
param[2] = ['机床流水号_check', check2]
|
||||
param[3] = ['机床流水号', this.machine]
|
||||
param[4] = ['组件流水号_check', check3]
|
||||
param[5] = ['组件流水号', this.groupValue]
|
||||
param[6] = ['机床号物料名称_check', check4]
|
||||
param[7] = ['机床号物料名称', check4]
|
||||
var Data = this.CreateData('2001', '采购管理_领用核算_查询数据_导出', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user