前4个模块的表单样式

This commit is contained in:
2022-10-20 16:44:27 +08:00
parent 7a935886d9
commit 7030154e1e
133 changed files with 13283 additions and 22 deletions

View File

@@ -1,8 +1,178 @@
<template>
<div>收货</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:top-btn-config="topBtnConfig"
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:method-list="tableBtn"
:width="trueWidth"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
<accetp-goods-add ref="accetpGoodsAdd" :dialog-title="showTitle" />
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index'
import accetpGoodsAdd from './components/accetpGoodsAdd.vue'
const topBtnConfig = [
{
type: 'add',
btnName: 'btn.add'
}
]
const tableProps = [
{
prop: 'trayID',
label: '托盘号'
},
{
prop: 'internalControlCode',
label: '成品内控码'
},
{
prop: 'customerCode',
label: '客户标签号'
},
{
prop: 'productDpec',
label: '成品规格'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'batch',
label: '批次'
},
{
prop: 'packCode',
label: '包装机号'
}
]
const tableBtn = [
{
type: 'edit',
btnName: 'btn.edit'
},
{
type: 'delete',
btnName: 'btn.delete'
}
]
export default {
name: 'AcceptGoods'
name: 'AcceptGoods',
components: { HeadForm, BaseTable, Pagination, MethodBtn, accetpGoodsAdd },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '托盘号或成品内控码',
param: 'name',
width: 300
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
topBtnConfig,
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
tableBtn,
total: 0,
trueWidth: 80,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const packCodeList = ['01', '02', '03', '04', '05']
for (let i = 0; i < num; i++) {
const obj = {}
obj.trayID = '1020' + i
obj.internalControlCode = '202210200001' + i
obj.customerCode = '20221020100' + i
obj.num = parseInt(Math.random() * 200 + 100)
const sj = Math.floor(Math.random() * 5)
obj.productDpec = spcList[sj]
obj.batch = '20221003' + i
obj.packCode = packCodeList[sj]
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
},
clickTopBtn(val) {
console.log(val)
this.$refs.accetpGoodsAdd.init()
this.showTitle = '新增'
},
handleClick(val) {
// console.log(val)
if (val.type === 'delete') {
this.$confirm('确定删除t托盘号为[ ' + val.data.trayID + ' ]的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
})
} else {
console.log(val)
this.showTitle = '编辑'
this.$refs.accetpGoodsAdd.init(val.data)
}
}
}
}
</script>

View File

