更新装配、销售、精工车间、技术中心、仓储多个模块,整理文档和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

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