Browse Source

干线提货新增搜索

dev-xx
qb 1 year ago
parent
commit
df1cf1bc83
  1. 32
      src/option/distribution/arteryDistrilbutionBillLadingList.js
  2. 138
      src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue
  3. 97
      src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue
  4. 12
      src/views/supervise/management.vue

32
src/option/distribution/arteryDistrilbutionBillLadingList.js

@ -452,7 +452,7 @@ export const columnNewList = [
{ {
prop: 'waybillNo', prop: 'waybillNo',
label: '运单号', label: '运单号',
type: 1, type: 2,
values: '', values: '',
width: '150', width: '150',
checkarr: [], checkarr: [],
@ -473,7 +473,7 @@ export const columnNewList = [
{ {
prop: 'shipperName', prop: 'shipperName',
label: '发货人', label: '发货人',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -483,7 +483,7 @@ export const columnNewList = [
{ {
prop: 'customerTrain', prop: 'customerTrain',
label: '客户车次号', label: '客户车次号',
type: 1, type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -493,7 +493,27 @@ export const columnNewList = [
{ {
prop: 'shipper', prop: 'shipper',
label: '发货单位', label: '发货单位',
type: 1, type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'destinationWarehouseName',
label: '目的仓',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'consignee',
label: '收货单位',
type: 2,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
@ -503,7 +523,7 @@ export const columnNewList = [
{ {
prop: 'goodsName', prop: 'goodsName',
label: '货物名称', label: '货物名称',
type: 1, type: 2,
values: '', values: '',
width: '180', width: '180',
checkarr: [], checkarr: [],
@ -557,7 +577,7 @@ export const columnNewList = [
{ {
prop: 'remark', prop: 'remark',
label: '运单备注', label: '运单备注',
type: 1, type: 2,
values: '', values: '',
width: '150', width: '150',
checkarr: [], checkarr: [],

138
src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue

@ -215,7 +215,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="提货费用" prop="pickUpPlate"> <el-form-item label="提货费用" prop="totalFee">
<el-input-number <el-input-number
class="w100" class="w100"
controls-position="right" controls-position="right"
@ -241,6 +241,42 @@
<span>运单池</span> <span>运单池</span>
</el-divider> </el-divider>
<div v-h5uShow="!details.search">
<!-- 查询模块 -->
<el-form :inline="true" ref="oldFormNode" :model="details.query" class="header_search">
<el-form-item label="开始时间:" class="el-times" prop="stockupDate">
<!-- <el-input v-model="query.stockupArea" placeholder="请输入备货区"></el-input>-->
<el-date-picker
v-model="details.query.stockupDate"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="details.shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item class="el-btn">
<el-button type="primary" icon="el-icon-search" @click="handleOldSearch"
> </el-button
>
<el-button
icon="el-icon-delete"
@click="
() => {
oldFormNode.resetFields();
handleOldSearch();
}
"
> </el-button
>
</el-form-item>
</el-form>
</div>
<!-- 控件 --> <!-- 控件 -->
<div class="flex-c-sb"> <div class="flex-c-sb">
<div class="avue-crud__right"> <div class="avue-crud__right">
@ -312,10 +348,10 @@
<!-- 表格 --> <!-- 表格 -->
<tablecmt <tablecmt
class="tableNode mt10" class="tableNode mt10"
:columnList="details.columnNewList" :columnList="details.newColumnNewList"
:tableData="details.addInfo.newData" :tableData="details.addInfo.newRenderData"
:loading="details.loadingObj.newlistLoading" :loading="details.loadingObj.newlistLoading"
@inputTxt="inputsc" @inputTxt="newInputsc"
@timeCheck="timesc" @timeCheck="timesc"
@selectCheck="selectsc" @selectCheck="selectsc"
@selection="list => selectionChange(list, 2)" @selection="list => selectionChange(list, 2)"
@ -358,12 +394,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {
remove,
getListOwn,
getListOwnNUm,
getBillLadingExport,
} from '@/api/distribution/distrilbutionBillLading';
// //
import { import {
postPageList, postPageList,
@ -394,9 +424,11 @@ import dayjs from 'dayjs';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import type { FormInstance, FormRules } from 'element-plus'; import type { FormInstance, FormRules } from 'element-plus';
import { downloadXls, setNodeHeight, debounce } from '@/utils/util'; import { downloadXls, setNodeHeight, debounce } from '@/utils/util';
import { computed, ref, reactive, onMounted, nextTick } from 'vue'; import func from '@/utils/func';
import { computed, ref, reactive, onMounted, nextTick, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { deepClone } from 'avue-plugin-ueditor/packages/ueditor/src/upload/util';
// router // router
const $router = useRouter(); const $router = useRouter();
@ -407,9 +439,12 @@ const $store = useStore();
// //
const ruleFormRef = ref<FormInstance>(); const ruleFormRef = ref<FormInstance>();
const oldFormNode = ref<FormInstance>();
const newFormNode = ref<FormInstance>();
const details = reactive({ const details = reactive({
columnNewList, columnNewList,
newColumnNewList: deepClone(columnNewList),
/** 列表配置抽屉 */ /** 列表配置抽屉 */
drawerShow: false, drawerShow: false,
// //
@ -476,6 +511,10 @@ const details = reactive({
oldData: [], oldData: [],
/** 已选择数据 */ /** 已选择数据 */
newData: [], newData: [],
/** 已选择渲染数据 */
newRenderData: [],
/** 调度池查询信息 */
newQuery: {},
/** 未选择 -- 复选框 */ /** 未选择 -- 复选框 */
oldSelectionList: [], oldSelectionList: [],
/** 已选择 -- 复选框 */ /** 已选择 -- 复选框 */
@ -537,6 +576,8 @@ const details = reactive({
pageType: 'add', pageType: 'add',
/** 提货Id */ /** 提货Id */
billladingId: '', billladingId: '',
/** 页面id 新增为: 1, */
pageId: 0,
}); });
/** 节点信息 */ /** 节点信息 */
@ -584,6 +625,7 @@ const onLoad = async (isRefresh = false) => {
...details.addInfo.oldPages, ...details.addInfo.oldPages,
waybillNos: details.waybillNosList, waybillNos: details.waybillNosList,
id: details.billladingId, id: details.billladingId,
...details.query,
}); });
const { code, data } = res.data; const { code, data } = res.data;
@ -603,8 +645,8 @@ const onLoad = async (isRefresh = false) => {
const initPage = async () => { const initPage = async () => {
await initData(); await initData();
console.log('$route :>> ', $route);
const { type, id } = $route.query; const { type, id } = $route.query;
details.pageType = type; details.pageType = type;
details.billladingId = id; details.billladingId = id;
@ -629,12 +671,34 @@ const initPage = async () => {
delete details.form.waybillList; delete details.form.waybillList;
delete details.form.lineList; delete details.form.lineList;
} else if (details.pageType === 'add') {
details.addInfo.newData = [];
details.waybillNosList = [];
nextTick(() => {
ruleFormRef.value.resetFields();
});
} }
onLoad(); onLoad();
}; };
// initPage();
watch(
() => $route.fullPath,
() => {
const _id = $route.query.type === 'add' ? 1 : $route.query.id;
console.log('$route :>> ', $route);
if (
details.pageId === _id ||
$route.path !== '/distribution/inventory/addArteryDistrilbutionBillLadingList'
)
return;
details.pageId = _id;
initPage(); initPage();
},
{ immediate: true }
);
// //
const setTableHeight = async () => { const setTableHeight = async () => {
@ -694,8 +758,38 @@ const timesc = (index, row) => {
const inputsc = (index, row) => { const inputsc = (index, row) => {
console.log(index, row); console.log(index, row);
details.query[row.prop] = index; details.query[row.prop] = index;
if (!index) delete details.query[row.prop];
onLoad(); onLoad();
}; };
const newInputsc = (value, row) => {
// newRenderData
try {
//
const reg = new RegExp(value, 'i');
details.addInfo.newQuery[row.prop] = reg;
if (value === '') delete details.addInfo.newQuery[row.prop];
if (Object.keys(details.addInfo.newQuery).length === 0)
return (details.addInfo.newRenderData = details.addInfo.newData);
const _data = details.addInfo.newData.filter(value => {
let _flag = true;
for (let key in details.addInfo.newQuery) {
if (!details.addInfo.newQuery[key].test(value[key])) _flag = false;
if (!_flag) break;
}
return _flag;
});
details.addInfo.newRenderData = _data;
} catch (error) {
console.log('error :>> ', error);
} finally {
}
};
/** 是否显示搜索控件 */ /** 是否显示搜索控件 */
const searchHide = () => { const searchHide = () => {
details.search = !details.search; details.search = !details.search;
@ -720,6 +814,7 @@ const handleRefresh = type => {
else { else {
details.addInfo.newData = []; details.addInfo.newData = [];
details.waybillNosList = []; details.waybillNosList = [];
newInputsc('', { prop: 'aaa' });
onLoad(true); onLoad(true);
} }
}; };
@ -762,10 +857,21 @@ const getTime = dat => {
return formattedDate.replace(/\//g, '-'); return formattedDate.replace(/\//g, '-');
}; };
/** 搜索 -- 运单池 */
const handleOldSearch = () => {
if (details.query.stockupDate && details.query.stockupDate.length !== 0) {
details.query.startDateStr = details.query.stockupDate[0];
details.query.endDateStr = details.query.stockupDate[1];
} else {
delete details.query.startDateStr;
delete details.query.endDateStr;
}
onLoad(true);
};
/** 搜索节点 */ /** 搜索节点 */
const remoteMethod = val => const remoteMethod = val =>
debounce(async () => { debounce(async () => {
console.log('11231 :>> ', 11231);
details.loadingObj.nodeLoading = true; details.loadingObj.nodeLoading = true;
try { try {
@ -894,6 +1000,7 @@ const handleAddWaybill = () => {
} }
details.addInfo.newData = [...details.addInfo.newData, ..._arr]; details.addInfo.newData = [...details.addInfo.newData, ..._arr];
newInputsc('', { prop: 'aaa' });
// clearSelectionList(); // clearSelectionList();
onLoad(true); onLoad(true);
@ -913,7 +1020,7 @@ const handleRemoveWaybill = () => {
} }
details.addInfo.newData = _copyNewData; details.addInfo.newData = _copyNewData;
newInputsc('', { prop: 'aaa' });
onLoad(true); onLoad(true);
}; };
@ -1293,4 +1400,7 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
) { ) {
--el-color-danger: #f00; --el-color-danger: #f00;
} }
.header_search > div {
width: 50%;
}
</style> </style>

97
src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue

@ -39,9 +39,9 @@
<span>备注{{ deliverydata.remark }} </span> <span>备注{{ deliverydata.remark }} </span>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="!search"> <div v-h5uShow="!search">
<!-- 查询模块 --> <!-- 查询模块 -->
<el-form :inline="true" :model="query" class="el-fr-d"> <el-form :inline="true" :model="query" class="header_search">
<!-- <div class="fo-fl"> --> <!-- <div class="fo-fl"> -->
<el-form-item label="提货批次:"> <el-form-item label="提货批次:">
<el-input v-model="query.serviceNumber" placeholder="请输入提货批次"></el-input> <el-input v-model="query.serviceNumber" placeholder="请输入提货批次"></el-input>
@ -67,7 +67,7 @@
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button> <el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </div>
<el-row> <el-row>
<div class="avue-crud__header"> <div class="avue-crud__header">
<!-- 头部左侧按钮模块 --> <!-- 头部左侧按钮模块 -->
@ -91,7 +91,7 @@
</el-row> </el-row>
<tablecmt <tablecmt
:columnList="columnList" :columnList="columnList"
:tableData="data" :tableData="renderData"
:loading="loading" :loading="loading"
@inputTxt="inputsc" @inputTxt="inputsc"
@timeCheck="timesc" @timeCheck="timesc"
@ -139,25 +139,10 @@
</template> </template>
</tablecmt> </tablecmt>
<div class="col"> <div class="backbtn">
<!-- 分页模块 --> <el-button icon="CircleCheckFilled" type="primary" @click="this.$router.go(-1)">
<el-pagination 确认修改
align="right" </el-button>
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination>
<el-button icon="CircleCheckFilled" type="primary" @click="this.$router.go(-1)"
>确认修改</el-button
>
<!-- 站位的div -->
<div></div>
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -316,7 +301,7 @@ export default {
{ {
prop: 'openOrderTime', prop: 'openOrderTime',
label: '开单日期', label: '开单日期',
type: 4, type: 1,
values: '', values: '',
width: '180', width: '180',
checkarr: [], checkarr: [],
@ -381,7 +366,7 @@ export default {
{ {
prop: 'destinationWarehouseName', prop: 'destinationWarehouseName',
label: '目的仓', label: '目的仓',
type: 3, type: 2,
values: '', values: '',
width: '150', width: '150',
checkarr: [], checkarr: [],
@ -400,8 +385,8 @@ export default {
sortable: true, sortable: true,
}, },
{ {
prop: 'consigneeName', prop: 'shipper',
label: '收货人', label: '发货单位',
type: 2, type: 2,
values: '', values: '',
width: '180', width: '180',
@ -419,6 +404,26 @@ export default {
fixed: false, fixed: false,
sortable: true, sortable: true,
}, },
{
prop: 'consigneeName',
label: '收货人',
type: 2,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'consignee',
label: '收货单位',
type: 2,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'consigneeMobile', prop: 'consigneeMobile',
label: '收货电话', label: '收货电话',
@ -522,6 +527,8 @@ export default {
selectionList: [], selectionList: [],
// //
data: [], data: [],
/** 渲染数据 */
renderData: [],
/** 查询所有计费模式 */ /** 查询所有计费模式 */
chargeTypeList: [], chargeTypeList: [],
}; };
@ -601,10 +608,32 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
}, },
inputsc(index, row) { inputsc(value, row) {
this.query[row.prop] = index; try {
if (index === '') delete this.query[row.prop]; //
this.onLoad(this.page); const reg = new RegExp(value, 'i');
this.query[row.prop] = reg;
if (value === '') delete this.query[row.prop];
if (Object.keys(this.query).length === 0) return (this.renderData = this.data);
const _data = this.data.filter(value => {
let _flag = true;
for (let key in this.query) {
if (!this.query[key].test(value[key])) _flag = false;
if (!_flag) break;
}
return _flag;
});
this.renderData = _data;
} catch (error) {
console.log('error :>> ', error);
} finally {
}
}, },
timesc(index, row) { timesc(index, row) {
if (!!index) { if (!!index) {
@ -658,6 +687,7 @@ export default {
val => val.dictKey == data.chargeType val => val.dictKey == data.chargeType
).dictValue; ).dictValue;
this.data = data.waybillList; this.data = data.waybillList;
this.inputsc('', { prop: 'aaa' });
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
@ -753,4 +783,9 @@ export default {
font-size: 1.5rem; font-size: 1.5rem;
color: var(--el-color-primary); color: var(--el-color-primary);
} }
.backbtn {
margin-top: 20px;
text-align: center;
}
</style> </style>

12
src/views/supervise/management.vue

@ -34,8 +34,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="el-btn"> <el-form-item class="el-btn">
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button> <el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
</el-form-item> </el-form-item>
@ -203,7 +201,7 @@
<P>请确认传入的文件为Excel文件格式</P> <P>请确认传入的文件为Excel文件格式</P>
<a <a
href="http://47.108.51.143:9000/basic/upload/20240220/e3dcb2397124c1d60361b51473e9ae0c.xlsx" href="http://47.108.51.143:9000/logpm/upload/20240221/d71584e609b2eb09664cb155c439bf18.xlsx"
style="text-decoration: none" style="text-decoration: none"
> >
<el-button type="primary" icon="Download"> 模版下载 </el-button> <el-button type="primary" icon="Download"> 模版下载 </el-button>
@ -282,9 +280,9 @@ const examineDeptName = ref(''); //考核部门名字
const tableNode = ref(); const tableNode = ref();
const departmentName = ref(''); // const departmentName = ref(''); //
const departmentNameID = ref(''); //ID const departmentNameID = ref(''); //ID
let my_DATA=JSON.parse(localStorage.getItem('my_data')) let my_DATA = JSON.parse(localStorage.getItem('my_data'));
departmentName.value = my_DATA.departmentName// departmentName.value = my_DATA.departmentName; //
departmentNameID.value = my_DATA.department//ID departmentNameID.value = my_DATA.department; //ID
console.log(departmentName.value, '归属名称'); console.log(departmentName.value, '归属名称');
console.log(departmentNameID.value, '归属名称ID'); console.log(departmentNameID.value, '归属名称ID');
// //
@ -404,7 +402,7 @@ const rules = ref({
message: '请选择指考核范围', message: '请选择指考核范围',
trigger: ['change', 'blur'], trigger: ['change', 'blur'],
}, },
] ],
}); });
const details = reactive({ const details = reactive({
/** 弹窗 */ /** 弹窗 */

Loading…
Cancel
Save