Merge branch 'material-ui' of http://192.168.30.2:3000/bonus/bonus-ui into material-ui
This commit is contained in:
commit
636da4818a
|
|
@ -26,6 +26,15 @@ export function getUnitList(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 分公司-下拉
|
||||
export function getImpUnitNameListApi(data) {
|
||||
return request({
|
||||
url: '/material/select/getImpUnitNameList',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 往来单位下拉选,过滤掉班组
|
||||
// 往来单位下拉选
|
||||
export function getUnitListFilterTeam(data) {
|
||||
|
|
@ -126,3 +135,14 @@ export function updatePrintStatus(id) {
|
|||
data: {id: id},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//退料查询
|
||||
export function getBackQueryList(query) {
|
||||
return request({
|
||||
url: '/material/back_apply_info/getBackQueryList',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,3 +118,22 @@ export function getRepairProjectListApi(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//维修查询
|
||||
export function getRepairQueryList(query) {
|
||||
return request({
|
||||
url: '/material/repair/getRepairQueryList',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
//维修审核查询
|
||||
export function getRepairAuditQueryList(query) {
|
||||
return request({
|
||||
url: '/material/repair/getRepairAuditQueryList',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,34 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="leaseUnitId">
|
||||
<treeselect
|
||||
v-model="queryParams.leaseUnitId"
|
||||
:options="unitList" :normalizer="normalizer"
|
||||
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
placeholder="请选择往来单位" @select="unitChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="leaseProjectId">
|
||||
<treeselect
|
||||
v-model="queryParams.leaseProjectId"
|
||||
:options="proList" :normalizer="normalizer"
|
||||
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
placeholder="请选择工程名称" @select="proChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="impUnitName">
|
||||
<el-select v-model="queryParams.impUnitName" placeholder="请选择分公司" style="width: 240px">
|
||||
<el-option
|
||||
v-for="item in impUnitNameList"
|
||||
:key="item.impUnitName"
|
||||
:label="item.impUnitName"
|
||||
:value="item.impUnitName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
|
@ -729,13 +757,20 @@
|
|||
<script>
|
||||
import { getListLeaseApply, getApplyInfo, getCheckInfo } from '@/api/lease/apply'
|
||||
import { outInfoList, getDetailsByTypeId, submitOut, submitNumOut, rejectLeaseOut, getOutNumApi,deleteLeaseOut,updatePreNum } from '@/api/lease/out'
|
||||
import {
|
||||
getProjectList,
|
||||
getUnitList,
|
||||
getImpUnitNameListApi
|
||||
} from '@/api/back/index.js'
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
import Treeselect from "@riophae/vue-treeselect"
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
|
||||
// import chapter from '../../../../utils/chapter';
|
||||
import printJS from 'print-js'
|
||||
export default {
|
||||
name: 'OutBound',
|
||||
dicts: ['lease_task_status'],
|
||||
components: { vueEasyPrint },
|
||||
components: { vueEasyPrint, Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -781,8 +816,14 @@ export default {
|
|||
pageSize: 10,
|
||||
time: null, //申请时间
|
||||
taskStatus: '',
|
||||
keyWord: ''
|
||||
keyWord: '',
|
||||
leaseUnitId: null,
|
||||
leaseProjectId: null,
|
||||
impUnitName: null,
|
||||
},
|
||||
unitList: [],
|
||||
proList: [],
|
||||
impUnitNameList: [],
|
||||
//出库的搜索栏
|
||||
queryOutInfo: {
|
||||
pageNum: 1,
|
||||
|
|
@ -847,8 +888,54 @@ export default {
|
|||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(end), this.format(end)]
|
||||
this.getOutNum()
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
this.getImpUnitNameList()
|
||||
},
|
||||
methods: {
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const res = await getUnitList({})
|
||||
this.unitList = res.data
|
||||
console.log('🚀 ~ this.unitList:', this.unitList)
|
||||
},
|
||||
unitChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetProData()
|
||||
},500)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = { unitId: this.queryParams.leaseUnitId}
|
||||
const res = await getProjectList(params)
|
||||
this.proList = res.data
|
||||
this.queryParams.leaseProjectId=null
|
||||
},
|
||||
proChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetUnitData()
|
||||
},500)
|
||||
},
|
||||
// 分公司下拉
|
||||
async getImpUnitNameList () {
|
||||
try {
|
||||
const res = await getImpUnitNameListApi()
|
||||
this.impUnitNameList = res.data
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ error:', error)
|
||||
}
|
||||
},
|
||||
async getOutNum() {
|
||||
try {
|
||||
const params = {
|
||||
|
|
@ -928,6 +1015,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
|
|
|
|||
|
|
@ -10,17 +10,97 @@
|
|||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="materialType">
|
||||
<el-select v-model="queryParams.materialType" placeholder="请选择物品种类" clearable filterable>
|
||||
<el-form-item label="施工类型" prop="lineTypes">
|
||||
<el-select
|
||||
v-model="queryParams.lineTypes"
|
||||
placeholder="请选择施工类型"
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLineTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in materialTypeList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
v-for="item in lineTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资类型" prop="materialType">
|
||||
<el-select
|
||||
v-model="queryParams.materialType"
|
||||
placeholder="请选择物资类型"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleMaterialTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in materialTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="typeName">
|
||||
<el-select
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请选择物资名称"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleTypeNameChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeModelName">
|
||||
<el-select
|
||||
v-model="queryParams.typeModelName"
|
||||
placeholder="请选择规格型号"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeModelNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="机具类型" prop="jiJuType">
|
||||
<el-select
|
||||
v-model="queryParams.jiJuType"
|
||||
placeholder="请选择机具类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="施工机具" :value="1" />
|
||||
<el-option label="安全工器具" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item prop="materialType">-->
|
||||
<!-- <el-select v-model="queryParams.materialType" placeholder="请选择物品种类" clearable filterable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in materialTypeList"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.label"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item prop="isAssets">
|
||||
<el-select v-model="queryParams.isAssets" placeholder="是否固定资产" clearable>
|
||||
|
|
@ -29,34 +109,34 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="materialName">
|
||||
<el-select
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleMaModel"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in materialNameList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="materialName">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.materialName"-->
|
||||
<!-- placeholder="请选择设备类型"-->
|
||||
<!-- clearable-->
|
||||
<!-- filterable-->
|
||||
<!-- @change="handleMaModel"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in materialNameList"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.label"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
|
||||
<el-form-item prop="materialModel">
|
||||
<el-select v-model="queryParams.materialModel" placeholder="请选择规格型号" clearable filterable>
|
||||
<el-option
|
||||
v-for="dict in materialModelList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="materialModel">-->
|
||||
<!-- <el-select v-model="queryParams.materialModel" placeholder="请选择规格型号" clearable filterable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in materialModelList"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.label"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item prop="maStatus">
|
||||
<el-select v-model="queryParams.maStatus" placeholder="请选择设备状态" clearable filterable>
|
||||
|
|
@ -100,6 +180,7 @@
|
|||
<el-table-column label="设备类型" align="center" prop="materialName" sortable show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" align="center" prop="materialModel" sortable show-overflow-tooltip />
|
||||
<el-table-column label="设备编号" align="center" prop="maCode" />
|
||||
<el-table-column label="机具类型" align="center" prop="jiJuTypeStr" sortable show-overflow-tooltip />
|
||||
<el-table-column label="设备状态" align="center" prop="statusName" sortable show-overflow-tooltip />
|
||||
<el-table-column label="固定资产编号" align="center" prop="assetsCode" width="200px" sortable
|
||||
show-overflow-tooltip
|
||||
|
|
@ -522,6 +603,7 @@ import { getToken } from '@/utils/auth'
|
|||
import QRCode from 'qrcodejs2'
|
||||
import html2canvas from 'html2canvas'
|
||||
import { formatTime } from '@/utils/bonus'
|
||||
import {getLintTypeList, getMaterialTypeList} from "@/api/stquery/stquery";
|
||||
|
||||
export default {
|
||||
name: 'Device',
|
||||
|
|
@ -575,10 +657,16 @@ export default {
|
|||
keyWord: undefined,
|
||||
isAssets: undefined,
|
||||
maStatus: null,
|
||||
materialType: '',
|
||||
materialName: '',
|
||||
materialModel: ''
|
||||
typeName: null, //物资名称
|
||||
typeModelName: null, //规格型号
|
||||
lineTypes: [], //线路类型多选数组
|
||||
materialType: null,
|
||||
jiJuType:null
|
||||
},
|
||||
lineTypeOptions: [], // 线路类型选项
|
||||
materialTypeOptions: [], // 物资类型选项
|
||||
typeNameOptions:[],
|
||||
typeModelNameOptions:[],
|
||||
// 查询参数
|
||||
queryTeam: {
|
||||
pageNum: 1,
|
||||
|
|
@ -648,10 +736,14 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getZichanType()
|
||||
this.getDeviceType()
|
||||
// this.getDeviceType()
|
||||
this.getKeeperData()
|
||||
this.getRepairerData()
|
||||
this.getList()
|
||||
//线路类型下拉
|
||||
this.getLintTypeList()
|
||||
this.getMaterialTypeList()
|
||||
this.getDeviceType()
|
||||
},
|
||||
// watch: {
|
||||
// // 监听 form.qrCode 的变化,如果有值就生成二维码
|
||||
|
|
@ -665,6 +757,120 @@ export default {
|
|||
|
||||
// },
|
||||
methods: {
|
||||
async getLintTypeList() {
|
||||
try {
|
||||
const res = await getLintTypeList()
|
||||
if (res.code === 200 && res.data) {
|
||||
// 根据后端返回的数据结构进行调整
|
||||
this.lineTypeOptions = res.data.map(item => {
|
||||
// 如果返回的是对象数组,根据实际字段调整
|
||||
return {
|
||||
value: item.typeId,
|
||||
label: item.typeName
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('获取施工类型下拉失败')
|
||||
this.lineTypeOptions = [] // 失败时设置为空数组
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取施工类型下拉列表失败:', error)
|
||||
this.$message.error('获取施工类型下拉列表失败')
|
||||
this.lineTypeOptions = [] // 异常时设置为空数组
|
||||
}
|
||||
},
|
||||
// 线路类型变化处理
|
||||
async handleLineTypeChange(selectedLineTypes) {
|
||||
// 清空物资类型选择
|
||||
this.queryParams.materialType = null
|
||||
this.materialTypeOptions=[]
|
||||
this.queryParams.typeName=null
|
||||
this.typeNameOptions=[]
|
||||
this.queryParams.typeModelName=null
|
||||
this.typeModelNameOptions=[]
|
||||
|
||||
if (!selectedLineTypes || selectedLineTypes.length === 0) {
|
||||
this.materialTypeOptions = []
|
||||
}
|
||||
|
||||
// 获取物资类型数据
|
||||
await this.getMaterialTypeList(selectedLineTypes)
|
||||
},
|
||||
async getMaterialTypeList(lineTypes) {
|
||||
const params = {
|
||||
constructionType:lineTypes
|
||||
}
|
||||
try {
|
||||
// 调用接口获取物资类型数据
|
||||
const res = await getMaterialTypeList(params)
|
||||
|
||||
if (res.code === 200 && res.data) {
|
||||
// 处理返回的物资类型数据
|
||||
const materialTypes = res.data.map(item => ({
|
||||
value: item.typeId,
|
||||
label: item.typeName
|
||||
}))
|
||||
|
||||
// 更新选项并缓存
|
||||
this.materialTypeOptions = materialTypes
|
||||
} else {
|
||||
this.$message.error('获取物资类型失败')
|
||||
this.materialTypeOptions = []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取物资类型列表失败:', error)
|
||||
this.$message.error('获取物资类型列表失败')
|
||||
this.materialTypeOptions = []
|
||||
}
|
||||
},
|
||||
async handleMaterialTypeChange(e){
|
||||
this.queryParams.typeName=null
|
||||
this.typeNameOptions=[]
|
||||
this.queryParams.typeModelName=null
|
||||
this.typeModelNameOptions=[]
|
||||
getDeviceType({ level: 3, typeId:e }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async handleTypeNameChange(e){
|
||||
this.queryParams.typeModelName=null
|
||||
this.typeModelNameOptions=[]
|
||||
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDeviceType() {
|
||||
getDeviceType({ level: 3 }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
getDeviceType({ level: 4 }).then(response => {
|
||||
let matModelRes = response.data
|
||||
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async getKeeperData() {
|
||||
const itemName = 'ku_guan_role_ids'
|
||||
let roleIdsTemp = []
|
||||
|
|
@ -724,35 +930,35 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
getDeviceType() {
|
||||
getDeviceType({ level: 2, skipPermission: 1 }).then(response => {
|
||||
let matTypeRes = response.data
|
||||
this.materialTypeList = matTypeRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
getDeviceType({ level: 3, skipPermission: 1 }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.materialNameList = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
getDeviceType({ level: 4, skipPermission: 1 }).then(response => {
|
||||
let matModelRes = response.data
|
||||
this.materialModelList = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// getDeviceType() {
|
||||
// getDeviceType({ level: 2, skipPermission: 1 }).then(response => {
|
||||
// let matTypeRes = response.data
|
||||
// this.materialTypeList = matTypeRes.map((item) => {
|
||||
// return {
|
||||
// label: item.typeName,
|
||||
// value: item.typeId
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// getDeviceType({ level: 3, skipPermission: 1 }).then(response => {
|
||||
// let matNameRes = response.data
|
||||
// this.materialNameList = matNameRes.map((item) => {
|
||||
// return {
|
||||
// label: item.typeName,
|
||||
// value: item.typeId
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// getDeviceType({ level: 4, skipPermission: 1 }).then(response => {
|
||||
// let matModelRes = response.data
|
||||
// this.materialModelList = matModelRes.map((item) => {
|
||||
// return {
|
||||
// label: item.typeName,
|
||||
// value: item.typeId
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
|
||||
// change设备类型
|
||||
handleMaModel(e) {
|
||||
|
|
@ -790,7 +996,19 @@ export default {
|
|||
/** 查询岗位列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getListDevice(this.queryParams).then(response => {
|
||||
const params = {
|
||||
isAssets:this.queryParams.isAssets,
|
||||
maStatus:this.queryParams.maStatus,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeNameId: this.queryParams.typeName,
|
||||
typeModelNameId: this.queryParams.typeModelName,
|
||||
constructionTypes:this.queryParams.lineTypes,
|
||||
materialTypeId:this.queryParams.materialType,
|
||||
jiJuTypeStr:this.queryParams.jiJuType,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum
|
||||
}
|
||||
getListDevice(params).then(response => {
|
||||
this.deviceList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
|
|
@ -1185,7 +1403,18 @@ export default {
|
|||
try {
|
||||
let fileName = `设备管理_${formatTime(new Date())}.xLsx`
|
||||
let url = '/material/ma_machine/export'
|
||||
const params = { ...this.queryParams }
|
||||
const params = {
|
||||
isAssets:this.queryParams.isAssets,
|
||||
maStatus:this.queryParams.maStatus,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeNameId: this.queryParams.typeName,
|
||||
typeModelNameId: this.queryParams.typeModelName,
|
||||
constructionTypes:this.queryParams.lineTypes,
|
||||
materialTypeId:this.queryParams.materialType,
|
||||
jiJuTypeStr:this.queryParams.jiJuType,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum
|
||||
}
|
||||
console.log('🚀 ~ 导出 ~ params:', params)
|
||||
this.download(url, params, fileName)
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@
|
|||
:on-error="handleError"
|
||||
:on-remove="handleFileRemove"
|
||||
accept=".docx"
|
||||
:before-upload="beforeUploadDocx"
|
||||
:disabled="isEditMode"
|
||||
style="margin-right: 10px"
|
||||
>
|
||||
|
|
@ -272,50 +273,6 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <el-table-column label="身份证照片" prop="idPhotos" align="center" width="200">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <div class="id-photo-upload">-->
|
||||
<!-- <div class="upload-item">-->
|
||||
<!-- <el-upload-->
|
||||
<!-- :action="uploadUrl"-->
|
||||
<!-- :headers="uploadHeaders"-->
|
||||
<!-- :data="{ type: 1 }"-->
|
||||
<!-- :on-success="(response, file) => handleIdPhotoSuccess(response, file, scope.$index, 'front')"-->
|
||||
<!-- :on-error="handleUploadError"-->
|
||||
<!-- :before-upload="beforeIdPhotoUpload"-->
|
||||
<!-- :show-file-list="false"-->
|
||||
<!-- accept="image/*"-->
|
||||
<!-- >-->
|
||||
<!-- <el-button size="mini" :loading="scope.row.frontUploading">-->
|
||||
<!-- {{ scope.row.frontUploading ? '识别中...' : '头像面' }}-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-upload>-->
|
||||
<!-- <span v-if="scope.row.idFrontPhoto" class="upload-status">✓</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="upload-item">-->
|
||||
<!-- <el-upload-->
|
||||
<!-- :action="uploadUrl"-->
|
||||
<!-- :headers="uploadHeaders"-->
|
||||
<!-- :data="{ type: 2 }"-->
|
||||
<!-- :on-success="(response, file) => handleIdPhotoSuccess(response, file, scope.$index, 'back')"-->
|
||||
<!-- :on-error="handleUploadError"-->
|
||||
<!-- :before-upload="beforeIdPhotoUpload"-->
|
||||
<!-- :show-file-list="false"-->
|
||||
<!-- accept=".doc,.docx"-->
|
||||
<!-- >-->
|
||||
<!-- <el-button size="mini" :loading="scope.row.backUploading">-->
|
||||
<!-- {{ scope.row.backUploading ? '识别中...' : '国徽面' }}-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-upload>-->
|
||||
<!-- <span v-if="scope.row.idBackPhoto" class="upload-status">✓</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="danger" @click="removeReceiver(scope.$index)">删除</el-button>
|
||||
|
|
@ -327,8 +284,6 @@
|
|||
<el-button type="primary" @click="addReceiver">新增领料人</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
|
||||
<!-- 批量授权时才显示的已选申请单 -->
|
||||
<el-form-item v-if="isBatchMode" label="已选申请单:">
|
||||
|
|
@ -772,6 +727,26 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
beforeUploadDocx(file) {
|
||||
const isDocx = file.name.toLowerCase().endsWith('.docx')
|
||||
const isWordMime =
|
||||
file.type ===
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||
|
||||
if (!isDocx || !isWordMime) {
|
||||
this.$message.error('只能上传.docx格式的文件!')
|
||||
return false // 阻止上传
|
||||
}
|
||||
|
||||
// 限制大小,例如 10MB
|
||||
const isLt10M = file.size / 1024 / 1024 < 10
|
||||
if (!isLt10M) {
|
||||
this.$message.error('文件大小不能超过 10MB!')
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
},
|
||||
// 判断节点是否可选择(只有第三级或没有层级的数据可选择)
|
||||
isSelectableNode(node) {
|
||||
// 第三级数据:level为"3"
|
||||
|
|
@ -1445,37 +1420,6 @@ export default {
|
|||
} finally {
|
||||
}
|
||||
},
|
||||
// 上传并解析成功
|
||||
// handleParseSuccess(response, file, fileList) {
|
||||
// // 兼容你的 AjaxResult 结构:{ code:200, data: [...] }
|
||||
// const list = (response && response.code === 200) ? response.data : (Array.isArray(response) ? response : null);
|
||||
//
|
||||
// if (!list || list.length === 0) {
|
||||
// this.$message.warning('未识别到委托人信息,请手动填写');
|
||||
// // 设置 fileList 显示上传的文件名
|
||||
// this.fileList = [{ name: file.name, url: '' }];
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// // 直接把识别到的结果赋值给 materialReceivers(并保证字段名一致)
|
||||
// this.materialReceivers = list.map(item => ({
|
||||
// name: item.name || '',
|
||||
// idNumber: item.idNumber || '',
|
||||
// phone: item.phone || '',
|
||||
// idFrontPhoto: item.frontUrl || item.idFrontPhoto || item.fronturl || null,
|
||||
// idBackPhoto: item.backUrl || item.idBackPhoto || item.backurl || null,
|
||||
// frontUploading: false,
|
||||
// backUploading: false
|
||||
// }));
|
||||
//
|
||||
// // 同步到 authForm
|
||||
// this.authForm.materialReceivers = [...this.materialReceivers];
|
||||
//
|
||||
// // 更新 fileList 显示
|
||||
// this.fileList = [{ name: file.name, url: '' }];
|
||||
//
|
||||
// this.$message.success(`识别成功,共提取 ${this.materialReceivers.length} 个委托人`);
|
||||
// },
|
||||
handleParseSuccess(response, file, fileList) {
|
||||
// 后端返回结构:{ code:200, data: { receivers: [...], filePath: "xxx" } }
|
||||
const data = (response && response.code === 200) ? response.data : null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,288 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item prop="time">
|
||||
<el-date-picker
|
||||
v-model="queryParams.time"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 240px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
maxlength="50"
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="unitId">
|
||||
<treeselect
|
||||
v-model="queryParams.unitId"
|
||||
:options="unitList" :normalizer="normalizer"
|
||||
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
placeholder="请选择退料单位" @select="unitChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="proId">
|
||||
<treeselect
|
||||
v-model="queryParams.proId"
|
||||
:options="proList" :normalizer="normalizer"
|
||||
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
placeholder="请选择退料工程" @select="proChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择物资名称"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleTypeNameChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeModelId">
|
||||
<el-select
|
||||
v-model="queryParams.typeModelId"
|
||||
placeholder="请选择规格型号"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeModelNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table border :data="tableList" v-loading="loading" ref="multipleTable" row-key="qrId">
|
||||
<el-table-column label="序号" align="center" type="index" width="70">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" show-overflow-tooltip/>
|
||||
<el-table-column label="机具规格" align="center" prop="typeModelName" show-overflow-tooltip/>
|
||||
<el-table-column label="退料单号" align="center" prop="code" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="退料数量" align="center" prop="backNum" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="退料人" align="center" prop="backPerson" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="退料日期" align="center" prop="createTime" width="160" show-overflow-tooltip/>
|
||||
<el-table-column label="退料单位" align="center" prop="unitName" show-overflow-tooltip/>
|
||||
<el-table-column label="退料工程" align="center" prop="proName" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
<pagination :total="total"
|
||||
v-show="total > 0"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {getBackQueryList, getProjectList, getUnitList} from "@/api/back";
|
||||
import {getDeviceType} from "@/api/ma/device";
|
||||
|
||||
export default {
|
||||
name: 'Code',
|
||||
dicts: ['qr_box_type'],
|
||||
components: {Treeselect},
|
||||
data() {
|
||||
return {
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
total: 0, // 总条数
|
||||
loading: false, // 遮罩层
|
||||
showSearch: true, // 显示搜索条件
|
||||
tableList: [], // 列表数据源
|
||||
queryTime: [], // 日期数据源
|
||||
selectList: [], // 列表选中数据
|
||||
// 列表查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
bindStatus: '',
|
||||
endTime: '',
|
||||
keyWord: '',
|
||||
startTime: '',
|
||||
typeId:undefined,
|
||||
typeModelId: undefined
|
||||
},
|
||||
unitList: [],
|
||||
proList: [],
|
||||
typeNameOptions:[],
|
||||
typeModelNameOptions:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
this.getDeviceType()
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
unitChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetProData()
|
||||
},500)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
}
|
||||
const res = await getProjectList(params)
|
||||
this.proList = res.data;
|
||||
this.queryParams.proId=null
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
// projectId: this.queryParams.proId /* */,
|
||||
}
|
||||
const res = await getUnitList(params)
|
||||
this.unitList = res.data
|
||||
},
|
||||
proChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetUnitData()
|
||||
},500)
|
||||
},
|
||||
async handleTypeNameChange(e){
|
||||
this.queryParams.typeModelName=null
|
||||
this.typeModelNameOptions=[]
|
||||
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDeviceType() {
|
||||
getDeviceType({ level: 3 }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
getDeviceType({ level: 4 }).then(response => {
|
||||
let matModelRes = response.data
|
||||
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
||||
this.queryParams.startTime = this.queryParams.time[0]
|
||||
this.queryParams.endTime = this.queryParams.time[1]
|
||||
}else{
|
||||
this.queryParams.startTime=undefined
|
||||
this.queryParams.endTime=undefined
|
||||
}
|
||||
const res = await getBackQueryList(this.queryParams)
|
||||
this.tableList = res.data.rows
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
},
|
||||
// 搜索按钮
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置按钮
|
||||
resetQuery() {
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.queryTime = []
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.pageNum = 1
|
||||
this.queryParams.endTime = ''
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.startTime = ''
|
||||
this.getList()
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.uploadImg {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.boxCode {
|
||||
margin-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 33px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,271 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item prop="time">
|
||||
<el-date-picker
|
||||
v-model="queryParams.time"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 240px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
maxlength="50"
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择物资名称"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleTypeNameChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeModelId">
|
||||
<el-select
|
||||
v-model="queryParams.typeModelId"
|
||||
placeholder="请选择规格型号"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeModelNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table border :data="tableList" v-loading="loading" ref="multipleTable" row-key="qrId">
|
||||
<el-table-column label="序号" align="center" type="index" width="70">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核提交时间" align="center" prop="createTime" show-overflow-tooltip/>
|
||||
<el-table-column label="维修单号" align="center" prop="repairCode" show-overflow-tooltip/>
|
||||
<el-table-column label="机具名称" align="center" prop="type" show-overflow-tooltip/>
|
||||
<el-table-column label="规格型号" align="center" prop="typeName" show-overflow-tooltip/>
|
||||
<el-table-column label="退料数量" align="center" prop="repairNum" show-overflow-tooltip/>
|
||||
<el-table-column label="合格数量" align="center" prop="repairedNum" show-overflow-tooltip/>
|
||||
<el-table-column label="报废数量" align="center" prop="scrapNum" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
<pagination :total="total"
|
||||
v-show="total > 0"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {getBackQueryList, getProjectList, getUnitList} from "@/api/back";
|
||||
import {getDeviceType} from "@/api/ma/device";
|
||||
import {getRepairAuditQueryList, getRepairQueryList} from "@/api/repair/repair";
|
||||
import dict from "@/utils/dict";
|
||||
|
||||
export default {
|
||||
name: 'Code',
|
||||
dicts: ['qr_box_type'],
|
||||
components: {Treeselect},
|
||||
data() {
|
||||
return {
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
total: 0, // 总条数
|
||||
loading: false, // 遮罩层
|
||||
showSearch: true, // 显示搜索条件
|
||||
tableList: [], // 列表数据源
|
||||
queryTime: [], // 日期数据源
|
||||
selectList: [], // 列表选中数据
|
||||
// 列表查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
bindStatus: '',
|
||||
endTime: '',
|
||||
keyWord: '',
|
||||
startTime: '',
|
||||
typeId:undefined,
|
||||
typeModelId: undefined
|
||||
},
|
||||
unitList: [],
|
||||
proList: [],
|
||||
typeNameOptions:[],
|
||||
typeModelNameOptions:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
this.getDeviceType()
|
||||
},
|
||||
methods: {
|
||||
dict,
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
unitChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetProData()
|
||||
},500)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
}
|
||||
const res = await getProjectList(params)
|
||||
this.proList = res.data;
|
||||
this.queryParams.proId=null
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
// projectId: this.queryParams.proId /* */,
|
||||
}
|
||||
const res = await getUnitList(params)
|
||||
this.unitList = res.data
|
||||
},
|
||||
proChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetUnitData()
|
||||
},500)
|
||||
},
|
||||
async handleTypeNameChange(e){
|
||||
this.queryParams.typeModelName=null
|
||||
this.typeModelNameOptions=[]
|
||||
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDeviceType() {
|
||||
getDeviceType({ level: 3 }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
getDeviceType({ level: 4 }).then(response => {
|
||||
let matModelRes = response.data
|
||||
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
||||
this.queryParams.startTime = this.queryParams.time[0]
|
||||
this.queryParams.endTime = this.queryParams.time[1]
|
||||
}else{
|
||||
this.queryParams.startTime=undefined
|
||||
this.queryParams.endTime=undefined
|
||||
}
|
||||
const res = await getRepairAuditQueryList(this.queryParams)
|
||||
this.tableList = res.data.rows
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
},
|
||||
// 搜索按钮
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置按钮
|
||||
resetQuery() {
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.queryTime = []
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.pageNum = 1
|
||||
this.queryParams.endTime = ''
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.startTime = ''
|
||||
this.getList()
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.uploadImg {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.boxCode {
|
||||
margin-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 33px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,306 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item prop="time">
|
||||
<el-date-picker
|
||||
v-model="queryParams.time"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 240px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
maxlength="50"
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="unitId">
|
||||
<treeselect
|
||||
v-model="queryParams.unitId"
|
||||
:options="unitList" :normalizer="normalizer"
|
||||
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
placeholder="请选择退料单位" @select="unitChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="proId">
|
||||
<treeselect
|
||||
v-model="queryParams.proId"
|
||||
:options="proList" :normalizer="normalizer"
|
||||
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
placeholder="请选择退料工程" @select="proChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择物资名称"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleTypeNameChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeModelId">
|
||||
<el-select
|
||||
v-model="queryParams.typeModelId"
|
||||
placeholder="请选择规格型号"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeModelNameOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table border :data="tableList" v-loading="loading" ref="multipleTable" row-key="qrId">
|
||||
<el-table-column label="序号" align="center" type="index" width="70">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="维修时间" align="center" prop="repairTime" show-overflow-tooltip/>
|
||||
<el-table-column label="维修单号" align="center" prop="repairCode" show-overflow-tooltip/>
|
||||
<el-table-column label="退料单号" align="center" prop="backCode" show-overflow-tooltip/>
|
||||
<el-table-column label="退料单位" align="center" prop="backUnit" show-overflow-tooltip/>
|
||||
<el-table-column label="退料工程" align="center" prop="backPro" show-overflow-tooltip/>
|
||||
<el-table-column label="机具名称" align="center" prop="type" show-overflow-tooltip/>
|
||||
<el-table-column label="规格型号" align="center" prop="typeName" show-overflow-tooltip/>
|
||||
<el-table-column label="单位" align="center" prop="unit" width="80" show-overflow-tooltip/>
|
||||
<el-table-column
|
||||
label="任务状态"
|
||||
align="center"
|
||||
prop="repairStatus"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<span :style="{ color: scope.row.repairStatus === '维修完成' ? 'green' : 'orange' }">
|
||||
{{ scope.row.repairStatus }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报修数量" align="center" prop="repairNum" width="80" show-overflow-tooltip/>
|
||||
<el-table-column label="已修数量" align="center" prop="repairedNum" width="80" show-overflow-tooltip/>
|
||||
<el-table-column label="报废数量" align="center" prop="scrapNum" width="80" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
<pagination :total="total"
|
||||
v-show="total > 0"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {getBackQueryList, getProjectList, getUnitList} from "@/api/back";
|
||||
import {getDeviceType} from "@/api/ma/device";
|
||||
import {getRepairQueryList} from "@/api/repair/repair";
|
||||
import dict from "@/utils/dict";
|
||||
|
||||
export default {
|
||||
name: 'Code',
|
||||
dicts: ['qr_box_type'],
|
||||
components: {Treeselect},
|
||||
data() {
|
||||
return {
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
total: 0, // 总条数
|
||||
loading: false, // 遮罩层
|
||||
showSearch: true, // 显示搜索条件
|
||||
tableList: [], // 列表数据源
|
||||
queryTime: [], // 日期数据源
|
||||
selectList: [], // 列表选中数据
|
||||
// 列表查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
bindStatus: '',
|
||||
endTime: '',
|
||||
keyWord: '',
|
||||
startTime: '',
|
||||
typeId:undefined,
|
||||
typeModelId: undefined
|
||||
},
|
||||
unitList: [],
|
||||
proList: [],
|
||||
typeNameOptions:[],
|
||||
typeModelNameOptions:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
this.getDeviceType()
|
||||
},
|
||||
methods: {
|
||||
dict,
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
unitChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetProData()
|
||||
},500)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
}
|
||||
const res = await getProjectList(params)
|
||||
this.proList = res.data;
|
||||
this.queryParams.proId=null
|
||||
},
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
// projectId: this.queryParams.proId /* */,
|
||||
}
|
||||
const res = await getUnitList(params)
|
||||
this.unitList = res.data
|
||||
},
|
||||
proChange(val){
|
||||
setTimeout(()=>{
|
||||
this.GetUnitData()
|
||||
},500)
|
||||
},
|
||||
async handleTypeNameChange(e){
|
||||
this.queryParams.typeModelName=null
|
||||
this.typeModelNameOptions=[]
|
||||
getDeviceType({ level: 4, typeId:e }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeModelNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDeviceType() {
|
||||
getDeviceType({ level: 3 }).then(response => {
|
||||
let matNameRes = response.data
|
||||
this.typeNameOptions = matNameRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
getDeviceType({ level: 4 }).then(response => {
|
||||
let matModelRes = response.data
|
||||
this.typeModelNameOptions = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
if (this.queryParams.time && this.queryParams.time.length > 0) {
|
||||
this.queryParams.startTime = this.queryParams.time[0]
|
||||
this.queryParams.endTime = this.queryParams.time[1]
|
||||
}else{
|
||||
this.queryParams.startTime=undefined
|
||||
this.queryParams.endTime=undefined
|
||||
}
|
||||
const res = await getRepairQueryList(this.queryParams)
|
||||
this.tableList = res.data.rows
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
},
|
||||
// 搜索按钮
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置按钮
|
||||
resetQuery() {
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.queryTime = []
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.pageNum = 1
|
||||
this.queryParams.endTime = ''
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.startTime = ''
|
||||
this.getList()
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.uploadImg {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.boxCode {
|
||||
margin-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 33px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="id" @selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column type="selection" width="45"></el-table-column>
|
||||
<el-table-column label="序号" align="center" width="70" type="index">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
|
|
@ -197,7 +197,7 @@
|
|||
>查看</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="handleDownload(scope.row)">下载</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
placeholder="请选择物资类型"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleMaterialTypeChange"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -57,6 +58,7 @@
|
|||
placeholder="请选择物资名称"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleTypeNameChange"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -81,6 +83,7 @@
|
|||
placeholder="请选择规格型号"
|
||||
style="width: 240px"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeModelNameOptions"
|
||||
|
|
@ -1001,11 +1004,17 @@ export default {
|
|||
};
|
||||
|
||||
const currentTime = formatTime(new Date());
|
||||
let param = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeNameId: this.queryParams.typeName,
|
||||
typeModelNameId: this.queryParams.typeModelName,
|
||||
constructionTypes:this.queryParams.lineTypes,
|
||||
materialTypeId:this.queryParams.materialType,
|
||||
jiJuType:this.queryParams.jiJuType
|
||||
}
|
||||
this.download(
|
||||
'material/complex_query/exportRetainedEquipmentList',
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
param,
|
||||
`综合查询_保有设备总量_${currentTime}.xlsx`,
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue