Browse Source

页面添加

master
wenkuan.shi 2 years ago
parent
commit
2a435361f7
  1. 6
      src/api/material/seekByTrans.js
  2. 168
      src/views/modules/material/seekByNum.vue
  3. 703
      src/views/modules/material/seekByRolls.vue
  4. 84
      src/views/modules/material/seekByTrans.vue
  5. 726
      src/views/modules/material/seekInvByRolls.vue

6
src/api/material/seekByTrans.js

@ -6,3 +6,9 @@ export const findTrans= data => createAPI(`/seek/trans/findByTrans`,'post',data)
export const findByRoll= data => createAPI(`/seek/trans/findByRoll`,'post',data) export const findByRoll= data => createAPI(`/seek/trans/findByRoll`,'post',data)
export const findByNum= data => createAPI(`/seek/trans/findNum`,'post',data) export const findByNum= data => createAPI(`/seek/trans/findNum`,'post',data)
export const findByRolls= data => createAPI(`/seek/trans/findByRolls`,'post',data)
export const findByNumOrRollNo= data => createAPI(`/seek/trans/findByNumOrRollNo`,'post',data)
export const findAllByRolls= data => createAPI(`/seek/trans/findAllByRolls`,'post',data)

168
src/views/modules/material/seekByNum.vue

