Initial commit: 景耀JY1.0项目

This commit is contained in:
Developer
2026-05-21 09:46:02 +08:00
parent 4969870de8
commit fd70670235
90 changed files with 10278 additions and 1508 deletions

View File

@@ -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="收货人:">

View File

@@ -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 = []

View File

@@ -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 => {

View File

@@ -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>

View File

@@ -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') {

View File

@@ -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
})
},

View File

@@ -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.文件内容)
}
}
})

View File

@@ -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.文件内容)
}
}
})

View File

@@ -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)

View File

@@ -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

View File

@@ -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.订单类型

View File

@@ -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 = []

View 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">&nbsp;&nbsp;&nbsp;&nbsp;{{ 订单编号 }}</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>

View File

@@ -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('已取消处理')
})
}
}
}

View File

@@ -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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;耀&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><span
style="font-size: 14px;">ZHEJIANG JING YAO NUMERICAL CONTROL TECHNOLOGY CO. LTD</span></span>
<span
style="font-size: 19px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;耀&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>

View File

@@ -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">