优化
This commit is contained in:
@@ -29,6 +29,7 @@ import './permission' // permission control
|
|||||||
|
|
||||||
import { useDict } from '@/utils/dict'
|
import { useDict } from '@/utils/dict'
|
||||||
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/manage'
|
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/manage'
|
||||||
|
import { tableInfoRowClick } from '@/utils/tableHelper'
|
||||||
|
|
||||||
// 分页组件
|
// 分页组件
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
@@ -58,6 +59,7 @@ app.config.globalProperties.handleTree = handleTree
|
|||||||
app.config.globalProperties.addDateRange = addDateRange
|
app.config.globalProperties.addDateRange = addDateRange
|
||||||
app.config.globalProperties.selectDictLabel = selectDictLabel
|
app.config.globalProperties.selectDictLabel = selectDictLabel
|
||||||
app.config.globalProperties.selectDictLabels = selectDictLabels
|
app.config.globalProperties.selectDictLabels = selectDictLabels
|
||||||
|
app.config.globalProperties.tableInfoRowClick = tableInfoRowClick
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
app.component('DictTag', DictTag)
|
app.component('DictTag', DictTag)
|
||||||
|
|||||||
4
src/utils/tableHelper.js
Normal file
4
src/utils/tableHelper.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export const tableInfoRowClick = (row, ref) => {
|
||||||
|
console.log(row, ref);
|
||||||
|
ref.setCurrentRow(row);
|
||||||
|
};
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改仓库信息对话框 -->
|
<!-- 添加或修改仓库信息对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="500px">
|
||||||
<el-form ref="warehouseinfoRef" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="warehouseinfoRef" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="大库编码" prop="parentWarehouseCode">
|
<el-form-item label="大库编码" prop="parentWarehouseCode">
|
||||||
<el-input v-model="form.parentWarehouseCode" placeholder="请输入大库编码" />
|
<el-input v-model="form.parentWarehouseCode" placeholder="请输入大库编码" />
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="loading" ref="billTableRef" :data="billList" highlight-current-row @row-click="tableBillRowClick" :row-class-name="tableBillRowClassName" @row-dblclick="billClick"
|
<el-table v-loading="loading" ref="billTableRef" :data="billList" highlight-current-row @row-click="(row) => tableInfoRowClick(row, billTableRef)" :row-class-name="tableBillRowClassName" @row-dblclick="billClick"
|
||||||
@current-change="uploadSelectionChange">
|
@current-change="uploadSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="单据号" align="center" prop="billNo" width="180" />
|
<el-table-column label="单据号" align="center" prop="billNo" width="180" />
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
<el-button type="primary" plain icon="Delete" @click="handleOneClickStockDel">一键删除</el-button>
|
<el-button type="primary" plain icon="Delete" @click="handleOneClickStockDel">一键删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="detailLoading" show-overflow-tooltip border :data="stockList"
|
<el-table v-loading="detailLoading" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" show-overflow-tooltip border :data="stockList"
|
||||||
@selection-change="printSelectionChange">
|
@selection-change="printSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||||
@@ -1128,9 +1128,11 @@ const delData = (row) => {
|
|||||||
|
|
||||||
// 单击单据
|
// 单击单据
|
||||||
const billTableRef = ref(null);
|
const billTableRef = ref(null);
|
||||||
const tableBillRowClick = (row, event, column) => {
|
// 单击列表的颜色
|
||||||
billTableRef.value.setCurrentRow(row)
|
const infoTableRef = ref(null);
|
||||||
}
|
// const tableInfoRowClick = (row, ref) => {
|
||||||
|
// ref.setCurrentRow(row)
|
||||||
|
// }
|
||||||
|
|
||||||
//双击单据,查询明细
|
//双击单据,查询明细
|
||||||
const billDoubleClickObj = ref({});
|
const billDoubleClickObj = ref({});
|
||||||
|
|||||||
@@ -50,6 +50,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" border
|
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" border
|
||||||
|
ref="infoTableRef"
|
||||||
|
highlight-current-row
|
||||||
|
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
|
||||||
@@ -100,7 +103,7 @@
|
|||||||
<printBill :billAllObj="printList" />
|
<printBill :billAllObj="printList" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加或修改库存单据主对话框 -->
|
<!-- 添加或修改库存单据主对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" append-to-body width="70%">
|
<el-dialog :title="title" v-model="open" width="70%" :z-index="4" :close-on-click-modal="false" :draggable="true">
|
||||||
<el-form ref="stockRef" :model="storeData" :rules="rules">
|
<el-form ref="stockRef" :model="storeData" :rules="rules">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -240,30 +243,11 @@ import { addOutbound } from "@/api/wisdom/outbound"
|
|||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const outboundList = ref([]);
|
|
||||||
const open = ref(false);
|
|
||||||
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const ids = ref([]);
|
|
||||||
|
|
||||||
const total = ref(0);
|
|
||||||
const title = ref("");
|
|
||||||
|
|
||||||
const planList = ref([]); //从供应计划中添加列表
|
|
||||||
|
|
||||||
const storeTypeList = ref([]); //出库类型下拉数据
|
|
||||||
const wzTypeList = ref([]); //施工队下拉数据
|
|
||||||
|
|
||||||
const personList = ref([]); //理货员下拉数据
|
|
||||||
const orderNum = ref("") //搜索条件:订单号
|
|
||||||
const showContent = ref(false); // 控制打印内容是否显示
|
|
||||||
const dateStr = ref("") //打印单据生成的日期
|
|
||||||
const printList = ref([]) //要打印的数据列表
|
|
||||||
const kwOptions = ref([]); //库位下拉
|
|
||||||
const borrowTime = ref([])
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
|
||||||
storeData: {
|
storeData: {
|
||||||
ckType: "JLCK"
|
ckType: "JLCK"
|
||||||
}, //借料数据
|
}, //借料数据
|
||||||
@@ -294,8 +278,6 @@ const data = reactive({
|
|||||||
printViewInfo: {
|
printViewInfo: {
|
||||||
id: "printMe", //打印区域的唯一的id属性
|
id: "printMe", //打印区域的唯一的id属性
|
||||||
popTitle: '入库信息打印',
|
popTitle: '入库信息打印',
|
||||||
|
|
||||||
|
|
||||||
beforeOpenCallback() {
|
beforeOpenCallback() {
|
||||||
showContent.value = false;
|
showContent.value = false;
|
||||||
}, // 开始打印之前的callback
|
}, // 开始打印之前的callback
|
||||||
@@ -308,13 +290,12 @@ const data = reactive({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, storeData, rules, form, printViewInfo, outQueryParams } = toRefs(data);
|
const { queryParams, storeData, rules, printViewInfo, outQueryParams } = toRefs(data);
|
||||||
|
|
||||||
const statusList = ref([
|
const statusList = ref([
|
||||||
{ value: 1, label: '未还料', elTagType: "danger", elTagClass: null },
|
{ value: 1, label: '未还料', elTagType: "danger", elTagClass: null },
|
||||||
{ value: 2, label: '已还料', elTagType: "primary", elTagClass: null }
|
{ value: 2, label: '已还料', elTagType: "primary", elTagClass: null }
|
||||||
])
|
])
|
||||||
|
|
||||||
const dictTagData = () => {
|
const dictTagData = () => {
|
||||||
return statusList.value.map(item => ({
|
return statusList.value.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
@@ -323,6 +304,10 @@ const dictTagData = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询库存单据主列表 */
|
/** 查询库存单据主列表 */
|
||||||
|
const outboundList = ref([]);
|
||||||
|
const infoTableRef = ref(null);
|
||||||
|
const loading = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
listStock({ ...queryParams.value, bizType: '2' }).then(response => {
|
listStock({ ...queryParams.value, bizType: '2' }).then(response => {
|
||||||
@@ -333,23 +318,8 @@ function getList() {
|
|||||||
}
|
}
|
||||||
getList();
|
getList();
|
||||||
|
|
||||||
// 取消按钮
|
|
||||||
function cancel() {
|
|
||||||
open.value = false;
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 表单重置
|
|
||||||
function reset() {
|
|
||||||
planList.value = []
|
|
||||||
storeData.value = {
|
|
||||||
ckType: "JLCK"
|
|
||||||
}
|
|
||||||
orderNum.value = ""
|
|
||||||
proxy.resetForm("stockRef");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
const borrowTime = ref([])
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
if (borrowTime.value && borrowTime.value.length > 0) {
|
if (borrowTime.value && borrowTime.value.length > 0) {
|
||||||
queryParams.value.startDate = borrowTime.value[0]
|
queryParams.value.startDate = borrowTime.value[0]
|
||||||
@@ -369,56 +339,44 @@ function resetQuery() {
|
|||||||
handleQuery();
|
handleQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
//出库 多选框选中数据
|
//获取出库类型下拉数据
|
||||||
function handleSelectionChange(selection) {
|
const storeTypeList = ref([]); //出库类型下拉数据
|
||||||
ids.value = selection.map(info => info.id)
|
const getOutTypeList = () => {
|
||||||
}
|
listOuttype({ pageNum: 1, pageSize: 50 }).then(response => {
|
||||||
//打印单据 多选框选中数据
|
storeTypeList.value = response.rows
|
||||||
function printSelectionChange(selection) {
|
})
|
||||||
printList.value = selection
|
|
||||||
queryParams.value.ids = selection.map(item => item.id)
|
|
||||||
// console.log(queryParams.value.ids)
|
|
||||||
}
|
|
||||||
//打印单据
|
|
||||||
function handlePrint() {
|
|
||||||
if (printList.value.length == 0) {
|
|
||||||
proxy.$modal.msgError("请勾选数据");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const date = new Date();
|
|
||||||
const year = date.getFullYear();
|
|
||||||
const month = date.getMonth() + 1; // 月份从0开始,需要加1
|
|
||||||
const day = date.getDate();
|
|
||||||
const hour = date.getHours();
|
|
||||||
const minute = date.getMinutes();
|
|
||||||
const second = date.getSeconds();
|
|
||||||
dateStr.value = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second
|
|
||||||
showContent.value = true
|
|
||||||
}
|
}
|
||||||
|
getOutTypeList()
|
||||||
|
|
||||||
|
// 获取施工队下拉数据
|
||||||
|
const wzTypeList = ref([]); //施工队下拉数据
|
||||||
|
const getConstructionList = () => {
|
||||||
|
listConstruction({ pageNum: 1, pageSize: 50 }).then(response => {
|
||||||
|
wzTypeList.value = response.rows
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getConstructionList()
|
||||||
|
|
||||||
|
// 获取理货员下拉数据
|
||||||
|
const personList = ref([]); //理货员下拉数据
|
||||||
|
const getPersonList = () => {
|
||||||
|
personListDict().then(response => {
|
||||||
|
personList.value = response.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getPersonList()
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
|
const open = ref(false);
|
||||||
|
const title = ref("");
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset();
|
reset();
|
||||||
open.value = true;
|
open.value = true;
|
||||||
title.value = "添加借料单据";
|
title.value = "添加借料单据";
|
||||||
//获取出库类型下拉数据
|
|
||||||
listOuttype({ pageNum: 1, pageSize: 50 }).then(response => {
|
|
||||||
storeTypeList.value = response.rows
|
|
||||||
})
|
|
||||||
//获取施工队下拉数据
|
|
||||||
listConstruction({ pageNum: 1, pageSize: 50 }).then(response => {
|
|
||||||
wzTypeList.value = response.rows
|
|
||||||
})
|
|
||||||
|
|
||||||
//理货员下拉数据
|
|
||||||
personListDict().then(response => {
|
|
||||||
personList.value = response.data
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询库存中数据 搜索
|
//查询库存中数据 搜索
|
||||||
|
const planList = ref([]); //从供应计划中添加列表
|
||||||
function searchPlan() {
|
function searchPlan() {
|
||||||
if (!outQueryParams.value.xmNo && !outQueryParams.value.wlNo && !outQueryParams.value.sapNo) {
|
if (!outQueryParams.value.xmNo && !outQueryParams.value.wlNo && !outQueryParams.value.sapNo) {
|
||||||
proxy.$modal.msgWarning("查询条件不能为空");
|
proxy.$modal.msgWarning("查询条件不能为空");
|
||||||
@@ -435,15 +393,17 @@ function searchPlan() {
|
|||||||
planList.value = response.rows
|
planList.value = response.rows
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//出库 多选框选中数据
|
||||||
|
const ids = ref([]);
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map(info => info.id)
|
||||||
|
}
|
||||||
|
|
||||||
/** 借料出库 提交按钮 */
|
/** 借料出库 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["stockRef"].validate(valid => {
|
proxy.$refs["stockRef"].validate(valid => {
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (ids.value.length == 0) {
|
if (ids.value.length == 0) {
|
||||||
proxy.$modal.msgError("请勾选数据");
|
proxy.$modal.msgError("请勾选数据");
|
||||||
@@ -476,6 +436,46 @@ function submitForm() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表单重置
|
||||||
|
function reset() {
|
||||||
|
planList.value = []
|
||||||
|
storeData.value = {
|
||||||
|
ckType: "JLCK"
|
||||||
|
}
|
||||||
|
proxy.resetForm("stockRef");
|
||||||
|
}
|
||||||
|
|
||||||
|
//打印单据 多选框选中数据
|
||||||
|
const printList = ref([]) //要打印的数据列表
|
||||||
|
function printSelectionChange(selection) {
|
||||||
|
printList.value = selection
|
||||||
|
}
|
||||||
|
|
||||||
|
//打印单据
|
||||||
|
const dateStr = ref("") //打印单据生成的日期
|
||||||
|
const showContent = ref(false); // 控制打印内容是否显示
|
||||||
|
function handlePrint() {
|
||||||
|
if (printList.value.length == 0) {
|
||||||
|
proxy.$modal.msgError("请勾选数据");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const date = new Date();
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = date.getMonth() + 1; // 月份从0开始,需要加1
|
||||||
|
const day = date.getDate();
|
||||||
|
const hour = date.getHours();
|
||||||
|
const minute = date.getMinutes();
|
||||||
|
const second = date.getSeconds();
|
||||||
|
dateStr.value = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second
|
||||||
|
showContent.value = true
|
||||||
|
}
|
||||||
|
|
||||||
const returnId = ref([])
|
const returnId = ref([])
|
||||||
const returnData = ref({})
|
const returnData = ref({})
|
||||||
const returnOpen = ref(false)
|
const returnOpen = ref(false)
|
||||||
@@ -525,60 +525,12 @@ function warehouseFun() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
warehouseFun()
|
warehouseFun()
|
||||||
//库位字典
|
|
||||||
function pcodeList(value) {
|
|
||||||
console.log(value)
|
|
||||||
getKwAllList(value[1]).then(response => {
|
|
||||||
kwOptions.value = response.data
|
|
||||||
returnData.value.pcode = ""
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.el-table .warning-row {
|
|
||||||
--el-table-tr-bg-color: var(--el-color-warning-light-9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-table .success-row {
|
|
||||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleBox {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.printMeBox {
|
.printMeBox {
|
||||||
div {
|
div {
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.topBox {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topEveryBox {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tableBox {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.oneLineBox {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.everyBox {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottomBox {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -28,13 +28,13 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="loading" :data="recordList" border show-overflow-tooltip>
|
<el-table v-loading="loading" :data="recordList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" border show-overflow-tooltip>
|
||||||
<el-table-column label="物料描述" align="center" prop="wlMs" />
|
<el-table-column label="物料描述" align="center" prop="wlMs" />
|
||||||
<el-table-column label="供应商" align="center" prop="gysMc" />
|
<el-table-column label="供应商" align="center" prop="gysMc" />
|
||||||
<el-table-column label="项目编号" align="center" prop="xmNo" />
|
<el-table-column label="项目编号" align="center" prop="xmNo" />
|
||||||
@@ -71,226 +71,71 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改移库记录对话框 -->
|
|
||||||
<!-- :visible.sync="open" -->
|
|
||||||
<el-dialog :title="title" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="关联的库存单据ID" prop="rkId">
|
|
||||||
<el-input v-model="form.rkId" placeholder="请输入关联的库存单据ID" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="实物ID" prop="entityId">
|
|
||||||
<el-input v-model="form.entityId" placeholder="请输入实物ID" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="原仓库" prop="fromCangku">
|
|
||||||
<el-input v-model="form.fromCangku" placeholder="请输入原仓库" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="原库位码" prop="fromPcode">
|
|
||||||
<el-input v-model="form.fromPcode" placeholder="请输入原库位码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="原托盘码" prop="fromTrayCode">
|
|
||||||
<el-input v-model="form.fromTrayCode" placeholder="请输入原托盘码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="目标仓库" prop="toCangku">
|
|
||||||
<el-input v-model="form.toCangku" placeholder="请输入目标仓库" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="目标库位码" prop="toPcode">
|
|
||||||
<el-input v-model="form.toPcode" placeholder="请输入目标库位码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="目标托盘码" prop="toTrayCode">
|
|
||||||
<el-input v-model="form.toTrayCode" placeholder="请输入目标托盘码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="移库原因" prop="moveReason">
|
|
||||||
<el-input v-model="form.moveReason" placeholder="请输入移库原因" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作人" prop="movedBy">
|
|
||||||
<el-input v-model="form.movedBy" placeholder="请输入操作人" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作时间" prop="movedAt">
|
|
||||||
<el-input v-model="form.movedAt" placeholder="请输入操作时间" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="逻辑删除标志" prop="isDelete">
|
|
||||||
<el-input v-model="form.isDelete" placeholder="请输入逻辑删除标志" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<!-- slot="footer" -->
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup name="Move">
|
||||||
import { listRecord, delMove } from "@/api/wisdom/move";
|
import { listRecord, delMove } from "@/api/wisdom/move";
|
||||||
import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "move",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
const showSearch = ref(true);
|
||||||
// 总条数
|
|
||||||
total: 0,
|
// 所属仓库下拉数据
|
||||||
// 移库记录表格数据
|
const warehouseList = ref([]);
|
||||||
recordList: [],
|
const warehouseFun = () =>{
|
||||||
// 弹出层标题
|
//所属仓库下拉数据
|
||||||
title: "",
|
warehouseDict().then(response=>{
|
||||||
// 是否显示弹出层
|
warehouseList.value = response.data
|
||||||
open: false,
|
})
|
||||||
|
}
|
||||||
|
warehouseFun()
|
||||||
|
|
||||||
|
/** 查询移库记录列表 */
|
||||||
|
// 遮罩层
|
||||||
|
const loading = ref(true);
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
const queryParams = ref({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
fromCangku: null,
|
fromCangku: null,
|
||||||
toCangku: null,
|
toCangku: null,
|
||||||
xmNo:null
|
xmNo:null
|
||||||
},
|
|
||||||
warehouseList:[], //所属仓库下拉数据
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
rkId: [
|
|
||||||
{ required: true, message: "关联的库存单据ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
this.warehouseFun()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//所属仓库
|
|
||||||
warehouseFun(){
|
|
||||||
//所属仓库下拉数据
|
|
||||||
warehouseDict().then(response=>{
|
|
||||||
this.warehouseList = response.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 查询移库记录列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listRecord(this.queryParams).then(response => {
|
|
||||||
this.recordList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
});
|
||||||
},
|
// 总条数
|
||||||
// 取消按钮
|
const total = ref(0);
|
||||||
cancel() {
|
// 表格引用
|
||||||
this.open = false;
|
const infoTableRef = ref(null);
|
||||||
this.reset();
|
// 移库记录表格数据
|
||||||
},
|
const recordList = ref([]);
|
||||||
// 表单重置
|
const getList = () => {
|
||||||
reset() {
|
loading.value = true;
|
||||||
this.form = {
|
listRecord(queryParams.value).then(response => {
|
||||||
id: null,
|
recordList.value = response.rows;
|
||||||
rkId: null,
|
total.value = response.total;
|
||||||
entityId: null,
|
loading.value = false;
|
||||||
fromCangku: null,
|
});
|
||||||
fromPcode: null,
|
}
|
||||||
fromTrayCode: null,
|
getList();
|
||||||
toCangku: null,
|
|
||||||
toPcode: null,
|
|
||||||
toTrayCode: null,
|
|
||||||
moveReason: null,
|
|
||||||
movedBy: null,
|
|
||||||
movedAt: null,
|
|
||||||
createBy: null,
|
|
||||||
createTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
isDelete: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
const handleQuery = () => {
|
||||||
this.queryParams.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
this.getList();
|
getList();
|
||||||
},
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
const resetQuery = () => {
|
||||||
this.resetForm("queryForm");
|
proxy.resetForm("queryForm");
|
||||||
this.handleQuery();
|
handleQuery();
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加移库记录";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getRecord(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改移库记录";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateRecord(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addRecord(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
const delData = (row) => {
|
||||||
},
|
proxy.$modal.confirm('确定撤销该条移库记录吗?').then(function() {
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除移库记录编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delRecord(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// this.download('system/record/export', {
|
|
||||||
// ...this.queryParams
|
|
||||||
// }, `record_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
|
||||||
delData(row){
|
|
||||||
this.$modal.confirm('确定撤销该条移库记录吗?').then(function() {
|
|
||||||
return delMove(row.id);
|
return delMove(row.id);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -87,6 +87,9 @@
|
|||||||
:data="billList"
|
:data="billList"
|
||||||
:row-class-name="tableBillRowClassName"
|
:row-class-name="tableBillRowClassName"
|
||||||
@row-dblclick="billClick"
|
@row-dblclick="billClick"
|
||||||
|
ref="billTableRef"
|
||||||
|
highlight-current-row
|
||||||
|
@row-click="(row) => tableInfoRowClick(row, billTableRef)"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="单据号"
|
label="单据号"
|
||||||
@@ -221,6 +224,9 @@
|
|||||||
border
|
border
|
||||||
:data="outboundList"
|
:data="outboundList"
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
|
ref="infoTableRef"
|
||||||
|
highlight-current-row
|
||||||
|
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -1256,6 +1262,13 @@ const delData = (row) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 单击列表的颜色
|
||||||
|
const billTableRef = ref(null);
|
||||||
|
const infoTableRef = ref(null);
|
||||||
|
// const tableInfoRowClick = (row, ref) => {
|
||||||
|
// ref.setCurrentRow(row)
|
||||||
|
// }
|
||||||
|
|
||||||
// 双击主单据查询明细
|
// 双击主单据查询明细
|
||||||
const billDoubleClickObj = ref({});
|
const billDoubleClickObj = ref({});
|
||||||
const detailLoading = ref(false);
|
const detailLoading = ref(false);
|
||||||
|
|||||||
@@ -102,7 +102,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip border
|
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip border
|
||||||
:row-class-name="tableBillRowClassName">
|
:row-class-name="tableBillRowClassName"
|
||||||
|
ref="infoTableRef"
|
||||||
|
highlight-current-row
|
||||||
|
@row-click="(row) => tableInfoRowClick(row, infoTableRef)">
|
||||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||||
<el-table-column label="操作类型" align="center" prop="bizType" width="100">
|
<el-table-column label="操作类型" align="center" prop="bizType" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -310,6 +313,8 @@ materialFun()
|
|||||||
//出、入库类型下拉数据
|
//出、入库类型下拉数据
|
||||||
rklxList()
|
rklxList()
|
||||||
|
|
||||||
|
const infoTableRef = ref(null);
|
||||||
|
|
||||||
// 显示预出库的状态
|
// 显示预出库的状态
|
||||||
const tableBillRowClassName = ({ row, rowIndex }) => {
|
const tableBillRowClassName = ({ row, rowIndex }) => {
|
||||||
console.log('row===>',row);
|
console.log('row===>',row);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" border show-overflow-tooltip>
|
<el-table v-loading="loading" :data="outboundList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" @selection-change="printSelectionChange" border show-overflow-tooltip>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
|
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
|
||||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
||||||
@@ -252,6 +252,7 @@
|
|||||||
|
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const outboundList = ref([]);
|
const outboundList = ref([]);
|
||||||
|
const infoTableRef = ref(null);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
/** 查询库存单据主列表 */
|
/** 查询库存单据主列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
|
|||||||
@@ -106,6 +106,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip show-summary :summary-method="getSummaries"
|
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip show-summary :summary-method="getSummaries"
|
||||||
|
ref="infoTableRef"
|
||||||
|
highlight-current-row
|
||||||
|
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
|
||||||
border>
|
border>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||||
@@ -393,6 +396,7 @@ const { queryParams, rules } = toRefs(data);
|
|||||||
|
|
||||||
/** 查询库存单据主列表 */
|
/** 查询库存单据主列表 */
|
||||||
const stockList = ref([]);
|
const stockList = ref([]);
|
||||||
|
const infoTableRef = ref(null);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
function getList() {
|
function getList() {
|
||||||
|
|||||||
Reference in New Issue
Block a user