@@ -0,0 +1,93 @@
<template>
<div>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
>
<el-form ref="formList" label-position="right" label-width="80px" :model="formList">
<el-form-item label="托盘号" prop="trayID">
<el-input v-model="formList.trayID" />
</el-form-item>
<el-form-item label="成品内控码" prop="internalControlCode">
<el-input v-model="formList.internalControlCode" />
</el-form-item>
<el-form-item label="客户标签号" prop="customerCode">
<el-input v-model="formList.customerCode" />
</el-form-item>
<el-form-item label="成品规格" prop="productDpec">
<el-input v-model="formList.productDpec" />
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input v-model="formList.num" />
</el-form-item>
<el-form-item label="批次" prop="batch">
<el-input v-model="formList.batch" />
</el-form-item>
<el-form-item label="包装机号" prop="packCode">
<el-input v-model="formList.packCode" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="resetForm('formList')"> </el-button>
<el-button type="primary" @click="submitForm('formList')"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'AccetpGoodsAdd',
props: {
dialogTitle: {
type: String,
required: true
}
},
data() {
return {
dialogVisible: false,
formList: {
trayID: '',
internalControlCode: '',
customerCode: '',
productDpec: '',
num: '',
batch: '',
packCode: ''
}
}
},
mounted() {},
methods: {
init(val) {
if (val) {
console.log(val)
this.$nextTick(() => {
this.formList.trayID = val.trayID
this.formList.internalControlCode = val.internalControlCode
this.formList.customerCode = val.customerCode
this.formList.productDpec = val.productDpec
this.formList.num = val.num
this.formList.batch = val.batch
this.formList.packCode = val.packCode
})
}
this.dialogVisible = true
},
submitForm(formName) {
this.$refs[formName].resetFields()
this.dialogVisible = false
this.$message({
type: 'success',
message: this.dialogTitle + '成功'
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
console.log(this.formList)
this.dialogVisible = false
}
}
}
</script>

View File

@@ -0,0 +1,97 @@
<template>
<div>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
>
<el-form ref="formList" label-position="right" label-width="80px" :model="formList">
<el-form-item label="入库单号" prop="receiptNo">
<el-input v-model="formList.receiptNo" />
</el-form-item>
<el-form-item label="托盘号" prop="trayID">
<el-input v-model="formList.trayID" />
</el-form-item>
<el-form-item label="成品内控码" prop="internalControlCode">
<el-input v-model="formList.internalControlCode" />
</el-form-item>
<el-form-item label="客户标签号" prop="customerCode">
<el-input v-model="formList.customerCode" />
</el-form-item>
<el-form-item label="成品规格" prop="productDpec">
<el-input v-model="formList.productDpec" />
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input v-model="formList.num" />
</el-form-item>
<el-form-item label="批次" prop="batch">
<el-input v-model="formList.batch" />
</el-form-item>
<el-form-item label="包装机号" prop="packCode">
<el-input v-model="formList.packCode" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="resetForm('formList')"> </el-button>
<el-button type="primary" @click="submitForm('formList')"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'InStoreDocumentsAdd',
props: {
dialogTitle: {
type: String,
required: true
}
},
data() {
return {
dialogVisible: false,
formList: {
receiptNo: '',
trayID: '',
internalControlCode: '',
customerCode: '',
productDpec: '',
num: '',
batch: '',
packCode: ''
}
}
},
mounted() {},
methods: {
init(val) {
if (val) {
console.log(val)
this.$nextTick(() => {
this.formList.receiptNo = val.receiptNo
this.formList.trayID = val.trayID
this.formList.internalControlCode = val.internalControlCode
this.formList.customerCode = val.customerCode
this.formList.productDpec = val.productDpec
this.formList.num = val.num
this.formList.batch = val.batch
this.formList.packCode = val.packCode
})
}
this.dialogVisible = true
},
submitForm(formName) {
this.$refs[formName].resetFields()
this.dialogVisible = false
this.$message({
type: 'success',
message: this.dialogTitle + '成功'
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
this.dialogVisible = false
}
}
}
</script>

View File

@@ -1,8 +1,183 @@
<template>
<div>入库单</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:top-btn-config="topBtnConfig"
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:method-list="tableBtn"
:width="trueWidth"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
<inStore-documents-add ref="inStoreDocumentsAdd" :dialog-title="showTitle" />
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index'
import inStoreDocumentsAdd from './components/inStoreDocumentsAdd.vue'
const topBtnConfig = [
{
type: 'add',
btnName: 'btn.add'
}
]
const tableProps = [
{
prop: 'receiptNo',
label: '入库单号'
},
{
prop: 'trayID',
label: '托盘号'
},
{
prop: 'internalControlCode',
label: '成品内控码'
},
{
prop: 'customerCode',
label: '客户标签号'
},
{
prop: 'productDpec',
label: '成品规格'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'batch',
label: '批次'
},
{
prop: 'packCode',
label: '包装机号'
}
]
const tableBtn = [
{
type: 'edit',
btnName: 'btn.edit'
},
{
type: 'delete',
btnName: 'btn.delete'
}
]
export default {
name: 'InStoreDocuments'
name: 'InStoreDocuments',
components: { HeadForm, BaseTable, Pagination, MethodBtn, inStoreDocumentsAdd },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '入库单号,托盘号或成品内控码',
param: 'name',
width: 300
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
topBtnConfig,
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
tableBtn,
total: 0,
trueWidth: 80,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const packCodeList = ['01', '02', '03', '04', '05']
for (let i = 0; i < num; i++) {
const obj = {}
obj.receiptNo = '200101' + i
obj.trayID = '1020' + i
obj.internalControlCode = '202210200001' + i
obj.customerCode = '20221020100' + i
obj.num = parseInt(Math.random() * 200 + 100)
const sj = Math.floor(Math.random() * 5)
obj.productDpec = spcList[sj]
obj.batch = '20221003' + i
obj.packCode = packCodeList[sj]
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
},
clickTopBtn(val) {
console.log(val)
this.$refs.inStoreDocumentsAdd.init()
this.showTitle = '新增'
},
handleClick(val) {
// console.log(val)
if (val.type === 'delete') {
this.$confirm('确定删除入库单号为[ ' + val.data.receiptNo + ' ]的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
})
} else {
console.log(val)
this.showTitle = '编辑'
this.$refs.inStoreDocumentsAdd.init(val.data)
}
}
}
}
</script>

