Browse Source

总查询添加

master
wenkuan.shi 2 years ago
parent
commit
579ac2586b
  1. 9
      src/api/warehouse/allFind.js
  2. 10
      src/views/modules/material/seekByTrans.vue
  3. 860
      src/views/modules/warehouse/allFind.vue
  4. 37
      src/views/modules/warehouse/sendEmail.vue

9
src/api/warehouse/allFind.js

@ -0,0 +1,9 @@
import { createAPI } from "@/utils/httpRequest.js";
//查询
export const allFindInfo= data => createAPI(`/find/info/findAll`,'post',data)

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

@ -671,26 +671,16 @@ export default {
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 = [];
}
});
},
//warehousewarehouseId
getWareHouseList (){
findByWarehouse(``).then(({data}) =>{
this.wareHouseList=data.rows
}
)
},
//
getDataList (){
this.searchData.limit = this.pageSize

860
src/views/modules/warehouse/allFind.vue

@ -0,0 +1,860 @@
<template>
<div class="mod-config">
<!-- &lt;!&ndash; 收藏 &ndash;&gt;-->
<!-- <div>-->
<!-- <span @click="favoriteFunction()">-->
<!-- <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>-->
<!-- </span>-->
<!-- </div>-->
<!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'工厂ID:'">
<el-input v-model="searchData.site" clearable style="width: 120px" :rules="rules.site" :disabled="!isNew"></el-input>
</el-form-item>
<el-form-item :label="'工厂编号:'">
<el-input v-model="searchData.rollNo" clearable style="width: 120px" :rules="rules.rollNo"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
<!-- <el-button v-if="!authSave" type="primary" @click="addModal()">新增</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
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-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="160"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="updateModal(scope.row)">修改</a>-->
<!--&lt;!&ndash; <a type="text" size="small" @click="deleteModal(scope.row)">删除</a>&ndash;&gt;-->
<!-- </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>-->
<!-- 新增和修改 -->
<el-dialog title="检验方法" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="500px">
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="收件人邮箱:" prop="toEmail" :rules="rules.toEmail">-->
<!-- <el-input v-model="modalData.toEmail" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="发件人邮箱:" prop="fromEmail" >-->
<!-- <el-input v-model="modalData.fromEmail" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="发件人密码:" prop="password" >-->
<!-- <el-input v-model="modalData.password" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="发送服务器地址:" prop="host" >-->
<!-- <el-input v-model="modalData.host" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="端口:" prop="port" >-->
<!-- <el-input v-model="modalData.port" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">-->
<!-- <el-button type="primary" @click="saveData()">保存</el-button>-->
<!-- <el-button type="primary" @click="modalFlag = false">关闭</el-button>-->
<!-- </el-footer>-->
</el-dialog>
</div>
</template>
<script>
import {
allFindInfo, //
// saveEmail, //
// updateEmail, //
// inspectionTypeSearch, //
// // getSiteAndBuByUserName
} from "@/api/warehouse/allFind.js"
// import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
// import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
export default {
data () {
return {
//
favorite: false,
// start
exportData: [],
exportName: "检验方法" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["检验方法"],
exportFooter: [],
exportList: [],
// end
searchData: {
site: this.$store.state.user.site,
rollNo: '',
partNo: '',
partDesc: '',
rMRollNo: '',
rMRollPONo:'',
rMRollReceiveDate:'',
rMRollReceiveNo:'',
soOrderNo:'',
rollProductionDate1:'',
rollProducedby1:'',
rollProductionDate2:'',
rollProducedby2:'',
receiveNo:'',
receiveDate:'',
expirationDate:'',
shipNo:'',
shipDate:''
},
pageIndex: 1,
pageSize: 20,
totalPage: 0,
height: 200,
dataList: [],
dataListLoading: false,
modalFlag: false,
modalDisableFlag: false,
modalData: {
site: this.$store.state.user.site,
rollNo: '',
partNo: '',
partDesc: '',
rMRollNo: '',
rMRollPONo:'',
rMRollReceiveDate:'',
rMRollReceiveNo:'',
soOrderNo:'',
rollProductionDate1:'',
rollProducedby1:'',
rollProductionDate2:'',
rollProducedby2:'',
receiveNo:'',
receiveDate:'',
expirationDate:'',
shipNo:'',
shipDate:''
},
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableToSite',
tableId: "700Table",
tableName: "工厂ID",
columnWidth: 100,
columnProp: 'site',
headerAlign: 'center',
align: "center",
columnLabel: '工厂ID',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRollNo',
tableId: "700Table",
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: 700,
serialNumber: '700TablePartNo',
tableId: "700Table",
tableName: "产品料号",
columnWidth: 100,
columnProp: 'partNo',
headerAlign: 'center',
align: "left",
columnLabel: '产品料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TablePartDesc',
tableId: "700Table",
tableName: "产品名称",
columnWidth: 100,
columnProp: 'partDesc',
headerAlign: 'center',
align: "center",
columnLabel: '产品名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRMRollNo',
tableId: "700Table",
tableName: "原材料卷号",
columnWidth: 100,
columnProp: 'rMRollNo',
headerAlign: 'center',
align: "center",
columnLabel: '原材料卷号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRMRMRollPONo',
tableId: "700Table",
tableName: "材料采购单号",
columnWidth: 100,
columnProp: 'rMRollPONo',
headerAlign: 'center',
align: "center",
columnLabel: '材料采购单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRMRollReceiveDate',
tableId: "700Table",
tableName: "材料入库日期",
columnWidth: 100,
columnProp: 'rMRollReceiveDate',
headerAlign: 'center',
align: "center",
columnLabel: '材料入库日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRMRollRMRollReceiveNo',
tableId: "700Table",
tableName: "材料入库单号",
columnWidth: 100,
columnProp: 'rMRollReceiveNo',
headerAlign: 'center',
align: "center",
columnLabel: '材料入库单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableSOOrderNo',
tableId: "700Table",
tableName: "生产订单号",
columnWidth: 100,
columnProp: 'soOrderNo',
headerAlign: 'center',
align: "center",
columnLabel: '生产订单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRollProductionDate1',
tableId: "700Table",
tableName: "模切日期",
columnWidth: 100,
columnProp: 'rollProductionDate1',
headerAlign: 'center',
align: "center",
columnLabel: '模切日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRollRollProducedby1',
tableId: "700Table",
tableName: "模切操作员",
columnWidth: 100,
columnProp: 'rollProducedby1',
headerAlign: 'center',
align: "center",
columnLabel: '模切操作员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRollProductionDate2',
tableId: "700Table",
tableName: "FQC检验日期",
columnWidth: 100,
columnProp: 'rollProductionDate2',
headerAlign: 'center',
align: "center",
columnLabel: 'FQC检验日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableRollProducedby2',
tableId: "700Table",
tableName: "FQC检验员",
columnWidth: 100,
columnProp: 'rollProducedby2',
headerAlign: 'center',
align: "center",
columnLabel: 'FQC检验员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableReceiveNo',
tableId: "700Table",
tableName: "成品卷入库单号",
columnWidth: 100,
columnProp: 'receiveNo',
headerAlign: 'center',
align: "center",
columnLabel: '成品卷入库单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableReceiveDate',
tableId: "700Table",
tableName: "成品卷入库日期",
columnWidth: 100,
columnProp: 'receiveDate',
headerAlign: 'center',
align: "center",
columnLabel: '成品卷入库日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableExpirationDate',
tableId: "700Table",
tableName: "成品卷失效日期",
columnWidth: 100,
columnProp: 'expirationDate',
headerAlign: 'center',
align: "center",
columnLabel: '成品卷失效日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableShipNo',
tableId: "700Table",
tableName: "成品卷发货单号",
columnWidth: 100,
columnProp: 'shipNo',
headerAlign: 'center',
align: "center",
columnLabel: '成品卷发货单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 700,
serialNumber: '700TableShipDate',
tableId: "700Table",
tableName: "成品卷发货日期",
columnWidth: 100,
columnProp: 'shipDate',
headerAlign: 'center',
align: "center",
columnLabel: '成品卷发货日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
rules: {
site:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
rollNo:[
{
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()
},
methods: {
// bu
getSiteAndBuByUserName () {
let tempData = {
username: this.$store.state.user.name,
}
getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) {
this.userBuList = data.rows
}
})
},
//
getDataList () {
if (this.searchData.rollNo === '' || this.searchData.rollNo == null) {
this.$message.warning('请输入产品卷号!')
return
}
// this.searchData.limit = this.pageSize
// this.searchData.page = this.pageIndex
allFindInfo(this.searchData).then(({data}) => {
if (data && data.code == 0) {
// this.dataList=[]
// this.dataList.push( data.rows)
this.dataList=data.rows;
// this.dataList = data.page.list
// this.pageIndex = data.page.currPage
// this.pageSize = data.page.pageSize
// this.totalPage = data.page.totalCount
}
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
addModal () {
this.modalData = {
flag: '1',
site: '',
creator: this.$store.state.user.name,
toEmail: '',
fromEmail: '',
password: '',
host: '',
port: '',
value0: '',
value1: '',
}
this.modalDisableFlag = false
this.modalFlag = true
},
//
updateModal (row) {
this.modalData = {
flag: '2',
id:row.id,
site: row.site,
creator: this.$store.state.user.name,
toEmail: row.toEmail,
fromEmail: row.fromEmail,
password: row.password,
host: row.host,
port: row.port,
value0: row.value0,
value1: row.value1,
}
this.modalDisableFlag = true
this.modalFlag = true
},
//
deleteModal (row) {
this.$confirm(`是否删除这个检验方法?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteWarehouse(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.toEmail === '' || this.modalData.toEmail == null) {
this.$message.warning('请输入收件人邮箱!')
return
}
if (this.modalData.host === '' || this.modalData.host == null) {
this.$message.warning('发送服务器地址!')
return
}
if (this.modalData.flag === '1') { //
saveEmail(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 { //
updateEmail(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 allFindInfo(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>

37
src/views/modules/warehouse/sendEmail.vue

@ -303,8 +303,9 @@ export default {
// this.searchData.limit = this.pageSize
// this.searchData.page = this.pageIndex
getEmail(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList = data.rows
if (data && data.code == 0) {
this.dataList=[]
this.dataList.push( data.rows)
// this.dataList = data.page.list
// this.pageIndex = data.page.currPage
// this.pageSize = data.page.pageSize
@ -332,15 +333,13 @@ export default {
flag: '1',
site: '',
creator: this.$store.state.user.name,
warehouseId: '',
warehouseName: '',
active: 'Y',
warehouseType: '',
warehouseTypeDB: '',
keeper: '',
companyId: '',
validStock: 'Y',
useLocation: 'Y'
toEmail: '',
fromEmail: '',
password: '',
host: '',
port: '',
value0: '',
value1: '',
}
this.modalDisableFlag = false
this.modalFlag = true
@ -353,15 +352,13 @@ export default {
id:row.id,
site: row.site,
creator: this.$store.state.user.name,
warehouseId: row.warehouseId,
warehouseName: row.warehouseName,
active: row.active,
warehouseType: row.warehouseType,
warehouseTypeDB: row.warehouseTypeDB,
keeper: row.keeper,
companyId: row.companyId,
validStock: row.validStock,
useLocation: row.useLocation
toEmail: row.toEmail,
fromEmail: row.fromEmail,
password: row.password,
host: row.host,
port: row.port,
value0: row.value0,
value1: row.value1,
}
this.modalDisableFlag = true
this.modalFlag = true

Loading…
Cancel
Save