自制件出库
This commit is contained in:
@@ -5,8 +5,8 @@ export function search1() {
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '合同信息管理_项目名称_总_查询'
|
||||
type: '3',
|
||||
name: `select SUM(开票金额) as 开票金额,replace(convert(varchar(5), 操作时间, 121),'-','') as 开票时间 from 合同信息管理_开票记录_视图 group by replace(convert(varchar(5), 操作时间, 121),'-','')`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export function search3() {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: 'SELECT count(客户名称) as 客户数量,[省份] FROM [客户关系管理系统_客户_查询数据_MESWOR_视图]where [客户名称是否启用] = 1 group by [省份]'
|
||||
name: `select 项目名称,CONVERT(nvarchar(50),sum(已收金额)) as 已收金额,CONVERT(nvarchar(50),sum(应收金额)) as 应收金额,CONVERT(nvarchar(50),(sum(应收金额)-sum(已收金额))) as 待收金额 from 视图_分批资金查询 where 是否启用= 1 group by 项目流水号,项目名称`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,16 +17,16 @@ export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoic
|
||||
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
|
||||
export const uploadPerson = `http://192.168.1.231:8411/submit/uploadPerson.ashx`
|
||||
export const uploadOP = `http://192.168.1.231:8411/submit/uploadOP.ashx`
|
||||
export const url = `http://192.168.0.104:8079/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
|
||||
export const ExcelDownLoad = 'http://192.168.0.104:8079/submit/downloadFile.ashx' // 导出excel
|
||||
export const url = `http://192.168.1.231:8411/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
|
||||
export const ExcelDownLoad = 'http://192.168.1.231:8411/submit/downloadFile.ashx' // 导出excel
|
||||
// 技术中心程序发布时要更改下面所有的IP到0段
|
||||
export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
|
||||
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231
|
||||
export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231
|
||||
export const MESUploadFile = `http://192.168.0.110:8002/submit/MESUploadFile.ashx`
|
||||
export const MESDownloadFile = `http://192.168.0.110:8002/submit/MESDownloadFile.ashx`
|
||||
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
|
||||
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
||||
const service = axios.create({
|
||||
baseURL: `http://192.168.0.104:8079/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
export default service
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card v-loading="loading1" style="height: 450px">
|
||||
<span>项目完成进度查询</span>
|
||||
<span>年营销金额图表</span>
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="search1()">查询</el-button>
|
||||
<div id="myChart1" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
@@ -19,18 +19,11 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card v-loading="loading3" style="height: 450px">
|
||||
<span>年营销金额图表</span>
|
||||
<span>在执行项目金额及回款</span>
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="search3()">查询</el-button>
|
||||
<div id="myChart3" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card v-loading="loading4" style="height: 450px">
|
||||
<span>在执行项目金额及回款</span>
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="search4()">查询</el-button>
|
||||
<div id="myChart4" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@@ -63,8 +56,8 @@ export default {
|
||||
var dataX = []
|
||||
var lineData = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
dataX.push(data[i].项目名称)
|
||||
lineData.push((Math.random() * 100).toFixed(2))
|
||||
dataX.push(data[i].开票时间)
|
||||
lineData.push(data[i].开票金额)
|
||||
}
|
||||
var myChart1 = echarts.init(document.getElementById('myChart1'))
|
||||
myChart1.clear()
|
||||
@@ -75,26 +68,29 @@ export default {
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
right: '8%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
name: '项目名称',
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 40,
|
||||
margin: 10
|
||||
},
|
||||
name: '年份',
|
||||
// axisLabel: {
|
||||
// interval: 0,
|
||||
// rotate: 40,
|
||||
// margin: 10
|
||||
// },
|
||||
data: dataX
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '完成进度(%)',
|
||||
name: '金额',
|
||||
min: 0,
|
||||
scale: 'true'
|
||||
},
|
||||
@@ -180,69 +176,23 @@ export default {
|
||||
drawLine3(data) {
|
||||
var dataX = []
|
||||
var lineData = []
|
||||
var lineData2 = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
dataX.push({
|
||||
value: parseInt(data[i].客户数量),
|
||||
name: data[i].省份
|
||||
})
|
||||
lineData.push(data[i].省份)
|
||||
dataX.push(data[i].项目名称)
|
||||
lineData.push(data[i].已收金额)
|
||||
lineData2.push(data[i].待收金额)
|
||||
}
|
||||
var myChart3 = echarts.init(document.getElementById('myChart3'))
|
||||
myChart3.clear()
|
||||
myChart3.setOption({
|
||||
title: {
|
||||
text: '客户分布图',
|
||||
x: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: lineData
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '省份',
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
data: dataX,
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
search4() {
|
||||
this.loading1 = true
|
||||
var myChart1 = echarts.init(document.getElementById('myChart1'))
|
||||
myChart1.clear()
|
||||
search1().then(response => {
|
||||
this.loading1 = false
|
||||
this.drawLine1(response.data)
|
||||
})
|
||||
},
|
||||
drawLine4(data) {
|
||||
var dataX = []
|
||||
var lineData = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
dataX.push(data[i].项目名称)
|
||||
lineData.push((Math.random() * 100).toFixed(2))
|
||||
}
|
||||
var myChart1 = echarts.init(document.getElementById('myChart1'))
|
||||
myChart1.clear()
|
||||
myChart1.setOption({
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '直方图'
|
||||
data: ['已收金额', '待收金额']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
@@ -250,36 +200,44 @@ export default {
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
name: '项目名称',
|
||||
data: dataX,
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 40,
|
||||
margin: 10
|
||||
},
|
||||
data: dataX
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '完成进度(%)',
|
||||
min: 0,
|
||||
scale: 'true'
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '测量值',
|
||||
name: '已收金额',
|
||||
type: 'bar',
|
||||
data: lineData,
|
||||
stack: '总量',
|
||||
color: '#67C23A',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'inside'
|
||||
}
|
||||
},
|
||||
data: lineData
|
||||
},
|
||||
{
|
||||
name: '待收金额',
|
||||
type: 'bar',
|
||||
stack: '总量',
|
||||
color: 'rgb(213,58,53)',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'top'
|
||||
}
|
||||
}
|
||||
},
|
||||
data: lineData2
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@@ -101,10 +101,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="100">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="disabledPick === false">
|
||||
<el-input-number v-model="scope.row.数量" :min="1" label="描述文字" size="mini" controls-position="right" style="width:100px" @change="handleChange"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--<template v-if="disabledPick === false">-->
|
||||
<!--<el-input-number v-model="scope.row.数量" :min="1" label="描述文字" size="mini" controls-position="right" style="width:100px" @change="handleChange"/>-->
|
||||
<!--</template>-->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -68,18 +68,18 @@
|
||||
<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"
|
||||
type="daterange"
|
||||
align="center"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:250px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="timeChange1()"/>
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="startTime"-->
|
||||
<!--size="small"-->
|
||||
<!--type="daterange"-->
|
||||
<!--align="center"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--range-separator="~"-->
|
||||
<!--style="width:250px"-->
|
||||
<!--start-placeholder="开始日期"-->
|
||||
<!--end-placeholder="结束日期"-->
|
||||
<!--@change="timeChange1()"/>-->
|
||||
<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>
|
||||
@@ -280,18 +280,18 @@
|
||||
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable12()">查询</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:250px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="timeChange2()"/>
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="endTime"-->
|
||||
<!--size="small"-->
|
||||
<!--type="daterange"-->
|
||||
<!--align="center"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--range-separator="~"-->
|
||||
<!--style="width:250px"-->
|
||||
<!--start-placeholder="开始日期"-->
|
||||
<!--end-placeholder="结束日期"-->
|
||||
<!--@change="timeChange2()"/>-->
|
||||
<el-button type="success" size="small" 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
|
||||
@@ -1754,7 +1754,7 @@ export default {
|
||||
this.projectValue ? check4 = 1 : check4 = 0
|
||||
this.machineValue ? check5 = 1 : check5 = 0
|
||||
this.groupValue ? check6 = 1 : check6 = 0
|
||||
this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
|
||||
this.startTime ? check7 = 0 : (check7 = 0, this.startTime = '')
|
||||
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]).then(response => {
|
||||
this.tableData11 = response.data.rows
|
||||
this.total11 = response.data.total
|
||||
@@ -1793,7 +1793,7 @@ export default {
|
||||
this.projectValue ? check4 = 1 : check4 = 0
|
||||
this.machineValue ? check5 = 1 : check5 = 0
|
||||
this.groupValue ? check6 = 1 : check6 = 0
|
||||
this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '')
|
||||
this.endTime ? check7 = 0 : (check7 = 0, this.endTime = '')
|
||||
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]).then(response => {
|
||||
this.tableData12 = response.data.rows
|
||||
this.total12 = response.data.total
|
||||
|
||||
@@ -48,84 +48,56 @@
|
||||
</el-upload>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
style="width: 100%;max-height: 520px"
|
||||
height="520">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column
|
||||
label="机床图号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.机床图号 }}</template>
|
||||
<el-table v-loading="loading" :data="tableData" border size="mini" style="width: 100%;max-height: 520px" height="520">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="机床图号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件图号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.零件图号 }}</template>
|
||||
<el-table-column label="零件图号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件名称"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||
<el-table-column label="零件名称" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.组号 }}</template>
|
||||
<el-table-column label="组号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="材料"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.材料 }}</template>
|
||||
<el-table-column label="材料" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.零件备注 }}</template>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件类型"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.零件类型名称 }}</template>
|
||||
<el-table-column label="零件类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否导入"
|
||||
align="center">
|
||||
<el-table-column label="是否导入" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否导入)===1" type="success">已导入</el-tag>
|
||||
<el-tag v-else type="danger">未导入</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
min-width="50px"
|
||||
label="零件图纸"
|
||||
align="center">
|
||||
<el-table-column min-width="50px" label="零件图纸" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button circle icon="el-icon-search" size="small" @click="getNum(scope.row)"/>
|
||||
<!--<el-button slot="reference" type="success" icon="el-icon-search" circle size="mini"></el-button>-->
|
||||
<!--<el-button type="success" icon="el-icon-search" circle size="mini"></el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
min-width="80px"
|
||||
label="操作"
|
||||
align="center">
|
||||
<el-table-column min-width="80px" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!--<FileUpload ref="FileUpload" :num="scope.row.基本件流水号" table-name="机加工MES_零件图PDF表" @listenMsg ="listenMsgFromChid"/>-->
|
||||
<el-upload
|
||||
:disabled="disabled"
|
||||
:action="action"
|
||||
@@ -150,7 +122,6 @@
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:show-close="close"
|
||||
@@ -198,7 +169,7 @@ export default {
|
||||
loading: false,
|
||||
tableData: [],
|
||||
fileList: [],
|
||||
showFileList: true,
|
||||
showFileList: false,
|
||||
action: '',
|
||||
disabled: false,
|
||||
tableName: '机加工MES_零件图PDF表',
|
||||
@@ -275,11 +246,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getAction(row) {
|
||||
this.num = row.基本件流水号
|
||||
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}`
|
||||
this.num = row.零件图号
|
||||
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}&type=2`
|
||||
},
|
||||
batchImportOfDrawings() {
|
||||
this.action = `${MESUploadFile}?&num=${this.num1}&tableName=${this.tableName}`
|
||||
this.action = `${MESUploadFile}?&num=${this.num1}&tableName=${this.tableName}&type=1`
|
||||
},
|
||||
getNum(row) {
|
||||
this.row1 = row
|
||||
@@ -288,27 +259,38 @@ export default {
|
||||
this.getFileList(row.零件图号)
|
||||
},
|
||||
uploadSuccess(res, file, fileList) {
|
||||
console.log(res[0].result, 12345)
|
||||
this.getTableData()
|
||||
if (res[0].result === '1') {
|
||||
const index = fileList.indexOf(file)
|
||||
fileList.splice(index, 1)
|
||||
} else {
|
||||
this.str = res[0].result
|
||||
this.arr = this.str.split('|')
|
||||
console.log(this.arr[0], 0)
|
||||
console.log(this.arr[1], 1)
|
||||
if (this.arr[1] === '无该零件') {
|
||||
this.$notify.error(`${this.arr[0]}该零件不存在,请检查上传文件名称是否正确!`)
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}该零件不存在,请检查上传文件名称是否正确!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
if (this.arr[1] === '重复') {
|
||||
this.$notify.error(`${this.arr[0]}请勿重复上传!`)
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}请勿重复上传!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
if (this.arr[1] === '零件图号不正确') {
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}和所选图号不符!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
// this.$message.error(`${file.name}该零件不存在,请检查上传文件名称是否正确!`)
|
||||
}
|
||||
if (fileList.length === 0) {
|
||||
this.$message.success('文件上传成功')
|
||||
// this.$refs.FileDown.getFileList(this.num)
|
||||
this.getTableData()
|
||||
// this.getTableData()
|
||||
}
|
||||
},
|
||||
uploadFailure(a, file, fileList) {
|
||||
@@ -347,12 +329,9 @@ export default {
|
||||
this.getTableData()
|
||||
},
|
||||
async getFileList(value) {
|
||||
// console.log(this.row1.零件图号, 11111)
|
||||
// console.log(value, 121212)
|
||||
this.hadFile = []
|
||||
this.deleteShow === '1' ? this.isDeleteShow = true : this.isDeleteShow = false
|
||||
if (value) {
|
||||
// if (value === 1) {
|
||||
await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -362,7 +341,6 @@ export default {
|
||||
}
|
||||
}).then(data => {
|
||||
this.suffix = data.data
|
||||
console.log(this.suffix, 11111)
|
||||
if (data.data.length > 0) {
|
||||
if (this.operationType === '1') {
|
||||
data.data.map(item => {
|
||||
@@ -386,40 +364,6 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
// } else {
|
||||
// await request({
|
||||
// url: '',
|
||||
// method: 'post',
|
||||
// data: {
|
||||
// type: '3',
|
||||
// name: `select * from ${this.tableName} where 是否启用 = 1 and num = ${value}`
|
||||
// }
|
||||
// }).then(data => {
|
||||
// this.suffix = data.data
|
||||
// if (data.data.length > 0) {
|
||||
// if (this.operationType === '1') {
|
||||
// data.data.map(item => {
|
||||
// this.hadFile.push({
|
||||
// url: `${MESDownloadFile}?id=${item.uid}.${item.suffix}&name=${item.name}.${item.suffix}`,
|
||||
// name: `${item.name}.${item.suffix}`,
|
||||
// suffix: item.suffix,
|
||||
// id: item.uid
|
||||
// })
|
||||
// })
|
||||
// } else if (this.operationType === '0') {
|
||||
// const server = `${MESDownloadFile}`.split('/')
|
||||
// data.data.map(item => {
|
||||
// this.hadFile.push({
|
||||
// url: `http://${server[2]}/webpage/part/${item.uid}.${item.suffix}`,
|
||||
// name: `${item.name}.${item.suffix}`,
|
||||
// suffix: item.suffix,
|
||||
// id: item.uid
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
||||
},
|
||||
async deleteFileData(id) {
|
||||
@@ -439,9 +383,11 @@ export default {
|
||||
this.getTableData()
|
||||
if (response.data.length === 0) {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible = false
|
||||
this.getFileList(this.num)
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.dialogVisible = false
|
||||
this.getFileList(this.num)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user