View File

@@ -1,8 +1,130 @@
<template>
<div>入库作业</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'operationCode',
label: '作业号'
},
{
prop: 'receiptNo',
label: '入库单号'
},
{
prop: 'goodsArea',
label: '货位'
},
{
prop: 'startTime',
label: '开始时间'
},
{
prop: 'endTime',
label: '结束时间'
},
{
prop: 'driverCode',
label: '司机/AGV编号'
}
]
export default {
name: 'WarehouseOperation'
name: 'WarehouseOperation',
components: { HeadForm, BaseTable, Pagination },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '作业号或入库单号',
param: 'name',
width: 250
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime'
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
total: 0,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
for (let i = 0; i < num; i++) {
const obj = {}
obj.operationCode = '200101' + i
obj.receiptNo = '1020' + i
obj.goodsArea = '1-1-' + i
obj.startTime = '2022-10-' + (i + 1)
obj.endTime = '2022-10-' + (i + 2)
obj.driverCode = 'd20152' + i
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
},
clickTopBtn(val) {
console.log(val)
this.$refs.inStoreDocumentsAdd.init()
this.showTitle = '新增'
}
}
}
</script>

View File

@@ -1,8 +1,112 @@
<template>
<div>2</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'productName',
label: '品名'
},
{
prop: 'spec',
label: '规格'
},
{
prop: 'materialCode',
label: '物料编码'
},
{
prop: 'storeArea',
label: '库区'
},
{
prop: 'num',
label: '库存数量'
}
]
export default {
name: 'Inventory'
name: 'Inventory',
components: { HeadForm, BaseTable, Pagination },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '品名,物料编码,库区',
param: 'name',
width: 250
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
total: 0,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const storeAreaList = ['A区', 'B区', 'C区', 'D区', 'E区']
for (let i = 0; i < num; i++) {
const obj = {}
obj.productName = i + 1
const sj = Math.floor(Math.random() * 5)
obj.spec = spcList[sj]
obj.materialCode = '20314655' + i
obj.storeArea = storeAreaList[sj]
obj.num = Math.floor(Math.random() * 2000)
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
}
}
}
</script>

View File

@@ -1,8 +1,154 @@
<template>
<div>1</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'productName',
label: '品名'
},
{
prop: 'spec',
label: '规格'
},
{
prop: 'status',
label: '库存状态'
},
{
prop: 'materialCode',
label: '物料编码'
},
{
prop: 'storeArea',
label: '库区'
},
{
prop: 'goodsArea',
label: '货位'
},
{
prop: 'trayID',
label: '托盘号'
},
{
prop: 'productionTime',
label: '生产日期'
},
{
prop: 'validityTime',
label: '有效期'
},
{
prop: 'batch',
label: '批次号'
},
{
prop: 'num',
label: '库存数量'
}
]
export default {
name: 'InventoryQuery'
name: 'InventoryQuery',
components: { HeadForm, BaseTable, Pagination },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '请输入库区,货位,物料编码,托盘条码',
param: 'name',
width: 300
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime'
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
total: 0,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const statusList = ['已分配', '未分配', '状态1', '状态2', '状态3']
const storeAreaList = ['A区', 'B区', 'C区', 'D区', 'E区']
for (let i = 0; i < num; i++) {
const obj = {}
obj.productName = i + 1
const sj = Math.floor(Math.random() * 5)
obj.spec = spcList[sj]
obj.status = statusList[sj]
obj.materialCode = '20314655' + i
obj.storeArea = storeAreaList[sj]
obj.goodsArea = '1-1-' + i
obj.trayID = '10210' + i
obj.productionTime = '2022-10-' + (i + 2)
obj.validityTime = Math.floor(Math.random() * 36) + '个月'
obj.batch = '202210255643' + i
obj.num = Math.floor(Math.random() * 2000)
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
}
}
}
</script>

