更新装配、销售、精工车间、技术中心、仓储多个模块,整理文档和SQL脚本

This commit is contained in:
Developer
2026-06-29 13:36:34 +08:00
parent 137e276340
commit be0ff91e24
54 changed files with 5066 additions and 723 deletions

View File

@@ -3,6 +3,7 @@
<el-card style="height: 850px">
<div style="margin-top: 7px; margin-bottom: 7px">
<!--{{ $t('m.music') }}-->
<el-input v-model="materialCode" style="width: 150px " size="small" clearable placeholder="物料编号"/>
<el-input v-model="materialName" style="width: 150px " size="small" clearable placeholder="物料名称"/>
<el-input v-model="specificationsModel" style="width: 150px " size="small" clearable placeholder="图号或型号"/>
<el-input v-model="LocationName" style="width: 100px " size="small" clearable placeholder="库位"/>
@@ -96,11 +97,12 @@
<el-input-number v-model="scope.row.打印条码数" :min="1" size="mini" style="margin: 0;width: 100%"/>
</template>
</el-table-column>
<el-table-column widht="120px" label="操作" align="center">
<el-table-column width="180px" label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit(scope.$index, scope.row)">取消</el-button>
<el-button v-else type="text" size="mini" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
<el-button v-if="!scope.row.edit" type="text" size="mini" @click="openTransfer(scope.row)">调拨</el-button>
</template>
</el-table-column>
</el-table>
@@ -179,6 +181,69 @@
<el-button type="primary" size="small" icon="el-icon-search" @click="importExcelSearch">查询</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>
<el-col :span="12">
<el-form-item label="物料名称:">
<span>{{ transferForm.物料名称 }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="图号/型号:">
<span>{{ transferForm.图号或型号 }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="原库位:">
<span>{{ transferForm.原货位名称 }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原库存数:">
<span>{{ transferForm.原库存数 }}</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="目标库位:">
<el-select
v-model="transferForm.目标货位流水号"
size="small"
style="width: 260px"
clearable
filterable
placeholder="请选择目标库位"
@change="handleTransferLocationChange">
<el-option
v-for="item in storageLocation"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="新库位:">
<el-input v-model="transferForm.新货位名称" clearable size="small" style="width: 260px" placeholder="请输入新库位名称"/>
<el-button :loading="transferLocationAdding" type="primary" plain size="small" style="margin-left: 8px" @click="addTransferLocation">新建</el-button>
</el-form-item>
<el-form-item label="调拨数量:">
<el-input-number
v-model="transferForm.调拨数量"
:min="1"
:max="Number(transferForm.原库存数)"
size="small"
style="width: 260px"/>
</el-form-item>
<el-form-item label="调拨备注:">
<el-input v-model="transferForm.调拨备注" clearable size="small" style="width: 360px" placeholder="请输入调拨备注"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="transferDialogVisible=false">取消</el-button>
<el-button :loading="transferSubmitting" type="primary" size="small" @click="submitTransfer">确定调拨</el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="增加产品" center width="390px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
<el-row>
@@ -225,7 +290,11 @@ export default {
dialogFormVisible: false,
dialogFormVisible1: false,
dialogFormVisibleExcel: false,
transferDialogVisible: false,
transferLocationAdding: false,
transferSubmitting: false,
title: '',
materialCode: '',
materialName: '',
materialSpec: '',
materialValue: '',
@@ -239,6 +308,21 @@ export default {
库位: '',
入库数: ''
},
transferForm: {
物料与货位流水号: '',
物料流水号: '',
物料名称: '',
图号或型号: '',
类型: '',
原货位流水号: '',
原货位名称: '',
原库存数: 0,
目标货位流水号: '',
目标货位名称: '',
新货位名称: '',
调拨数量: 1,
调拨备注: ''
},
materialName1: '',
productName: [],
editorialStaff: [],
@@ -373,13 +457,15 @@ export default {
})
},
getLocateName() {
this.storageLocation = []
var param = []
var Data = this.CreateData('11', '仓储管理_库位_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
var rows = response.data.rows || response.data || []
for (let i = 0; i < rows.length; i++) {
this.storageLocation.push({
label: response.data[i].货位名称,
value: response.data[i].货位流水号
label: rows[i].货位名称,
value: rows[i].货位流水号
})
}
})
@@ -485,6 +571,7 @@ export default {
for (let i = 0; i < rows.length; i++) {
this.tableData.push({
物料编码: rows[i].物料编码,
物料流水号: rows[i].物料流水号,
物料名称: rows[i].物料名称,
图号或型号: rows[i].图号或型号,
物料与货位流水号: rows[i].物料与货位流水号,
@@ -540,7 +627,8 @@ export default {
this.$message.warning('暂无数据')
return
}
let materialName_check, specificationsModel_check, LocationName_check
let materialCode_check, materialName_check, specificationsModel_check, LocationName_check
this.materialCode ? materialCode_check = 1 : materialCode_check = 0
this.materialName ? materialName_check = 1 : materialName_check = 0
this.specificationsModel ? specificationsModel_check = 1 : specificationsModel_check = 0
this.LocationName ? LocationName_check = 1 : LocationName_check = 0
@@ -553,13 +641,16 @@ export default {
param[5] = ['库位', this.LocationName]
param[6] = ['排序名称', this.orderName]
param[7] = ['排序方式', this.order]
param[8] = ['物料编码_check', materialCode_check]
param[9] = ['物料编码', this.materialCode]
var Data = this.CreateData('2001', '仓储管理_库存盘点_查询', param)
this.exportExcel_NPOI(Data)
},
searchTable() {
this.loading = true
this.tableData = []
let materialName_check, specificationsModel_check, LocationName_check
let materialCode_check, materialName_check, specificationsModel_check, LocationName_check
this.materialCode ? materialCode_check = 1 : materialCode_check = 0
this.materialName ? materialName_check = 1 : materialName_check = 0
this.specificationsModel ? specificationsModel_check = 1 : specificationsModel_check = 0
this.LocationName ? LocationName_check = 1 : LocationName_check = 0
@@ -572,6 +663,8 @@ export default {
param[5] = ['库位', this.LocationName]
param[6] = ['排序名称', this.orderName]
param[7] = ['排序方式', this.order]
param[8] = ['物料编码_check', materialCode_check]
param[9] = ['物料编码', this.materialCode]
var Data = this.CreateData('11', '仓储管理_库存盘点_查询', param, this.pageSize, this.pageCurrent)
ExecDatabase(Data).then(response => {
// console.log(response.data)
@@ -623,6 +716,131 @@ export default {
this.materialValue = row.物料流水号
this.Location = row.货位流水号
},
openTransfer(row) {
if (!row.物料与货位流水号) {
this.$message.warning('当前行缺少库存流水号,不能调拨')
return
}
if (Number(row.库存) <= 0) {
this.$message.warning('当前库位库存为0,不能调拨')
return
}
this.transferForm.物料与货位流水号 = row.物料与货位流水号
this.transferForm.物料流水号 = row.物料流水号
this.transferForm.物料名称 = row.物料名称
this.transferForm.图号或型号 = row.图号或型号
this.transferForm.类型 = row.类型
this.transferForm.原货位流水号 = row.货位流水号
this.transferForm.原货位名称 = row.货位名称
this.transferForm.原库存数 = Number(row.库存)
this.transferForm.目标货位流水号 = ''
this.transferForm.目标货位名称 = ''
this.transferForm.新货位名称 = ''
this.transferForm.调拨数量 = 1
this.transferForm.调拨备注 = ''
this.transferDialogVisible = true
},
handleTransferLocationChange(value) {
this.transferForm.目标货位名称 = ''
for (let i = 0; i < this.storageLocation.length; i++) {
if (this.storageLocation[i].value === value) {
this.transferForm.目标货位名称 = this.storageLocation[i].label
return
}
}
},
selectTransferLocation(locationName) {
var param = []
param[0] = ['库位_check', 1]
param[1] = ['库位', locationName]
var Data = this.CreateData('11', '仓储管理_库位_查询', param)
this.ExecDatabase(Data).then(response => {
var rows = response.data.rows || response.data || []
if (rows.length > 0) {
this.transferForm.目标货位流水号 = rows[0].货位流水号
this.transferForm.目标货位名称 = rows[0].货位名称
}
})
},
addTransferLocation() {
if (!this.transferForm.新货位名称) {
this.$message.warning('请输入新库位名称')
return
}
var locationName = this.transferForm.新货位名称
var param = []
param[0] = ['库位', locationName]
var Data = this.CreateData('11', '仓储管理_库位_验证是否存在', param)
this.transferLocationAdding = true
this.ExecDatabase(Data).then(response => {
if (Number(response.data[0].条数) > 0) {
this.$message.warning('增加的库位已存在列表中')
this.selectTransferLocation(locationName)
this.transferLocationAdding = false
} else {
var addParam = []
addParam[0] = ['库位', locationName]
var AddData = this.CreateData('12', '仓储管理_库位_增加数据', addParam)
this.ExecDatabase(AddData).then(response => {
if (response.data[0].result === '1') {
this.$message.success('库位新增成功')
this.getLocateName()
this.selectTransferLocation(locationName)
this.transferForm.新货位名称 = ''
} else {
this.$message.error('库位新增失败')
}
this.transferLocationAdding = false
}).catch(() => {
this.transferLocationAdding = false
})
}
}).catch(() => {
this.transferLocationAdding = false
})
},
submitTransfer() {
if (!this.transferForm.目标货位流水号) {
this.$message.warning('请选择目标库位')
return
}
if (String(this.transferForm.目标货位流水号) === String(this.transferForm.原货位流水号)) {
this.$message.warning('目标库位不能与原库位相同')
return
}
if (Number(this.transferForm.调拨数量) <= 0) {
this.$message.warning('调拨数量必须大于0')
return
}
if (Number(this.transferForm.调拨数量) > Number(this.transferForm.原库存数)) {
this.$message.warning('调拨数量不能大于原库存数')
return
}
var param = []
param[0] = ['物料与货位流水号', this.transferForm.物料与货位流水号]
param[1] = ['物料流水号', this.transferForm.物料流水号]
param[2] = ['原货位流水号', this.transferForm.原货位流水号]
param[3] = ['目标货位流水号', this.transferForm.目标货位流水号]
param[4] = ['调拨数量', this.transferForm.调拨数量]
param[5] = ['原库存数', this.transferForm.原库存数]
param[6] = ['调拨备注', this.transferForm.调拨备注]
param[7] = ['操作者', this.id]
param[8] = ['类型', this.transferForm.类型]
var Data = this.CreateData('12', '仓储管理_库存盘点_库存调拨', param)
this.transferSubmitting = true
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('调拨成功')
this.transferDialogVisible = false
this.searchTable()
} else {
this.$message.error(response.data[0].msg || '调拨失败')
}
this.transferSubmitting = false
}).catch(() => {
this.transferSubmitting = false
})
},
submitMaterialChange() {
if (this.materialValue) {
if (this.Warehousing) {

View File

@@ -2,6 +2,13 @@
<div class="app-container">
<el-card style="height: 850px;padding: 0 0 0 10px">
<div style="margin-top: 7px; margin-bottom: 7px">
<el-input
v-model="materialCodeValue"
style="width:200px"
placeholder="物料编号"
size="small"
clearable
@keyup.enter.native="pageCurrent=1;searchTable()"/>
<el-input
v-model="materialNameTypeValue"
style="width:200px"
@@ -54,7 +61,6 @@
plain
icon="el-icon-download"
size="small"
style="margin-left: 580px"
@click="exportExcel()">导出
</el-button>
</div>
@@ -365,6 +371,7 @@ export default {
materialSerialNumber: '',
locationWarehouseValue: '', // 库位
gridData: [],
materialCodeValue: '',
materialNameTypeValue: '',
materialTypeValue: '',
materialType: '',
@@ -483,7 +490,8 @@ export default {
}
},
searchTable() {
let materialNameTypeValue_check, locationWarehouseValue_check, materialTypeValue_check, materialType_check
let materialCodeValue_check, materialNameTypeValue_check, locationWarehouseValue_check, materialTypeValue_check, materialType_check
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0
this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0
this.materialTypeValue ? materialTypeValue_check = 1 : materialTypeValue_check = 0
this.materialType ? materialType_check = 1 : materialType_check = 0
@@ -499,6 +507,8 @@ export default {
param[7] = ['排序方式', this.order]
param[8] = ['类型_check', materialType_check]
param[9] = ['类型', this.materialType]
param[10] = ['物料编码_check', materialCodeValue_check]
param[11] = ['物料编码', this.materialCodeValue]
var Data = this.CreateData('11', '仓储管理_库存查询_查询', param, this.pageSize, this.pageCurrent)
this.ExecDatabase(Data).then(response => {
this.tableData1 = response.data.rows
@@ -520,7 +530,8 @@ export default {
}
},
exportAll() {
let materialNameTypeValue_check, locationWarehouseValue_check
let materialCodeValue_check, materialNameTypeValue_check, locationWarehouseValue_check
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0
this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0
this.locationWarehouseValue ? locationWarehouseValue_check = 1 : locationWarehouseValue_check = 0
var param = []
@@ -530,6 +541,8 @@ export default {
param[3] = ['库位', this.locationWarehouseValue]
param[4] = ['排序名称', this.orderName]
param[5] = ['排序方式', this.order]
param[6] = ['物料编码_check', materialCodeValue_check]
param[7] = ['物料编码', this.materialCodeValue]
var Data = this.CreateData('2001', '报表_仓储管理_通用库存_查询', param)
this.exportExcel_NPOI(Data)
},

View File

@@ -2,14 +2,14 @@
<div class="app-container">
<el-card style="height: 850px">
<div style="margin-top: 7px; margin-bottom: 7px">
<el-input v-model="MaterialCode" style="width: 160px " size="small" clearable placeholder="物料编号"/>
<el-input v-model="MaterialName" style="width: 200px " size="small" clearable placeholder="物料名称/规格"/>
<el-input v-model="DrawingNo" style="width: 200px " size="small" clearable placeholder="图号/型号"/>
<el-input v-model="locationWarehouseValue" style="width:200px" placeholder="库位" size="small" clearable/>
<el-button style="margin-left: 7px;width: 80px" type="primary" plain size="small" @click="searchTable()">查询</el-button>
<!--<el-button type="distribution" size="small" @click="addLocation()">增加库位</el-button>-->
</div>
<div>
<el-table v-loading="loading" :data="tableData" highlight-current-row show-summary border stripe size="small" style="width: 911px" height="740px" @row-dblclick="changeState">
<el-table v-loading="loading" :data="tableData" highlight-current-row show-summary border stripe size="small" style="width: 731px" height="740px">
<el-table-column :width="setColumnWidth('序号')" type="index" label="序号" align="center"/>
<el-table-column label="物料编号" align="center" show-overflow-tooltip>
<template slot-scope="scope">
@@ -28,23 +28,7 @@
</el-table-column>
<el-table-column label="库位" width="160px" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="scope.row.货位流水号" size="small" style="width: 100%" filterable clearable placeholder="请选择库位">
<el-option
v-for="item in storageLocation"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
<span v-else>{{ scope.row.货位名称 }}</span>
</template>
</el-table-column>
<el-table-column width="180px" label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit(scope.$index, scope.row)">取消</el-button>
<el-button v-if="!scope.row.edit" type="text" icon="el-icon-edit" size="mini" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
{{ scope.row.货位名称 }}
</template>
</el-table-column>
</el-table>
@@ -60,19 +44,6 @@
@current-change="handleCurrentChanges"/>
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="增加库位" center width="390px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
<el-row>
<el-form-item label="库位:" prop="库位">
<el-input v-model="form.库位" clearable size="small" style="width:200px" placeholder="请输入库位"/>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff('form')">取消</el-button>
<el-button type="distribution" size="small" @click="submitLocation('form')">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -83,20 +54,13 @@ export default {
data() {
return {
locationWarehouseValue: '', // 库位
dialogFormVisible: false,
storageLocation: [],
MaterialCode: '',
MaterialName: '',
DrawingNo: '',
LocationName: '',
form: {
库位: ''
},
materialName1: '',
productName: [],
editorialStaff: [],
rules: {
库位: [{ required: true, message: '请输入库位' }]
},
loading: false, // 数据加载
total: 0, // 分页总数
tableData: [], // 合同信息表
@@ -114,28 +78,14 @@ export default {
])
},
created() {
this.getLocateName()
this.searchTable()
},
methods: {
getLocateName() {
var param = []
param[0] = ['库位_check', 0]
param[1] = ['库位', '']
var Data = this.CreateData('11', '仓储管理_库位_查询', param)
this.ExecDatabase(Data).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.storageLocation.push({
label: response.data[i].货位名称,
value: response.data[i].货位流水号
})
}
})
},
searchTable() {
this.loading = true
this.tableData10 = []
let MaterialName_check, DrawingNo_check, locationWarehouseValue_check
let MaterialCode_check, MaterialName_check, DrawingNo_check, locationWarehouseValue_check
this.MaterialCode ? MaterialCode_check = 1 : MaterialCode_check = 0
this.MaterialName ? MaterialName_check = 1 : MaterialName_check = 0
this.DrawingNo ? DrawingNo_check = 1 : DrawingNo_check = 0
this.locationWarehouseValue ? locationWarehouseValue_check = 1 : locationWarehouseValue_check = 0
@@ -146,6 +96,8 @@ export default {
param[3] = ['图号或型号', this.DrawingNo]
param[4] = ['库位_check', locationWarehouseValue_check]
param[5] = ['库位', this.locationWarehouseValue]
param[6] = ['物料编码_check', MaterialCode_check]
param[7] = ['物料编码', this.MaterialCode]
var Data = this.CreateData('11', '仓储管理_物料库位_查询数据', param, this.pageSize, this.pageCurrent)
ExecDatabase(Data).then(response => {
// console.log(response.data)
@@ -170,67 +122,6 @@ export default {
this.tableData = this.tableData10
})
},
addLocation() {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.form.库位 = ''
this.dialogFormVisible = true
},
callOff(formName) {
this.dialogFormVisible = false
this.$refs[formName].resetFields()
},
changeState(row) {
row.edit = !row.edit
},
submitLocation(formName) {
var param = []
param[0] = ['库位', this.form.库位]
var Data = this.CreateData('11', '仓储管理_库位_验证是否存在', param)
this.ExecDatabase(Data).then(response => {
if (Number(response.data[0].条数) > 0) {
this.$message.warning('增加的库位已存在列表中')
} else {
this.$refs[formName].validate((valid) => {
if (valid) {
var param = []
param[0] = ['库位', this.form.库位]
var Data = this.CreateData('12', '仓储管理_库位_增加数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.searchTable()
this.dialogFormVisible = false
} else {
this.$message.error('添加失败')
}
})
}
})
}
})
},
confirmEdit(row) {
var param = []
param[0] = ['货位流水号', row.货位流水号]
param[1] = ['物料流水号', row.物料流水号]
var Data = this.CreateData('12', '仓储管理_物料库位_编辑数据', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.searchTable()
} else {
this.$message.error('编辑失败')
}
})
},
// 取消编辑
cancelEdit(index, row) {
row.edit = false
row.货位名称 = row.货位名称_before
this.$message('取消修改')
},
handleSizeChanges(val) {
this.pageCurrent = 1
this.pageSize = val
@@ -243,4 +134,3 @@ export default {
}
}
</script>

View File

@@ -232,6 +232,7 @@
<el-col style="margin-left: 7px;width: 971px">
<div class="grid-content bg-purple">
<el-input v-model="ConsumableCodeSelect" style="width: 160px" size="small" placeholder="物料编号" clearable @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable2()"/>
<el-input v-model="ConsumableSelect" style="width: 200px" size="small" placeholder="物料名称/规格/型号" clearable @keyup.enter.native="pageCurrent=1;pageSize=20;searchTable2()"/>
<el-table v-loading="loading" ref="table1" :data="Consumables" highlight-current-row show-summary border size="mini" style="margin-top: 10px" height="710">
@@ -482,6 +483,7 @@ export default {
pageCurrent: 1, // 分页当前页
pageSize: 20, // 分页每页显示条数
orderName: '', // 排序列名
ConsumableCodeSelect: '', // 耗材物料编号搜索
ConsumableSelect: '', // 耗材搜索
order: '' // 排序方式
}
@@ -809,11 +811,14 @@ export default {
}
},*/
searchTable2() {
let check
let codeCheck, check
this.ConsumableCodeSelect ? codeCheck = 1 : codeCheck = 0
this.ConsumableSelect ? check = 1 : check = 0
var param = []
param[0] = ['物料名称_check', check]
param[1] = ['物料名称', this.ConsumableSelect]
param[2] = ['物料编码_check', codeCheck]
param[3] = ['物料编码', this.ConsumableCodeSelect]
var Data = this.CreateData('11', '仓储管理_耗材出库_查询', param, this.pageSize, this.pageCurrent)
this.ExecDatabase(Data).then(response => {
this.Consumables = []

View File

@@ -757,6 +757,7 @@ export default {
this.initWebpack()
this.getorderSelection()
this.loadRKDCounter()
this.getLocateName()
// this.searchTable1()
},
methods: {
@@ -1047,10 +1048,12 @@ export default {
getLocateName() {
var param = []
var Data = this.CreateData('11', '仓储管理_库位_查询', param)
this.ExecDatabase(Data).then(response => {
return this.ExecDatabase(Data).then(response => {
this.locateName = []
for (let i = 0; i < response.data.length; i++) {
this.locateName.push({
label: response.data[i].货位名称,
name: response.data[i].货位名称,
value: String(response.data[i].货位流水号)
})
}
@@ -1133,13 +1136,28 @@ export default {
var data = response.data.rows || response.data
for (let i = 0; i < data.length; i++) {
var inventory = data[i].库存 || data[i].货位存量 || 0
locateName.push({
label: data[i].货位名称 + '(库存:' + inventory + ')',
name: data[i].货位名称,
value: String(data[i].货位流水号)
})
if (Number(inventory) > 0) {
locateName.push({
label: data[i].货位名称 + '(库存:' + inventory + ')',
name: data[i].货位名称,
value: String(data[i].货位流水号)
})
}
}
if (locateName.length > 0) {
this.$set(row, 'locateName', locateName)
this.$set(row, 'locateSource', 'inventory')
} else {
var setAllLocate = function() {
this.$set(row, 'locateName', this.locateName.slice())
this.$set(row, 'locateSource', 'all')
}.bind(this)
if (this.locateName.length === 0) {
this.getLocateName().then(setAllLocate)
} else {
setAllLocate()
}
}
this.$set(row, 'locateName', locateName)
})
},
getData() {

View File

@@ -9,6 +9,13 @@
size="small"
style="width:200px"
@keyup.enter.native="searchTable()"/>
<el-input
v-model="materialCodeValue"
clearable
placeholder="物料编号"
size="small"
style="width:160px"
@keyup.enter.native="searchTable()"/>
<el-input
v-model="materialNameTypeValue"
clearable
@@ -512,6 +519,7 @@ export default {
returns: [],
contractNumber: '', // 合同
supplierSelectionName: '', // 选择供应商名称
materialCodeValue: '', // 物料编号
materialNameTypeValue: '', // 物料名称规格型号
materialNameType: [], // 物料名称规格型号数组
入库单号Value: '', // 入库单号
@@ -668,9 +676,10 @@ export default {
// 导出表 8.10
exportExcel() {
if (this.tableData.length !== 0) {
let dateRange_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check,
let dateRange_check, materialCodeValue_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check,
purchaseOrderValue_check, supplierSelection_check, 入库单号_check
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0
this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0
this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
this.typeValue ? typeValue_check = 1 : typeValue_check = 0
@@ -693,6 +702,8 @@ export default {
param[12] = ['采购合同流水号', this.purchaseOrderValue]
param[13] = ['供应商_check', supplierSelection_check]
param[14] = ['供应商名称', this.supplierSelectionValue]
param[15] = ['物料编码_check', materialCodeValue_check]
param[16] = ['物料编码', this.materialCodeValue]
var Data = this.CreateData('2001', '仓储管理_入库记录_导出表格_查询', param)
this.exportExcel_NPOI(Data)
} else {
@@ -795,6 +806,7 @@ export default {
param[3] = ['采购合同明细流水号', this.purchaseContractDetailSerialNumber]
param[4] = ['批号', this.batchNumber]
param[5] = ['入库时间', this.warehousingDate]
param[6] = ['入库记录流水号', this.DeliveryNumber]
var Data = this.CreateData('11', '仓储管理_入库记录_退货入库_验证', param)
this.ExecDatabase(Data).then(response => {
if (response.data[0].数值 === 1) {
@@ -913,9 +925,10 @@ export default {
},
searchTable() {
this.loading = true
let dateRange_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check,
let dateRange_check, materialCodeValue_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check,
purchaseOrderValue_check, supplierSelection_check, 入库单号_check
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
this.materialCodeValue ? materialCodeValue_check = 1 : materialCodeValue_check = 0
this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0
this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
this.typeValue ? typeValue_check = 1 : typeValue_check = 0
@@ -940,6 +953,8 @@ export default {
param[14] = ['供应商名称', this.supplierSelectionValue]
param[15] = ['排序名称', this.orderName]
param[16] = ['排序方式', this.order]
param[17] = ['物料编码_check', materialCodeValue_check]
param[18] = ['物料编码', this.materialCodeValue]
var Data = this.CreateData('11', '仓储管理_入库记录_查询', param, this.pageSize, this.pageCurrent)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data.rows
@@ -1009,4 +1024,3 @@ export default {
}
}
</script>