|
|
|
@ -51,10 +51,10 @@
|
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="searchReset()" |
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="() => onLoad()" |
|
|
|
|
>搜 索</el-button |
|
|
|
|
> |
|
|
|
|
<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> |
|
|
|
|
</div> |
|
|
|
@ -117,7 +117,8 @@
|
|
|
|
|
<el-input |
|
|
|
|
type="textarea" |
|
|
|
|
placeholder="支持多合同号查询,英文逗号分隔" |
|
|
|
|
v-model="details.form.orderCode" |
|
|
|
|
v-model="details.form.orderCodes" |
|
|
|
|
@blur="() => newInputsc(details.form.orderCodes, { prop: 'orderCode' }, false)" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
@ -136,10 +137,10 @@
|
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item class="mr10"> |
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleNewSearch" |
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleFilterData" |
|
|
|
|
>搜 索</el-button |
|
|
|
|
> |
|
|
|
|
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button> |
|
|
|
|
<el-button icon="el-icon-delete" @click="handleNewRefesh">重置</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -243,8 +244,8 @@
|
|
|
|
|
<edittablehead |
|
|
|
|
@closce="showdrawer" |
|
|
|
|
:drawerShow="drawerShow" |
|
|
|
|
:columnList="details.columnList" |
|
|
|
|
v-model="details.columnList" |
|
|
|
|
:columnList="details.oldColumnList" |
|
|
|
|
v-model="details.oldColumnList" |
|
|
|
|
></edittablehead> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -263,7 +264,14 @@ import {
|
|
|
|
|
postDeleteZeroSuppleById, |
|
|
|
|
postFindNextNodeList, |
|
|
|
|
} from '@/api/distribution/zeroAdditionalRecording'; |
|
|
|
|
import { downloadXls, setNodeHeight, debounce, deepClone, getObjType } from '@/utils/util'; |
|
|
|
|
import { |
|
|
|
|
downloadXls, |
|
|
|
|
setNodeHeight, |
|
|
|
|
debounce, |
|
|
|
|
deepClone, |
|
|
|
|
getObjType, |
|
|
|
|
handleClearTableQuery, |
|
|
|
|
} from '@/utils/util'; |
|
|
|
|
import { oldColumnList, newColumnList } from '@/option/distribution/zeroAdditionalRecording'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
import { useRoute, useRouter } from 'vue-router'; |
|
|
|
@ -403,6 +411,11 @@ const initFinalNodeId = async () => {
|
|
|
|
|
const onLoad = debounce(async (params = {}) => { |
|
|
|
|
try { |
|
|
|
|
details.loadingObj.oldListLoading = true; |
|
|
|
|
|
|
|
|
|
if (details.oldQuery.orderCodes) { |
|
|
|
|
params.orderCodeList = details.oldQuery.orderCodes.split(','); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const submitData = { |
|
|
|
|
...details.oldPage, |
|
|
|
|
...details.oldQuery, |
|
|
|
@ -436,9 +449,10 @@ const searchChange = () => {
|
|
|
|
|
|
|
|
|
|
/** 清空表单 */ |
|
|
|
|
const searchReset = () => { |
|
|
|
|
details.query = {}; |
|
|
|
|
details.oldQuery = {}; |
|
|
|
|
details.stockupDate = []; |
|
|
|
|
details.oldPage.pageNum = 1; |
|
|
|
|
handleClearTableQuery(details.oldColumnList); |
|
|
|
|
onLoad(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -503,6 +517,7 @@ const selectionChange = (list: any) => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleFilterData = () => { |
|
|
|
|
console.log('details.newQuery :>> ', details.newQuery); |
|
|
|
|
if (Object.keys(details.newQuery).length === 0 && Object.keys(details.newTimeQuery).length === 0) |
|
|
|
|
return (details.renderData = details.newData); |
|
|
|
|
|
|
|
|
@ -513,14 +528,14 @@ const handleFilterData = () => {
|
|
|
|
|
let _flag = true; |
|
|
|
|
for (let key in details.newQuery) { |
|
|
|
|
if (!_flag) break; |
|
|
|
|
const _value = value[key]; |
|
|
|
|
const _value = details.newQuery[key]; |
|
|
|
|
if (!_value) continue; |
|
|
|
|
if (getObjType(_value) === 'array') { |
|
|
|
|
let _isFlag = false; |
|
|
|
|
for (let index = 0; index < _value.length; index++) { |
|
|
|
|
const item = _value[index]; |
|
|
|
|
|
|
|
|
|
if (!details.newQuery[key].test(value[key])) continue; |
|
|
|
|
if (!item.test(value[key])) continue; |
|
|
|
|
_isFlag = true; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -552,12 +567,16 @@ const handleFilterData = () => {
|
|
|
|
|
details.renderData = _filterArr; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleNewSearch = () => { |
|
|
|
|
newInputsc(details.form.orderCodes, { prop: 'orderCode' }); |
|
|
|
|
const handleNewRefesh = () => { |
|
|
|
|
details.form = {}; |
|
|
|
|
details.newQuery = {}; |
|
|
|
|
handleClearTableQuery(details.newColumnList); |
|
|
|
|
handleFilterData(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 表格表头输入框搜索 */ |
|
|
|
|
const newInputsc = (value, { prop }) => { |
|
|
|
|
const newInputsc = (value, { prop }, isRefresh = true) => { |
|
|
|
|
console.log('value :>> ', value); |
|
|
|
|
if (value) { |
|
|
|
|
const _arr = (value + '').split(','); |
|
|
|
|
|
|
|
|
@ -569,7 +588,7 @@ const newInputsc = (value, { prop }) => {
|
|
|
|
|
delete details.newQuery[prop]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
handleFilterData(); |
|
|
|
|
if (isRefresh) handleFilterData(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 表格表头时间选择 */ |
|
|
|
@ -630,6 +649,7 @@ const handleAddWaybill = () => {
|
|
|
|
|
item.loadingNum = Number(item.stockNum || 0); |
|
|
|
|
details.newData.push(item); |
|
|
|
|
} |
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
|
handleFilterData(); |
|
|
|
|
|
|
|
|
|
details.orderCodeList = [ |
|
|
|
|