View File

@@ -1,8 +1,140 @@
<template>
<div>8</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'goodsAreaCode',
label: '货位编码'
},
{
prop: 'goodsAreaName',
label: '货位名称'
},
{
prop: 'goodsAreaStatus',
label: '货位状态'
},
{
prop: 'roadway',
label: '巷道'
},
{
prop: 'storeArea',
label: '库区'
},
{
prop: 'store',
label: '仓库'
},
{
prop: 'warehousingLock',
label: '入库锁'
},
{
prop: 'outboundLock',
label: '出库锁'
}
]
export default {
name: 'LocationQuery'
name: 'LocationQuery',
components: { HeadForm, BaseTable, Pagination },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '盘点单号,品名,物料编码',
param: 'name',
width: 250
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime'
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
total: 0,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
for (let i = 0; i < num; i++) {
const obj = {}
obj.goodsAreaCode = '3200101' + i
obj.goodsAreaName = '3200101' + i
obj.goodsAreaStatus = i + 1
obj.roadway = Math.floor(Math.random() * 5 + 1)
obj.storeArea = i
obj.store = i
obj.warehousingLock = i
obj.outboundLock = i
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
},
clickTopBtn(val) {
console.log(val)
this.$refs.inStoreDocumentsAdd.init()
this.showTitle = '新增'
}
}
}
</script>

View File

@@ -1,8 +1,148 @@
<template>
<div>2</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'inventoryNumber',
label: '盘点单号'
},
{
prop: 'productName',
label: '品名'
},
{
prop: 'spec',
label: '规格'
},
{
prop: 'materialCode',
label: '物料编码'
},
{
prop: 'trayID',
label: '托盘号'
},
{
prop: 'num',
label: '库存数量'
},
{
prop: 'takeNum',
label: '盘点数量'
},
{
prop: 'takeTime',
label: '盘点时间'
},
{
prop: 'operator',
label: '操作人'
}
]
export default {
name: 'StockTaking'
name: 'StockTaking',
components: { HeadForm, BaseTable, Pagination },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '盘点单号,品名,物料编码',
param: 'name',
width: 250
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime'
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
total: 0,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const nameList = ['张明', '李燕', '王一', '张强', '王四']
for (let i = 0; i < num; i++) {
const obj = {}
obj.inventoryNumber = '200101' + i
obj.productName = i + 1
const sj = Math.floor(Math.random() * 5)
obj.spec = spcList[sj]
obj.materialCode = '20314655' + i
obj.trayID = '1020' + i
obj.num = Math.floor(Math.random() * 2000)
obj.takeNum = Math.floor(Math.random() * 2000)
obj.takeTime = '2022-10-' + (i + 2)
obj.operator = nameList[sj]
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
},
clickTopBtn(val) {
console.log(val)
this.$refs.inStoreDocumentsAdd.init()
this.showTitle = '新增'
}
}
}
</script>

View File