@ -111,7 +111,7 @@
<script> <script>
import { import {
findByNum, // findByNum, //
findByRoll //
findByNumOrRollNo //
} from "@/api/material/seekByTrans.js" } from "@/api/material/seekByTrans.js"
// import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" // import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
// import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' // import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
@ -134,7 +134,6 @@ export default {
}, },
// end // end
searchData: { searchData: {
transNo:'',
site: '', site: '',
userName: this.$store.state.user.name, userName: this.$store.state.user.name,
transDate: '', transDate: '',
@ -142,14 +141,13 @@ export default {
rollNo: '', rollNo: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
transQty: '',
qtyOnHand: '',
batchNo: '', batchNo: '',
locationID: '', locationID: '',
wdrNo: '',
manufactureDate: '', manufactureDate: '',
orderRef1: '', orderRef1: '',
receiver: '', receiver: '',
enterDate: '',
FirstInDate: '',
transType: '', transType: '',
page: 1, page: 1,
limit: 10, limit: 10,
@ -176,14 +174,14 @@ export default {
keeper: '', keeper: '',
remarks: '', remarks: '',
createTime: '', createTime: '',
},
},//..
// //
columnList: [ columnList: [
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableWarehouseId',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableWarehouseId',
tableId: "200005Table",
tableName: "仓位编码", tableName: "仓位编码",
columnWidth: 130, columnWidth: 130,
columnProp: 'warehouseID', columnProp: 'warehouseID',
@ -199,9 +197,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TablePartNo',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TablePartNo',
tableId: "200005Table",
tableName: "物料编码", tableName: "物料编码",
columnWidth: 130, columnWidth: 130,
columnProp: 'partNo', columnProp: 'partNo',
@ -217,9 +215,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TablePartDesc',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TablePartDesc',
tableId: "200005Table",
tableName: "料号描述", tableName: "料号描述",
columnWidth: 130, columnWidth: 130,
columnProp: 'partDesc', columnProp: 'partDesc',
@ -235,9 +233,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableNum',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableNum',
tableId: "200005Table",
tableName: "卷数量", tableName: "卷数量",
columnWidth: 130, columnWidth: 130,
columnProp: 'num', columnProp: 'num',
@ -253,15 +251,15 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableTransQty',
tableId: "200003Table",
tableName: "出入库数量",
functionId: 200005,
serialNumber: '200005TableQtyOnHand',
tableId: "200005Table",
tableName: "库数量",
columnWidth: 130, columnWidth: 130,
columnProp: 'transQty',
columnProp: 'qtyOnHand',
headerAlign: 'right', headerAlign: 'right',
align: "right", align: "right",
columnLabel: '出入库数量',
columnLabel: '库数量',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -272,9 +270,9 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableBatchNo',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableBatchNo',
tableId: "200005Table",
tableName: "批号", tableName: "批号",
columnWidth: 130, columnWidth: 130,
columnProp: 'batchNo', columnProp: 'batchNo',
@ -290,9 +288,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableLocationID',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableLocationID',
tableId: "200005Table",
tableName: "库位", tableName: "库位",
columnWidth: 130, columnWidth: 130,
columnProp: 'locationID', columnProp: 'locationID',
@ -308,27 +306,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableWdrNo',
tableId: "200003Table",
tableName: "W/D/R",
columnWidth: 130,
columnProp: 'wdrNo',
headerAlign: 'left',
align: "left",
columnLabel: 'W/D/R',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableManufactureDate',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableManufactureDate',
tableId: "200005Table",
tableName: "生产日期", tableName: "生产日期",
columnWidth: 130, columnWidth: 130,
columnProp: 'manufactureDate', columnProp: 'manufactureDate',
@ -344,15 +324,15 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableEnterDate',
tableId: "200003Table",
tableName: "录入时间",
functionId: 200005,
serialNumber: '200005TableFirstInDate',
tableId: "200005Table",
tableName: "首次入库日期",
columnWidth: 130, columnWidth: 130,
columnProp: 'enterDate',
columnProp: 'FirstInDate',
headerAlign: 'center', headerAlign: 'center',
align: "center", align: "center",
columnLabel: '录入时间',
columnLabel: '首次入库日期',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -362,9 +342,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableExpiredDate',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableExpiredDate',
tableId: "200005Table",
tableName: "失效日期", tableName: "失效日期",
columnWidth: 130, columnWidth: 130,
columnProp: 'expiredDate', columnProp: 'expiredDate',
@ -380,9 +360,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableDaysUntilExpired',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableDaysUntilExpired',
tableId: "200005Table",
tableName: "剩余有效期天数", tableName: "剩余有效期天数",
columnWidth: 130, columnWidth: 130,
columnProp: 'daysUntilExpired', columnProp: 'daysUntilExpired',
@ -400,27 +380,9 @@ export default {
columnList2:[ columnList2:[
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableTransNo',
tableId: "200003Table",
tableName: "出入库单号",
columnWidth: 200,
columnProp: 'transNo',
headerAlign: 'left',
align: "left",
columnLabel: '出入库单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableRollNo',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableRollNo',
tableId: "200005Table",
tableName: "卷号", tableName: "卷号",
columnWidth: 200, columnWidth: 200,
columnProp: 'rollNo', columnProp: 'rollNo',
@ -436,15 +398,15 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableSum',
tableId: "200003Table",
tableName: "数量",
functionId: 200005,
serialNumber: '200005TableQtyOnHand',
tableId: "200005Table",
tableName: "库存数量",
columnWidth: 200, columnWidth: 200,
columnProp: 'sum',
columnProp: 'qtyOnHand',
headerAlign: 'right', headerAlign: 'right',
align: "right", align: "right",
columnLabel: '数量',
columnLabel: '库存数量',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -454,9 +416,9 @@ export default {
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableManufactureDate',
tableId: "200003Table",
functionId: 200005,
serialNumber: '200005TableManufactureDate',
tableId: "200005Table",
tableName: "生产日期", tableName: "生产日期",
columnWidth: 200, columnWidth: 200,
columnProp: 'manufactureDate', columnProp: 'manufactureDate',
@ -470,24 +432,6 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
}, },
{
userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableEnterDate',
tableId: "200003Table",
tableName: "录入时间",
columnWidth: 200,
columnProp: 'enterDate',
headerAlign: 'center',
align: "center",
columnLabel: '录入时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
], ],
rules: { rules: {
}, },
@ -582,7 +526,7 @@ export default {
this.currentRow={site:'',transNo:''} this.currentRow={site:'',transNo:''}
} }
findByRoll(this.currentRow).then(({data}) => {
findByNumOrRollNo(this.currentRow).then(({data}) => {
// //
if (data && data.code == 0) { if (data && data.code == 0) {
this.dataList2 = data.rows this.dataList2 = data.rows

703
src/views/modules/material/seekByRolls.vue

@ -0,0 +1,703 @@
<template>
<div class="mod-config">
<!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'物料编码:'">
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'库位编码:'">
<el-input v-model="searchData.locationID" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'料号描述:'">
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'卷号:'">
<el-input v-model="searchData.rollNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
<!-- <download-excel-->
<!-- :fields="fields()"-->
<!-- :data="exportData"-->
<!-- type="xls"-->
<!-- :name="exportName"-->
<!-- :header="exportHeader"-->
<!-- :footer="exportFooter"-->
<!-- :fetch="createExportData"-->
<!-- :before-generate="startDownload"-->
<!-- :before-finish="finishDownload"-->
<!-- worksheet="导出信息"-->
<!-- class="el-button el-button&#45;&#45;primary el-button&#45;&#45;medium">-->
<!-- {{ "导出" }}-->
<!-- </download-excel>-->
</el-form-item>
</el-form>
<!-- 展示列表 -->
<el-table
:height="height"
:data="dataList"
border
highlight-current-row
ref="mainTable"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<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>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
</template>
<script>
import {
findByRolls, //
// findByRoll //
// // getSiteAndBuByUserName
} from "@/api/material/seekByTrans.js"
// import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
// import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
export default {
data () {
return {
currentRow:'',
headerData:'',
wareHouseList:'',
//
favorite: false,
// start
exportData: [],
exportName: "检验方法" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["检验方法"],
exportFooter: [],
exportList: [],
warehouseData: {
id:'',
site: '',
},
activeName:"detail",
// end
searchData: {
transNo:'',
site: '',
userName: this.$store.state.user.name,
transDate: '',
warehouseID: '',
rollNo: '',
partNo: '',
partDesc: '',
transQty: '',
batchNo: '',
locationID: '',
wdrNo: '',
manufactureDate: '',
orderRef1: '',
receiver: '',
enterDate: '',
transType: '',
page: 1,
limit: 10,
},
pageIndex: 1,
pageSize: 20,
totalPage: 0,
height: 200,
secondHeight: 200,
dataList: [],
dataList2:[],
dataListLoading: false,
modalFlag: false,
modalDisableFlag: false,
modalData: {
site: '',
warehouseId: '',
locationId: '',
active: 'Y',
locationName: '',
creator: this.$store.state.user.name,
// updateBy: this.$store.state.user.name,
locationDescription: '',
keeper: '',
remarks: '',
createTime: '',
},
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableSite',
tableId: "200004Table",
tableName: "工厂编码",
columnWidth: 100,
columnProp: 'site',
headerAlign: 'center',
align: "center",
columnLabel: '工厂编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableTransType',
tableId: "200004Table",
tableName: "出入库类型",
columnWidth: 105,
columnProp: 'transType',
headerAlign: 'left',
align: "left",
columnLabel: '出入库类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableTransNo',
tableId: "200004Table",
tableName: "出入库单号",
columnWidth: 100,
columnProp: 'transNo',
headerAlign: 'left',
align: "left",
columnLabel: '出入库单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableTransDate',
tableId: "200004Table",
tableName: "出入库日期",
columnWidth: 105,
columnProp: 'transDate',
headerAlign: 'center',
align: "center",
columnLabel: '出入库日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableWarehouseId',
tableId: "200004Table",
tableName: "仓库编码",
columnWidth: 105,
columnProp: 'warehouseID',
headerAlign: 'left',
align: "left",
columnLabel: '仓位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableRollNo',
tableId: "200004Table",
tableName: "卷号",
columnWidth: 100,
columnProp: 'rollNo',
headerAlign: 'center',
align: "center",
columnLabel: '卷号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TablePartNo',
tableId: "200004Table",
tableName: "物料编码",
columnWidth: 105,
columnProp: 'partNo',
headerAlign: 'left',
align: "left",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TablePartDesc',
tableId: "200004Table",
tableName: "料号描述",
columnWidth: 105,
columnProp: 'partDesc',
headerAlign: 'left',
align: "left",
columnLabel: '料号描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
// {
// userId: this.$store.state.user.name,
// functionId: 200004,
// serialNumber: '200004TableNum',
// tableId: "200004Table",
// tableName: "",
// columnWidth: 105,
// columnProp: 'num',
// headerAlign: 'right',
// align: "right",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// },
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableTransQty',
tableId: "200004Table",
tableName: "出入库数量",
columnWidth: 105,
columnProp: 'transQty',
headerAlign: 'right',
align: "right",
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableBatchNo',
tableId: "200004Table",
tableName: "批号",
columnWidth: 105,
columnProp: 'batchNo',
headerAlign: 'left',
align: "left",
columnLabel: '批号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableLocationID',
tableId: "200004Table",
tableName: "库位",
columnWidth: 105,
columnProp: 'locationID',
headerAlign: 'left',
align: "left",
columnLabel: '库位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableWdrNo',
tableId: "200004Table",
tableName: "W/D/R",
columnWidth: 105,
columnProp: 'wdrNo',
headerAlign: 'left',
align: "left",
columnLabel: 'W/D/R',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableManufactureDate',
tableId: "200004Table",
tableName: "生产日期",
columnWidth: 105,
columnProp: 'manufactureDate',
headerAlign: 'center',
align: "center",
columnLabel: '生产日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableOrderRef1',
tableId: "200004Table",
tableName: "关联单号",
columnWidth: 105,
columnProp: 'orderRef1',
headerAlign: 'left',
align: "left",
columnLabel: '关联单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableReceiver',
tableId: "200004Table",
tableName: "经手人",
columnWidth: 100,
columnProp: 'receiver',
headerAlign: 'left',
align: "left",
columnLabel: '经手人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableEnterDate',
tableId: "200004Table",
tableName: "录入时间",
columnWidth: 130,
columnProp: 'enterDate',
headerAlign: 'center',
align: "center",
columnLabel: '录入时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableUserName',
tableId: "200004Table",
tableName: "录入人",
columnWidth: 105,
columnProp: 'userName',
headerAlign: 'left',
align: "left",
columnLabel: '录入人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
rules: {
warehouseId:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
locationId:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
site:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
locationName:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
]
},
options: [],
userBuList: [],
authSearch: false,
authSave: false,
authUpdate: false,
authDelete: false,
menuId: this.$route.meta.menuId,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 180
})
},
//
created () {
this.getDataList()
//this.getWareHouseList()
},
methods: {
// bu
getSiteAndBuByUserName () {
let tempData = {
username: this.$store.state.user.name,
}
getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) {
this.userBuList = data.rows
}
})
},
tabClick (tab, event) {
//
this.refreshCurrentTabTable()
},
changeData(row){
this.currentRow = JSON.parse(JSON.stringify(row));
this.headerData=row;
this.refreshCurrentTabTable ();
},
// refreshCurrentTabTable(){
// if(this.currentRow===''||this.currentRow===null){
// this.currentRow={site:'',transNo:''}
// }
// findByRoll(this.currentRow).then(({data}) => {
// //
// if (data && data.code == 0) {
// this.dataList2 = data.rows
// } else {
// this.dataList2 = [];
// }
// });
// },
//
getDataList (){
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
findByRolls(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
if(this.dataList.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
this.changeData(this.dataList[0])
}else {
this.changeData(null)
}
}
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//excel
async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await findByRolls(this.searchData).then(({data}) => {
this.exportList= data.rows
})
return this.exportList
},
startDownload() {},
finishDownload() {},
fields () {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
//
async getTableUserColumn (tableId, columnId) {
let queryTableUser = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: tableId,
status: true,
languageCode: this.$i18n.locale
}
await getTableUserListLanguage(queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList1 = []
switch (columnId) {
case 1:
this.columnList = data.rows
break;
// case 2:
// this.columnDetailList = data.rows
// break;
// case 3:
// this.columnList2 = data.rows
// break;
// case 4:
// this.columnList3 = data.rows
// break;
}
} else {
this.getColumnList(tableId, columnId)
}
})
},
// tableDefault
async getColumnList (tableId, columnId) {
let queryTable = {
functionId: this.$route.meta.menuId,
tableId: tableId,
languageCode: this.$i18n.locale
}
await getTableDefaultListLanguage(queryTable).then(({data}) => {
if (!data.rows.length == 0) {
switch (columnId) {
case 1:
this.columnList = data.rows
break;
// case 2:
// this.columnDetailList = data.rows
// break;
// case 3:
// this.columnList2 = data.rows
// break;
// case 4:
// this.columnList3 = data.rows
// break;
}
} else {
// this.showDefault = true.
}
})
},
//
getButtonAuthData () {
let searchFlag = this.isAuth(this.menuId+":search")
let saveFlag = this.isAuth(this.menuId+":save")
let updateFlag = this.isAuth(this.menuId+":update")
let deleteFlag = this.isAuth(this.menuId+":delete")
//
this.authSearch = !searchFlag
this.authSave = !saveFlag
this.authUpdate = !updateFlag
this.authDelete = !deleteFlag
},
}
}
</script>

84
src/views/modules/material/seekByTrans.vue

@ -218,24 +218,24 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
}, },
// {
// userId: this.$store.state.user.name,
// functionId: 200003,
// serialNumber: '200003TableTransNo',
// tableId: "200003Table",
// tableName: "",
// columnWidth: 100,
// columnProp: 'transNo',
// headerAlign: 'left',
// align: "left",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// },
{
userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableTransNo',
tableId: "200003Table",
tableName: "出入库单号",
columnWidth: 100,
columnProp: 'transNo',
headerAlign: 'left',
align: "left",
columnLabel: '出入库单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003, functionId: 200003,
@ -452,24 +452,24 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
}, },
// {
// userId: this.$store.state.user.name,
// functionId: 200003,
// serialNumber: '200003TableReceiver',
// tableId: "200003Table",
// tableName: "",
// columnWidth: 100,
// columnProp: 'receiver',
// headerAlign: 'left',
// align: "left",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// },
{
userId: this.$store.state.user.name,
functionId: 200003,
serialNumber: '200003TableReceiver',
tableId: "200003Table",
tableName: "经手人",
columnWidth: 100,
columnProp: 'receiver',
headerAlign: 'left',
align: "left",
columnLabel: '经手人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 200003, functionId: 200003,
@ -700,12 +700,12 @@ export default {
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
if(this.dataList.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
this.changeData(this.dataList[0])
}else {
this.changeData(null)
}
// if(this.dataList.length>0){
// this.$refs.mainTable.setCurrentRow(this.dataList[0]);
// this.changeData(this.dataList[0])
// }else {
// this.changeData(null)
// }
} }
}) })
}, },

