更新销售合同/提成/业绩、精工工序工价/生产审核/工时统计、仓储盘点/库存/补货/入库/库房管理,新增提成设置/销售业绩/库房管理/入库单移动端等模块及SQL脚本
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
<el-input v-model="LocationName" style="width: 100px " size="small" clearable placeholder="库位"/>
|
||||
<el-button style="margin-left: 7px;width: 80px" type="primary" plain size="small" @click="pageCurrent=1;searchTable()">查询</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-upload2" size="small" style="margin-left: 7px" @click="handleExcel()">导入查询</el-button>
|
||||
<!-- 修改人:Ld 修改时间:2026-07-23 09:02:58; 新增库存盘点导入预校验与批量提交入口。 -->
|
||||
<el-button type="warning" plain icon="el-icon-upload" size="small" style="margin-left: 7px" @click="openInventoryImportDialog()">导入盘点</el-button>
|
||||
<el-button v-if="Number(token) === 2" type="success" plain icon="el-icon-download" size="small" style="margin-left: 7px" @click="exportExcel()">导出</el-button>
|
||||
<el-button type="distribution" size="small" @click="addMaterial()">增加物料存货</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" style="margin-left: 20px" plain size="small" @click="Pronters()">批量打印</el-button>
|
||||
@@ -181,6 +183,48 @@
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="importExcelSearch">查询</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改人:Ld 修改时间:2026-07-23 09:02:58; 导入盘点变化信息展示和确认提交弹窗。 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisibleInventoryImport"
|
||||
title="导入盘点"
|
||||
center
|
||||
width="1280px">
|
||||
<upload-excel-component @on-selected-file="selectedInventoryImport"/>
|
||||
<div style="margin: 10px 0 0 45px">
|
||||
<span v-show="inventoryImportWorksheet.length > 1" style="cursor: pointer;width: 50px;" @click="removeAllInventoryImport"><i class="el-icon-close"/></span>
|
||||
<el-upload :on-remove="handleRemoveInventoryImport" :file-list="inventoryImportItemFile" style="width: 260px" action=""/>
|
||||
</div>
|
||||
<div style="margin: 12px 0">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="previewInventoryImport">预校验</el-button>
|
||||
<el-button
|
||||
:loading="inventoryImportSubmitting"
|
||||
:disabled="inventoryImportData.length === 0"
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitInventoryImport">提交盘点</el-button>
|
||||
<span style="margin-left: 12px;font-size: 13px;color: #606266">{{ inventoryImportSummary }}</span>
|
||||
</div>
|
||||
<el-table :data="inventoryImportData" border stripe size="mini" height="450px">
|
||||
<el-table-column prop="导入序号" label="行号" width="60px" align="center"/>
|
||||
<el-table-column prop="物料编码" label="物料编号" width="130px" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="物料名称" label="物料名称" width="160px" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="图号或型号" label="图号型号" width="150px" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="原货位名称" label="原库位" width="100px" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="调整后库位" label="调整后库位" width="120px" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="原库存" label="原库存" width="90px" align="center"/>
|
||||
<el-table-column prop="导入库存" label="导入库存" width="90px" align="center"/>
|
||||
<el-table-column prop="盘点库存" label="盘点库存" width="90px" align="center"/>
|
||||
<el-table-column prop="库存变化" label="库存变化" width="90px" align="center"/>
|
||||
<el-table-column prop="库位变化" label="库位变化" width="80px" align="center"/>
|
||||
<el-table-column prop="处理结果" label="处理结果" width="100px" align="center"/>
|
||||
<el-table-column prop="错误原因" label="错误原因" align="center" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisibleInventoryImport=false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="transferDialogVisible" title="库存调拨" center width="520px">
|
||||
<el-form label-position="left" label-width="100px" style="margin: auto">
|
||||
<el-row>
|
||||
@@ -329,6 +373,13 @@ export default {
|
||||
multipleSelection: [],
|
||||
itemFile: [],
|
||||
worksheet: [],
|
||||
// 修改人:Ld 修改时间:2026-07-23 09:02:58; 导入盘点独立缓存,避免影响原导入查询功能。
|
||||
dialogFormVisibleInventoryImport: false,
|
||||
inventoryImportItemFile: [],
|
||||
inventoryImportWorksheet: [],
|
||||
inventoryImportData: [],
|
||||
inventoryImportDetailChunks: [],
|
||||
inventoryImportSubmitting: false,
|
||||
rules: {
|
||||
入库数: [{ required: true, message: '请输入入库数' }],
|
||||
产品名称: [{ required: true, message: '请选择产品名称' }]
|
||||
@@ -351,7 +402,33 @@ export default {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
]),
|
||||
inventoryImportSummary() {
|
||||
var total = this.inventoryImportData.length
|
||||
var success = 0
|
||||
var fail = 0
|
||||
var needCreate = 0
|
||||
var stockChange = 0
|
||||
var locationChange = 0
|
||||
for (let i = 0; i < this.inventoryImportData.length; i++) {
|
||||
var row = this.inventoryImportData[i]
|
||||
if (row.处理结果 === '可修改' || row.处理结果 === '修改成功' || row.处理结果 === '成功' || row.处理结果 === '需新建库位') {
|
||||
success++
|
||||
} else if (row.处理结果) {
|
||||
fail++
|
||||
}
|
||||
if (row.处理结果 === '需新建库位') {
|
||||
needCreate++
|
||||
}
|
||||
if (row.库存变化 === '是') {
|
||||
stockChange++
|
||||
}
|
||||
if (row.库位变化 === '是') {
|
||||
locationChange++
|
||||
}
|
||||
}
|
||||
return '总行数:' + total + ' 成功:' + success + ' 失败:' + fail + ' 需新建库位:' + needCreate + ' 库存变化:' + stockChange + ' 库位变化:' + locationChange
|
||||
}
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
@@ -501,6 +578,254 @@ export default {
|
||||
handleExcel() {
|
||||
this.dialogFormVisibleExcel = true
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-07-23 09:02:58; 打开导入盘点弹窗并保留上次预览结果供复核。
|
||||
openInventoryImportDialog() {
|
||||
this.dialogFormVisibleInventoryImport = true
|
||||
},
|
||||
selectedInventoryImport(data) {
|
||||
this.inventoryImportWorksheet = data.worksheet
|
||||
this.inventoryImportItemFile = data.itemFile
|
||||
this.inventoryImportData = []
|
||||
this.inventoryImportDetailChunks = []
|
||||
},
|
||||
handleRemoveInventoryImport(file) {
|
||||
for (let i = 0; i < this.inventoryImportItemFile.length; i++) {
|
||||
if (this.inventoryImportItemFile[i].name === file.name) {
|
||||
this.inventoryImportWorksheet.splice(i, 1)
|
||||
this.inventoryImportItemFile.splice(i, 1)
|
||||
}
|
||||
}
|
||||
this.inventoryImportData = []
|
||||
this.inventoryImportDetailChunks = []
|
||||
},
|
||||
removeAllInventoryImport() {
|
||||
this.inventoryImportWorksheet = []
|
||||
this.inventoryImportItemFile = []
|
||||
this.inventoryImportData = []
|
||||
this.inventoryImportDetailChunks = []
|
||||
},
|
||||
getInventoryImportColumns(sheet) {
|
||||
var cols = [
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
|
||||
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
|
||||
]
|
||||
var result = {
|
||||
headerRow: 1,
|
||||
codeCol: '',
|
||||
nameCol: '',
|
||||
drawingCol: '',
|
||||
locationCol: '',
|
||||
stockCol: '',
|
||||
checkStockCol: '',
|
||||
remarkCol: ''
|
||||
}
|
||||
for (let row = 1; row <= 10; row++) {
|
||||
var temp = {
|
||||
headerRow: row,
|
||||
codeCol: '',
|
||||
nameCol: '',
|
||||
drawingCol: '',
|
||||
locationCol: '',
|
||||
stockCol: '',
|
||||
checkStockCol: '',
|
||||
remarkCol: ''
|
||||
}
|
||||
for (let i = 0; i < cols.length; i++) {
|
||||
var title = this.getExcelCellValue(sheet, cols[i], row).replace(/\s/g, '')
|
||||
if (title === '物料编号' || title === '物料编码') {
|
||||
temp.codeCol = cols[i]
|
||||
}
|
||||
if (title === '物料名称' || title === '名称' || title === '零件名称') {
|
||||
temp.nameCol = cols[i]
|
||||
}
|
||||
if (title === '图号型号' || title === '图号' || title === '图号或型号' || title === '图号/型号' || title === '规格型号') {
|
||||
temp.drawingCol = cols[i]
|
||||
}
|
||||
if (title === '调整后库位' || title === '库位') {
|
||||
temp.locationCol = cols[i]
|
||||
}
|
||||
if (title === '库存' || title === '库存数') {
|
||||
temp.stockCol = cols[i]
|
||||
}
|
||||
if (title === '盘点库存') {
|
||||
temp.checkStockCol = cols[i]
|
||||
}
|
||||
if (title === '备注') {
|
||||
temp.remarkCol = cols[i]
|
||||
}
|
||||
}
|
||||
if ((temp.codeCol || temp.nameCol || temp.drawingCol) && temp.locationCol && temp.stockCol) {
|
||||
return temp
|
||||
}
|
||||
if (temp.codeCol || temp.nameCol || temp.drawingCol || temp.locationCol || temp.stockCol) {
|
||||
result = temp
|
||||
}
|
||||
}
|
||||
return result
|
||||
},
|
||||
getInventoryImportNumber(value) {
|
||||
var number = Number(String(value || '').replace(/,/g, ''))
|
||||
if (isNaN(number)) {
|
||||
return 0
|
||||
}
|
||||
return number
|
||||
},
|
||||
getInventoryImportDetail() {
|
||||
var detail = []
|
||||
for (let j = 0; j < this.inventoryImportWorksheet.length; j++) {
|
||||
var sheet = this.inventoryImportWorksheet[j]
|
||||
var columns = this.getInventoryImportColumns(sheet)
|
||||
var emptyCount = 0
|
||||
for (let row = columns.headerRow + 1; row <= 6000; row++) {
|
||||
var materialCode = columns.codeCol ? this.getExcelCellValue(sheet, columns.codeCol, row) : ''
|
||||
var materialName = columns.nameCol ? this.getExcelCellValue(sheet, columns.nameCol, row) : ''
|
||||
var drawing = columns.drawingCol ? this.getExcelCellValue(sheet, columns.drawingCol, row) : ''
|
||||
var location = columns.locationCol ? this.getExcelCellValue(sheet, columns.locationCol, row) : ''
|
||||
var stockText = columns.stockCol ? this.getExcelCellValue(sheet, columns.stockCol, row) : ''
|
||||
var checkStockText = columns.checkStockCol ? this.getExcelCellValue(sheet, columns.checkStockCol, row) : ''
|
||||
var remark = columns.remarkCol ? this.getExcelCellValue(sheet, columns.remarkCol, row) : ''
|
||||
if (!materialCode && !materialName && !drawing && !location && !stockText) {
|
||||
emptyCount++
|
||||
if (emptyCount >= 30) {
|
||||
break
|
||||
}
|
||||
continue
|
||||
}
|
||||
emptyCount = 0
|
||||
detail.push({
|
||||
导入序号: row,
|
||||
物料编码: materialCode,
|
||||
物料名称: materialName,
|
||||
图号或型号: drawing,
|
||||
调整后库位: location,
|
||||
库存: this.getInventoryImportNumber(stockText),
|
||||
盘点库存: this.getInventoryImportNumber(checkStockText),
|
||||
备注: remark
|
||||
})
|
||||
}
|
||||
}
|
||||
return detail
|
||||
},
|
||||
getInventoryImportBestDetail(detail) {
|
||||
var detailMap = {}
|
||||
var result = []
|
||||
for (let i = 0; i < detail.length; i++) {
|
||||
var row = detail[i]
|
||||
var code = String(row.物料编码 || '').trim()
|
||||
var name = String(row.物料名称 || '').trim()
|
||||
var drawing = String(row.图号或型号 || '').trim()
|
||||
var key = code ? 'code:' + code : 'name:' + name + '^' + drawing
|
||||
if (!detailMap[key]) {
|
||||
detailMap[key] = row
|
||||
result.push(row)
|
||||
continue
|
||||
}
|
||||
if (Number(row.库存 || 0) > Number(detailMap[key].库存 || 0)) {
|
||||
var index = result.indexOf(detailMap[key])
|
||||
detailMap[key] = row
|
||||
if (index >= 0) {
|
||||
result.splice(index, 1, row)
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
},
|
||||
buildInventoryImportDetailChunks(detail) {
|
||||
var chunks = []
|
||||
var rows = []
|
||||
for (let i = 0; i < detail.length; i++) {
|
||||
rows.push(this.formatInventoryImportRow(detail[i]))
|
||||
if (rows.length >= 500) {
|
||||
chunks.push(rows.join('||'))
|
||||
rows = []
|
||||
}
|
||||
}
|
||||
if (rows.length > 0) {
|
||||
chunks.push(rows.join('||'))
|
||||
}
|
||||
return chunks
|
||||
},
|
||||
formatInventoryImportRow(row) {
|
||||
var values = [
|
||||
row.导入序号,
|
||||
row.物料编码,
|
||||
row.物料名称,
|
||||
row.图号或型号,
|
||||
row.调整后库位,
|
||||
row.库存,
|
||||
row.盘点库存,
|
||||
row.备注
|
||||
]
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
values[i] = String(values[i] === undefined || values[i] === null ? '' : values[i]).replace(/\|\|/g, ' ').replace(/\^/g, ' ')
|
||||
}
|
||||
return values.join('^')
|
||||
},
|
||||
requestInventoryImportPreview(index, result) {
|
||||
if (index >= this.inventoryImportDetailChunks.length) {
|
||||
this.inventoryImportData = result
|
||||
this.$message.success('导入盘点预校验完成')
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['导入明细', this.inventoryImportDetailChunks[index]]
|
||||
var Data = this.CreateData('11', '仓储管理_库存盘点_导入盘点_预校验', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
var rows = response.data.rows || response.data || []
|
||||
result = result.concat(rows)
|
||||
this.requestInventoryImportPreview(index + 1, result)
|
||||
}).catch(() => {
|
||||
this.$message.error('导入盘点预校验失败')
|
||||
})
|
||||
},
|
||||
previewInventoryImport() {
|
||||
var detail = this.getInventoryImportDetail()
|
||||
detail = this.getInventoryImportBestDetail(detail)
|
||||
if (detail.length === 0) {
|
||||
this.$message.warning('请导入包含物料编号、调整后库位和库存的表格')
|
||||
return
|
||||
}
|
||||
this.inventoryImportData = []
|
||||
this.inventoryImportDetailChunks = this.buildInventoryImportDetailChunks(detail)
|
||||
this.requestInventoryImportPreview(0, [])
|
||||
},
|
||||
requestInventoryImportSubmit(index, result) {
|
||||
if (index >= this.inventoryImportDetailChunks.length) {
|
||||
this.inventoryImportData = result
|
||||
this.inventoryImportSubmitting = false
|
||||
this.getLocateName()
|
||||
this.searchTable()
|
||||
this.$message.success('导入盘点提交完成')
|
||||
return
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['导入明细', this.inventoryImportDetailChunks[index]]
|
||||
param[1] = ['操作者', this.id]
|
||||
var Data = this.CreateData('12', '仓储管理_库存盘点_导入盘点_批量提交', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
var rows = response.data.rows || response.data || []
|
||||
result = result.concat(rows)
|
||||
this.requestInventoryImportSubmit(index + 1, result)
|
||||
}).catch(() => {
|
||||
this.inventoryImportSubmitting = false
|
||||
this.$message.error('导入盘点提交失败')
|
||||
})
|
||||
},
|
||||
submitInventoryImport() {
|
||||
if (this.inventoryImportDetailChunks.length === 0) {
|
||||
this.$message.warning('请先预校验导入盘点数据')
|
||||
return
|
||||
}
|
||||
this.$confirm('确认按预校验数据修改库存和库位吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.inventoryImportSubmitting = true
|
||||
this.requestInventoryImportSubmit(0, [])
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
selected(data) {
|
||||
this.worksheet = data.worksheet
|
||||
this.itemFile = data.itemFile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px ;display:flex">
|
||||
<el-col style="width: 930px">
|
||||
@@ -7,6 +7,8 @@
|
||||
<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="disabled" type="distribution" icon="el-icon-check" size="small" @click="openOrder()">提交补货</el-button>
|
||||
<!-- 修改人:Ld 修改时间:2026-08-03 16:35:25; 新增关联合同补货入口,原提交补货按钮不变。 -->
|
||||
<el-button :disabled="disabled" type="warning" plain icon="el-icon-connection" size="small" @click="openLinkedOrder()">关联合同补货</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>
|
||||
@@ -68,7 +70,8 @@
|
||||
width="400"
|
||||
trigger="click"
|
||||
@show="getDemandDetail(scope.row)">
|
||||
<el-table :data="demandDetailData" border stripe size="mini" max-height="300" v-loading="demandDetailLoading">
|
||||
<!-- 修改人:Ld 修改时间:2026-08-03 16:44:10; 调整属性顺序以通过单文件模板校验。 -->
|
||||
<el-table v-loading="demandDetailLoading" :data="demandDetailData" border stripe size="mini" max-height="300">
|
||||
<el-table-column prop="订单编号" label="订单号" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="最终需求量" label="需求量" align="center"/>
|
||||
<el-table-column prop="简称" label="客户" align="center"/>
|
||||
@@ -207,6 +210,84 @@
|
||||
<el-button type="primary" @click="submitOrder()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改人:Ld 修改时间:2026-08-03 16:35:25; 新增合同缺件/仓库备货补货来源弹窗。 -->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleLink" title="关联合同补货" center width="760px">
|
||||
<el-form label-position="right" label-width="95px" size="small">
|
||||
<el-form-item label="补货来源">
|
||||
<el-radio-group v-model="linkForm.来源类型" @change="changeLinkSource">
|
||||
<el-radio-button label="合同缺件">合同零件不足</el-radio-button>
|
||||
<el-radio-button label="仓库备货">仓库备货</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="linkForm.来源类型 === '合同缺件'" label="合同查询">
|
||||
<el-input v-model="linkForm.关键字" clearable placeholder="合同编号 / 客户 / 订单编号" style="width: 360px" @keyup.enter.native="searchLinkContract"/>
|
||||
<el-button type="primary" plain icon="el-icon-search" style="margin-left: 8px" @click="searchLinkContract">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="linkForm.来源类型 === '合同缺件'" label="查询结果">
|
||||
<el-table
|
||||
v-loading="linkContractLoading"
|
||||
:data="linkContractList"
|
||||
border
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
max-height="220"
|
||||
style="width: 620px"
|
||||
@row-click="selectLinkContract">
|
||||
<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="150px" label="客户" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 || scope.row.客户简称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="订单编号" align="center" show-overflow-tooltip>
|
||||
<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>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="linkForm.来源类型 === '合同缺件'" label="已选择">
|
||||
<el-tag v-if="linkForm.项目流水号" type="success">
|
||||
{{ linkForm.合同编号 }} / {{ linkForm.客户名称 }} / {{ linkForm.订单编号 || '未选订单' }}
|
||||
</el-tag>
|
||||
<span v-else style="color: #909399">请选择要关联的销售合同或订单</span>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="linkForm.来源类型 === '仓库备货'" label="备货合同">
|
||||
<!-- 修改人:Ld 修改时间:2026-08-04 08:29:13; 仓库备货改为提交时自动生成CKBH前缀合同。 -->
|
||||
<el-tag type="warning">自动生成CKBH合同</el-tag>
|
||||
<span style="margin-left: 10px;color: #909399">提交后生成独立仓库备货合同,收货人为仓库、单价为0</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="补货期限">
|
||||
<el-date-picker
|
||||
v-model="linkForm.补货期限"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
style="width: 220px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单备注">
|
||||
<el-input
|
||||
:rows="3"
|
||||
v-model="linkForm.订单备注"
|
||||
type="textarea"
|
||||
placeholder="请输入补货原因或备货说明"
|
||||
style="width: 520px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisibleLink=false">取 消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitLinkedOrder">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" title="上传图片" center style="height: 800px" width="30%">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
@@ -319,6 +400,21 @@ export default {
|
||||
pageSize: 20, // 分页每页显示条数
|
||||
orderName: '', // 排序列名
|
||||
order: '', // 排序方式
|
||||
// 修改人:Ld 修改时间:2026-08-03 16:35:25; 关联合同补货弹窗数据,独立于原补货提交。
|
||||
dialogFormVisibleLink: false,
|
||||
linkContractLoading: false,
|
||||
linkContractList: [],
|
||||
linkForm: {
|
||||
来源类型: '合同缺件',
|
||||
关键字: '',
|
||||
项目流水号: '',
|
||||
订单流水号: '',
|
||||
合同编号: '',
|
||||
客户名称: '',
|
||||
订单编号: '',
|
||||
补货期限: '',
|
||||
订单备注: ''
|
||||
},
|
||||
demandDetailData: [],
|
||||
demandDetailLoading: false
|
||||
}
|
||||
@@ -456,6 +552,67 @@ export default {
|
||||
this.finishTime = ''
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-08-03 16:35:25; 打开关联合同补货弹窗,不影响原 openOrder。
|
||||
openLinkedOrder() {
|
||||
this.resetLinkForm()
|
||||
this.dialogFormVisibleLink = true
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-08-03 16:35:25; 重置关联合同补货表单。
|
||||
resetLinkForm() {
|
||||
this.linkContractList = []
|
||||
this.linkContractLoading = false
|
||||
this.linkForm = {
|
||||
来源类型: '合同缺件',
|
||||
关键字: '',
|
||||
项目流水号: '',
|
||||
订单流水号: '',
|
||||
合同编号: '',
|
||||
客户名称: '',
|
||||
订单编号: '',
|
||||
补货期限: '',
|
||||
订单备注: ''
|
||||
}
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-08-03 16:35:25; 切换补货来源时清理已选择合同。
|
||||
changeLinkSource() {
|
||||
this.linkContractList = []
|
||||
this.linkForm.关键字 = ''
|
||||
this.linkForm.项目流水号 = ''
|
||||
this.linkForm.订单流水号 = ''
|
||||
this.linkForm.合同编号 = ''
|
||||
this.linkForm.客户名称 = ''
|
||||
this.linkForm.订单编号 = ''
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-08-03 16:35:25; 查询可关联销售合同/订单。
|
||||
searchLinkContract() {
|
||||
this.linkContractLoading = true
|
||||
var param = []
|
||||
// 修改人:Ld 修改时间:2026-08-03 17:01:30; 后端通用入口按过程参数解析,查询过程入参全部传递,避免返回 result=0。
|
||||
param[0] = ['关键字', this.linkForm.关键字]
|
||||
param[1] = ['合同编号', '']
|
||||
param[2] = ['客户', '']
|
||||
param[3] = ['订单编号', '']
|
||||
var Data = this.CreateData('11', '仓储管理_补货关联合同_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0] && response.data[0].result === '0') {
|
||||
this.linkContractList = []
|
||||
this.$message.error('合同查询失败,请确认当前为测试环境')
|
||||
} else {
|
||||
this.linkContractList = response.data
|
||||
}
|
||||
this.linkContractLoading = false
|
||||
}).catch(() => {
|
||||
this.linkContractLoading = false
|
||||
})
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-08-03 16:35:25; 选择补货要挂靠的销售合同/订单。
|
||||
selectLinkContract(row) {
|
||||
this.linkForm.项目流水号 = row.项目流水号
|
||||
this.linkForm.订单流水号 = row.订单流水号 || ''
|
||||
this.linkForm.合同编号 = row.合同编号 || ''
|
||||
this.linkForm.客户名称 = row.客户名称 || row.客户简称 || ''
|
||||
this.linkForm.订单编号 = row.订单编号 || ''
|
||||
},
|
||||
handlePicture(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.replenishmentOrderId = row.补货单明细中间表流水号
|
||||
@@ -498,6 +655,41 @@ export default {
|
||||
this.$message.warning('请选择补货期限')
|
||||
}
|
||||
},
|
||||
// 修改人:Ld 修改时间:2026-08-03 16:35:25; 提交带合同/仓库备货来源的补货单,原 submitOrder 不变。
|
||||
submitLinkedOrder() {
|
||||
if (this.linkForm.来源类型 === '合同缺件' && !this.linkForm.项目流水号) {
|
||||
this.$message.warning('请选择关联销售合同')
|
||||
return
|
||||
}
|
||||
if (!this.linkForm.补货期限) {
|
||||
this.$message.warning('请选择补货期限')
|
||||
return
|
||||
}
|
||||
if (this.linkForm.来源类型 === '仓库备货' && !this.linkForm.订单备注) {
|
||||
this.$message.warning('请填写仓库备货说明')
|
||||
return
|
||||
}
|
||||
let check
|
||||
this.checked ? check = 0 : check = 1
|
||||
var param = []
|
||||
param[0] = ['是否外购', check]
|
||||
param[1] = ['操作者', this.id]
|
||||
param[2] = ['补货期限', this.linkForm.补货期限]
|
||||
param[3] = ['订单备注', this.linkForm.订单备注]
|
||||
param[4] = ['来源类型', this.linkForm.来源类型]
|
||||
param[5] = ['项目流水号', this.linkForm.项目流水号 || 0]
|
||||
param[6] = ['订单流水号', this.linkForm.订单流水号 || 0]
|
||||
var Data = this.CreateData('12', '报缺补货_提交_关联合同', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('提交成功')
|
||||
this.dialogFormVisibleLink = false
|
||||
this.updateCheck()
|
||||
} else {
|
||||
this.$message.error(response.data[0].message || '提交失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
selectIn(row) {
|
||||
if (row.补货数 !== 0 && row.补货数 !== undefined) {
|
||||
let check
|
||||
|
||||
1296
src/views/WarehouseManagement/WarehouseRoomManagement/index.vue
Normal file
1296
src/views/WarehouseManagement/WarehouseRoomManagement/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -139,7 +139,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 立库可视化区域 -->
|
||||
<div v-loading="loading" style="height: 600px; overflow: auto; border: 1px solid #e4e7ed; border-radius: 4px; padding: 15px; background: #f5f7fa">
|
||||
<div v-loading="loading" style="height: 600px; overflow:hidden; border: 1px solid #e4e7ed; border-radius: 4px; padding: 15px; background: #f5f7fa">
|
||||
<!-- 数据为空提示 -->
|
||||
<div v-if="warehouseData.length === 0" style="text-align: center; padding: 100px; color: #909399">
|
||||
<!-- <el-empty description="暂无立库数据">
|
||||
@@ -155,7 +155,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 立库表格 -->
|
||||
<div style="overflow-x: auto; margin-bottom: 30px">
|
||||
<div style=" margin-bottom: 30px">
|
||||
<table class="warehouse-table">
|
||||
<!-- 列标题 -->
|
||||
<thead>
|
||||
|
||||
@@ -642,11 +642,11 @@ export default {
|
||||
if (this.multipleSelection.length !== 1) {
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (i === 0) {
|
||||
time = this.multipleSelection[i].入库日期
|
||||
// time = this.multipleSelection[i].入库日期
|
||||
number = this.multipleSelection[i].供应商
|
||||
caigou = this.multipleSelection[i].采购合同编号
|
||||
} else {
|
||||
if (time !== this.multipleSelection[i].入库日期 || number !== this.multipleSelection[i].供应商 || caigou !== this.multipleSelection[i].采购合同编号) {
|
||||
if ( number !== this.multipleSelection[i].供应商 || caigou !== this.multipleSelection[i].采购合同编号) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user