@@ -0,0 +1,88 @@
<template>
<div>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="50%"
>
<el-form ref="formList" label-position="right" label-width="80px" :model="formList">
<el-form-item label="出库单号" prop="outboundOrderNo">
<el-input v-model="formList.outboundOrderNo" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="formList.customerName" />
</el-form-item>
<el-form-item label="发货缓存区" prop="shipmentCacheArea">
<el-input v-model="formList.shipmentCacheArea" />
</el-form-item>
<el-form-item label="规格" prop="spec">
<el-input v-model="formList.spec" />
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input v-model="formList.num" />
</el-form-item>
<el-form-item label="要求发货时间" prop="deliveryTime">
<el-input v-model="formList.deliveryTime" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="resetForm('formList')"> </el-button>
<el-button type="primary" @click="submitForm('formList')"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'OutStoreDocumentsAdd',
props: {
dialogTitle: {
type: String,
required: true
}
},
data() {
return {
dialogVisible: false,
formList: {
outboundOrderNo: '',
customerName: '',
shipmentCacheArea: '',
spec: '',
num: '',
deliveryTime: ''
}
}
},
mounted() {},
methods: {
init(val) {
if (val) {
console.log(val)
this.$nextTick(() => {
this.formList.outboundOrderNo = val.outboundOrderNo
this.formList.customerName = val.customerName
this.formList.shipmentCacheArea = val.shipmentCacheArea
this.formList.spec = val.spec
this.formList.num = val.num
this.formList.deliveryTime = val.deliveryTime
})
}
this.dialogVisible = true
},
submitForm(formName) {
this.$refs[formName].resetFields()
this.dialogVisible = false
this.$message({
type: 'success',
message: this.dialogTitle + '成功'
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
console.log(this.formList)
this.dialogVisible = false
}
}
}
</script>

View File

@@ -1,8 +1,181 @@
<template>
<div>1</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:top-btn-config="topBtnConfig"
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:method-list="tableBtn"
:width="trueWidth"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
<out-store-documents-add ref="outStoreDocumentsAdd" :dialog-title="showTitle" />
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index'
import outStoreDocumentsAdd from './components/outStoreDocumentsAdd.vue'
const topBtnConfig = [
{
type: 'add',
btnName: 'btn.add'
}
]
const tableProps = [
{
prop: 'outboundOrderNo',
label: '出库单号'
},
{
prop: 'customerName',
label: '客户名称'
},
{
prop: 'shipmentCacheArea',
label: '发货缓存区'
},
{
prop: 'spec',
label: '规格'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'deliveryTime',
label: '要求发货时间'
}
]
const tableBtn = [
{
type: 'edit',
btnName: 'btn.edit'
},
{
type: 'delete',
btnName: 'btn.delete'
},
{
type: 'print',
btnName: 'btn.print'
}
]
export default {
name: 'OutStoreDocuments'
name: 'OutStoreDocuments',
components: { HeadForm, BaseTable, Pagination, MethodBtn, outStoreDocumentsAdd },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '出库单号或客户名称',
param: 'name',
width: 300
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
topBtnConfig,
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
tableBtn,
total: 0,
trueWidth: 120,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
for (let i = 0; i < num; i++) {
const obj = {}
obj.outboundOrderNo = '1020' + i
obj.customerName = '客户' + i
obj.shipmentCacheArea = '20221020100' + i
obj.num = parseInt(Math.random() * 200 + 100)
const sj = Math.floor(Math.random() * 5)
obj.spec = spcList[sj]
obj.deliveryTime = '2022-10-' + (i + 1)
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
},
clickTopBtn(val) {
console.log(val)
this.$refs.outStoreDocumentsAdd.init()
this.showTitle = '新增'
},
handleClick(val) {
// console.log(val)
if (val.type === 'delete') {
this.$confirm('确定删除出库单号为[ ' + val.data.outboundOrderNo + ' ]的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
})
} else if (val.type === 'edit') {
console.log(val)
this.showTitle = '编辑'
this.$refs.outStoreDocumentsAdd.init(val.data)
} else {
this.$message({
type: 'success',
message: '打印成功'
})
}
}
}
}
</script>

View File

@@ -1,8 +1,180 @@
<template>
<div>2</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:method-list="tableBtn"
:width="trueWidth"
@clickBtn="handleClick"
/>
</base-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
<out-store-documents-add ref="outStoreDocumentsAdd" :dialog-title="showTitle" />
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index'
import outStoreDocumentsAdd from './components/outStoreDocumentsAdd.vue'
const tableProps = [
{
prop: 'operationCode',
label: '作业号'
},
{
prop: 'outboundOrderNo',
label: '出库单号'
},
{
prop: 'goodsArea',
label: '货位'
},
{
prop: 'shipmentCacheArea',
label: '缓存区号'
},
{
prop: 'startTime',
label: '开始时间'
},
{
prop: 'endTime',
label: '结束时间'
},
{
prop: 'driverCode',
label: '司机/AGV编号'
}
]
const tableBtn = [
{
type: 'complete',
btnName: 'btn.complete'
},
{
type: 'cancellation',
btnName: 'btn.cancellation'
}
]
export default {
name: 'OutStoreOperation'
name: 'OutStoreOperation',
components: { HeadForm, BaseTable, Pagination, MethodBtn, outStoreDocumentsAdd },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '作业号或出库单号',
param: 'name',
width: 300
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime'
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(275),
tableProps,
list: [],
listLoading: false,
tableBtn,
total: 0,
trueWidth: 80,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(275)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
for (let i = 0; i < num; i++) {
const obj = {}
obj.operationCode = '200101' + i
obj.outboundOrderNo = '1020' + i
obj.goodsArea = '1-1-' + i
obj.shipmentCacheArea = '20221020100' + i
obj.startTime = '2022-10-' + (i + 1)
obj.endTime = '2022-10-' + (i + 2)
obj.driverCode = 'd20152' + i
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
},
handleClick(val) {
// console.log(val)
if (val.type === 'complete') {
this.$confirm('确定完成[ ' + val.data.outboundOrderNo + ' ]的吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
this.$message({
type: 'success',
message: '确定完成成功'
})
this.getList()
})
} else {
this.$confirm('确定作废[ ' + val.data.outboundOrderNo + ' ]的吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
this.$message({
type: 'success',
message: '确定作废成功'
})
this.getList()
})
}
}
}
}
</script>

