|
|
|
@ -6,18 +6,46 @@ |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<el-button @click="searchList()" type="primary">{{ buttons.search }}</el-button> |
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button> |
|
|
|
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{ buttons.defaultTable }} |
|
|
|
</el-button> |
|
|
|
<el-button @click="updateExpDate()" type="primary">{{ buttons.updateExp }} |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button> |
|
|
|
<el-button @click="updateExpDate()" v-if="" type="primary">{{ buttons.updateExp }}</el-button> |
|
|
|
<el-form style="margin-top: 5px" v-show="searchShow" :inline="true" :model="queryData" |
|
|
|
@keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item label="失效日期"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 100px" |
|
|
|
v-model="queryData.startDate" |
|
|
|
type="date" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
- |
|
|
|
<el-date-picker |
|
|
|
style="width: 100px" |
|
|
|
v-model="queryData.endDate" |
|
|
|
type="date" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="卷号"> |
|
|
|
<el-input v-model="queryData.rollno" clearable> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料编码"> |
|
|
|
<el-input v-model="queryData.partno" clearable> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="getDataList()" type="primary">{{ buttons.search1 }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
ref="rollInfo" |
|
|
|
ref="rawRollInfo" |
|
|
|
:height="height" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
:cell-style="{ padding: '2px' }" |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> |
|
|
|
@ -45,14 +73,13 @@ |
|
|
|
width="150" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.rollno,scope.row.site)">修改有效期</a> |
|
|
|
<a type="text" size="small" @click="update(scope.row)">修改有效期</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
<!-- 设置查询条件 --> |
|
|
|
<search v-if="searchVisible" v-on:childByValue="childByValue" ref="search" @refreshDataList="getDataList"></search> |
|
|
|
|
|
|
|
<!-- 设置列 --> |
|
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
|
@ -63,7 +90,7 @@ |
|
|
|
:close-on-click-modal="false" |
|
|
|
width="350px" |
|
|
|
:visible.sync="updateExp"> |
|
|
|
<el-form ref="dataForm" @keyup.enter.native="dataFormSubmit()" |
|
|
|
<el-form ref="dataForm" |
|
|
|
label-width="80px"> |
|
|
|
<el-form-item label="失效日期" prop="expireddate"> |
|
|
|
<el-date-picker value-format="yyyy-MM-dd" v-model="expireddate" placeholder="失效日期"></el-date-picker> |
|
|
|
@ -80,7 +107,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import AddOrUpdate from './crollinfo-add-or-update' |
|
|
|
import {getCRollInfoList,batchUpdateExpireddate} from '@/api/crollinfo/crollinfo.js' |
|
|
|
import {getCRollInfoList, batchUpdateExpireddate} from '@/api/crollinfo/crollinfo.js' |
|
|
|
import column from "../common/column"; |
|
|
|
import search from "../common/search"; |
|
|
|
import { |
|
|
|
@ -101,25 +128,39 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
searchVisible: false, |
|
|
|
visible: false, |
|
|
|
updateExp: false, |
|
|
|
expireddate:'', |
|
|
|
searchShow: false, |
|
|
|
expireddate: '', |
|
|
|
addOrUpdateVisible: false, |
|
|
|
CRollInfo: {}, |
|
|
|
// table高度 |
|
|
|
height: 450, |
|
|
|
// 是否收藏 |
|
|
|
favorite: false, |
|
|
|
addLanguage: false, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: "105002002ETM", |
|
|
|
tableId: "105001002ETM", |
|
|
|
languageCode: this.$i18n.locale, |
|
|
|
visible: false, |
|
|
|
showDefault: false, |
|
|
|
query: {}, |
|
|
|
queryData: { |
|
|
|
day: '', |
|
|
|
rollno: '', |
|
|
|
partno: '', |
|
|
|
startDate: '', |
|
|
|
endDate: '' |
|
|
|
}, |
|
|
|
queryTable: { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: "105001002ETM", |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
}, |
|
|
|
// 语言词典集合 |
|
|
|
sysLanguageParams: [], |
|
|
|
columnList: [ |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "rollno", |
|
|
|
"columnLabel": "卷号", |
|
|
|
@ -138,7 +179,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "partno", |
|
|
|
"columnLabel": "物料编号", |
|
|
|
@ -157,7 +198,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "partDescription", |
|
|
|
"columnLabel": "物料描述", |
|
|
|
@ -176,7 +217,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "site", |
|
|
|
"columnLabel": "工厂编号", |
|
|
|
@ -195,7 +236,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "toexpiredays", |
|
|
|
"columnLabel": "呆滞天数", |
|
|
|
@ -214,7 +255,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "status", |
|
|
|
"columnLabel": "状态", |
|
|
|
@ -233,7 +274,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "sourcetype", |
|
|
|
"columnLabel": "来源类型", |
|
|
|
@ -252,7 +293,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "rolltype", |
|
|
|
"columnLabel": "卷类型", |
|
|
|
@ -271,7 +312,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "rollqty", |
|
|
|
"columnLabel": "卷数量", |
|
|
|
@ -290,7 +331,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "createdby", |
|
|
|
"columnLabel": "创建人", |
|
|
|
@ -309,7 +350,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "rolldate", |
|
|
|
"columnLabel": "卷创建时间", |
|
|
|
@ -328,7 +369,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "expireddate", |
|
|
|
"columnLabel": "失效日期", |
|
|
|
@ -347,7 +388,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "manufacturedate", |
|
|
|
"columnLabel": "制造日期", |
|
|
|
@ -366,7 +407,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "createddate", |
|
|
|
"columnLabel": "创建时间", |
|
|
|
@ -385,7 +426,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "statusDb", |
|
|
|
"columnLabel": "statusDb", |
|
|
|
@ -404,7 +445,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "supprollno", |
|
|
|
"columnLabel": "供应商编号", |
|
|
|
@ -423,7 +464,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "rollseqno", |
|
|
|
"columnLabel": "rollseqno", |
|
|
|
@ -442,7 +483,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "supprollnoflag", |
|
|
|
"columnLabel": "供应商状态", |
|
|
|
@ -461,7 +502,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "supplierid", |
|
|
|
"columnLabel": "供应商编号", |
|
|
|
@ -480,7 +521,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "orderref1", |
|
|
|
"columnLabel": "关联单号1", |
|
|
|
@ -499,7 +540,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "orderref3", |
|
|
|
"columnLabel": "关联单号3", |
|
|
|
@ -518,7 +559,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "orderref4", |
|
|
|
"columnLabel": "关联单号4", |
|
|
|
@ -537,7 +578,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "rolltypeDb", |
|
|
|
"columnLabel": "卷类型编号", |
|
|
|
@ -556,7 +597,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "firstlevelrollno", |
|
|
|
"columnLabel": "首卷号", |
|
|
|
@ -575,7 +616,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "remark", |
|
|
|
"columnLabel": "备注", |
|
|
|
@ -594,7 +635,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "parttypeFlag", |
|
|
|
"columnLabel": "parttypeFlag", |
|
|
|
@ -613,7 +654,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "warehouseid", |
|
|
|
"columnLabel": "warehouseid", |
|
|
|
@ -632,7 +673,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "synchronizedflag", |
|
|
|
"columnLabel": "同步状态", |
|
|
|
@ -651,7 +692,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "consumeorderno", |
|
|
|
"columnLabel": "销售订单号", |
|
|
|
@ -670,7 +711,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "consumeseqno", |
|
|
|
"columnLabel": "销售序号", |
|
|
|
@ -689,7 +730,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "customerid", |
|
|
|
"columnLabel": "客户ID", |
|
|
|
@ -708,7 +749,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "fgpartno", |
|
|
|
"columnLabel": "fgpartno", |
|
|
|
@ -727,7 +768,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "refSupplierid", |
|
|
|
"columnLabel": "refSupplierid", |
|
|
|
@ -746,7 +787,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "refPartdesc", |
|
|
|
"columnLabel": "refPartdesc", |
|
|
|
@ -765,7 +806,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "needsynchronizeflag", |
|
|
|
"columnLabel": "needsynchronizeflag", |
|
|
|
@ -784,7 +825,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "opslog", |
|
|
|
"columnLabel": "opslog", |
|
|
|
@ -803,7 +844,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "frozenflag", |
|
|
|
"columnLabel": "frozenflag", |
|
|
|
@ -822,7 +863,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "frozendate", |
|
|
|
"columnLabel": "frozendate", |
|
|
|
@ -841,7 +882,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "frozenby", |
|
|
|
"columnLabel": "frozenby", |
|
|
|
@ -860,7 +901,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "originalrollno", |
|
|
|
"columnLabel": "原卷号", |
|
|
|
@ -879,7 +920,7 @@ export default { |
|
|
|
{ |
|
|
|
"userId": this.$store.state.user.name, |
|
|
|
|
|
|
|
"tableId": "105002002ETM", |
|
|
|
"tableId": "105001002ETM", |
|
|
|
"tableName": "呆滞料预警", |
|
|
|
"columnProp": "orderref5", |
|
|
|
"columnLabel": "关联单号5", |
|
|
|
@ -896,12 +937,8 @@ export default { |
|
|
|
"align": null |
|
|
|
} |
|
|
|
], |
|
|
|
queryTable:{ |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: "105002002ETM", |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
}, |
|
|
|
dataList: [], |
|
|
|
buttonList: [], |
|
|
|
buttons: { |
|
|
|
add: '添加', |
|
|
|
edit: '编辑', |
|
|
|
@ -909,6 +946,7 @@ export default { |
|
|
|
deleteList: '批量删除', |
|
|
|
cz: '操作', |
|
|
|
search: '搜索', |
|
|
|
search1: '查询', |
|
|
|
download: '导出', |
|
|
|
settingTable: '设置列表', |
|
|
|
defaultTable: '设置默认配置', |
|
|
|
@ -916,7 +954,13 @@ export default { |
|
|
|
}, |
|
|
|
dataListLoading: false, |
|
|
|
dataListSelections: [], |
|
|
|
addOrUpdateVisible: false |
|
|
|
pagination: { |
|
|
|
page: 1, |
|
|
|
pageSize: 200, |
|
|
|
total: 0, |
|
|
|
}, |
|
|
|
totalPage: 5, |
|
|
|
countTotal: 200, |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -927,21 +971,102 @@ export default { |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 165; |
|
|
|
this.lazyLoading(); |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
activated() { |
|
|
|
// this.getDataList() |
|
|
|
// this.getDataList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 打开搜索页面 |
|
|
|
searchList() { |
|
|
|
if (this.searchShow) { |
|
|
|
this.searchShow = false |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.searchShow = true |
|
|
|
} |
|
|
|
}, |
|
|
|
lazyLoading() { |
|
|
|
let dom = document.querySelector(".el-table__body-wrapper"); |
|
|
|
dom.addEventListener("scroll", (v) => { |
|
|
|
const scrollDistance = dom.scrollHeight - dom.scrollTop - dom.clientHeight; |
|
|
|
// console.log("鼠标滑动-scrollDistance", scrollDistance) |
|
|
|
// if (scrollDistance <= 0) { //分辨率问题,如果设置 100% ,滑倒最底部,scrollDistance的值 可能为 0.201 到 -0.201 |
|
|
|
if (scrollDistance <= 1) { |
|
|
|
//等于0证明已经到底,可以请求接口 |
|
|
|
if (this.pagination.page >= this.totalPage) { |
|
|
|
//判断是否到达底部 |
|
|
|
// this.$message.warning("我~是有底线的 (~ ̄▽ ̄)~"); |
|
|
|
//console.log("我~是有底线的 (~ ̄▽ ̄)~") |
|
|
|
} |
|
|
|
if (this.pagination.page < this.totalPage) { |
|
|
|
//当前页数小于总页数就请求 |
|
|
|
this.pagination.page++; //当前页数自增 |
|
|
|
//console.log("页面已经到达底部,可以请求接口,请求第 " + this.pagination.page + " 页数据"); |
|
|
|
this.pagination.pageSize = this.countTotal; |
|
|
|
this.getDataListAdd() |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 获取数据列表 |
|
|
|
getDataList() { |
|
|
|
this.dataListLoading = true |
|
|
|
let query = { |
|
|
|
parttypeFlag: 'F', |
|
|
|
toexpiredays: this.queryData.day, |
|
|
|
rollno: this.queryData.rollno, |
|
|
|
partno: this.queryData.partno, |
|
|
|
startDate: this.queryData.startDate, |
|
|
|
endDate: this.queryData.endDate, |
|
|
|
limit: 200, |
|
|
|
page: 1 |
|
|
|
} |
|
|
|
getCRollInfoList(query).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.dataList = data.page.list |
|
|
|
this.totalPage = data.page.totalPage |
|
|
|
// this.countTotal = data.page.totalCount |
|
|
|
this.pagination.page = data.page.currPage |
|
|
|
this.pagination.total = data.page.totalCount |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
// this.searchShow = false |
|
|
|
}, |
|
|
|
// 滚动获取数据 |
|
|
|
getDataListAdd() { |
|
|
|
this.dataListLoading = true |
|
|
|
let query = { |
|
|
|
parttypeFlag: 'F', |
|
|
|
toexpiredays: this.queryData.day, |
|
|
|
rollno: this.queryData.rollno, |
|
|
|
partno: this.queryData.partno, |
|
|
|
startDate: this.queryData.startDate, |
|
|
|
endDate: this.queryData.endDate, |
|
|
|
limit: this.pagination.pageSize, |
|
|
|
page: this.pagination.page |
|
|
|
} |
|
|
|
getCRollInfoList(query).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
let voList = data.page.list |
|
|
|
this.dataList.push(...voList) |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
// this.searchShow = false |
|
|
|
}, |
|
|
|
// 修改有效期 |
|
|
|
updateExpDate() { |
|
|
|
this.updateExp = true |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
updateExpSubmit() { |
|
|
|
let rollInfoList = this.$refs.rollInfo.selection.map(item =>{ |
|
|
|
let rollInfoList = this.$refs.rawRollInfo.selection.map(item => { |
|
|
|
let rollInfo = { |
|
|
|
site:item.site, |
|
|
|
site: item.site, |
|
|
|
rollno: item.rollno, |
|
|
|
expireddate: this.expireddate |
|
|
|
} |
|
|
|
@ -955,6 +1080,7 @@ export default { |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
this.updateExp = false |
|
|
|
this.expireddate = '' |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -963,21 +1089,14 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
childByValue(childValue) { |
|
|
|
this.getDataList(childValue) |
|
|
|
}, |
|
|
|
// 打开搜索页面 |
|
|
|
searchList() { |
|
|
|
this.searchVisible = true; |
|
|
|
let queryTable = { |
|
|
|
userId: this.userId, |
|
|
|
functionId: this.functionId, |
|
|
|
tableId: this.tableId, |
|
|
|
languageCode: this.languageCode |
|
|
|
} |
|
|
|
// 修改信息 |
|
|
|
update(val) { |
|
|
|
this.CRollInfo = val |
|
|
|
if (this.CRollInfo.expiredatecontrolflag != 'Y') return this.$message.info('该物料未设置有效期'); |
|
|
|
this.addOrUpdateVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.search.init(queryTable); |
|
|
|
}); |
|
|
|
this.$refs.addOrUpdate.init(this.CRollInfo.rollno, this.CRollInfo.site) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk() { |
|
|
|
@ -1087,7 +1206,7 @@ export default { |
|
|
|
await removerDefault(this.queryTable) |
|
|
|
// 保存页面 table属性 |
|
|
|
let sumColumnList = this.columnList; |
|
|
|
sumColumnList = sumColumnList.map(item=> { |
|
|
|
sumColumnList = sumColumnList.map(item => { |
|
|
|
return item = { |
|
|
|
tableId: item.tableId, |
|
|
|
tableName: item.tableName, |
|
|
|
@ -1108,9 +1227,9 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
await saveTableDefaultList(sumColumnList) |
|
|
|
await saveTableDefaultList(sumColumnList) |
|
|
|
// 保存页面 button label title 属性 |
|
|
|
let buttons = this.buttonList.map( item => { |
|
|
|
let buttons = this.buttonList.map(item => { |
|
|
|
return item = { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
languageValue: item.languageValue, |
|
|
|
@ -1123,22 +1242,6 @@ export default { |
|
|
|
this.getFunctionButtonList() |
|
|
|
this.getColumnList() |
|
|
|
}, |
|
|
|
// // 保存 默认配置 列 |
|
|
|
// saveColumnList() { |
|
|
|
// |
|
|
|
// saveButtonList(this.buttonList).then(({data}) => { |
|
|
|
// }) |
|
|
|
// saveTableDefaultList(this.columnList).then(({data}) => { |
|
|
|
// if (data.code == 0) { |
|
|
|
// this.$message.success(data.msg) |
|
|
|
// this.showDefault = false |
|
|
|
// } else { |
|
|
|
// this.$message.error(data.msg) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// this.getFunctionButtonList(); |
|
|
|
// this.getColumnList() |
|
|
|
// }, |
|
|
|
// 获取 tableDefault 列 |
|
|
|
getColumnList() { |
|
|
|
let queryTable = { |
|
|
|
@ -1151,64 +1254,10 @@ export default { |
|
|
|
this.showDefault = false |
|
|
|
this.columnList = data.rows |
|
|
|
} else { |
|
|
|
this.showDefault = true |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取数据列表 |
|
|
|
getDataList(val) { |
|
|
|
this.dataListLoading = true |
|
|
|
let query = val ? val : [] |
|
|
|
let f = { |
|
|
|
queryAttributes: "parttypeFlag", |
|
|
|
queryType: "string", |
|
|
|
queryValue: "F", |
|
|
|
} |
|
|
|
query.push(f) |
|
|
|
getCRollInfoList(query).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.dataList = data.list |
|
|
|
this.showDefault = false |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增 / 修改 |
|
|
|
addOrUpdateHandle(rollno, site) { |
|
|
|
this.addOrUpdateVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.addOrUpdate.init(rollno, site) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
deleteHandle(id) { |
|
|
|
var ids = id ? [id] : this.dataListSelections.map(item => { |
|
|
|
return item.site |
|
|
|
}) |
|
|
|
this.$confirm(`确定删除该信息?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http({ |
|
|
|
url: this.$http.adornUrl('/finishedProduct/crollinfo/delete'), |
|
|
|
method: 'post', |
|
|
|
data: this.$http.adornData(ids, false) |
|
|
|
}).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getTableUserColumn() |
|
|
|
|