添加dayjs插件,入库记录出库记录,毛坯仓库调整
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
"bootstrap": "^5.3.0-alpha1",
|
||||
"clipboard": "2.0.8",
|
||||
"core-js": "3.6.5",
|
||||
"dayjs": "^1.11.11",
|
||||
"dhtmlx-gantt": "^8.0.6",
|
||||
"echarts": "^5.5.0",
|
||||
"echarts-gl": "^2.0.8",
|
||||
|
||||
@@ -55,6 +55,12 @@ import dataV from '@jiaminghi/data-view';
|
||||
//需要按需引入,先引入vue并引入element-ui
|
||||
import AFTableColumn from 'af-table-column'
|
||||
|
||||
// dayjs
|
||||
import dayjs from 'dayjs'
|
||||
import 'dayjs/locale/zh-cn' // 引入中文语言包
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
dayjs.extend(relativeTime)
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.getConfigKey = getConfigKey
|
||||
@@ -67,6 +73,7 @@ Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
Vue.prototype.handleDict = handleDict
|
||||
Vue.prototype.downFile = downFile
|
||||
Vue.prototype.$dayjs = dayjs
|
||||
|
||||
Vue.prototype.msgSuccess = function (msg) {
|
||||
this.$message({ showClose: true, message: msg, type: "success" });
|
||||
|
||||
@@ -44,7 +44,10 @@
|
||||
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:wmblankinventory:delete']" icon="el-icon-delete" size="mini" @click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" icon="el-icon-refresh" size="mini" @click="handleSynchronous">清单数据同步</el-button>
|
||||
<el-button type="info" icon="el-icon-refresh" v-hasPermi="['business:wmblankinventory:edit']" size="mini" @click="handleSynchronous">清单列表同步</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" icon="el-icon-refresh" v-hasPermi="['business:wmblankinventory:edit']" size="mini" @click="handleBlankInventoryRenew">毛坯库存更新</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@@ -147,6 +150,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<TheWmBlankRecord :ItemData="detailData" :visible.sync="TheWmBlankRecordShow" @refresh="getList"></TheWmBlankRecord>
|
||||
<TheWmBlankInventoryRenew :visible.sync="TheWmBlankInventoryRenewShow" @refresh="getList"></TheWmBlankInventoryRenew>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -159,10 +163,12 @@
|
||||
synchronousMaterial,
|
||||
} from '@/api/wmsManagement/wmBlankInventory.js';
|
||||
import TheWmBlankRecord from './components/TheWmBlankRecord/TheWmBlankRecord.vue'
|
||||
import TheWmBlankInventoryRenew from './components/TheWmBlankInventoryRenew/TheWmBlankInventoryRenew.vue'
|
||||
export default {
|
||||
name: "wmBlankInventory",
|
||||
components: {
|
||||
TheWmBlankRecord
|
||||
TheWmBlankRecord,
|
||||
TheWmBlankInventoryRenew
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -194,6 +200,7 @@
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
TheWmBlankRecordShow: false,
|
||||
TheWmBlankInventoryRenewShow: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
columns: [
|
||||
@@ -377,9 +384,12 @@
|
||||
handleDetail(row) {
|
||||
console.log(row);
|
||||
this.detailData = row;
|
||||
|
||||
this.TheWmBlankRecordShow = true;
|
||||
},
|
||||
// 毛坯数据同步
|
||||
handleBlankInventoryRenew() {
|
||||
this.TheWmBlankInventoryRenewShow = true;
|
||||
},
|
||||
// 类别字典翻译
|
||||
typeFormat(row, column) {
|
||||
return this.selectDictLabel(this.typeOptions, row.type);
|
||||
|
||||
@@ -11,17 +11,23 @@
|
||||
<!-- :model属性用于表单验证使用 比如下面的el-form-item 的 prop属性用于对表单值进行验证操作 -->
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" clearable :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
|
||||
<el-form-item label="零件号" prop="partnumber">
|
||||
<el-input v-model.trim="queryParams.partnumber" placeholder="请输入零件号" />
|
||||
<el-input v-model.trim="queryParams.partnumber" clearable placeholder="请输入零件号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="packageCodeClient">
|
||||
<el-input v-model.trim="queryParams.packageCodeClient" placeholder="请输入批次号" />
|
||||
<el-input v-model.trim="queryParams.packageCodeClient" clearable placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位编号" prop="locationCode">
|
||||
<el-input v-model.trim="queryParams.locationCode" placeholder="请输入库位编号" />
|
||||
<el-input v-model.trim="queryParams.locationCode" clearable placeholder="请输入库位编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model.trim="queryParams.description" clearable placeholder="请输入产品描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间开始" prop="entryWarehouseTimeStart">
|
||||
<el-date-picker v-model="queryParams.entryWarehouseTimeStart" type="datetime" placeholder="日期时间范围开始"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间结束" prop="entryWarehouseTimeEnd">
|
||||
<el-date-picker v-model="queryParams.entryWarehouseTimeEnd" type="datetime" placeholder="日期时间范围结束"></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入库时间" prop="entryWarehouseTime">
|
||||
<el-date-picker v-model="queryParams.entryWarehouseTime" type="datetime" placeholder="选择日期时间"></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -50,7 +56,7 @@
|
||||
<el-table-column prop="locationCode" label="库位编号" align="center" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column prop="goodsNumLogic" label="标签零件数" align="center" /> -->
|
||||
<el-table-column prop="goodsNumAction" label="实际库存" align="center" />
|
||||
<el-table-column prop="entryWarehouseTime" label="入库时间" align="center" min-width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="entryWarehouseTime" label="入库时间" align="center" min-width="160" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="createdBy" label="入库人" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
@@ -143,9 +149,20 @@
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
description: '',
|
||||
entryWarehouseTimeStart: null,
|
||||
entryWarehouseTimeEnd: null,
|
||||
sort: undefined,
|
||||
sortType: undefined,
|
||||
},
|
||||
partnumberOptions: [
|
||||
{ label: '全部', value: "" },
|
||||
{ label: '鲨鱼鳍', value: "" },
|
||||
{ label: '全部', value: "" },
|
||||
{ label: '全部', value: "" },
|
||||
{ label: '全部', value: "" },
|
||||
{ label: '全部', value: "" },
|
||||
],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 操作类型 1、add 2、edit
|
||||
@@ -186,8 +203,9 @@
|
||||
},
|
||||
created() {
|
||||
// 列表数据查询
|
||||
this.queryParams.entryWarehouseTimeStart = this.$dayjs().startOf('day').toDate();
|
||||
this.queryParams.entryWarehouseTimeEnd = this.$dayjs().endOf('day').toDate();
|
||||
this.getList()
|
||||
|
||||
var dictParams = []
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -11,20 +11,26 @@
|
||||
<!-- :model属性用于表单验证使用 比如下面的el-form-item 的 prop属性用于对表单值进行验证操作 -->
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
|
||||
<el-form-item label="出库单号" prop="fkOutOrderId">
|
||||
<el-input v-model="queryParams.fkOutOrderId" placeholder="请输入出库单号" />
|
||||
<el-input v-model.trim="queryParams.fkOutOrderId" clearable placeholder="请输入出库单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="零件号" prop="partnumber">
|
||||
<el-input v-model="queryParams.partnumber" placeholder="请输入零件号" />
|
||||
<el-input v-model.trim="queryParams.partnumber" clearable placeholder="请输入零件号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="packageCodeClient">
|
||||
<el-input v-model="queryParams.packageCodeClient" placeholder="请输入批次号" />
|
||||
<el-input v-model.trim="queryParams.packageCodeClient" clearable placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位编号" prop="locationCode">
|
||||
<el-input v-model="queryParams.locationCode" placeholder="请输入库位编号" />
|
||||
<el-input v-model.trim="queryParams.locationCode" clearable placeholder="请输入库位编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model.trim="queryParams.description" clearable placeholder="请输入产品描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出库时间开始" prop="outTimeStart">
|
||||
<el-date-picker v-model="queryParams.outTimeStart" type="datetime" placeholder="选择出库时间开始"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库时间结束" prop="outTimeEnd">
|
||||
<el-date-picker v-model="queryParams.outTimeEnd" type="datetime" placeholder="选择出库时间结束"></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="出库时间" prop="outTime">
|
||||
<el-date-picker v-model="form.outTime" type="datetime" placeholder="选择日期时间"></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -51,17 +57,17 @@
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="fkOutOrderId" label="出库单号" min-width="120" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="packageCodeClient" label="批次号" min-width="140" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="packageCodeClient" label="批次号" min-width="160" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="locationCode" label="库位编号" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="partnumber" label="零件号" min-width="120" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="description" label="描述" min-width="160" align="center" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column prop="goodsNumLogic" label="标签零件数" align="center" /> -->
|
||||
<el-table-column prop="goodsNumAction" label="出库数量" align="center" />
|
||||
<el-table-column prop="entryWarehouseTime" label="入库时间" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="outTime" label="出库时间" min-width="120" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="outTime" label="出库时间" min-width="160" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="createdBy" label="出库人" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" v-hasPermi="['wmsManagement:wmgoodsoutproduction:edit']" type="success" icon="el-icon-edit" title="编辑" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button size="mini" v-hasPermi="['wmsManagement:wmgoodsoutproduction:delete']" type="danger" icon="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></el-button>
|
||||
@@ -190,6 +196,9 @@
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
description: '',
|
||||
outTimeStart: null,
|
||||
outTimeEnd: null,
|
||||
sort: undefined,
|
||||
sortType: undefined,
|
||||
},
|
||||
@@ -245,8 +254,9 @@
|
||||
},
|
||||
created() {
|
||||
// 列表数据查询
|
||||
this.queryParams.outTimeStart = this.$dayjs().startOf('day').toDate();
|
||||
this.queryParams.outTimeEnd = this.$dayjs().endOf('day').toDate();
|
||||
this.getList()
|
||||
|
||||
var dictParams = []
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="库存记录" width="70%" :close-on-click-modal="false">
|
||||
<el-form ref="elForm" inline :model="queryParams" :rules="rules" size="medium" :label-width="labelWidth">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker v-model="queryParams.startTime" type="date" placeholder="工单开始时间" :clearable="true"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker v-model="queryParams.endTime" type="date" placeholder="工单结束时间" :clearable="true"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 数据区域 -->
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row>
|
||||
<el-table-column prop="blankNum" label="毛坯号" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="description" label="产品描述" align="center" width="280" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="specification" label="规格" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="changeQuantity" label="变动数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="font-weight: 700;">{{scope.row.type === 1? scope.row.changeQuantity : scope.row.changeQuantity * -1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="类别" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag effect="plain" v-if="scope.row.type === 1" type="success">增加</el-tag>
|
||||
<el-tag effect="plain" v-if="scope.row.type === 2" type="danger">减少</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注原因" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="createdBy" label="创建人" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="createdTime" label="创建时间" align="center" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="操作" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" v-hasPermi="['business:wmblankrecord:delete']" type="danger" icon="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<div slot="footer">
|
||||
<el-button @click="close">取消</el-button>
|
||||
<el-button type="primary" @click="handelConfirm">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
listWmBlankRecord,
|
||||
addWmBlankRecord,
|
||||
delWmBlankRecord,
|
||||
updateWmBlankRecord,
|
||||
getWmBlankRecord,
|
||||
addInventoryNum,
|
||||
reduceInventoryNum
|
||||
} from '@/api/wmsManagement/wmBlankRecord.js';
|
||||
import {
|
||||
getWmBlankInventory,
|
||||
} from '@/api/wmsManagement/wmBlankInventory.js';
|
||||
export default {
|
||||
inheritAttrs: false,
|
||||
data() {
|
||||
return {
|
||||
labelWidth: "100px",
|
||||
formLabelWidth: "100px",
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 数据列表
|
||||
dataList: [],
|
||||
// 总记录数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
rules: {},
|
||||
typeOptions: [
|
||||
{ dictLabel: '增加', dictValue: 1 },
|
||||
{ dictLabel: '减少', dictValue: 2 },
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
initData() {
|
||||
this.queryParams.startTime = this.$dayjs().startOf('day');
|
||||
this.queryParams.endTime = this.$dayjs().endOf('day');
|
||||
},
|
||||
// 查询数据
|
||||
getList() {
|
||||
// this.loading = true;
|
||||
// this.queryParams.fkBlankInventoryId = this.ItemData.id;
|
||||
// // this.queryParams.blankNum = this.ItemData.blankNum;
|
||||
// listWmBlankRecord(this.queryParams).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// this.dataList = res.data.result;
|
||||
// this.total = res.data.totalNum;
|
||||
// this.loading = false;
|
||||
// } else {
|
||||
// this.loading = false;
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.loading = false;
|
||||
// })
|
||||
},
|
||||
onOpen() {
|
||||
this.dataList = [];
|
||||
this.getList();
|
||||
},
|
||||
onClose() {
|
||||
this.$refs['elForm'].resetFields()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
emitRefresh() {
|
||||
this.$emit("refresh");
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
handelConfirm() {
|
||||
this.$refs['elForm'].validate(valid => {
|
||||
if (!valid) return
|
||||
this.submitForm();
|
||||
this.close()
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user