add:新增需求
This commit is contained in:
@@ -136,6 +136,25 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="子卷状态">
|
||||
<el-select
|
||||
v-model="query.sub_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.SUB_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存类型">
|
||||
<el-select
|
||||
v-model="query.ivt_flag"
|
||||
@@ -221,6 +240,8 @@
|
||||
<el-table-column prop="warehousing_qty" label="待入数" :formatter="rounding"/>
|
||||
<el-table-column prop="unit_name" label="计量单位"/>
|
||||
<el-table-column prop="instorage_time" label="入库时间" min-width="150"/>
|
||||
<el-table-column prop="sub_type" label="子卷状态" min-width="150" :formatter="formatSubType"/>
|
||||
<el-table-column prop="stock_age" label="库龄" min-width="100" />
|
||||
<el-table-column prop="paper_type" label="管件类型" min-width="150"/>
|
||||
<el-table-column prop="paper_code" label="管件编码" min-width="150"/>
|
||||
<el-table-column prop="paper_name" label="管件描述" min-width="250"/>
|
||||
@@ -292,7 +313,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Structivt',
|
||||
dicts: ['ST_QUALITY_SCODE', 'product_area', 'IS_OR_NOT'],
|
||||
dicts: ['ST_QUALITY_SCODE', 'product_area', 'IS_OR_NOT', 'SUB_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, UploadDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -348,6 +369,9 @@ export default {
|
||||
return parseFloat(row[column.property]).toFixed(2)
|
||||
}
|
||||
},
|
||||
formatSubType(row) {
|
||||
return this.dict.label.SUB_TYPE[row.sub_type]
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
|
||||
@@ -42,14 +42,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属部门" prop="sysdeptid">
|
||||
<treeselect
|
||||
v-model="form.sysdeptid"
|
||||
:options="depts"
|
||||
:load-options="loadDepts"
|
||||
style="width: 200px"
|
||||
placeholder="选择部门"
|
||||
/>
|
||||
<el-form-item label="外部标识">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -100,13 +94,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="外部标识">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-form-item label="仓库类型" required>
|
||||
<el-col :span="4" />
|
||||
@@ -292,9 +279,6 @@ export default {
|
||||
stor_name: [
|
||||
{ required: true, message: '仓库名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
sysdeptid: [
|
||||
{ required: true, message: '所属部门不能为空', trigger: 'blur' }
|
||||
],
|
||||
stor_capacity: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-if="dialogShow"
|
||||
title="仓位信息"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="1100px"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<el-form ref="form3" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属库区:">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="仓位前缀:">
|
||||
<el-input v-model="formMst.prefix" placeholder="如:91、B21、C31等" size="mini" style="width: 210px" @blur="blurQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生成数量:">
|
||||
<el-input-number :precision="0" :step="1" :min="1" :max="90000" v-model="formMst.num" size="mini" :controls="false" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :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" type="primary" :loading="loadingBut" @click="oneCreate">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import crudStructattr from '@/views/wms/basedata/st/struct/structattr'
|
||||
|
||||
export default {
|
||||
name: 'SunShowDialog',
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formMst: {
|
||||
stor_id: '',
|
||||
sect_id: '',
|
||||
prefix: '',
|
||||
num: 0
|
||||
},
|
||||
sects: [],
|
||||
dialogVisible: false,
|
||||
loadingBut: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudUserStor.getSect({ 'stor_id': '' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$refs['form3'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.formMst.stor_id = val[0]
|
||||
this.formMst.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.formMst.sect_id = ''
|
||||
this.formMst.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.formMst.stor_id = val[0]
|
||||
this.formMst.sect_id = val[1]
|
||||
}
|
||||
},
|
||||
oneCreate() {
|
||||
if (this.formMst.sect_id === '') {
|
||||
return this.crud.notify('库区不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
|
||||
if (this.formMst.prefix === '') {
|
||||
return this.crud.notify('前缀不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
|
||||
if (this.formMst.num === '') {
|
||||
return this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
this.loadingBut = true
|
||||
crudStructattr.oneCreate(this.formMst).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.crud.toQuery()
|
||||
this.loadingBut = false
|
||||
}).catch(() => {
|
||||
this.loadingBut = false
|
||||
})
|
||||
},
|
||||
blurQuery() {
|
||||
this.loadingBut = true
|
||||
crudStructattr.blurQuery({ 'prefix': this.formMst.prefix }).then(res => {
|
||||
this.crud.notify('可使用此前缀!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loadingBut = false
|
||||
}).catch(() => {
|
||||
this.loadingBut = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -59,7 +59,18 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="openOneCreate"
|
||||
>
|
||||
一键生成
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -261,6 +272,8 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<OneCreateDialog :dialog-show.sync="openOneCreateDialog" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -271,6 +284,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import OneCreateDialog from '@/views/wms/basedata/st/struct/OneCreateDialog'
|
||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||
import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
|
||||
/* import checkoutbill from "@/api/wms/st/core/outbill/checkoutbill";*/
|
||||
@@ -323,7 +337,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'Structattr',
|
||||
dicts: ['ST_HEIGHT_TYPE', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'placement_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, OneCreateDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -349,6 +363,7 @@ export default {
|
||||
}
|
||||
}
|
||||
return {
|
||||
openOneCreateDialog: false,
|
||||
sects: [],
|
||||
invtypelist: [],
|
||||
permission: {},
|
||||
@@ -413,6 +428,9 @@ export default {
|
||||
sectChange(val) {
|
||||
this.form.sect_id = val[1]
|
||||
},
|
||||
openOneCreate() {
|
||||
this.openOneCreateDialog = true
|
||||
},
|
||||
invtypeFormat(row) {
|
||||
for (const item of this.invtypelist) {
|
||||
if (item.code === row.inv_type) {
|
||||
|
||||
@@ -32,4 +32,20 @@ export function changeActive(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive }
|
||||
export function oneCreate(data) {
|
||||
return request({
|
||||
url: 'api/structattr/oneCreate',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function blurQuery(data) {
|
||||
return request({
|
||||
url: 'api/structattr/blurQuery',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, oneCreate, blurQuery }
|
||||
|
||||
Reference in New Issue
Block a user