更新到货通知、合同查询和工况页面

This commit is contained in:
Developer
2026-06-06 11:19:26 +08:00
parent d1cc111923
commit 6569ed2cf3
3 changed files with 48 additions and 16 deletions

View File

@@ -15,7 +15,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="pageCurrent = 1;pageSize = 30;searchTable()">查询</el-button>
<el-button type="distribution" icon="el-icon-plus" size="small" @click="addNotice()">发起通知</el-button>
<el-button type="distribution" icon="el-icon-plus" size="small" @click="addNotice()">生成入库单</el-button>
</div>
<el-row>
<el-col style="margin-top: 10px;width: 851px">

View File

@@ -216,7 +216,7 @@
</el-tooltip>
<el-tooltip :open-delay="500" content="查看修改记录" effect="dark" placement="top">
<el-button
:disabled="Number(scope.row.是否修改) === 0"
:disabled="Number(scope.row.是否修改) === 0 || (Number(token)!==2 && Number(token)!==3 && Number(token)!==11)"
icon="el-icon-tickets"
size="mini"
style="margin-right: 10px"
@@ -307,19 +307,19 @@
<td colspan="4" style="text-align: center;width: 37%">规格品名</td>
<td colspan="1" style="text-align: center;width: 9%">单位</td>
<td colspan="1" style="text-align: center;width: 9%">数量</td>
<td colspan="2" style="text-align: center;width: 18%">单价</td>
<td colspan="2" style="text-align: center;width: 18%">金额</td>
<td colspan="2" style="text-align: center;width: 18%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">单价</td>
<td colspan="2" style="text-align: center;width: 18%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">金额</td>
</tr>
<tr v-for="(list, index) in returns" :key="index" style="height: 35px">
<td colspan="1" style="text-align: center;width: 9%">{{ list.序号 }}</td>
<td colspan="4" style="text-align: left;width: 37%" v-html="list.规格品名.replace(/\n/g,'<br>')"/>
<td colspan="1" style="text-align: center;width: 9%">{{ list.单位 }}</td>
<td colspan="1" style="text-align: center;width: 9%">{{ list.数量 }}</td>
<td colspan="2" style="text-align: center;width: 18%">{{ list.单价 }}</td>
<td colspan="2" style="text-align: center;width: 18%">{{ list.金额 }}</td>
<td colspan="2" style="text-align: center;width: 18%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">{{ list.单价 }}</td>
<td colspan="2" style="text-align: center;width: 18%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">{{ list.金额 }}</td>
</tr>
<tfoot>
<tr style="height: 40px">
<tr style="height: 40px" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">
<td align="center" colspan="1">合计</td>
<td align="right" colspan="10"><span style="float: left;font-size: 16px">大写{{
TotalAmount
@@ -371,16 +371,16 @@
<td colspan="1" style="text-align: center;width: 52%">规格品名</td>
<td colspan="1" style="text-align: center;width: 8%">单位</td>
<td colspan="1" style="text-align: center;width: 8%">数量</td>
<td colspan="1" style="text-align: center;width: 12%">单价</td>
<td colspan="1" style="text-align: center;width: 12%">金额</td>
<td colspan="1" style="text-align: center;width: 12%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">单价</td>
<td colspan="1" style="text-align: center;width: 12%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">金额</td>
</tr>
<tr v-for="(list, index) in returns3" :key="index" style="height: 35px">
<td colspan="1" style="text-align: center;width: 8%">{{ list.序号 }}</td>
<td colspan="1" style="text-align: left;width: 52%">{{ list.规格品名 }}</td>
<td colspan="1" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="1" style="text-align: center;width: 8%">{{ list.数量 }}</td>
<td colspan="1" style="text-align: center;width: 12%">{{ list.单价 }}</td>
<td colspan="1" style="text-align: center;width: 12%">{{ list.金额 }}</td>
<td colspan="1" style="text-align: center;width: 12%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">{{ list.单价 }}</td>
<td colspan="1" style="text-align: center;width: 12%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">{{ list.金额 }}</td>
</tr>
</table>
</div>
@@ -685,10 +685,10 @@
<td colspan="1" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="1" style="text-align: center;width: 8%">{{ list.数量 }}</td>
<td colspan="2" style="text-align: center;width: 18%">{{ list.单价 }}</td>
<td colspan="2" style="text-align: center;width: 18%">{{ list.金额 }}</td>
<td colspan="2" style="text-align: center;width: 18%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">{{ list.金额 }}</td>
</tr>
<tfoot>
<tr style="height: 40px">
<tr style="height: 40px" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">
<td align="center" colspan="1">合计</td>
<td align="right" colspan="11"><span style="float: left;font-size: 16px">大写{{
TotalAmount4
@@ -711,10 +711,10 @@
<td colspan="1" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="1" style="text-align: center;width: 8%">{{ list.数量 }}</td>
<td colspan="2" style="text-align: center;width: 18%">{{ list.单价 }}</td>
<td colspan="2" style="text-align: center;width: 18%">{{ list.金额 }}</td>
<td colspan="2" style="text-align: center;width: 18%" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">{{ list.金额 }}</td>
</tr>
<tfoot>
<tr style="height: 40px">
<tr style="height: 40px" v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9">
<td align="center" colspan="1">合计</td>
<td align="right" colspan="11"><span style="float: left;font-size: 16px">大写{{
TotalAmount2

View File

@@ -32,8 +32,9 @@
end-placeholder="结束日期"
@change="searchTable1()"/>
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="pageCurrent = 1;pageSize = 20;searchTable1()">查询</el-button>
<el-button type="success" plain icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>
</div>
<el-table :data="tableData2" height="750px" style="width: 1280px" highlight-current-row border @sort-change="sortChange1">
<el-table :data="tableData2" height="750px" style="width: 1380px" highlight-current-row border @sort-change="sortChange1">
<el-table-column width="100px" align="center" label="操作者" sortable="姓名" prop="姓名" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
@@ -84,6 +85,16 @@
{{ scope.row.精工期限 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('完工期限')" align="center" label="开始日期" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.加工开始时间 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('完工期限')" align="center" label="完成日期" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.加工完成时间 }}
</template>
</el-table-column>
<el-table-column :width="setColumnWidth('数量')" align="center" label="已完成数" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.完成数 }}
@@ -107,6 +118,8 @@
<script>
import { mapGetters } from 'vuex'
import { getNowShotTime } from '@/utils/tool'
import XLSX from 'xlsx'
import FileSaver from 'file-saver'
export default {
data() {
return {
@@ -259,6 +272,25 @@ export default {
}
this.searchTable1()
},
exportExcel() {
if (this.tableData2.length === 0) {
this.$message.warning('暂无数据')
return
}
var data = [['操作者', '加工设备', '零件名称', '图号', '订单编号', '数量', '序号', '工序', '派工日期', '完工期限', '已完成数']]
this.tableData2.forEach(row => {
data.push([row.姓名, row.设备, row.零件名称, row.零件图号, row.订单号, row.数量, row.工序顺序, row.工序, row.分配时间, row.精工期限, row.完成数])
})
var ws = XLSX.utils.aoa_to_sheet(data)
ws['!cols'] = [
{ wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 },
{ wch: 8 }, { wch: 6 }, { wch: 10 }, { wch: 12 }, { wch: 12 }, { wch: 10 }
]
var wb = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(wb, ws, '工况')
var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'array' })
FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), '工况.xlsx')
},
handleSizeChanges(val) {
this.pageCurrent = 1
this.pageSize = val