View File

@@ -1,8 +1,136 @@
<template>
<div>12134545456</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<div style="text-align:right">
<span>合计 265395</span>
</div>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'orderCode',
label: '单号'
},
{
prop: 'type',
label: '类型'
},
{
prop: 'productName',
label: '品名'
},
{
prop: 'spec',
label: '规格'
},
{
prop: 'materialCode',
label: '物料编码'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'time',
label: '时间'
}
]
export default {
name: 'InventoryReport'
name: 'InventoryReport',
components: { HeadForm, BaseTable, Pagination },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '单号,品名,物料编码',
param: 'name',
width: 300
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime'
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(295),
tableProps,
list: [],
listLoading: false,
total: 0,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(295)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
for (let i = 0; i < num; i++) {
const obj = {}
obj.orderCode = '20314655' + i
const sj = Math.floor(Math.random() * 5)
obj.spec = spcList[sj]
obj.materialCode = '20314655' + i
obj.productName = '10210' + i
obj.time = '2022-10-' + (i + 2)
obj.type = Math.floor(Math.random() * 36) + '型'
obj.batch = '202210255643' + i
obj.num = Math.floor(Math.random() * 2000)
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
}
}
}
</script>

View File

@@ -1,8 +1,136 @@
<template>
<div>outStoreReport</div>
<div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<div style="text-align:right">
<span>合计 265395</span>
</div>
<base-table
:page="listQuery.current"
:limit="listQuery.size"
:height="tableH"
:table-config="tableProps"
:table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/>
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList()"
/>
</div>
</template>
<script>
import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index'
const tableProps = [
{
prop: 'orderCode',
label: '单号'
},
{
prop: 'type',
label: '类型'
},
{
prop: 'productName',
label: '品名'
},
{
prop: 'spec',
label: '规格'
},
{
prop: 'materialCode',
label: '物料编码'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'time',
label: '时间'
}
]
export default {
name: 'OutStoreReport'
name: 'OutStoreReport',
components: { HeadForm, BaseTable, Pagination },
data() {
return {
headFormConfig: [
{
type: 'input',
label: '关键字',
placeholder: '单号,品名,物料编码',
param: 'name',
width: 300
},
{
type: 'datePicker',
label: '时间范围',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime'
},
{
type: 'button',
btnName: 'btn.search',
name: 'search',
color: 'primary'
}
],
listQuery: {
current: 1,
size: 20
},
tableH: tableHeight(295),
tableProps,
list: [],
listLoading: false,
total: 0,
showTitle: ''
}
},
mounted() {
window.addEventListener('resize', () => {
this.tableH = tableHeight(295)
})
this.getList()
},
methods: {
getList() {
const temp = []
const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
for (let i = 0; i < num; i++) {
const obj = {}
obj.orderCode = '20314655' + i
const sj = Math.floor(Math.random() * 5)
obj.spec = spcList[sj]
obj.materialCode = '20314655' + i
obj.productName = '10210' + i
obj.time = '2022-10-' + (i + 2)
obj.type = Math.floor(Math.random() * 36) + '型'
obj.batch = '202210255643' + i
obj.num = Math.floor(Math.random() * 2000)
temp.push(obj)
}
this.list = temp
this.total = num
},
btnClick(val) {
console.log(val)
this.getList()
}
}
}
</script>