mdf:修改组盘为混料
This commit is contained in:
@@ -9,7 +9,7 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://${DB_HOST:192.168.81.251}:${DB_PORT:3306}/${DB_NAME:wms_standardv1}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
url: jdbc:mysql://${DB_HOST:192.168.81.251}:${DB_PORT:3306}/${DB_NAME:wms_standardv2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_oulun}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_oulun}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:123456}
|
||||||
|
|||||||
265
nladmin-ui/src/views/wms/basedata/group/AddDialog.vue
Normal file
265
nladmin-ui/src/views/wms/basedata/group/AddDialog.vue
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="crud.status.title"
|
||||||
|
append-to-body
|
||||||
|
fullscreen
|
||||||
|
:before-close="crud.cancelCU"
|
||||||
|
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||||
|
width="1200px"
|
||||||
|
@open="open"
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||||
|
<el-col :span="20" style="border: 1px solid white">
|
||||||
|
<span />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<span>
|
||||||
|
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||||
|
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||||
|
<el-form-item label="载具编码" prop="bill_code">
|
||||||
|
<label slot="label">载具编码:</label>
|
||||||
|
<el-input v-model="form.storagevehicle_code" clearable style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库" prop="stor_id">
|
||||||
|
<label slot="label">仓 库:</label>
|
||||||
|
<el-select
|
||||||
|
v-model="form.stor_id"
|
||||||
|
clearable
|
||||||
|
placeholder="仓库"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 210px"
|
||||||
|
:disabled="crud.status.view > 0"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in storlist"
|
||||||
|
:key="item.stor_id"
|
||||||
|
:label="item.stor_name"
|
||||||
|
:value="item.stor_id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="源单据号" prop="ext_code">
|
||||||
|
<label slot="label">源单据号:</label>
|
||||||
|
<el-input v-model="form.ext_code" clearable style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="源单类型" prop="ext_type">
|
||||||
|
<el-select
|
||||||
|
v-model="form.ext_type"
|
||||||
|
clearable
|
||||||
|
placeholder="源单类型"
|
||||||
|
style="width: 210px"
|
||||||
|
class="filter-item"
|
||||||
|
:disabled="crud.status.view > 0"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.ST_INV_IN_TYPE"
|
||||||
|
:key="item.value"
|
||||||
|
:disabled="item.value === '0003'"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<label slot="label">备 注:</label>
|
||||||
|
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="left" />
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="insertEvent()"
|
||||||
|
>
|
||||||
|
添加物料
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="form.tableData"
|
||||||
|
style="width: 100%;"
|
||||||
|
border
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip width="180" prop="material_code" label="物料编码" />
|
||||||
|
<el-table-column show-overflow-tooltip width="260" prop="material_name" label="物料名称" />
|
||||||
|
<el-table-column show-overflow-tooltip width="260" prop="material_spec" label="物料规格" />
|
||||||
|
<el-table-column show-overflow-tooltip width="180" prop="pcsn" label="批次号" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.pcsn" style="width: 150px;" ></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip width="180" prop="qty" label="数量" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number v-model="scope.row.qty" style="width: 150px;" ></el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip width="150" prop="qty_unit_name" label="计量单位名称" />
|
||||||
|
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="150" fixed="right">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<MaterialDialog :dialog-show.sync="dtlShow" :is-Single.sync="isSingle" @materialChoose="materialChoose" />
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CRUD, { crud, form } from '@crud/crud'
|
||||||
|
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
|
||||||
|
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
ext_code: '',
|
||||||
|
storagevehicle_code: '',
|
||||||
|
stor_id: '',
|
||||||
|
status: '10',
|
||||||
|
ext_type: '0',
|
||||||
|
remark: '',
|
||||||
|
biz_date: new Date(),
|
||||||
|
create_mode: '',
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AddDialog',
|
||||||
|
components: { MaterialDialog },
|
||||||
|
mixins: [crud(), form(defaultForm)],
|
||||||
|
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_INV_IN_TYPE'],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
bussConfig: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
dtlShow: false,
|
||||||
|
isSingle: false,
|
||||||
|
bill_btn: false,
|
||||||
|
mater_btn: false,
|
||||||
|
storlist: [],
|
||||||
|
billtypelist: [],
|
||||||
|
rules: {
|
||||||
|
storagevehicle_code: [
|
||||||
|
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
bill_type: [
|
||||||
|
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
biz_date: [
|
||||||
|
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
crudBsrealstorattr.getStor().then(res => {
|
||||||
|
this.storlist = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
},
|
||||||
|
[CRUD.HOOK.beforeSubmit]() {
|
||||||
|
// 提交前校验
|
||||||
|
if (this.form.tableData.length === 0) {
|
||||||
|
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
fun(val) {
|
||||||
|
return Number(val).toFixed(3)
|
||||||
|
},
|
||||||
|
async insertdtl() {
|
||||||
|
if (this.form.bill_type === '') {
|
||||||
|
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.form.tableData.push({ quality_scode: '01', is_active: '1', ivt_level: '01', qty: '0' })
|
||||||
|
this.form.detail_count = this.form.tableData.length
|
||||||
|
},
|
||||||
|
deleteRow(index, rows) {
|
||||||
|
const pcsn = rows[index].pcsn
|
||||||
|
let len = rows.length
|
||||||
|
while (len--) {
|
||||||
|
const obj = rows[len]
|
||||||
|
if (pcsn === obj.pcsn) {
|
||||||
|
const index = rows.indexOf(obj)
|
||||||
|
if (index > -1) { // 移除找到的指定元素
|
||||||
|
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].qty)
|
||||||
|
rows.splice(index, 1)
|
||||||
|
this.form.detail_count = this.form.tableData.length
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
materialChoose(row) {
|
||||||
|
this.form.tableData = row
|
||||||
|
// this.form.tableData.material_name = row.material_name
|
||||||
|
// this.form.material_id = row.material_id
|
||||||
|
// this.form.material_code = row.material_code
|
||||||
|
// this.form.material_spec = row.material_spec
|
||||||
|
},
|
||||||
|
async insertEvent(row) {
|
||||||
|
this.dtlShow = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.crud-opts2 {
|
||||||
|
padding: 4px 0;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .crud-opts-right2 {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -179,6 +179,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--放引用的组件-->
|
<!--放引用的组件-->
|
||||||
<MaterialDialog :dialog-show.sync="materialDialog" @materialChoose="materialChoose" />
|
<MaterialDialog :dialog-show.sync="materialDialog" @materialChoose="materialChoose" />
|
||||||
|
<AddDialog @AddChanged="querytable" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -190,6 +192,7 @@ import udOperation from '@crud/UD.operation'
|
|||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
|
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
|
||||||
|
import AddDialog from '@/views/wms/basedata/group/AddDialog'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
group_id: null,
|
group_id: null,
|
||||||
@@ -211,7 +214,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Group',
|
name: 'Group',
|
||||||
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation },
|
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation, AddDialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
@@ -243,6 +246,9 @@ export default {
|
|||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
querytable() {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
formattStatus(row) {
|
formattStatus(row) {
|
||||||
return this.dict.label.GROUP_STATUS[row.status]
|
return this.dict.label.GROUP_STATUS[row.status]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -37,9 +37,7 @@
|
|||||||
border
|
border
|
||||||
:cell-style="{'text-align':'center'}"
|
:cell-style="{'text-align':'center'}"
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||||
@select="handleSelectionChange"
|
@selection-change="clickChange"
|
||||||
@select-all="onSelectAll"
|
|
||||||
@current-change="clickChange"
|
|
||||||
>
|
>
|
||||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||||
@@ -87,7 +85,7 @@ export default {
|
|||||||
},
|
},
|
||||||
isSingle: {
|
isSingle: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -102,6 +100,11 @@ export default {
|
|||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
this.dialogVisible = newValue
|
this.dialogVisible = newValue
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
isSingle: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.isSingle = newValue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -110,17 +113,6 @@ export default {
|
|||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
|
|
||||||
},
|
|
||||||
handleSelectionChange(val, row) {
|
|
||||||
if (val.length > 1) {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
this.$refs.table.toggleRowSelection(val.pop())
|
|
||||||
} else {
|
|
||||||
this.checkrow = row
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onSelectAll() {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user