Browse Source

修改bug 2022年4月1日 sxm

master
[li_she] 4 years ago
parent
commit
86cc487aee
  1. 2
      src/router/index.js
  2. 11
      src/views/modules/common/Chooselist.vue
  3. 355
      src/views/modules/finishedProductWarehouse/expirationTimeModification.vue
  4. 2130
      src/views/modules/finishedProductWarehouse/sluggishMaterialWarning.vue
  5. 15
      src/views/modules/rawMaterials/crollinfo-add-or-update.vue
  6. 332
      src/views/modules/rawMaterials/expirationTimeModification.vue
  7. 120
      src/views/modules/rawMaterials/sluggishMaterialWarning.vue

2
src/router/index.js

@ -36,7 +36,7 @@ const mainRoutes = {
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{ path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
{ path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } },
// { path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
{ path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
// { path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } }
],
beforeEnter (to, from, next) {

11
src/views/modules/common/Chooselist.vue

@ -1,6 +1,7 @@
<template>
<el-dialog :title="baseListData.description"
:close-on-click-modal="false" :close-on-press-escape="false"
@close="closeDialog"
:visible.sync="visible"
width="685px" v-drag>
<el-form label-position="top"
@ -174,7 +175,7 @@ export default {
if (this.param3) {
sql += " and active like '%" + this.param3 + "%'"
}
if (this.baseListData.caption4) {
if (this.param4) {
sql += " and site=" + this.param4
}
getChooselistData({"sqlcode": sql}).then(({data}) => {
@ -188,6 +189,14 @@ export default {
getRowData(row) {
this.visible = false
this.$emit('getBaseData',row)
},
closeDialog(){
this.param1= ''
this.param2=''
this.param3= ''
this.param= ''
this.param4=this.$store.state.user.site
}
}
}

355
src/views/modules/finishedProductWarehouse/expirationTimeModification.vue

@ -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()

2130
src/views/modules/finishedProductWarehouse/sluggishMaterialWarning.vue
File diff suppressed because it is too large
View File

15
src/views/modules/rawMaterials/crollinfo-add-or-update.vue

@ -1,5 +1,8 @@
<template>
<el-dialog
v-loading="fullscreenLoading"
element-loading-background="rgba(0, 0, 0, 0.5)"
element-loading-text="修改中"
:title="!dataForm.site ? '新增' : '修改'"
:close-on-click-modal="false"
width="350px"
@ -12,7 +15,9 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button type="primary"
@click="dataFormSubmit()">确定</el-button>
<el-button @click="visible = false">取消</el-button>
</span>
</el-dialog>
@ -24,7 +29,8 @@ import {updateExpireddate, infoRollno} from '@/api/crollinfo/crollinfo.js'
export default {
data() {
return {
visible: false,
fullscreenLoading: false,
loading:false,
dataForm: {
site: 0,
rollno: '',
@ -34,7 +40,6 @@ export default {
}
},
methods: {
init(rollno, site) {
this.visible = true;
let query = {
@ -46,12 +51,13 @@ export default {
this.dataForm.rollno = data.cRollinfo.rollno
this.dataForm.expireddate = data.cRollinfo.expireddate
})
},
//
dataFormSubmit() {
this.fullscreenLoading = true
updateExpireddate(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.fullscreenLoading = false
this.$message({
message: '操作成功',
type: 'success',
@ -63,6 +69,7 @@ export default {
})
} else {
this.$message.error(data.msg)
this.fullscreenLoading = false
}
})
}

332
src/views/modules/rawMaterials/expirationTimeModification.vue

@ -2,14 +2,45 @@
<div class="mod-config">
<div>
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg" ></icon-svg>
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
</div>
<el-button @click="searchList()" type="primary">{{buttons.search}}</el-button>
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{buttons.defaultTable}}
<el-button @click="searchList()" type="primary">{{ buttons.search }}</el-button>
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{ buttons.defaultTable }}
</el-button>
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</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="rawRollInfo"
:height="height"
@ -29,7 +60,7 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
@ -47,10 +78,10 @@
</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>
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
@ -59,8 +90,8 @@
:close-on-click-modal="false"
width="350px"
:visible.sync="updateExp">
<el-form ref="dataForm"
label-width="80px">
<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>
</el-form-item>
@ -76,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 {
@ -91,19 +122,20 @@ import {
removerDefault,
removerUser
} from "@/api/table.js"
import {userFavoriteList,saveUserFavorite,removeUserFavorite} from '@/api/userFavorite.js'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
export default {
data () {
data() {
return {
searchVisible: false,
visible: false,
updateExp: false,
expireddate:'',
searchShow: false,
expireddate: '',
addOrUpdateVisible: false,
CRollInfo: {},
// table
height:450,
height: 450,
//
favorite: false,
addLanguage: false,
@ -111,11 +143,15 @@ export default {
tableId: "105001002ETM",
languageCode: this.$i18n.locale,
showDefault: false,
query:{
queryData: {
day: '',
rollno: '',
partno: '',
startDate: '',
endDate: ''
},
queryTable:{
functionId: this.$route.meta.menuId,
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "105001002ETM",
languageCode: this.$i18n.locale
},
@ -124,7 +160,7 @@ export default {
columnList: [
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "rollno",
"columnLabel": "卷号",
@ -143,7 +179,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "partno",
"columnLabel": "物料编号",
@ -162,7 +198,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "partDescription",
"columnLabel": "物料描述",
@ -181,7 +217,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "site",
"columnLabel": "工厂编号",
@ -200,7 +236,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "toexpiredays",
"columnLabel": "呆滞天数",
@ -219,7 +255,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "status",
"columnLabel": "状态",
@ -238,7 +274,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "sourcetype",
"columnLabel": "来源类型",
@ -257,7 +293,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "rolltype",
"columnLabel": "卷类型",
@ -276,7 +312,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "rollqty",
"columnLabel": "卷数量",
@ -295,7 +331,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "createdby",
"columnLabel": "创建人",
@ -314,7 +350,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "rolldate",
"columnLabel": "卷创建时间",
@ -333,7 +369,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "expireddate",
"columnLabel": "失效日期",
@ -352,7 +388,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "manufacturedate",
"columnLabel": "制造日期",
@ -371,7 +407,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "createddate",
"columnLabel": "创建时间",
@ -390,7 +426,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "statusDb",
"columnLabel": "statusDb",
@ -409,7 +445,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "supprollno",
"columnLabel": "供应商编号",
@ -428,7 +464,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "rollseqno",
"columnLabel": "rollseqno",
@ -447,7 +483,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "supprollnoflag",
"columnLabel": "供应商状态",
@ -466,7 +502,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "supplierid",
"columnLabel": "供应商编号",
@ -485,7 +521,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "orderref1",
"columnLabel": "关联单号1",
@ -504,7 +540,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "orderref3",
"columnLabel": "关联单号3",
@ -523,7 +559,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "orderref4",
"columnLabel": "关联单号4",
@ -542,7 +578,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "rolltypeDb",
"columnLabel": "卷类型编号",
@ -561,7 +597,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "firstlevelrollno",
"columnLabel": "首卷号",
@ -580,7 +616,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "remark",
"columnLabel": "备注",
@ -599,7 +635,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "parttypeFlag",
"columnLabel": "parttypeFlag",
@ -618,7 +654,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "warehouseid",
"columnLabel": "warehouseid",
@ -637,7 +673,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "synchronizedflag",
"columnLabel": "同步状态",
@ -656,7 +692,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "consumeorderno",
"columnLabel": "销售订单号",
@ -675,7 +711,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "consumeseqno",
"columnLabel": "销售序号",
@ -694,7 +730,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "customerid",
"columnLabel": "客户ID",
@ -713,7 +749,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "fgpartno",
"columnLabel": "fgpartno",
@ -732,7 +768,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "refSupplierid",
"columnLabel": "refSupplierid",
@ -751,7 +787,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "refPartdesc",
"columnLabel": "refPartdesc",
@ -770,7 +806,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "needsynchronizeflag",
"columnLabel": "needsynchronizeflag",
@ -789,7 +825,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "opslog",
"columnLabel": "opslog",
@ -808,7 +844,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "frozenflag",
"columnLabel": "frozenflag",
@ -827,7 +863,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "frozendate",
"columnLabel": "frozendate",
@ -846,7 +882,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "frozenby",
"columnLabel": "frozenby",
@ -865,7 +901,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "originalrollno",
"columnLabel": "原卷号",
@ -884,7 +920,7 @@ export default {
{
"userId": this.$store.state.user.name,
"tableId": "105001002ETM",
"tableId": "105001002ETM",
"tableName": "呆滞料预警",
"columnProp": "orderref5",
"columnLabel": "关联单号5",
@ -902,9 +938,7 @@ export default {
}
],
dataList: [],
buttonList: [
],
buttonList: [],
buttons: {
add: '添加',
edit: '编辑',
@ -912,6 +946,7 @@ export default {
deleteList: '批量删除',
cz: '操作',
search: '搜索',
search1: '查询',
download: '导出',
settingTable: '设置列表',
defaultTable: '设置默认配置',
@ -919,7 +954,13 @@ export default {
},
dataListLoading: false,
dataListSelections: [],
pagination: {
page: 1,
pageSize: 200,
total: 0,
},
totalPage: 5,
countTotal: 200,
}
},
components: {
@ -928,23 +969,104 @@ export default {
search
},
mounted() {
this.$nextTick(()=>{
this.$nextTick(() => {
this.height = window.innerHeight - 165;
this.lazyLoading()
})
},
activated () {
// this.getDataList()
activated() {
// 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: 'R',
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: 'R',
toexpiredays: this.queryData.day,
rollno: this.queryData.rollno,
partno: this.queryData.partno,
limit: this.pagination.pageSize,
startDate: this.queryData.startDate,
endDate: this.queryData.endDate,
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.rawRollInfo.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
}
@ -968,86 +1090,50 @@ export default {
})
},
//
update(val){
update(val) {
this.CRollInfo = val
if (this.CRollInfo.expiredatecontrolflag != 'Y') return this.$message.info('该物料未设置有效期');
if (this.CRollInfo.expiredatecontrolflag != 'Y') return this.$message.info('该物料未设置有效期');
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init( this.CRollInfo.rollno, this.CRollInfo.site)
})
},
//
getDataList (val) {
this.dataListLoading = true
let query = val?val:[]
let r = {
queryAttributes: "parttypeFlag",
queryType: "string",
queryValue: "R",
}
query.push(r)
getCRollInfoList(query).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.list
}
this.dataListLoading = false
this.$refs.addOrUpdate.init(this.CRollInfo.rollno, this.CRollInfo.site)
})
},
//
searchList() {
this.searchVisible = true;
let queryTable = {
userId: this.userId,
functionId: this.functionId,
tableId: this.tableId,
languageCode: this.languageCode
}
this.$nextTick(() => {
this.$refs.search.init(queryTable);
});
},
//
childByValue(childValue) {
// childValue
this.getDataList(childValue)
this.searchVisible = false;
},
//
favoriteIsOk(){
let userFavorite ={
userId:this.$store.state.user.id,
languageCode:this.$i18n.locale
favoriteIsOk() {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
}
userFavoriteList(userFavorite).then(({data}) =>{
userFavoriteList(userFavorite).then(({data}) => {
let size = data.list.filter(item => item.menuId == this.$route.meta.menuId).length;
if (size>0){
if (size > 0) {
this.favorite = true
}else {
} else {
this.favorite = false
}
})
},
// OR
favoriteFunction(){
let userFavorite ={
favoriteFunction() {
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
}
if (this.favorite){
if (this.favorite) {
//
this.$confirm(`确定取消收藏`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeUserFavorite(userFavorite).then(({data})=>{
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
})
}else {
} else {
//
saveUserFavorite(userFavorite).then(({data})=>{
saveUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = true
})
@ -1063,7 +1149,7 @@ export default {
objectType: 'button'
}
searchFunctionButtonList(queryButton).then(({data}) => {
if (data.data.length>0) {
if (data.data.length > 0) {
this.buttons = data.data
}
})
@ -1182,7 +1268,7 @@ export default {
}
</script>
<style scoped>
.sl-svg{
.sl-svg {
overflow: hidden;
float: right;
}

120
src/views/modules/rawMaterials/sluggishMaterialWarning.vue

@ -10,21 +10,24 @@
</el-button>
<el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button>
<el-form v-show="searchShow" :inline="true" :model="queryData" @keyup.enter.native="getDataList()">
<el-form style="margin-top: 5px" v-show="searchShow" :inline="true" :model="queryData" @keyup.enter.native="getDataList()">
<el-form-item label="呆滞天数">
<el-input oninput="value=value.replace(/[^\d]/g,'')" v-model="queryData.day" clearable>
<el-input style="width: 80px" oninput="value=value.replace(/[^\d]/g,'')" v-model="queryData.day1" clearable>
</el-input>
-
<el-input style="width: 80px" oninput="value=value.replace(/[^\d]/g,'')" v-model="queryData.day2" clearable>
</el-input>
</el-form-item>
<el-form-item label="rollno">
<el-form-item label="卷号">
<el-input v-model="queryData.rollno" clearable>
</el-input>
</el-form-item>
<el-form-item label="partno">
<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.search }}</el-button>
<el-button @click="getDataList()" type="primary">{{ buttons.search1 }}</el-button>
</el-form-item>
</el-form>
@ -94,12 +97,13 @@ export default {
visible: false,
showDefault: false,
queryData: {
day: '',
day1: '',
day2: '',
rollno: '',
partno: ''
},
queryTable:{
functionId: this.$route.meta.menuId,
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "105001001SMW",
languageCode: this.$i18n.locale
},
@ -893,13 +897,23 @@ export default {
deleteList: '批量删除',
cz: '操作',
search: '搜索',
search1: '查询',
download: '导出',
settingTable: '设置列表',
defaultTable: '设置默认配置'
},
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
addOrUpdateVisible: false,
loading: false,
pagination: {
page: 1,
pageSize: 200,
total: 0,
},
totalPage: 5,
countTotal: 200,
}
},
components: {
@ -910,13 +924,34 @@ export default {
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 165;
this.lazyLoading();
})
},
activated() {
// this.getDataList()
// this.getDataList()
},
methods: {
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("~线 ()");
}
if (this.pagination.page < this.totalPage) {
//
this.pagination.page++; //
this.pagination.pageSize = this.countTotal;
this.getDataListAdd()
}
}
});
},
//
searchList() {
if (this.searchShow) {
@ -927,40 +962,49 @@ export default {
}
},
//
getDataList() {
getDataList(val) {
this.dataListLoading = true
let query = []
let r = {
queryAttributes: "parttypeFlag",
queryType: "string",
queryValue: "R",
}
query.push(r)
let toexpiredays = {
queryAttributes: "toexpiredays",
queryType: "number",
queryValue: this.queryData.day,
if (val != 0){
this.pagination.pageSize=200
}
query.push(toexpiredays)
if (this.queryData.rollno != '') {
let rollno = {
queryAttributes: "rollno",
queryType: "string",
queryValue: this.queryData.rollno,
}
query.push(rollno)
let query = {
parttypeFlag:'R',
day1: this.queryData.day1,
day2: this.queryData.day2,
rollno: this.queryData.rollno,
partno: this.queryData.partno,
limit: 200,
page: 1
}
if (this.queryData.partno != '') {
let partno = {
queryAttributes: "partno",
queryType: "string",
queryValue: this.queryData.partno,
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
}
query.push(partno)
this.dataListLoading = false
})
// this.searchShow = false
},
//
getDataListAdd(val) {
this.dataListLoading = true
let query = {
parttypeFlag:'R',
day1: this.queryData.day1,
day2: this.queryData.day2,
rollno: this.queryData.rollno,
partno: this.queryData.partno,
limit: this.pagination.pageSize,
page: this.pagination.page
}
getCRollInfoList(query).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.list
let voList = data.page.list
this.dataList.push(...voList)
}
this.dataListLoading = false
})

Loading…
Cancel
Save