726
src/views/modules/material/seekInvByRolls.vue

@ -0,0 +1,726 @@
<template>
<div class="mod-config">
<!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'物料编码:'">
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'库位编码:'">
<el-input v-model="searchData.locationID" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'料号描述:'">
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'卷号:'">
<el-input v-model="searchData.rollNo" clearable style="width: 120px"></el-input>
</el-form-item>
<!-- <el-form-item :label="'卷号:'">-->
<!-- <el-input v-model="searchData.rollNo" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
<!-- <download-excel-->
<!-- :fields="fields()"-->
<!-- :data="exportData"-->
<!-- type="xls"-->
<!-- :name="exportName"-->
<!-- :header="exportHeader"-->
<!-- :footer="exportFooter"-->
<!-- :fetch="createExportData"-->
<!-- :before-generate="startDownload"-->
<!-- :before-finish="finishDownload"-->
<!-- worksheet="导出信息"-->
<!-- class="el-button el-button&#45;&#45;primary el-button&#45;&#45;medium">-->
<!-- {{ "导出" }}-->
<!-- </download-excel>-->
</el-form-item>
</el-form>
<!-- 展示列表 -->
<el-table
:height="height"
:data="dataList"
@row-click="changeData"
border
highlight-current-row
ref="mainTable"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<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>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
</template>
<script>
import {
findAllByRolls, //
findAllByRollsOrRollNo //
} from "@/api/material/seekByTrans.js"
// import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
// import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
export default {
data () {
return {
activeName:'detail',
wareHouseList:'',
//
favorite: false,
// start
exportData: [],
exportName: "检验方法" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["检验方法"],
exportFooter: [],
exportList: [],
warehouseData: {
id:'',
site: '',
},
// end
searchData: {
site: '',
userName: this.$store.state.user.name,
transDate: '',
warehouseID: '',
rollNo: '',
partNo: '',
partDesc: '',
qtyOnHand: '',
batchNo: '',
locationID: '',
manufactureDate: '',
orderRef1: '',
receiver: '',
FirstInDate: '',
transType: '',
page: 1,
limit: 10,
},
pageIndex: 1,
pageSize: 20,
totalPage: 0,
height: 200,
secondHeight: 200,
dataList: [],
dataList2:[],
dataListLoading: false,
modalFlag: false,
modalDisableFlag: false,
modalData: {
site: '',
warehouseId: '',
locationId: '',
active: 'Y',
locationName: '',
creator: this.$store.state.user.name,
// updateBy: this.$store.state.user.name,
locationDescription: '',
keeper: '',
remarks: '',
createTime: '',
},//..
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableWarehouseId',
tableId: "200005Table",
tableName: "仓位编码",
columnWidth: 130,
columnProp: 'warehouseID',
headerAlign: 'left',
align: "left",
columnLabel: '仓位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TablePartNo',
tableId: "200005Table",
tableName: "物料编码",
columnWidth: 130,
columnProp: 'partNo',
headerAlign: 'left',
align: "left",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TablePartDesc',
tableId: "200005Table",
tableName: "料号描述",
columnWidth: 130,
columnProp: 'partDesc',
headerAlign: 'left',
align: "left",
columnLabel: '料号描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200004,
serialNumber: '200004TableRollNo',
tableId: "200004Table",
tableName: "卷号",
columnWidth: 100,
columnProp: 'rollNo',
headerAlign: 'center',
align: "center",
columnLabel: '卷号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableQtyOnHand',
tableId: "200005Table",
tableName: "库存数量",
columnWidth: 130,
columnProp: 'qtyOnHand',
headerAlign: 'right',
align: "right",
columnLabel: '库存数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableBatchNo',
tableId: "200005Table",
tableName: "批号",
columnWidth: 130,
columnProp: 'batchNo',
headerAlign: 'left',
align: "left",
columnLabel: '批号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableLocationID',
tableId: "200005Table",
tableName: "库位",
columnWidth: 130,
columnProp: 'locationID',
headerAlign: 'left',
align: "left",
columnLabel: '库位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableManufactureDate',
tableId: "200005Table",
tableName: "生产日期",
columnWidth: 130,
columnProp: 'manufactureDate',
headerAlign: 'center',
align: "center",
columnLabel: '生产日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableFirstInDate',
tableId: "200005Table",
tableName: "首次入库日期",
columnWidth: 130,
columnProp: 'FirstInDate',
headerAlign: 'center',
align: "center",
columnLabel: '首次入库日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableExpiredDate',
tableId: "200005Table",
tableName: "失效日期",
columnWidth: 130,
columnProp: 'expiredDate',
headerAlign: 'center',
align: "center",
columnLabel: '失效日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 200005,
serialNumber: '200005TableDaysUntilExpired',
tableId: "200005Table",
tableName: "剩余有效期天数",
columnWidth: 130,
columnProp: 'daysUntilExpired',
headerAlign: 'right',
align: "right",
columnLabel: '剩余有效期天数',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
rules: {
},
options: [],
userBuList: [],
authSearch: false,
authSave: false,
authUpdate: false,
authDelete: false,
menuId: this.$route.meta.menuId,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 180
})
},
//
created () {
this.getDataList()
//this.getWareHouseList()
},
methods: {
// bu
getSiteAndBuByUserName () {
let tempData = {
username: this.$store.state.user.name,
}
getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) {
this.userBuList = data.rows
}
})
},
//warehousewarehouseId
getWareHouseList (){
findByWarehouse(``).then(({data}) =>{
this.wareHouseList=data.rows
}
)
},
//
getDataList (){
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
findAllByRolls(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
if(this.dataList.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
this.changeData(this.dataList[0])
}else {
this.changeData(null)
}
}
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
tabClick (tab, event) {
//
this.refreshCurrentTabTable()
},
changeData(row){
this.currentRow = JSON.parse(JSON.stringify(row));
this.headerData=row;
this.refreshCurrentTabTable ();
},
refreshCurrentTabTable(){
if(this.currentRow===''||this.currentRow===null){
this.currentRow={site:'',transNo:''}
}
// findAllByRollsOrRollNo(this.currentRow).then(({data}) => {
// //
// if (data && data.code == 0) {
// this.dataList2 = data.rows
//
// } else {
// this.dataList2 = [];
// }
// });
},
// //
// addModal () {
// this.modalData = {
// flag: '1',
// site: '',
// creator: this.$store.state.user.name,
// locationId: '',
// locationName: '',
// active: 'Y',
// warehouseId: '',
// locationDescription: '',
// keeper: '',
// remarks: '',
// }
// this.modalDisableFlag = false
// this.modalFlag = true
// },
// //
// updateModal (row) {
// this.modalData = {
// flag: '2',
// id:row.id,
// site: row.site,
// creator: this.$store.state.user.name,
// warehouseId: row.warehouseId,
// locationId: row.locationId,
// active: row.active,
// locationName: row.locationName,
// locationDescription: row.locationDescription,
// keeper: row.keeper,
// remarks: row.remarks,
// }
// this.modalDisableFlag = true
// this.modalFlag = true
// },
//
// deleteModal (row) {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// deleteLocation(row).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// },
// /
// saveData () {
// if (this.modalData.site === '' || this.modalData.site == null) {
// this.$message.warning('')
// return
// }
// if (this.modalData.warehouseId === '' || this.modalData.warehouseId == null) {
// this.$message.warning('')
// return
// }
// if(this.modalData.locationName === ''|| this.modalData.locationName == null){
// this.$message.warning('')
// return
// }
// if(this.modalData.locationId === ''|| this.modalData.locationId == null){
// this.$message.warning('')
// return
// }
// if (this.modalData.flag === '1') { //
// saveLocation(this.modalData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.modalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// } else { //
// updateLocation(this.modalData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.modalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }
// },
//
inspectionTypeSearch () {
let tempData = {
site: this.$store.state.user.site
}
inspectionTypeSearch(tempData).then(({data}) => {
if (data.code === 0) {
this.options = data.rows
}
})
},
//
favoriteIsOk () {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
}
userFavoriteList(userFavorite).then(({data}) => {for (let i = 0; i < data.list.length; i++) {
if(this.$route.meta.menuId === data.list[i].menuId){
this.favorite = true
}
}
})
},
// OR
favoriteFunction () {
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
}
if (this.favorite) {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
} else {
//
saveUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = true
})
}
},
//excel
async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await findAllByRolls(this.searchData).then(({data}) => {
this.exportList= data.rows
})
return this.exportList
},
startDownload() {},
finishDownload() {},
fields () {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
//
async getTableUserColumn (tableId, columnId) {
let queryTableUser = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: tableId,
status: true,
languageCode: this.$i18n.locale
}
await getTableUserListLanguage(queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList1 = []
switch (columnId) {
case 1:
this.columnList = data.rows
break;
// case 2:
// this.columnDetailList = data.rows
// break;
// case 3:
// this.columnList2 = data.rows
// break;
// case 4:
// this.columnList3 = data.rows
// break;
}
} else {
this.getColumnList(tableId, columnId)
}
})
},
// tableDefault
async getColumnList (tableId, columnId) {
let queryTable = {
functionId: this.$route.meta.menuId,
tableId: tableId,
languageCode: this.$i18n.locale
}
await getTableDefaultListLanguage(queryTable).then(({data}) => {
if (!data.rows.length == 0) {
switch (columnId) {
case 1:
this.columnList = data.rows
break;
// case 2:
// this.columnDetailList = data.rows
// break;
// case 3:
// this.columnList2 = data.rows
// break;
// case 4:
// this.columnList3 = data.rows
// break;
}
} else {
// this.showDefault = true.
}
})
},
//
getButtonAuthData () {
let searchFlag = this.isAuth(this.menuId+":search")
let saveFlag = this.isAuth(this.menuId+":save")
let updateFlag = this.isAuth(this.menuId+":update")
let deleteFlag = this.isAuth(this.menuId+":delete")
//
this.authSearch = !searchFlag
this.authSave = !saveFlag
this.authUpdate = !updateFlag
this.authDelete = !deleteFlag
},
}
}
</script>
Loading…
Cancel
Save