Initial commit: 景耀JY1.0项目
This commit is contained in:
File diff suppressed because one or more lines are too long
21
.deepcode/projects/D-Microsoft VS Code/sessions-index.json
Normal file
21
.deepcode/projects/D-Microsoft VS Code/sessions-index.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"version": 1,
|
||||
"entries": [
|
||||
{
|
||||
"id": "05430cda-97de-4f23-a518-bd95e3640131",
|
||||
"summary": "1",
|
||||
"assistantReply": null,
|
||||
"assistantThinking": null,
|
||||
"assistantRefusal": null,
|
||||
"toolCalls": null,
|
||||
"status": "failed",
|
||||
"failReason": "OpenAI API key not found",
|
||||
"usage": null,
|
||||
"activeTokens": 0,
|
||||
"createTime": "2026-05-20T00:37:12.043Z",
|
||||
"updateTime": "2026-05-20T00:37:13.611Z",
|
||||
"processes": null
|
||||
}
|
||||
],
|
||||
"originalPath": "D:\\Microsoft VS Code"
|
||||
}
|
||||
9
.deepcode/settings.json
Normal file
9
.deepcode/settings.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"env": {
|
||||
"MODEL": "deepseek-v4-pro", // 你也可以换成 deepseek-v4-flash,后者响应更快
|
||||
"BASE_URL": "https://api.deepseek.com",
|
||||
"API_KEY": "sk-29bb79324c604ff79cb9c6108ef6e2ba"
|
||||
},
|
||||
"thinkingEnabled": true, // 开启深度思考模式,让AI的回答更周全
|
||||
"reasoningEffort": "max" // 控制推理强度,可选 high 或 max
|
||||
}
|
||||
@@ -27,7 +27,7 @@ module.exports = {
|
||||
// Use Eslint Loader?
|
||||
// If true, your code will be linted during bundling and
|
||||
// linting errors and warnings will be shown in the console.
|
||||
useEslint: true,
|
||||
useEslint: false,
|
||||
// If true, eslint errors and warnings will also be shown in the error overlay
|
||||
// in the browser.
|
||||
showEslintErrorsInOverlay: false,
|
||||
|
||||
BIN
dist(26.4.22PLM最终调试).7z
Normal file
BIN
dist(26.4.22PLM最终调试).7z
Normal file
Binary file not shown.
BIN
dist(26.4.22仓储需求).zip
Normal file
BIN
dist(26.4.22仓储需求).zip
Normal file
Binary file not shown.
BIN
dist(26.4.27).7z
Normal file
BIN
dist(26.4.27).7z
Normal file
Binary file not shown.
BIN
dist(26.4.27生产任务跳转).7z
Normal file
BIN
dist(26.4.27生产任务跳转).7z
Normal file
Binary file not shown.
BIN
dist(26.4.28) (2).7z
Normal file
BIN
dist(26.4.28) (2).7z
Normal file
Binary file not shown.
BIN
dist(26.4.28).7z
Normal file
BIN
dist(26.4.28).7z
Normal file
Binary file not shown.
BIN
dist(26.4.29) (2).7z
Normal file
BIN
dist(26.4.29) (2).7z
Normal file
Binary file not shown.
BIN
dist(26.4.29) (3).7z
Normal file
BIN
dist(26.4.29) (3).7z
Normal file
Binary file not shown.
BIN
dist(26.4.29).7z
Normal file
BIN
dist(26.4.29).7z
Normal file
Binary file not shown.
BIN
dist(26.4.2修改采购合同地址).zip
Normal file
BIN
dist(26.4.2修改采购合同地址).zip
Normal file
Binary file not shown.
BIN
dist设备实时数据,历史数据组件.zip
Normal file
BIN
dist设备实时数据,历史数据组件.zip
Normal file
Binary file not shown.
@@ -390,7 +390,7 @@ export function delPost(num1) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function quit(num1) {
|
||||
export function quit(num1, quitDate) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -399,7 +399,7 @@ export function quit(num1) {
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_人员_离职操作',
|
||||
param: '人员编号=' + num1 + '=int'
|
||||
param: '人员编号=' + num1 + '=int&离职日期=' + quitDate + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@ export default function fn(data, pid) {
|
||||
result.push(obj)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ import Layout from '../views/layout/Layout'
|
||||
export const constantRouterMap = [
|
||||
{ path: '/login', component: () => import('@/views/login/index'), hidden: true },
|
||||
{ path: '/404', component: () => import('@/views/404'), hidden: true },
|
||||
{ path: '/imageSave', component: () => import('@/views/TestPage/ImageSave'), hidden: true },
|
||||
|
||||
/* {
|
||||
path: '可视化中心',
|
||||
component: Layout,
|
||||
@@ -89,6 +91,7 @@ export const constantRouterMap = [
|
||||
component: () => import('@/views/dashboard/index')
|
||||
}]
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
export default new Router({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//to reset element-ui default css
|
||||
//to reset element-ui default css
|
||||
.el-upload {
|
||||
input[type="file"] {
|
||||
display: none !important;
|
||||
@@ -21,57 +21,69 @@
|
||||
.upload-container {
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//表头全局样式
|
||||
.el-table th{
|
||||
color: black;/*修改表格头部背景*/
|
||||
line-height: 40px!important;
|
||||
//font-family: YouYuan!important;
|
||||
font-Size: 13px!important;
|
||||
font-weight: 400!important;
|
||||
}
|
||||
.el-table__row{
|
||||
height: 36px!important;
|
||||
}
|
||||
.el-table__row td{
|
||||
padding: 3px 0!important;
|
||||
}
|
||||
.el-table th {
|
||||
color: black; /*修改表格头部背景*/
|
||||
//line-height: 40px!important;
|
||||
//font-family: YouYuan!important;
|
||||
font-Size: 13px !important;
|
||||
font-weight: 400 !important;
|
||||
fontFamily: 'MiSans Demibold'
|
||||
}
|
||||
|
||||
.el-tree-node__content>.el-tree-node__expand-icon{
|
||||
display: none;
|
||||
}
|
||||
//单击表格行变色
|
||||
.el-table__body tr.current-row>td{
|
||||
background-color: #d8e5f6 !important;
|
||||
/* color: #f19944; */ /* 设置文字颜色,可以选择不设置 */
|
||||
}
|
||||
//聚焦表格行变色
|
||||
.hover-row td{
|
||||
//background: RGB(236 245 255)!important;
|
||||
background: #d8e5f6!important;
|
||||
.el-table__row {
|
||||
height: 36px !important;
|
||||
}
|
||||
|
||||
}
|
||||
.el-table--enable-row-hover .el-table__body tr:hover>td{
|
||||
background-color: #d8e5f6 !important;
|
||||
}
|
||||
//.el-table tbody tr:hover>td { background-color: RED }
|
||||
//表格行颜色9745
|
||||
//.el-table td, .is-leaf{
|
||||
// background-color: rgb(255, 255, 255);
|
||||
// color: black;
|
||||
// font-weight:400
|
||||
//}
|
||||
.el-table--striped .el-table__body tr.el-table__row--striped td{
|
||||
background-color: #d8dde6;/*修改斑马线表格背景*/
|
||||
}
|
||||
.el-table thead.is-group th{
|
||||
background-color: rgb(98, 157, 209);
|
||||
}
|
||||
.el-table__row td {
|
||||
padding: 3px 0 !important;
|
||||
fontFamily: 'MiSans Demibold'
|
||||
}
|
||||
|
||||
.el-tree-node__content > .el-tree-node__expand-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
//单击表格行变色
|
||||
.el-table__body tr.current-row > td {
|
||||
background-color: #d8e5f6 !important;
|
||||
/* color: #f19944; */
|
||||
/* 设置文字颜色,可以选择不设置 */
|
||||
}
|
||||
|
||||
//聚焦表格行变色
|
||||
.hover-row td {
|
||||
//background: RGB(236 245 255)!important;
|
||||
background: #d8e5f6 !important;
|
||||
|
||||
}
|
||||
|
||||
.el-table--enable-row-hover .el-table__body tr:hover > td {
|
||||
background-color: #d8e5f6 !important;
|
||||
}
|
||||
|
||||
//.el-table tbody tr:hover>td { background-color: RED }
|
||||
//表格行颜色9745
|
||||
//.el-table td, .is-leaf{
|
||||
// background-color: rgb(255, 255, 255);
|
||||
// color: black;
|
||||
// font-weight:400
|
||||
//}
|
||||
.el-table--striped .el-table__body tr.el-table__row--striped td {
|
||||
background-color: #d8dde6; /*修改斑马线表格背景*/
|
||||
}
|
||||
|
||||
.el-table thead.is-group th {
|
||||
background-color: rgb(98, 157, 209);
|
||||
}
|
||||
|
||||
/* .el-textarea__inner,
|
||||
.el-radio__inner,
|
||||
@@ -80,3 +92,4 @@
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { ExcelDownLoad } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
import { service1 } from '@/utils/request'
|
||||
import Cookie from 'js-cookie'
|
||||
import { type } from './tool' // type判断传入值的类型,比typeof更详细
|
||||
export default {
|
||||
@@ -63,6 +64,13 @@ export default {
|
||||
data: num
|
||||
})
|
||||
}
|
||||
Vue.prototype.ExecDatabase1 = function(num) {
|
||||
return service1({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: num
|
||||
})
|
||||
}
|
||||
// 高精原CreateData
|
||||
// Vue.prototype.CreateData = function(type, name, data, pageSize, pageList) {
|
||||
// var paramStr = ''
|
||||
|
||||
@@ -4,7 +4,11 @@ import {
|
||||
downloadFileMachine_config,
|
||||
ExcelDownLoad_config,
|
||||
MESDownloadFile_config,
|
||||
MESDownloadFileNew_config,
|
||||
MESDeleteFileNew_config,
|
||||
MESUploadFile_config,
|
||||
MESUploadFileNew_config,
|
||||
MESUploadFileNew_BasePath_config,
|
||||
MESUploadFileProcess_config,
|
||||
MESUploadFileProduct_config,
|
||||
MESUploadFileProject_config,
|
||||
@@ -15,6 +19,7 @@ import {
|
||||
readFile_config,
|
||||
readImg_config,
|
||||
request_config,
|
||||
request_config1,
|
||||
ServerIP_config,
|
||||
upload2_config,
|
||||
upload3_config,
|
||||
@@ -59,6 +64,10 @@ export const MESUploadFileProduct = MESUploadFileProduct_config
|
||||
export const MESDownloadFile = MESDownloadFile_config
|
||||
export const MESUploadFileProject = MESUploadFileProject_config
|
||||
export const MESUploadFileProcess = MESUploadFileProcess_config
|
||||
export const MESUploadFileNew = MESUploadFileNew_config // 新的图片上传(存储到文件系统)
|
||||
export const MESDownloadFileNew = MESDownloadFileNew_config // 新的图片下载(从文件系统读取,返回base64)
|
||||
export const MESDeleteFileNew = MESDeleteFileNew_config // 新的图片删除(删除文件系统文件)
|
||||
export const MESUploadFileNew_BasePath = MESUploadFileNew_BasePath_config // 图片保存基础路径
|
||||
const service = axios.create({
|
||||
baseURL: request_config,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
@@ -82,6 +91,11 @@ service.interceptors.request.use(config => {
|
||||
Promise.reject(error)
|
||||
})
|
||||
|
||||
export const service1 = axios.create({
|
||||
baseURL: request_config1,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
|
||||
export default service
|
||||
|
||||
// async function getSession_id() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
highlight-current-row
|
||||
border
|
||||
size="small"
|
||||
style="width: 1220px"
|
||||
style="width: 1330px"
|
||||
height="400px"
|
||||
@row-click="searchTable1">
|
||||
<el-table-column width="65px" label="状态" align="center" prop="状态">
|
||||
@@ -42,6 +42,11 @@
|
||||
{{ scope.row.通用装配期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" label="装配数" align="center" prop="装配数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配数量 }}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
show-summary
|
||||
border
|
||||
size="small"
|
||||
style="width: 1451px"
|
||||
style="width: 1561px"
|
||||
height="740px"
|
||||
@sort-change="sortChange">
|
||||
<el-table-column width="65px" label="状态" align="center" prop="状态">
|
||||
@@ -73,6 +73,11 @@
|
||||
{{ scope.row.专机装配期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="装配数" align="center" prop="装配数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配数量 }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 20px">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row border size="small" style="width: 1220px" height="400px" @row-click="searchTable1">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row border size="small" style="width: 1330px" height="400px" @row-click="searchTable1">
|
||||
<el-table-column width="65px" label="状态" align="center" prop="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配状态 }}
|
||||
@@ -33,6 +33,11 @@
|
||||
{{ scope.row.通用装配期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" label="装配数" align="center" prop="装配数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配数量 }}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<!-- <el-button type="success" plain icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>-->
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row show-summary border size="small" style="width: 1406px" height="740px" @sort-change="sortChange">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row show-summary border size="small" style="width: 1516px" height="740px" @sort-change="sortChange">
|
||||
<el-table-column width="73px" label="任务状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务状态 }}
|
||||
@@ -89,6 +89,11 @@
|
||||
{{ scope.row.通用装配期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="124px" label="订单编号" align="center" prop="订单编号" sortable="订单编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<!-- <el-button type="success" plain icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>-->
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row show-summary border size="small" style="width: 1406px" height="740px" @sort-change="sortChange">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row show-summary border size="small" style="width: 1516px" height="740px" @sort-change="sortChange">
|
||||
<el-table-column width="75px" label="任务状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务状态 }}
|
||||
@@ -89,6 +89,11 @@
|
||||
{{ scope.row.通用装配期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('订单编号')" label="订单编号" align="center" prop="订单编号" sortable="订单编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1161px;float: left" height="280px" @row-click="searchTable1">
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1361px;float: left" height="280px" @row-click="searchTable1">
|
||||
<el-table-column width="130px" label="订单编号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
@@ -27,6 +27,11 @@
|
||||
{{ scope.row.订单备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="75px" label="下单人" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下单人 }}
|
||||
@@ -69,7 +74,7 @@
|
||||
<el-button type="text" size="mini" @click="handleStock"><svg-icon icon-class="库存查询" style="width: 30px;height: 30px"/></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table :data="tableData1" :header-cell-style="{background: '#2283D4',color: 'white'}" highlight-current-row border size="small" height="470px" style="width: 1368px">
|
||||
<el-table :data="tableData1" :header-cell-style="{background: '#2283D4',color: 'white'}" highlight-current-row border size="small" height="470px" style="width: 1361px">
|
||||
<el-table-column :width="setColumnWidth('产品名称')" label="部件名称" fixed align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
@@ -172,6 +177,11 @@
|
||||
{{ scope.row.订单备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="技术备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="90px" label="下单日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.创建日期 }}
|
||||
@@ -1151,7 +1161,7 @@ export default {
|
||||
},
|
||||
getMotorWheel() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '传动方式_获取电机轮新', param)
|
||||
var Data = this.CreateData('11', '传动方式_获取电机轮新_接收任务用', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.motorWheel.push({
|
||||
@@ -1481,7 +1491,7 @@ export default {
|
||||
})
|
||||
var param = []
|
||||
param[0] = ['传动方式流水号', this.transmissionModeId]
|
||||
var Data = this.CreateData('11', '传动方式_获取主轴轮', param)
|
||||
var Data = this.CreateData('11', '传动方式_获取主轴轮_接收任务用', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.spindleWheel.push({
|
||||
@@ -1499,7 +1509,7 @@ export default {
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
var Data2 = this.CreateData('11', '传动方式_获取皮带', param)
|
||||
var Data2 = this.CreateData('11', '传动方式_获取皮带_接收任务用', param)
|
||||
this.ExecDatabase(Data2).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.pulley.push({
|
||||
@@ -1535,7 +1545,7 @@ export default {
|
||||
this.pulley = []
|
||||
var param = []
|
||||
param[0] = ['传动方式流水号', this.transmissionModeId]
|
||||
var Data = this.CreateData('11', '传动方式_获取主轴轮', param)
|
||||
var Data = this.CreateData('11', '传动方式_获取主轴轮_接收任务用', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.spindleWheel.push({
|
||||
@@ -1553,7 +1563,7 @@ export default {
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
var Data2 = this.CreateData('11', '传动方式_获取皮带', param)
|
||||
var Data2 = this.CreateData('11', '传动方式_获取皮带_接收任务用', param)
|
||||
this.ExecDatabase(Data2).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.pulley.push({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1101px;float: left" height="350px" @row-click="searchTable1">
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1301px;float: left" height="350px" @row-click="searchTable1">
|
||||
<el-table-column :width="setColumnWidth('订单编号')" label="订单编号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
@@ -27,6 +27,11 @@
|
||||
{{ scope.row.订单备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="131px" label="技术备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('姓名')" label="下单人" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下单人 }}
|
||||
@@ -69,7 +74,7 @@
|
||||
<el-button type="text" size="mini" @click="handleStock"><svg-icon icon-class="库存查询" style="width: 30px;height: 30px"/></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table :data="tableData1" :header-cell-style="{background: '#2283D4',color: 'white'}" highlight-current-row border size="small" height="470px" style="width: 1271px">
|
||||
<el-table :data="tableData1" :header-cell-style="{background: '#2283D4',color: 'white'}" highlight-current-row border size="small" height="470px" style="width: 1301px">
|
||||
<el-table-column width="60px" label="序号" type="index" fixed align="center"/>
|
||||
<el-table-column width="140px" label="部件名称" fixed align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<el-row>
|
||||
<el-col style="margin-left: 7px;width: 731px">
|
||||
<el-col style="margin-left: 7px;width: 831px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 49px">
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="mini" style="width: 731px;margin-top: 41px" height="550px" @row-click="searchTable1" >
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="mini" style="width: 831px;margin-top: 41px" height="550px" @row-click="searchTable1" >
|
||||
<el-table-column width="130px" label="订单编号" align="center" prop="订单编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
@@ -41,11 +41,17 @@
|
||||
{{ scope.row.订单备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="55px" label="操作" align="center" show-overflow-tooltip>
|
||||
<el-table-column label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" label="操作" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="500" effect="dark" content="查看客户提供资料" placement="top">
|
||||
<el-button type="text" icon="el-icon-picture-outline" size="mini" @click="ContractPhoto(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-button type="text" icon="el-icon-right" size="mini" @click="goBack(scope.row)">打回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -140,6 +146,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleBackOrder" width="920px" style="height: 700px">
|
||||
<p style="font-size: 25px;">请填写订单编号为 {{ BackOrderNo }} 的打回原因</p>
|
||||
<el-input v-model="backOrderReason" :rows="10" type="textarea" style="width: 875px;"/>
|
||||
<div style="margin-left: 330px;margin-top: 20px">
|
||||
<el-button size="small" @click="callOffBackOrder('form')">取消打回</el-button>
|
||||
<el-button style="margin-left: 90px" type="primary" size="small" @click="submitBackOrder('form')">确定打回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -164,7 +178,12 @@ export default {
|
||||
groupNum: [],
|
||||
assemblyNum: [],
|
||||
tableData: [], // 订单信息表
|
||||
tableData1: [] // 产品信息表
|
||||
tableData1: [], // 产品信息表
|
||||
// 打回功能
|
||||
BackOrderNo: '',
|
||||
backOrderReason: '',
|
||||
orderSerialNumber: '',
|
||||
dialogFormVisibleBackOrder: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -366,6 +385,49 @@ export default {
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
// 打回功能
|
||||
goBack(row) {
|
||||
this.BackOrderNo = row.订单编号
|
||||
this.orderSerialNumber = row.订单流水号
|
||||
this.dialogFormVisibleBackOrder = true
|
||||
},
|
||||
submitBackOrder() {
|
||||
if (this.backOrderReason === '' || this.backOrderReason === null) {
|
||||
this.$message.error('请填写详细的打回原因')
|
||||
} else {
|
||||
this.$confirm('是否打回任务?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = []
|
||||
param[0] = ['订单流水号', this.orderSerialNumber]
|
||||
param[1] = ['打回原因', this.backOrderReason]
|
||||
param[2] = ['打回人员', this.id]
|
||||
param[3] = ['类型', 0]
|
||||
var Data = this.CreateData('12', '装配管理_打回任务', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('打回成功')
|
||||
this.dialogFormVisibleBackOrder = false
|
||||
this.searchTable()
|
||||
this.tableData1 = []
|
||||
} else {
|
||||
this.$message.success('打回失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消打回'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
callOffBackOrder() {
|
||||
this.dialogFormVisibleBackOrder = false
|
||||
this.backOrderReason = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- <el-button type="success" plain icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>-->
|
||||
</div>
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row show-summary border size="small" style="width: 1575px" height="750px" @sort-change="sortChange">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" highlight-current-row show-summary border size="small" style="width: 1685px" height="750px" @sort-change="sortChange">
|
||||
<el-table-column width="100px" label="任务状态" align="center" prop="任务状态" sortable="任务状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务状态 }}
|
||||
@@ -85,6 +85,11 @@
|
||||
{{ scope.row.专机装配期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="技术备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('订单编号')" label="订单编号" align="center" prop="订单编号" sortable="订单编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
|
||||
@@ -3,36 +3,56 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd('department_Form')">新增</el-button>
|
||||
<el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit()">编辑</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable()">删除</el-button>
|
||||
<el-button
|
||||
icon="el-icon-circle-plus-outline"
|
||||
size="small"
|
||||
type="distribution"
|
||||
@click="handleAdd('department_Form')">新增
|
||||
</el-button>
|
||||
<el-button icon="el-icon-edit" plain size="small" type="warning" @click="handleEdit()">编辑</el-button>
|
||||
<el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteTable()">删除</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-card>
|
||||
<span>人员名称:</span>
|
||||
<el-input v-model="Name" placeholder="请输入人员名称" class="input-with-select" size="small" style="width: 200px; margin-right: 15px" clearable>
|
||||
<el-input
|
||||
v-model="Name"
|
||||
class="input-with-select"
|
||||
clearable
|
||||
placeholder="请输入人员名称"
|
||||
size="small"
|
||||
style="width: 200px; margin-right: 15px">
|
||||
<el-button slot="append" icon="el-icon-search" @click="fetchPeopleForName"/>
|
||||
</el-input>
|
||||
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="addPeople()">新增</el-button>
|
||||
<el-button type="danger" icon="el-icon-circle-close-outline" size="small" plain @click="Quit()">离职</el-button>
|
||||
<el-button type="text" size="small" style="float: right" plain @click="searchLeavingList">离职名单</el-button>
|
||||
<el-button v-popover:popover4 :disabled="disabledMove" type="success" icon="el-icon-sort" size="small" plain @click="moveGroup">移动
|
||||
<el-button icon="el-icon-circle-plus-outline" size="small" type="distribution" @click="addPeople()">新增
|
||||
</el-button>
|
||||
<el-button icon="el-icon-circle-close-outline" plain size="small" type="danger" @click="Quit()">离职
|
||||
</el-button>
|
||||
<el-button plain size="small" style="float: right" type="text" @click="searchLeavingList">离职名单</el-button>
|
||||
<el-button
|
||||
v-popover:popover4
|
||||
:disabled="disabledMove"
|
||||
icon="el-icon-sort"
|
||||
plain
|
||||
size="small"
|
||||
type="success"
|
||||
@click="moveGroup">移动
|
||||
</el-button>
|
||||
<!--<el-button size="small" @click="postMaintain()">岗位维护</el-button>-->
|
||||
<el-popover
|
||||
ref="popover4"
|
||||
width="178"
|
||||
placement="right"
|
||||
trigger="click"
|
||||
width="178"
|
||||
@hide="hide()">
|
||||
<el-dropdown size="small" placement="bottom-start" style="margin-right: 0">
|
||||
<el-dropdown placement="bottom-start" size="small" style="margin-right: 0">
|
||||
<el-input
|
||||
v-model="nodeName1"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
placeholder="请选择部门"/>
|
||||
<el-button type="text" size="small" style="margin-left: 60px; margin-top: 15px" @click="moveGroupConfim">
|
||||
placeholder="请选择部门"
|
||||
size="small"/>
|
||||
<el-button size="small" style="margin-left: 60px; margin-top: 15px" type="text" @click="moveGroupConfim">
|
||||
确认
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
@@ -40,9 +60,9 @@
|
||||
ref="treeForm"
|
||||
:data="departmentData"
|
||||
:props="defaultProps"
|
||||
style="width: 150px"
|
||||
node-key="id"
|
||||
accordion
|
||||
node-key="id"
|
||||
style="width: 150px"
|
||||
@node-click="NodeClick"/>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -63,10 +83,10 @@
|
||||
ref="treeForm"
|
||||
:data="departmentData"
|
||||
:props="defaultProps"
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
check-strictly
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
show-checkbox
|
||||
@check-change="handleClick"/>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -76,13 +96,13 @@
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="List"
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
border
|
||||
height="659"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
align="center"
|
||||
@@ -93,15 +113,19 @@
|
||||
<el-popover
|
||||
v-if="scope.row.文件标识 && scope.row.文件标识 !== 'null'"
|
||||
placement="top-start"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<el-button type="text" style="float:right" @click="deletePhoto(scope.row)">删除</el-button>
|
||||
<el-image :src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'">
|
||||
trigger="hover"
|
||||
width="200">
|
||||
<el-button style="float:right" type="text" @click="deletePhoto(scope.row)">删除</el-button>
|
||||
<el-image
|
||||
:src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-picture-outline"/>
|
||||
</div>
|
||||
</el-image>
|
||||
<el-image slot="reference" :src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'" style="width:23px;">
|
||||
<el-image
|
||||
slot="reference"
|
||||
:src="scope.row.文件标识 && scope.row.文件标识 !== 'null' ? (readFile + scope.row.文件标识 + '.' + scope.row.文件后缀) : readFile + '123.jpg'"
|
||||
style="width:23px;">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-picture-outline"/>
|
||||
</div>
|
||||
@@ -147,12 +171,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="入职时间" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入公司时间 !== '' && scope.row.入公司时间 !== null ? scope.row.入公司时间 = scope.row.入公司时间.split(' ')[0]: scope.row.入公司时间 }}
|
||||
{{
|
||||
scope.row.入公司时间 !== '' && scope.row.入公司时间 !== null ? scope.row.入公司时间 = scope.row.入公司时间.split(' ')[0] : scope.row.入公司时间
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出生日期" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出生日期 !== '' && scope.row.出生日期 !== null ? scope.row.出生日期 = scope.row.出生日期.split(' ')[0]: scope.row.出生日期 }}
|
||||
{{
|
||||
scope.row.出生日期 !== '' && scope.row.出生日期 !== null ? scope.row.出生日期 = scope.row.出生日期.split(' ')[0] : scope.row.出生日期
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系方式" width="110">
|
||||
@@ -175,44 +203,47 @@
|
||||
{{ scope.row.家庭住址 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="420">
|
||||
<el-table-column align="center" fixed="right" label="操作" width="420">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.文件标识 && scope.row.文件标识 !== 'null'"
|
||||
icon="el-icon-picture"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-picture"
|
||||
@click="handlePicture(scope.row)">上传图片</el-button>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="上传存档" placement="top">
|
||||
@click="handlePicture(scope.row)">上传图片
|
||||
</el-button>
|
||||
<el-tooltip :open-delay="700" content="上传存档" effect="dark" placement="top">
|
||||
<el-button
|
||||
icon="el-icon-upload"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-upload"
|
||||
@click="handleWord(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-picture"
|
||||
@click="getPictureWord(scope.row)">查看存档</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="getPictureWord(scope.row)">查看存档
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-edit"
|
||||
@click="handleEditPeople(scope.row)">编辑</el-button>
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="danger"-->
|
||||
<!--icon="el-icon-delete"-->
|
||||
<!--@click="deletePeopleTable(scope.row)">删除</el-button>-->
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleEditPeople(scope.row)">编辑
|
||||
</el-button>
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="danger"-->
|
||||
<!--icon="el-icon-delete"-->
|
||||
<!--@click="deletePeopleTable(scope.row)">删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="PageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@@ -223,21 +254,55 @@
|
||||
</el-row>
|
||||
|
||||
<!--新增和编辑部门-->
|
||||
<el-dialog v-el-drag-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="department_Form" :model="department_Form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:title="department_Title"
|
||||
:visible.sync="department_DFV"
|
||||
center
|
||||
style="min-height: 200px"
|
||||
width="400px">
|
||||
<el-form
|
||||
ref="department_Form"
|
||||
:model="department_Form"
|
||||
:rules="rules"
|
||||
class="demo-ruleForm"
|
||||
label-position="left"
|
||||
label-width="110px">
|
||||
<el-form-item label="部门名称" prop="DepartmentName">
|
||||
<el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button v-if="department_Title==='新增部门'" :disabled="handleAdd_disable" type="primary" @click="submitAdd('department_Form')">确定</el-button>
|
||||
<el-button v-else-if="department_Title==='编辑部门'" :disabled="handleAdd_disable" type="primary" @click="submitEdit('department_Form')">确定</el-button>
|
||||
<el-button
|
||||
v-if="department_Title==='新增部门'"
|
||||
:disabled="handleAdd_disable"
|
||||
type="primary"
|
||||
@click="submitAdd('department_Form')">确定
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else-if="department_Title==='编辑部门'"
|
||||
:disabled="handleAdd_disable"
|
||||
type="primary"
|
||||
@click="submitEdit('department_Form')">确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="people_title" :visible.sync="people_DFV" center style="min-height: 200px" width="800px">
|
||||
<el-form ref="people_form" :rules="rules" :model="people_form" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:title="people_title"
|
||||
:visible.sync="people_DFV"
|
||||
center
|
||||
style="min-height: 200px"
|
||||
width="800px">
|
||||
<el-form
|
||||
ref="people_form"
|
||||
:model="people_form"
|
||||
:rules="rules"
|
||||
class="demo-ruleForm"
|
||||
label-position="left"
|
||||
label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="考勤编号" prop="AccountNumber">
|
||||
@@ -256,7 +321,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="Sex">
|
||||
<el-select v-model="people_form.Sex" clearable placeholder="请选择性别" style="width: 200px" size="small">
|
||||
<el-select v-model="people_form.Sex" clearable placeholder="请选择性别" size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in SexData"
|
||||
:key="item.value"
|
||||
@@ -269,11 +334,11 @@
|
||||
<el-form-item label="出生日期" prop="Birthday">
|
||||
<el-date-picker
|
||||
v-model="people_form.Birthday"
|
||||
style="width: 200px"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择出生日期"
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
type="date"
|
||||
placeholder="请选择出生日期"/>
|
||||
value-format="yyyy-MM-dd"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -285,11 +350,11 @@
|
||||
<el-form-item label="入职时间" prop="TimeOfEntry">
|
||||
<el-date-picker
|
||||
v-model="people_form.TimeOfEntry"
|
||||
style="width: 200px"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择入职时间"
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
type="date"
|
||||
placeholder="请选择入职时间"/>
|
||||
value-format="yyyy-MM-dd"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -299,7 +364,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学历" prop="Education">
|
||||
<el-select v-model="people_form.Education" clearable placeholder="请选择学历" style="width: 200px" size="small">
|
||||
<el-select
|
||||
v-model="people_form.Education"
|
||||
clearable
|
||||
placeholder="请选择学历"
|
||||
size="small"
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in EducationDate"
|
||||
:key="item.value"
|
||||
@@ -320,7 +390,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组" prop="Post">
|
||||
<el-select v-model="people_form.TeamValue" clearable placeholder="请选择班组" style="width: 200px" size="small">
|
||||
<el-select
|
||||
v-model="people_form.TeamValue"
|
||||
clearable
|
||||
placeholder="请选择班组"
|
||||
size="small"
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Team"
|
||||
:key="item.value"
|
||||
@@ -333,22 +408,40 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="btnLoading" @click="cancel">取消</el-button>
|
||||
<el-button v-if="people_title === '新增人员'" :disabled="addPeople_disable" :loading="btnLoading" type="primary" @click="submitAddPeople">确定</el-button>
|
||||
<el-button v-else-if="people_title === '编辑人员'" :disabled="addPeople_disable" :loading="btnLoading" type="primary" @click="submitEditPeople">确定</el-button>
|
||||
<el-button
|
||||
v-if="people_title === '新增人员'"
|
||||
:disabled="addPeople_disable"
|
||||
:loading="btnLoading"
|
||||
type="primary"
|
||||
@click="submitAddPeople">确定
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else-if="people_title === '编辑人员'"
|
||||
:disabled="addPeople_disable"
|
||||
:loading="btnLoading"
|
||||
type="primary"
|
||||
@click="submitEditPeople">确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--离职名单-->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="LeavingListVisiable" title="离职名单" center style="height: 800px" width="80%">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="LeavingListVisiable"
|
||||
center
|
||||
style="height: 800px"
|
||||
title="离职名单"
|
||||
width="80%">
|
||||
<el-table
|
||||
:data="LeavingList"
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
border
|
||||
height="500"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini">
|
||||
size="mini"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
tooltip-effect="dark">
|
||||
<el-table-column align="center" label="部门名称" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.节点名称 }}
|
||||
@@ -386,12 +479,23 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="入职时间" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入公司时间 !== '' && scope.row.入公司时间 !== null ? scope.row.入公司时间 = scope.row.入公司时间.split(' ')[0]: scope.row.入公司时间 }}
|
||||
{{
|
||||
scope.row.入公司时间 !== '' && scope.row.入公司时间 !== null ? scope.row.入公司时间 = scope.row.入公司时间.split(' ')[0] : scope.row.入公司时间
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="离职日期" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.离职日期 !== '' && scope.row.离职日期 !== null ? scope.row.离职日期 = scope.row.离职日期.split(' ')[0] : scope.row.离职日期
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出生日期" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出生日期 !== '' && scope.row.出生日期 !== null ? scope.row.出生日期 = scope.row.出生日期.split(' ')[0]: scope.row.出生日期 }}
|
||||
{{
|
||||
scope.row.出生日期 !== '' && scope.row.出生日期 !== null ? scope.row.出生日期 = scope.row.出生日期.split(' ')[0] : scope.row.出生日期
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系方式" width="110">
|
||||
@@ -414,83 +518,154 @@
|
||||
{{ scope.row.家庭住址 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<el-table-column align="center" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-circle-close-outline"
|
||||
@click="deletePeople(scope.row)">删除</el-button>
|
||||
size="mini"
|
||||
style="margin: 0"
|
||||
type="success"
|
||||
@click="recoverPeople(scope.row)">复职
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-circle-close-outline"
|
||||
size="mini"
|
||||
style="margin: 0"
|
||||
type="danger"
|
||||
@click="deletePeople(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrentN"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="PageSizeN"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:total="totalN"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChangeN"
|
||||
@current-change="handleCurrentChangeN"/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="上传图片" center style="height: 800px" width="30%">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisible"
|
||||
center
|
||||
style="height: 800px"
|
||||
title="上传图片"
|
||||
width="30%">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
ref="upload"
|
||||
:multiple="true"
|
||||
:auto-upload="false"
|
||||
:on-success="uploadSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:action="upload+'?num='+ PersonId"
|
||||
:auto-upload="false"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="limit"
|
||||
:multiple="true"
|
||||
:on-exceed="warningExceed"
|
||||
:on-success="uploadSuccess"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible=false">取消</el-button>
|
||||
<el-button type="primary" style="width: 70px" @click="submitPerson()">确定</el-button>
|
||||
<el-button style="width: 70px" type="primary" @click="submitPerson()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="上传存档" center style="height: 800px" width="30%">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisible1"
|
||||
center
|
||||
style="height: 800px"
|
||||
title="上传存档"
|
||||
width="30%">
|
||||
<el-upload
|
||||
id="invoiceScan1"
|
||||
ref="upload1"
|
||||
:multiple="true"
|
||||
:auto-upload="false"
|
||||
:on-success="uploadSuccess1"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:before-upload="beforeUpload"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:data="Data"
|
||||
:action="upload1"
|
||||
style="margin-left: 60px"
|
||||
list-type="picture-card">
|
||||
:auto-upload="false"
|
||||
:before-upload="beforeUpload"
|
||||
:data="Data"
|
||||
:limit="limit"
|
||||
:multiple="true"
|
||||
:on-exceed="warningExceed"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-success="uploadSuccess1"
|
||||
list-type="picture-card"
|
||||
style="margin-left: 60px">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible1=false">取消</el-button>
|
||||
<el-button type="primary" style="width: 70px" @click="submitPersonWord()">确定</el-button>
|
||||
<el-button style="width: 70px" type="primary" @click="submitPersonWord()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" title="图片" center style="" width="560px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" center style="" title="图片" width="560px">
|
||||
<div v-for="(url, key) in urls" :key="key" style="margin-bottom: 25px">
|
||||
<!-- <div class="action">-->
|
||||
<!-- <a class="delete" @click="deleteFileData1(url.id)">删除</a>-->
|
||||
<!-- </div>-->
|
||||
<el-button type="danger" size="mini" style="float: right;margin-bottom: 5px;margin-right: 10px" @click="deleteFileData1(url.id)">删除</el-button>
|
||||
<el-image :key="url.url" :src="url.url" :preview-src-list="urls1" lazy style="width: 500px; height: 500px"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
style="float: right;margin-bottom: 5px;margin-right: 10px"
|
||||
type="danger"
|
||||
@click="deleteFileData1(url.id)">删除
|
||||
</el-button>
|
||||
<el-image :key="url.url" :preview-src-list="urls1" :src="url.url" lazy style="width: 500px; height: 500px"/>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!--离职时间选择对话框-->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:title="'选择离职时间'"
|
||||
:visible.sync="quitDialogVisible"
|
||||
center
|
||||
width="400px">
|
||||
<el-form
|
||||
ref="quitForm"
|
||||
:model="quitForm"
|
||||
class="demo-ruleForm"
|
||||
label-position="left"
|
||||
label-width="110px">
|
||||
<el-form-item label="离职时间" prop="quitDate">
|
||||
<el-date-picker
|
||||
v-model="quitForm.quitDate"
|
||||
placeholder="请选择离职时间"
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="quitDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmQuit">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fetchteamviwer, moveGroups, getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, fetchEducationData, fetchPostData, addPeople, editPeople, quit, searchLeavingList } from '@/api/BasicData/PersonnelManagement'
|
||||
import {
|
||||
fetchteamviwer,
|
||||
moveGroups,
|
||||
getTree,
|
||||
tree,
|
||||
getTablePeople,
|
||||
getTablePeopleForName,
|
||||
addDepartmentName,
|
||||
delList,
|
||||
editList,
|
||||
fetchEducationData,
|
||||
fetchPostData,
|
||||
addPeople,
|
||||
editPeople,
|
||||
quit,
|
||||
searchLeavingList
|
||||
} from '@/api/BasicData/PersonnelManagement'
|
||||
import { uploadPerson } from '@/utils/request'
|
||||
import { readFile } from '@/utils/request'
|
||||
import { url } from '@/utils/request'
|
||||
@@ -591,7 +766,11 @@ export default {
|
||||
count1: 0,
|
||||
count2: 0,
|
||||
urls: [],
|
||||
urls1: []
|
||||
urls1: [],
|
||||
quitDialogVisible: false,
|
||||
quitForm: {
|
||||
quitDate: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -690,6 +869,30 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
recoverPeople(row) {
|
||||
this.$confirm('此操作将恢复该离职员工为在职状态, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = []
|
||||
param[0] = ['考勤编号', row.考勤编号]
|
||||
var Data = this.CreateData('12', '人事档案管理_人员_恢复离职', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('复职成功')
|
||||
this.searchLeavingList()
|
||||
} else {
|
||||
this.$message.error('复职失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消复职'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 删除人员照片
|
||||
deletePhoto(row) {
|
||||
this.$confirm('此操作将永久删除该图片, 是否继续?', '提示', {
|
||||
@@ -1041,30 +1244,43 @@ export default {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请选择进行离职操作的员工')
|
||||
} else {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
quit(this.multipleSelection[i].人员编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离职成功')
|
||||
getTablePeople(this.id, this.PageCurrent, this.PageSize).then(response => {
|
||||
this.List = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
} else { this.$message.error('离职失败') }
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消离职操作'
|
||||
})
|
||||
})
|
||||
// 打开离职时间选择对话框
|
||||
this.quitForm.quitDate = ''
|
||||
this.quitDialogVisible = true
|
||||
}
|
||||
},
|
||||
confirmQuit() {
|
||||
if (!this.quitForm.quitDate) {
|
||||
this.$message.warning('请选择离职时间')
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('此操作将处理所选员工的离职, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
quit(this.multipleSelection[i].人员编号, this.quitForm.quitDate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离职成功')
|
||||
getTablePeople(this.id, this.PageCurrent, this.PageSize).then(response => {
|
||||
this.List = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
} else {
|
||||
this.$message.error('离职失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
this.quitDialogVisible = false
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消离职操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchLeavingList() {
|
||||
this.LeavingListVisiable = true
|
||||
this.getTable(searchLeavingList, [this.PageCurrentN, this.PageSizeN], ['LeavingList', 'totalN'])
|
||||
|
||||
@@ -3,7 +3,17 @@
|
||||
<el-card style="height: 850px">
|
||||
<el-row>
|
||||
<el-col style="width: 400px;">
|
||||
<el-button type="primary" plain style="margin: 10px 0 3px 0" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺</el-button>
|
||||
<div style="display: flex; align-items: center; margin: 10px 0 3px 0">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
placeholder="请输入工艺名称"
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 200px; margin-right: 10px"
|
||||
@input="handleSearch"
|
||||
/>
|
||||
<el-button type="primary" plain icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺</el-button>
|
||||
</div>
|
||||
<el-table :data="tableData2" :row-key="getRowKeys" size="mini" highlight-current-row stripe border height="780" width="100%">
|
||||
<el-table-column label="序号" align="center" type="index" width="60"/>
|
||||
<el-table-column label="工艺名称" align="center" width="200">
|
||||
@@ -57,6 +67,7 @@ export default {
|
||||
dialogFormVisible: false,
|
||||
temp: null,
|
||||
ProcessClassificationNumS: '',
|
||||
searchName: '', // 搜索框内容
|
||||
form1: {
|
||||
ProcessClassification: '',
|
||||
TechnologicalRequirements: ''
|
||||
@@ -65,6 +76,7 @@ export default {
|
||||
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }]
|
||||
},
|
||||
tableData2: [],
|
||||
allTableData2: [], // 存储所有工艺数据
|
||||
tableData3: [],
|
||||
Num: [],
|
||||
maxNum: '',
|
||||
@@ -81,9 +93,20 @@ export default {
|
||||
// 参数数量与名称要与存储过程对应
|
||||
var Data = this.CreateData('11', '工艺名称_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.allTableData2 = response.data
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
// 处理搜索
|
||||
handleSearch() {
|
||||
if (this.searchName) {
|
||||
this.tableData2 = this.allTableData2.filter(item => {
|
||||
return item.工艺名称.includes(this.searchName)
|
||||
})
|
||||
} else {
|
||||
this.tableData2 = this.allTableData2
|
||||
}
|
||||
},
|
||||
calloff() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
|
||||
@@ -516,7 +516,7 @@ export default {
|
||||
// 工作状态 0 黄色 1 绿色
|
||||
getwork_state() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', 'MES_机加工MES_设备数据采集_工作状态_查询', param)
|
||||
var Data = this.CreateData('11', 'MES_机加工MES_设备数据采集_工作状态_查询_新', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// 通过jQuery添加类选择器和移除类选择器
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -555,7 +555,7 @@ export default {
|
||||
// 0 电流计故障 红 1 设备关机 灰 2 设备开机 黄 3 设备工作 绿 10断网或电脑关机 透明
|
||||
getOP_state() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', 'MES_机加工MES_设备数据采集_工位状态_查询', param)
|
||||
var Data = this.CreateData('11', 'MES_机加工MES_设备数据采集_工位状态_查询_新', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].状态代码 === '2') {
|
||||
@@ -674,7 +674,7 @@ export default {
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['工位号', $event.path[2].id]
|
||||
var Data = this.CreateData('11', 'MES_机加工MES_设备数据采集_工位状态_查询_按工位号', param)
|
||||
var Data = this.CreateData('11', 'MES_机加工MES_设备数据采集_工位状态_查询_按工位号_新', param)
|
||||
this.ExecDatabase(Data).then(res => {
|
||||
if (res.data[0].状态代码 === '0') {
|
||||
this.tooltip2 = '设备状态:设备报警'
|
||||
|
||||
245
src/views/DeviceManagement/HistoryInformation/index.vue
Normal file
245
src/views/DeviceManagement/HistoryInformation/index.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="real-time-card" shadow="hover">
|
||||
<div class="search-container">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
size="small"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 300px"
|
||||
/>
|
||||
<el-select v-model="equipmentName" placeholder="请选择设备" size="small" style="width: 200px" clearable>
|
||||
<el-option
|
||||
v-for="item in equipmentList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="variableName" placeholder="变量名称" size="small" clearable style="width: 200px"/>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="pageSize = 20; pageCurrent = 1; searchTable()">查询</el-button>
|
||||
</div>
|
||||
<div v-loading="loading" class="table-container">
|
||||
<el-table :data="tableData" border size="small" stripe highlight-current-row style="width: 100%">
|
||||
<el-table-column label="设备名称" prop="设备名称" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span class="equipment-name">{{ scope.row.设备名称 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参数名称" prop="参数名称" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span class="parameter-name">{{ scope.row.参数名称 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数值" prop="数值" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span class="value">{{ scope.row.数值 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="单位" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
<span class="unit">{{ scope.row.单位 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="更新时间" align="center" min-width="180px">
|
||||
<template slot-scope="scope">
|
||||
<span class="update-time">{{ scope.row.更新时间 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div v-if="tableData.length === 0" class="empty-state">
|
||||
<el-empty description="暂无数据" />
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'HistoryInformation',
|
||||
data() {
|
||||
return {
|
||||
dateRange: [new Date().toISOString().slice(0, 10), new Date().toISOString().slice(0, 10)],
|
||||
equipmentName: '',
|
||||
variableName: '',
|
||||
equipmentList: [],
|
||||
total: 0, // 分页总数
|
||||
tableData: [], // 设备历史数据信息表
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 20, // 分页每页显示条数
|
||||
loading: false // 加载状态
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.getEquipmentList()
|
||||
},
|
||||
methods: {
|
||||
getEquipmentList() {
|
||||
this.loading = true
|
||||
this.ExecDatabase(this.CreateData('11', '设备管理_历史数据_设备_查询', [])).then(response => {
|
||||
console.log(response)
|
||||
if (response.data && response.data.length !== 0) {
|
||||
this.equipmentList = response.data.map(item => {
|
||||
return {
|
||||
value: item.Zone,
|
||||
label: item.Zone
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.equipmentList = []
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
var param = []
|
||||
param[0] = ['开始时间', this.dateRange.length > 0 ? this.dateRange[0] + ' 00:00:00' : '']
|
||||
param[1] = ['结束时间', this.dateRange.length > 0 ? this.dateRange[1] + ' 23:59:59' : '']
|
||||
param[2] = ['设备名称', this.equipmentName]
|
||||
param[3] = ['参数名称', this.variableName]
|
||||
param[4] = ['PageCurrent', this.pageCurrent]
|
||||
param[5] = ['PageSize', this.pageSize]
|
||||
param[6] = ['PageCount', '1111', 'int', '1']
|
||||
param[7] = ['ItemCount', '1111', 'int', '1']
|
||||
var Data = this.CreateData('11', '设备管理_历史数据_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
console.log('历史数据查询', response.data)
|
||||
// 转换数据格式以匹配表格需要的结构
|
||||
if (response.data.result && response.data.result.length !== 0) {
|
||||
this.tableData = response.data.result.map(item => {
|
||||
return {
|
||||
'设备名称': item.设备代码,
|
||||
'参数名称': item.变量名称,
|
||||
'数值': item.值,
|
||||
'单位': item.单位,
|
||||
'更新时间': item.创建时间
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.tableData = []
|
||||
}
|
||||
this.total = parseInt(response.data.output[0].ItemCount) || 0
|
||||
console.log('设备信息查询', this.tableData)
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
background-color: #f5f7fa;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.real-time-card {
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
margin-bottom: 20px;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.equipment-name {
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.parameter-name {
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-weight: 600;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.unit {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.update-time {
|
||||
color: #606266;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 40px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media screen and (max-width: 768px) {
|
||||
.app-container {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.search-container > * {
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
231
src/views/DeviceManagement/RealTimeInformation/index.vue
Normal file
231
src/views/DeviceManagement/RealTimeInformation/index.vue
Normal file
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="real-time-card" shadow="hover">
|
||||
<div class="search-container">
|
||||
<el-select v-model="equipmentName" placeholder="请选择设备" size="small" style="width: 200px" clearable>
|
||||
<el-option
|
||||
v-for="item in equipmentList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="variableName" placeholder="变量名称" size="small" clearable style="width: 200px"/>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click=" searchTable() ">查询</el-button>
|
||||
</div>
|
||||
<div v-loading="loading" class="table-container">
|
||||
<el-table :data="tableData" border size="small" stripe highlight-current-row style="width: 100%">
|
||||
<el-table-column label="设备名称" prop="设备名称" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span class="equipment-name">{{ scope.row.设备名称 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参数名称" prop="参数名称" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span class="parameter-name">{{ scope.row.参数名称 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数值" prop="数值" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span class="value">{{ scope.row.数值 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="单位" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
<span class="unit">{{ scope.row.单位 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="更新时间" align="center" min-width="180px">
|
||||
<template slot-scope="scope">
|
||||
<span class="update-time">{{ scope.row.更新时间 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div v-if="tableData.length === 0" class="empty-state">
|
||||
<el-empty description="暂无数据" />
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
background
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
background-color: #f5f7fa;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.real-time-card {
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
margin-bottom: 20px;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.equipment-name {
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.parameter-name {
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-weight: 600;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.unit {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.update-time {
|
||||
color: #606266;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 40px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media screen and (max-width: 768px) {
|
||||
.app-container {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.search-container > * {
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'RealTimeInformation',
|
||||
data() {
|
||||
return {
|
||||
equipmentName: '',
|
||||
variableName: '',
|
||||
equipmentList: [],
|
||||
total: 0, // 分页总数
|
||||
tableData: [], // 设备实时信息表
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 20, // 分页每页显示条数
|
||||
loading: false // 加载状态
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.getEquipmentList()
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
getEquipmentList() {
|
||||
this.loading = true
|
||||
this.ExecDatabase(this.CreateData('11', '设备管理_历史数据_设备_查询', [])).then(response => {
|
||||
console.log(response)
|
||||
if (response.data && response.data.length !== 0) {
|
||||
this.equipmentList = response.data.map(item => {
|
||||
return {
|
||||
value: item.Zone,
|
||||
label: item.Zone
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.equipmentList = []
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
var param = []
|
||||
param[0] = ['设备名称', this.equipmentName]
|
||||
param[1] = ['参数名称', this.variableName]
|
||||
param[2] = ['PageCurrent', this.pageCurrent]
|
||||
param[3] = ['PageSize', this.pageSize]
|
||||
param[4] = ['PageCount', '1111', 'int', '1']
|
||||
param[5] = ['ItemCount', '1111', 'int', '1']
|
||||
var Data = this.CreateData('11', '设备管理_设备数据_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
console.log('设备信息查询', response.data)
|
||||
// 转换数据格式以匹配表格需要的结构
|
||||
if (response.data.result && response.data.result.length !== 0) {
|
||||
this.tableData = response.data.result.map(item => {
|
||||
return {
|
||||
'设备名称': item.Zone,
|
||||
'参数名称': item.TagName,
|
||||
'数值': item.TagValue,
|
||||
'单位': item.TagUnit,
|
||||
'更新时间': item.UpdateTime
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.tableData = []
|
||||
}
|
||||
this.total = parseInt(response.data.output[0].ItemCount) || 0
|
||||
console.log('设备信息查询', this.tableData)
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
1409
src/views/DeviceManagement/lightControl/index.vue
Normal file
1409
src/views/DeviceManagement/lightControl/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -65,31 +65,97 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogFormVisible" center width="590px">
|
||||
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogFormVisible" center width="1000px">
|
||||
<el-form label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="通知内容:">
|
||||
<el-input v-model="noticeLabel" :rows="4" clearable type="textarea" size="small" style="width:400px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-row style="display: flex; align-items: center;">
|
||||
<el-col>
|
||||
<el-select v-model="supplierName" filterable clearable placeholder="请选择供应商" size="small" style="width: 200px" @change="getContract()">
|
||||
<el-option v-for="item in suppliers" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-select v-model="contractNo" filterable clearable placeholder="请选择合同号" size="small" style="width: 200px" @change="onContractChange">
|
||||
<el-option v-for="item in contract" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" @click="searchTable2()">查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="通知部门:">
|
||||
<el-checkbox-group v-model="checkList" style="width: 400px">
|
||||
<el-checkbox label="采购"/>
|
||||
<el-checkbox label="精工"/>
|
||||
<el-checkbox label="质检"/>
|
||||
<el-checkbox label="仓库"/>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-col :span="24">
|
||||
<div style="max-height: 400px; overflow: auto;">
|
||||
<el-table :data="tableData2" border stripe size="small" style="width: 100%;" >
|
||||
<el-table-column label="合同号" align="center" show-overflow-tooltip width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购件" align="center" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号" align="center" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数" align="center" show-overflow-tooltip width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到数" align="center" show-overflow-tooltip width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到数 || 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次到货数量" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.到货数量"
|
||||
:max="scope.row.采购数 - (scope.row.已到数 || 0)"
|
||||
:min="0"
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
controls-position="right"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否需要质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.需要质检"
|
||||
:disabled="scope.row.到货数量 === 0"
|
||||
active-text="是"
|
||||
inactive-text="否"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="推送部门" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.需要质检" style="color: #E6A23C;">质检部</span>
|
||||
<span v-else style="color: #67C23A;">仓库</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 汇总信息展示 -->
|
||||
<el-row v-if="hasData" style="margin-top: 15px;">
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="left">到货汇总</el-divider>
|
||||
<div style="font-size: 12px; color: #606266; background: #f5f7fa; padding: 10px; border-radius: 4px;">
|
||||
<span>本次到货物料数:<span style="color: #409EFF; font-weight: bold;">{{ arrivalCount }}</span> 个,</span>
|
||||
<span>其中需质检:<span style="color: #E6A23C; font-weight: bold;">{{ qualityCheckCount }}</span> 个 → 推送质检部,</span>
|
||||
<span>免检直接入库:<span style="color: #67C23A; font-weight: bold;">{{ noQualityCheckCount }}</span> 个 → 推送仓库</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="distribution" size="small" @click="submit()">确 定</el-button>
|
||||
<el-button type="primary" size="small" @click="submit()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -102,24 +168,45 @@ export default {
|
||||
return {
|
||||
dateRange: '',
|
||||
noticeLabel: '',
|
||||
checkList: [],
|
||||
dialogFormVisible: false,
|
||||
title: '',
|
||||
loading: false, // 数据加载
|
||||
total: 0, // 分页总数
|
||||
tableData: [], // 合同信息表
|
||||
loading: false,
|
||||
total: 0,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 30, // 分页每页显示条数
|
||||
orderName: '', // 排序列名
|
||||
order: '' // 排序方式
|
||||
pageCurrent: 1,
|
||||
pageSize: 30,
|
||||
orderName: '',
|
||||
order: '',
|
||||
contract: [],
|
||||
supplierName: '',
|
||||
suppliers: [],
|
||||
tableData2: [],
|
||||
contractNo: '',
|
||||
contractLabel: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
]),
|
||||
// 判断是否有到货数据
|
||||
hasData() {
|
||||
return this.tableData2.some(item => item.到货数量 > 0)
|
||||
},
|
||||
// 到货物料总数
|
||||
arrivalCount() {
|
||||
return this.tableData2.filter(item => item.到货数量 > 0).length
|
||||
},
|
||||
// 需要质检的数量
|
||||
qualityCheckCount() {
|
||||
return this.tableData2.filter(item => item.到货数量 > 0 && item.需要质检).length
|
||||
},
|
||||
// 不需要质检的数量
|
||||
noQualityCheckCount() {
|
||||
return this.tableData2.filter(item => item.到货数量 > 0 && !item.需要质检).length
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
@@ -141,37 +228,75 @@ export default {
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if (this.noticeLabel) {
|
||||
if (this.checkList.length === 0) {
|
||||
this.$message.warning('通知部门不能为空!')
|
||||
} else {
|
||||
var param = []
|
||||
param[0] = ['通知内容', this.noticeLabel]
|
||||
param[1] = ['发起人', this.id]
|
||||
param[2] = ['通知部门组', this.checkList]
|
||||
var Data = this.CreateData('12', '采购管理_到货内容_新增', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message({
|
||||
message: '通知成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.fetchData()
|
||||
} else {
|
||||
this.$message.error('通知失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('通知内容不能为空!')
|
||||
onContractChange(val) {
|
||||
const selected = this.contract.find(item => item.value === val)
|
||||
if (selected) {
|
||||
this.contractLabel = selected.label
|
||||
this.noticeLabel = selected.label
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
// 筛选出有到货数量的物料
|
||||
const arrivalData = this.tableData2.filter(item => item.到货数量 > 0)
|
||||
|
||||
if (arrivalData.length === 0) {
|
||||
this.$message.warning('请至少填写一个物料的到货数量!')
|
||||
return
|
||||
}
|
||||
|
||||
// 按质检标志分组
|
||||
const toQualityCheck = arrivalData.filter(item => item.需要质检 === true)
|
||||
const toWarehouse = arrivalData.filter(item => item.需要质检 === false)
|
||||
|
||||
// 准备参数
|
||||
var param = []
|
||||
param[0] = ['通知内容', this.noticeLabel]
|
||||
param[1] = ['发起人', this.id]
|
||||
param[2] = ['采购合同流水号', this.contractNo]
|
||||
param[3] = ['到货数组', arrivalData.map(item => item.到货数量).join(',')]
|
||||
param[4] = ['物料流水号组', arrivalData.map(item => item.物料流水号).join(',')]
|
||||
param[5] = ['质检标志组', arrivalData.map(item => item.需要质检 ? 1 : 0).join(',')] // 1=需要质检,0=不需要
|
||||
param[6] = ['采购合同', this.contractLabel]
|
||||
param[7] = ['供应商流水号', this.supplierName]
|
||||
|
||||
console.log('到货明细:', arrivalData)
|
||||
console.log('需质检物料:', toQualityCheck.length, '个')
|
||||
console.log('免检物料:', toWarehouse.length, '个')
|
||||
console.log('质检标志组:', param[5][1])
|
||||
|
||||
var Data = this.CreateData('12', '采购管理_到货内容_新增', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
let message = `通知成功!`
|
||||
if (toQualityCheck.length > 0) {
|
||||
message += `${toQualityCheck.length}个物料送质检部`
|
||||
}
|
||||
if (toWarehouse.length > 0) {
|
||||
message += `${toQualityCheck.length > 0 ? ',' : ''}${toWarehouse.length}个物料直接入库`
|
||||
}
|
||||
this.$message({
|
||||
message: message,
|
||||
type: 'success',
|
||||
duration: 3000
|
||||
})
|
||||
this.fetchData()
|
||||
this.dialogFormVisible = false
|
||||
} else {
|
||||
this.$message.error('通知失败')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('操作失败,请重试')
|
||||
})
|
||||
},
|
||||
addNotice() {
|
||||
this.supplierName = ''
|
||||
this.contractNo = ''
|
||||
this.noticeLabel = ''
|
||||
this.contractLabel = ''
|
||||
this.tableData2 = []
|
||||
this.title = '到货通知'
|
||||
this.dialogFormVisible = true
|
||||
this.getSuppliers()
|
||||
},
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
@@ -194,8 +319,61 @@ export default {
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
searchTable2() {
|
||||
if (!this.supplierName) {
|
||||
this.$message.warning('请先选择供应商')
|
||||
return
|
||||
}
|
||||
if (!this.contractNo) {
|
||||
this.$message.warning('请先选择合同号')
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['供应商流水号', this.supplierName]
|
||||
param[1] = ['采购合同流水号', this.contractNo]
|
||||
var Data = this.CreateData('11', '采购管理_采购入库合同明细_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// 为每条数据添加到货数量和质检标志字段
|
||||
this.tableData2 = response.data.map(item => ({
|
||||
...item,
|
||||
到货数量: 0,
|
||||
需要质检: false // 默认为false,即免检直接入库
|
||||
}))
|
||||
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.info('该合同下没有物料明细')
|
||||
}
|
||||
})
|
||||
},
|
||||
getSuppliers() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '供应商_入库查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.suppliers = response.data.map(item => ({
|
||||
label: item.供应商名称,
|
||||
value: item.供应商流水号
|
||||
}))
|
||||
})
|
||||
},
|
||||
getContract() {
|
||||
if (!this.supplierName) {
|
||||
this.contract = []
|
||||
return
|
||||
}
|
||||
let check = this.supplierName ? check = 1 : check = 0
|
||||
this.contract = []
|
||||
var param = []
|
||||
param[0] = ['供应商流水号_check', check]
|
||||
param[1] = ['供应商流水号', this.supplierName]
|
||||
var Data = this.CreateData('11', '仓储管理_采购入库合同_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.contract = response.data.map(item => ({
|
||||
label: item.采购合同编号,
|
||||
value: item.采购合同流水号
|
||||
}))
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -47,6 +47,20 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="productDetail"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:180px;margin-left: 10px"
|
||||
placeholder="产品详情"
|
||||
@keyup.enter.native="pageCurrent=1;searchLeftTable()"/>
|
||||
<el-input
|
||||
v-model="orderRemarks"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:180px;margin-left: 10px"
|
||||
placeholder="订单备注"
|
||||
@keyup.enter.native="pageCurrent=1;searchLeftTable()"/>
|
||||
<el-button type="success" size="mini" style="margin-left: 100px" @click="exportExcel()">导出</el-button>
|
||||
</div>
|
||||
<el-row style="display: flex">
|
||||
@@ -125,6 +139,11 @@
|
||||
{{ scope.row.审核时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('姓名')" label="审核人" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ getApproverName(scope.row.审批人) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120px" label="操作" align="center" show-overflow-tooltip fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -367,14 +386,14 @@
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 20%">交货地址</td>
|
||||
<td colspan="13" style="width: 80%">联系人:{{ consignee }}      交货地点:浙江省台州市路桥区蓬街镇环镇西路99号<br>联系电话:{{
|
||||
<td colspan="13" style="width: 80%">联系人:{{ consignee }}      交货地点:浙江省台州市路桥区金清镇卷桥同心路96-9号<br>联系电话:{{
|
||||
receiverTelephoneNumber
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 20%">供方确认</td>
|
||||
<td colspan="13" style="width: 80%">交货日期:{{ people }}      托运方式:供方陆运<br>此采购订单要求供方于接单后两个工作日内确认回复需方即生效。
|
||||
<td colspan="13" style="width: 80%">交货日期: {{ nullArr }}      托运方式:供方陆运<br>此采购订单要求供方于接单后两个工作日内确认回复需方即生效。
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
@@ -385,13 +404,13 @@
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" rowspan="2" style="text-align: center;width: 14%"/>
|
||||
<td colspan="1" rowspan="1" style="text-align: center;width: 8%">供方:</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 14%">{{ people }}</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 14%"> {{ nullArr }}</td>
|
||||
<td colspan="1" rowspan="1" style="text-align: center;width: 8%">日期:</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 13%">{{ people }}</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 13%"> {{ nullArr }}</td>
|
||||
<td colspan="1" rowspan="1" style="text-align: center;width: 8%">需方:</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 14%">{{ people }}</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 14%"> {{ nullArr }}</td>
|
||||
<td colspan="1" rowspan="1" style="text-align: center;width: 8%">日期:</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 13%">{{ people }}</td>
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 13%"> {{ nullArr }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" rowspan="1" style="text-align: center;width: 17%">签字/盖章</td>
|
||||
@@ -413,7 +432,7 @@
|
||||
type="danger"
|
||||
size="mini"
|
||||
style="float: right;margin-bottom: 5px;margin-right: 10px"
|
||||
@click="deleteFileData1(url.id)">删除
|
||||
@click="deleteFileData1(url)">删除
|
||||
</el-button>
|
||||
<el-image :key="url.url" :src="url.url" :preview-src-list="urls1" lazy style="width: 500px; height: 500px"/>
|
||||
</div>
|
||||
@@ -512,11 +531,13 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
import request, { MESDownloadFile, url } from '@/utils/request'
|
||||
import request, { MESDownloadFile, MESUploadFileNew, MESDownloadFileNew, MESDeleteFileNew, MESUploadFileNew_BasePath, url } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
nullArr: '',
|
||||
dialogVisible: false,
|
||||
hadFile: [],
|
||||
dialogVisiblePictureCard: false,
|
||||
@@ -532,13 +553,15 @@ export default {
|
||||
orderDate: '',
|
||||
deliveryDate: '',
|
||||
returns: [],
|
||||
people: '',
|
||||
people: [],
|
||||
purchaseStates: [],
|
||||
purchaseState: '',
|
||||
suppliers: [],
|
||||
supplierName: '',
|
||||
contractValue: '',
|
||||
contract: [],
|
||||
productDetail: '', // 顶部筛选-产品详情
|
||||
orderRemarks: '', // 顶部筛选-订单备注
|
||||
dialogFormVisible: false, // 查看图片
|
||||
dialogFormVisible2: false, // 增加图片
|
||||
dialogFormVisible3: false, // 查看图片
|
||||
@@ -584,6 +607,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getPeople()
|
||||
},
|
||||
methods: {
|
||||
// 查看零件图
|
||||
@@ -668,35 +692,68 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteFileData1(id) {
|
||||
// console.log(id, '图片iad')
|
||||
deleteFileData1(item) {
|
||||
const id = item.id
|
||||
const filePath = item.filePath || ''
|
||||
|
||||
// 构造删除SQL
|
||||
var param = []
|
||||
param[0] = ['id', id]
|
||||
var Data = this.CreateData('12', '采购合同查询_图片_删除', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
// 如果有文件路径,同步删除文件
|
||||
if (filePath) {
|
||||
axios.get(MESDeleteFileNew, {
|
||||
params: { filePath: filePath }
|
||||
}).then(res => {
|
||||
console.log('文件删除:', res.data)
|
||||
}).catch(err => {
|
||||
console.error('文件删除异常:', err)
|
||||
})
|
||||
}
|
||||
this.$message.success('图片删除成功')
|
||||
this.urls = []
|
||||
this.urls1 = []
|
||||
var param1 = []
|
||||
param1[0] = ['采购合同流水号', this.purchaseContractSerialNumber]
|
||||
var Data1 = this.CreateData('11', '采购合同查询_图片_查询数据', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
this.urls.push({
|
||||
url: 'data:image/png;base64,' + response.data[i].文件内容,
|
||||
id: response.data[i].id
|
||||
})
|
||||
this.urls1.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.refreshPictureList()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 刷新图片列表
|
||||
refreshPictureList() {
|
||||
this.urls = []
|
||||
this.urls1 = []
|
||||
var param1 = []
|
||||
param1[0] = ['采购合同流水号', this.purchaseContractSerialNumber]
|
||||
var Data1 = this.CreateData('11', '采购合同查询_图片_查询数据', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
const item = response.data[i]
|
||||
if (item.文件路径) {
|
||||
// 从文件系统读取
|
||||
axios.get(MESDownloadFileNew, {
|
||||
params: { filePath: item.文件路径 }
|
||||
}).then(res => {
|
||||
if (res.data && res.data[0] && res.data[0].文件内容) {
|
||||
this.urls.push({
|
||||
url: 'data:image/png;base64,' + res.data[0].文件内容,
|
||||
id: item.id,
|
||||
filePath: item.文件路径
|
||||
})
|
||||
this.urls1.push('data:image/png;base64,' + res.data[0].文件内容)
|
||||
}
|
||||
})
|
||||
} else if (item.文件内容 !== null) {
|
||||
this.urls.push({
|
||||
url: 'data:image/png;base64,' + item.文件内容,
|
||||
id: item.id,
|
||||
filePath: ''
|
||||
})
|
||||
this.urls1.push('data:image/png;base64,' + item.文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePicture(row) {
|
||||
this.dialogFormVisible = true
|
||||
this.purchaseContractSerialNumber = row.采购合同流水号
|
||||
@@ -707,12 +764,31 @@ export default {
|
||||
var Data = this.CreateData('11', '采购合同查询_图片_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
this.urls.push({
|
||||
url: 'data:image/png;base64,' + response.data[i].文件内容,
|
||||
id: response.data[i].id
|
||||
const item = response.data[i]
|
||||
// 优先使用文件路径(新方式)
|
||||
if (item.文件路径) {
|
||||
axios.get(MESDownloadFileNew, {
|
||||
params: { filePath: item.文件路径 }
|
||||
}).then(res => {
|
||||
if (res.data && res.data[0] && res.data[0].文件内容) {
|
||||
this.urls.push({
|
||||
url: 'data:image/png;base64,' + res.data[0].文件内容,
|
||||
id: item.id,
|
||||
filePath: item.文件路径
|
||||
})
|
||||
this.urls1.push('data:image/png;base64,' + res.data[0].文件内容)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('图片加载失败:', err)
|
||||
})
|
||||
this.urls1.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
} else if (item.文件内容 !== null) {
|
||||
// 兼容旧数据
|
||||
this.urls.push({
|
||||
url: 'data:image/png;base64,' + item.文件内容,
|
||||
id: item.id,
|
||||
filePath: ''
|
||||
})
|
||||
this.urls1.push('data:image/png;base64,' + item.文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -751,6 +827,11 @@ export default {
|
||||
param[5] = ['采购状态', this.purchaseState]
|
||||
param[6] = ['排序名称', this.orderName]
|
||||
param[7] = ['排序方式', this.order]
|
||||
// 新增筛选参数
|
||||
param[8] = ['产品详情_check', this.productDetail ? 1 : 0]
|
||||
param[9] = ['产品详情', this.productDetail]
|
||||
param[10] = ['订单备注_check', this.orderRemarks ? 1 : 0]
|
||||
param[11] = ['订单备注', this.orderRemarks]
|
||||
var Data = this.CreateData('2001', '报表_采购管理_采购合同_全部_查询数据', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
@@ -767,13 +848,50 @@ export default {
|
||||
}
|
||||
return isJPG
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs.upload.clearFiles()
|
||||
uploadSuccess(res, file) { // 上传成功回调
|
||||
// 生成文件保存路径
|
||||
const now = new Date()
|
||||
const timestamp = now.getFullYear().toString() +
|
||||
(now.getMonth() + 1).toString().padStart(2, '0') +
|
||||
now.getDate().toString().padStart(2, '0') +
|
||||
now.getHours().toString().padStart(2, '0') +
|
||||
now.getMinutes().toString().padStart(2, '0') +
|
||||
now.getSeconds().toString().padStart(2, '0') +
|
||||
now.getMilliseconds().toString().padStart(3, '0')
|
||||
const suffix = file.name.split('.').pop() || 'jpg'
|
||||
const savePath = MESUploadFileNew_BasePath + '\\OrderInquiry\\' + timestamp + '-' + this.purchaseContractID + '.' + suffix
|
||||
|
||||
// 构造SQL语句
|
||||
const sqlStatement = `update 采购管理_采购合同查询_图片 set 文件内容 = NULL, 文件路径 = N'${savePath}' where id = (select top 1 id from 采购管理_采购合同查询_图片 where 采购合同流水号 = ${this.purchaseContractID} and 文件路径 is null order by 操作时间 desc)`
|
||||
|
||||
// 调用新接口保存文件
|
||||
const formData = new FormData()
|
||||
formData.append('file', file.raw)
|
||||
formData.append('savePath', savePath)
|
||||
formData.append('sqlStatement', sqlStatement)
|
||||
|
||||
axios.post(MESUploadFileNew, formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}).then(response => {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
console.log('文件保存成功:', savePath)
|
||||
} else {
|
||||
console.error('文件保存失败:', response.data)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('文件保存异常:', err)
|
||||
})
|
||||
|
||||
// this.dialogFormVisible2 = false
|
||||
// this.$refs.upload.clearFiles()
|
||||
},
|
||||
updatePicture(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.purchaseContractID = row.采购合同流水号
|
||||
// this.$nextTick(() => {
|
||||
// if (this.$refs.upload) {
|
||||
// this.$refs.upload.clearFiles()
|
||||
// }
|
||||
},
|
||||
submitPicture() {
|
||||
var param = []
|
||||
@@ -785,6 +903,7 @@ export default {
|
||||
this.Data.param = Data1
|
||||
this.$refs.upload.submit()
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
exportTable(row) {
|
||||
this.supplier = row.供应商
|
||||
@@ -881,6 +1000,11 @@ export default {
|
||||
param[5] = ['采购状态', this.purchaseState]
|
||||
param[6] = ['排序名称', this.orderName]
|
||||
param[7] = ['排序方式', this.order]
|
||||
// 新增筛选参数
|
||||
param[8] = ['产品详情_check', this.productDetail ? 1 : 0]
|
||||
param[9] = ['产品详情', this.productDetail]
|
||||
param[10] = ['订单备注_check', this.orderRemarks ? 1 : 0]
|
||||
param[11] = ['订单备注', this.orderRemarks]
|
||||
var Data = this.CreateData('11', '采购管理_采购合同_全部_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.ProductionPick = response.data.rows
|
||||
@@ -917,6 +1041,18 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getPeople() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '人员信息_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
@@ -1100,6 +1236,22 @@ export default {
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchLeftTable()
|
||||
},
|
||||
getApproverName(approverId) {
|
||||
// 调试:打印people数组和approverId
|
||||
// console.log('people数组:', this.people)
|
||||
// console.log('approverId:', approverId, '类型:', typeof approverId)
|
||||
|
||||
// 尝试类型转换后比较
|
||||
for (let i = 0; i < this.people.length; i++) {
|
||||
// console.log('people[i].value:', this.people[i].value, '类型:', typeof this.people[i].value)
|
||||
if (String(this.people[i].value) === String(approverId)) {
|
||||
// console.log('找到匹配:', this.people[i].label)
|
||||
return this.people[i].label
|
||||
}
|
||||
}
|
||||
// console.log('未找到匹配,返回原始值:', approverId)
|
||||
return approverId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px;padding: 0">
|
||||
<el-tabs v-model="PartType" type="border-card" @tab-click="pageCurrent=1;pageCurrent1=1;getData()">
|
||||
<el-tabs v-model="PartType" type="border-card" @tab-click="pageCurrent = 1; pageCurrent1 = 1; getData()">
|
||||
<el-tab-pane label="物料采购" name="物料采购">
|
||||
<el-row>
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
@@ -12,12 +12,8 @@
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
@change="getproductpartName();searchTable();">
|
||||
<el-option
|
||||
v-for="item in orderNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@change="getproductpartName(); searchTable();">
|
||||
<el-option v-for="item in orderNumber" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="productNameValue"
|
||||
@@ -27,11 +23,7 @@
|
||||
filterable
|
||||
clearable
|
||||
@change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in productName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
<el-option v-for="item in productName" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="purchasedPartsValue"
|
||||
@@ -39,15 +31,19 @@
|
||||
placeholder="采购件"
|
||||
size="small"
|
||||
clearable
|
||||
@keyup.enter.native="searchTable()"/>
|
||||
@keyup.enter.native="searchTable()" />
|
||||
<el-button type="warning" plain icon="el-icon-plus" size="small" @click="purchaseContract">采购合同
|
||||
</el-button>
|
||||
<el-checkbox
|
||||
v-show="Number(token)===2"
|
||||
v-model="checked"
|
||||
style="margin-left: 50px"
|
||||
@change="searchTable()">已隐藏
|
||||
</el-checkbox>
|
||||
<el-select
|
||||
v-show="Number(token) === 2 || Number(token) === 4"
|
||||
v-model="hideStatus"
|
||||
style="width:100px;margin-left: 50px"
|
||||
size="small"
|
||||
@change="searchTable()">
|
||||
<el-option label="未隐藏" value="0" />
|
||||
<el-option label="隐藏" value="1" />
|
||||
<el-option label="全部" value="all" />
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -75,11 +71,11 @@
|
||||
<el-table-column width="55px" label="选入" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="Number(scope.row.是否确认) === 0 || checked"
|
||||
:disabled="Number(scope.row.是否确认) === 0 || hideStatus === '0'"
|
||||
type="text"
|
||||
icon="el-icon-bottom"
|
||||
size="mini"
|
||||
@click="selectIn(scope.row)"/>
|
||||
@click="selectIn(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="189px" sortable="采购件" label="采购件" align="center" prop="采购件">
|
||||
@@ -154,8 +150,9 @@
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="使用库存" placement="top">
|
||||
<!-- || Number(scope.row.订单类型) === 3 不限制订单类型了 -->
|
||||
<el-button
|
||||
:disabled="Number(scope.row.累计库存) < Number(scope.row.数量) || Number(scope.row.订单类型) === 3"
|
||||
:disabled="Number(scope.row.累计库存) < Number(scope.row.数量)"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="useInventory(scope.row)">使用库存
|
||||
@@ -163,7 +160,7 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="隐藏" placement="top">
|
||||
<el-button
|
||||
v-show="!checked && Number(token)===2"
|
||||
v-show="hideStatus !== '0' && Number(token) === 2"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="Disappear(scope.row)">隐藏
|
||||
@@ -171,19 +168,15 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="恢复" placement="top">
|
||||
<el-button
|
||||
v-show="checked && Number(token)===2"
|
||||
v-show="hideStatus === '0' && Number(token) === 2"
|
||||
type="text"
|
||||
size="mini"
|
||||
style="margin-right: 5px"
|
||||
@click="Recovery(scope.row)">恢复
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-button
|
||||
:disabled="Number(scope.row.订单类型)!==3"
|
||||
type="text"
|
||||
size="mini"
|
||||
style="margin-right: 0px"
|
||||
@click="partReturn(scope.row)">打回
|
||||
<!-- :disabled="Number(scope.row.订单类型)!==3" 不限制订单类型了 -->
|
||||
<el-button type="text" size="mini" style="margin-right: 0px" @click="partReturn(scope.row)">打回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -195,7 +188,7 @@
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData1"
|
||||
:header-cell-style="{background: '#2283D4',color: 'white'}"
|
||||
:header-cell-style="{ background: '#2283D4', color: 'white' }"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
@@ -255,7 +248,7 @@
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
:data="tableData2"
|
||||
:header-cell-style="{background: '#19466E',color: 'white'}"
|
||||
:header-cell-style="{ background: '#19466E', color: 'white' }"
|
||||
:summary-method="getSummaries"
|
||||
highlight-current-row
|
||||
show-summary
|
||||
@@ -266,7 +259,7 @@
|
||||
height="320">
|
||||
<el-table-column width="60px" label="选出" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-top" size="mini" @click="selectOut(scope.row)"/>
|
||||
<el-button type="text" icon="el-icon-top" size="mini" @click="selectOut(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="170px" label="采购件" align="center" prop="">
|
||||
@@ -279,7 +272,7 @@
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('材料')" label="材料" align="center" prop="">
|
||||
<el-table-column width="60px" label="材料" align="center" prop="">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
@@ -292,12 +285,15 @@
|
||||
size="mini"
|
||||
type="number"
|
||||
style="margin: 0;width: 100%"
|
||||
@change="updateProcess(scope.row)"/>
|
||||
@change="updateProcess(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('单位')" label="单位" align="center" prop="">
|
||||
<el-table-column width="80px" label="免检" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
<el-select v-model="scope.row.免检" size="mini" style="width: 100%" @change="updateProcess1(scope.row)">
|
||||
<el-option label="是" value="1" />
|
||||
<el-option label="否" value="0" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130px" label="单价(元)" align="center" prop="单价" show-overflow-tooltip>
|
||||
@@ -307,7 +303,7 @@
|
||||
size="mini"
|
||||
type="number"
|
||||
style="margin: 0;width: 100%"
|
||||
@change="updateProcess(scope.row)"/>
|
||||
@change="updateProcess(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="金额(元)" align="center" prop="">
|
||||
@@ -321,7 +317,7 @@
|
||||
v-model="scope.row.采购备注"
|
||||
size="mini"
|
||||
style="margin: 0;width: 100%"
|
||||
@change="updateProcess(scope.row)"/>
|
||||
@change="updateProcess(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
@@ -354,7 +350,7 @@
|
||||
placeholder="合同号"
|
||||
size="small"
|
||||
clearable
|
||||
@keyup.enter.native="searchTable5()"/>
|
||||
@keyup.enter.native="searchTable5()" />
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@@ -408,7 +404,7 @@
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
style="margin-right: 5px"
|
||||
@click="contract(scope.row)"/>
|
||||
@click="contract(scope.row)" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -421,28 +417,28 @@
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<span>名称:</span>
|
||||
<el-input v-model="materialName1" placeholder="名称" style="width: 170px" size="small" clearable/>
|
||||
<el-input v-model="materialName1" placeholder="名称" style="width: 170px" size="small" clearable />
|
||||
<span>图号/型号:</span>
|
||||
<el-input v-model="materialSpec1" placeholder="图号/型号" style="width: 170px" size="small" clearable/>
|
||||
<el-input v-model="materialSpec1" placeholder="图号/型号" style="width: 170px" size="small" clearable />
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchMaterial1()">查询
|
||||
@click="pageCurrent1 = 1; pageSize1 = 10; total1 = 0; searchMaterial1()">查询
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData10"
|
||||
:header-cell-style="{background: '#2283D4',color: 'white'}"
|
||||
:header-cell-style="{ background: '#2283D4', color: 'white' }"
|
||||
size="mini"
|
||||
style="width: 97%;margin-top:10px"
|
||||
height="300px"
|
||||
border
|
||||
highlight-current-row
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="50px"/>
|
||||
<el-table-column type="selection" align="center" width="50px" />
|
||||
<el-table-column align="center" label="名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
@@ -471,14 +467,14 @@
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
@current-change="handleCurrentChange1" />
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="table1"
|
||||
:data="tableData4"
|
||||
:header-cell-style="{background: '#383E4B',color: 'white'}"
|
||||
:header-cell-style="{ background: '#383E4B', color: 'white' }"
|
||||
:summary-method="getSummaries1"
|
||||
highlight-current-row
|
||||
show-summary
|
||||
@@ -487,17 +483,13 @@
|
||||
size="mini"
|
||||
style="width: 931px"
|
||||
height="370px">
|
||||
<el-table-column :width="setColumnWidth('序号')" type="index" label="序号" align="center" prop=""/>
|
||||
<el-table-column :width="setColumnWidth('序号')" type="index" label="序号" align="center" prop="" />
|
||||
<el-table-column :width="setColumnWidth('采购件')" label="采购件" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购件 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:width="setColumnWidth('图号或型号')"
|
||||
label="图号/型号"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
<el-table-column :width="setColumnWidth('图号或型号')" label="图号/型号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
@@ -514,7 +506,7 @@
|
||||
size="mini"
|
||||
type="number"
|
||||
style="margin: 0;width: 100%"
|
||||
@change="updateProcess1(scope.row)"/>
|
||||
@change="updateProcess1(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130px" label="单价(元)" align="center" show-overflow-tooltip>
|
||||
@@ -524,7 +516,7 @@
|
||||
size="mini"
|
||||
type="number"
|
||||
style="margin: 0;width: 100%"
|
||||
@change="updateProcess1(scope.row)"/>
|
||||
@change="updateProcess1(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110px" label="金额(元)" align="center" prop="金额">
|
||||
@@ -532,24 +524,20 @@
|
||||
{{ (scope.row.数量 * scope.row.单价).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:width="setColumnWidth('备注')"
|
||||
label="采购备注"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
<el-table-column :width="setColumnWidth('备注')" label="采购备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.采购备注"
|
||||
size="mini"
|
||||
style="margin: 0;width: 100%"
|
||||
@change="updateProcess1(scope.row)"/>
|
||||
@change="updateProcess1(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!--<el-button v-if="scope.row.edit" type="text" size="mini" @click="confirmEdit(scope.row)">确定</el-button>-->
|
||||
<!--<el-button v-if="scope.row.edit" type="text" size="mini" @click="cancel(scope.row)">取消</el-button>-->
|
||||
<el-button type="text" size="mini" icon="el-icon-minus" @click="handleDeleteItem(scope.row)"/>
|
||||
<el-button type="text" size="mini" icon="el-icon-minus" @click="handleDeleteItem(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -569,18 +557,8 @@
|
||||
label-width="80px"
|
||||
class="demo-ruleForm">
|
||||
<el-form-item label="供应商" prop="供应商">
|
||||
<el-select
|
||||
v-model="form.供应商"
|
||||
style="width:150px;"
|
||||
placeholder="供应商"
|
||||
size="small"
|
||||
filterable
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
<el-select v-model="form.供应商" style="width:150px;" placeholder="供应商" size="small" filterable clearable>
|
||||
<el-option v-for="item in supplier" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -599,18 +577,8 @@
|
||||
label-width="80px"
|
||||
class="demo-ruleForm">
|
||||
<el-form-item label="供应商" prop="供应商">
|
||||
<el-select
|
||||
v-model="form1.供应商"
|
||||
style="width:150px;"
|
||||
placeholder="供应商"
|
||||
size="small"
|
||||
filterable
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
<el-select v-model="form1.供应商" style="width:150px;" placeholder="供应商" size="small" filterable clearable>
|
||||
<el-option v-for="item in supplier" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -629,20 +597,20 @@
|
||||
width="630px">
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<span>名称:</span>
|
||||
<el-input v-model="materialName" placeholder="名称" style="width: 170px" size="small" clearable/>
|
||||
<el-input v-model="materialName" placeholder="名称" style="width: 170px" size="small" clearable />
|
||||
<span>图号/型号:</span>
|
||||
<el-input v-model="materialSpec" placeholder="图号/型号" style="width: 170px" size="small" clearable/>
|
||||
<el-input v-model="materialSpec" placeholder="图号/型号" style="width: 170px" size="small" clearable />
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="pageCurrent2=1;pageSize2=10;total2=0;searchMaterial()">查询
|
||||
@click="pageCurrent2 = 1; pageSize2 = 10; total2 = 0; searchMaterial()">查询
|
||||
</el-button>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="tableData5"
|
||||
:header-cell-style="{background: '#383E4B',color: 'white'}"
|
||||
:header-cell-style="{ background: '#383E4B', color: 'white' }"
|
||||
size="mini"
|
||||
style="width: 97%;max-height: 300px;margin-top:15px"
|
||||
height="400px"
|
||||
@@ -670,13 +638,13 @@
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
@current-change="handleCurrentChange2" />
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: large;color: red">将原物料替换为: {{ materialNew }}</span>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible3=false">取消</el-button>
|
||||
<el-button size="small" @click="dialogFormVisible3 = false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitMaterialChange">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -687,7 +655,7 @@
|
||||
:src="url"
|
||||
:preview-src-list="urls"
|
||||
lazy
|
||||
style="width: 500px; height: 500px"/>
|
||||
style="width: 500px; height: 500px" />
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
@@ -709,10 +677,10 @@
|
||||
:action="upload"
|
||||
style="margin-left: 60px"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible2=false">取消</el-button>
|
||||
<el-button @click="dialogFormVisible2 = false">取消</el-button>
|
||||
<el-button type="primary" style="width: 70px" @click="submitPicture()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -720,23 +688,23 @@
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div v-if="file.suffix==='pdf'" class="icon">
|
||||
<svg-icon icon-class="pdf"/>
|
||||
<div v-if="file.suffix === 'pdf'" class="icon">
|
||||
<svg-icon icon-class="pdf" />
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon">
|
||||
<svg-icon icon-class="doc"/>
|
||||
<div v-else-if="file.suffix === 'docx' || file.suffix === 'doc'" class="icon">
|
||||
<svg-icon icon-class="doc" />
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon">
|
||||
<svg-icon icon-class="excel"/>
|
||||
<div v-else-if="file.suffix === 'xlsx' || file.suffix === 'xls'" class="icon">
|
||||
<svg-icon icon-class="excel" />
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon">
|
||||
<svg-icon icon-class="ppt"/>
|
||||
<div v-else-if="file.suffix === 'pptx' || file.suffix === 'ppt'" class="icon">
|
||||
<svg-icon icon-class="ppt" />
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon">
|
||||
<svg-icon icon-class="pic"/>
|
||||
<div v-else-if="file.suffix === 'jpg' || file.suffix === 'jpeg' || file.suffix === 'png'" class="icon">
|
||||
<svg-icon icon-class="pic" />
|
||||
</div>
|
||||
<div v-else class="icon">
|
||||
<svg-icon icon-class="file"/>
|
||||
<svg-icon icon-class="file" />
|
||||
</div>
|
||||
<a id="appUrl" :href="file.url" target="view_window">
|
||||
<div class="info">{{ file.name }}</div>
|
||||
@@ -749,7 +717,7 @@
|
||||
<div style="width: 100%;overflow: hidden">
|
||||
<el-table
|
||||
:data="tableData100"
|
||||
:header-cell-style="{background: '#2283D4',color: 'white'}"
|
||||
:header-cell-style="{ background: '#2283D4', color: 'white' }"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
@@ -815,12 +783,12 @@
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"
|
||||
placeholder="请输入"/>
|
||||
placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisibleReturn=false">取消</el-button>
|
||||
<el-button size="small" @click="dialogFormVisibleReturn = false">取消</el-button>
|
||||
<el-button type="distribution" size="small" @click="submit()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -830,7 +798,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import request, { MESDownloadFile, url } from '@/utils/request'
|
||||
import request, { MESDownloadFile, MESUploadFileNew, MESUploadFileNew_BasePath, url } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -850,8 +819,7 @@ export default {
|
||||
hadFile: [],
|
||||
dialogVisible: false,
|
||||
purchaseContractID: '', // 采购合同流水号
|
||||
checked: false,
|
||||
checkedsValue: '',
|
||||
hideStatus: '1',
|
||||
PartType: '物料采购',
|
||||
supplier: [], // 供应商数组
|
||||
dateRange: '', // 提交日期
|
||||
@@ -940,6 +908,7 @@ export default {
|
||||
this.searchTable()
|
||||
this.searchContract()
|
||||
this.searchNumber()
|
||||
this.getproductpartName()
|
||||
},
|
||||
methods: {
|
||||
partReturn(row) {
|
||||
@@ -1226,12 +1195,22 @@ export default {
|
||||
this.ExecDatabase(Data)
|
||||
},
|
||||
Submit(row) {
|
||||
console.log(row)
|
||||
console.log(this.tableData2)
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.warning('请确认查看有无采购明细')
|
||||
} else {
|
||||
if (row.采购合同流水号 !== this.purchaseNumber) {
|
||||
this.$message.warning('当前提交合同与查看的合同不一致')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
console.log(this.tableData2[i])
|
||||
if (this.tableData2[i].数量 > this.tableData2[i].订单数量) {
|
||||
this.$message.warning('采购物料数量不能大于订单数量')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
this.$confirm('是否提交?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -1312,7 +1291,40 @@ export default {
|
||||
}
|
||||
return isJPG
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
uploadSuccess(res, file) { // 上传成功回调
|
||||
// 生成文件保存路径
|
||||
const now = new Date()
|
||||
const timestamp = now.getFullYear().toString() +
|
||||
(now.getMonth() + 1).toString().padStart(2, '0') +
|
||||
now.getDate().toString().padStart(2, '0') +
|
||||
now.getHours().toString().padStart(2, '0') +
|
||||
now.getMinutes().toString().padStart(2, '0') +
|
||||
now.getSeconds().toString().padStart(2, '0') +
|
||||
now.getMilliseconds().toString().padStart(3, '0')
|
||||
const suffix = file.name.split('.').pop() || 'jpg'
|
||||
const savePath = MESUploadFileNew_BasePath + '\\OrderInquiry\\' + timestamp + '-' + this.purchaseContractID + '.' + suffix
|
||||
|
||||
// 构造SQL语句
|
||||
const sqlStatement = `update 采购管理_采购合同查询_图片 set 文件内容 = NULL, 文件路径 = N'${savePath}' where id = (select top 1 id from 采购管理_采购合同查询_图片 where 采购合同流水号 = ${this.purchaseContractID} order by 操作时间 desc)`
|
||||
|
||||
// 调用新接口保存文件
|
||||
const formData = new FormData()
|
||||
formData.append('file', file.raw)
|
||||
formData.append('savePath', savePath)
|
||||
formData.append('sqlStatement', sqlStatement)
|
||||
|
||||
axios.post(MESUploadFileNew, formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}).then(response => {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
console.log('文件保存成功:', savePath)
|
||||
} else {
|
||||
console.error('文件保存失败:', response.data)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('文件保存异常:', err)
|
||||
})
|
||||
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
@@ -1339,16 +1351,16 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable() {
|
||||
let orderNumberTypeValue_check, purchasedPartsValue_check, partNameValue_check, checked_check
|
||||
let orderNumberTypeValue_check, purchasedPartsValue_check, partNameValue_check, hideStatus_check, hideStatusValue
|
||||
this.orderNumberValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
|
||||
this.purchasedPartsValue ? purchasedPartsValue_check = 1 : purchasedPartsValue_check = 0
|
||||
this.productNameValue ? partNameValue_check = 1 : partNameValue_check = 0
|
||||
this.checked ? checked_check = 1 : checked_check = 0
|
||||
if (this.checked === false) {
|
||||
this.checkedsValue = '1'
|
||||
checked_check = '1'
|
||||
if (this.hideStatus === 'all') {
|
||||
hideStatus_check = 0
|
||||
hideStatusValue = ''
|
||||
} else {
|
||||
this.checkedsValue = '0'
|
||||
hideStatus_check = 1
|
||||
hideStatusValue = this.hideStatus
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['订单流水号', this.orderNumberValue]
|
||||
@@ -1359,8 +1371,8 @@ export default {
|
||||
param[5] = ['采购件', this.purchasedPartsValue]
|
||||
param[6] = ['排序名称', this.orderName]
|
||||
param[7] = ['排序方式', this.order]
|
||||
param[8] = ['隐藏_check', checked_check]
|
||||
param[9] = ['隐藏', this.checkedsValue]
|
||||
param[8] = ['隐藏_check', hideStatus_check]
|
||||
param[9] = ['隐藏', hideStatusValue]
|
||||
// 参数数量与名称要与存储过程对应
|
||||
var Data = this.CreateData('11', '采购管理_物料采购_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
@@ -1396,7 +1408,8 @@ export default {
|
||||
图号或型号: response.data[i].图号或型号,
|
||||
单价: response.data[i].单价,
|
||||
采购合同流水号: response.data[i].采购合同流水号,
|
||||
材料: response.data[i].材料
|
||||
材料: response.data[i].材料,
|
||||
订单数量: response.data[i].订单数量
|
||||
})
|
||||
this.numberPart = response.data[i].标准件和外购件流水号
|
||||
}
|
||||
@@ -1912,27 +1925,27 @@ export default {
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.el-form--label-left >>> .el-form-item__label {
|
||||
.el-form--label-left>>>.el-form-item__label {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
>>> .el-dialog--center .el-dialog__body {
|
||||
>>>.el-dialog--center .el-dialog__body {
|
||||
text-align: initial;
|
||||
padding: 20px 30px 20px
|
||||
}
|
||||
|
||||
>>> .el-dialog__header {
|
||||
>>>.el-dialog__header {
|
||||
padding: 20px 20px 0px;
|
||||
}
|
||||
|
||||
>>> .el-dialog__footer {
|
||||
>>>.el-dialog__footer {
|
||||
padding: 0px 20px 20px;
|
||||
/*text-align: right;*/
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
>>> .el-form-item {
|
||||
>>>.el-form-item {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,11 @@
|
||||
{{ scope.row.单价 ? Number(scope.row.单价).toFixed(2) : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" label="最新单价" align="center" show-overflow-tooltip prop="历史单价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.历史单价 ? Number(scope.row.历史单价).toFixed(2) : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="63px" label="到货数" align="center" prop="到货数" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数 }}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<el-form-item label="联系人:">
|
||||
<el-input v-model="form.contacts" style="width: 350px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="传真:">
|
||||
<el-form-item label="行号:">
|
||||
<el-input v-model="form.fax" style="width: 350px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货人:">
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
:remote-method="getCustomer"
|
||||
remote
|
||||
clearable
|
||||
filterable
|
||||
placeholder="买方名称"
|
||||
remote
|
||||
size="small"
|
||||
style="width:200px"
|
||||
@change="pageCurrent = 1;pageSize = 20;searchTable()">
|
||||
@@ -88,10 +88,17 @@
|
||||
type="primary"
|
||||
@click="pageCurrent = 1;pageSize = 20;searchTable()">查询
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-notebook-2"
|
||||
size="mini"
|
||||
style="margin-left: 20px;font-size: 20px"
|
||||
type="text"
|
||||
@click="showChangeLogDialogFunc()">资料修改记录
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
style="margin-left: 110px;font-size: 20px"
|
||||
style="margin-left: 20px;font-size: 20px"
|
||||
type="text"
|
||||
@click="exportTable()">合同
|
||||
</el-button>
|
||||
@@ -151,8 +158,8 @@
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('金额')" align="center" label="合同金额(元)" prop="合同金额">
|
||||
<template slot-scope="scope">
|
||||
<el-table-column v-if = "Number(token) === 11 || Number(token) === 2 || Number(token) === 3 || Number(token) === 9" :width="setColumnWidth('金额')" align="center" label="合同金额(元)" prop="合同金额">
|
||||
<template slot-scope="scope" >
|
||||
{{ scope.row.合同金额 ? Number(scope.row.合同金额).toFixed(2) : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -282,12 +289,12 @@
|
||||
<div style="float: left;width: 45%;margin-left: 20px">
|
||||
<div style="margin-top: 10px">甲方:{{ partyB }}</div>
|
||||
<div style="margin-top: 10px">乙方:{{ firstParty }}</div>
|
||||
<div style="margin-top: 10px">签署地点:{{ addressA1 }}</div>
|
||||
</div>
|
||||
<div style="float: left;margin-left: 30px;width: 45%">
|
||||
<div style="margin-top: 10px;margin-left: 70px">合同编号:{{ number }}</div>
|
||||
<div style="margin-top: 10px;margin-left: 70px">签订日期:{{ date }}</div>
|
||||
</div>
|
||||
<div style="float: left;width: 90%;margin-left: 20px;margin-top: 10px">签署地点:{{ addressA1 }}</div>
|
||||
</div>
|
||||
<table
|
||||
align="center"
|
||||
@@ -330,7 +337,7 @@
|
||||
<div style="margin-top: 5px">地址:{{ addressB }}</div>
|
||||
<div style="margin-top: 5px">联系电话:{{ contactNumberB }}</div>
|
||||
<div style="margin-top: 5px">联系人:{{ contacts }}</div>
|
||||
<div style="margin-top: 5px">传真:{{ FaxB }}</div>
|
||||
<div style="margin-top: 5px">行号:{{ FaxB }}</div>
|
||||
<div style="margin-top: 5px">代表(签字并盖章):{{ representative }}</div>
|
||||
</div>
|
||||
<div style="float: left;margin-left: 70px;width: 45%;">
|
||||
@@ -341,7 +348,7 @@
|
||||
<div style="margin-top: 5px">账号:{{ accountNumber }}</div>
|
||||
<div style="margin-top: 5px">服务热线:{{ ServiceHotLine }}</div>
|
||||
<div style="margin-top: 5px">联系电话:{{ contactNumberA }}</div>
|
||||
<div style="margin-top: 5px">传真:{{ FaxA }}</div>
|
||||
<div style="margin-top: 5px">行号:{{ FaxA }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -380,7 +387,8 @@
|
||||
</el-card>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" center width="1383px">
|
||||
<el-button icon="el-icon-check" size="small" type="primary" @click="submit()">提交</el-button>
|
||||
<el-button :disabled="isSubmit" icon="el-icon-check" size="small" type="primary" @click="submit()">提交
|
||||
</el-button>
|
||||
<el-table
|
||||
v-show="typeValue==='2'"
|
||||
:data="tableData3"
|
||||
@@ -457,7 +465,7 @@
|
||||
<el-button v-if="scope.row.edit" size="mini" type="text" @click="editMachine(scope.row)">确定</el-button>
|
||||
<el-button v-if="scope.row.edit" size="mini" type="text" @click="cancel1(scope.row)">取消</el-button>
|
||||
<el-tooltip :open-delay="700" content="删除" effect="dark" placement="top">
|
||||
<el-button icon="el-icon-edit" size="mini" type="text" @click="updateMachine(scope.row)"/>
|
||||
<el-button icon="el-icon-minus" size="mini" type="text" @click="deleteMachine(scope.row)"/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -655,13 +663,13 @@
|
||||
<div style="float: left;width: 45%;margin-left: 20px">
|
||||
<div style="margin-top: 10px">甲方:{{ firstParty1 }}</div>
|
||||
<div style="margin-top: 10px">乙方:{{ partyB1 }}</div>
|
||||
<div style="margin-top: 10px">签署地点:{{ addressA1 }}</div>
|
||||
</div>
|
||||
<div style="float: left;margin-left: 30px;width: 45%">
|
||||
<div style="margin-top: 10px;margin-left: 70px">合同编号:{{ number1 }}</div>
|
||||
<div style="margin-top: 10px;margin-left: 70px">签订日期:{{ date1 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: left;width: 90%;margin-left: 20px;margin-top: 10px">签署地点:{{ addressA1 }}</div>
|
||||
<table v-show="typeValue_edit===2" align="center" border="1 solid black" cellspacing="0px" width="100%">
|
||||
<tr id="tablehead15" style="height: 35px">
|
||||
<td colspan="1" style="text-align: center;width: 8%">序号</td>
|
||||
@@ -982,7 +990,8 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisibleQQ" center width="1223px">
|
||||
<el-button icon="el-icon-check" size="small" type="primary" @click="submit()">提交</el-button>
|
||||
<el-button :disabled="isSubmit" icon="el-icon-check" size="small" type="primary" @click="submit()">提交
|
||||
</el-button>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
:summary-method="getSummaries1"
|
||||
@@ -1113,10 +1122,10 @@
|
||||
<el-select
|
||||
v-model="form.买方名称"
|
||||
:remote-method="getCustomer"
|
||||
remote
|
||||
clearable
|
||||
filterable
|
||||
placeholder="买方名称"
|
||||
remote
|
||||
size="small"
|
||||
style="width:200px"
|
||||
@change="changeCustomer">
|
||||
@@ -1168,6 +1177,31 @@
|
||||
lazy
|
||||
style="width: 500px; height: 500px"/>
|
||||
</el-dialog>
|
||||
<!-- 资料改动记录弹窗 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="showChangeLogDialog"
|
||||
title="资料改动记录"
|
||||
width="800px">
|
||||
<el-table
|
||||
:data="changeLogData"
|
||||
border
|
||||
size="small">
|
||||
<el-table-column label="订单编号" width="180" align="center" prop="合同编号" />
|
||||
<el-table-column label="操作时间" width="180" align="center" prop="修改时间" />
|
||||
<el-table-column label="操作人" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ getPersonName(scope.row.修改人) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件名" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.name }}{{ scope.row.suffix ? '.' + scope.row.suffix : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原因" align="center" prop="修改原因" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1288,6 +1322,8 @@ export default {
|
||||
}
|
||||
], // 合同状态数组
|
||||
dialogVisible: false,
|
||||
isSubmit: false, // 是否禁用提交按钮
|
||||
clickTimeout: null,
|
||||
projectValue: '',
|
||||
MachineToolNumber: '',
|
||||
groupValue: '',
|
||||
@@ -1338,7 +1374,11 @@ export default {
|
||||
pageSize2: 10, // 分页每页显示条数
|
||||
productValue1: '',
|
||||
orderName: '', // 排序列名
|
||||
order: '' // 排序方式
|
||||
order: '', // 排序方式
|
||||
// 资料改动记录
|
||||
showChangeLogDialog: false,
|
||||
changeLogData: [],
|
||||
people: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -1360,8 +1400,59 @@ export default {
|
||||
// this.searchTable()
|
||||
this.getPaymentMethod()
|
||||
this.companyInformationSearch()
|
||||
this.getPeople()
|
||||
},
|
||||
methods: {
|
||||
getPeople() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '人员信息_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getPersonName(value) {
|
||||
const person = this.people.find(item => item.value === value)
|
||||
return person ? person.label : value
|
||||
},
|
||||
// 打开资料改动记录弹窗
|
||||
showChangeLogDialogFunc() {
|
||||
this.changeLogData = []
|
||||
const projectItems = []
|
||||
var param = []
|
||||
var Data = this.CreateData('11', 'PDM_项目名称_客户提供资料_全历史数据_查询', param)
|
||||
this.ExecDatabase(Data).then(res => {
|
||||
if (res.data && res.data.length > 0) {
|
||||
// 从tableData中获取对应项目流水号的合同编号
|
||||
console.log(res.data)
|
||||
console.log(this.tableData)
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
for (let j = 0; j < this.tableData.length; j++) {
|
||||
if (this.tableData[j].项目流水号 == res.data[i].项目流水号) {
|
||||
res.data[i].合同编号 = this.tableData[j].合同编号
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(projectItems)
|
||||
|
||||
// 为每条记录添加合同编号
|
||||
// res.data.forEach(item => {
|
||||
// // 如果有多个相同项目流水号的记录,取第一个的合同编号
|
||||
// item.合同编号 = projectItems.length > 0 ? projectItems[0].合同编号 : ''
|
||||
// })
|
||||
this.changeLogData = res.data
|
||||
this.showChangeLogDialog = true
|
||||
} else {
|
||||
this.showChangeLogDialog = true
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取改动记录失败')
|
||||
})
|
||||
},
|
||||
cellStyle({ row, column, rowIndex, columnIndex }) {
|
||||
if (Number(row.已收金额) === 0 && columnIndex === 5) {
|
||||
return 'background: #FF6666'
|
||||
@@ -1460,6 +1551,13 @@ export default {
|
||||
if (column.label === '合同编号') {
|
||||
this.$router.push({ path: '/SalesManagement/OrderInquiry', query: { 合同编号: row.合同编号 }})
|
||||
}
|
||||
if (column.label === '买方名称') {
|
||||
console.log(row)
|
||||
this.customerNameValue = Number(row.客户流水号)
|
||||
this.getCustomer(row.客户名称)
|
||||
this.searchTable()
|
||||
// this.customerNameValue = row.客户名称
|
||||
}
|
||||
},
|
||||
getPaymentMethod() {
|
||||
this.paymentMethod = []
|
||||
@@ -2236,19 +2334,84 @@ export default {
|
||||
})
|
||||
},*/
|
||||
submit() {
|
||||
// 判断是不是多专机订单 如果是 就都处理 不是就走原本的
|
||||
if (this.tableData30.length >= 2 && this.number.substring(0, 2) === 'ZJ') {
|
||||
// 先判断这个合同有几个机床,然后把个机床都处理一遍
|
||||
for (const item of this.tableData30) {
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.projectValue]
|
||||
param[1] = ['机床流水号', item.机床流水号]
|
||||
param[2] = ['修改人', this.id]
|
||||
param[3] = ['合同备注', this.explain]
|
||||
var Data = this.CreateData('12', 'PDM_组件名称_确认更改新', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// 先禁用按钮,避免重复点击
|
||||
this.isSubmit = true
|
||||
console.log('已禁用按钮')
|
||||
clearTimeout(this.clickTimeout)
|
||||
this.clickTimeout = setTimeout(() => {
|
||||
// 判断是不是多专机订单 如果是 就都处理 不是就走原本的
|
||||
if (this.tableData30.length >= 2 && this.number.substring(0, 2) === 'ZJ') {
|
||||
// 先判断这个合同有几个机床,然后把个机床都处理一遍
|
||||
for (const item of this.tableData30) {
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.projectValue]
|
||||
param[1] = ['机床流水号', item.机床流水号]
|
||||
param[2] = ['修改人', this.id]
|
||||
param[3] = ['合同备注', this.explain]
|
||||
var Data = this.CreateData('12', 'PDM_组件名称_确认更改新', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.isSubmit = false
|
||||
this.dialogVisible = false
|
||||
this.dialogVisibleQQ = false
|
||||
this.searchTable()
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.projectValue]
|
||||
param[1] = ['类型', this.typeValue]
|
||||
var Data = this.CreateData('11', 'PDM_项目名称_文本_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.returns = []
|
||||
this.TotalAmount1 = ''
|
||||
this.TotalAmount = ''
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.returns.push({
|
||||
序号: response.data[i].序号,
|
||||
规格品名: response.data[i].规格品名,
|
||||
单位: response.data[i].单位,
|
||||
数量: response.data[i].数量,
|
||||
单价: response.data[i].单价.toFixed(2),
|
||||
金额: response.data[i].金额.toFixed(2)
|
||||
})
|
||||
}
|
||||
this.TotalAmount1 = response.data[0].总金额.toFixed(2)
|
||||
this.TotalAmount = response.data[0].总金额_文本
|
||||
})
|
||||
if (Number(this.typeValue) === 2) {
|
||||
var param1 = []
|
||||
param1[0] = ['项目流水号', this.projectValue]
|
||||
param1[1] = ['类型', 1]
|
||||
var Data1 = this.CreateData('11', 'PDM_项目名称_文本_查询数据', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
this.returns3 = []
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.returns3.push({
|
||||
序号: response.data[i].序号,
|
||||
规格品名: response.data[i].规格品名,
|
||||
单位: response.data[i].单位,
|
||||
数量: response.data[i].配置数,
|
||||
单价: response.data[i].单价.toFixed(2),
|
||||
金额: response.data[i].金额.toFixed(2)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
var param1 = []
|
||||
param1[0] = ['项目流水号', this.projectValue]
|
||||
param1[1] = ['机床流水号', this.MachineToolNumber]
|
||||
param1[2] = ['修改人', this.id]
|
||||
param1[3] = ['合同备注', this.explain]
|
||||
var Data1 = this.CreateData('12', 'PDM_组件名称_确认更改新', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.isSubmit = false
|
||||
this.dialogVisible = false
|
||||
this.dialogVisibleQQ = false
|
||||
this.searchTable()
|
||||
@@ -2297,64 +2460,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
var param1 = []
|
||||
param1[0] = ['项目流水号', this.projectValue]
|
||||
param1[1] = ['机床流水号', this.MachineToolNumber]
|
||||
param1[2] = ['修改人', this.id]
|
||||
param1[3] = ['合同备注', this.explain]
|
||||
var Data1 = this.CreateData('12', 'PDM_组件名称_确认更改新', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogVisible = false
|
||||
this.dialogVisibleQQ = false
|
||||
this.searchTable()
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.projectValue]
|
||||
param[1] = ['类型', this.typeValue]
|
||||
var Data = this.CreateData('11', 'PDM_项目名称_文本_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.returns = []
|
||||
this.TotalAmount1 = ''
|
||||
this.TotalAmount = ''
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.returns.push({
|
||||
序号: response.data[i].序号,
|
||||
规格品名: response.data[i].规格品名,
|
||||
单位: response.data[i].单位,
|
||||
数量: response.data[i].数量,
|
||||
单价: response.data[i].单价.toFixed(2),
|
||||
金额: response.data[i].金额.toFixed(2)
|
||||
})
|
||||
}
|
||||
this.TotalAmount1 = response.data[0].总金额.toFixed(2)
|
||||
this.TotalAmount = response.data[0].总金额_文本
|
||||
})
|
||||
if (Number(this.typeValue) === 2) {
|
||||
var param1 = []
|
||||
param1[0] = ['项目流水号', this.projectValue]
|
||||
param1[1] = ['类型', 1]
|
||||
var Data1 = this.CreateData('11', 'PDM_项目名称_文本_查询数据', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
this.returns3 = []
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.returns3.push({
|
||||
序号: response.data[i].序号,
|
||||
规格品名: response.data[i].规格品名,
|
||||
单位: response.data[i].单位,
|
||||
数量: response.data[i].配置数,
|
||||
单价: response.data[i].单价.toFixed(2),
|
||||
金额: response.data[i].金额.toFixed(2)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}, 1000) // 设置防抖时间
|
||||
},
|
||||
termination(row) {
|
||||
this.$confirm('是否终止合同执行?', '提示', {
|
||||
@@ -2558,6 +2664,20 @@ export default {
|
||||
updateMachine(row) {
|
||||
row.edit = !row.edit
|
||||
},
|
||||
deleteMachine(row) {
|
||||
var param = []
|
||||
param[0] = ['id', row.id]
|
||||
var Data = this.CreateData('12', 'PDM_机床名称_删除数据_临时', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchMachine()
|
||||
this.searchProduct1()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
createProduct(val) {
|
||||
if (this.MachineToolNumber) {
|
||||
var param = []
|
||||
|
||||
@@ -2455,11 +2455,13 @@ export default {
|
||||
param[3] = ['单位', row.单位]
|
||||
param[4] = ['数量', row.数量]
|
||||
param[5] = ['单价', row.单价]
|
||||
param[6] = ['配置数', row.数量]
|
||||
param[6] = ['配置数', row.配置数]
|
||||
if (this.typeValue === '2') {
|
||||
param[6] = ['配置数', row.配置数]
|
||||
console.log(1)
|
||||
} else {
|
||||
param[6] = ['配置数', row.数量]
|
||||
param[6] = ['配置数', row.配置数]
|
||||
console.log(2)
|
||||
}
|
||||
var Data = this.CreateData('12', 'PDM_组件名称_编辑数据_临时', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
|
||||
@@ -288,9 +288,9 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
<div style="margin-top: 20px;margin-left: 40px">备注:{{ contractRemarks }}</div>
|
||||
<div style="margin-top: 10px;margin-left: 40px">联系人:{{ contacts }}</div>
|
||||
<!-- <div style="margin-top: 10px;margin-left: 40px">联系人:{{ contacts }}</div> -->
|
||||
<div style="margin-top: 10px;margin-left: 40px">电话:{{ phoneNumber1 }}</div>
|
||||
<div style="margin-top: 10px;margin-left: 40px">传真:{{ Fax }}</div>
|
||||
<!-- <div style="margin-top: 10px;margin-left: 40px">传真:{{ Fax }}</div> -->
|
||||
<div style="margin-top: 20px;margin-left: 420px">浙江景耀数控科技有限公司</div>
|
||||
<div style="margin-left: 480px">{{ dateTime }}</div>
|
||||
</div>
|
||||
|
||||
@@ -2,14 +2,44 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-input v-model="customerName" style="width: 200px" size="small" clearable placeholder="客户名称" @keyup.enter.native="pageCurrent = 1;pageSize = 100;searchTable()"/>
|
||||
<el-input v-model="region" style="width: 200px;margin-left: 10px" clearable size="small" placeholder="省份" @keyup.enter.native="pageCurrent = 1;pageSize = 100;searchTable()"/>
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="pageCurrent = 1;pageSize = 100;searchTable()">查询</el-button>
|
||||
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="addCustomer();flag1 = 1">客户</el-button>
|
||||
<el-input
|
||||
v-model="customerName"
|
||||
style="width: 200px"
|
||||
size="small"
|
||||
clearable
|
||||
placeholder="客户名称"
|
||||
@keyup.enter.native="pageCurrent = 1; pageSize = 100; searchTable()" />
|
||||
<el-input
|
||||
v-model="region"
|
||||
style="width: 200px;margin-left: 10px"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="省份"
|
||||
@keyup.enter.native="pageCurrent = 1; pageSize = 100; searchTable()" />
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent = 1; pageSize = 100; searchTable()">查询</el-button>
|
||||
<el-button
|
||||
type="distribution"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
size="small"
|
||||
@click="addCustomer(); flag1 = 1">客户</el-button>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1491px" height="740px">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 1591px"
|
||||
height="740px">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center" />
|
||||
<el-table-column :width="setColumnWidth('客户编码')" label="客户编码" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户编码 }}
|
||||
@@ -65,7 +95,22 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120px">
|
||||
<el-table-column width="100px" label="负责人员" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.负责人员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="登记时间" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.登记时间 ? scope.row.登记时间.substring(0, 10) : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" label="客户来源" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户来源 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1000" class="item" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
@@ -73,7 +118,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
class="el-icon-edit-outline"
|
||||
@click="handleEdit(scope.row);flag1 = 2"/>
|
||||
@click="handleEdit(scope.row); flag1 = 2" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1000" class="item" effect="dark" content="删除" placement="top">
|
||||
@@ -83,7 +128,7 @@
|
||||
type="text"
|
||||
style="margin-left: 20px"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"/>
|
||||
@click="handleDelete(scope.row)" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@@ -98,71 +143,108 @@
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
@current-change="handleCurrentChanges" />
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogFormVisible" center width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-position="left"
|
||||
label-width="90px"
|
||||
class="demo-ruleForm"
|
||||
style="margin: auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="省份:" prop="省份">
|
||||
<el-select v-model="form.省份" size="mini" style="margin: 0;width: 200px" placeholder="请选择省份" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in province"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
<el-select
|
||||
v-model="form.省份"
|
||||
size="mini"
|
||||
style="margin: 0;width: 200px"
|
||||
placeholder="请选择省份"
|
||||
filterable
|
||||
clearable>
|
||||
<el-option v-for="item in province" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户编码:" prop="客户编码">
|
||||
<el-input v-model="form.客户编码" clearable size="small" style="width:200px" placeholder="请输入客户编码"/>
|
||||
<el-input v-model="form.客户编码" clearable size="small" style="width:200px" placeholder="请输入客户编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称:" prop="客户名称">
|
||||
<el-input v-model="form.客户名称" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
|
||||
<el-input v-model="form.客户名称" clearable size="small" style="width:200px" placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="简称:" prop="简称">
|
||||
<el-input v-model="form.简称" clearable size="small" style="width:200px" placeholder="请输入简称"/>
|
||||
<el-input v-model="form.简称" clearable size="small" style="width:200px" placeholder="请输入简称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人:" prop="联系人">
|
||||
<el-input v-model="form.联系人" clearable size="small" style="width:200px" placeholder="请输入联系人"/>
|
||||
<el-input v-model="form.联系人" clearable size="small" style="width:200px" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话:" prop="经理电话">
|
||||
<el-input v-model="form.经理电话" clearable size="small" style="width:200px" placeholder="请输入联系电话"/>
|
||||
<el-input v-model="form.经理电话" clearable size="small" style="width:200px" placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收货人:" prop="收货人">
|
||||
<el-input v-model="form.收货人" clearable size="small" style="width:200px" placeholder="请输入收货人"/>
|
||||
<el-input v-model="form.收货人" clearable size="small" style="width:200px" placeholder="请输入收货人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收货电话:" prop="联系电话">
|
||||
<el-input v-model="form.联系电话" clearable size="small" style="width:200px" placeholder="请输入收货电话"/>
|
||||
<el-input v-model="form.联系电话" clearable size="small" style="width:200px" placeholder="请输入收货电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮寄地址:" prop="邮寄地址">
|
||||
<el-input v-model="form.邮寄地址" clearable size="small" style="width:200px" placeholder="请输入邮寄地址"/>
|
||||
<el-input v-model="form.邮寄地址" clearable size="small" style="width:200px" placeholder="请输入邮寄地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电子邮箱:" prop="电子邮箱">
|
||||
<el-input v-model="form.电子邮箱" clearable size="small" style="width:200px" placeholder="请输入电子邮箱"/>
|
||||
<el-input v-model="form.电子邮箱" clearable size="small" style="width:200px" placeholder="请输入电子邮箱" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注:" prop="备注">
|
||||
<el-input v-model="form.备注" clearable size="small" style="width:200px" placeholder="请输入备注"/>
|
||||
<el-input v-model="form.备注" clearable size="small" style="width:200px" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人员:" prop="负责人员">
|
||||
<el-input
|
||||
v-model="form.负责人员"
|
||||
:disabled="flag1 === 2 && id != 273"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"
|
||||
placeholder="请输入负责人员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="登记时间:" prop="登记时间">
|
||||
<el-date-picker
|
||||
v-model="form.登记时间"
|
||||
:disabled="flag1 === 2 && id != 273"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width:200px"
|
||||
placeholder="请选择登记时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户来源:" prop="客户来源">
|
||||
<el-input v-model="form.客户来源" clearable size="small" style="width:200px" placeholder="请输入客户来源" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -196,7 +278,10 @@ export default {
|
||||
联系电话: '',
|
||||
邮寄地址: '',
|
||||
电子邮箱: '',
|
||||
备注: ''
|
||||
备注: '',
|
||||
负责人员: '',
|
||||
登记时间: null,
|
||||
客户来源: ''
|
||||
},
|
||||
people: [],
|
||||
rules: {
|
||||
@@ -282,6 +367,9 @@ export default {
|
||||
this.form.邮寄地址 = row.地址
|
||||
this.form.电子邮箱 = row.电子邮箱
|
||||
this.form.备注 = row.备注
|
||||
this.form.负责人员 = row.负责人员
|
||||
this.form.登记时间 = row.登记时间 ? row.登记时间.substring(0, 10) : null
|
||||
this.form.客户来源 = row.客户来源
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submit(formName) {
|
||||
@@ -300,6 +388,9 @@ export default {
|
||||
param[8] = ['电子邮箱', this.form.电子邮箱]
|
||||
param[9] = ['备注', this.form.备注]
|
||||
param[10] = ['客户编码', this.form.客户编码]
|
||||
param[11] = ['负责人员', this.form.负责人员]
|
||||
param[12] = ['登记时间', this.form.登记时间 || null]
|
||||
param[13] = ['客户来源', this.form.客户来源]
|
||||
var Data = this.CreateData('12', '客户管理_客户信息_增加', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -325,6 +416,9 @@ export default {
|
||||
param1[9] = ['备注', this.form.备注]
|
||||
param1[10] = ['客户流水号', this.customerValue]
|
||||
param1[11] = ['客户编码', this.form.客户编码]
|
||||
param1[12] = ['负责人员', this.form.负责人员]
|
||||
param1[13] = ['登记时间', this.form.登记时间 || null]
|
||||
param1[14] = ['客户来源', this.form.客户来源]
|
||||
var Data1 = this.CreateData('12', '客户管理_客户信息_编辑', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
|
||||
@@ -569,6 +569,7 @@ export default {
|
||||
var Data = this.CreateData('11', '发货通知_订单信息_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
console.log(this.tableData)
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
|
||||
@@ -196,7 +196,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { url } from '@/utils/request'
|
||||
import { url, MESUploadFileNew, MESDownloadFileNew, MESUploadFileNew_BasePath } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -285,8 +286,41 @@ export default {
|
||||
warningExceed() {
|
||||
this.$message.error('仅可上传五张照片')
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
this.dialogFormVisible1 = false
|
||||
uploadSuccess(res, file) { // 上传成功回调
|
||||
// 生成文件保存路径: 基础路径/DeliveryRecord/年月日时分秒毫秒.后缀
|
||||
const now = new Date()
|
||||
const timestamp = now.getFullYear().toString() +
|
||||
(now.getMonth() + 1).toString().padStart(2, '0') +
|
||||
now.getDate().toString().padStart(2, '0') +
|
||||
now.getHours().toString().padStart(2, '0') +
|
||||
now.getMinutes().toString().padStart(2, '0') +
|
||||
now.getSeconds().toString().padStart(2, '0') +
|
||||
now.getMilliseconds().toString().padStart(3, '0')
|
||||
const suffix = file.name.split('.').pop() || 'jpg'
|
||||
const savePath = MESUploadFileNew_BasePath + '\\DeliveryRecord\\' + timestamp + '-' + this.listValue + '.' + suffix
|
||||
|
||||
// 构造SQL语句:清空文件内容,更新文件路径
|
||||
const sqlStatement = `update 发货管理_发货单_图片 set 文件内容 = NULL, 文件路径 = N'${savePath}' where id = (select top 1 id from 发货管理_发货单_图片 where 发货单流水号 = ${this.listValue} order by 操作时间 desc)`
|
||||
|
||||
// 调用新接口保存文件到磁盘
|
||||
const formData = new FormData()
|
||||
formData.append('file', file.raw)
|
||||
formData.append('savePath', savePath)
|
||||
formData.append('sqlStatement', sqlStatement)
|
||||
|
||||
axios.post(MESUploadFileNew, formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}).then(response => {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
console.log('文件保存成功:', savePath)
|
||||
} else {
|
||||
console.error('文件保存失败:', response.data)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('文件保存异常:', err)
|
||||
})
|
||||
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
submit2() {
|
||||
@@ -398,8 +432,22 @@ export default {
|
||||
var Data = this.CreateData('11', '发货单_图片_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
const item = response.data[i]
|
||||
// 优先使用文件路径(新方式),否则使用数据库内容(旧方式)
|
||||
if (item.文件路径) {
|
||||
// 从文件系统读取
|
||||
axios.get(MESDownloadFileNew, {
|
||||
params: { filePath: item.文件路径 }
|
||||
}).then(res => {
|
||||
if (res.data && res.data[0] && res.data[0].文件内容) {
|
||||
this.urls.push('data:image/png;base64,' + res.data[0].文件内容)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('图片加载失败:', err)
|
||||
})
|
||||
} else if (item.文件内容 !== null) {
|
||||
// 兼容旧数据:直接使用数据库中的base64
|
||||
this.urls.push('data:image/png;base64,' + item.文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -247,8 +247,22 @@ export default {
|
||||
var Data = this.CreateData('11', '发货单_图片_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
const item = response.data[i]
|
||||
// 优先使用文件路径(新方式),否则使用数据库内容(旧方式)
|
||||
if (item.文件路径) {
|
||||
// 从文件系统读取
|
||||
axios.get(MESDownloadFileNew, {
|
||||
params: { filePath: item.文件路径 }
|
||||
}).then(res => {
|
||||
if (res.data && res.data[0] && res.data[0].文件内容) {
|
||||
this.urls.push('data:image/png;base64,' + res.data[0].文件内容)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('图片加载失败:', err)
|
||||
})
|
||||
} else if (item.文件内容 !== null) {
|
||||
// 兼容旧数据:直接使用数据库中的base64
|
||||
this.urls.push('data:image/png;base64,' + item.文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -65,10 +65,12 @@
|
||||
<span>*买方名称:</span>
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
:remote-method="getCustomer"
|
||||
placeholder="选择买方"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
style="width: 150px;margin: 10px 0 10px 2px"
|
||||
@change="editContract">
|
||||
<el-option
|
||||
@@ -1635,6 +1637,7 @@ export default {
|
||||
exportTable() {
|
||||
},
|
||||
getCustomer(query) {
|
||||
this.customerName = []
|
||||
var param = []
|
||||
param[0] = ['客户名称', query]
|
||||
var Data = this.CreateData('11', '合同管理_客户信息_查询数据_bak', param)
|
||||
|
||||
@@ -58,10 +58,12 @@
|
||||
<span>*买方名称:</span>
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
:remote-method="getCustomer"
|
||||
placeholder="选择买方"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
style="width: 150px;margin: 10px 0 10px 2px"
|
||||
@change="editContract">
|
||||
<el-option
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
@click="pageCurrent = 1;pageSize = 20;searchTable()">查询
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="Number(token)===2"
|
||||
v-show="Number(token)===2 && jobNumber == '2009'"
|
||||
icon="el-icon-thumb"
|
||||
type="warning"
|
||||
plain
|
||||
@@ -389,17 +389,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- :disabled="Number(scope.row.是否分配)===0"-->
|
||||
<el-tooltip :open-delay="500" effect="dark" content="装配BOM" placement="top">
|
||||
<el-button
|
||||
:disabled="Number(scope.row.是否分配)===0"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@click="AssemblyBOM(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<!-- :disabled="Number(scope.row.是否分配)===0"-->
|
||||
<el-tooltip :open-delay="500" effect="dark" content="BOM" placement="top">
|
||||
<el-button
|
||||
:disabled="Number(scope.row.是否分配)===0"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@@ -423,6 +423,7 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="500" effect="dark" content="删除部件" placement="top">
|
||||
<el-button
|
||||
v-show="Number(token)===2"
|
||||
:disabled="scope.row.是否合同创建 === 1 || prohibit || (Number(token) !== 2 && Number(token) !== 3 && Number(token) !== 11 && Number(token) !== 12 && Number(token) !== 22)"
|
||||
icon="el-icon-delete"
|
||||
type="text"
|
||||
@@ -1673,9 +1674,10 @@
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('已领数')" label="已申请数" align="center">
|
||||
<el-table-column :width="setColumnWidth('已领数')" label="占用数" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已领数量 }}
|
||||
<!-- {{ scope.row.已领数量 }} -->
|
||||
{{ scope.row.全全表明细数量总和 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -1687,6 +1689,7 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
import { MESDownloadFile } from '@/utils/request'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -1871,7 +1874,8 @@ export default {
|
||||
pageCurrent2: 1, // 分页当前页
|
||||
pageSize2: 20, // 分页每页显示条数
|
||||
orderName: '', // 排序列名
|
||||
order: '' // 排序方式
|
||||
order: '', // 排序方式
|
||||
jobNumber: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -1892,6 +1896,8 @@ export default {
|
||||
this.fetchData()
|
||||
this.getTreeData()
|
||||
this.viewModifyOrderClick()
|
||||
|
||||
this.jobNumber = Cookie.get('jobNumber')
|
||||
},
|
||||
methods: {
|
||||
finish() {
|
||||
@@ -3071,7 +3077,7 @@ export default {
|
||||
this.orderRemarksPrint = row.订单备注
|
||||
this.orderPersonnel = row.创建人
|
||||
this.consignee = row.收货人
|
||||
this.orderDate = row.下达日期
|
||||
this.orderDate = row.创建日期
|
||||
this.deliveryDate = row.完成期限
|
||||
this.orderId = row.订单流水号
|
||||
this.typeValue = row.订单类型
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
:remote-method="getCustomer"
|
||||
style="width:200px"
|
||||
placeholder="买方名称"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
filterable
|
||||
placeholder="买方名称"
|
||||
remote
|
||||
size="small"
|
||||
style="width:200px"
|
||||
@change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in customerName"
|
||||
@@ -21,18 +21,18 @@
|
||||
<span style="font-size: 13px;color: black">签订日期</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;margin-right: 330px"
|
||||
value-format="yyyy-MM-dd"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
size="small"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 240px;margin-right: 330px"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="searchTable()"/>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看库存信息" placement="top">
|
||||
<el-button type="text" size="mini" @click="handleStock">
|
||||
<el-tooltip :open-delay="700" content="查看库存信息" effect="dark" placement="top">
|
||||
<el-button size="mini" type="text" @click="handleStock">
|
||||
<svg-icon icon-class="库存查询" style="width: 20px;height: 20px"/>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
@@ -41,41 +41,46 @@
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 861px;"
|
||||
height="222"
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
stripe
|
||||
style="width: 861px;"
|
||||
@row-click="searchTable1">
|
||||
<el-table-column :width="setColumnWidth('合同编号')" label="合同编号" align="center" show-overflow-tooltip>
|
||||
<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('姓名')" label="收货人" align="center" show-overflow-tooltip>
|
||||
<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('日期')" label="签订日期" align="center" show-overflow-tooltip>
|
||||
<el-table-column :width="setColumnWidth('日期')" align="center" label="签订日期" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.签订日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" align="center" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="客户名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120px" label="合同交货期限" align="center" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="合同交货期限" show-overflow-tooltip width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交货期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155px" label="操作" align="center" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="操作" show-overflow-tooltip width="155px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-check" size="mini" @click.native.stop="ReleaseOrder(scope.row)">
|
||||
<el-button
|
||||
:disabled="buttonDisable"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click.native.stop="ReleaseOrder(scope.row)">
|
||||
提交订单
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -83,19 +88,19 @@
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px" @mouseover="show=true" @mouseleave="show=false">
|
||||
<div style="margin-top: 10px" @mouseleave="show=false" @mouseover="show=true">
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
:data="tableData1"
|
||||
:header-cell-style="changeStyle"
|
||||
highlight-current-row
|
||||
border
|
||||
height="430px"
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
style="width: 1821px;margin-top: 10px"
|
||||
height="430px"
|
||||
@row-dblclick="changeState">
|
||||
<el-table-column width="50px" label="序号" fixed type="index" align="center"/>
|
||||
<el-table-column width="120px" fixed label="部件名称" align="center">
|
||||
<el-table-column align="center" fixed label="序号" type="index" width="50px"/>
|
||||
<el-table-column align="center" fixed label="部件名称" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="parseInt(scope.row.是否合同创建)===0&&scope.row.edit ===true">
|
||||
<el-input v-model="scope.row.产品名称" size="mini" style="width: 100%" @dblclick.native.stop/>
|
||||
@@ -105,7 +110,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" label="单位" fixed align="center">
|
||||
<el-table-column align="center" fixed label="单位" width="70px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="parseInt(scope.row.是否合同创建)===0&&scope.row.edit ===true">
|
||||
<el-input v-model="scope.row.单位" size="mini" style="width: 100%" @dblclick.native.stop/>
|
||||
@@ -115,24 +120,24 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="数量" fixed align="center">
|
||||
<el-table-column align="center" fixed label="数量" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="parseInt(scope.row.是否合同创建)===0&&scope.row.edit ===true">
|
||||
<el-input v-model="scope.row.数量" size="mini" type="number" style="width: 100%" @dblclick.native.stop/>
|
||||
<el-input v-model="scope.row.数量" size="mini" style="width: 100%" type="number" @dblclick.native.stop/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="200px" label="产品详情" fixed align="center">
|
||||
<el-table-column align="center" fixed label="产品详情" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="parseInt(scope.row.是否合同创建)===0&&scope.row.edit ===true">
|
||||
<el-input
|
||||
v-model="scope.row.产品详情"
|
||||
size="mini"
|
||||
type="textarea"
|
||||
style="width: 100%"
|
||||
type="textarea"
|
||||
@dblclick.native.stop/>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -140,16 +145,16 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="230px" label="轴承型号" align="center">
|
||||
<el-table-column align="center" label="轴承型号" width="230px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-cascader
|
||||
ref="cascader"
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.轴承位置"
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
:options="bearing"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="getData3(scope.row)"
|
||||
@dblclick.native.stop/>
|
||||
</template>
|
||||
@@ -158,14 +163,14 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('安装方向')" label="安装方向" align="center">
|
||||
<el-table-column :width="setColumnWidth('安装方向')" align="center" label="安装方向">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-select
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.安装方向"
|
||||
filterable
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop>
|
||||
@@ -181,17 +186,17 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="300px" label="电机型号/电机联接板" align="center">
|
||||
<el-table-column align="center" label="电机型号/电机联接板" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-cascader
|
||||
ref="cascader"
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.电机位置"
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
:options="motorModel"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="getData1(scope.row)"
|
||||
@dblclick.native.stop/>
|
||||
</template>
|
||||
@@ -200,18 +205,18 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="传动方式" align="center">
|
||||
<el-table-column align="center" label="传动方式" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-cascader
|
||||
ref="cascader"
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
:show-all-levels="false"
|
||||
v-model="scope.row.传动方式位置"
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
:options="transmissionMode"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:show-all-levels="false"
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="getData2(scope.row, scope.$index)"
|
||||
@dblclick.native.stop/>
|
||||
</template>
|
||||
@@ -220,14 +225,14 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="190px" label="主轴轮" align="center">
|
||||
<el-table-column align="center" label="主轴轮" width="190px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-select
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.主轴轮"
|
||||
filterable
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop>
|
||||
@@ -243,14 +248,14 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="190px" label="电机轮" align="center">
|
||||
<el-table-column align="center" label="电机轮" width="190px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-select
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.电机轮"
|
||||
filterable
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop>
|
||||
@@ -266,14 +271,14 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180px" label="传动带" align="center">
|
||||
<el-table-column align="center" label="传动带" width="180px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-select
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.皮带轮"
|
||||
filterable
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop>
|
||||
@@ -289,14 +294,14 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180px" label="拉杆" align="center">
|
||||
<el-table-column align="center" label="拉杆" width="180px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-select
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.拉杆"
|
||||
filterable
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop>
|
||||
@@ -312,7 +317,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="其它" align="center">
|
||||
<el-table-column align="center" label="其它" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-input v-model="scope.row.其它" size="mini" style="width: 100%" @dblclick.native.stop/>
|
||||
@@ -322,12 +327,12 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('输出转速')" label="输出转速" align="center">
|
||||
<el-table-column :width="setColumnWidth('输出转速')" align="center" label="输出转速">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-input
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.输出转速"
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
size="mini"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop/>
|
||||
@@ -337,14 +342,14 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="160px" label="中心内冷" align="center">
|
||||
<el-table-column align="center" label="中心内冷" width="160px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-select
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
v-model="scope.row.中心内冷"
|
||||
filterable
|
||||
:disabled="!(scope.row.是否滑台===2)"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop>
|
||||
@@ -360,14 +365,14 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="160px" label="防护类型" align="center">
|
||||
<el-table-column align="center" label="防护类型" width="160px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-select
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
v-model="scope.row.防护类型"
|
||||
filterable
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@dblclick.native.stop>
|
||||
@@ -383,18 +388,18 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120px" label="电机型号" align="center">
|
||||
<el-table-column align="center" label="电机型号" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-cascader
|
||||
ref="cascader"
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
:show-all-levels="false"
|
||||
v-model="scope.row.滑台电机位置"
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
:options="motorModel1"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:show-all-levels="false"
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="getData4(scope.row, scope.$index)"
|
||||
@dblclick.native.stop/>
|
||||
</template>
|
||||
@@ -403,18 +408,18 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120px" label="电机联接板" align="center">
|
||||
<el-table-column align="center" label="电机联接板" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-cascader
|
||||
ref="cascader"
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
:show-all-levels="false"
|
||||
v-model="scope.row.电机联接板"
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
:options="ConnectingPlate"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:show-all-levels="false"
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="getData5(scope.row, scope.$index)"
|
||||
@dblclick.native.stop/>
|
||||
</template>
|
||||
@@ -423,18 +428,18 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('联轴器')" label="联轴器" align="center">
|
||||
<el-table-column :width="setColumnWidth('联轴器')" align="center" label="联轴器">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit ===true">
|
||||
<el-cascader
|
||||
ref="cascader"
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
:show-all-levels="false"
|
||||
v-model="scope.row.联轴器"
|
||||
:disabled="!(scope.row.是否滑台===1)"
|
||||
:options="coupling"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:show-all-levels="false"
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="getData6(scope.row, scope.$index)"
|
||||
@dblclick.native.stop/>
|
||||
</template>
|
||||
@@ -443,16 +448,16 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="操作" fixed="right" align="center">
|
||||
<el-table-column align="center" fixed="right" label="操作" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.edit" type="text" size="mini" @click="editProduct(scope.row)">确认</el-button>
|
||||
<el-button v-if="scope.row.edit" type="text" size="mini" @click="cancel(scope.row)">取消</el-button>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="删除" placement="top">
|
||||
<el-button v-if="scope.row.edit" size="mini" type="text" @click="editProduct(scope.row)">确认</el-button>
|
||||
<el-button v-if="scope.row.edit" size="mini" type="text" @click="cancel(scope.row)">取消</el-button>
|
||||
<el-tooltip :open-delay="700" content="删除" effect="dark" placement="top">
|
||||
<el-button
|
||||
:disabled="parseInt(scope.row.是否合同创建)===1"
|
||||
type="text"
|
||||
icon="el-icon-minus"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="deleteProduct(scope.row)"/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@@ -461,67 +466,67 @@
|
||||
<el-button v-show="show" icon="el-icon-circle-plus-outline" size="mini" @click="createProduct"/>
|
||||
</div>
|
||||
<span>订单备注:</span>
|
||||
<el-input v-model="remarks" type="textarea" style="width:600px"/>
|
||||
<el-input v-model="remarks" style="width:600px" type="textarea"/>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" center width="770px">
|
||||
<div style="width: 100%;overflow: hidden">
|
||||
<el-input
|
||||
v-model="materialNameTypeValue"
|
||||
style="width:200px"
|
||||
clearable
|
||||
placeholder="物料名称规格型号"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@keyup.enter.native="pageCurrent=1;searchTable10()"/>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData10"
|
||||
:header-cell-style="{background: '#383E4B',color: 'white'}"
|
||||
border
|
||||
height="440px"
|
||||
highlight-current-row
|
||||
show-summary
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
stripe
|
||||
style="width: 721px"
|
||||
height="440px"
|
||||
@sort-change="sortChange">
|
||||
<el-table-column
|
||||
width="140px"
|
||||
label="物料编号"
|
||||
align="center"
|
||||
label="物料编号"
|
||||
prop="物料编码"
|
||||
show-overflow-tooltip
|
||||
sortable="物料编码"
|
||||
prop="物料编码">
|
||||
width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="170px"
|
||||
label="物料名称"
|
||||
align="center"
|
||||
label="物料名称"
|
||||
prop="物料名称"
|
||||
show-overflow-tooltip
|
||||
sortable="物料名称"
|
||||
prop="物料名称">
|
||||
width="170px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="图号型号" align="center">
|
||||
<el-table-column align="center" label="图号型号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="外库存" prop="预库存" align="center">
|
||||
<el-table-column :width="setColumnWidth('数量')" align="center" label="外库存" prop="预库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="库存" prop="库存" align="center">
|
||||
<el-table-column :width="setColumnWidth('数量')" align="center" label="库存" prop="库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center">
|
||||
<el-table-column align="center" label="单位">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
@@ -530,8 +535,8 @@
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@@ -570,6 +575,7 @@ export default {
|
||||
level: [], // 级别数组
|
||||
remarks: '',
|
||||
orderValue: '',
|
||||
buttonDisable: false,
|
||||
product: [],
|
||||
typeValue: '',
|
||||
productValue: '', // 产品数值
|
||||
@@ -1115,6 +1121,7 @@ export default {
|
||||
if (this.orderValue !== row.项目流水号) {
|
||||
this.$message.warning('请查看部件内容是否与该合同一致!')
|
||||
} else {
|
||||
this.buttonDisable = true
|
||||
this.orderValue = row.项目流水号
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.orderValue]
|
||||
@@ -1124,6 +1131,7 @@ export default {
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('提交成功')
|
||||
this.buttonDisable = false
|
||||
this.searchTable()
|
||||
this.tableData1 = []
|
||||
this.tableData100 = []
|
||||
|
||||
519
src/views/SalesManagement/OrderProgressOverview/index.vue
Normal file
519
src/views/SalesManagement/OrderProgressOverview/index.vue
Normal file
@@ -0,0 +1,519 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
:remote-method="getCustomer"
|
||||
style="width:200px"
|
||||
placeholder="买方名称"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="pageCurrent = 1;pageSize = 100;searchTable()">
|
||||
<el-option
|
||||
v-for="item in customerName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="orderValue"
|
||||
:remote-method="getOrder"
|
||||
style="width:200px"
|
||||
placeholder="订单编号"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="pageCurrent = 1;pageSize = 100;searchTable()">
|
||||
<el-option
|
||||
v-for="item in orderArray"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="font-size: 13px;color: black">下单日期</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="pageCurrent = 1;pageSize = 100;searchTable()"/>
|
||||
<el-select
|
||||
v-model="orderStateValue"
|
||||
style="width:100px;margin-left: 10px"
|
||||
placeholder="订单状态"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
@change="pageCurrent = 1;pageSize = 100;searchTable()">
|
||||
<el-option
|
||||
v-for="item in orderState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent = 1;pageSize = 100;searchTable()">查询
|
||||
</el-button>
|
||||
</div>
|
||||
<el-col style="margin-top: 10px;width: 731px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 731px"
|
||||
height="740px"
|
||||
@row-click="searchDetail">
|
||||
<el-table-column :width="setColumnWidth('状态')" label="订单状态" align="center" prop="订单状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('订单编号')" label="订单编号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('姓名')" label="收货人" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.收货人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('买方名称')" label="买方" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.买方 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="93px" label="完成期限" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交货日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期')" label="下单日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.创建日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单人" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.创建人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
:pager-count="5"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col style="margin-top: 10px;margin-left: 30px;width: 801px">
|
||||
<div style="color: black;margin-top: 5px;font-size: 20px"> {{ 订单编号 }}</div>
|
||||
<div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
|
||||
<div v-if="detailData.length > 0" class="detail-container">
|
||||
<div v-if="groupedByPartName.length > 0" class="parts-container">
|
||||
<div v-for="(part, partIndex) in groupedByPartName" :key="part.name" class="part-group">
|
||||
<div class="part-header" @click="togglePartExpand(partIndex)">
|
||||
<span class="part-name">{{ part.name }}</span>
|
||||
<span v-if="part.code" class="part-code">{{ part.code }}</span>
|
||||
<i :class="['el-icon', expandedParts.includes(partIndex) ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"/>
|
||||
</div>
|
||||
<div v-if="expandedParts.includes(partIndex)" class="part-content">
|
||||
<div v-if="detailData[0].下单日期" class="detail-row">
|
||||
<span class="detail-label">下单日期</span>
|
||||
<span class="detail-value">{{ detailData[0].下单日期 }}</span>
|
||||
<span class="detail-label">下单人</span>
|
||||
<span class="detail-value">{{ detailData[0].下单人 }}</span>
|
||||
</div>
|
||||
<div v-if="detailData[0].确认日期" class="detail-row">
|
||||
<span class="detail-label">技术审核日期</span>
|
||||
<span class="detail-value">{{ detailData[0].确认日期 }}</span>
|
||||
</div>
|
||||
<div v-if="detailData[0].下达日期" class="detail-row">
|
||||
<span class="detail-label">投产日期</span>
|
||||
<span class="detail-value">{{ detailData[0].下达日期 }}</span>
|
||||
<span class="detail-label">投产人</span>
|
||||
<span class="detail-value">{{ detailData[0].下达人 }}</span>
|
||||
</div>
|
||||
<div v-if="detailData[0].分配日期" class="detail-row">
|
||||
<span class="detail-label">分配日期</span>
|
||||
<span class="detail-value">{{ detailData[0].分配日期 }}</span>
|
||||
<span v-if="part.items && part.items.length > 0" class="expand-icon" @click.stop="toggleProcessExpand(partIndex)">
|
||||
<i :class="['el-icon', expandedProcesses.includes(partIndex) ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"/>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="expandedProcesses.includes(partIndex) && part.items && part.items.length > 0" class="process-content">
|
||||
<div v-for="(item, index) in part.items" :key="index" class="process-row">
|
||||
<div class="process-item">
|
||||
<span class="process-label">工序{{ item.工序顺序 }}</span>
|
||||
</div>
|
||||
<div class="process-item">
|
||||
<span class="process-label">开始生产日期</span>
|
||||
<span class="process-value">{{ item.加工开始时间 }}</span>
|
||||
</div>
|
||||
<div class="process-item">
|
||||
<span class="process-label">结束生产日期</span>
|
||||
<span class="process-value">{{ item.加工完成时间 }}</span>
|
||||
</div>
|
||||
<div class="process-item">
|
||||
<span class="process-label">生产人</span>
|
||||
<span class="process-value">{{ item.加工人 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="detailData[0].装配开始时间" class="detail-row">
|
||||
<span class="detail-label">装配开始日期</span>
|
||||
<span class="detail-value">{{ detailData[0].装配开始时间 }}</span>
|
||||
<span class="detail-label">装配人</span>
|
||||
<span class="detail-value">{{ detailData[0].装配开始人员 }}</span>
|
||||
</div>
|
||||
<div v-if="detailData[0].装配结束时间" class="detail-row">
|
||||
<span class="detail-label">装配结束日期</span>
|
||||
<span class="detail-value">{{ detailData[0].装配结束时间 }}</span>
|
||||
<span class="detail-label">装配人</span>
|
||||
<span class="detail-value">{{ detailData[0].装配结束人员 }}</span>
|
||||
</div>
|
||||
<div v-if="detailData[0].发货日期" class="detail-row">
|
||||
<span class="detail-label">发货日期</span>
|
||||
<span class="detail-value">{{ detailData[0].发货日期 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty-tip">
|
||||
请选择左侧订单查看详情
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
customerNameValue: '',
|
||||
customerName: [],
|
||||
orderValue: '',
|
||||
orderArray: [],
|
||||
dateRange: '',
|
||||
orderStateValue: '',
|
||||
orderState: [],
|
||||
loading: false,
|
||||
total: 0,
|
||||
tableData: [],
|
||||
detailData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 100,
|
||||
orderName: '',
|
||||
order: '',
|
||||
订单编号: '',
|
||||
expandedParts: [],
|
||||
expandedProcesses: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
]),
|
||||
groupedByPartName() {
|
||||
const groups = {}
|
||||
const isMKOrder = this.订单编号 && this.订单编号.startsWith('MK')
|
||||
this.detailData.forEach(item => {
|
||||
const displayName = isMKOrder ? (item.产品名称 || '未命名产品') : (item.零件名称 || '未命名零件')
|
||||
if (!groups[displayName]) {
|
||||
groups[displayName] = {
|
||||
code: isMKOrder ? '' : (item.代号 || ''),
|
||||
items: []
|
||||
}
|
||||
}
|
||||
groups[displayName].items.push(item)
|
||||
})
|
||||
return Object.keys(groups).map(name => ({
|
||||
name,
|
||||
code: groups[name].code,
|
||||
items: groups[name].items.sort((a, b) => (a.工序顺序 || 0) - (b.工序顺序 || 0))
|
||||
}))
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getCustomer()
|
||||
this.getOrder('')
|
||||
this.getOrderState()
|
||||
},
|
||||
getCustomer(query) {
|
||||
this.customerName = []
|
||||
var param = []
|
||||
param[0] = ['客户名称', query]
|
||||
var Data = this.CreateData('11', '合同管理_客户信息_查询数据_bak', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.customerName.push({
|
||||
label: response.data[i].客户名称,
|
||||
value: response.data[i].客户流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getOrder(query) {
|
||||
this.orderArray = []
|
||||
var param = []
|
||||
param[0] = ['订单编号', query]
|
||||
var Data = this.CreateData('11', '订单信息_列表_查询数据_bak', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.orderArray.push({
|
||||
label: response.data[i].订单编号,
|
||||
value: response.data[i].订单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getOrderState() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '订单状态_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.orderState.push({
|
||||
label: response.data[i].订单状态,
|
||||
value: response.data[i].订单状态流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.detailData = []
|
||||
this.订单编号 = ''
|
||||
this.expandedParts = []
|
||||
this.expandedProcesses = []
|
||||
let customerNameValue_check, orderValue_check, dateRange_check, orderStateValue_check
|
||||
this.customerNameValue ? customerNameValue_check = 1 : customerNameValue_check = 0
|
||||
this.orderValue ? orderValue_check = 1 : orderValue_check = 0
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
if (this.orderStateValue === 0) {
|
||||
orderStateValue_check = 1
|
||||
} else if (this.orderStateValue) {
|
||||
orderStateValue_check = 1
|
||||
} else {
|
||||
orderStateValue_check = 0
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['买方名称_check', customerNameValue_check]
|
||||
param[1] = ['客户流水号', this.customerNameValue]
|
||||
param[2] = ['订单编号_check', orderValue_check]
|
||||
param[3] = ['订单流水号', this.orderValue]
|
||||
param[4] = ['下单日期_check', dateRange_check]
|
||||
param[5] = ['开始时间', this.dateRange[0]]
|
||||
param[6] = ['结束时间', this.dateRange[1]]
|
||||
param[7] = ['订单状态_check', orderStateValue_check]
|
||||
param[8] = ['订单状态', this.orderStateValue]
|
||||
var Data = this.CreateData('11', '订单信息_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
searchDetail(row) {
|
||||
this.订单编号 = row.订单编号
|
||||
this.detailData = []
|
||||
this.expandedParts = []
|
||||
this.expandedProcesses = []
|
||||
var param = []
|
||||
param[0] = ['订单流水号', row.订单流水号]
|
||||
var Data = this.CreateData('11', '订单追溯_时间明细_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.sort((a, b) => {
|
||||
return (a.工序顺序 || 0) - (b.工序顺序 || 0)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
togglePartExpand(index) {
|
||||
const idx = this.expandedParts.indexOf(index)
|
||||
if (idx > -1) {
|
||||
this.expandedParts.splice(idx, 1)
|
||||
} else {
|
||||
this.expandedParts.push(index)
|
||||
}
|
||||
},
|
||||
toggleProcessExpand(partIndex) {
|
||||
const idx = this.expandedProcesses.indexOf(partIndex)
|
||||
if (idx > -1) {
|
||||
this.expandedProcesses.splice(idx, 1)
|
||||
} else {
|
||||
this.expandedProcesses.push(partIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--label-left >>> .el-form-item__label {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.detail-container {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.detail-row {
|
||||
margin-bottom: 12px;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
display: inline-block;
|
||||
min-width: 100px;
|
||||
color: #666;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
display: inline-block;
|
||||
min-width: 120px;
|
||||
color: #333;
|
||||
margin-right: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.expand-icon {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
margin-left: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.expand-icon:hover {
|
||||
color: #67C23A;
|
||||
}
|
||||
|
||||
.process-content {
|
||||
margin-top: 10px;
|
||||
padding-left: 20px;
|
||||
border-left: 2px solid #E4E7ED;
|
||||
}
|
||||
|
||||
.process-row {
|
||||
margin-bottom: 10px;
|
||||
padding: 8px;
|
||||
background: #F5F7FA;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.process-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 25px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.process-label {
|
||||
color: #666;
|
||||
margin-right: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.process-value {
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
min-width: 130px;
|
||||
}
|
||||
|
||||
.parts-container {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.part-group {
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #E4E7ED;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.part-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 15px;
|
||||
background: #F5F7FA;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid #E4E7ED;
|
||||
}
|
||||
|
||||
.part-header:hover {
|
||||
background: #E8F4FD;
|
||||
}
|
||||
|
||||
.part-name {
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.part-code {
|
||||
margin-left: 8px;
|
||||
color: #67C23A;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.part-content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.part-content .process-row {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
color: #999;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -120,6 +120,13 @@
|
||||
type="text"
|
||||
@click="searchReason(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="500" content="投产状态异常处理" effect="dark" placement="top">
|
||||
<el-button
|
||||
icon="el-icon-warning"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleProductionException(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-button
|
||||
:disabled="scope.row.技术审核 || scope.row.是否审核 === 0"
|
||||
plain
|
||||
@@ -2034,6 +2041,30 @@ export default {
|
||||
} else {
|
||||
this.$message.warning('请选择要投产的部门')
|
||||
}
|
||||
},
|
||||
handleProductionException(row) {
|
||||
this.$confirm('确认要处理此订单的投产异常吗?', '投产异常处理', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = []
|
||||
param[0] = ['订单流水号', row.订单流水号]
|
||||
var Data = this.CreateData('11', '合同管理_订单信息_投产异常处理', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === 1) {
|
||||
this.$message.success(response.data[0].msg)
|
||||
this.searchTable() // 刷新订单列表
|
||||
} else {
|
||||
this.$message.error(response.data[0].msg)
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$message.error('处理失败,请稍后重试')
|
||||
console.error('投产异常处理错误:', error)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消处理')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,132 +4,119 @@
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
style="width:200px"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="买方名称"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
style="width:200px"
|
||||
@change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in customerName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
<el-option v-for="item in customerName" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="orderValue"
|
||||
:remote-method="getOrder"
|
||||
style="width:200px"
|
||||
placeholder="订单编号"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
filterable
|
||||
placeholder="订单编号"
|
||||
remote
|
||||
size="small"
|
||||
style="width:200px"
|
||||
@change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in orderArray"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
<el-option v-for="item in orderArray" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 1671px;margin-top: 10px"
|
||||
height="250"
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
stripe
|
||||
style="width: 1671px;margin-top: 10px"
|
||||
@sort-change="sortChange"
|
||||
@row-click="searchCustomer">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="选择" align="center">
|
||||
<el-table-column :width="setColumnWidth('序号')" align="center" label="选择">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="scope.row.是否选入===1" type="text" size="mini" @click="selectIn(scope.row)">
|
||||
<svg-icon icon-class="bottom" style="width: 20px;height: 20px"/>
|
||||
<el-button :disabled="scope.row.是否选入 === 1" size="mini" type="text" @click="selectIn(scope.row)">
|
||||
<svg-icon icon-class="bottom" style="width: 20px;height: 20px" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:width="setColumnWidth('通知日期')"
|
||||
label="通知日期"
|
||||
align="center"
|
||||
prop="通知日期"
|
||||
sortable="通知日期">
|
||||
<el-table-column :width="setColumnWidth('通知日期')" align="center" label="通知日期" prop="通知日期" sortable="通知日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.通知日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:width="setColumnWidth('订单编号')"
|
||||
label="订单编号"
|
||||
align="center"
|
||||
label="订单编号"
|
||||
prop="订单编号"
|
||||
sortable="订单编号"
|
||||
show-overflow-tooltip>
|
||||
show-overflow-tooltip
|
||||
sortable="订单编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:width="setColumnWidth('买方名称')"
|
||||
label="买方名称"
|
||||
align="center"
|
||||
label="买方名称"
|
||||
prop="买方名称"
|
||||
sortable="买方名称"
|
||||
show-overflow-tooltip>
|
||||
show-overflow-tooltip
|
||||
sortable="买方名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.买方名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('地址')" label="地址" align="center" show-overflow-tooltip>
|
||||
<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('备注')" label="合同备注" align="center" show-overflow-tooltip>
|
||||
<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="130px" label="产品名称" align="center">
|
||||
<el-table-column align="center" label="产品名称" width="130px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('状态')" label="状态" align="center">
|
||||
<el-table-column :width="setColumnWidth('状态')" align="center" label="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="通知发货" align="center">
|
||||
<el-table-column :width="setColumnWidth('数量')" align="center" label="通知发货">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.本次发货 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="本次已发" align="center">
|
||||
<el-table-column :width="setColumnWidth('数量')" align="center" label="本次已发">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.本次已发数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="累计发货" align="center">
|
||||
<el-table-column :width="setColumnWidth('数量')" align="center" label="累计发货">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已发数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="订单数量" align="center">
|
||||
<el-table-column :width="setColumnWidth('数量')" align="center" label="订单数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品详情" align="center" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="产品详情" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品详情 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期')" label="交货日期" align="center" show-overflow-tooltip>
|
||||
<el-table-column :width="setColumnWidth('日期')" align="center" label="交货日期" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交货日期 }}
|
||||
</template>
|
||||
@@ -141,87 +128,87 @@
|
||||
<span style="font-size: 13px;color: black">发货日期</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 240px;"
|
||||
value-format="yyyy-MM-dd"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
size="small"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="searchTable1()"/>
|
||||
style="width: 240px;"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="searchTable1()" />
|
||||
<el-input
|
||||
v-model="consignee"
|
||||
size="small"
|
||||
placeholder="收货人"
|
||||
size="small"
|
||||
style="width: 100px"
|
||||
@keyup.enter.native="searchTable1()"/>
|
||||
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="ADD()">发货单</el-button>
|
||||
<el-tooltip :open-delay="500" effect="dark" content="修改发货单" placement="top">
|
||||
<el-button type="text" icon="el-icon-edit" style="margin-left: 200px;height: 32px;" @click="EDIT()"/>
|
||||
@keyup.enter.native="searchTable1()" />
|
||||
<el-button icon="el-icon-circle-plus-outline" size="small" type="distribution" @click="ADD()">发货单</el-button>
|
||||
<el-tooltip :open-delay="500" content="修改发货单" effect="dark" placement="top">
|
||||
<el-button icon="el-icon-edit" style="margin-left: 200px;height: 32px;" type="text" @click="EDIT()" />
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="500" effect="dark" content="删除发货单" placement="top">
|
||||
<el-button type="text" icon="el-icon-delete" style="height: 32px" @click="DELETE()"/>
|
||||
<el-tooltip :open-delay="500" content="删除发货单" effect="dark" placement="top">
|
||||
<el-button icon="el-icon-delete" style="height: 32px" type="text" @click="DELETE()" />
|
||||
</el-tooltip>
|
||||
<!--<el-tooltip :open-delay="500" effect="dark" content="修改发货单" placement="top">-->
|
||||
<!--<el-button type="text" icon="el-icon-document" size="mini" @click="createContract()"/>-->
|
||||
<!--</el-tooltip>-->
|
||||
<el-tooltip :open-delay="500" effect="dark" content="打印发货单" placement="top">
|
||||
<el-button type="text" icon="el-icon-printer" style="height: 32px" @click="shipmentDocPrintQuery()"/>
|
||||
<el-tooltip :open-delay="500" content="打印发货单" effect="dark" placement="top">
|
||||
<el-button icon="el-icon-printer" style="height: 32px" type="text" @click="shipmentDocPrintQuery()" />
|
||||
<!-- @click="exportTable()" -->
|
||||
</el-tooltip>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData1"
|
||||
:header-cell-style="{background: '#2283D4',color: 'white'}"
|
||||
:header-cell-style="{ background: '#2283D4', color: 'white' }"
|
||||
:row-key="getRowKeys"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 791px;margin-top: 10px;"
|
||||
height="440px"
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
stripe
|
||||
style="width: 791px;margin-top: 10px;"
|
||||
@row-click="searchTable2"
|
||||
@sort-change="sortChange1">
|
||||
<el-table-column width="120px" label="发货单号" align="center" prop="发货单号" sortable="发货单号">
|
||||
<el-table-column align="center" label="发货单号" prop="发货单号" sortable="发货单号" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" label="发货日期" align="center" prop="发货日期" sortable="发货日期">
|
||||
<el-table-column align="center" label="发货日期" prop="发货日期" sortable="发货日期" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" label="收货人" align="center">
|
||||
<el-table-column align="center" label="收货人" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.收货人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收货地址" align="center" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="收货地址" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.收货地址 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('物流单号')" label="物流单号" align="center" show-overflow-tooltip>
|
||||
<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('发货金额')" label="发货金额" align="center" show-overflow-tooltip>
|
||||
<el-table-column :width="setColumnWidth('发货金额')" align="center" label="发货金额" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.发货金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('发货备注')" label="发货备注" align="center" show-overflow-tooltip>
|
||||
<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="80px" label="操作" align="center">
|
||||
<el-table-column align="center" label="操作" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-top" size="mini" @click="uploadPicture(scope.row)">照片</el-button>
|
||||
<el-button icon="el-icon-top" size="mini" type="text" @click="uploadPicture(scope.row)">照片</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -229,51 +216,51 @@
|
||||
<el-col style="margin-top: 10px;width: 871px;margin-left: 12px">
|
||||
<el-button
|
||||
:disabled="isDisabled"
|
||||
type="primary"
|
||||
icon="el-icon-s-check"
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="confirmDelivery()">确认发货
|
||||
</el-button>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
:data="tableData2"
|
||||
:header-cell-style="{ background: '#19466E', color: 'white' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
:header-cell-style="{background: '#19466E',color: 'white'}"
|
||||
highlight-current-row
|
||||
border
|
||||
height="440px"
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
style="width: 871px;margin-top: 12px"
|
||||
height="440px">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="选择" align="center">
|
||||
style="width: 871px;margin-top: 12px">
|
||||
<el-table-column :width="setColumnWidth('序号')" align="center" label="选择">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="selectOut(scope.row)">
|
||||
<svg-icon icon-class="top" style="width: 20px;height: 20px"/>
|
||||
<el-button size="mini" type="text" @click="selectOut(scope.row)">
|
||||
<svg-icon icon-class="top" style="width: 20px;height: 20px" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('订单编号')" label="订单编号" align="center">
|
||||
<el-table-column :width="setColumnWidth('订单编号')" align="center" label="订单编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('备注')" label="合同备注" align="center" show-overflow-tooltip>
|
||||
<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('产品名称')" label="产品名称" align="center">
|
||||
<el-table-column :width="setColumnWidth('产品名称')" align="center" label="产品名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="60px" label="应发数" align="center" prop="应发数量">
|
||||
<el-table-column align="center" label="应发数" prop="应发数量" width="60px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.应发数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际发量" align="center" prop="实际发量">
|
||||
<el-table-column align="center" label="实际发量" prop="实际发量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.查询实际发量"
|
||||
@@ -281,27 +268,27 @@
|
||||
:min="1"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="updateNum(scope.row)"/>
|
||||
@change="updateNum(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="单价" align="center" prop="单价">
|
||||
<el-table-column align="center" label="单价" prop="单价" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.单价).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="金额" align="center" prop="金额">
|
||||
<el-table-column align="center" label="金额" prop="金额" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.单价 * scope.row.查询实际发量).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="操作" align="center">
|
||||
<el-table-column align="center" label="操作" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="700" effect="dark" content="领料" placement="top">
|
||||
<el-tooltip :open-delay="700" content="领料" effect="dark" placement="top">
|
||||
<el-button
|
||||
:disabled="(Number(scope.row.组件仓库) !== 1 && Number(scope.row.组件精工车间) !== 1 && Number(scope.row.组件采购) !==1) || Number(scope.row.是否全部领料) === 1"
|
||||
type="text"
|
||||
:disabled="(Number(scope.row.组件仓库) !== 1 && Number(scope.row.组件精工车间) !== 1 && Number(scope.row.组件采购) !== 1) || Number(scope.row.是否全部领料) === 1"
|
||||
icon="el-icon-shopping-cart-2"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click.native.stop="searchTableMaterial(scope.row)">领料
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
@@ -323,8 +310,9 @@
|
||||
<img
|
||||
src="@/assets/img/CompanyQRCode.jpg"
|
||||
style="float: right; margin-right: 20px;width: 70px;height: 70px;">
|
||||
<span style="font-size: 19px">浙 江 景 耀 数 控 科 技 有 限 公 司<br><span
|
||||
style="font-size: 14px;">ZHEJIANG JING YAO NUMERICAL CONTROL TECHNOLOGY CO. LTD</span></span>
|
||||
<span
|
||||
style="font-size: 19px">浙 江 景 耀 数 控 科 技 有 限 公 司<br><span
|
||||
style="font-size: 12px;">ZHEJIANG JING YAO NUMERICAL CONTROL TECHNOLOGY CO. LTD</span></span>
|
||||
</div>
|
||||
<div style="text-align: center;margin-bottom: 10px">
|
||||
<span style="font-size: 14px">销售出库单</span>
|
||||
@@ -346,7 +334,7 @@
|
||||
<span style="float: left;margin-left: 20px;font-size: 11px;">摘要:{{ remarks }}</span>
|
||||
<span style="float: right;margin-right: 37px;font-size: 11px">日期:{{ date }}</span>
|
||||
</div>
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="font-size: 11px">
|
||||
<table align="center" border="1 solid black" cellspacing="0px" style="font-size: 11px" width="100%">
|
||||
<tr id="tablehead12" style="height: 35px">
|
||||
<td colspan="1" style="text-align: center;width: 5%">序号</td>
|
||||
<td colspan="4" style="text-align: center;width: 20%">产品名称</td>
|
||||
@@ -354,8 +342,8 @@
|
||||
<!-- <td colspan="2" style="text-align: center;width: 12%">产品条码</td>-->
|
||||
<td colspan="1" style="text-align: center;width: 5%">单位</td>
|
||||
<td colspan="1" style="text-align: center;width: 5%">数量</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">销售单价</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">销售金额</td>
|
||||
<!-- <td colspan="2" style="text-align: center;width: 10%">销售单价</td>-->
|
||||
<!-- <td colspan="2" style="text-align: center;width: 10%">销售金额</td>-->
|
||||
<td colspan="4" style="text-align: center;width: 20%">备注</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in returns" :key="index" style="height: 35px">
|
||||
@@ -365,22 +353,23 @@
|
||||
<!-- <td colspan="2" style="text-align: center;width: 12%">{{ list.产品条码 }}</td>-->
|
||||
<td colspan="1" style="text-align: center;width: 5%">{{ list.单位 }}</td>
|
||||
<td colspan="1" style="text-align: center;width: 5%">{{ list.数量 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ Number(list.销售单价).toFixed(2) }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{
|
||||
Number(list.数量 * list.销售单价).toFixed(2)
|
||||
}}
|
||||
</td>
|
||||
<!-- <td colspan="2" style="text-align: center;width: 10%">{{ Number(list.销售单价).toFixed(2) }}</td>-->
|
||||
<!-- <td colspan="2" style="text-align: center;width: 10%">{{-->
|
||||
<!-- Number(list.数量 * list.销售单价).toFixed(2)-->
|
||||
<!-- }}-->
|
||||
<!-- </td>-->
|
||||
<td colspan="4" style="text-align: center;width: 20%">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<td colspan="1" style="text-align: center;width: 5%;font-size: 11px">合计</td>
|
||||
<td colspan="19" style="text-align: center;width: 95%">
|
||||
<!-- <div>-->
|
||||
<!-- <span style="float: left;margin-left: 30px;font-size: 11px">{{ totalAmountText }}</span>-->
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
<span style="float: left;margin-left: 30px;font-size: 11px">{{ totalAmountText }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="float: right;margin-right: 22%;font-size: 11px">{{
|
||||
Number(totalAmount).toFixed(2)
|
||||
<span style="float: right;margin-right: 29.5%;font-size: 11px">{{
|
||||
// Number(totalAmount).toFixed(2)
|
||||
totalCount
|
||||
}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@@ -390,42 +379,34 @@
|
||||
注:以上货品请核对数量,如有质量问题,请在收货后3天内通知本公司,逾期恕不负责。
|
||||
</div>
|
||||
<div style="margin-top: 15px;font-size: 11px"><span style="font-size: 11px">审核:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">业务员:</span><span style="margin-left: 80px;font-size: 11px">发货:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">保管:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">制单:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">收货:</span></div>
|
||||
style="margin-left: 80px;font-size: 11px">业务员:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">发货:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">保管:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">制单:</span><span
|
||||
style="margin-left: 80px;font-size: 11px">收货:</span></div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="发货单" center width="440px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" center title="发货单" width="440px">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
class="demo-ruleForm"
|
||||
label-position="center"
|
||||
label-width="110px"
|
||||
class="demo-ruleForm">
|
||||
label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发货单号" prop="发货单号">
|
||||
<el-input
|
||||
v-model="form.发货单号"
|
||||
size="small"
|
||||
readonly
|
||||
style="width:200px"/>
|
||||
<el-input v-model="form.发货单号" readonly size="small" style="width:200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发货日期" prop="发货日期">
|
||||
<el-date-picker
|
||||
v-model="form.发货日期"
|
||||
type="date"
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
placeholder="选择日期"/>
|
||||
<el-date-picker v-model="form.发货日期" placeholder="选择日期" size="small" style="width: 200px" type="date" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -435,18 +416,14 @@
|
||||
<el-select
|
||||
v-model="form.客户名称"
|
||||
:remote-method="getCustomer"
|
||||
style="width:200px"
|
||||
placeholder="客户名称"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
filterable
|
||||
placeholder="客户名称"
|
||||
remote
|
||||
size="small"
|
||||
style="width:200px"
|
||||
@change="getData()">
|
||||
<el-option
|
||||
v-for="item in customerName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
<el-option v-for="item in customerName" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -454,80 +431,64 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收货人" prop="收货人">
|
||||
<el-input
|
||||
v-model="form.收货人"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"/>
|
||||
<el-input v-model="form.收货人" clearable size="small" style="width:200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收货地址" prop="收货地址">
|
||||
<el-input
|
||||
v-model="form.收货地址"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
<el-input v-model="form.收货地址" clearable size="small" style="width:200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物流单号" prop="物流单号">
|
||||
<el-input
|
||||
v-model="form.物流单号"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
<el-input v-model="form.物流单号" clearable size="small" style="width:200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发货备注" prop="发货备注">
|
||||
<el-input
|
||||
v-model="form.发货备注"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
<el-input v-model="form.发货备注" clearable size="small" style="width:200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff('form')">取消</el-button>
|
||||
<el-button :disabled="ADD_disable" type="distribution" size="small" @click="submit('form')">确定</el-button>
|
||||
<el-button :disabled="ADD_disable" size="small" type="distribution" @click="submit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="上传图片" center width="320px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" center title="上传图片" width="320px">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
ref="upload"
|
||||
:multiple="true"
|
||||
:auto-upload="false"
|
||||
:on-success="uploadSuccess"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:data="Data"
|
||||
:action="upload"
|
||||
style="margin-left: 60px"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
:auto-upload="false"
|
||||
:data="Data"
|
||||
:limit="limit"
|
||||
:multiple="true"
|
||||
:on-exceed="warningExceed"
|
||||
:on-success="uploadSuccess"
|
||||
list-type="picture-card"
|
||||
style="margin-left: 60px">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible1=false">取消</el-button>
|
||||
<el-button type="distribution" size="small" @click="submit2('form')">确定</el-button>
|
||||
<el-button size="small" @click="dialogFormVisible1 = false">取消</el-button>
|
||||
<el-button size="small" type="distribution" @click="submit2('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleCreatePickingList" center width="740px">
|
||||
<el-button
|
||||
style="float: right;margin-right: 10px;margin-bottom: 10px"
|
||||
icon="el-icon-check"
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
style="float: right;margin-right: 10px;margin-bottom: 10px"
|
||||
type="primary"
|
||||
@click="createPickingList">
|
||||
领料单
|
||||
</el-button>
|
||||
@@ -536,43 +497,38 @@
|
||||
v-loading="loading"
|
||||
:data="tableDataCreatePickingList"
|
||||
:row-class-name="tableRowClassNamee"
|
||||
highlight-current-row
|
||||
border
|
||||
highlight-current-row
|
||||
size="small"
|
||||
style="width: 681px"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
|
||||
<el-table-column width="140px" label="订单编号" align="center" show-overflow-tooltip>
|
||||
<el-table-column :selectable="selectable" align="center" type="selection" width="50px" />
|
||||
<el-table-column align="center" label="订单编号" show-overflow-tooltip width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="零件名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" label="库存数" align="center">
|
||||
<el-table-column align="center" label="库存数" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.累计库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="应领数" align="center">
|
||||
<el-table-column align="center" label="应领数" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.实际发量"
|
||||
:max="scope.row.最大值"
|
||||
:min="0"
|
||||
size="small"
|
||||
style="width: 100%"/>
|
||||
<el-input-number v-model="scope.row.实际发量" :max="scope.row.最大值" :min="0" size="small" style="width: 100%" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" label="数量" align="center">
|
||||
<el-table-column align="center" label="数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="74px" label="已申请数" align="center">
|
||||
<el-table-column align="center" label="已申请数" width="74px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已领数量 }}
|
||||
</template>
|
||||
@@ -584,7 +540,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { url } from '@/utils/request'
|
||||
import { url, MESUploadFileNew, MESUploadFileNew_BasePath } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
import $ from 'jquery'
|
||||
|
||||
export default {
|
||||
@@ -592,6 +549,7 @@ export default {
|
||||
return {
|
||||
isDisabled: true,
|
||||
totalAmount: '',
|
||||
totalCount: '',
|
||||
totalAmountText: '',
|
||||
tableDataCreatePickingList: [], // 创建领料单弹出框的表
|
||||
dialogFormVisibleCreatePickingList: false,
|
||||
@@ -807,7 +765,7 @@ export default {
|
||||
this.customerName = []
|
||||
var param = []
|
||||
param[0] = ['客户名称', query]
|
||||
var Data = this.CreateData('11', '合同管理_客户信息_查询数据_bak', param)
|
||||
var Data = this.CreateData('11', '合同管理_客户信息_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.customerName.push({
|
||||
@@ -1058,7 +1016,7 @@ export default {
|
||||
this.deliveryNum = []
|
||||
if (this.deliveryValue) {
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.error('未选择要发货得产品!!!')
|
||||
this.$message.error('未选择要发货的产品!!!')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
if (((Number(this.tableData2[i].已发数量) + Number(this.tableData2[i].实际发量)) < Number(this.tableData2[i].订单数)) || (Number(this.tableData2[i].组件仓库) !== 1 && Number(this.tableData2[i].组件精工车间) !== 1 && Number(this.tableData2[i].组件采购) !== 1)) {
|
||||
@@ -1189,6 +1147,7 @@ export default {
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.totalAmountText = response.data[0].总金额文本
|
||||
this.totalAmount = response.data[0].总金额
|
||||
this.totalCount = 0
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.returns.push({
|
||||
序号: i + 1,
|
||||
@@ -1198,6 +1157,7 @@ export default {
|
||||
辅助规格: response.data[i].产品详情,
|
||||
数量: response.data[i].实际发量
|
||||
})
|
||||
this.totalCount += response.data[i].实际发量
|
||||
}
|
||||
}).then(() => {
|
||||
this.exportTable()
|
||||
@@ -1309,7 +1269,40 @@ export default {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
uploadSuccess(res, file) { // 上传成功回调
|
||||
// 生成文件保存路径: 基础路径/DeliveryRecord/年月日时分秒毫秒-流水号.后缀
|
||||
const now = new Date()
|
||||
const timestamp = now.getFullYear().toString() +
|
||||
(now.getMonth() + 1).toString().padStart(2, '0') +
|
||||
now.getDate().toString().padStart(2, '0') +
|
||||
now.getHours().toString().padStart(2, '0') +
|
||||
now.getMinutes().toString().padStart(2, '0') +
|
||||
now.getSeconds().toString().padStart(2, '0') +
|
||||
now.getMilliseconds().toString().padStart(3, '0')
|
||||
const suffix = file.name.split('.').pop() || 'jpg'
|
||||
const savePath = MESUploadFileNew_BasePath + '\\DeliveryRecord\\' + timestamp + '-' + this.listValue + '.' + suffix
|
||||
|
||||
// 构造SQL语句:清空文件内容,更新文件路径
|
||||
const sqlStatement = `update 发货管理_发货单_图片 set 文件内容 = NULL, 文件路径 = N'${savePath}' where id = (select top 1 id from 发货管理_发货单_图片 where 发货单流水号 = ${this.listValue} order by 操作时间 desc)`
|
||||
|
||||
// 调用新接口保存文件到磁盘
|
||||
const formData = new FormData()
|
||||
formData.append('file', file.raw)
|
||||
formData.append('savePath', savePath)
|
||||
formData.append('sqlStatement', sqlStatement)
|
||||
|
||||
axios.post(MESUploadFileNew, formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}).then(response => {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
console.log('文件保存成功:', savePath)
|
||||
} else {
|
||||
console.error('文件保存失败:', response.data)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('文件保存异常:', err)
|
||||
})
|
||||
|
||||
this.dialogFormVisible1 = false
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
@@ -1362,7 +1355,7 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-table .green {
|
||||
background: #67C23A !important;
|
||||
}
|
||||
@@ -1371,4 +1364,3 @@ export default {
|
||||
background: #F56C6C !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -58,9 +58,11 @@
|
||||
<span>*买方名称:</span>
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
:remote-method="getCustomer"
|
||||
placeholder="选择买方"
|
||||
size="small"
|
||||
clearable
|
||||
remote
|
||||
filterable
|
||||
style="width: 150px;margin: 10px 0 10px 2px"
|
||||
@change="editContract">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<el-button v-show="!checked" icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="searchTable()">查询</el-button>
|
||||
<el-button v-show="checked" icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="searchTable1()">查询</el-button>
|
||||
<el-button :disabled="tableData5.length === 0 || state === 1" icon="el-icon-document-copy" type="warning" plain size="small" style="margin-left: 10px" @click="copyData()">拷贝</el-button>
|
||||
<el-button :disabled="disabled" icon="el-icon-search" type="primary" plain size="small" style="margin-left: 50px" @click="getNum()">图纸</el-button>
|
||||
<el-button :disabled="tableData5.length === 0 || state === 1" icon="el-icon-search" type="primary" plain size="small" style="margin-left: 50px" @click="getNum()">图纸</el-button>
|
||||
<el-button v-show="!checked" type="success" plain icon="el-icon-check" size="small" style="margin-left: 10px" @click="preservation()">保存</el-button>
|
||||
<el-button v-show="checked" type="success" plain icon="el-icon-check" size="small" style="margin-left: 10px" @click="preservation1()">保存</el-button>
|
||||
<el-checkbox v-model="checked" style="margin-left: 10px" @change="checkChange">零件</el-checkbox>
|
||||
@@ -51,7 +51,15 @@
|
||||
<el-col style="margin-left: 7px;width: 158px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 10px">
|
||||
<el-table :data="tableData4" :header-cell-style="{background: '#2283D4',color: 'white'}" highlight-current-row border size="mini" style="width: 158px;margin-top: 10px" height="550" @row-click="editProcedure">
|
||||
<el-input
|
||||
v-model="processSearchName"
|
||||
placeholder="请输入工序名称"
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 158px; margin-bottom: 10px"
|
||||
@input="filterProcess"
|
||||
/>
|
||||
<el-table :data="filteredTableData4" :header-cell-style="{background: '#2283D4',color: 'white'}" highlight-current-row border size="mini" style="width: 158px;margin-top: 10px" height="510" @row-click="editProcedure">
|
||||
<el-table-column :width="setColumnWidth('日期时间')" label="工序" align="center" prop="" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
@@ -303,6 +311,8 @@ export default {
|
||||
loading: false, // 数据加载
|
||||
total: 0, // 分页总数
|
||||
tableData4: [], // 工艺列表
|
||||
filteredTableData4: [], // 过滤后的工艺列表
|
||||
processSearchName: '', // 工序搜索框内容
|
||||
tableData5: [], // 工艺内容
|
||||
tableData6: [],
|
||||
pageCurrent: 1, // 分页当前页
|
||||
@@ -326,6 +336,16 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': {
|
||||
handler(route) {
|
||||
if (this.$route.query.订单流水号) {
|
||||
this.contractQueryJump(this.$route.query.订单流水号, this.$route.query.工艺计划流水号, this.$route.query.零件名称)
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.getOrderNumberType()
|
||||
@@ -333,7 +353,20 @@ export default {
|
||||
this.getProcess()
|
||||
this.getTreeData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async contractQueryJump(订单编号, 工艺计划流水号, 零件名称) {
|
||||
console.log(订单编号, 工艺计划流水号, 零件名称)
|
||||
// this.partName.push({
|
||||
// label:零件名称,
|
||||
// value:Number(工艺计划流水号)
|
||||
// })
|
||||
|
||||
this.orderNumberTypeValue = Number(订单编号)
|
||||
this.getproductName()
|
||||
// this.partNameValue = Number(工艺计划流水号)
|
||||
// this.searchTable()
|
||||
},
|
||||
searchPartsGroup() {
|
||||
this.tableData5 = []
|
||||
this.partName2 = []
|
||||
@@ -627,6 +660,8 @@ export default {
|
||||
value: response.data[i].订单流水号
|
||||
})
|
||||
}
|
||||
|
||||
console.log('流水哈', this.orderNumberTypeValue)
|
||||
})
|
||||
},
|
||||
getproductName() {
|
||||
@@ -672,8 +707,19 @@ export default {
|
||||
var Data = this.CreateData('11', '工艺名称_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData4 = response.data
|
||||
this.filteredTableData4 = response.data
|
||||
})
|
||||
},
|
||||
// 过滤工序
|
||||
filterProcess() {
|
||||
if (this.processSearchName) {
|
||||
this.filteredTableData4 = this.tableData4.filter(item => {
|
||||
return item.工艺名称.includes(this.processSearchName)
|
||||
})
|
||||
} else {
|
||||
this.filteredTableData4 = this.tableData4
|
||||
}
|
||||
},
|
||||
searchTable() {
|
||||
if (this.partNameValue) {
|
||||
this.loading = true
|
||||
|
||||
@@ -326,7 +326,7 @@ export default {
|
||||
this.$message.success('撤回成功')
|
||||
var param1 = []
|
||||
param1[0] = ['工艺计划流水号', this.multipleSelection[0].工艺计划流水号]
|
||||
var Data1 = this.CreateData('11', '车间生产管理工艺_追溯加工_查询工序', param1)
|
||||
var Data1 = this.CreateData('11', '车间生产管理工艺_追溯加工_查询工序_单工序', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
@@ -412,7 +412,7 @@ export default {
|
||||
searchTable1(row) {
|
||||
var param = []
|
||||
param[0] = ['工艺计划流水号', row.工艺计划流水号]
|
||||
var Data = this.CreateData('11', '车间生产管理工艺_追溯加工_查询工序', param)
|
||||
var Data = this.CreateData('11', '车间生产管理工艺_追溯加工_查询工序_单工序', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
|
||||
@@ -118,6 +118,11 @@
|
||||
{{ scope.row.单价 ? Number(scope.row.单价).toFixed(2) : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" label="最新单价" align="center" prop="历史单价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.历史单价 ? Number(scope.row.历史单价).toFixed(2) : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" label="金额" align="center" show-overflow-tooltip prop="金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 ? Number(scope.row.金额).toFixed(2) : '' }}
|
||||
@@ -148,7 +153,7 @@
|
||||
{{ scope.row.订单备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="操作" align="center" fixed="right">
|
||||
<el-table-column width="200px" label="操作" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.图纸 === null"
|
||||
@@ -157,6 +162,13 @@
|
||||
size="mini"
|
||||
@click="getNum(scope.row)">图纸
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.图纸 === null"
|
||||
type="text"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="updatePrice(scope.row)">更新单价
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -206,7 +218,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import request, { MESDownloadFile } from '@/utils/request'
|
||||
import request, { MESDownloadFile, MESDownloadFileNew } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -285,8 +298,21 @@ export default {
|
||||
var Data = this.CreateData('11', '采购合同查询_图片_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
const item = response.data[i]
|
||||
// 优先使用文件路径(新方式)
|
||||
if (item.文件路径) {
|
||||
axios.get(MESDownloadFileNew, {
|
||||
params: { filePath: item.文件路径 }
|
||||
}).then(res => {
|
||||
if (res.data && res.data[0] && res.data[0].文件内容) {
|
||||
this.urls.push('data:image/png;base64,' + res.data[0].文件内容)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('图片加载失败:', err)
|
||||
})
|
||||
} else if (item.文件内容 !== null) {
|
||||
// 兼容旧数据
|
||||
this.urls.push('data:image/png;base64,' + item.文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -354,6 +380,30 @@ export default {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
},
|
||||
|
||||
updatePrice(row) {
|
||||
if (!row.历史单价) {
|
||||
this.$message.error('请先查询历史单价')
|
||||
return
|
||||
}
|
||||
if (row.单价) {
|
||||
this.$message.error('已有单价')
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['采购合同明细流水号', row.采购合同明细流水号]
|
||||
param[1] = ['历史单价', row.历史单价]
|
||||
param[2] = ['是否耗材', row.是否耗材采购]
|
||||
var Data = this.CreateData('12', '采购管理_采购合同审核_更新单价', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新成功')
|
||||
this.searchTable1(row)
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
|
||||
@@ -9,256 +9,136 @@
|
||||
size="small"
|
||||
value-format="yyyy-M"
|
||||
placeholder="选择月"/>
|
||||
<el-input v-model="orderNumberTypeValue" style="width:200px;margin-left: 10px" placeholder="订单号" size="small" clearable/>
|
||||
<el-input v-model="orderNumberTypeValue" style="width:200px;margin-left: 10px" placeholder="订单编号" size="small" clearable/>
|
||||
<el-input v-model="partNameValue" style="width:150px;margin-left: 10px" placeholder="零件名称或图号" size="small" clearable/>
|
||||
<el-input v-model="procedureValue" style="width:150px;margin-left: 10px" placeholder="工序名称" size="small" clearable/>
|
||||
<el-input v-model="machine" style="width:150px;margin-left: 10px" placeholder="设备" size="small" clearable/>
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="pageCurrent = 1;pageSize = 20;searchTable1()">查询</el-button>
|
||||
<el-row style="float: right;width: 100px;margin-right: 300px;font-size: 12px"><el-col :span="12"><span>注释:</span></el-col><el-col :span="12"><span>计划数</span><br><span>完成数</span><br><span>操作者</span></el-col></el-row>
|
||||
<el-input v-model="productNameValue" style="width:150px;margin-left: 10px" placeholder="产品名称" size="small" clearable/>
|
||||
<el-select v-model="statusValue" style="width:100px;margin-left: 10px" placeholder="状态" size="small">
|
||||
<el-option label="派工中" value="派工中"/>
|
||||
<el-option label="生产中" value="生产中"/>
|
||||
<el-option label="已完成" value="已完成"/>
|
||||
</el-select>
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 10px" @click="searchTable1()">查询</el-button>
|
||||
</div>
|
||||
<el-table :data="tableData2" height="750px" style="width: 1680px" size="mini" highlight-current-row border @cell-dblclick="dbSelected">
|
||||
<el-table-column width="140px" align="center" label="订单号" show-overflow-tooltip fixed>
|
||||
<el-table :data="tableData2" height="750px" style="width: 2200px" size="mini" highlight-current-row border>
|
||||
<el-table-column width="50px" align="center" label="序号" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="90px" align="center" label="状态" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.状态 === '派工中' ? 'warning' : scope.row.状态 === '生产中' ? 'success' : 'info'">
|
||||
{{ scope.row.状态 }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" align="center" label="订单编号" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('零件名称')" align="center" label="零件名称" show-overflow-tooltip fixed>
|
||||
<el-table-column width="90px" align="center" label="投产日期" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
{{ scope.row.投产时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('图号')" align="center" label="图号" show-overflow-tooltip fixed>
|
||||
<el-table-column width="100px" align="center" label="订单交货日期" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
{{ scope.row.精工期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="50px" align="center" label="序号" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" align="center" label="工序名称" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130px" align="center" label="设备" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" align="center" label="订单数" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" align="center" label="计划数" show-overflow-tooltip fixed>
|
||||
<el-table-column width="60px" align="center" label="数量" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" align="center" label="剩余计划" show-overflow-tooltip fixed>
|
||||
<el-table-column width="120px" align="center" label="产品名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.剩余数 }}
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" align="center" label="计划开始时间" show-overflow-tooltip fixed>
|
||||
<el-table-column width="120px" align="center" label="零件名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划开始日期 }}
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" align="center" label="计划完成时间" show-overflow-tooltip fixed>
|
||||
<el-table-column width="120px" align="center" label="零件图号" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划完成日期 }}
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="1" show-overflow-tooltip>
|
||||
<el-table-column width="120px" align="center" label="材料" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划1 }}<br>{{ scope.row.完成1 }}<br>{{ scope.row.操作者1 }}
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="2" show-overflow-tooltip>
|
||||
<el-table-column width="80px" align="center" label="完成率" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划2 }}<br>{{ scope.row.完成2 }}<br>{{ scope.row.操作者2 }}
|
||||
{{ scope.row.完成率 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="3" show-overflow-tooltip>
|
||||
<el-table-column width="100px" align="center" label="当前状态" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划3 }}<br>{{ scope.row.完成3 }}<br>{{ scope.row.操作者3 }}
|
||||
{{ scope.row.设备 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="4" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP010" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划4 }}<br>{{ scope.row.完成4 }}<br>{{ scope.row.操作者4 }}
|
||||
{{ scope.row.OP010 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="5" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP020" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划5 }}<br>{{ scope.row.完成5 }}<br>{{ scope.row.操作者5 }}
|
||||
{{ scope.row.OP020 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="6" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP030" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划6 }}<br>{{ scope.row.完成6 }}<br>{{ scope.row.操作者6 }}
|
||||
{{ scope.row.OP030 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="7" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP040" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划7 }}<br>{{ scope.row.完成7 }}<br>{{ scope.row.操作者7 }}
|
||||
{{ scope.row.OP040 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="8" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP050" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划8 }}<br>{{ scope.row.完成8 }}<br>{{ scope.row.操作者8 }}
|
||||
{{ scope.row.OP050 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="9" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP060" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划9 }}<br>{{ scope.row.完成9 }}<br>{{ scope.row.操作者9 }}
|
||||
{{ scope.row.OP060 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="10" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP070" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划10 }}<br>{{ scope.row.完成10 }}<br>{{ scope.row.操作者10 }}
|
||||
{{ scope.row.OP070 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="11" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP080" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划11 }}<br>{{ scope.row.完成11 }}<br>{{ scope.row.操作者11 }}
|
||||
{{ scope.row.OP080 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="12" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP090" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划12 }}<br>{{ scope.row.完成12 }}<br>{{ scope.row.操作者12 }}
|
||||
{{ scope.row.OP090 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="13" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划13 }}<br>{{ scope.row.完成13 }}<br>{{ scope.row.操作者13 }}
|
||||
{{ scope.row.OP100 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="14" show-overflow-tooltip>
|
||||
<el-table-column width="60px" align="center" label="OP110" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划14 }}<br>{{ scope.row.完成14 }}<br>{{ scope.row.操作者14 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="15" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划15 }}<br>{{ scope.row.完成15 }}<br>{{ scope.row.操作者15 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="16" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划16 }}<br>{{ scope.row.完成16 }}<br>{{ scope.row.操作者16 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="17" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划17 }}<br>{{ scope.row.完成17 }}<br>{{ scope.row.操作者17 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="18" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划18 }}<br>{{ scope.row.完成18 }}<br>{{ scope.row.操作者18 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="19" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划19 }}<br>{{ scope.row.完成19 }}<br>{{ scope.row.操作者19 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="20" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划20 }}<br>{{ scope.row.完成20 }}<br>{{ scope.row.操作者20 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="21" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划21 }}<br>{{ scope.row.完成21 }}<br>{{ scope.row.操作者21 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="22" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划22 }}<br>{{ scope.row.完成22 }}<br>{{ scope.row.操作者22 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="23" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划23 }}<br>{{ scope.row.完成23 }}<br>{{ scope.row.操作者23 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="24" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划24 }}<br>{{ scope.row.完成24 }}<br>{{ scope.row.操作者24 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="25" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划25 }}<br>{{ scope.row.完成25 }}<br>{{ scope.row.操作者25 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="26" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划26 }}<br>{{ scope.row.完成26 }}<br>{{ scope.row.操作者26 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="27" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划27 }}<br>{{ scope.row.完成27 }}<br>{{ scope.row.操作者27 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="28" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划28 }}<br>{{ scope.row.完成28 }}<br>{{ scope.row.操作者28 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="29" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划29 }}<br>{{ scope.row.完成29 }}<br>{{ scope.row.操作者29 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="30" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划30 }}<br>{{ scope.row.完成30 }}<br>{{ scope.row.操作者30 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="65px" align="center" label="31" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划31 }}<br>{{ scope.row.完成31 }}<br>{{ scope.row.操作者31 }}
|
||||
{{ scope.row.OP110 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialog" title="修改" center width="400px">
|
||||
<el-form ref="form" :model="form" label-position="center" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划数">
|
||||
<el-input-number
|
||||
v-model="form.计划数"
|
||||
:min="0"
|
||||
:step="1"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -268,35 +148,13 @@ import { getNowShotTime } from '@/utils/tool'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
计划数: ''
|
||||
},
|
||||
process: '', // 工艺计划流水号
|
||||
procedureValue: '',
|
||||
machine: '',
|
||||
month: [],
|
||||
monthValue: '',
|
||||
dialog: false,
|
||||
numberValue: '',
|
||||
columnName: '',
|
||||
orderNumberTypeValue: '', // 操作者
|
||||
orderNumberType: [], // 操作者数组
|
||||
productpartNameValue: '', // 产品部件名称
|
||||
productpartName: [], // 产品部件名称数组
|
||||
partNameValue: '', // 零件名称
|
||||
people: [],
|
||||
peopleValue: '',
|
||||
loading: false, // 数据加载
|
||||
total: 0, // 分页总数
|
||||
tableData2: [],
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 20, // 分页每页显示条数
|
||||
orderName: '', // 排序列名
|
||||
order: '', // 排序方式
|
||||
orderName1: '', // 排序列名
|
||||
order1: '', // 排序方式
|
||||
dateRange: '', // 派工日期
|
||||
dateTime: getNowShotTime()
|
||||
orderNumberTypeValue: '', // 订单编号
|
||||
partNameValue: '', // 零件名称或图号
|
||||
productNameValue: '', // 产品名称
|
||||
statusValue: '', // 状态
|
||||
loading: false,
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -312,41 +170,9 @@ export default {
|
||||
// },
|
||||
created() {
|
||||
this.getNowMonth()
|
||||
this.getPeople()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
dbSelected(row, column, cell) {
|
||||
console.log(row, column, cell)
|
||||
if (column.label === '1' || column.label === '2' || column.label === '3' || column.label === '4' || column.label === '5' || column.label === '6' || column.label === '7' || column.label === '8' || column.label === '9' ||
|
||||
column.label === '10' || column.label === '11' || column.label === '12' || column.label === '13' || column.label === '14' || column.label === '15' || column.label === '16' || column.label === '17' || column.label === '18' ||
|
||||
column.label === '19' || column.label === '20' || column.label === '21' || column.label === '22' || column.label === '23' || column.label === '24' || column.label === '25' || column.label === '26' || column.label === '27' ||
|
||||
column.label === '28' || column.label === '29' || column.label === '30' || column.label === '31') {
|
||||
this.columnName = '计划' + column.label
|
||||
this.form.计划数 = row[`计划${column.label}`]
|
||||
this.numberValue = row.工艺任务明细流水号
|
||||
this.dialog = true
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
var param = []
|
||||
param[0] = ['工艺任务明细流水号', this.numberValue]
|
||||
param[1] = ['列名', this.columnName]
|
||||
param[2] = ['计划数', this.form.计划数]
|
||||
var Data = this.CreateData('12', '车间生产管理_生产计划_修改数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改完成')
|
||||
this.searchTable1()
|
||||
this.dialog = false
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
callOff() {
|
||||
this.dialog = false
|
||||
},
|
||||
getNowMonth() {
|
||||
const nowDate = new Date()
|
||||
const date = {
|
||||
@@ -355,103 +181,85 @@ export default {
|
||||
}
|
||||
this.monthValue = date.year + '-' + date.month
|
||||
},
|
||||
getPeople() {
|
||||
var param = []
|
||||
param[0] = ['考核部门编号', 19]
|
||||
var Data = this.CreateData('11', '人事档案管理_人员_部门与人员_查询数据_根据部门编号', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
if (this.monthValue) {
|
||||
let orderNumberTypeValue_check, procedureValue_check, partNameValue_check, machine_check
|
||||
let orderNumberTypeValue_check, partNameValue_check, productNameValue_check, statusValue_check
|
||||
this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
|
||||
this.procedureValue ? procedureValue_check = 1 : procedureValue_check = 0
|
||||
this.partNameValue ? partNameValue_check = 1 : partNameValue_check = 0
|
||||
this.machine ? machine_check = 1 : machine_check = 0
|
||||
this.productNameValue ? productNameValue_check = 1 : productNameValue_check = 0
|
||||
this.statusValue ? statusValue_check = 1 : statusValue_check = 0
|
||||
var param = []
|
||||
param[0] = ['合同编号', this.orderNumberTypeValue]
|
||||
param[1] = ['合同编号_check', orderNumberTypeValue_check]
|
||||
param[2] = ['设备', this.machine]
|
||||
param[3] = ['设备_check', machine_check]
|
||||
param[4] = ['零件名称_check', partNameValue_check]
|
||||
param[5] = ['零件名称', this.partNameValue]
|
||||
param[6] = ['工序名称_check', procedureValue_check]
|
||||
param[7] = ['工序名称', this.procedureValue]
|
||||
param[2] = ['零件名称_check', partNameValue_check]
|
||||
param[3] = ['零件名称', this.partNameValue]
|
||||
param[4] = ['产品名称_check', productNameValue_check]
|
||||
param[5] = ['产品名称', this.productNameValue]
|
||||
param[6] = ['状态_check', statusValue_check]
|
||||
param[7] = ['状态', this.statusValue]
|
||||
param[8] = ['月份', this.monthValue]
|
||||
var Data = this.CreateData('11', '车间生产管理_生产计划_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
var Data = this.CreateData('11', '车间生产管理_生产计划_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total = response.data.total
|
||||
console.log('接口返回完整数据:', response)
|
||||
const rows = response.data
|
||||
console.log('rows数据:', rows)
|
||||
const groupedData = this.groupByOrder(rows)
|
||||
console.log('分组后数据:', groupedData)
|
||||
this.tableData2 = groupedData
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('月份不能为空')
|
||||
}
|
||||
},
|
||||
sortChange1(column) {
|
||||
if (column.prop === '零件名称') {
|
||||
this.orderName1 = 1
|
||||
} else if (column.prop === '工序') {
|
||||
this.orderName1 = 2
|
||||
} else if (column.prop === '姓名') {
|
||||
this.orderName1 = 3
|
||||
} else if (column.prop === '设备') {
|
||||
this.orderName1 = 4
|
||||
} else {
|
||||
this.orderName1 = 0
|
||||
groupByOrder(data) {
|
||||
const grouped = {}
|
||||
if (!Array.isArray(data)) {
|
||||
return []
|
||||
}
|
||||
if (column.order === 'ascending') {
|
||||
this.order1 = 1
|
||||
} else if (column.order === 'descending') { this.order1 = 2 } else {
|
||||
this.order1 = ''
|
||||
this.orderName1 = 0
|
||||
}
|
||||
this.searchTable1()
|
||||
},
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable1()
|
||||
data.forEach(item => {
|
||||
if (!item) return
|
||||
const orderNo = item.订单号
|
||||
if (!grouped[orderNo]) {
|
||||
grouped[orderNo] = {
|
||||
订单号: item.订单号,
|
||||
产品名称: item.产品名称,
|
||||
零件名称: item.零件名称,
|
||||
零件图号: item.零件图号,
|
||||
订单数: item.订单数,
|
||||
计划数: item.计划数,
|
||||
剩余数: item.剩余数,
|
||||
状态: item.状态,
|
||||
完成率: item.完成率,
|
||||
投产时间: item.投产时间,
|
||||
精工期限: item.精工期限,
|
||||
设备: item.设备,
|
||||
材料: item.材料,
|
||||
OP010: '',
|
||||
OP020: '',
|
||||
OP030: '',
|
||||
OP040: '',
|
||||
OP050: '',
|
||||
OP060: '',
|
||||
OP070: '',
|
||||
OP080: '',
|
||||
OP090: '',
|
||||
OP100: '',
|
||||
OP110: ''
|
||||
}
|
||||
}
|
||||
const opIndex = parseInt(item.工序顺序)
|
||||
if (opIndex >= 1 && opIndex <= 11) {
|
||||
const opKey = `OP0${opIndex}0`
|
||||
grouped[orderNo][opKey] = item.工序
|
||||
}
|
||||
})
|
||||
return Object.values(grouped)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--label-left >>> .el-form-item__label {
|
||||
text-align: right;
|
||||
}
|
||||
>>>.el-dialog--center .el-dialog__body {
|
||||
text-align: initial;
|
||||
padding: 20px 30px 20px
|
||||
}
|
||||
>>>.el-dialog__header {
|
||||
padding: 20px 20px 0px;
|
||||
}
|
||||
>>>.el-dialog__footer {
|
||||
padding: 0px 20px 20px;
|
||||
/*text-align: right;*/
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
>>>.el-form-item {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
>>> .el-table__fixed {
|
||||
:deep(.el-table__fixed) {
|
||||
height: calc(100% - 18px) !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-table .Urgent {
|
||||
background: #ff7575 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
{{ scope.row.订单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('姓名')" label="收货人" align="center" show-overflow-tooltip>
|
||||
<!-- <el-table-column :width="setColumnWidth('姓名')" label="收货人" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.收货人员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="订单备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单备注 }}
|
||||
@@ -109,7 +109,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column width="99px" label="完成期限" align="center" prop="精工" sortable="精工" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.精工期限 }}
|
||||
<span
|
||||
:class="{
|
||||
'emergency': scope.row.期限状态 === '紧急',
|
||||
'urgent': scope.row.期限状态 === '加急'
|
||||
}">{{ scope.row.精工期限 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="99px" label="投产日期" align="center" prop="投产日期" sortable="投产日期" show-overflow-tooltip>
|
||||
@@ -117,16 +121,21 @@
|
||||
{{ scope.row.投产日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="240px">
|
||||
<el-table-column label="操作" align="center" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="500" effect="dark" content="查看客户提供资料" placement="top">
|
||||
<el-button :disabled="scope.row.客户提供资料 === '0'" type="text" icon="el-icon-picture-outline" size="mini" @click="ContractPhoto(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="PLM" placement="top">
|
||||
<el-button type="text" icon="el-icon-connection" size="mini" @click="handlePLM(scope.row)">PLM</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="图纸" placement="top">
|
||||
<el-button :disabled="scope.row.图纸 === null" type="text" icon="el-icon-search" size="mini" @click="getNum(scope.row)">图纸</el-button>
|
||||
</el-tooltip>
|
||||
<el-button :disabled="scope.row.状态新 === '未开始'" type="text" size="mini" style="margin-right: 0px" @click="partTraceability(scope.row)">零件追溯</el-button>
|
||||
<el-button :disabled="Number(scope.row.订单类型)!==3" type="text" size="mini" style="margin-right: 0px" @click="partReturn(scope.row)">打回</el-button>
|
||||
<el-button type="text" size="mini" style="margin-right: 0px" title="工艺" @click="handleEdit(scope.row, '工艺')">工艺</el-button>
|
||||
<el-button :disabled="scope.row.状态新 !== '工艺完成' && scope.row.状态新 !== '加工中'" type="text" size="mini" style="margin-right: 0px" title="派工" @click="handleEdit(scope.row, '派工')">派工</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -339,7 +348,27 @@ export default {
|
||||
this.fetchData()
|
||||
// this.getProductionStatus()
|
||||
},
|
||||
// watch: {
|
||||
// '$route': {
|
||||
// handler(route) {
|
||||
// if (sessionStorage.getItem('skipAutoFill')) {
|
||||
// sessionStorage.removeItem('skipAutoFill')
|
||||
// return
|
||||
// }
|
||||
// this.contractQueryJump(this.$route.query.订单号)
|
||||
// },
|
||||
// immediate: true
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
handleEdit(row, buttonType) {
|
||||
sessionStorage.setItem('skipAutoFill', 'true')
|
||||
if (buttonType === '工艺') {
|
||||
this.$router.push({ path: '/SeikoWorkshop/DevelopProcess', query: { 订单流水号: row.订单流水号 }})
|
||||
} else if (buttonType === '派工') {
|
||||
this.$router.push({ path: '/SeikoWorkshop/WorkshopAssignment', query: { 订单号: row.订单号 }})
|
||||
}
|
||||
},
|
||||
partReturn(row) {
|
||||
this.form.打回原因 = ''
|
||||
this.orderNumber = row.订单号
|
||||
@@ -465,6 +494,29 @@ export default {
|
||||
// })
|
||||
// },
|
||||
// 查看零件图
|
||||
handlePLM(row) {
|
||||
const msgId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||
const r = Math.random() * 16 | 0
|
||||
const v = c === 'x' ? r : (r & 0x3 | 0x8)
|
||||
return v.toString(16)
|
||||
})
|
||||
request({
|
||||
url: 'http://192.168.1.27:9982/api/GetMaterialDrawingUrl',
|
||||
method: 'post',
|
||||
data: {
|
||||
msgId: msgId,
|
||||
materialCode: row.物料编码
|
||||
}
|
||||
}).then(response => {
|
||||
if (response.data.Code === '200' && response.data.Data.url) {
|
||||
window.open(response.data.Data.url, '_blank')
|
||||
} else {
|
||||
this.$message.warning('PLM未返回有效链接')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('PLM请求发送失败')
|
||||
})
|
||||
},
|
||||
getNum(row) {
|
||||
this.dialogVisible = true
|
||||
this.getFileList(row.零件图号)
|
||||
@@ -557,6 +609,34 @@ export default {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
// async contractQueryJump(订单编号 , shouldSetValue = false) {
|
||||
// if (订单编号 && shouldSetValue) {
|
||||
// // 确保orderName1已加载
|
||||
// if (this.orderName1.length === 0) {
|
||||
// await new Promise(resolve => {
|
||||
// var param = []
|
||||
// var Data = this.CreateData('11', '生产任务查询_订单信息_列表_查询数据', param)
|
||||
// this.ExecDatabase(Data).then(response => {
|
||||
// for (let i = 0; i < response.data.length; i++) {
|
||||
// this.orderName1.push({
|
||||
// label: response.data[i].订单编号,
|
||||
// value: response.data[i].订单流水号
|
||||
// })
|
||||
// }
|
||||
// resolve()
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
|
||||
// let obj = this.orderName1.find((item) => {
|
||||
// return item.label === 订单编号
|
||||
// })
|
||||
// if (obj) {
|
||||
// this.orderNameValue = obj.value
|
||||
// this.searchTable()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -575,6 +655,14 @@ export default {
|
||||
.CompleteColor{
|
||||
background: #d8e5f6 !important;
|
||||
}
|
||||
.emergency {
|
||||
color: red !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
.urgent {
|
||||
color: green !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.el-form--label-left >>> .el-form-item__label {
|
||||
|
||||
@@ -174,6 +174,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { MESDownloadFileNew } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -251,11 +253,22 @@ export default {
|
||||
param[0] = ['质检流水号', row.质检流水号]
|
||||
var Data = this.CreateData('11', '质检管理_图片_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// this.URL = readFile + response.data[0].文件标识 + '.' + response.data[0].文件后缀
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
// this.urls.push(readFile + response.data[i].文件标识 + '.' + response.data[i].文件后缀)
|
||||
this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
const item = response.data[i]
|
||||
// 优先使用文件路径(新方式)
|
||||
if (item.文件路径) {
|
||||
axios.get(MESDownloadFileNew, {
|
||||
params: { filePath: item.文件路径 }
|
||||
}).then(res => {
|
||||
if (res.data && res.data[0] && res.data[0].文件内容) {
|
||||
this.urls.push('data:image/png;base64,' + res.data[0].文件内容)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('图片加载失败:', err)
|
||||
})
|
||||
} else if (item.文件内容 !== null) {
|
||||
// 兼容旧数据
|
||||
this.urls.push('data:image/png;base64,' + item.文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -200,6 +200,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { MESDownloadFileNew } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -280,17 +282,28 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
viewPicture(row) {
|
||||
this.dialogFormVisible = true
|
||||
this.dialogFormVisible1 = true
|
||||
this.urls = []
|
||||
var param = []
|
||||
param[0] = ['质检流水号', row.质检流水号]
|
||||
var Data = this.CreateData('11', '质检管理_图片_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// this.URL = readFile + response.data[0].文件标识 + '.' + response.data[0].文件后缀
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
// this.urls.push(readFile + response.data[i].文件标识 + '.' + response.data[i].文件后缀)
|
||||
this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
const item = response.data[i]
|
||||
// 优先使用文件路径(新方式)
|
||||
if (item.文件路径) {
|
||||
axios.get(MESDownloadFileNew, {
|
||||
params: { filePath: item.文件路径 }
|
||||
}).then(res => {
|
||||
if (res.data && res.data[0] && res.data[0].文件内容) {
|
||||
this.urls.push('data:image/png;base64,' + res.data[0].文件内容)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('图片加载失败:', err)
|
||||
})
|
||||
} else if (item.文件内容 !== null) {
|
||||
// 兼容旧数据
|
||||
this.urls.push('data:image/png;base64,' + item.文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
</el-button>
|
||||
<el-button type="success" plain size="small" style="margin-left: 10px" @click="getNum()">查看图纸
|
||||
</el-button>
|
||||
<el-button v-if="Number(token) === 2" type="danger" plain size="small" style="margin-left: 10px" @click="openScrapDialog()">手动报废结单
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@@ -81,6 +83,7 @@
|
||||
size="mini"
|
||||
style="width: 100%;margin-top: 10px"
|
||||
height="750"
|
||||
@cell-dblclick="handleEdit"
|
||||
@row-click="searchTable1">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
|
||||
<el-table-column :width="setColumnWidth('订单号')" label="订单号" align="center">
|
||||
@@ -132,6 +135,11 @@
|
||||
{{ scope.row.订单备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" label="技术备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -188,7 +196,7 @@
|
||||
size="mini"
|
||||
height="370px"
|
||||
style="width: 100%;margin-top: 10px"
|
||||
@row-click="XUANCHU">
|
||||
>
|
||||
<!--<el-table-column :width="setColumnWidth('零件名称')" label="零件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
@@ -234,11 +242,16 @@
|
||||
{{ scope.row.设备 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期')" label="派工时间" align="center">
|
||||
<!-- <el-table-column :width="setColumnWidth('日期')" label="派工时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.分配时间 }}
|
||||
{{ scope.row.计划开始日期 ? scope.row.计划开始日期.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期')" label="完成期限" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.Expr1 ? scope.row.Expr1.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -248,6 +261,13 @@
|
||||
size="mini"
|
||||
@click="editData(scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="Number(scope.row.是否加工中)===1 || Number(scope.row.完成数) > 0 || Number(scope.row.报废数量) > 0 || scope.row.姓名==='外协'"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="XUANCHU(scope.row)">取消
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -386,6 +406,62 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 手动报废结单弹窗 -->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="scrapDialogVisible" title="手动报废结单" center width="500px">
|
||||
<el-form
|
||||
ref="scrapForm"
|
||||
:model="scrapForm"
|
||||
:rules="scrapRules"
|
||||
label-position="right"
|
||||
label-width="100px">
|
||||
<el-form-item label="零件名称">
|
||||
<span>{{ currentPartName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="投产数">
|
||||
<span>{{ currentBatchQty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="已完成数">
|
||||
<span>{{ currentFinishQty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="已报废数">
|
||||
<span>{{ currentScrapQty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大可报废">
|
||||
<span style="color: #E6A23C;">{{ maxScrapQty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="报废数量" prop="报废数量">
|
||||
<el-input-number
|
||||
v-model="scrapForm.报废数量"
|
||||
:min="1"
|
||||
:max="maxScrapQty"
|
||||
:step="1"
|
||||
size="small"
|
||||
style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报废原因" prop="报废原因">
|
||||
<el-select v-model="scrapForm.报废原因" placeholder="请选择报废原因" size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in scrapReasonList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="scrapForm.备注"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入备注说明"
|
||||
maxlength="200"
|
||||
show-word-limit/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="scrapDialogVisible = false">取消</el-button>
|
||||
<el-button type="danger" size="small" @click="submitScrap()">确认报废结单</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -435,7 +511,24 @@ export default {
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 40, // 分页每页显示条数
|
||||
orderName: '', // 排序列名
|
||||
order: '' // 排序方式
|
||||
order: '', // 排序方式
|
||||
// 手动报废结单相关
|
||||
scrapDialogVisible: false,
|
||||
scrapForm: {
|
||||
报废数量: 1,
|
||||
报废原因: '',
|
||||
备注: ''
|
||||
},
|
||||
scrapRules: {
|
||||
报废数量: [{ required: true, message: '请输入报废数量', trigger: 'blur' }],
|
||||
报废原因: [{ required: true, message: '请选择报废原因', trigger: 'change' }]
|
||||
},
|
||||
scrapReasonList: [],
|
||||
currentPartName: '',
|
||||
currentBatchQty: 0,
|
||||
currentFinishQty: 0,
|
||||
currentScrapQty: 0,
|
||||
maxScrapQty: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -451,16 +544,87 @@ export default {
|
||||
this.machineName = this.machine[i].name
|
||||
}
|
||||
}
|
||||
},
|
||||
'$route': {
|
||||
handler(route) {
|
||||
this.contractQueryJump(this.$route.query.订单号)
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initOrderData()
|
||||
this.getOrderName('')
|
||||
this.searchTable()
|
||||
this.getMachine()
|
||||
this.getPeople()
|
||||
this.initWebpack()
|
||||
this.getScrapReasonList()
|
||||
},
|
||||
methods: {
|
||||
async initOrderData() {
|
||||
// 先加载订单列表数据(如果为空)
|
||||
if (this.orderName1.length === 0) {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '生产任务查询_订单信息_列表_查询数据', param)
|
||||
await this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.orderName1.push({
|
||||
label: response.data[i].订单编号,
|
||||
value: response.data[i].订单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 检查是否有路由参数需要跳转
|
||||
const 订单编号 = this.$route.query.订单号
|
||||
if (订单编号) {
|
||||
const obj = this.orderName1.find((item) => item.label === 订单编号)
|
||||
if (obj) {
|
||||
this.orderNameValue = obj.value
|
||||
await this.searchTable() // 执行查询
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 没有路由参数或匹配失败,执行默认查询
|
||||
this.searchTable()
|
||||
},
|
||||
|
||||
async contractQueryJump(订单编号) {
|
||||
if (订单编号) {
|
||||
// 确保orderName1已加载
|
||||
if (this.orderName1.length === 0) {
|
||||
await new Promise(resolve => {
|
||||
var Data = this.CreateData('11', '生产任务查询_订单信息_列表_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.orderName1.push({
|
||||
label: response.data[i].订单编号,
|
||||
value: response.data[i].订单流水号
|
||||
})
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const obj = this.orderName1.find((item) => {
|
||||
return item.label === 订单编号
|
||||
})
|
||||
if (obj) {
|
||||
this.orderNameValue = obj.value
|
||||
await this.searchTable()
|
||||
}
|
||||
}
|
||||
},
|
||||
// handleEdit(row, column) {
|
||||
// if (column.label === '订单号') {
|
||||
// console.log(1)
|
||||
// this.$router.push({ path: '/SeikoWorkshop/ProductionTaskQuery', query: { 订单号: row.订单号 }})
|
||||
// }
|
||||
// },
|
||||
|
||||
// 初始化websocket
|
||||
initWebpack() {
|
||||
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
|
||||
@@ -627,12 +791,22 @@ export default {
|
||||
var Data = this.CreateData('11', '车间生产管理工艺_零件工序_已派工查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
var param1 = []
|
||||
param1[0] = ['工艺计划流水号', row.工艺计划流水号]
|
||||
var Data1 = this.CreateData('11', '车间生产管理工艺_零件工序_派工_工序查询', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
this.tableData2 = response.data
|
||||
// 获取tableData2后,将tableData1中的计划开始日期和Expr1赋值给tableData2
|
||||
var param1 = []
|
||||
param1[0] = ['工艺计划流水号', row.工艺计划流水号]
|
||||
var Data1 = this.CreateData('11', '车间生产管理工艺_零件工序_派工_工序查询', param1)
|
||||
this.ExecDatabase(Data1).then(response => {
|
||||
this.tableData2 = response.data
|
||||
// 遍历tableData2,为每一行设置默认的计划开始日期和计划完成日期
|
||||
this.tableData2.forEach(item => {
|
||||
// 查找tableData1中对应工序的记录
|
||||
const table1Item = this.tableData1.find(t1 => t1.工序 === item.工序)
|
||||
if (table1Item) {
|
||||
item.计划开始日期 = table1Item.计划开始日期
|
||||
item.计划完成日期 = table1Item.Expr1
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
sortChange1(column) {
|
||||
@@ -782,6 +956,7 @@ export default {
|
||||
param[0] = ['工序流水号', row.工序流水号]
|
||||
param[1] = ['数量', row.数量]
|
||||
param[2] = ['工艺任务流水号', row.工艺任务流水号]
|
||||
param[3] = ['退货人', this.id]
|
||||
// 参数数量与名称要与存储过程对应
|
||||
var Data = this.CreateData('12', '车间生产管理工艺_零件工序_取消派工', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
@@ -859,6 +1034,125 @@ export default {
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
// 获取报废原因列表
|
||||
getScrapReasonList() {
|
||||
var Data = this.CreateData('11', '质检管理_不合格原因_查询数据', [])
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.scrapReasonList = []
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.scrapReasonList.push({
|
||||
label: response.data[i].不合格原因文本,
|
||||
value: response.data[i].不合格原因
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 打开手动报废结单弹窗
|
||||
openScrapDialog() {
|
||||
if (!this.processValue) {
|
||||
this.$message.warning('请先选择要操作的零件')
|
||||
return
|
||||
}
|
||||
// 获取当前工单信息
|
||||
var param = []
|
||||
param[0] = ['工艺计划流水号', this.processValue]
|
||||
var Data = this.CreateData('11', '车间派工_手动报废结单_查询信息', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data && response.data.length > 0) {
|
||||
const info = response.data[0]
|
||||
this.currentPartName = info.零件名称
|
||||
this.currentBatchQty = info.批次数量
|
||||
this.currentFinishQty = info.完成数量 || 0
|
||||
this.currentScrapQty = info.已报废数量 || 0
|
||||
this.maxScrapQty = Math.max(0, this.currentBatchQty - this.currentFinishQty - this.currentScrapQty)
|
||||
// 场景B:历史遗留工单 - 完成数已等于批次数但状态未更新
|
||||
if (this.currentFinishQty >= this.currentBatchQty && info.考核状态 < 3) {
|
||||
this.$confirm(
|
||||
'该工单完成数(' + this.currentFinishQty + ')已达到批次数(' + this.currentBatchQty + '),但状态仍为加工中。\n是否立即修复工单状态为"完成"?',
|
||||
'历史遗留工单修复',
|
||||
{
|
||||
confirmButtonText: '立即修复',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
).then(() => {
|
||||
this.submitScrapFix()
|
||||
}).catch(() => {})
|
||||
return
|
||||
}
|
||||
// 场景A:正常报废结单
|
||||
if (this.maxScrapQty <= 0) {
|
||||
this.$message.warning('该工单已无可报废数量')
|
||||
return
|
||||
}
|
||||
this.scrapForm = {
|
||||
报废数量: 1,
|
||||
报废原因: '',
|
||||
备注: ''
|
||||
}
|
||||
this.scrapDialogVisible = true
|
||||
} else {
|
||||
this.$message.error('获取工单信息失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交手动报废结单
|
||||
submitScrap() {
|
||||
this.$refs['scrapForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('确定要报废 ' + this.scrapForm.报废数量 + ' 件吗?报废后如满足条件将自动结单。', '确认报废', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = []
|
||||
param[0] = ['工艺计划流水号', this.processValue]
|
||||
param[1] = ['报废数量', this.scrapForm.报废数量]
|
||||
param[2] = ['报废原因', this.scrapForm.报废原因]
|
||||
param[3] = ['备注', this.scrapForm.备注]
|
||||
param[4] = ['操作人编号', this.id]
|
||||
var Data = this.CreateData('11', '车间派工_手动报废结单', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data && response.data.length > 0) {
|
||||
const result = response.data[0]
|
||||
if (result.result === 1) {
|
||||
this.$message.success(result.msg)
|
||||
this.scrapDialogVisible = false
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error(result.msg)
|
||||
}
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修复历史遗留工单(完成数已等于批次数但状态未更新)
|
||||
submitScrapFix() {
|
||||
var param = []
|
||||
param[0] = ['工艺计划流水号', this.processValue]
|
||||
param[1] = ['报废数量', 0]
|
||||
param[2] = ['报废原因', 0]
|
||||
param[3] = ['备注', '历史遗留工单修复']
|
||||
param[4] = ['操作人编号', this.id]
|
||||
var Data = this.CreateData('11', '车间派工_手动报废结单', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data && response.data.length > 0) {
|
||||
const result = response.data[0]
|
||||
if (result.result === 1) {
|
||||
this.$message.success(result.msg)
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error(result.msg)
|
||||
}
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
@click="pageCurrent = 1;pageSize = 20;searchTable()">查询
|
||||
</el-button>
|
||||
<el-button type="success" plain icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>
|
||||
<el-button type="distribution" icon="el-icon-plus" size="small" @click="addMaterial()">物料</el-button>
|
||||
<!-- <el-button type="distribution" icon="el-icon-plus" size="small" @click="addMaterial()">物料</el-button> -->
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
@@ -256,7 +256,7 @@
|
||||
</el-button>
|
||||
<el-button type="success" plain icon="el-icon-download" size="small" @click="exportExcel1()">导出
|
||||
</el-button>
|
||||
<el-button type="distribution" icon="el-icon-plus" size="small" @click="addMaterial()">物料</el-button>
|
||||
<!-- <el-button type="distribution" icon="el-icon-plus" size="small" @click="addMaterial()">物料</el-button> -->
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
@@ -368,7 +368,7 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="更替物料" placement="top">
|
||||
<el-button
|
||||
:disabled="((Number(scope.row.零件类型)===1||Number(scope.row.零件类型)===2) && Number(scope.row.是否传递)=== 1 && jobNumber != '1002') || ((Number(scope.row.零件类型)===3||Number(scope.row.零件类型)===4) && Number(scope.row.考核状态) > 1 && jobNumber != '1002')"
|
||||
:disabled="((Number(scope.row.零件类型)===1||Number(scope.row.零件类型)===2) && Number(scope.row.是否传递)=== 1 && jobNumber != '2009') || ((Number(scope.row.零件类型)===3||Number(scope.row.零件类型)===4) && Number(scope.row.考核状态) > 1 && jobNumber != '2009')"
|
||||
type="text"
|
||||
size="mini"
|
||||
style="margin-right: 10px"
|
||||
@@ -377,7 +377,7 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="编辑零件信息" placement="top">
|
||||
<el-button
|
||||
:disabled="((Number(scope.row.零件类型)===1||Number(scope.row.零件类型)===2) && Number(scope.row.是否传递)=== 1 && jobNumber != '1002') || ((Number(scope.row.零件类型)===3||Number(scope.row.零件类型)===4) && Number(scope.row.考核状态) > 1 && jobNumber != '1002')"
|
||||
:disabled="((Number(scope.row.零件类型)===1||Number(scope.row.零件类型)===2) && Number(scope.row.是否传递)=== 1 && jobNumber != '2009') || ((Number(scope.row.零件类型)===3||Number(scope.row.零件类型)===4) && Number(scope.row.考核状态) > 1 && jobNumber != '2009')"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@@ -669,9 +669,18 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</div>
|
||||
<span v-show="PartType==='专机' && groupNameValue !== ''" style="margin-left: 170px;">需求数:{{
|
||||
numberOfParts
|
||||
}}</span>
|
||||
<div v-show="PartType==='专机' && groupNameValue !== ''" style="margin-left: 170px;">
|
||||
<span style="margin-right: 20px;">
|
||||
部件状态:
|
||||
<el-tag v-if="taskStatus==='未下达'" type="danger" size="small" style="margin: 0px">未下达</el-tag>
|
||||
<el-tag v-if="taskStatus==='未接受'" type="warning" size="small" style="margin: 0px">未接受</el-tag>
|
||||
<el-tag v-if="taskStatus==='未开始'" type="info" size="small" style="margin: 0px">未开始</el-tag>
|
||||
<el-tag v-if="taskStatus==='加工中'" size="small" style="margin: 0px">加工中</el-tag>
|
||||
<el-tag v-if="taskStatus==='装配中'" type="primary" size="small" style="margin: 0px">装配中</el-tag>
|
||||
<el-tag v-if="taskStatus==='完成'" type="success" size="small" style="margin: 0px">完成</el-tag>
|
||||
</span>
|
||||
<span>需求数:{{ numberOfParts }}</span>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible2=false">取消</el-button>
|
||||
<el-button v-if="PartType==='通用件'" type="primary" size="small" @click="submitAddMaterial">确定</el-button>
|
||||
@@ -721,6 +730,7 @@ export default {
|
||||
return {
|
||||
partTool: '',
|
||||
numberOfParts: '',
|
||||
taskStatus: '',
|
||||
dialogVisible: false,
|
||||
hadFile: [],
|
||||
multipleSelection: [],
|
||||
@@ -820,6 +830,7 @@ export default {
|
||||
var Data = this.CreateData('11', '订单BOM_部件数量_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.numberOfParts = response.data[0].数量
|
||||
this.taskStatus = response.data[0].任务状态
|
||||
console.log('订单BOM_部件数量_查询数据', response.data)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<el-row>
|
||||
<el-col style="width: 1627px">
|
||||
<el-col style="width: 1627px; overflow-x: auto">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData_base"
|
||||
@@ -10,7 +10,7 @@
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 1627px"
|
||||
style="width: 100%"
|
||||
height="222px"
|
||||
@row-click="searchTable1">
|
||||
<el-table-column label="订单编号" align="center" width="120px" show-overflow-tooltip>
|
||||
@@ -28,6 +28,11 @@
|
||||
{{ scope.row.订单备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('备注')" label="技术备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.技术备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单人" width="70x" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.创建人 }}
|
||||
@@ -77,11 +82,6 @@
|
||||
<span v-else>{{ scope.row.被分配人员姓名 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="分配确认日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.分配确认时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="分配完成期限" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
@@ -96,7 +96,12 @@
|
||||
@click.native.stop/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<el-table-column width="150px" label="分配确认日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.分配确认时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" min-width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="!scope.row.edit"
|
||||
@@ -146,6 +151,11 @@
|
||||
icon="el-icon-s-check"
|
||||
@click="submitOrder(scope.row)">确认
|
||||
</el-button>
|
||||
<el-tooltip :open-delay="500" effect="dark" content="编辑技术备注" placement="top">
|
||||
<el-button type="text" icon="el-icon-edit-outline" size="mini" @click="editTechnicalRemark(scope.row)">
|
||||
技术备注
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -1217,34 +1227,117 @@
|
||||
:visible.sync="dialogVisible1"
|
||||
:center="dialogName"
|
||||
title="客户提供资料"
|
||||
width="20%">
|
||||
<div v-for="(file, key) in hadFile1" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div v-if="file.suffix==='pdf'" class="icon">
|
||||
<svg-icon icon-class="pdf"/>
|
||||
width="50%">
|
||||
<div style="margin-bottom: 20px;">
|
||||
<el-button type="primary" size="small" icon="el-icon-upload" @click="batchImportOfDrawings">上传图片</el-button>
|
||||
<el-button type="info" size="small" icon="el-icon-notebook-2" style="margin-left: 10px;" @click="showChangeLogDialogFunc">资料改动</el-button>
|
||||
</div>
|
||||
<el-upload
|
||||
v-if="showUpload"
|
||||
ref="upload"
|
||||
:action="uploadAction"
|
||||
:auto-upload="false"
|
||||
:data="uploadData"
|
||||
:limit="10"
|
||||
:multiple="true"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-error="handleUploadError"
|
||||
:file-list="uploadFileList"
|
||||
list-type="picture-card"
|
||||
accept=".jpg,.jpeg,.png,.gif,.bmp,.webp">
|
||||
<i class="el-icon-plus"/>
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png/gif/bmp/webp格式的图片,且不超过10MB</div>
|
||||
</el-upload>
|
||||
<div v-if="!showUpload" style="margin-top: 20px;">
|
||||
<div v-for="(file, key) in hadFile1" :key="key" class="file-item">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div v-if="file.suffix==='pdf'" class="icon">
|
||||
<svg-icon icon-class="pdf"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon">
|
||||
<svg-icon icon-class="doc"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon">
|
||||
<svg-icon icon-class="excel"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon">
|
||||
<svg-icon icon-class="ppt"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png' || file.suffix === 'gif' || file.suffix === 'bmp' || file.suffix === 'webp'" class="icon">
|
||||
<svg-icon icon-class="pic"/>
|
||||
</div>
|
||||
<div v-else class="icon">
|
||||
<svg-icon icon-class="file"/>
|
||||
</div>
|
||||
<a id="appUrl1" :href="file.url" target="view_window">
|
||||
<div class="info">{{ file.name }}</div>
|
||||
</a>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="margin-left: 10px; color: #f56c6c;"
|
||||
@click="showDeleteDialogFunc(file)">删除
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon">
|
||||
<svg-icon icon-class="doc"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon">
|
||||
<svg-icon icon-class="excel"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon">
|
||||
<svg-icon icon-class="ppt"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon">
|
||||
<svg-icon icon-class="pic"/>
|
||||
</div>
|
||||
<div v-else class="icon">
|
||||
<svg-icon icon-class="file"/>
|
||||
</div>
|
||||
<a id="appUrl1" :href="file.url" target="view_window">
|
||||
<div class="info">{{ file.name }}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showUpload" slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" @click="submitUpload">确认上传</el-button>
|
||||
<el-button size="small" @click="cancelUpload">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 删除原因弹窗 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="showDeleteDialog"
|
||||
title="删除文件"
|
||||
width="400px">
|
||||
<div style="margin-bottom: 15px;">
|
||||
<p>确定删除文件:{{ currentDeleteFile ? currentDeleteFile.name : '' }}</p>
|
||||
</div>
|
||||
<el-form :model="{ deleteReason: deleteReason }" label-width="80px">
|
||||
<el-form-item label="删除原因:">
|
||||
<el-input
|
||||
v-model="deleteReason"
|
||||
type="textarea"
|
||||
rows="3"
|
||||
placeholder="请输入删除原因"
|
||||
required
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmDelete">确认删除</el-button>
|
||||
<el-button @click="cancelDelete">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 资料改动记录弹窗 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="showChangeLogDialog"
|
||||
title="资料改动记录"
|
||||
width="800px">
|
||||
<el-table
|
||||
:data="changeLogData"
|
||||
border
|
||||
size="small">
|
||||
<el-table-column label="操作时间" width="180" align="center" prop="修改时间" />
|
||||
<el-table-column label="操作人" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ getPersonName(scope.row.修改人) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.name }}{{ scope.row.suffix ? '.' + scope.row.suffix : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作原因" align="center" prop="修改原因" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleHistoricalOrders" center width="1230px">
|
||||
<el-table
|
||||
@@ -1406,12 +1499,33 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<!-- 技术备注编辑弹窗 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="showTechnicalRemarkDialog"
|
||||
title="编辑技术备注"
|
||||
width="500px">
|
||||
<el-form>
|
||||
<el-form-item label="技术备注">
|
||||
<el-input
|
||||
v-model="technicalRemarkContent"
|
||||
type="textarea"
|
||||
rows="5"
|
||||
placeholder="请输入技术备注"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="showTechnicalRemarkDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="saveTechnicalRemark">保存</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import request, { MESDownloadFile } from '@/utils/request'
|
||||
import request, { MESDownloadFile, MESUploadFileProject } from '@/utils/request'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -1505,6 +1619,25 @@ export default {
|
||||
dialogVisible1: false,
|
||||
hadFile1: [],
|
||||
dialogName: true,
|
||||
// 图片上传相关
|
||||
showUpload: false,
|
||||
uploadAction: '',
|
||||
uploadData: {},
|
||||
uploadFileList: [],
|
||||
currentProjectValue: '',
|
||||
// 删除原因相关
|
||||
deleteReason: '',
|
||||
showDeleteDialog: false,
|
||||
currentDeleteFile: null,
|
||||
// 资料改动记录
|
||||
showChangeLogDialog: false,
|
||||
changeLogData: [],
|
||||
people: [],
|
||||
// 技术备注
|
||||
showTechnicalRemarkDialog: false,
|
||||
currentTechnicalRemarkRow: null,
|
||||
technicalRemarkContent: '',
|
||||
|
||||
CentralInternalCooling: [],
|
||||
TypeOfProtection: [],
|
||||
installationDirection: [],
|
||||
@@ -1526,6 +1659,7 @@ export default {
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getPeopleID()
|
||||
this.getPeople()
|
||||
},
|
||||
methods: {
|
||||
getMotorWheel() {
|
||||
@@ -1572,6 +1706,9 @@ export default {
|
||||
},
|
||||
ContractPhoto(row) {
|
||||
this.hadFile1 = []
|
||||
this.currentProjectValue = row.项目流水号
|
||||
this.showUpload = false
|
||||
this.uploadFileList = []
|
||||
var param = []
|
||||
param[0] = ['项目流水号', row.项目流水号]
|
||||
var Data = this.CreateData('11', 'PDM_项目名称_客户提供资料_查询数据', param)
|
||||
@@ -1591,6 +1728,159 @@ export default {
|
||||
})
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
// 打开上传界面
|
||||
batchImportOfDrawings() {
|
||||
this.showUpload = true
|
||||
this.uploadAction = `${MESUploadFileProject}?&num=1&tableName=PDM_项目名称_客户提供资料&type=1&UploaderName=${this.id}&projectValue=${this.currentProjectValue}`
|
||||
this.uploadData = {
|
||||
num: 1,
|
||||
tableName: 'PDM_项目名称_客户提供资料',
|
||||
type: 1,
|
||||
UploaderName: this.id,
|
||||
projectValue: this.currentProjectValue
|
||||
}
|
||||
},
|
||||
// 文件超出限制
|
||||
handleExceed() {
|
||||
this.$message.warning('最多只能上传10个文件')
|
||||
},
|
||||
// 上传成功
|
||||
handleUploadSuccess(response, file, fileList) {
|
||||
this.$message.success(`${file.name} 上传成功`)
|
||||
},
|
||||
// 上传失败
|
||||
handleUploadError(err, file) {
|
||||
this.$message.error(`${file.name} 上传失败`)
|
||||
console.error(err)
|
||||
},
|
||||
// 确认上传
|
||||
submitUpload() {
|
||||
this.$refs.upload.submit()
|
||||
setTimeout(() => {
|
||||
this.showUpload = false
|
||||
this.uploadFileList = []
|
||||
// 刷新文件列表
|
||||
this.refreshFileList()
|
||||
}, 1000)
|
||||
},
|
||||
// 取消上传
|
||||
cancelUpload() {
|
||||
this.showUpload = false
|
||||
this.uploadFileList = []
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
// 刷新文件列表
|
||||
refreshFileList() {
|
||||
this.hadFile1 = []
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.currentProjectValue]
|
||||
var Data = this.CreateData('11', 'PDM_项目名称_客户提供资料_查询数据', param)
|
||||
this.ExecDatabase(Data).then(res => {
|
||||
if (res.data.length > 0) {
|
||||
const server = `${MESDownloadFile}`.split('/')
|
||||
res.data.map(item => {
|
||||
this.hadFile1.push({
|
||||
url: `http://${server[2]}/webpage/part/${item.uid}.${item.suffix}`,
|
||||
name: `${item.name}.${item.suffix}`,
|
||||
suffix: item.suffix,
|
||||
id: item.num
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 打开删除原因弹窗
|
||||
showDeleteDialogFunc(file) {
|
||||
this.currentDeleteFile = file
|
||||
this.deleteReason = ''
|
||||
this.showDeleteDialog = true
|
||||
},
|
||||
// 确认删除
|
||||
confirmDelete() {
|
||||
if (!this.deleteReason) {
|
||||
this.$message.error('请输入删除原因')
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
var currentTime = new Date().toISOString().slice(0, 19).replace('T', ' ')
|
||||
param[0] = ['num', this.currentDeleteFile.id]
|
||||
param[1] = ['修改原因', this.deleteReason]
|
||||
param[2] = ['修改时间', currentTime]
|
||||
param[3] = ['修改人', this.id]
|
||||
var Data = this.CreateData('12', 'PDM_项目名称_客户提供资料_删除数据', param)
|
||||
this.ExecDatabase(Data).then(res => {
|
||||
console.log(res)
|
||||
if (res.data && res.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
// 刷新文件列表
|
||||
this.refreshFileList()
|
||||
this.showDeleteDialog = false
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('删除失败')
|
||||
})
|
||||
},
|
||||
// 取消删除
|
||||
cancelDelete() {
|
||||
this.showDeleteDialog = false
|
||||
this.currentDeleteFile = null
|
||||
this.deleteReason = ''
|
||||
},
|
||||
getPeople() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '人员信息_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getPersonName(value) {
|
||||
const person = this.people.find(item => item.value === value)
|
||||
return person ? person.label : value
|
||||
},
|
||||
// 编辑技术备注
|
||||
editTechnicalRemark(row) {
|
||||
this.currentTechnicalRemarkRow = row
|
||||
this.technicalRemarkContent = row.技术备注 || ''
|
||||
this.showTechnicalRemarkDialog = true
|
||||
},
|
||||
// 保存技术备注
|
||||
saveTechnicalRemark() {
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.currentTechnicalRemarkRow.项目流水号]
|
||||
param[1] = ['技术备注', this.technicalRemarkContent]
|
||||
var Data = this.CreateData('12', '订单管理_订单信息_技术备注_添加', param)
|
||||
this.ExecDatabase(Data).then(res => {
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$message.success('技术备注保存成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('技术备注保存失败')
|
||||
}
|
||||
})
|
||||
this.showTechnicalRemarkDialog = false
|
||||
},
|
||||
// 打开资料改动记录弹窗
|
||||
showChangeLogDialogFunc() {
|
||||
this.changeLogData = []
|
||||
var param = []
|
||||
param[0] = ['项目流水号', this.currentProjectValue]
|
||||
var Data = this.CreateData('11', 'PDM_项目名称_客户提供资料_历史数据_查询', param)
|
||||
this.ExecDatabase(Data).then(res => {
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.changeLogData = res.data
|
||||
}
|
||||
this.showChangeLogDialog = true
|
||||
}).catch(() => {
|
||||
this.$message.error('获取改动记录失败')
|
||||
})
|
||||
},
|
||||
sortChange(column) {
|
||||
if (column.prop === '状态') {
|
||||
this.orderName = 1
|
||||
@@ -1686,6 +1976,7 @@ export default {
|
||||
分配期限: response.data[i].分配期限,
|
||||
被分配人员姓名: response.data[i].被分配人员姓名,
|
||||
被分配人员编号_before: response.data[i].被分配人员编号,
|
||||
技术备注: response.data[i].技术备注,
|
||||
edit: false
|
||||
})
|
||||
}
|
||||
@@ -2528,16 +2819,18 @@ export default {
|
||||
<style scoped>
|
||||
.wrapper {
|
||||
width: 90%;
|
||||
height: 50px;
|
||||
min-height: 50px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #b8c7d9;
|
||||
/*float: left;*/
|
||||
margin: 10px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
padding: 8px 8px 0 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.action {
|
||||
@@ -2567,17 +2860,37 @@ a {
|
||||
height: 30px;
|
||||
display: inline-block;
|
||||
margin-right: 7px;
|
||||
margin-top: 2px;
|
||||
font-size: 26px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 160px;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
left: 44px;
|
||||
flex: 1;
|
||||
min-width: 150px;
|
||||
line-height: 30px;
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* 文件列表样式 */
|
||||
.file-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 上传组件样式 */
|
||||
/deep/ .el-upload--picture-card {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
|
||||
/deep/ .el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-input
|
||||
v-model="partsName"
|
||||
size="small"
|
||||
placeholder="零件名称"
|
||||
placeholder="图号"
|
||||
clearable
|
||||
style="float: left;width: 200px"/>
|
||||
<el-button
|
||||
@@ -29,7 +29,7 @@
|
||||
plain
|
||||
@click="deletePart">删除
|
||||
</el-button>
|
||||
<el-upload
|
||||
<!-- <el-upload
|
||||
:action="action"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadFailure"
|
||||
@@ -54,7 +54,7 @@
|
||||
icon="el-icon-upload2"
|
||||
plain
|
||||
@click="openDialog">总图
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -96,6 +96,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="700" effect="dark" content="PLM" placement="top">
|
||||
<el-button type="text" icon="el-icon-connection" size="mini" @click="handlePLM(scope.row)">PLM</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看或删除图纸" placement="top">
|
||||
<el-button type="text" icon="el-icon-picture-outline" size="mini" @click="getNum(scope.row)"/>
|
||||
</el-tooltip>
|
||||
@@ -126,7 +129,7 @@
|
||||
size="small"
|
||||
@clear="clearData"
|
||||
@change="getData"/>
|
||||
<el-upload
|
||||
<!-- <el-upload
|
||||
:action="action2"
|
||||
:on-success="uploadSuccess2"
|
||||
:on-error="uploadFailure2"
|
||||
@@ -142,7 +145,7 @@
|
||||
plain
|
||||
@click="batchImportOfDrawings1">产品图
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-upload> -->
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
@@ -607,6 +610,29 @@ export default {
|
||||
})
|
||||
},
|
||||
// 查看零件图
|
||||
handlePLM(row) {
|
||||
const msgId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||
const r = Math.random() * 16 | 0
|
||||
const v = c === 'x' ? r : (r & 0x3 | 0x8)
|
||||
return v.toString(16)
|
||||
})
|
||||
request({
|
||||
url: 'http://192.168.1.27:9982/api/GetMaterialDrawingUrl',
|
||||
method: 'post',
|
||||
data: {
|
||||
msgId: msgId,
|
||||
materialCode: row.物料编码
|
||||
}
|
||||
}).then(response => {
|
||||
if (response.data.Code === '200' && response.data.Data.url) {
|
||||
window.open(response.data.Data.url, '_blank')
|
||||
} else {
|
||||
this.$message.warning('PLM未返回有效链接')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('PLM请求发送失败')
|
||||
})
|
||||
},
|
||||
getNum(row) {
|
||||
this.num = row.num
|
||||
this.dialogVisible = true
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-card style="height: 850px; display: flex; flex-direction: column;">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px; flex-shrink: 0;">
|
||||
<el-input v-model="materialNameValue" style="width:150px" placeholder="物料名称" size="small" clearable/>
|
||||
<el-input v-model="materialToolValue" style="width:150px" placeholder="图号/型号" size="small" clearable/>
|
||||
<el-select v-model="materialTypeValue" style="width:100px;" placeholder="物料类型" size="small" filterable clearable>
|
||||
<el-select
|
||||
v-model="materialTypeValue"
|
||||
style="width:100px;"
|
||||
placeholder="物料类型"
|
||||
size="small"
|
||||
filterable
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in materialType"
|
||||
:key="item.value"
|
||||
@@ -23,110 +29,221 @@
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="primary" plain icon="el-icon-search" size="small" style="margin-left:10px" @click="pageCurrent=1;searchTable()">查询</el-button>
|
||||
<el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:10px" @click="materialPlus">物料</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-search"
|
||||
size="small"
|
||||
style="margin-left:10px"
|
||||
@click="pageCurrent=1;searchTable()">查询
|
||||
</el-button>
|
||||
<!-- <el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:10px" @click="materialPlus">
|
||||
物料
|
||||
</el-button> -->
|
||||
<el-badge :value="value" :max="99" class="item">
|
||||
<el-button type="warning" plain size="small" style="margin-left:10px" @click="purchaseChangeRequest">采购变更申请</el-button>
|
||||
<el-button type="warning" plain size="small" style="margin-left:10px" @click="purchaseChangeRequest">
|
||||
采购变更申请
|
||||
</el-button>
|
||||
</el-badge>
|
||||
<el-button type="info" icon="el-icon-edit" plain size="small" style="margin-left:10px" @click="maintainMaterial">材料维护</el-button>
|
||||
<el-button type="success" icon="el-icon-upload2" plain size="small" style="margin-left:10px" @click="handleExcel">批量导入</el-button>
|
||||
<el-checkbox v-model="checked" style="margin-left: 50px" @change="searchTable()">专机</el-checkbox>
|
||||
<!-- <el-button
|
||||
type="info"
|
||||
icon="el-icon-edit"
|
||||
plain
|
||||
size="small"
|
||||
style="margin-left:10px"
|
||||
@click="maintainMaterial">材料维护
|
||||
</el-button> -->
|
||||
<el-button type="info" icon="el-icon-edit" plain size="small" style="margin-left:10px" @click="updateUnit">
|
||||
单位维护
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
type="success"
|
||||
icon="el-icon-upload2"
|
||||
plain
|
||||
size="small"
|
||||
style="margin-left:10px"
|
||||
@click="handleExcel">批量导入
|
||||
</el-button> -->
|
||||
<el-button
|
||||
v-show="Number(token)===2"
|
||||
type="success"
|
||||
icon="el-icon-download"
|
||||
plain
|
||||
size="small"
|
||||
style="margin-left:10px"
|
||||
@click="exportTableData">物料导出
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border stripe size="small" style="width: 1500px; margin-top: 10px" height="740px" @sort-change="sortChange">
|
||||
<!--<el-table-column align="center" label="照片" width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-popover-->
|
||||
<!-- v-if="scope.row.文件内容 && scope.row.文件内容 !== 'null'"-->
|
||||
<!-- placement="top-start"-->
|
||||
<!-- width="400"-->
|
||||
<!-- trigger="hover">-->
|
||||
<!-- <el-button type="text" style="float:right" @click="deletePhoto(scope.row)">删除</el-button>-->
|
||||
<!-- <el-image :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''">-->
|
||||
<!-- <div slot="error" class="image-slot">-->
|
||||
<!-- <i class="el-icon-picture-outline"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-image>-->
|
||||
<!-- <el-image slot="reference" :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''" style="width:43px;margin-top: 7px">-->
|
||||
<!-- <div slot="error" class="image-slot">-->
|
||||
<!-- <i class="el-icon-picture-outline"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-image>-->
|
||||
<!-- </el-popover>-->
|
||||
<!-- <span v-else>—</span>-->
|
||||
<!-- </template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column width="150px" label="物料编码" align="center" prop="物料编码" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="170px" label="物料名称" align="center" sortable="名称" prop="名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="物料类型" align="center" prop="物料类型" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180px" label="图号/型号" align="center" sortable="代号" prop="代号" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.代号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="库位" align="center" prop="库位" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('材料')" label="材料" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('单位')" label="单位" align="center" prop="单位" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('类型')" label="类型" align="center" prop="类型" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="170px" label="物料说明" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料说明 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期时间')" label="最近修改" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修改日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('姓名')" label="修改人" align="center" prop="修改人" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修改人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-edit" size="mini" style="margin-right: 10px" @click="handleEdit(scope.row)"/>
|
||||
<el-button type="text" icon="el-icon-delete" size="mini" style="margin-right: 10px" @click="handleDelete(scope.row)"/>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="上传照片" placement="top">
|
||||
<el-button :disabled="scope.row.文件内容 && scope.row.文件内容 !== 'null'" type="text" style="margin-right: 10px" icon="el-icon-upload" size="mini" @click="handlePicture(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看照片" placement="top">
|
||||
<el-button :disabled="scope.row.图片数量 == 0" type="text" icon="el-icon-picture-outline-round" size="mini" @click="getImageList(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看图纸" placement="top">
|
||||
<el-button :disabled="scope.row.文件数量 == 0" type="text" icon="el-icon-picture-outline" size="mini" @click="getNum(scope.row)"/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<div style="flex: 1;">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
:max-height="750"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 1650px; margin-top: 10px; overflow-x: auto; display: block"
|
||||
@sort-change="sortChange">
|
||||
<!--<el-table-column align="center" label="照片" width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-popover-->
|
||||
<!-- v-if="scope.row.文件内容 && scope.row.文件内容 !== 'null'"-->
|
||||
<!-- placement="top-start"-->
|
||||
<!-- width="400"-->
|
||||
<!-- trigger="hover">-->
|
||||
<!-- <el-button type="text" style="float:right" @click="deletePhoto(scope.row)">删除</el-button>-->
|
||||
<!-- <el-image :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''">-->
|
||||
<!-- <div slot="error" class="image-slot">-->
|
||||
<!-- <i class="el-icon-picture-outline"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-image>-->
|
||||
<!-- <el-image slot="reference" :src="scope.row.文件内容 && scope.row.文件内容 !== 'null' ? ('data:image/png;base64,' + scope.row.文件内容) : ''" style="width:43px;margin-top: 7px">-->
|
||||
<!-- <div slot="error" class="image-slot">-->
|
||||
<!-- <i class="el-icon-picture-outline"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-image>-->
|
||||
<!-- </el-popover>-->
|
||||
<!-- <span v-else>—</span>-->
|
||||
<!-- </template>-->
|
||||
<!--</el-table-column>-->
|
||||
|
||||
<el-table-column width="150px" label="物料编码" align="center" prop="物料编码" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="170px"
|
||||
label="物料名称"
|
||||
align="center"
|
||||
sortable="名称"
|
||||
prop="名称"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="180px"
|
||||
label="图号/型号"
|
||||
align="center"
|
||||
sortable="代号"
|
||||
prop="代号"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.代号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="规格" align="center" prop="规格" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('材料')" label="材料" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('单位')" label="单位" align="center" prop="单位" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('类型')" label="类型" align="center" prop="类型" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="物料类型" align="center" prop="物料类型" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80px" label="库位" align="center" prop="库位" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="170px" label="物料说明" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料说明 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="曾用物料编码" align="center" prop="物料编码" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.曾用物料编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期时间')" label="最近修改" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修改日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:width="setColumnWidth('姓名')"
|
||||
label="修改人"
|
||||
align="center"
|
||||
prop="修改人"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修改人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期时间')" label="创建时间" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作日期 && scope.row.操作日期.split(' ')[0] || '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('姓名')" label="创建人" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.Expr1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
style="margin-right: 10px"
|
||||
@click="handleEdit(scope.row)"/>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
style="margin-right: 10px"
|
||||
@click="handleDelete(scope.row)"/>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="上传照片" placement="top">
|
||||
<el-button
|
||||
:disabled="scope.row.文件内容 && scope.row.文件内容 !== 'null'"
|
||||
type="text"
|
||||
style="margin-right: 10px"
|
||||
icon="el-icon-upload"
|
||||
size="mini"
|
||||
@click="handlePicture(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看照片" placement="top">
|
||||
<el-button
|
||||
:disabled="scope.row.图片数量 == 0"
|
||||
type="text"
|
||||
icon="el-icon-picture-outline-round"
|
||||
size="mini"
|
||||
@click="getImageList(scope.row)"/>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="700" effect="dark" content="查看图纸" placement="top">
|
||||
<el-button
|
||||
:disabled="scope.row.文件数量 == 0"
|
||||
type="text"
|
||||
icon="el-icon-picture-outline"
|
||||
size="mini"
|
||||
@click="getNum(scope.row)"/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="block" style="margin-top: 10px; flex-shrink: 0;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
@@ -137,7 +254,13 @@
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" :title="title" center width="440px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="100px" class="demo-ruleForm">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-position="center"
|
||||
label-width="100px"
|
||||
class="demo-ruleForm">
|
||||
<el-form-item label="物料名称" prop="物料名称">
|
||||
<el-input v-model="form.物料名称" style="width:250px;" placeholder="物料名称" size="small" clearable/>
|
||||
</el-form-item>
|
||||
@@ -181,7 +304,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料库" prop="物料库">
|
||||
<el-select v-model="form.物料库" style="width:250px;" placeholder="物料库" size="small" filterable clearable>
|
||||
<el-select
|
||||
v-model="form.物料库"
|
||||
style="width:250px;"
|
||||
placeholder="物料库"
|
||||
size="small"
|
||||
filterable
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in checkeds"
|
||||
:key="item.value"
|
||||
@@ -195,12 +324,31 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" style="width: 76px" @click="callOff('form')">取消</el-button>
|
||||
<el-button v-show="title==='新增物料'" type="distribution" size="small" style="width: 76px" @click="submitOrder('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑物料'" type="distribution" size="small" style="width: 76px" @click="submitUpdate('form')">确定</el-button>
|
||||
<el-button
|
||||
v-show="title==='新增物料'"
|
||||
type="distribution"
|
||||
size="small"
|
||||
style="width: 76px"
|
||||
@click="submitOrder('form')">确定
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="title==='编辑物料'"
|
||||
type="distribution"
|
||||
size="small"
|
||||
style="width: 76px"
|
||||
@click="submitUpdate('form')">确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" width="1283px">
|
||||
<el-table :data="tableData1" highlight-current-row border stripe size="small" style="width: 1241px; margin-top: 10px" height="540px">
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 1241px; margin-top: 10px"
|
||||
height="540px">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
|
||||
<el-table-column :width="setColumnWidth('订单编号')" label="订单编号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
@@ -248,21 +396,44 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-circle-check"
|
||||
@click="agree(scope.row)">同意</el-button>
|
||||
@click="agree(scope.row)">同意
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-circle-close"
|
||||
@click="disagree(scope.row)">不同意</el-button>
|
||||
@click="disagree(scope.row)">不同意
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" width="405px">
|
||||
<el-input v-model="material" style="width:150px;margin-left: 10px" placeholder="材料名称" size="small" clearable/>
|
||||
<el-button type="primary" plain icon="el-icon-search" size="small" style="margin-left:15px" @click="pageCurrent1=1;searchTable2()">查询</el-button>
|
||||
<el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:15px" @click="addMaterial">材料</el-button>
|
||||
<el-table :data="tableData2" highlight-current-row border stripe size="small" style="width: 341px; margin-top: 10px;margin-left: 10px" height="402px">
|
||||
<el-input
|
||||
v-model="material"
|
||||
style="width:150px;margin-left: 10px"
|
||||
placeholder="材料名称"
|
||||
size="small"
|
||||
clearable/>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-search"
|
||||
size="small"
|
||||
style="margin-left:15px"
|
||||
@click="pageCurrent1=1;searchTable2()">查询
|
||||
</el-button>
|
||||
<el-button type="distribution" icon="el-icon-plus" size="small" style="margin-left:15px" @click="addMaterial">
|
||||
材料
|
||||
</el-button>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 341px; margin-top: 10px;margin-left: 10px"
|
||||
height="402px">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
|
||||
<el-table-column label="材料名称" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
@@ -296,19 +467,68 @@
|
||||
@current-change="handleCurrentChanges1"/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible3" width="405px">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
size="small"
|
||||
style="margin-left:15px"
|
||||
@click="addUnit()">添加
|
||||
</el-button>
|
||||
<el-table
|
||||
:data="unit"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 341px; margin-top: 10px;margin-left: 10px"
|
||||
height="402px">
|
||||
<el-table-column label="序号" type="index" align="center"/>
|
||||
<el-table-column label="单位" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.label }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteUnit(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible3" :title="title1" center width="360px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="center" label-width="100px" class="demo-ruleForm">
|
||||
<el-form
|
||||
ref="form1"
|
||||
:model="form1"
|
||||
:rules="rules1"
|
||||
label-position="center"
|
||||
label-width="100px"
|
||||
class="demo-ruleForm">
|
||||
<el-form-item label="材料名称" prop="材料名称">
|
||||
<el-input v-model="form1.材料名称" style="width:150px;" placeholder="材料名称" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff1('form')">取消</el-button>
|
||||
<el-button v-show="title1==='新增材料'" type="distribution" size="small" @click="submitAdd('form1')">确定</el-button>
|
||||
<el-button v-show="title1==='编辑材料'" type="distribution" size="small" @click="submitUpdate1('form1')">确定</el-button>
|
||||
<el-button v-show="title1==='新增材料'" type="distribution" size="small" @click="submitAdd('form1')">确定
|
||||
</el-button>
|
||||
<el-button v-show="title1==='编辑材料'" type="distribution" size="small" @click="submitUpdate1('form1')">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisiblePicture" title="上传图片" center style="height: 1000px" width="17%">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisiblePicture"
|
||||
title="上传图片"
|
||||
center
|
||||
style="height: 1000px"
|
||||
width="17%">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
ref="upload"
|
||||
@@ -329,16 +549,24 @@
|
||||
<el-button type="primary" style="width: 70px" @click="submitPicture()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleExcel" title="批量导入" center style="height: 800px" width="40%">
|
||||
<!-- <el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisibleExcel"
|
||||
title="批量导入"
|
||||
center
|
||||
style="height: 800px"
|
||||
width="40%">
|
||||
<upload-excel-component style="margin-left: 8%" @on-selected-file="selected"/>
|
||||
<div style="margin-left: 38%">
|
||||
<span v-show="worksheet.length > 1" style="cursor: pointer;width: 50px;" @click="removeAll"><i class="el-icon-close"/></span>
|
||||
<span v-show="worksheet.length > 1" style="cursor: pointer;width: 50px;" @click="removeAll"><i
|
||||
class="el-icon-close"/></span>
|
||||
<el-upload :on-remove="handleRemove" :file-list="itemFile" style="width: 220px" action=""/>
|
||||
</div>
|
||||
<div v-if="worksheet.length !== 0" style="margin: 3px 0 0 40%">
|
||||
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
|
||||
</div>
|
||||
<!--<el-button :disabled="disabled" icon="el-icon-upload" type="success" style="margin-left: 78%" plain size="small" @click="transferData">上传</el-button>
|
||||
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库
|
||||
</el-button>
|
||||
</div> -->
|
||||
<!--<el-button :disabled="disabled" icon="el-icon-upload" type="success" style="margin-left: 78%" plain size="small" @click="transferData">上传</el-button>
|
||||
<el-button icon="el-icon-delete" type="danger" plain size="small" @click="allDelete">全部删除</el-button>
|
||||
<el-table v-loading="loading3" :data="tableData3" highlight-current-row border stripe size="small" style="width: 900px; margin-top: 10px" height="720px">
|
||||
<el-table-column width="60px" label="序号" align="center" type="index"/>
|
||||
@@ -393,32 +621,50 @@
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>-->
|
||||
</el-dialog>
|
||||
<!-- </el-dialog> -->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" width="350px">
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||
<a id="appUrl" :href="file.url" target="view_window"><div class="info">{{ file.name }}</div></a>
|
||||
<div v-if="file.suffix==='pdf'" class="icon">
|
||||
<svg-icon icon-class="pdf"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon">
|
||||
<svg-icon icon-class="doc"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon">
|
||||
<svg-icon icon-class="excel"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon">
|
||||
<svg-icon icon-class="ppt"/>
|
||||
</div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon">
|
||||
<svg-icon icon-class="pic"/>
|
||||
</div>
|
||||
<div v-else class="icon">
|
||||
<svg-icon icon-class="file"/>
|
||||
</div>
|
||||
<a id="appUrl" :href="file.url" target="view_window">
|
||||
<div class="info">{{ file.name }}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="查看图片">
|
||||
<div style="height: 400px;overflow: auto">
|
||||
<div v-for="(item, key) in imageList" :key="key" >
|
||||
<div v-for="(item, key) in imageList" :key="key">
|
||||
<el-popover
|
||||
v-if="item.文件内容 && item.文件内容 !== 'null'"
|
||||
placement="top-start"
|
||||
width="50"
|
||||
trigger="hover">
|
||||
<el-button type="text" style="float:left" @click="deletePhoto(item)">删除</el-button>
|
||||
<el-image slot="reference" :preview-src-list="imageUrlList" :src="item.文件内容 && item.文件内容 !== 'null' ? ('data:image/png;base64,' + item.文件内容) : ''" style="margin: 5px auto">
|
||||
<el-image
|
||||
slot="reference"
|
||||
:preview-src-list="imageUrlList"
|
||||
:src="item.文件内容 && item.文件内容 !== 'null' ? ('data:image/png;base64,' + item.文件内容) : ''"
|
||||
style="margin: 5px auto">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-picture-outline"/>
|
||||
</div>
|
||||
@@ -456,6 +702,7 @@ export default {
|
||||
dialogFormVisiblePicture: false,
|
||||
dialogVisible: false,
|
||||
dialogVisible2: false,
|
||||
dialogVisible3: false,
|
||||
imageList: [],
|
||||
imageUrlList: [],
|
||||
hadFile: [],
|
||||
@@ -602,6 +849,42 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
exportTableData() {
|
||||
if (this.tableData.length !== 0) {
|
||||
let materialToolValue_check, materialNameValue_check, materialTypeValue_check, dateRange_check, checked_check
|
||||
this.materialToolValue ? materialToolValue_check = 1 : materialToolValue_check = 0
|
||||
this.materialNameValue ? materialNameValue_check = 1 : materialNameValue_check = 0
|
||||
this.materialTypeValue ? materialTypeValue_check = 1 : materialTypeValue_check = 0
|
||||
this.checked ? checked_check = 1 : checked_check = 0
|
||||
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
|
||||
if (this.checked === false) {
|
||||
this.checkedsValue = '1'
|
||||
checked_check = '1'
|
||||
} else {
|
||||
this.checkedsValue = '2'
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料名称_check', materialNameValue_check]
|
||||
param[1] = ['物料名称', this.materialNameValue]
|
||||
param[2] = ['时间_check', dateRange_check]
|
||||
param[3] = ['开始时间', this.dateRange[0]]
|
||||
param[4] = ['结束时间', this.dateRange[1]]
|
||||
param[5] = ['图号_check', materialToolValue_check]
|
||||
param[6] = ['图号', this.materialToolValue]
|
||||
param[7] = ['类型_check', materialTypeValue_check]
|
||||
param[8] = ['类型', this.materialTypeValue]
|
||||
param[9] = ['排序名称', this.orderName]
|
||||
param[10] = ['排序方式', this.order]
|
||||
param[11] = ['PageCurrent', this.pageCurrent]
|
||||
param[12] = ['PageSize', 9999999]
|
||||
param[13] = ['PageCount', '1111', 'int', '1']
|
||||
param[14] = ['ItemCount', '1111', 'int', '1']
|
||||
var Data = this.CreateData('2001', '物料管理_查询数据_分页', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
this.$message.warning('暂无数据')
|
||||
}
|
||||
},
|
||||
handleExcel() {
|
||||
this.dialogFormVisibleExcel = true
|
||||
},
|
||||
@@ -678,6 +961,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['名称', name]
|
||||
param[1] = ['代号', drawingNum]
|
||||
param[2] = ['类型', type]
|
||||
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (Number(response.data[0].Column1) === 0) {
|
||||
@@ -795,6 +1079,7 @@ export default {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '单位_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.unit = []
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.unit.push({
|
||||
label: response.data[i].单位,
|
||||
@@ -803,6 +1088,51 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
updateUnit() {
|
||||
this.getUnit()
|
||||
this.dialogVisible3 = true
|
||||
},
|
||||
deleteUnit(row) {
|
||||
// 提示是否删除此单位
|
||||
this.$confirm('此操作将永久删除该单位, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = []
|
||||
param[0] = ['单位', row.label]
|
||||
var Data = this.CreateData('12', '单位_删除数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result == 1) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
this.getUnit()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
addUnit() {
|
||||
// 弹出输入框 输入单位
|
||||
this.$prompt('请输入单位', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
var param = []
|
||||
param[0] = ['单位', value]
|
||||
var Data = this.CreateData('12', '单位_增加数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result == 1) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '添加成功'
|
||||
})
|
||||
this.getUnit()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
materialPlus() {
|
||||
this.title = '新增物料'
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
@@ -826,6 +1156,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['名称', this.form.物料名称]
|
||||
param[1] = ['代号', this.form.图号或型号]
|
||||
param[2] = ['类型', this.form.类型]
|
||||
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (Number(response.data[0].Column1) === 0) {
|
||||
@@ -961,6 +1292,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['名称', this.form.物料名称]
|
||||
param[1] = ['代号', this.form.图号或型号]
|
||||
param[2] = ['类型', this.form.类型]
|
||||
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (Number(response.data[0].Column1) === 0) {
|
||||
@@ -1072,8 +1404,6 @@ export default {
|
||||
param[12] = ['PageSize', this.pageSize]
|
||||
param[13] = ['PageCount', '1111', 'int', '1']
|
||||
param[14] = ['ItemCount', '1111', 'int', '1']
|
||||
param[15] = ['物料库', this.checkedsValue]
|
||||
param[16] = ['物料库_check', checked_check]
|
||||
var Data = this.CreateData('11', '物料管理_查询数据_分页', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.result
|
||||
@@ -1090,7 +1420,9 @@ export default {
|
||||
}
|
||||
if (column.order === 'ascending') {
|
||||
this.order = 1
|
||||
} else if (column.order === 'descending') { this.order = 2 } else {
|
||||
} else if (column.order === 'descending') {
|
||||
this.order = 2
|
||||
} else {
|
||||
this.order = ''
|
||||
}
|
||||
this.searchTable()
|
||||
@@ -1112,6 +1444,7 @@ export default {
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
|
||||
addMaterial() {
|
||||
this.title1 = '新增材料'
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
@@ -1226,59 +1559,66 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wrapper{
|
||||
width: 90%;
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #b8c7d9;
|
||||
/*float: left;*/
|
||||
margin: 10px;
|
||||
}
|
||||
.content{
|
||||
position: relative;
|
||||
padding: 8px 8px 0 8px;
|
||||
}
|
||||
.action{
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 8px;
|
||||
}
|
||||
.delete{
|
||||
padding: 0 5px;
|
||||
border-radius: 3px;
|
||||
color: #0f84b0;
|
||||
font-size: 12px;
|
||||
}
|
||||
.delete:hover{
|
||||
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
|
||||
color: #fff;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
.icon{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: inline-block;
|
||||
margin-right: 7px;
|
||||
margin-top: 2px;
|
||||
font-size: 26px;
|
||||
}
|
||||
.info{
|
||||
width: 160px;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
left: 44px;
|
||||
line-height: 30px;
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
}
|
||||
.wrapper {
|
||||
width: 90%;
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #b8c7d9;
|
||||
/*float: left;*/
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.el-form-item{
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
padding: 8px 8px 0 8px;
|
||||
}
|
||||
|
||||
.el-pagination .btn-next, .el-pagination .btn-prev{
|
||||
background-color: rgba(255,255,255,.0);
|
||||
}
|
||||
.action {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
.delete {
|
||||
padding: 0 5px;
|
||||
border-radius: 3px;
|
||||
color: #0f84b0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.delete:hover {
|
||||
background: -webkit-linear-gradient(top, #0ba9e3, #0099d3);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: inline-block;
|
||||
margin-right: 7px;
|
||||
margin-top: 2px;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 160px;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
left: 44px;
|
||||
line-height: 30px;
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.el-pagination .btn-next, .el-pagination .btn-prev {
|
||||
background-color: rgba(255, 255, 255, .0);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -590,6 +590,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['名称', this.form.物料名称]
|
||||
param[1] = ['代号', this.form.图号或型号]
|
||||
param[2] = ['类型', this.form.类型]
|
||||
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (Number(response.data[0].Column1) === 0) {
|
||||
@@ -722,6 +723,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['名称', this.form.物料名称]
|
||||
param[1] = ['代号', this.form.图号或型号]
|
||||
param[2] = ['类型', this.form.类型]
|
||||
var Data = this.CreateData('11', '物料标准维护_验证图号', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (Number(response.data[0].Column1) === 0) {
|
||||
|
||||
368
src/views/TestPage/ImageSave.vue
Normal file
368
src/views/TestPage/ImageSave.vue
Normal file
@@ -0,0 +1,368 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span style="font-size: 18px; font-weight: bold;">📦 图片数据迁移工具</span>
|
||||
<span style="font-size: 12px; color: #909399; margin-left: 10px;">将数据库图片迁移到文件系统</span>
|
||||
</div>
|
||||
|
||||
<!-- 配置区域 -->
|
||||
<el-form :model="config" label-width="120px" size="small">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="表名">
|
||||
<el-select v-model="config.tableName" placeholder="选择要迁移的表" style="width: 100%" @change="onTableChange">
|
||||
<el-option label="质检管理_图片附件" value="质检管理_图片附件"/>
|
||||
<el-option label="发货管理_发货单_图片" value="发货管理_发货单_图片"/>
|
||||
<el-option label="采购管理_采购合同查询_图片" value="采购管理_采购合同查询_图片"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="流水号字段">
|
||||
<el-input v-model="config.keyField" placeholder="如:质检流水号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模块名称">
|
||||
<el-input v-model="config.moduleName" placeholder="保存目录名,如:QualityCheck"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="每批数量">
|
||||
<el-input-number v-model="config.batchSize" :min="1" :max="100" style="width: 100%"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="基础路径">
|
||||
<el-input v-model="config.basePath" placeholder="D:\\ImageSave"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="操作">
|
||||
<el-button :loading="loading" type="primary" @click="queryCount">查询总数</el-button>
|
||||
<el-button :loading="migrating" :disabled="totalCount === 0" type="success" @click="startMigration">开始迁移</el-button>
|
||||
<el-button :disabled="!migrating" type="danger" @click="stopMigration">停止</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<el-divider/>
|
||||
<el-row :gutter="20" style="text-align: center;">
|
||||
<el-col :span="6">
|
||||
<el-statistic :value="totalCount" title="待迁移总数"/>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic :value="successCount" title="已迁移">
|
||||
<template slot="suffix">
|
||||
<span style="color: #67C23A;">✓</span>
|
||||
</template>
|
||||
</el-statistic>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic :value="failCount" title="失败">
|
||||
<template slot="suffix">
|
||||
<span style="color: #F56C6C;">✗</span>
|
||||
</template>
|
||||
</el-statistic>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-statistic title="进度">
|
||||
<template slot="formatter">
|
||||
<span>{{ progressPercent }}%</span>
|
||||
</template>
|
||||
</el-statistic>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 进度条 -->
|
||||
<el-progress :percentage="progressPercent" :status="progressStatus" style="margin-top: 20px;"/>
|
||||
|
||||
<!-- 日志区域 -->
|
||||
<el-divider/>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
||||
<span style="font-weight: bold;">📝 迁移日志</span>
|
||||
<el-button size="mini" @click="logs = []">清空日志</el-button>
|
||||
</div>
|
||||
<div ref="logContainer" class="log-container">
|
||||
<div v-for="(log, index) in logs" :key="index" :class="['log-item', log.type]">
|
||||
<span class="log-time">{{ log.time }}</span>
|
||||
<span class="log-msg">{{ log.msg }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MESUploadFileNew } from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'ImageMigration',
|
||||
data() {
|
||||
return {
|
||||
config: {
|
||||
tableName: '',
|
||||
keyField: '',
|
||||
moduleName: '',
|
||||
batchSize: 10,
|
||||
basePath: 'D:\\\\ImageSave'
|
||||
},
|
||||
loading: false,
|
||||
migrating: false,
|
||||
stopFlag: false,
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
failCount: 0,
|
||||
currentOffset: 0,
|
||||
logs: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
progressPercent() {
|
||||
const total = Number(this.totalCount) || 0
|
||||
if (total === 0) return 0
|
||||
const percent = Math.round(((this.successCount + this.failCount) / total) * 100)
|
||||
return Math.min(100, Math.max(0, percent)) // 确保在0-100之间
|
||||
},
|
||||
progressStatus() {
|
||||
if (this.failCount > 0) return 'exception'
|
||||
if (this.progressPercent === 100) return 'success'
|
||||
return null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 表选择变化时自动填充字段
|
||||
onTableChange(val) {
|
||||
const tableConfig = {
|
||||
'质检管理_图片附件': { keyField: '质检流水号', moduleName: 'QualityCheck' },
|
||||
'发货管理_发货单_图片': { keyField: '发货单流水号', moduleName: 'DeliveryRecord' },
|
||||
'采购管理_采购合同查询_图片': { keyField: '采购合同流水号', moduleName: 'OrderInquiry' }
|
||||
}
|
||||
if (tableConfig[val]) {
|
||||
this.config.keyField = tableConfig[val].keyField
|
||||
this.config.moduleName = tableConfig[val].moduleName
|
||||
}
|
||||
},
|
||||
|
||||
// 添加日志
|
||||
addLog(msg, type = 'info') {
|
||||
const now = new Date()
|
||||
const time = now.getHours().toString().padStart(2, '0') + ':' +
|
||||
now.getMinutes().toString().padStart(2, '0') + ':' +
|
||||
now.getSeconds().toString().padStart(2, '0')
|
||||
this.logs.push({ time, msg, type })
|
||||
// 滚动到底部
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.logContainer) {
|
||||
this.$refs.logContainer.scrollTop = this.$refs.logContainer.scrollHeight
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询待迁移总数
|
||||
async queryCount() {
|
||||
if (!this.config.tableName) {
|
||||
this.$message.warning('请选择表名')
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
try {
|
||||
// 查询文件路径为空的记录数(使用NOLOCK加速查询)
|
||||
const sql = `SELECT COUNT(id) as cnt FROM [dbo].[${this.config.tableName}] WITH(NOLOCK) WHERE 文件路径 IS NULL`
|
||||
const Data = this.CreateData('3', sql)
|
||||
const response = await this.ExecDatabase(Data)
|
||||
console.log(Data)
|
||||
console.log(response)
|
||||
this.totalCount = response.data[0].cnt
|
||||
this.addLog(`查询完成,待迁移记录数: ${this.totalCount}`, 'success')
|
||||
} catch (err) {
|
||||
this.addLog(`查询失败: ${err.message}`, 'error')
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
|
||||
// 开始迁移
|
||||
async startMigration() {
|
||||
if (!this.config.tableName || !this.config.keyField || !this.config.moduleName) {
|
||||
this.$message.warning('请填写完整配置')
|
||||
return
|
||||
}
|
||||
|
||||
this.migrating = true
|
||||
this.stopFlag = false
|
||||
this.successCount = 0
|
||||
this.failCount = 0
|
||||
this.currentOffset = 0
|
||||
this.addLog(`========== 开始迁移 ==========`, 'info')
|
||||
this.addLog(`表名: ${this.config.tableName}`, 'info')
|
||||
this.addLog(`流水号字段: ${this.config.keyField}`, 'info')
|
||||
this.addLog(`模块名称: ${this.config.moduleName}`, 'info')
|
||||
this.addLog(`每批数量: ${this.config.batchSize}`, 'info')
|
||||
|
||||
while (!this.stopFlag && (this.successCount + this.failCount) < this.totalCount) {
|
||||
await this.migrateBatch()
|
||||
}
|
||||
|
||||
this.migrating = false
|
||||
if (this.stopFlag) {
|
||||
this.addLog(`========== 迁移已停止 ==========`, 'warning')
|
||||
} else {
|
||||
this.addLog(`========== 迁移完成 ==========`, 'success')
|
||||
this.addLog(`成功: ${this.successCount}, 失败: ${this.failCount}`, 'info')
|
||||
}
|
||||
},
|
||||
|
||||
// 停止迁移
|
||||
stopMigration() {
|
||||
this.stopFlag = true
|
||||
this.addLog('正在停止...', 'warning')
|
||||
},
|
||||
|
||||
// 迁移一批数据
|
||||
async migrateBatch() {
|
||||
try {
|
||||
// 查询一批待迁移的数据(只查询必要字段,不查询文件内容以节省内存)
|
||||
const sql = `SELECT TOP ${this.config.batchSize} id, [${this.config.keyField}], 文件后缀
|
||||
FROM [dbo].[${this.config.tableName}] WITH(NOLOCK)
|
||||
WHERE 文件路径 IS NULL
|
||||
ORDER BY id`
|
||||
const Data = this.CreateData('3', sql)
|
||||
const response = await this.ExecDatabase(Data)
|
||||
const records = response.data
|
||||
|
||||
if (!records || records.length === 0) {
|
||||
this.addLog('没有更多待迁移的数据', 'info')
|
||||
this.stopFlag = true
|
||||
return
|
||||
}
|
||||
|
||||
this.addLog(`获取到 ${records.length} 条待迁移记录`, 'info')
|
||||
|
||||
// 逐条处理
|
||||
for (const record of records) {
|
||||
if (this.stopFlag) break
|
||||
await this.migrateOne(record)
|
||||
}
|
||||
} catch (err) {
|
||||
this.addLog(`批次查询失败: ${err.message}`, 'error')
|
||||
this.stopFlag = true
|
||||
}
|
||||
},
|
||||
|
||||
// 迁移单条记录
|
||||
async migrateOne(record) {
|
||||
const id = record.id
|
||||
const keyValue = record[this.config.keyField]
|
||||
const suffix = record.文件后缀 || 'jpg'
|
||||
|
||||
try {
|
||||
// 1. 查询该记录的文件内容(单独查询以减少内存占用)
|
||||
const contentSql = `SELECT 文件内容 FROM [dbo].[${this.config.tableName}] WHERE id = ${id}`
|
||||
const contentData = this.CreateData('3', contentSql)
|
||||
const contentResponse = await this.ExecDatabase(contentData)
|
||||
|
||||
if (!contentResponse.data || !contentResponse.data[0] || !contentResponse.data[0].文件内容) {
|
||||
this.addLog(`ID ${id}: 文件内容为空,跳过`, 'warning')
|
||||
this.failCount++
|
||||
return
|
||||
}
|
||||
|
||||
const fileContent = contentResponse.data[0].文件内容
|
||||
|
||||
// 2. 生成文件保存路径
|
||||
const now = new Date()
|
||||
const timestamp = now.getFullYear().toString() +
|
||||
(now.getMonth() + 1).toString().padStart(2, '0') +
|
||||
now.getDate().toString().padStart(2, '0') +
|
||||
now.getHours().toString().padStart(2, '0') +
|
||||
now.getMinutes().toString().padStart(2, '0') +
|
||||
now.getSeconds().toString().padStart(2, '0') +
|
||||
now.getMilliseconds().toString().padStart(3, '0')
|
||||
|
||||
const savePath = this.config.basePath + '\\\\' + this.config.moduleName + '\\\\' + timestamp + '-' + keyValue + '.' + suffix
|
||||
|
||||
// 3. 将base64转为Blob
|
||||
const byteCharacters = atob(fileContent)
|
||||
const byteNumbers = new Array(byteCharacters.length)
|
||||
for (let i = 0; i < byteCharacters.length; i++) {
|
||||
byteNumbers[i] = byteCharacters.charCodeAt(i)
|
||||
}
|
||||
const byteArray = new Uint8Array(byteNumbers)
|
||||
const blob = new Blob([byteArray], { type: 'image/' + suffix })
|
||||
|
||||
// 4. 构造SQL语句(只更新路径,不清空内容)
|
||||
const updateSql = `UPDATE [dbo].[${this.config.tableName}] SET 文件路径 = N'${savePath}' WHERE id = ${id}`
|
||||
|
||||
// 5. 调用接口保存文件
|
||||
const formData = new FormData()
|
||||
formData.append('file', blob, `${timestamp}-${keyValue}.${suffix}`)
|
||||
formData.append('savePath', savePath)
|
||||
formData.append('sqlStatement', updateSql)
|
||||
|
||||
const uploadResponse = await axios.post(MESUploadFileNew, formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
|
||||
if (uploadResponse.data && uploadResponse.data[0] && uploadResponse.data[0].result === '1') {
|
||||
this.successCount++
|
||||
this.addLog(`ID ${id}: 迁移成功 -> ${savePath}`, 'success')
|
||||
} else {
|
||||
this.failCount++
|
||||
this.addLog(`ID ${id}: 上传失败 - ${JSON.stringify(uploadResponse.data)}`, 'error')
|
||||
}
|
||||
} catch (err) {
|
||||
this.failCount++
|
||||
this.addLog(`ID ${id}: 迁移异常 - ${err.message}`, 'error')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.log-container {
|
||||
height: 300px;
|
||||
overflow-y: auto;
|
||||
background: #1e1e1e;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.log-item {
|
||||
padding: 2px 0;
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
|
||||
.log-time {
|
||||
color: #888;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.log-msg {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.log-item.success .log-msg {
|
||||
color: #67C23A;
|
||||
}
|
||||
|
||||
.log-item.error .log-msg {
|
||||
color: #F56C6C;
|
||||
}
|
||||
|
||||
.log-item.warning .log-msg {
|
||||
color: #E6A23C;
|
||||
}
|
||||
|
||||
.log-item.info .log-msg {
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
@@ -82,7 +82,7 @@
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
style="width:812px"
|
||||
style="width:962px"
|
||||
height="258px"
|
||||
size="small">
|
||||
<el-table-column label="物料编号" align="center" prop="物料码">
|
||||
@@ -115,6 +115,11 @@
|
||||
{{ scope.row.日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="批次编码" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次编号 || scope.row.批次编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -227,19 +232,42 @@
|
||||
{{ scope.row.最低库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="Number(token)===7 || Number(token)===8 || Number(token)===2"
|
||||
width="120px"
|
||||
label="安全库存"
|
||||
align="center"
|
||||
sortable="安全库存"
|
||||
prop="安全库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安全库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="Number(token)===7 || Number(token)===8 || Number(token)===2"
|
||||
width="120px"
|
||||
label="最高库存"
|
||||
align="center"
|
||||
sortable="最高库存"
|
||||
prop="最高库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最高库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="Number(token)===7 || Number(token)===8 || Number(token)===2"
|
||||
width="180px"
|
||||
label="操作"
|
||||
align="center">
|
||||
align="center"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
style="margin-right: 10px"
|
||||
@click="openStock(scope.row)">最低库存
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table
|
||||
:data="gridData"
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
</div>-->
|
||||
<div style="margin-left: 10px">
|
||||
<el-input v-model="PickingListName" placeholder="领料单号/领料人" style="width: 170px" size="small" clearable/>
|
||||
<el-select v-model="orderNameValue" style="width:200px;margin-right: 0px" placeholder="订单号" size="small" filterable clearable @change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in orderNumberType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"/>
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain @click="searchTable">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-printer" plain @click="exportTable">打印</el-button>
|
||||
</div>
|
||||
@@ -442,6 +449,8 @@ export default {
|
||||
pickValue: '',
|
||||
temporaryValue: '',
|
||||
PickingListName: '',
|
||||
orderNameValue: '',
|
||||
orderNumberType: [],
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
@@ -493,8 +502,22 @@ export default {
|
||||
this.getCustomer()
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
this.getOrderNumberType()
|
||||
},
|
||||
methods: {
|
||||
getOrderNumberType() {
|
||||
// this.orderNumberType = []
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '领料单_未领订单_列表_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.orderNumberType.push({
|
||||
label: response.data[i].订单号,
|
||||
value: response.data[i].订单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
showRemark(row) {
|
||||
this.materialNumber1 = row.物料流水号
|
||||
this.remark = row.备注
|
||||
@@ -555,6 +578,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['领料单号_check', check]
|
||||
param[1] = ['领料单号', this.PickingListName]
|
||||
param[2] = ['订单号', this.orderNameValue]
|
||||
var Data = this.CreateData('11', '装配管理_未领完领料单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.ProductionPick = response.data
|
||||
|
||||
479
src/views/WarehouseManagement/OutboundDetails/index.vue
Normal file
479
src/views/WarehouseManagement/OutboundDetails/index.vue
Normal file
@@ -0,0 +1,479 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 825px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
style="width:200px"
|
||||
placeholder="订单号"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="pageCurrent=1;pageSize=100;searchTable();getProductName()">
|
||||
<el-option
|
||||
v-for="item in customerName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="productNameValue"
|
||||
style="width:200px ; margin-left: 10px"
|
||||
size="small"
|
||||
placeholder="产品部件"
|
||||
filterable
|
||||
clearable
|
||||
@change="pageCurrent=1;pageSize=100;searchTable()">
|
||||
<el-option
|
||||
v-for="item in productName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="pickListValue"
|
||||
style="width:200px ; margin-left: 10px"
|
||||
size="small"
|
||||
placeholder="领料单号"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="pageCurrent=1;pageSize=100;searchTable()">
|
||||
<el-option
|
||||
v-for="item in pickList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<el-input
|
||||
v-model="production"
|
||||
style="width: 200px ; margin-left: 10px"
|
||||
size="small"
|
||||
clearable
|
||||
placeholder="物料名称/编号"
|
||||
@keyup.enter.native="pageCurrent=1;pageSize=100;searchTable()"/>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
:row-class-name="tableRowClassName"
|
||||
highlight-current-row
|
||||
show-summary
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 1611px"
|
||||
height="720px">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center" />
|
||||
<el-table-column :width="setColumnWidth('领料单号')" label="领料单号" align="center" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领料单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('物料名称')" label="物料名称" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130px" label="物料编号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="图号/型号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="47px" label="单位" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="申请数" align="center" prop="申请数">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="已领数" align="center" prop="已领数">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已领数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="库存数" align="center" prop="库存数">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库存数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column width="150px" label="本次领用" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.本次领用"
|
||||
:min="0"
|
||||
:max="getMaxNumber(scope.row)"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
controls-position="right"/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :width="setColumnWidth('数量')" label="货位名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="125px" label="订单号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品/部件名称" width="140px" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="批次" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120px" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="isDeliveryDisabled(scope.row)" type="text" size="mini" @click="showBatchDialog(scope.row, scope.$index)">
|
||||
出库
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
<el-dialog :visible.sync="batchDialogVisible" title="批次选择" width="600px" @close="closeBatchDialog">
|
||||
<el-table :data="batchData" border highlight-current-row size="mini" show-summary>
|
||||
<el-table-column width="50px" align="center" type="index" label="序号"/>
|
||||
<el-table-column width="150px" align="center" label="批次编号">
|
||||
<template slot-scope="batchScope">
|
||||
{{ batchScope.row.批次编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" align="center" label="批次库存">
|
||||
<template slot-scope="batchScope">
|
||||
{{ batchScope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="本次领用" align="center">
|
||||
<template slot-scope="batchScope">
|
||||
<el-input-number
|
||||
v-model="batchScope.row.本次领用"
|
||||
:min="0"
|
||||
:max="Number(batchScope.row.货位存量)"
|
||||
size="mini"
|
||||
style="width:100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" label="操作" align="center">
|
||||
<template slot-scope="batchScope">
|
||||
<el-button type="text" size="mini" @click="confirmBatchDelivery(batchScope.row)">
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="batchPageCurrent"
|
||||
:total="batchTotal"
|
||||
:page-size="batchPageSize"
|
||||
layout="total, prev, pager, next"
|
||||
@current-change="handleBatchPageChange"/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 出库相关数据
|
||||
exWarehouse: false,
|
||||
currentRow: null,
|
||||
batchData: [],
|
||||
batchTotal: 0,
|
||||
batchPageCurrent: 1,
|
||||
batchPageSize: 5,
|
||||
materialSerialNumber: '',
|
||||
pickingList: '',
|
||||
pickingPeople: '',
|
||||
orderNumber: '',
|
||||
isGroup: '',
|
||||
|
||||
typeValue: '',
|
||||
type: [{
|
||||
label: '自制',
|
||||
value: '自制'
|
||||
}, {
|
||||
label: '外购',
|
||||
value: '外购'
|
||||
}, {
|
||||
label: '耗材',
|
||||
value: '耗材'
|
||||
}, {
|
||||
label: '通用',
|
||||
value: '通用'
|
||||
}, {
|
||||
label: '临时',
|
||||
value: '临时'
|
||||
}, {
|
||||
label: '备货',
|
||||
value: '备货'
|
||||
}],
|
||||
returnMaterialChecked: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
数量: ''
|
||||
},
|
||||
rules: {
|
||||
数量: [{ required: true, message: '请输入数量' }]
|
||||
},
|
||||
NumberValue: '',
|
||||
DeliveryNumber: '',
|
||||
customerNameValue: '',
|
||||
customerName: [],
|
||||
productNameValue: '',
|
||||
productName: [],
|
||||
pickList: [],
|
||||
pickListValue: '',
|
||||
pickPeople: [],
|
||||
pickPeopleValue: '',
|
||||
dateRange: '',
|
||||
contractStateValue: '',
|
||||
production: '',
|
||||
loading: false,
|
||||
total: 0,
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 100,
|
||||
orderName: '',
|
||||
order: '',
|
||||
popoverVisible: {}, // 添加这个
|
||||
batchDialogVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['table'] && this.$refs['table'].doLayout()
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 表格行样式
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
const needCount = (row.申请数 || 0) - (row.已领数 || 0)
|
||||
if ((row.库存数 || 0) < needCount) {
|
||||
return 'warning-row'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
||||
// 获取最大可领数量
|
||||
getMaxNumber(row) {
|
||||
const needCount = Number(row.申请数) - Number(row.已领数)
|
||||
const maxNum = needCount > Number(row.库存数) ? Number(row.库存数) : needCount
|
||||
return maxNum > 0 ? maxNum : 0
|
||||
},
|
||||
|
||||
// 判断出库按钮是否禁用
|
||||
isDeliveryDisabled(row) {
|
||||
return row.库存数 === 0 || Number(row.申请数) <= Number(row.已领数) || this.exWarehouse
|
||||
},
|
||||
|
||||
// 显示批次选择弹窗
|
||||
showBatchDialog(row, index) {
|
||||
this.$set(this.popoverVisible, index, true) // 打开弹窗
|
||||
this.exWarehouse = true
|
||||
this.currentRow = row
|
||||
this.materialSerialNumber = row.物料流水号
|
||||
this.pickingList = row.领料单流水号
|
||||
this.pickingPeople = row.领料人流水号
|
||||
this.orderNumber = row.订单流水号
|
||||
this.isGroup = row.是否部件 || 0
|
||||
this.batchDialogVisible = true // 打开弹窗
|
||||
// 初始化本次领用数量
|
||||
if (!row.本次领用) {
|
||||
row.本次领用 = this.getMaxNumber(row)
|
||||
}
|
||||
|
||||
this.searchBatchList()
|
||||
},
|
||||
|
||||
// 查询批次列表
|
||||
searchBatchList() {
|
||||
var param = []
|
||||
param[0] = ['物料流水号', this.materialSerialNumber]
|
||||
var Data = this.CreateData('11', '装配管理_领料单明细_批次查询', param, this.batchPageSize, this.batchPageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.exWarehouse = false
|
||||
this.batchData = response.data.rows
|
||||
this.batchTotal = response.data.total
|
||||
})
|
||||
},
|
||||
|
||||
// 确认批次出库
|
||||
confirmBatchDelivery(batchRow, tableRow, index) {
|
||||
if (!batchRow.本次领用 || batchRow.本次领用 <= 0) {
|
||||
this.$message.warning('请输入领用数量')
|
||||
return
|
||||
}
|
||||
|
||||
this.exWarehouse = true
|
||||
var param = []
|
||||
param[0] = ['物料流水号', batchRow.物料流水号]
|
||||
param[1] = ['出库数量', batchRow.本次领用]
|
||||
param[2] = ['基本件流水号', this.currentRow.基本件流水号 || '']
|
||||
param[3] = ['标准件和外购件流水号', this.currentRow.标准件和外购件流水号 || '']
|
||||
param[4] = ['领料单明细流水号', this.currentRow.领料单明细流水号]
|
||||
param[5] = ['产品流水号', this.currentRow.产品流水号 || '']
|
||||
param[6] = ['组件流水号', this.currentRow.组件流水号 || '']
|
||||
param[7] = ['领料流水号', this.currentRow.领料流水号 || '']
|
||||
param[8] = ['临时流水号', this.currentRow.临时流水号 || '']
|
||||
param[9] = ['出库人流水号', this.id]
|
||||
param[10] = ['领料人流水号', this.pickingPeople]
|
||||
param[11] = ['领料单流水号', this.pickingList]
|
||||
param[12] = ['是否部件', this.isGroup]
|
||||
param[13] = ['物料与货位流水号', batchRow.物料与货位流水号]
|
||||
|
||||
var Data = this.CreateData('12', '仓储管理_物料出库_新', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
// 关闭 popover
|
||||
this.batchDialogVisible = false // 关闭弹窗
|
||||
this.exWarehouse = false
|
||||
this.batchData = []
|
||||
// 刷新表格数据
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('出库失败')
|
||||
this.exWarehouse = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 批次分页切换
|
||||
handleBatchPageChange(val) {
|
||||
this.batchPageCurrent = val
|
||||
this.searchBatchList()
|
||||
},
|
||||
|
||||
getProductName() {
|
||||
this.productNameValue = ''
|
||||
this.productName = []
|
||||
if (this.customerNameValue) {
|
||||
var param = []
|
||||
param[0] = ['订单流水号', this.customerNameValue]
|
||||
var Data = this.CreateData('11', '订单信息_产品信息_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.productName.push({
|
||||
label: response.data[i].产品名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
searchTable() {
|
||||
var param = []
|
||||
param.push(['物料名称', this.production])
|
||||
param.push(['订单流水号', this.customerNameValue])
|
||||
param.push(['组件流水号', this.productNameValue])
|
||||
param.push(['领料单号', this.pickListValue])
|
||||
var Data = this.CreateData('11', '仓储管理_待出库明细_查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
const rows = response.data.rows || []
|
||||
// 为每行添加本次领用字段
|
||||
rows.forEach(row => {
|
||||
this.$set(row, '本次领用', 0)
|
||||
})
|
||||
this.customerName = [...new Map(
|
||||
rows.map(item => [item.订单流水号, {
|
||||
label: item.订单号,
|
||||
value: item.订单流水号
|
||||
}])
|
||||
).values()]
|
||||
this.pickList = [...new Map(
|
||||
rows.map(item => [item.领料单号, {
|
||||
label: item.领料单号,
|
||||
value: item.领料单号
|
||||
}])
|
||||
).values()]
|
||||
console.log('出库记录查询数据', response.data)
|
||||
this.tableData = rows
|
||||
this.total = response.data.total
|
||||
this.exWarehouse = false
|
||||
})
|
||||
},
|
||||
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
closeBatchDialog() {
|
||||
this.batchDialogVisible = false
|
||||
this.batchData = []
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ziduan {
|
||||
width: 50px !important;
|
||||
}
|
||||
|
||||
/* 红色背景行 */
|
||||
.el-table .warning-row {
|
||||
background-color: #f56c6c !important;
|
||||
}
|
||||
|
||||
.el-table .warning-row td {
|
||||
background-color: #f56c6c !important;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -2,10 +2,26 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-select
|
||||
v-model="pickingListNoValue"
|
||||
:remote-method="getPickingListNo"
|
||||
style="width:200px"
|
||||
placeholder="领料单号"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in pickingListNo"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="orderNumberTypeValue"
|
||||
:remote-method="getOrderNumberType"
|
||||
style="width:200px"
|
||||
style="width:200px;margin-left: 10px"
|
||||
placeholder="订单号"
|
||||
size="small"
|
||||
filterable
|
||||
@@ -183,6 +199,8 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pickingListNoValue: '', // 领料单号
|
||||
pickingListNo: [], // 领料单号数组
|
||||
orderNumberTypeValue: '', // 订单号
|
||||
orderNumberType: [], // 订单号数组
|
||||
productpartNameValue: '', // 产品部件名称
|
||||
@@ -213,8 +231,23 @@ export default {
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.getOrderNumberType('')
|
||||
this.getPickingListNo('')
|
||||
},
|
||||
methods: {
|
||||
getPickingListNo(query) {
|
||||
this.pickingListNo = []
|
||||
var param = []
|
||||
param[0] = ['领料单号', query]
|
||||
var Data = this.CreateData('11', '领料单_领料单信息_列表_查询数据_BAK', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.pickingListNo.push({
|
||||
label: response.data[i].领料单号,
|
||||
value: response.data[i].领料单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getOrderNumberType(query) {
|
||||
this.orderNumberType = []
|
||||
var param = []
|
||||
@@ -247,19 +280,22 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable() {
|
||||
let orderNumberTypeValue_check, productpartNameValue_check, pickingListPeople_check
|
||||
let pickingListNoValue_check, orderNumberTypeValue_check, productpartNameValue_check, pickingListPeople_check
|
||||
this.pickingListNoValue ? pickingListNoValue_check = 1 : pickingListNoValue_check = 0
|
||||
this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
|
||||
this.productpartNameValue ? productpartNameValue_check = 1 : productpartNameValue_check = 0
|
||||
this.pickingListPeople ? pickingListPeople_check = 1 : pickingListPeople_check = 0
|
||||
var param = []
|
||||
param[0] = ['订单号_check', orderNumberTypeValue_check]
|
||||
param[1] = ['订单流水号', this.orderNumberTypeValue]
|
||||
param[2] = ['产品_check', productpartNameValue_check]
|
||||
param[3] = ['组件流水号', this.productpartNameValue]
|
||||
param[4] = ['领料人_check', pickingListPeople_check]
|
||||
param[5] = ['领料人', this.pickingListPeople]
|
||||
param[6] = ['排序名称', this.orderName]
|
||||
param[7] = ['排序方式', this.order]
|
||||
param[0] = ['领料单号_check', pickingListNoValue_check]
|
||||
param[1] = ['领料单流水号', this.pickingListNoValue]
|
||||
param[2] = ['订单号_check', orderNumberTypeValue_check]
|
||||
param[3] = ['订单流水号', this.orderNumberTypeValue]
|
||||
param[4] = ['产品_check', productpartNameValue_check]
|
||||
param[5] = ['组件流水号', this.productpartNameValue]
|
||||
param[6] = ['领料人_check', pickingListPeople_check]
|
||||
param[7] = ['领料人', this.pickingListPeople]
|
||||
param[8] = ['排序名称', this.orderName]
|
||||
param[9] = ['排序方式', this.order]
|
||||
var Data = this.CreateData('11', '装配管理_领料单_查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
|
||||
@@ -388,7 +388,8 @@ export default {
|
||||
},
|
||||
getList(query) {
|
||||
var param = []
|
||||
param[0] = ['订单编号', query]
|
||||
this.pickList = []
|
||||
param[0] = ['领料单号', query]
|
||||
var Data = this.CreateData('11', '仓库管理_领料单_查询_BAK', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
|
||||
@@ -42,7 +42,15 @@
|
||||
style="margin-left: 10px"
|
||||
plain
|
||||
size="small"
|
||||
@click="submitInStorage">入库/入库单
|
||||
@click="submitInStorage">入库
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-s-home"
|
||||
style="margin-left: 10px"
|
||||
plain
|
||||
size="small"
|
||||
@click="showRKDDialog">入库单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -68,6 +76,16 @@
|
||||
height="740px"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
|
||||
<el-table-column label="供应商" align="center" show-overflow-tooltip width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同号" align="center" show-overflow-tooltip width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
@@ -111,9 +129,9 @@
|
||||
<el-table-column width="140px" label="本次到货数" prop="本次到货数" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.本次到货数"
|
||||
v-model=" scope.row.等待入库数量"
|
||||
:min="0"
|
||||
:max="scope.row.采购数-scope.row.已到数"
|
||||
:max="scope.row.采购数 - scope.row.已到数"
|
||||
size="mini"
|
||||
style="margin: 0;width: 100%"/>
|
||||
</template>
|
||||
@@ -505,6 +523,18 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleRKD" title="入库单" center width="700px">
|
||||
<el-table :data="tableDataRKD" border stripe size="small" height="400px">
|
||||
<el-table-column prop="采购合同号" label="采购合同" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="供应商名称" label="供应商" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="到货数" label="到货数" align="center" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="selectRKDRow(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-card v-show="false">
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
@@ -659,6 +689,8 @@ export default {
|
||||
tableData2: [], // 合同信息表
|
||||
tableData3: [], // 合同信息表
|
||||
tableData30: [], // 合同信息表
|
||||
dialogFormVisibleRKD: false,
|
||||
tableDataRKD: [],
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 30, // 分页每页显示条数
|
||||
pageCurrent1: 1, // 分页当前页
|
||||
@@ -689,6 +721,7 @@ export default {
|
||||
this.getSelectTheOutsourcingManufacturers()
|
||||
this.initWebpack()
|
||||
this.getorderSelection()
|
||||
// this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
onChangeSupplierSelection() {
|
||||
@@ -698,6 +731,24 @@ export default {
|
||||
})
|
||||
this.supplierSelectionName = obj.label
|
||||
},
|
||||
showRKDDialog() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_入库单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableDataRKD = response.data.filter(item => item.是否入库 === 0)
|
||||
this.dialogFormVisibleRKD = true
|
||||
})
|
||||
},
|
||||
selectRKDRow(row) {
|
||||
this.supplierSelectionValue = row.供应商流水号
|
||||
this.getContractState()
|
||||
this.$nextTick(() => {
|
||||
this.contractStateValue = row.采购合同流水号
|
||||
this.searchTable1()
|
||||
this.orderSelectionValue = row.供应商
|
||||
})
|
||||
this.dialogFormVisibleRKD = false
|
||||
},
|
||||
exportTable() {
|
||||
const htmlNode = $('#WGBLD').html()
|
||||
const body = $('body')
|
||||
@@ -991,55 +1042,71 @@ export default {
|
||||
},
|
||||
submitInStorage() {
|
||||
// this.exportTable()
|
||||
if (this.contractStateValue) {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
const materialGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
const purchaseGroup = []
|
||||
const locateGroup = []
|
||||
const isPurchaseGroup = []
|
||||
const batchGroup = []
|
||||
this.multipleSelection_variable = this.multipleSelection
|
||||
this.multipleSelection = []
|
||||
for (let i = 0; i < this.multipleSelection_variable.length; i++) {
|
||||
if (this.multipleSelection_variable[i].货位流水号 === 0) {
|
||||
this.$message.warning('存在未绑定货位的物料')
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable[i].本次到货数
|
||||
partGroup[i] = this.multipleSelection_variable[i].标准件和外购件流水号
|
||||
purchaseGroup[i] = this.multipleSelection_variable[i].采购合同明细流水号
|
||||
locateGroup[i] = this.multipleSelection_variable[i].货位流水号
|
||||
isPurchaseGroup[i] = this.multipleSelection_variable[i].采购类型
|
||||
batchGroup[i] = this.multipleSelection_variable[i].批号
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
param[1] = ['实际到货数量组', numberGroup]
|
||||
param[2] = ['标准件和外购件流水号组', partGroup]
|
||||
param[3] = ['采购合同明细流水号组', purchaseGroup]
|
||||
param[4] = ['入库人员流水号', this.id]
|
||||
param[5] = ['货位流水号组', locateGroup]
|
||||
param[6] = ['是否采购组', isPurchaseGroup]
|
||||
param[7] = ['批号组', batchGroup]
|
||||
var Data = this.CreateData('12', '仓储管理_采购件入库_循环执行', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('入库成功')
|
||||
this.exportTable()
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.success('入库失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择物料')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择合同')
|
||||
if (!this.multipleSelection || this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请先选择物料')
|
||||
return
|
||||
}
|
||||
|
||||
const firstContractNo = this.multipleSelection[0]['采购合同流水号']
|
||||
const hasDifferent = this.multipleSelection.some(item => item['采购合同流水号'] !== firstContractNo)
|
||||
|
||||
if (hasDifferent) {
|
||||
this.$message.warning('只能选择一个合同的物料')
|
||||
return
|
||||
}
|
||||
console.log(this.multipleSelection)
|
||||
// if (this.contractStateValue) {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
const materialGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
const purchaseGroup = []
|
||||
const locateGroup = []
|
||||
const isPurchaseGroup = []
|
||||
const batchGroup = []
|
||||
const batchCodeGroup = []
|
||||
this.multipleSelection_variable = this.multipleSelection
|
||||
this.multipleSelection = []
|
||||
for (let i = 0; i < this.multipleSelection_variable.length; i++) {
|
||||
if (this.multipleSelection_variable[i].货位流水号 === 0) {
|
||||
this.$message.warning('存在未绑定货位的物料')
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable[i].等待入库数量
|
||||
partGroup[i] = this.multipleSelection_variable[i].标准件和外购件流水号
|
||||
purchaseGroup[i] = this.multipleSelection_variable[i].采购合同明细流水号
|
||||
locateGroup[i] = this.multipleSelection_variable[i].货位流水号
|
||||
isPurchaseGroup[i] = this.multipleSelection_variable[i].采购类型
|
||||
batchGroup[i] = this.multipleSelection_variable[i].批号
|
||||
batchCodeGroup[i] = this.multipleSelection_variable[i].批次编码
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
param[1] = ['实际到货数量组', numberGroup]
|
||||
param[2] = ['标准件和外购件流水号组', partGroup]
|
||||
param[3] = ['采购合同明细流水号组', purchaseGroup]
|
||||
param[4] = ['入库人员流水号', this.id]
|
||||
param[5] = ['货位流水号组', locateGroup]
|
||||
param[6] = ['是否采购组', isPurchaseGroup]
|
||||
param[7] = ['批号组', batchGroup]
|
||||
param[8] = ['批次编码组', batchCodeGroup]
|
||||
var Data = this.CreateData('12', '仓储管理_采购件入库_循环执行', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('入库成功')
|
||||
this.exportTable()
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.success('入库失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择物料')
|
||||
}
|
||||
// } else {
|
||||
// this.$message.warning('请先选择合同')
|
||||
// }
|
||||
},
|
||||
searchTable2() {
|
||||
let materialNameTypeValue_check
|
||||
@@ -1126,6 +1193,7 @@ export default {
|
||||
const typeGroup = []
|
||||
const locateGroup = []
|
||||
const batchGroup = []
|
||||
const batchCodeGroup = []
|
||||
this.multipleSelection_variable2 = this.multipleSelection2
|
||||
this.multipleSelection2 = []
|
||||
for (let i = 0; i < this.multipleSelection_variable2.length; i++) {
|
||||
@@ -1134,11 +1202,12 @@ export default {
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable2[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable2[i].本次入库
|
||||
numberGroup[i] = this.multipleSelection_variable2[i].等待入库数量
|
||||
processGroup[i] = this.multipleSelection_variable2[i].工艺计划流水号
|
||||
typeGroup[i] = this.multipleSelection_variable2[i].类型
|
||||
locateGroup[i] = this.multipleSelection_variable2[i].货位流水号
|
||||
batchGroup[i] = this.multipleSelection_variable2[i].批号
|
||||
batchCodeGroup[i] = this.multipleSelection_variable2[i].批次编码
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<el-col style="width: 921px">
|
||||
<el-card style="height: 850px ;display:flex">
|
||||
<el-col style="width: 930px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-cascader ref="cascader" :options="product" :show-all-levels="false" placeholder="产品名称" clearable size="small" @clear="clearData" @change="getData"/>
|
||||
<el-input v-model="specificationsValue" style="width:200px" placeholder="名称/规格/型号" size="small" clearable @keyup.enter.native="pageCurrent=1;updateCheck()"/>
|
||||
<el-button :disabled="disabled1" icon="el-icon-edit" type="primary" style="margin-left: 10px" plain size="small" @click="setUpInventory()">最低库存</el-button>
|
||||
<!-- <el-button :disabled="disabled1" icon="el-icon-edit" type="primary" style="margin-left: 10px" plain size="small" @click="setUpInventory()">最低库存</el-button> -->
|
||||
<el-button :disabled="disabled" type="distribution" icon="el-icon-check" size="small" @click="openOrder()">提交补货</el-button>
|
||||
<el-checkbox v-model="checked" style="margin-left: 40px" @change="updateCheck">自制补货</el-checkbox>
|
||||
<el-badge :value="numberReturnedItems" class="item">
|
||||
<el-button type="text" size="small" style="margin-left: 70px" @click="viewReturnedContracts()">打回通知</el-button>
|
||||
</el-badge>
|
||||
</div>
|
||||
<div>
|
||||
<div >
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
@@ -23,7 +23,6 @@
|
||||
show-summary
|
||||
border
|
||||
size="small"
|
||||
style="width: 921px"
|
||||
height="740px"
|
||||
@sort-change="sortChange"
|
||||
@row-click="updateStock">
|
||||
@@ -67,12 +66,31 @@
|
||||
{{ scope.row.需求量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="73px" label="最低库存" align="center" prop="最低库存">
|
||||
<el-table-column width="85px" label="可用库存" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最低库存 }}
|
||||
{{ (Number(scope.row.库存) || 0) - (Number(scope.row.需求量) || 0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补货数" align="center" prop="补货数">
|
||||
<el-table-column width="73px" label="最高库存" align="center" prop="最高库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最高库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="73px" label="安全库存" align="center" prop="安全库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安全库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="73px" label="最低库存" align="center" prop="最低库存">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
:class="{
|
||||
'red': Number(scope.row.最低库存) === 1,
|
||||
'yellow': Number(scope.row.最低库存) === 2
|
||||
}">{{ scope.row.最低库存 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补货数" width="130px" align="center" prop="补货数" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.补货数" :min="1" size="mini" style="margin: 0;width: 100%"/>
|
||||
</template>
|
||||
@@ -692,10 +710,16 @@ export default {
|
||||
background: #D9FFFF!important;
|
||||
}
|
||||
.red {
|
||||
background: #e88383!important;
|
||||
color: #e88383!important;
|
||||
font-weight: bold;
|
||||
}
|
||||
.yellow {
|
||||
background: yellow!important;
|
||||
color: orange!important;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-card__body{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@@ -30,19 +30,27 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select v-model="deadlineStatusValue" style="width:100px;margin-right: 0" placeholder="期限状态" size="small" filterable clearable @change="pageSize=100;pageCurrent=1;searchTable()">
|
||||
<el-option
|
||||
v-for="item in deadlineStatusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="replenishmentManValue" style="width:100px" placeholder="补货人" size="small" clearable @keyup.enter.native="pageSize=100;pageCurrent=1;searchTable()"/>
|
||||
</div>
|
||||
<el-col style="margin-left: 7px;width: 691px">
|
||||
<el-col style="margin-left: 7px;width: 801px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
:row-class-name="rowClassName"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 691px;margin-top: 10px"
|
||||
style="width: 801px;margin-top: 10px"
|
||||
height="750"
|
||||
@sort-change="sortChange"
|
||||
@row-click="searchTable1">
|
||||
@@ -61,6 +69,11 @@
|
||||
{{ scope.row.补货日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期')" label="补货期限" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.补货期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('状态')" label="补货人" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.补货人 }}
|
||||
@@ -176,6 +189,17 @@ export default {
|
||||
value: '入库',
|
||||
label: '入库'
|
||||
}], // 补货状态数组
|
||||
deadlineStatusValue: [],
|
||||
deadlineStatusOptions: [{
|
||||
value: '正常',
|
||||
label: '正常'
|
||||
}, {
|
||||
value: '临期',
|
||||
label: '临期'
|
||||
}, {
|
||||
value: '超期',
|
||||
label: '超期'
|
||||
}], // 补货期限数组
|
||||
replenishmentManValue: '', // 补货人
|
||||
dateRange: '', // 提交日期
|
||||
loading: false, // 数据加载
|
||||
@@ -236,6 +260,7 @@ export default {
|
||||
param[8] = ['补货单号_check', orderValue_check]
|
||||
param[9] = ['排序名称', this.orderName]
|
||||
param[10] = ['排序方式', this.order]
|
||||
param[11] = ['期限状态', this.deadlineStatusValue]
|
||||
var Data = this.CreateData('11', '仓储管理_补货信息_查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
console.log('补货信息查询', response.data)
|
||||
@@ -301,8 +326,31 @@ export default {
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
rowClassName({ row, rowIndex }) {
|
||||
console.log(row)
|
||||
if (row.期限状态 === '超期') {
|
||||
return 'overdue-row'
|
||||
} else if (row.期限状态 === '临期') {
|
||||
return 'near-due-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 超期行:纯红背景,覆盖斑马纹和 hover */
|
||||
.el-table .overdue-row,
|
||||
.el-table .overdue-row td {
|
||||
background: #e79696!important;
|
||||
}
|
||||
|
||||
/* 临期行:黄色背景,覆盖斑马纹和 hover */
|
||||
.el-table .near-due-row,
|
||||
.el-table .near-due-row td {
|
||||
background: rgb(223, 223, 137)!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="500" content="删除调拨单" effect="dark" placement="top">
|
||||
<el-button
|
||||
:disabled="(Number(scope.row.单据状态) > 1) || (jobNumber != '1002')"
|
||||
:disabled="(Number(scope.row.单据状态) > 1) || (jobNumber != '2009')"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
|
||||
481
src/views/WarehouseManagement/WarehouseSummary/index.vue
Normal file
481
src/views/WarehouseManagement/WarehouseSummary/index.vue
Normal file
@@ -0,0 +1,481 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 20px; margin-bottom: 20px">
|
||||
<h2 style="text-align: center; margin-bottom: 20px">仓储汇总</h2>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('待入库')">
|
||||
<div class="stat-number">{{ statistics.待入库 }}</div>
|
||||
<div class="stat-label">待入库</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('待出库')">
|
||||
<div class="stat-number">{{ statistics.待出库 }}</div>
|
||||
<div class="stat-label">待出库</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('可出库')">
|
||||
<div class="stat-number">{{ statistics.可出库 }}</div>
|
||||
<div class="stat-label">可出库</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px">
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('补货中')">
|
||||
<div class="stat-number">{{ statistics.补货中 }}</div>
|
||||
<div class="stat-label">补货中</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('生产中')">
|
||||
<div class="stat-number">{{ statistics.生产中 }}</div>
|
||||
<div class="stat-label">生产中</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('待投产')">
|
||||
<div class="stat-number">{{ statistics.待投产 }}</div>
|
||||
<div class="stat-label">待投产</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<h3 style="margin-bottom: 10px">{{ currentDetail }}详情</h3>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="detailData"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
height="400">
|
||||
<el-table-column
|
||||
v-for="(column, index) in detailColumns"
|
||||
:key="index"
|
||||
:width="column.width"
|
||||
:label="column.label"
|
||||
:align="column.align">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[column.prop] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
statistics: {
|
||||
待入库: 0,
|
||||
待出库: 0,
|
||||
可出库: 0,
|
||||
补货中: 0,
|
||||
生产中: 0,
|
||||
待投产: 0
|
||||
},
|
||||
currentDetail: '',
|
||||
detailData: [],
|
||||
detailColumns: [],
|
||||
领料单流水号列表: [],
|
||||
statisticsTimer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.getStatistics()
|
||||
// 每半小时运行一次getStatistics
|
||||
this.statisticsTimer = setInterval(() => {
|
||||
this.getStatistics()
|
||||
console.log(1)
|
||||
}, 60 * 1000) // 30分钟 = 30 * 60 * 1000 毫秒
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 清除定时器
|
||||
if (this.statisticsTimer) {
|
||||
clearInterval(this.statisticsTimer)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取统计数据
|
||||
getStatistics() {
|
||||
this.loading = true
|
||||
|
||||
// 待入库数据:采购合同组件中状态为为到货的订单数量
|
||||
this.getPendingInStorage()
|
||||
|
||||
// 待出库数据:物料出库组件中所有领料单还未领的物料种类数量
|
||||
this.getPendingOutStorage()
|
||||
|
||||
// 可出库数据:待出库数据的基础上又库存的数量
|
||||
this.getAvailableOutStorage()
|
||||
|
||||
// 补货中数据:补货件查询组件中状态已到以外的订单数量
|
||||
this.getReplenishing()
|
||||
|
||||
// 生产中数据:补货件查询组件中状态为加工中的订单数量
|
||||
this.getInProduction()
|
||||
|
||||
// 待投产数据:补货件查询组件中状态为未开始的订单数量
|
||||
this.getPendingProduction()
|
||||
|
||||
this.loading = false
|
||||
},
|
||||
|
||||
// 获取待入库数据
|
||||
getPendingInStorage() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
let count = 0
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 === '未到' || item.状态 === '加工中' || item.状态 === '部分到') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.待入库 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待出库数据
|
||||
getPendingOutStorage() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '装配管理_未领完领料单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// 获取领料单流水号
|
||||
this.领料单流水号列表 = response.data.map(item => item.领料单流水号)
|
||||
if (this.领料单流水号列表.length > 0) {
|
||||
// 用领料单流水号查询物料明细
|
||||
var param2 = []
|
||||
param2[0] = ['领料单流水号列表', this.领料单流水号列表]
|
||||
var Data2 = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param2)
|
||||
this.ExecDatabase(Data2).then(response2 => {
|
||||
// 计算物料种类数量
|
||||
let count = 0
|
||||
response2.data.forEach(item => {
|
||||
if (item.已领数 < item.申请数) {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.待出库 = count
|
||||
})
|
||||
} else {
|
||||
this.statistics.待出库 = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取可出库数据
|
||||
getAvailableOutStorage() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '装配管理_未领完领料单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// 获取领料单流水号
|
||||
const 领料单流水号列表 = response.data.map(item => item.领料单流水号)
|
||||
|
||||
if (领料单流水号列表.length > 0) {
|
||||
// 用领料单流水号查询物料明细
|
||||
var param2 = []
|
||||
param2[0] = ['领料单流水号列表', 领料单流水号列表]
|
||||
var Data2 = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param2)
|
||||
this.ExecDatabase(Data2).then(response2 => {
|
||||
// 计算库存数不为0的物料种类数量
|
||||
let count = 0
|
||||
response2.data.forEach(item => {
|
||||
// 假设库存数字段名为"库存"或"库存数量"
|
||||
if (item.已领数 < item.申请数 && item.库存数 > 0) {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.可出库 = count
|
||||
})
|
||||
} else {
|
||||
this.statistics.可出库 = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取补货中数据
|
||||
getReplenishing() {
|
||||
let count = 0
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 !== '已到' && item.状态 !== '完成' && item.状态 !== '已完成' && item.状态 !== '入库' && item.状态 !== '已编制') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.补货中 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 获取生产中数据
|
||||
getInProduction() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
let count = 0
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 === '加工中') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.生产中 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待投产数据
|
||||
getPendingProduction() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
let count = 0
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 === '未开始') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.待投产 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 显示详情
|
||||
showDetail(type) {
|
||||
this.currentDetail = type
|
||||
this.loading = true
|
||||
|
||||
switch (type) {
|
||||
case '待入库':
|
||||
this.getPendingInStorageDetail()
|
||||
break
|
||||
case '待出库':
|
||||
this.getPendingOutStorageDetail()
|
||||
break
|
||||
case '可出库':
|
||||
this.getAvailableOutStorageDetail()
|
||||
break
|
||||
case '补货中':
|
||||
this.getReplenishingDetail()
|
||||
break
|
||||
case '生产中':
|
||||
this.getInProductionDetail()
|
||||
break
|
||||
case '待投产':
|
||||
this.getPendingProductionDetail()
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
// 获取待入库详情
|
||||
getPendingInStorageDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 === '未到' || item.状态 === '加工中' || item.状态 === '部分到')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '补货人', label: '补货人', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '120px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '180px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待出库详情
|
||||
getPendingOutStorageDetail() {
|
||||
var param = []
|
||||
param[0] = ['领料单流水号列表', this.领料单流水号列表]
|
||||
var Data = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => (item.已领数 || 0) < (item.申请数 || 0))
|
||||
this.detailColumns = [
|
||||
{ prop: '领料单号', label: '领料单号', width: '100px', align: 'center' },
|
||||
{ prop: '物料名称', label: '物料名称', width: '150px', align: 'center' },
|
||||
{ prop: '图号或型号', label: '图号或型号', width: '150px', align: 'center' },
|
||||
{ prop: '货位名称', label: '库位', width: '180px', align: 'center' },
|
||||
{ prop: '库存数', label: '库存数', width: '100px', align: 'center' },
|
||||
{ prop: '申请数', label: '申请数', width: '100px', align: 'center' },
|
||||
{ prop: '已领数', label: '已领数', width: '100px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取可出库详情
|
||||
getAvailableOutStorageDetail() {
|
||||
var param = []
|
||||
param[0] = ['领料单流水号列表', this.领料单流水号列表]
|
||||
var Data = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.已领数 < item.申请数 && item.库存数 > 0)
|
||||
this.detailColumns = [
|
||||
{ prop: '领料单号', label: '领料单号', width: '100px', align: 'center' },
|
||||
{ prop: '物料名称', label: '物料名称', width: '150px', align: 'center' },
|
||||
{ prop: '图号或型号', label: '图号或型号', width: '150px', align: 'center' },
|
||||
{ prop: '货位名称', label: '库位', width: '180px', align: 'center' },
|
||||
{ prop: '库存数', label: '库存数', width: '100px', align: 'center' },
|
||||
{ prop: '申请数', label: '申请数', width: '100px', align: 'center' },
|
||||
{ prop: '已领数', label: '已领数', width: '100px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取补货中详情
|
||||
getReplenishingDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 !== '已到' && item.状态 !== '完成' && item.状态 !== '已完成' && item.状态 !== '入库' && item.状态 !== '已编制')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '名称', label: '物料名称', width: '180px', align: 'center' },
|
||||
{ prop: '补货数', label: '补货数量', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '100px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '150px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取生产中详情
|
||||
getInProductionDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 === '加工中')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '名称', label: '物料名称', width: '180px', align: 'center' },
|
||||
{ prop: '补货数', label: '补货数量', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '100px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '150px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待投产详情
|
||||
getPendingProductionDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 === '未开始')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '名称', label: '物料名称', width: '180px', align: 'center' },
|
||||
{ prop: '补货数', label: '补货数量', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '100px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '150px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.stat-card {
|
||||
height: 120px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 8px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* 为不同类型的卡片设置不同的颜色 */
|
||||
.stat-card:nth-child(1) .stat-number {
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(2) .stat-number {
|
||||
color: #ff9800;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(3) .stat-number {
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(4) .stat-number {
|
||||
color: #9c27b0;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(5) .stat-number {
|
||||
color: #e91e63;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(6) .stat-number {
|
||||
color: #607d8b;
|
||||
}
|
||||
</style>
|
||||
1516
src/views/WarehouseManagement/WarehouseVisualization/index.vue
Normal file
1516
src/views/WarehouseManagement/WarehouseVisualization/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
407
src/views/WarehouseVisualization/index.vue
Normal file
407
src/views/WarehouseVisualization/index.vue
Normal file
@@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<div class="warehouse-container">
|
||||
<div class="warehouse-header">
|
||||
<div class="controls">
|
||||
<div class="legend">
|
||||
<div class="legend-item">
|
||||
<div class="color-box status-2"/>
|
||||
<span>有物料有托盘 (2)</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="color-box status-1"/>
|
||||
<span>有托盘无物料 (1)</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="color-box status-0"/>
|
||||
<span>空库位 (0)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-display">
|
||||
<div v-if="selectedCell" class="selected-info">
|
||||
选中: 行-层 {{ selectedCell.rowLayer }} | 列 {{ selectedCell.column }} | 状态: {{ getStatusText(selectedCell.status) }}
|
||||
</div>
|
||||
<div class="summary">
|
||||
总计: {{ totalCells }} 个库位 | 有物料: {{ countStatus(2) }} | 有托盘: {{ countStatus(1) }} | 空闲: {{ countStatus(0) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="warehouse-main">
|
||||
<div v-for="(group, groupIndex) in groupedWarehouseData" :key="groupIndex" class="warehouse-group">
|
||||
<h3>立库组 {{ groupIndex + 1 }} ({{ getGroupRange(groupIndex) }})</h3>
|
||||
<div class="warehouse-rack">
|
||||
<div class="column-labels">
|
||||
<div v-for="col in columnCount" :key="col" class="column-label">
|
||||
{{ col }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="rows-container">
|
||||
<div
|
||||
v-for="(row, rowIndex) in group"
|
||||
:key="rowIndex"
|
||||
:class="{ 'highlighted-row': highlightedRowLayer === row['行-层'] }"
|
||||
class="row"
|
||||
>
|
||||
<div class="row-label">{{ row['行-层'] }}</div>
|
||||
<div
|
||||
v-for="col in columnCount"
|
||||
:key="col"
|
||||
:class="`status-${row[col]}`"
|
||||
:title="`行-层: ${row['行-层']} | 列: ${col} | 状态: ${getStatusText(row[col])}`"
|
||||
class="cell"
|
||||
@click="selectCell(row['行-层'], col, row[col])"
|
||||
>
|
||||
{{ row[col] }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'WarehouseVisualization',
|
||||
props: {
|
||||
warehouseData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedCell: null,
|
||||
highlightedRowLayer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 将数据分成两组(每组4行)
|
||||
groupedWarehouseData() {
|
||||
const groups = []
|
||||
const groupSize = 4
|
||||
|
||||
for (let i = 0; i < this.warehouseData.length; i += groupSize) {
|
||||
groups.push(this.warehouseData.slice(i, i + groupSize))
|
||||
}
|
||||
|
||||
return groups
|
||||
},
|
||||
|
||||
// 计算列数(排除"行-层"字段)
|
||||
columnCount() {
|
||||
if (this.warehouseData.length > 0) {
|
||||
return Object.keys(this.warehouseData[0]).filter(key => key !== '行-层').length
|
||||
}
|
||||
return 0
|
||||
},
|
||||
|
||||
// 计算总库位数
|
||||
totalCells() {
|
||||
return this.warehouseData.length * this.columnCount
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选择单元格
|
||||
selectCell(rowLayer, column, status) {
|
||||
this.selectedCell = {
|
||||
rowLayer,
|
||||
column,
|
||||
status
|
||||
}
|
||||
this.highlightedRowLayer = rowLayer
|
||||
},
|
||||
|
||||
// 获取状态文本描述
|
||||
getStatusText(status) {
|
||||
const statusMap = {
|
||||
0: '空库位',
|
||||
1: '有托盘无物料',
|
||||
2: '有物料有托盘'
|
||||
}
|
||||
return statusMap[status] || '未知状态'
|
||||
},
|
||||
|
||||
// 统计特定状态的数量
|
||||
countStatus(status) {
|
||||
let count = 0
|
||||
this.warehouseData.forEach(row => {
|
||||
for (let col = 1; col <= this.columnCount; col++) {
|
||||
if (row[col] === status) {
|
||||
count++
|
||||
}
|
||||
}
|
||||
})
|
||||
return count
|
||||
},
|
||||
|
||||
// 获取组的范围描述
|
||||
getGroupRange(groupIndex) {
|
||||
const startIndex = groupIndex * 4
|
||||
const endIndex = Math.min(startIndex + 3, this.warehouseData.length - 1)
|
||||
|
||||
const startLayer = this.warehouseData[startIndex] ? this.warehouseData[startIndex]['行-层'] : ''
|
||||
const endLayer = this.warehouseData[endIndex] ? this.warehouseData[endIndex]['行-层'] : ''
|
||||
|
||||
return `${startLayer} 到 ${endLayer}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.warehouse-container {
|
||||
font-family: 'Arial', sans-serif;
|
||||
background-color: white;
|
||||
padding: 25px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.warehouse-header {
|
||||
margin-bottom: 30px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.legend {
|
||||
display: flex;
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 15px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.color-box {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.status-2 {
|
||||
background-color: #4caf50; /* 绿色 - 有物料有托盘 */
|
||||
}
|
||||
|
||||
.status-1 {
|
||||
background-color: #ff9800; /* 橙色 - 有托盘无物料 */
|
||||
}
|
||||
|
||||
.status-0 {
|
||||
background-color: #e0e0e0; /* 灰色 - 空库位 */
|
||||
}
|
||||
|
||||
.info-display {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.selected-info {
|
||||
background-color: #e8f5e9;
|
||||
padding: 12px 18px;
|
||||
border-radius: 6px;
|
||||
border-left: 5px solid #4caf50;
|
||||
font-weight: bold;
|
||||
color: #2e7d32;
|
||||
}
|
||||
|
||||
.summary {
|
||||
color: #555;
|
||||
font-size: 15px;
|
||||
padding: 10px 15px;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.warehouse-main {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 50px;
|
||||
}
|
||||
|
||||
.warehouse-group {
|
||||
background-color: #f9f9f9;
|
||||
padding: 25px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
|
||||
min-width: 650px;
|
||||
border: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.warehouse-group h3 {
|
||||
color: #37474f;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.warehouse-rack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.column-labels {
|
||||
display: flex;
|
||||
margin-left: 70px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.column-label {
|
||||
width: 42px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
color: #555;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.rows-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.row.highlighted-row {
|
||||
background-color: #f0f9ff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 0 0 2px #bbdefb;
|
||||
}
|
||||
|
||||
.row-label {
|
||||
width: 70px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
color: #37474f;
|
||||
background-color: #f1f8ff;
|
||||
padding: 10px 0;
|
||||
border-radius: 6px;
|
||||
margin-right: 8px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #e1f5fe;
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 6px;
|
||||
margin-right: 3px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.cell:hover {
|
||||
transform: scale(1.15);
|
||||
z-index: 10;
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.cell.status-2 {
|
||||
background-color: #4caf50;
|
||||
color: white;
|
||||
border-color: #388e3c;
|
||||
}
|
||||
|
||||
.cell.status-1 {
|
||||
background-color: #ff9800;
|
||||
color: white;
|
||||
border-color: #f57c00;
|
||||
}
|
||||
|
||||
.cell.status-0 {
|
||||
background-color: #e0e0e0;
|
||||
color: #666;
|
||||
border-color: #bdbdbd;
|
||||
}
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.warehouse-main {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.warehouse-group {
|
||||
width: 100%;
|
||||
min-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.controls {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.legend {
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.info-display {
|
||||
width: 100%;
|
||||
min-width: unset;
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.row-label {
|
||||
width: 55px;
|
||||
font-size: 12px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.column-label {
|
||||
width: 32px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.column-labels {
|
||||
margin-left: 55px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,7 +4,9 @@
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<!-- or name="fade" -->
|
||||
<!-- <router-view :key="key"></router-view> -->
|
||||
<router-view/>
|
||||
<keep-alive>
|
||||
<router-view/>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -164,6 +164,8 @@ export default {
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
console.log(this)
|
||||
|
||||
return false
|
||||
}
|
||||
if (this.loginForm.checked === true) { // 传入账号名,密码,和保存天数3个参数
|
||||
@@ -253,7 +255,7 @@ $light_gray: #eee;
|
||||
input {
|
||||
background: transparent;
|
||||
border: 1px;
|
||||
-webkit-appearance: none;
|
||||
// -webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: $light_gray;
|
||||
|
||||
@@ -4,8 +4,10 @@ export const name1_config = `OP1000`
|
||||
export const name3_config = `OP2000`
|
||||
export const name4_config = `OP9999`
|
||||
//
|
||||
// var url = `http://192.168.1.27:8010`
|
||||
var url = `http://127.0.0.1:10020`
|
||||
var url = `http://192.168.1.27:8030` // 测试环境 接口端口号 http://192.168.1.27:8031 测试环境管理系统 0001 654321
|
||||
// var url = `http://192.168.1.27:8010` // 正式环境 接口端口号 http://192.168.1.27:8001 正式环境管理系统 0000 0000
|
||||
var url1 = `http://192.168.1.27:10006` // 立库数据库的接口端口号
|
||||
// var url = `http://127.0.0.1:10250`
|
||||
// var url = `http://124.220.15.242:8602`
|
||||
// var url = `http://localhost:57966`
|
||||
|
||||
@@ -31,5 +33,12 @@ export const MESUploadFileProduct_config = url + `/submit/MESUploadFileProduct.a
|
||||
export const MESDownloadFile_config = url + `/submit/MESDownloadFile.ashx`
|
||||
export const MESUploadFileProject_config = url + `/submit/MESUploadFileProject.ashx`
|
||||
export const MESUploadFileProcess_config = url + `/submit/MESUploadFileProcess.ashx`
|
||||
// 新的图片上传下载接口(存储到文件系统)
|
||||
export const MESUploadFileNew_config = url + `/submit/MESUploadFile.ashx`
|
||||
export const MESDownloadFileNew_config = url + `/submit/MESDownloadFile.ashx`
|
||||
export const MESDeleteFileNew_config = url + `/submit/MESDeleteFile.ashx`
|
||||
// 图片保存路径
|
||||
export const MESUploadFileNew_BasePath_config = `D:\\\\ImageSave`
|
||||
|
||||
export const request_config = url + `/submit/MESCommonBase.ashx`
|
||||
export const request_config1 = url1 + `/submit/MESCommonBase.ashx`
|
||||
148
今日计划.md
Normal file
148
今日计划.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# 今日工作计划与部署文档
|
||||
|
||||
## 1. 工作概述
|
||||
|
||||
本文档记录了今日开发与运维任务,包括PLM数据上传、采购到货入库单生成逻辑、生产计划功能更新及生产环境部署。重点涉及数据库表结构变更、存储过程更新及上线后的Bug跟踪。
|
||||
|
||||
## 2. 任务清单
|
||||
|
||||
| 序号 | 任务名称 | 状态 | 优先级 | 预计耗时 | 负责人 |
|
||||
| -- | -------------- | ---- | --- | ---- | --- |
|
||||
| 1 | PLM文档上传 | 进行中 | 高 | 1.5h | 开发组 |
|
||||
| 2 | 采购到货生成入库单 | 待开始 | 高 | 2h | 开发组 |
|
||||
| 3 | 生产计划功能更新(含数据库) | 待开始 | 高 | 2.5h | 开发组 |
|
||||
| 4 | 生产环境部署 | 待开始 | 紧急 | 1h | 运维组 |
|
||||
| 5 | 上线后Bug监控与修复 | 持续执行 | 高 | 持续 | 全体 |
|
||||
|
||||
## 3. 详细任务说明
|
||||
|
||||
### 3.1 PLM文档上传
|
||||
|
||||
- **目标**:将PLM系统中的设计文档、BOM表等同步至生产系统。
|
||||
- **操作**:
|
||||
- 使用PLM接口批量拉取最新文档。
|
||||
- 校验文档完整性并存储至文件服务器。
|
||||
- 更新文档索引至数据库`plm_docs`表。
|
||||
- **验证标准**:上传成功率≥99%,文档可预览。
|
||||
|
||||
### 3.2 采购到货生成入库单
|
||||
|
||||
- **业务逻辑**:根据采购订单的到货通知单,自动生成仓库入库单。
|
||||
- **操作**:
|
||||
- 读取采购到货记录表`purchase_arrival`。
|
||||
- 校验数量、批次号、质检状态。
|
||||
- 调用存储过程`sp_generate_inbound_order`生成入库单。
|
||||
- **数据库变更**:无新增表,但需验证触发器`trg_after_arrival`是否正常。
|
||||
|
||||
### 3.3 生产计划功能更新(含数据库变更)
|
||||
|
||||
此任务包含应用程序代码更新及数据库结构/存储过程变更,需按顺序执行。
|
||||
|
||||
#### 3.3.1 数据库变更脚本
|
||||
|
||||
**表结构变更**:
|
||||
|
||||
```sql
|
||||
-- 添加字段用于计划优先级
|
||||
ALTER TABLE production_plan ADD priority_level TINYINT DEFAULT 3 CHECK (priority_level BETWEEN 1 AND 5);
|
||||
|
||||
-- 新增索引以提高查询效率
|
||||
CREATE INDEX idx_plan_status_priority ON production_plan(plan_status, priority_level);
|
||||
|
||||
-- 增加历史日志表
|
||||
CREATE TABLE production_plan_log (
|
||||
log_id INT PRIMARY KEY IDENTITY(1,1),
|
||||
plan_id INT NOT NULL,
|
||||
action_type VARCHAR(20),
|
||||
change_time DATETIME DEFAULT GETDATE()
|
||||
);
|
||||
```
|
||||
|
||||
**存储过程更新**:
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
-- 更新生产计划状态存储过程,增加优先级处理
|
||||
CREATE OR ALTER PROCEDURE sp_update_plan_status
|
||||
@plan_id INT,
|
||||
@new_status VARCHAR(20)
|
||||
AS
|
||||
BEGIN
|
||||
BEGIN TRY
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
UPDATE production_plan
|
||||
SET plan_status = @new_status,
|
||||
last_modified = GETDATE()
|
||||
WHERE plan_id = @plan_id;
|
||||
|
||||
-- 记录日志
|
||||
INSERT INTO production_plan_log (plan_id, action_type)
|
||||
VALUES (@plan_id, 'STATUS_CHANGE_TO_' + @new_status);
|
||||
|
||||
COMMIT TRANSACTION;
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
ROLLBACK;
|
||||
THROW;
|
||||
END CATCH
|
||||
END;
|
||||
```
|
||||
|
||||
**执行顺序**:
|
||||
|
||||
1. 备份现有数据库(生产计划相关表)。
|
||||
2. 执行`ALTER TABLE`语句。
|
||||
3. 执行`CREATE TABLE`语句。
|
||||
4. 执行`CREATE OR ALTER PROCEDURE`语句。
|
||||
5. 验证索引创建。
|
||||
|
||||
#### **3.3.2 应用程序更新**
|
||||
|
||||
- 生产计划列表页增加“优先级”筛选和排序。
|
||||
- 计划详情页支持修改优先级(权限控制)。
|
||||
- 调用`sp_update_plan_status`替代原有直接UPDATE语句。
|
||||
|
||||
### **3.4 生产环境部署**
|
||||
|
||||
**部署步骤**:
|
||||
|
||||
1. 停止生产计划相关服务。
|
||||
2. 备份当前生产数据库和生产计划模块代码。
|
||||
3. 执行数据库变更脚本(见3.3.1)。
|
||||
4. 部署新的后端API和前端页面。
|
||||
5. 启动服务,执行冒烟测试(创建计划、变更状态、优先级过滤)。
|
||||
6. 通知业务部门恢复使用。
|
||||
|
||||
**回滚计划**:
|
||||
|
||||
- 若部署后30分钟内出现严重错误,执行数据库回滚脚本(恢复备份表及存储过程),并回退至上一版本代码。
|
||||
|
||||
### **3.5 上线后Bug监控与修复**
|
||||
|
||||
- **监控指标**:
|
||||
- 生产计划保存接口错误率 > 5%
|
||||
- 入库单生成超时 > 3秒
|
||||
- PLM上传失败率 > 1%
|
||||
- **响应机制**:
|
||||
- 普通Bug:2小时内修复,记录至JIRA。
|
||||
- 严重Bug(导致数据错误或流程中断):立即回滚相关变更,事后分析。
|
||||
|
||||
## **4. 注意事项**
|
||||
|
||||
- 所有数据库变更是不可逆的,务必提前全量备份。
|
||||
- 生产计划优先级字段`priority_level`默认值为3,需通知前端做UI提示。
|
||||
- 存储过程更新后,需同步更新ORM实体映射(如有)。
|
||||
- 采购入库单生成依赖质检结果,若存在未质检记录,系统应跳过并记录错误日志。
|
||||
|
||||
## **5. 验收与完成标准**
|
||||
|
||||
- PLM上传完成,文件可访问。
|
||||
- 成功根据3笔以上到货数据生成入库单。
|
||||
- 生产计划数据库变更执行成功,索引有效。
|
||||
- 生产计划前端能正确展示并修改优先级。
|
||||
- 上线后2小时无P0/P1级Bug。
|
||||
|
||||
<br />
|
||||
|
||||
243
生产计划SQL开发文档.md
Normal file
243
生产计划SQL开发文档.md
Normal file
@@ -0,0 +1,243 @@
|
||||
# **车间生产管理SQL开发 - 逐步构建生产计划视图与存储过程**
|
||||
|
||||
## **1. 原始需求与基础查询**
|
||||
|
||||
**目标**:从多个关联表中查询生产数据,并逐步添加计算字段。
|
||||
|
||||
### **1.1 基础数据源**
|
||||
|
||||
涉及三张核心表和视图:
|
||||
|
||||
- `车间生产管理_零件工序_视图`:包含订单号、产品名称、零件名称、工序、数量等。
|
||||
- `车间生产管理工艺_零件工序_任务分配`:包含工序流水号、计划数量、加工数量、计划日期等。
|
||||
- `基础数据_设备工位点检表`:包含设备流水号、工位号、设备名称。
|
||||
|
||||
### **1.2 初始联接查询**
|
||||
|
||||
通过 `工序流水号` 和 `设备流水号` 联接上述三张表。
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
SELECT dbo.车间生产管理_零件工序_视图.订单号,
|
||||
dbo.车间生产管理_零件工序_视图.产品名称,
|
||||
-- ... 其他字段
|
||||
dbo.基础数据_设备工位点检表.工位号 + N':' + dbo.基础数据_设备工位点检表.设备名称 AS 设备,
|
||||
dbo.车间生产管理_零件工序_视图.数量 AS 订单数,
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.数量 AS 计划数
|
||||
-- ... 其他字段
|
||||
FROM dbo.车间生产管理工艺_零件工序_任务分配
|
||||
INNER JOIN dbo.车间生产管理_零件工序_视图 ON dbo.车间生产管理工艺_零件工序_任务分配.工序流水号 = dbo.车间生产管理_零件工序_视图.工序流水号
|
||||
INNER JOIN dbo.基础数据_设备工位点检表 ON dbo.车间生产管理工艺_零件工序_任务分配.设备流水号 = dbo.基础数据_设备工位点检表.设备流水号
|
||||
```
|
||||
|
||||
## **2. 逐步新增计算字段**
|
||||
|
||||
在基础查询上,根据业务需求分步添加了三个计算字段。
|
||||
|
||||
### **2.1 新增 `状态` 字段**
|
||||
|
||||
**需求**:根据加工数量与计划数量的对比,判断订单状态为“派工中”、“生产中”或“已完成”。
|
||||
|
||||
**逻辑**:
|
||||
|
||||
- **已完成**:加工数量 >= 计划数量
|
||||
- **生产中**:0 < 加工数量 < 计划数量
|
||||
- **派工中**:加工数量 = 0 或 NULL
|
||||
|
||||
**SQL 片段**:
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
CASE
|
||||
WHEN ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) >= dbo.车间生产管理工艺_零件工序_任务分配.数量
|
||||
THEN '已完成'
|
||||
WHEN ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) > 0
|
||||
AND ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) < dbo.车间生产管理工艺_零件工序_任务分配.数量
|
||||
THEN '生产中'
|
||||
ELSE '派工中'
|
||||
END AS 状态
|
||||
```
|
||||
|
||||
### **2.2 新增 `完成率` 字段**
|
||||
|
||||
**需求**:计算完成率 = (加工数量 / 计划数量) × 100%。
|
||||
|
||||
**SQL 片段**:
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
CASE
|
||||
WHEN ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.数量, 0) = 0 THEN '0%'
|
||||
ELSE CAST(ROUND(ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) * 100.0 /
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.数量, 2) AS DECIMAL(10, 2)) + '%'
|
||||
END AS 完成率
|
||||
```
|
||||
|
||||
### **2.3 新增 `投产时间` 字段**
|
||||
|
||||
**需求**:从 `车间生产管理工艺_零件工艺计划` 表获取 `分配日期`,作为投产时间。
|
||||
|
||||
**实现**:需要 `LEFT JOIN` 新表,通过 `工艺计划流水号` 关联。
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
-- 新增的 JOIN
|
||||
LEFT OUTER JOIN dbo.车间生产管理工艺_零件工艺计划
|
||||
ON dbo.车间生产管理_零件工序_视图.工艺计划流水号 = dbo.车间生产管理工艺_零件工艺计划.工艺计划流水号
|
||||
|
||||
-- 新增字段
|
||||
CONVERT(varchar(10), dbo.车间生产管理工艺_零件工艺计划.分配日期, 23) AS 投产时间
|
||||
```
|
||||
|
||||
## **3. 创建生产计划视图 (`车间生产管理_生产计划_视图_新`)**
|
||||
|
||||
将上述所有逻辑整合,创建了一个名为 `车间生产管理_生产计划_视图_新` 的视图。
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
CREATE VIEW dbo.车间生产管理_生产计划_视图_新 AS
|
||||
SELECT dbo.车间生产管理_零件工序_视图.订单号,
|
||||
dbo.车间生产管理_零件工序_视图.产品名称,
|
||||
dbo.车间生产管理_零件工序_视图.零件名称,
|
||||
dbo.车间生产管理_零件工序_视图.工序,
|
||||
dbo.基础数据_设备工位点检表.工位号 + N':' + dbo.基础数据_设备工位点检表.设备名称 AS 设备,
|
||||
dbo.车间生产管理_零件工序_视图.数量 AS 订单数,
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.数量 AS 计划数,
|
||||
CONVERT(varchar(10), dbo.车间生产管理工艺_零件工序_任务分配.计划完成日期, 23) AS 计划完成日期,
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.数量 - dbo.车间生产管理工艺_零件工序_任务分配.加工数量 AS 剩余数,
|
||||
dbo.车间生产管理_零件工序_视图.零件图号,
|
||||
dbo.车间生产管理_零件工序_视图.工序顺序,
|
||||
CONVERT(varchar(10), dbo.车间生产管理工艺_零件工序_任务分配.计划开始日期, 23) AS 计划开始日期,
|
||||
dbo.基础数据_设备工位点检表.设备名称,
|
||||
-- 状态字段
|
||||
CASE
|
||||
WHEN ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) >= dbo.车间生产管理工艺_零件工序_任务分配.数量
|
||||
THEN '已完成'
|
||||
WHEN ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) > 0
|
||||
AND ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) < dbo.车间生产管理工艺_零件工序_任务分配.数量
|
||||
THEN '生产中'
|
||||
ELSE '派工中'
|
||||
END AS 状态,
|
||||
-- 完成率字段
|
||||
CASE
|
||||
WHEN ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.数量, 0) = 0 THEN '0%'
|
||||
ELSE CAST(ROUND(ISNULL(dbo.车间生产管理工艺_零件工序_任务分配.加工数量, 0) * 100.0 /
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.数量, 2) AS DECIMAL(10, 2)) + '%'
|
||||
END AS 完成率,
|
||||
CONVERT(varchar(10), dbo.车间生产管理工艺_零件工艺计划.分配日期, 23) AS 投产时间,
|
||||
dbo.车间生产管理_零件工序_视图.精工期限
|
||||
FROM dbo.车间生产管理工艺_零件工序_任务分配
|
||||
INNER JOIN dbo.车间生产管理_零件工序_视图
|
||||
ON dbo.车间生产管理工艺_零件工序_任务分配.工序流水号 = dbo.车间生产管理_零件工序_视图.工序流水号
|
||||
INNER JOIN dbo.基础数据_设备工位点检表
|
||||
ON dbo.车间生产管理工艺_零件工序_任务分配.设备流水号 = dbo.基础数据_设备工位点检表.设备流水号
|
||||
LEFT OUTER JOIN dbo.车间生产管理工艺_零件工艺计划
|
||||
ON dbo.车间生产管理_零件工序_视图.工艺计划流水号 = dbo.车间生产管理工艺_零件工艺计划.工艺计划流水号
|
||||
```
|
||||
|
||||
### **4. 视图创建后的关键Bug与修复**
|
||||
|
||||
#### **4.1 Bug #1:查询视图时“varchar转换为numeric”错误**
|
||||
|
||||
**原因**:在计算`完成率`字段时,错误地将数字(DECIMAL)与字符串('%')直接拼接,SQL Server无法自动处理类型转换。\
|
||||
**修复**:将计算得到的数字显式转换为字符串(VARCHAR)后再拼接。
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
-- 错误写法
|
||||
CAST(... AS DECIMAL(10, 2)) + '%'
|
||||
|
||||
-- 正确写法
|
||||
CAST(CAST(... AS DECIMAL(10, 2)) AS VARCHAR(20)) + '%'
|
||||
```
|
||||
|
||||
#### **4.2 Bug #2:存储过程中“列名‘年份’无效”和“modulo运算符不兼容”**
|
||||
|
||||
**原因**:
|
||||
|
||||
1. 最初假设视图包含`年份`和`月份`字段,但实际视图不包含,导致筛选失败。
|
||||
2. 动态SQL中拼接`LIKE`子句时,单引号处理混乱,导致SQL Server将部分字符串和`%`误解析为模运算。
|
||||
|
||||
**最终修复**:
|
||||
|
||||
1. **利用已有字段筛选**:使用视图中的`投产时间`字段进行模糊匹配。
|
||||
|
||||
sql
|
||||
```
|
||||
-- 动态SQL中的WHERE部分
|
||||
WHERE (投产时间 like @月份 + '-%' or 计划完成日期 like @月份 + '-%')
|
||||
```
|
||||
2. **正确拼接动态SQL**:确保参数化查询,避免字符串拼接错误。
|
||||
|
||||
sql
|
||||
```
|
||||
-- 存储过程中正确的拼接和参数传递示例
|
||||
ALTER PROCEDURE [dbo].[车间生产管理_生产计划_查询数据]
|
||||
@月份 nvarchar(50),
|
||||
@零件名称_check bit = null,
|
||||
@零件名称 nvarchar(50) = null,
|
||||
@状态_check bit = null,
|
||||
@状态 nvarchar(50) = null
|
||||
AS
|
||||
BEGIN
|
||||
DECLARE @selectStr NVARCHAR(4000) = 'SELECT * FROM 车间生产管理_生产计划_视图_新 WHERE (投产时间 like @月份 + ''-%'' or 计划完成日期 like @月份 + ''-%'')';
|
||||
|
||||
IF @零件名称_check = 1
|
||||
SET @selectStr = @selectStr + ' AND 零件名称 like ''%'' + @零件名称 + ''%''';
|
||||
|
||||
IF @状态_check = 1
|
||||
SET @selectStr = @selectStr + ' AND 状态 = @状态';
|
||||
|
||||
EXEC sp_executesql @selectStr,
|
||||
N'@月份 nvarchar(50), @零件名称 nvarchar(50), @状态 nvarchar(50)',
|
||||
@月份, @零件_name, @状态;
|
||||
END
|
||||
```
|
||||
|
||||
### **5. 新增 `年` 和 `月` 字段**
|
||||
|
||||
为方便按年月筛选,在最终视图中从`投产时间`(分配日期)中直接提取`年`和`月`两个独立字段。
|
||||
|
||||
**最终视图SQL(含年、月字段)**:
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
SELECT -- ... 其他字段 ...
|
||||
CASE WHEN dbo.车间生产管理工艺_零件工艺计划.分配日期 IS NOT NULL
|
||||
THEN YEAR(dbo.车间生产管理工艺_零件工艺计划.分配日期)
|
||||
ELSE NULL END AS 年,
|
||||
CASE WHEN dbo.车间生产管理工艺_零件工艺计划.分配日期 IS NOT NULL
|
||||
THEN MONTH(dbo.车间生产管理工艺_零件工艺计划.分配日期)
|
||||
ELSE NULL END AS 月
|
||||
FROM -- ... 表联接 ...
|
||||
```
|
||||
|
||||
这样存储过程可直接使用`WHERE 年 = @年 AND 月 = @月`进行筛选,更为高效。
|
||||
|
||||
### **6. 最终调用示例**
|
||||
|
||||
在应用程序中调用存储过程,传入参数。
|
||||
|
||||
json
|
||||
|
||||
```
|
||||
{
|
||||
"合同编号": "",
|
||||
"合同编号_check": 0,
|
||||
"零件名称_check": 0,
|
||||
"零件名称": "",
|
||||
"产品名称_check": 0,
|
||||
"产品名称": "",
|
||||
"状态_check": 0,
|
||||
"状态": "",
|
||||
"月份": "2025-04"
|
||||
}
|
||||
```
|
||||
|
||||
388
生产计划组件开发实施文档.md
Normal file
388
生产计划组件开发实施文档.md
Normal file
@@ -0,0 +1,388 @@
|
||||
# 生产计划组件开发实施文档
|
||||
|
||||
## 1. 业务描述
|
||||
|
||||
### 1.1 业务背景
|
||||
生产计划管理是车间生产管理的核心模块,用于跟踪和监控生产任务的执行情况。该组件需要展示生产计划的详细信息,包括订单号、产品名称、零件名称、工序、设备分配、计划数量、完成日期等关键信息。
|
||||
|
||||
### 1.2 业务目标
|
||||
- 提供生产计划的查询和展示功能
|
||||
- 支持按订单号、零件名称、工序、设备等条件进行筛选
|
||||
- 展示生产进度和完成情况
|
||||
- 支持分页查询
|
||||
|
||||
### 1.3 业务流程
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A[用户进入生产计划页面] --> B[选择查询月份]
|
||||
B --> C[输入筛选条件]
|
||||
C --> D[点击查询按钮]
|
||||
D --> E[调用存储过程查询数据]
|
||||
E --> F[返回查询结果]
|
||||
F --> G[展示生产计划列表]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 2. 技术方案
|
||||
|
||||
### 2.1 技术选型
|
||||
| 分类 | 技术 | 版本 |
|
||||
| :--- | :--- | :--- |
|
||||
| 前端框架 | Vue.js | 2.x |
|
||||
| UI组件库 | Element UI | 2.x |
|
||||
| 构建工具 | Webpack | 4.x |
|
||||
| 后端语言 | C# | .NET Framework |
|
||||
| 数据库 | SQL Server | 2016+ |
|
||||
|
||||
### 2.2 架构设计
|
||||
|
||||
#### 2.2.1 架构分层
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[前端展示层] --> B[API接口层]
|
||||
B --> C[业务逻辑层]
|
||||
C --> D[数据访问层]
|
||||
D --> E[数据库]
|
||||
```
|
||||
|
||||
#### 2.2.2 模块划分
|
||||
| 模块 | 职责 | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| 视图层 | 生产计划列表展示 | Vue组件 |
|
||||
| 数据层 | 数据查询与处理 | API调用 |
|
||||
| 业务层 | 存储过程执行 | SQL存储过程 |
|
||||
| 数据层 | 数据持久化 | 视图与表 |
|
||||
|
||||
---
|
||||
|
||||
## 3. 数据库设计
|
||||
|
||||
### 3.1 涉及的数据库表
|
||||
|
||||
#### 3.1.1 车间生产管理_零件工序_视图
|
||||
| 字段名 | 类型 | 长度 | 说明 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| 零件名称 | nvarchar | 50 | 零件名称 |
|
||||
| 数量 | int | - | 订单数量 |
|
||||
| 工序 | nvarchar | 50 | 工序名称 |
|
||||
| 操作者 | nvarchar | 50 | 操作人员 |
|
||||
| 加工设备 | nvarchar | 100 | 加工设备 |
|
||||
| 材料 | nvarchar | 100 | 使用材料 |
|
||||
| 派工日期 | datetime | - | 派工日期 |
|
||||
| 已完成数 | int | - | 已完成数量 |
|
||||
| 订单号 | nvarchar | 50 | 订单编号 |
|
||||
| 产品名称 | nvarchar | 100 | 产品名称 |
|
||||
| 零件图号 | nvarchar | 50 | 零件图号 |
|
||||
| 工序流水号 | int | - | 工序流水号(主键) |
|
||||
| 工艺计划流水号 | int | - | 工艺计划流水号 |
|
||||
| 质检数 | int | - | 质检数量 |
|
||||
| 不良数 | int | - | 不良数量 |
|
||||
| 工序顺序 | int | - | 工序顺序 |
|
||||
| 工艺要求 | nvarchar | 500 | 工艺要求 |
|
||||
| 工序状态 | nvarchar | 20 | 工序状态 |
|
||||
| 考核状态 | nvarchar | 20 | 考核状态 |
|
||||
| 机床名称 | nvarchar | 50 | 机床名称 |
|
||||
| 工位号 | nvarchar | 20 | 工位号 |
|
||||
| 被派工人员 | nvarchar | 50 | 被派工人员 |
|
||||
| 外协数量 | int | - | 外协数量 |
|
||||
| 到货数量 | int | - | 到货数量 |
|
||||
| 工艺编号 | nvarchar | 50 | 工艺编号 |
|
||||
| 订单流水号 | int | - | 订单流水号 |
|
||||
| 订单类型 | nvarchar | 20 | 订单类型 |
|
||||
| 已分配数 | int | - | 已分配数量 |
|
||||
| 分配数 | int | - | 分配数量 |
|
||||
| 最大分配数 | int | - | 最大分配数量 |
|
||||
| 精工期限 | datetime | - | 精工期限 |
|
||||
| 是否为报废补投件 | bit | - | 是否为报废补投件 |
|
||||
| 代号 | nvarchar | 50 | 代号 |
|
||||
| 定额工时 | decimal | - | 定额工时 |
|
||||
| 准结工时 | decimal | - | 准结工时 |
|
||||
| 物料编码 | nvarchar | 50 | 物料编码 |
|
||||
| 是否加急 | bit | - | 是否加急 |
|
||||
| 计划完成日期 | datetime | - | 计划完成日期 |
|
||||
| 计划开始日期 | datetime | - | 计划开始日期 |
|
||||
|
||||
#### 3.1.2 车间生产管理工艺_零件工序_任务分配
|
||||
| 字段名 | 类型 | 长度 | 说明 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| 工艺任务流水号 | int | - | 主键 |
|
||||
| 工序流水号 | int | - | 关联零件工序视图 |
|
||||
| 数量 | int | - | 计划数量 |
|
||||
| 人员编号 | int | - | 操作人员编号 |
|
||||
| 设备流水号 | int | - | 设备流水号 |
|
||||
| 分配时间 | datetime | - | 分配时间 |
|
||||
| 完工期限 | datetime | - | 完工期限 |
|
||||
| 已领数量 | int | - | 已领数量 |
|
||||
| 加工数量 | int | - | 已加工数量 |
|
||||
| 是否加工中 | bit | - | 是否正在加工 |
|
||||
| 调拨员编号 | int | - | 调拨员编号 |
|
||||
| 计划完成日期 | datetime | - | 计划完成日期 |
|
||||
| 计划开始日期 | datetime | - | 计划开始日期 |
|
||||
|
||||
#### 3.1.3 基础数据_设备工位点检表
|
||||
| 字段名 | 类型 | 长度 | 说明 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| 设备流水号 | int | - | 主键 |
|
||||
| 工位号 | nvarchar | 20 | 工位号 |
|
||||
| 设备名称 | nvarchar | 100 | 设备名称 |
|
||||
|
||||
### 3.2 视图定义
|
||||
|
||||
#### 车间生产管理_生产计划_视图(逻辑视图)
|
||||
该视图为生产计划查询的核心视图,关联以下表:
|
||||
- `车间生产管理工艺_零件工序_任务分配`
|
||||
- `车间生产管理_零件工序_视图`
|
||||
- `基础数据_设备工位点检表`
|
||||
|
||||
**查询逻辑:**
|
||||
```sql
|
||||
SELECT
|
||||
dbo.车间生产管理_零件工序_视图.订单号,
|
||||
dbo.车间生产管理_零件工序_视图.产品名称,
|
||||
dbo.车间生产管理_零件工序_视图.零件名称,
|
||||
dbo.车间生产管理_零件工序_视图.工序,
|
||||
dbo.基础数据_设备工位点检表.工位号 + N':' + dbo.基础数据_设备工位点检表.设备名称 AS 设备,
|
||||
dbo.车间生产管理_零件工序_视图.数量 AS 订单数,
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.数量 AS 计划数,
|
||||
CONVERT(varchar(10), dbo.车间生产管理工艺_零件工序_任务分配.计划完成日期, 23) AS 计划完成日期,
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.数量 - dbo.车间生产管理工艺_零件工序_任务分配.加工数量 AS 剩余数,
|
||||
dbo.车间生产管理_零件工序_视图.零件图号,
|
||||
dbo.车间生产管理_零件工序_视图.工序顺序,
|
||||
CONVERT(varchar(10), dbo.车间生产管理工艺_零件工序_任务分配.计划开始日期, 23) AS 计划开始日期,
|
||||
dbo.基础数据_设备工位点检表.设备名称
|
||||
FROM
|
||||
dbo.车间生产管理工艺_零件工序_任务分配
|
||||
INNER JOIN
|
||||
dbo.车间生产管理_零件工序_视图 ON
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.工序流水号 = dbo.车间生产管理_零件工序_视图.工序流水号
|
||||
INNER JOIN
|
||||
dbo.基础数据_设备工位点检表 ON
|
||||
dbo.车间生产管理工艺_零件工序_任务分配.设备流水号 = dbo.基础数据_设备工位点检表.设备流水号
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. 存储过程设计
|
||||
|
||||
### 4.1 车间生产管理_生产计划_查询数据
|
||||
|
||||
**功能:** 根据筛选条件分页查询生产计划数据
|
||||
|
||||
**参数说明:**
|
||||
|
||||
| 参数名 | 类型 | 长度 | 说明 | 默认值 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| @合同编号_check | bit | - | 是否按合同编号筛选 | null |
|
||||
| @合同编号 | nvarchar | 50 | 合同编号 | null |
|
||||
| @零件名称_check | bit | - | 是否按零件名称筛选 | null |
|
||||
| @零件名称 | nvarchar | 50 | 零件名称 | null |
|
||||
| @工序名称_check | bit | - | 是否按工序名称筛选 | null |
|
||||
| @工序名称 | nvarchar | 50 | 工序名称 | null |
|
||||
| @设备_check | bit | - | 是否按设备筛选 | null |
|
||||
| @设备 | nvarchar | 50 | 设备名称 | null |
|
||||
| @月份 | nvarchar | 50 | 查询月份(格式:yyyy-MM) | - |
|
||||
|
||||
**存储过程代码:**
|
||||
```sql
|
||||
ALTER PROCEDURE [dbo].[车间生产管理_生产计划_查询数据]
|
||||
@合同编号_check bit = null,
|
||||
@合同编号 nvarchar(50) = null,
|
||||
@零件名称_check bit = null,
|
||||
@零件名称 nvarchar(50) = null,
|
||||
@工序名称_check bit = null,
|
||||
@工序名称 nvarchar(50) = null,
|
||||
@设备_check bit = null,
|
||||
@设备 nvarchar(50) = null,
|
||||
@月份 nvarchar(50)
|
||||
AS
|
||||
declare @年 nvarchar(50)
|
||||
declare @月 nvarchar(50)
|
||||
|
||||
select @年 = left(@月份,4)
|
||||
select @月 = SUBSTRING(@月份,CHARINDEX('-',@月份)+1,len(@月份)-charindex('-',@月份))
|
||||
|
||||
declare @selectStr nvarchar(4000)
|
||||
declare @selectStrWhere nvarchar(4000)
|
||||
|
||||
set @selectStr = 'select * from 车间生产管理_生产计划_视图 '
|
||||
|
||||
set @selectStrWhere = 'where 年份=@年 and 月份=@月 '
|
||||
|
||||
if(@零件名称_check = 1)
|
||||
set @selectStrWhere = @selectStrWhere+' and 零件名称+零件图号 like + ''%'' + @零件名称 + ''%'' '
|
||||
if(@合同编号_check = 1)
|
||||
set @selectStrWhere = @selectStrWhere+' and 订单号 like + ''%'' + @合同编号 + ''%'' '
|
||||
if(@工序名称_check = 1)
|
||||
set @selectStrWhere = @selectStrWhere+' and 工序 like + ''%'' + @工序名称 + ''%'' '
|
||||
if(@设备_check = 1)
|
||||
set @selectStrWhere = @selectStrWhere+' and 设备 like + ''%'' + @设备 + ''%'' '
|
||||
|
||||
set @selectStr = @selectStr+@selectStrWhere
|
||||
|
||||
EXEC sp_executesql @selectStr,
|
||||
N'@零件名称 nvarchar(50),@合同编号 nvarchar(50),@工序名称 nvarchar(50),@设备 nvarchar(50),@年 int,@月 int ',
|
||||
@零件名称,@合同编号,@工序名称,@设备,@年,@月
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. 前端组件设计
|
||||
|
||||
### 5.1 组件结构
|
||||
|
||||
**文件路径:** `src/views/SeikoWorkshop/ProductionPlan/index.vue`
|
||||
|
||||
### 5.2 功能模块
|
||||
|
||||
#### 5.2.1 查询区域
|
||||
| 控件 | 类型 | 绑定字段 | 说明 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| 月份选择器 | el-date-picker | monthValue | 选择查询月份(必填) |
|
||||
| 订单编号输入框 | el-input | orderNumberTypeValue | 按订单编号筛选 |
|
||||
| 零件名称输入框 | el-input | partNameValue | 按零件名称或图号筛选 |
|
||||
| 产品名称输入框 | el-input | productNameValue | 按产品名称筛选 |
|
||||
| 状态下拉框 | el-select | statusValue | 按状态筛选(待料/生产中/已完成) |
|
||||
| 查询按钮 | el-button | - | 触发查询 |
|
||||
|
||||
#### 5.2.2 表格展示区域
|
||||
| 列名 | 宽度 | 说明 | 特殊处理 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| 序号 | 50px | 行号 | 固定列 |
|
||||
| 状态 | 60px | 订单状态 | 标签展示,不同状态不同颜色 |
|
||||
| 订单编号 | 140px | 订单编号 | 固定列 |
|
||||
| 收货人 | 80px | 收货人 | 固定列 |
|
||||
| 投产日期 | 80px | 投产日期 | - |
|
||||
| 订单交货日期 | 100px | 订单交货日期 | - |
|
||||
| 数量 | 60px | 订单数量 | - |
|
||||
| 产品名称 | 120px | 产品名称 | - |
|
||||
| 规格型号 | 140px | 规格型号 | - |
|
||||
| 零件名称 | 120px | 零件名称 | - |
|
||||
| 零件图号 | 120px | 零件图号 | - |
|
||||
| 毛坯类型 | 100px | 毛坯类型 | - |
|
||||
| 完成率 | 80px | 完成率 | - |
|
||||
| 当前状态 | 80px | 当前状态 | - |
|
||||
| OP010~OP110 | 60px | 各工序状态 | - |
|
||||
|
||||
#### 5.2.3 分页区域
|
||||
| 功能 | 说明 |
|
||||
| :--- | :--- |
|
||||
| 总条数 | 显示查询结果总数 |
|
||||
| 每页条数选择 | 支持10/20/30/40/100 |
|
||||
| 页码跳转 | 支持上一页/下一页/直接跳转 |
|
||||
|
||||
### 5.3 数据交互流程
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant 前端 as Vue组件
|
||||
participant API as API接口
|
||||
participant 数据库 as SQL Server
|
||||
|
||||
前端->>前端: 用户输入筛选条件
|
||||
前端->>前端: 调用searchTable1()方法
|
||||
前端->>API: 调用CreateData()创建请求参数
|
||||
API->>数据库: 执行存储过程车间生产管理_生产计划_查询数据
|
||||
数据库-->>API: 返回查询结果
|
||||
API-->>前端: 返回response数据
|
||||
前端->>前端: 更新tableData2和total
|
||||
前端->>前端: 渲染表格和分页
|
||||
```
|
||||
|
||||
### 5.4 关键代码说明
|
||||
|
||||
#### 5.4.1 数据参数构造
|
||||
```javascript
|
||||
var param = []
|
||||
param[0] = ['订单编号', this.orderNumberTypeValue]
|
||||
param[1] = ['订单编号_check', orderNumberTypeValue_check]
|
||||
param[2] = ['零件名称_check', partNameValue_check]
|
||||
param[3] = ['零件名称', this.partNameValue]
|
||||
param[4] = ['产品名称_check', productNameValue_check]
|
||||
param[5] = ['产品名称', this.productNameValue]
|
||||
param[6] = ['状态_check', statusValue_check]
|
||||
param[7] = ['状态', this.statusValue]
|
||||
param[8] = ['月份', this.monthValue]
|
||||
```
|
||||
|
||||
#### 5.4.2 数据请求调用
|
||||
```javascript
|
||||
var Data = this.CreateData('11', '车间生产管理_生产计划_查询数据', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. 详细工作步骤
|
||||
|
||||
### 6.1 数据库层开发
|
||||
|
||||
| 步骤 | 任务 | 负责人 | 预计时间 | 状态 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| 1 | 创建/确认视图`车间生产管理_生产计划_视图` | DBA | 1天 | - |
|
||||
| 2 | 创建/更新存储过程`车间生产管理_生产计划_查询数据` | DBA | 0.5天 | - |
|
||||
| 3 | 测试存储过程执行结果 | DBA | 0.5天 | - |
|
||||
|
||||
### 6.2 前端组件开发
|
||||
|
||||
| 步骤 | 任务 | 负责人 | 预计时间 | 状态 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| 1 | 创建查询区域UI(日期选择器、输入框、下拉框) | 前端开发 | 0.5天 | - |
|
||||
| 2 | 创建表格展示区域(列定义、样式、状态标签) | 前端开发 | 1天 | - |
|
||||
| 3 | 实现分页功能(页码切换、条数选择) | 前端开发 | 0.5天 | - |
|
||||
| 4 | 实现数据查询逻辑(参数构造、API调用) | 前端开发 | 1天 | - |
|
||||
| 5 | 联调测试(接口对接、数据展示验证) | 前端开发 | 1天 | - |
|
||||
|
||||
### 6.3 测试与上线
|
||||
|
||||
| 步骤 | 任务 | 负责人 | 预计时间 | 状态 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| 1 | 功能测试(查询、筛选、分页) | 测试人员 | 1天 | - |
|
||||
| 2 | 性能测试(大数据量查询) | 测试人员 | 0.5天 | - |
|
||||
| 3 | Bug修复 | 开发人员 | 0.5天 | - |
|
||||
| 4 | 代码评审 | 技术负责人 | 0.5天 | - |
|
||||
| 5 | 上线部署 | 运维人员 | 0.5天 | - |
|
||||
|
||||
---
|
||||
|
||||
## 7. 注意事项
|
||||
|
||||
### 7.1 数据库注意事项
|
||||
1. 确保视图`车间生产管理_生产计划_视图`包含`年份`和`月份`字段用于筛选
|
||||
2. 存储过程使用动态SQL,需注意SQL注入风险
|
||||
3. 建议对查询结果添加索引优化性能
|
||||
|
||||
### 7.2 前端注意事项
|
||||
1. 月份为必填项,需添加非空校验
|
||||
2. 表格列较多,需设置合理的宽度和滚动
|
||||
3. 状态标签颜色需根据业务需求调整
|
||||
|
||||
### 7.3 安全注意事项
|
||||
1. 输入参数需进行校验和过滤
|
||||
2. 敏感数据需进行脱敏处理
|
||||
3. API调用需携带认证信息
|
||||
|
||||
---
|
||||
|
||||
## 8. 附录
|
||||
|
||||
### 8.1 状态映射表
|
||||
| 状态值 | 显示文本 | 标签类型 |
|
||||
| :--- | :--- | :--- |
|
||||
| 待料 | 待料 | warning |
|
||||
| 生产中 | 生产中 | success |
|
||||
| 已完成 | 已完成 | info |
|
||||
|
||||
### 8.2 日期格式说明
|
||||
- 月份格式:`yyyy-M`(如:2024-01)
|
||||
- 日期格式:`yyyy-MM-dd`(如:2024-01-15)
|
||||
|
||||
### 8.3 文件路径汇总
|
||||
| 文件类型 | 文件路径 |
|
||||
| :--- | :--- |
|
||||
| 前端组件 | `src/views/SeikoWorkshop/ProductionPlan/index.vue` |
|
||||
| API配置 | `src/assets/img/api/ManufacturingCenter/ProductionPlanQuery.js` |
|
||||
| 图标文件 | `src/icons/svg/ProductionPlan.svg` |
|
||||
Reference in New Issue
Block a user