This commit is contained in:
parent
8bbec10d17
commit
e7546bbf39
|
|
@ -9,21 +9,24 @@
|
|||
>
|
||||
<!-- 表单搜索 -->
|
||||
<el-row>
|
||||
<el-form-item prop="createUser" label="申请人:">
|
||||
<el-form-item prop="orderCreateUser" label="申请人:">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入内容"
|
||||
v-model.trim="queryParams.createUser"
|
||||
v-model.trim="queryParams.orderCreateUser"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间:" prop="createTime">
|
||||
<el-form-item label="申请时间:" prop="orderCreateTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 200px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
v-model="queryParams.createTime"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.orderCreateTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -67,21 +70,31 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="manufacturer" label="生产厂家:">
|
||||
<el-input
|
||||
<el-form-item prop="manufacturerId" label="生产厂家:">
|
||||
<el-select
|
||||
v-model="queryParams.manufacturerId"
|
||||
placeholder="请选择生产厂家"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入内容"
|
||||
v-model.trim="queryParams.manufacturer"
|
||||
/>
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in manufacturerList"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="productionDate" label="出厂日期:">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 200px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择出厂日期"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.productionDate"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -281,6 +294,7 @@
|
|||
|
||||
<script>
|
||||
import { getDeviceListApi, equipmentDelApiNew } from '@/api/EquipmentEntryApply/index'
|
||||
import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js'
|
||||
|
||||
export default {
|
||||
name: 'EquipmentDetailList',
|
||||
|
|
@ -291,13 +305,13 @@ export default {
|
|||
isVisible: false,
|
||||
isAddVisible: false,
|
||||
queryParams: {
|
||||
createUser: '',
|
||||
createTime: '',
|
||||
orderCreateUser: '',
|
||||
orderCreateTime: '',
|
||||
entryStatus: '',
|
||||
name: '',
|
||||
specificationModel: '',
|
||||
originalCode: '',
|
||||
manufacturer: '',
|
||||
manufacturerId: '',
|
||||
productionDate: '',
|
||||
minOriginalValue: '',
|
||||
maxOriginalValue: '',
|
||||
|
|
@ -305,6 +319,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
manufacturerList: [],
|
||||
columns: [
|
||||
{ key: 26, label: `特征项1`, prop: 'featureItem1', visible: true },
|
||||
{ key: 27, label: `特征值1`, prop: 'featureValue1', visible: true },
|
||||
|
|
@ -333,13 +348,30 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.getEquipmentApplyList()
|
||||
this.getManufacturerSelectList()
|
||||
},
|
||||
methods: {
|
||||
// 获取厂家
|
||||
getManufacturerSelectList() {
|
||||
getManufacturerSelectApi().then((res) => {
|
||||
console.log('🚀 ~ getManufacturerSelectList ~ res:', res)
|
||||
if (res.code === 200) {
|
||||
this.manufacturerList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取装备申请列表
|
||||
*/
|
||||
getEquipmentApplyList() {
|
||||
getDeviceListApi(this.queryParams)
|
||||
this.queryParams.startOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[0] : ''
|
||||
this.queryParams.endOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[1] : ''
|
||||
this.queryParams.startProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[0] : ''
|
||||
this.queryParams.endProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[1] : ''
|
||||
const params = { ...this.queryParams }
|
||||
delete params.orderCreateTime
|
||||
delete params.productionDate
|
||||
getDeviceListApi(params)
|
||||
.then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
|
|
@ -372,7 +404,7 @@ export default {
|
|||
showEquipmentInput(orderId, isAddVisible) {
|
||||
this.$router.push({
|
||||
name: 'equipmentInput', // 完整路径
|
||||
params: { // 因为使用path,所以用query传递参数
|
||||
query: { // 因为使用path,所以用query传递参数
|
||||
orderId: orderId,
|
||||
isAddVisible: isAddVisible,
|
||||
isApprovalVisible: false
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
>
|
||||
<!-- 表单搜索 -->
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="createUser" label="申请人:">
|
||||
<el-input
|
||||
clearable
|
||||
|
|
@ -18,21 +17,20 @@
|
|||
v-model.trim="queryParams.createUser"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="5">
|
||||
<el-form-item label="申请时间" prop="createTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.createTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="5">
|
||||
<el-form-item label="审批状态" prop="status">
|
||||
<el-select
|
||||
clearable
|
||||
|
|
@ -44,9 +42,7 @@
|
|||
<el-option label="已审批" value="1"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="5" >
|
||||
<el-form-item>
|
||||
<el-button class="primary-lease" type="primary" @click="getEquipmentApplyList">
|
||||
查询
|
||||
|
|
@ -55,9 +51,8 @@
|
|||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col style="float:right;width: 13%;">
|
||||
<el-col style="float:right;width: 16%;">
|
||||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
|
|
@ -174,7 +169,11 @@ export default {
|
|||
* 获取装备申请列表
|
||||
*/
|
||||
getEquipmentApplyList() {
|
||||
getEquipmentApplyListApi(this.queryParams)
|
||||
this.queryParams.startCreateTime = this.queryParams.createTime ? this.queryParams.createTime[0] : ''
|
||||
this.queryParams.endCreateTime = this.queryParams.createTime ? this.queryParams.createTime[1] : ''
|
||||
const params = { ...this.queryParams }
|
||||
delete params.createTime
|
||||
getEquipmentApplyListApi(params)
|
||||
.then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
|
|
@ -235,7 +234,7 @@ export default {
|
|||
viewEquipment(orderId) {
|
||||
this.$router.push({
|
||||
name: 'equipmentInput',
|
||||
params: {
|
||||
query: {
|
||||
orderId: orderId,
|
||||
isAddVisible: true,
|
||||
isApprovalVisible: false
|
||||
|
|
@ -247,7 +246,7 @@ export default {
|
|||
editEquipment(orderId) {
|
||||
this.$router.push({
|
||||
name: 'equipmentInput',
|
||||
params: {
|
||||
query: {
|
||||
orderId: orderId,
|
||||
isAddVisible: false,
|
||||
isApprovalVisible: false
|
||||
|
|
@ -259,7 +258,7 @@ export default {
|
|||
addEquipment() {
|
||||
this.$router.push({
|
||||
name: 'equipmentInput',
|
||||
params: {
|
||||
query: {
|
||||
orderId: '',
|
||||
isAddVisible: false,
|
||||
isApprovalVisible: false
|
||||
|
|
|
|||
|
|
@ -99,9 +99,9 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产厂家" prop="manufacturer">
|
||||
<el-form-item label="生产厂家" prop="manufacturerId">
|
||||
<el-select
|
||||
v-model="form.manufacturer"
|
||||
v-model="form.manufacturerId"
|
||||
placeholder="请选择生产厂家"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
|
|
@ -197,6 +197,18 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="下次维保日期" prop="purchaseDate">
|
||||
<el-date-picker
|
||||
v-model="form.purchaseDate"
|
||||
placeholder="请选择下次维保日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="display:flex;padding-bottom: 10px">
|
||||
|
|
@ -328,13 +340,14 @@ export default {
|
|||
specificationModel: '', // 规格型号
|
||||
originalValue: '', // 资产原值
|
||||
productionDate: '', // 出厂日期
|
||||
manufacturer: '', // 生产厂家
|
||||
manufacturerId: '', // 生产厂家
|
||||
originalCode: '', // 装备原始编码
|
||||
nextMaintenanceDate: '', // 下次维保日期
|
||||
maxServiceLifeYears: '', // 装备寿命
|
||||
manageType: '', // 管理模式
|
||||
count: 1, // 装备数量
|
||||
unit: '', // 计数单位
|
||||
purchaseDate: '',
|
||||
specialtyFeature: '', // 专业特征
|
||||
processFeature: '', // 工序特征
|
||||
categoryFeature: '', // 类目特征
|
||||
|
|
@ -366,7 +379,7 @@ export default {
|
|||
productionDate: [
|
||||
{ required: true, message: '请选择出厂日期', trigger: 'change' }
|
||||
],
|
||||
manufacturer: [
|
||||
manufacturerId: [
|
||||
{ required: true, message: '请输入生产厂家', trigger: 'blur' }
|
||||
],
|
||||
originalCode: [
|
||||
|
|
@ -453,7 +466,8 @@ export default {
|
|||
},
|
||||
// 返回上一页
|
||||
goBack() {
|
||||
this.$router.go(-1)
|
||||
// this.$router.go(-1)
|
||||
this.$router.push({ path: '/equipment/equipment-input/index' })
|
||||
},
|
||||
deviceTypeChange(val) {
|
||||
if (val === 0) {
|
||||
|
|
@ -498,58 +512,62 @@ export default {
|
|||
// this.form.typeId = this.form.deviceTypeList[this.form.deviceTypeList.length - 1]
|
||||
// 获取类目的最后一个值
|
||||
this.form.typeId = this.form.category[this.form.category.length - 1]
|
||||
let appearanceImages = [] // 装备图片
|
||||
let certificates = [] // 合格证
|
||||
let inspectionReports = [] // 验收报告
|
||||
let purchaseInvoices = [] // 采购发票
|
||||
if (this.form.mainFileList) {
|
||||
const arr = this.form.mainFileList.split(',')
|
||||
console.log('🚀 ~ 提交 ~ arr:', arr)
|
||||
this.form.mainFileList = arr.map(item => {
|
||||
appearanceImages = arr.map(item => {
|
||||
const parts = item.split('/')
|
||||
return {
|
||||
fileName: parts[parts.length - 1],
|
||||
fileUrl: item
|
||||
}
|
||||
})
|
||||
console.log('🚀 ~ handleSubmit ~ this.form.mainFileList:', this.form.mainFileList)
|
||||
console.log('🚀 ~ handleSubmit ~ appearanceImages:', appearanceImages)
|
||||
}
|
||||
if (this.form.certificateList) {
|
||||
const arr = this.form.certificateList.split(',')
|
||||
this.form.certificateList = arr.map(item => {
|
||||
certificates = arr.map(item => {
|
||||
const parts = item.split('/')
|
||||
return {
|
||||
fileName: parts[parts.length - 1],
|
||||
fileUrl: item
|
||||
}
|
||||
})
|
||||
console.log('🚀 ~ handleSubmit ~ this.form.certificateList:', this.form.certificateList)
|
||||
console.log('🚀 ~ handleSubmit ~ certificates:', certificates)
|
||||
}
|
||||
if (this.form.inspectionList) {
|
||||
const arr = this.form.inspectionList.split(',')
|
||||
this.form.inspectionList = arr.map(item => {
|
||||
inspectionReports = arr.map(item => {
|
||||
const parts = item.split('/')
|
||||
return {
|
||||
fileName: parts[parts.length - 1],
|
||||
fileUrl: item
|
||||
}
|
||||
})
|
||||
console.log('🚀 ~ handleSubmit ~ this.form.inspectionList:', this.form.inspectionList)
|
||||
console.log('🚀 ~ handleSubmit ~ inspectionReports:', inspectionReports)
|
||||
}
|
||||
if (this.form.purchaseInvoices) {
|
||||
const arr = this.form.purchaseInvoices.split(',')
|
||||
this.form.purchaseInvoices = arr.map(item => {
|
||||
purchaseInvoices = arr.map(item => {
|
||||
const parts = item.split('/')
|
||||
return {
|
||||
fileName: parts[parts.length - 1],
|
||||
fileUrl: item
|
||||
}
|
||||
})
|
||||
console.log('🚀 ~ handleSubmit ~ this.form.purchaseInvoices:', this.form.purchaseInvoices)
|
||||
console.log('🚀 ~ handleSubmit ~ purchaseInvoices:', purchaseInvoices)
|
||||
}
|
||||
|
||||
const res = await addInterDevice(this.form)
|
||||
const res = await addInterDevice({ ...this.form, appearanceImages, certificates, inspectionReports, purchaseInvoices })
|
||||
if (res.code === 200) {
|
||||
// this.goBack()
|
||||
this.$router.push({
|
||||
name: 'equipmentInput',
|
||||
params: {
|
||||
query: {
|
||||
orderId: this.orderId,
|
||||
isAddVisible: false,
|
||||
isApprovalVisible: false
|
||||
|
|
|
|||
|
|
@ -25,21 +25,24 @@
|
|||
label-width="auto"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item prop="createUser" label="申请人:">
|
||||
<el-form-item prop="orderCreateUser" label="申请人:">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入内容"
|
||||
v-model.trim="queryParams.createUser"
|
||||
v-model.trim="queryParams.orderCreateUser"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间:" prop="createTime">
|
||||
<el-form-item label="申请时间:" prop="orderCreateTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 200px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
v-model="queryParams.createTime"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.orderCreateTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -83,21 +86,31 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="manufacturer" label="生产厂家:">
|
||||
<el-input
|
||||
<el-form-item prop="manufacturerId" label="生产厂家:">
|
||||
<el-select
|
||||
v-model="queryParams.manufacturerId"
|
||||
placeholder="请选择生产厂家"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
placeholder="请输入内容"
|
||||
v-model.trim="queryParams.manufacturer"
|
||||
/>
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in manufacturerList"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="productionDate" label="出厂日期:">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 200px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择出厂日期"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.productionDate"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -302,16 +315,17 @@ import {
|
|||
equipmentSubmitApiNew,
|
||||
removeDeviceApi
|
||||
} from '@/api/EquipmentEntryApply'
|
||||
import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js'
|
||||
|
||||
export default {
|
||||
name: 'EquipmentEntryDialog',
|
||||
name: 'EquipmentInput',
|
||||
components: { EquipmentEntryEditDialog },
|
||||
emits: ['update:isVisible', 'submit'], // 声明事件
|
||||
created() {
|
||||
console.log(this.$route)
|
||||
this.orderId = this.$route.params && this.$route.params.orderId
|
||||
this.isAddVisible = this.$route.params && this.$route.params.isAddVisible
|
||||
this.isApprovalVisible = this.$route.params && this.$route.params.isApprovalVisible
|
||||
this.orderId = this.$route.query && this.$route.query.orderId
|
||||
this.isAddVisible = this.$route.query && this.$route.query.isAddVisible
|
||||
this.isApprovalVisible = this.$route.query && this.$route.query.isApprovalVisible
|
||||
if (!this.orderId) {
|
||||
this.pageTitle = '新增设备录入'
|
||||
this.submitButtonText = '提交申请'
|
||||
|
|
@ -335,13 +349,13 @@ export default {
|
|||
tableData: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
createUser: '',
|
||||
createTime: '',
|
||||
orderCreateUser: '',
|
||||
orderCreateTime: '',
|
||||
status: '',
|
||||
name: '',
|
||||
specificationModel: '',
|
||||
originalCode: '',
|
||||
manufacturer: '',
|
||||
manufacturerId: '',
|
||||
productionDate: '',
|
||||
minBuyPrice: '',
|
||||
maxBuyPrice: '',
|
||||
|
|
@ -349,6 +363,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
manufacturerList: [],
|
||||
// 可添加表单数据
|
||||
formData: {
|
||||
// 示例字段,可根据实际需求修改
|
||||
|
|
@ -391,10 +406,23 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getManufacturerSelectList()
|
||||
},
|
||||
methods: {
|
||||
// 获取厂家
|
||||
getManufacturerSelectList() {
|
||||
getManufacturerSelectApi().then((res) => {
|
||||
console.log('🚀 ~ getManufacturerSelectList ~ res:', res)
|
||||
if (res.code === 200) {
|
||||
this.manufacturerList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 返回上一页
|
||||
goBack() {
|
||||
this.$router.go(-1)
|
||||
// this.$router.go(-1)
|
||||
this.$router.push({ path: '/equipment/equipmentEntry/equipment-entry-apply' })
|
||||
},
|
||||
async approval(row, status) {
|
||||
equipmentPassAndRejectApiNew({ devIds: row.maId, status: status, id: this.orderId }).then(res => {
|
||||
|
|
@ -410,8 +438,15 @@ export default {
|
|||
// 获取列表数据
|
||||
async getList() {
|
||||
try {
|
||||
this.queryParams.startOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[0] : ''
|
||||
this.queryParams.endOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[1] : ''
|
||||
this.queryParams.startProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[0] : ''
|
||||
this.queryParams.endProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[1] : ''
|
||||
this.queryParams.orderId = this.orderId
|
||||
const res = await getDeviceByOrderIdApi(this.queryParams)
|
||||
const params = { ...this.queryParams }
|
||||
delete params.orderCreateTime
|
||||
delete params.productionDate
|
||||
const res = await getDeviceByOrderIdApi(params)
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
} catch (error) {
|
||||
|
|
@ -477,7 +512,8 @@ export default {
|
|||
type: 'success',
|
||||
message: '提交成功'
|
||||
})
|
||||
this.goBack()
|
||||
// this.goBack()
|
||||
this.$router.push({ path: '/equipment/equipmentEntry/equipment-entry-apply' })
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -9,21 +9,24 @@
|
|||
>
|
||||
<!-- 表单搜索 -->
|
||||
<el-row>
|
||||
<el-form-item prop="createUser" label="申请人:">
|
||||
<el-form-item prop="orderCreateUser" label="申请人:">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="请输入内容"
|
||||
v-model.trim="queryParams.createUser"
|
||||
v-model.trim="queryParams.orderCreateUser"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间:" prop="createTime">
|
||||
<el-form-item label="申请时间:" prop="orderCreateTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 240px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
v-model="queryParams.createTime"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.orderCreateTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -68,21 +71,31 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="manufacturer" label="生产厂家:">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="请输入内容"
|
||||
v-model.trim="queryParams.manufacturer"
|
||||
<el-form-item prop="manufacturerId" label="生产厂家:">
|
||||
<el-select
|
||||
v-model="queryParams.manufacturerId"
|
||||
placeholder="请选择生产厂家"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in manufacturerList"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="productionDate" label="出厂日期:">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 240px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择出厂日期"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.productionDate"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -278,6 +291,7 @@ import {
|
|||
equipmentDelApiNew,
|
||||
equipmentPassAndRejectApiNew
|
||||
} from '@/api/EquipmentEntryApply/index'
|
||||
import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js'
|
||||
|
||||
export default {
|
||||
name: 'EquipmentDetailList',
|
||||
|
|
@ -288,13 +302,13 @@ export default {
|
|||
isVisible: false,
|
||||
isAddVisible: false,
|
||||
queryParams: {
|
||||
createUser: '',
|
||||
createTime: '',
|
||||
orderCreateUser: '',
|
||||
orderCreateTime: '',
|
||||
entryStatus: '',
|
||||
name: '',
|
||||
specificationModel: '',
|
||||
originalCode: '',
|
||||
manufacturer: '',
|
||||
manufacturerId: '',
|
||||
productionDate: '',
|
||||
originalValue: '',
|
||||
maxBuyPrice: '',
|
||||
|
|
@ -302,6 +316,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
manufacturerList: [],
|
||||
tableData: [],
|
||||
columns: [
|
||||
{ key: 26, label: `特征项1`, prop: 'featureItem1', visible: true },
|
||||
|
|
@ -330,13 +345,30 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.getEquipmentApplyList()
|
||||
this.getManufacturerSelectList()
|
||||
},
|
||||
methods: {
|
||||
// 获取厂家
|
||||
getManufacturerSelectList() {
|
||||
getManufacturerSelectApi().then((res) => {
|
||||
console.log('🚀 ~ getManufacturerSelectList ~ res:', res)
|
||||
if (res.code === 200) {
|
||||
this.manufacturerList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取装备申请列表
|
||||
*/
|
||||
getEquipmentApplyList() {
|
||||
getDeviceListApi(this.queryParams)
|
||||
this.queryParams.startOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[0] : ''
|
||||
this.queryParams.endOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[1] : ''
|
||||
this.queryParams.startProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[0] : ''
|
||||
this.queryParams.endProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[1] : ''
|
||||
const params = { ...this.queryParams }
|
||||
delete params.orderCreateTime
|
||||
delete params.productionDate
|
||||
getDeviceListApi(params)
|
||||
.then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
|
|
@ -369,7 +401,7 @@ export default {
|
|||
showEquipmentInput(orderId, isAddVisible) {
|
||||
this.$router.push({
|
||||
name: 'equipmentInput', // 完整路径
|
||||
params: { // 因为使用path,所以用query传递参数
|
||||
query: { // 因为使用path,所以用query传递参数
|
||||
orderId: orderId,
|
||||
isAddVisible: isAddVisible,
|
||||
isApprovalVisible: false
|
||||
|
|
|
|||
|
|
@ -22,13 +22,16 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="申请时间" prop="applyTime">
|
||||
<el-form-item label="申请时间" prop="createTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
v-model="queryParams.applyTime"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.createTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -112,7 +115,7 @@ export default {
|
|||
isAddVisible: false,
|
||||
queryParams: {
|
||||
status: '0',
|
||||
applyTime: '',
|
||||
createTime: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
|
|
@ -127,7 +130,11 @@ export default {
|
|||
* 获取装备申请列表
|
||||
*/
|
||||
getEquipmentApplyList() {
|
||||
getEquipmentApplyListApi(this.queryParams)
|
||||
this.queryParams.startCreateTime = this.queryParams.createTime ? this.queryParams.createTime[0] : ''
|
||||
this.queryParams.endCreateTime = this.queryParams.createTime ? this.queryParams.createTime[1] : ''
|
||||
const params = { ...this.queryParams }
|
||||
delete params.createTime
|
||||
getEquipmentApplyListApi(params)
|
||||
.then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
|
|
@ -157,7 +164,7 @@ export default {
|
|||
showEquipmentInput(orderId, status, isAddVisible) {
|
||||
this.$router.push({
|
||||
name: 'equipmentReview', // 完整路径
|
||||
params: { // 因为使用path,所以用query传递参数
|
||||
query: { // 因为使用path,所以用query传递参数
|
||||
orderId: orderId,
|
||||
status: status,
|
||||
isAddVisible: isAddVisible,
|
||||
|
|
|
|||
|
|
@ -19,21 +19,24 @@
|
|||
>
|
||||
<!-- 表单搜索 -->
|
||||
<el-row>
|
||||
<el-form-item prop="createUser" label="申请人:">
|
||||
<el-form-item prop="orderCreateUser" label="申请人:">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="请输入内容"
|
||||
v-model.trim="queryParams.createUser"
|
||||
v-model.trim="queryParams.orderCreateUser"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间:" prop="createTime">
|
||||
<el-form-item label="申请时间:" prop="orderCreateTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 240px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
v-model="queryParams.createTime"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.orderCreateTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -89,10 +92,13 @@
|
|||
|
||||
<el-form-item prop="productionDate" label="出厂日期:">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
type="daterange"
|
||||
style="width: 240px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择出厂日期"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="queryParams.productionDate"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -135,11 +141,11 @@
|
|||
重置
|
||||
</el-button>
|
||||
|
||||
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="this.status =='0'">
|
||||
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!this.isAddVisible && this.orderStatus =='0'">
|
||||
全部通过
|
||||
</el-button>
|
||||
|
||||
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="this.status =='0'">
|
||||
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="!this.isAddVisible && this.orderStatus =='0'">
|
||||
全部驳回
|
||||
</el-button>
|
||||
|
||||
|
|
@ -238,15 +244,15 @@
|
|||
|
||||
<el-button
|
||||
type="text"
|
||||
@click="approved(row.maId,row.csId)"
|
||||
v-if="row.entryStatus === '0' && row.status === '0'"
|
||||
@click="approved(row)"
|
||||
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0'"
|
||||
>
|
||||
<i class="el-icon-edit"></i> 通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="reject(row.maId,row.csId)"
|
||||
v-if="row.entryStatus === '0' && row.status === '0' "
|
||||
@click="reject(row)"
|
||||
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0' "
|
||||
>
|
||||
<i class="el-icon-delete"></i> 驳回
|
||||
</el-button>
|
||||
|
|
@ -298,10 +304,10 @@ export default {
|
|||
orderId: '',
|
||||
isVisible: false,
|
||||
isAddVisible: false,
|
||||
status: '',
|
||||
orderStatus: '',
|
||||
queryParams: {
|
||||
createUser: '',
|
||||
createTime: '',
|
||||
orderCreateUser: '',
|
||||
orderCreateTime: '',
|
||||
entryStatus: '',
|
||||
name: '',
|
||||
specificationModel: '',
|
||||
|
|
@ -342,21 +348,29 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
const { orderId, status, isAddVisible, isApprovalVisible } = this.$route.params
|
||||
const { orderId, status, orderStatus, isAddVisible, isApprovalVisible } = this.$route.query
|
||||
this.isAddVisible = isAddVisible
|
||||
if (orderId) {
|
||||
this.queryParams.orderId = orderId
|
||||
this.status = status
|
||||
this.orderStatus = status || orderStatus
|
||||
}
|
||||
this.getEquipmentApplyList()
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
this.$router.go(-1)
|
||||
// this.$router.go(-1)
|
||||
this.$router.push({ path: '/equipment/equipmentEntry/equipment-entry-approval' })
|
||||
},
|
||||
/**
|
||||
* 获取装备申请列表
|
||||
*/
|
||||
getEquipmentApplyList() {
|
||||
this.queryParams.startOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[0] : ''
|
||||
this.queryParams.endOrderCreateTime = this.queryParams.orderCreateTime ? this.queryParams.orderCreateTime[1] : ''
|
||||
this.queryParams.startProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[0] : ''
|
||||
this.queryParams.endProductionDate = this.queryParams.productionDate ? this.queryParams.productionDate[1] : ''
|
||||
delete this.queryParams.orderCreateTime
|
||||
delete this.queryParams.productionDate
|
||||
getDeviceByOrderIdApi(this.queryParams)
|
||||
.then(res => {
|
||||
this.tableData = res.data.rows
|
||||
|
|
@ -444,10 +458,10 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
approved(maId, csId) {
|
||||
approved(row) {
|
||||
const data = {
|
||||
devIds: maId,
|
||||
id: csId,
|
||||
devIds: row.maId,
|
||||
id: this.queryParams.orderId,
|
||||
status: 1
|
||||
}
|
||||
|
||||
|
|
@ -465,10 +479,10 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
reject(maId, csId) {
|
||||
reject(row) {
|
||||
const data = {
|
||||
devIds: maId,
|
||||
id: csId,
|
||||
devIds: row.maId,
|
||||
id: this.queryParams.orderId,
|
||||
status: 1
|
||||
}
|
||||
this.$confirm('是否确定驳回?', '提示', {
|
||||
|
|
@ -504,7 +518,7 @@ export default {
|
|||
|
||||
equipmentPassAndRejectApiNew({
|
||||
devIds: filteredData.map(item => item.maId).join(','),
|
||||
id: filteredData[0]?.csId || '',
|
||||
id: this.queryParams.orderId,
|
||||
status: 1
|
||||
})
|
||||
.then(res => {
|
||||
|
|
@ -535,7 +549,7 @@ export default {
|
|||
|
||||
equipmentPassAndRejectApiNew({
|
||||
devIds: filteredData.map(item => item.maId).join(','),
|
||||
id: filteredData[0]?.csId || '',
|
||||
id: this.queryParams.orderId,
|
||||
status: 2
|
||||
})
|
||||
.then(res => {
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="selectedEquipment" border>
|
||||
<el-table :data="selectedEquipment" border :max-height="500">
|
||||
<el-table-column label="序号" type="index" align="center" width="55"/>
|
||||
<el-table-column prop="devName" label="装备名称" align="center"/>
|
||||
<el-table-column prop="devModel" label="规格型号" align="center"/>
|
||||
<el-table-column prop="devCode" label="装备编码" align="center"/>
|
||||
<el-table-column prop="name" label="装备名称" align="center"/>
|
||||
<el-table-column prop="specificationModel" label="规格型号" align="center"/>
|
||||
<el-table-column prop="code" label="装备编码" align="center"/>
|
||||
|
||||
<el-table-column label="维修结果" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
|
|
@ -82,12 +82,12 @@
|
|||
<el-form :inline="true" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="装备名称" prop="devName">
|
||||
<el-form-item label="装备名称" prop="name">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入装备名称"
|
||||
v-model="addEquipmentQueryParams.devName"
|
||||
v-model="addEquipmentQueryParams.name"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -111,10 +111,10 @@
|
|||
>
|
||||
<el-table-column label="序号" type="index" align="center" width="55"/>
|
||||
<el-table-column width="55" align="center" type="selection"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="compName" label="公司名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devName" label="装备名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devModel" label="装备型号" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devCode" label="装备编号" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="propertyUnit" label="公司名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="name" label="装备名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="specificationModel" label="装备型号" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="code" label="装备编号" align="center"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="changeStatus" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 1" size="mini">在库</el-tag>
|
||||
|
|
@ -125,12 +125,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="unit" label="计数单位" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="compName" label="产权单位" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="buyPrice" label="资产原值(元)" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="propertyUnit" label="产权单位" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="originalValue" label="资产原值(元)" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="productDate" label="出厂日期" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="buyPrice" label="使用年限" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="proName" label="所在项目" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="nextDate" label="下次检验日期" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="maxServiceLifeYears" label="最大使用年限" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="usingProject" label="使用项目" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="nextMaintenanceDate" label="下次检验日期" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="manufacturer" label="生产厂商" align="center"/>
|
||||
|
||||
<template v-for="item in tableColumns">
|
||||
|
|
@ -187,6 +187,7 @@ import {
|
|||
getUseProjectListAPI,
|
||||
getVoltageListAPI
|
||||
} from '@/api/EquipmentLedger/equ-out'
|
||||
import { getDeviceListAPI } from '@/api/EquipmentLedger/index.js'
|
||||
|
||||
import { addProjectRepairAPI } from '@/api/EquipmentLedger/equ-repair.js'
|
||||
|
||||
|
|
@ -219,7 +220,7 @@ export default {
|
|||
addEquipmentQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
devName: '',
|
||||
name: '',
|
||||
status: '5',
|
||||
companyId: '',
|
||||
proId: ''
|
||||
|
|
@ -257,9 +258,9 @@ export default {
|
|||
// 获取可选择的变更设备列表
|
||||
getSelectEquipmentList() {
|
||||
return new Promise((resolve) => {
|
||||
getSelectEquipmentListAPI(this.addEquipmentQueryParams).then((res) => {
|
||||
this.addEquipmentList = res.rows
|
||||
this.addEquipmentTotal = res.total
|
||||
getDeviceListAPI(this.addEquipmentQueryParams).then((res) => {
|
||||
this.addEquipmentList = res.data.rows
|
||||
this.addEquipmentTotal = res.data.total
|
||||
this.getMaxFeature()
|
||||
|
||||
// 数据加载完成后设置选中状态
|
||||
|
|
@ -320,7 +321,7 @@ export default {
|
|||
this.addEquipmentQueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
devName: '',
|
||||
name: '',
|
||||
status: '5',
|
||||
companyId: '',
|
||||
proId: ''
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="selectedEquipment" border>
|
||||
<el-table :data="selectedEquipment" border :max-height="600">
|
||||
<el-table-column label="序号" type="index" align="center" width="55" />
|
||||
<el-table-column prop="devName" label="装备名称" align="center" />
|
||||
<el-table-column prop="devModel" label="规格型号" align="center" />
|
||||
<el-table-column prop="devCode" label="装备编码" align="center" />
|
||||
<el-table-column prop="name" label="装备名称" align="center" />
|
||||
<el-table-column prop="specificationModel" label="规格型号" align="center" />
|
||||
<el-table-column prop="code" label="装备编码" align="center" />
|
||||
<el-table-column label="装备状态" align="center">
|
||||
<template>
|
||||
<el-tag size="mini" type="primary">在库</el-tag>
|
||||
|
|
@ -59,12 +59,12 @@
|
|||
<el-form :inline="true" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="装备名称" prop="devName">
|
||||
<el-form-item label="装备名称" prop="name">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入装备名称"
|
||||
v-model="addEquipmentQueryParams.devName"
|
||||
v-model="addEquipmentQueryParams.name"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -90,10 +90,10 @@
|
|||
>
|
||||
<el-table-column label="序号" type="index" align="center" width="55" />
|
||||
<el-table-column width="55" align="center" type="selection" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="compName" label="公司名称" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devName" label="装备名称" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devModel" label="装备型号" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devCode" label="装备编号" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="propertyUnit" label="公司名称" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="name" label="装备名称" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="specificationModel" label="装备型号" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="code" label="装备编号" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="unit" label="计数单位" align="center" />
|
||||
<el-table-column align="center" show-overflow-tooltip prop="changeStatus" label="状态">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -104,21 +104,21 @@
|
|||
<el-tag v-if="scope.row.status == 5" size="mini"> 维修 </el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="compName" label="产权单位" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="propertyUnit" label="产权单位" align="center" />
|
||||
<el-table-column
|
||||
width="160"
|
||||
show-overflow-tooltip
|
||||
prop="buyPrice"
|
||||
prop="originalValue"
|
||||
label="资产原值(元)"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="productDate" label="出厂日期" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="useYears" label="使用年限" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="proName" label="所在项目" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="maxServiceLifeYears" label="最大使用年限" align="center" />
|
||||
<el-table-column width="160" show-overflow-tooltip prop="usingProject" label="使用项目" align="center" />
|
||||
<el-table-column
|
||||
width="160"
|
||||
show-overflow-tooltip
|
||||
prop="nextDate"
|
||||
prop="nextMaintenanceDate"
|
||||
label="下次检验日期"
|
||||
align="center"
|
||||
/>
|
||||
|
|
@ -180,6 +180,7 @@ import {
|
|||
getVoltageListAPI,
|
||||
addProjectOutAPI,
|
||||
} from '@/api/EquipmentLedger/equ-out'
|
||||
import { getDeviceListAPI } from '@/api/EquipmentLedger/index.js'
|
||||
|
||||
import { addProjectRetireAPI } from '@/api/EquipmentLedger/equ-retire.js'
|
||||
export default {
|
||||
|
|
@ -214,7 +215,7 @@ export default {
|
|||
addEquipmentQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
devName: '',
|
||||
name: '',
|
||||
status: '1',
|
||||
companyId: '',
|
||||
},
|
||||
|
|
@ -246,9 +247,9 @@ export default {
|
|||
// 获取可选择的变更设备列表
|
||||
getSelectEquipmentList() {
|
||||
return new Promise((resolve) => {
|
||||
getSelectEquipmentListAPI(this.addEquipmentQueryParams).then((res) => {
|
||||
this.addEquipmentList = res.rows
|
||||
this.addEquipmentTotal = res.total
|
||||
getDeviceListAPI(this.addEquipmentQueryParams).then((res) => {
|
||||
this.addEquipmentList = res.data.rows
|
||||
this.addEquipmentTotal = res.data.total
|
||||
this.getMaxFeature()
|
||||
|
||||
// 数据加载完成后设置选中状态
|
||||
|
|
@ -309,7 +310,7 @@ export default {
|
|||
this.addEquipmentQueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
devName: '',
|
||||
name: '',
|
||||
status: '1',
|
||||
companyId: '',
|
||||
}
|
||||
|
|
@ -423,7 +424,7 @@ export default {
|
|||
this.selectedEquipment = [...this.selectedEquipment, ...newItems]
|
||||
this.$modal.msgSuccess('成功添加 ' + newItems.length + ' 个装备')
|
||||
} else {
|
||||
this.$modal.msgInfo('所选装备已全部添加')
|
||||
this.$modal.msgWarning('所选装备已全部添加')
|
||||
}
|
||||
|
||||
this.addEquipmentVisible = false
|
||||
|
|
@ -440,7 +441,7 @@ export default {
|
|||
this.addEquipmentQueryParams.proId = value
|
||||
const item = this.useProjectList.find((item) => item.proCode === value)
|
||||
if (item) {
|
||||
this.outForm.proName = item.proName
|
||||
this.outForm.usingProject = item.usingProject
|
||||
const { proTypeName, proType, voltage, city, county, province } = item
|
||||
this.proTypeName = proTypeName
|
||||
this.outForm.proType = proType
|
||||
|
|
|
|||
|
|
@ -9,18 +9,18 @@
|
|||
<el-form ref="outFormRef" :model="outForm" :rules="outFormRules" label-width="auto" size="small">
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col>
|
||||
<el-form-item label="变更状态为" prop="status">
|
||||
<!-- <el-form-item label="变更状态为" prop="status">
|
||||
<el-radio-group v-model="outForm.status">
|
||||
<el-radio label="0">自用</el-radio>
|
||||
<el-radio label="1">共享</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
<el-button size="mini" style="margin-left: 80px" type="primary" @click="onHandleSubmit"
|
||||
>确定提交
|
||||
</el-button
|
||||
>
|
||||
<el-button size="mini" plain>取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-button size="mini" style="margin-bottom: 20px" type="primary" @click="onHandleSubmit"
|
||||
>确定提交
|
||||
</el-button
|
||||
>
|
||||
<el-button size="mini" plain>取消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
|
|
@ -156,11 +156,11 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="selectedEquipment" border>
|
||||
<el-table :data="selectedEquipment" border :max-height="500">
|
||||
<el-table-column label="序号" type="index" align="center" width="55"/>
|
||||
<el-table-column prop="devName" label="装备名称" align="center"/>
|
||||
<el-table-column prop="devModel" label="规格型号" align="center"/>
|
||||
<el-table-column prop="devCode" label="装备编码" align="center"/>
|
||||
<el-table-column prop="name" label="装备名称" align="center"/>
|
||||
<el-table-column prop="specificationModel" label="规格型号" align="center"/>
|
||||
<el-table-column prop="code" label="装备编码" align="center"/>
|
||||
<el-table-column label="使用到期日期" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-date-picker
|
||||
|
|
@ -189,12 +189,12 @@
|
|||
<el-form :inline="true" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="装备名称" prop="devName">
|
||||
<el-form-item label="装备名称" prop="name">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入装备名称"
|
||||
v-model="addEquipmentQueryParams.devName"
|
||||
v-model="addEquipmentQueryParams.name"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -221,10 +221,10 @@
|
|||
|
||||
<el-table-column label="序号" type="index" align="center" width="55"/>
|
||||
<el-table-column width="55" align="center" type="selection"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="compName" label="公司名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devName" label="装备名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devModel" label="装备型号" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="devCode" label="装备编号" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="propertyUnit" label="公司名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="name" label="装备名称" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="specificationModel" label="装备型号" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="code" label="装备编号" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="unit" label="计数单位" align="center"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="changeStatus" label="状态">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -235,25 +235,25 @@
|
|||
<el-tag v-if="scope.row.status == 5" size="mini"> 维修 </el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="compName" label="产权单位" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="propertyUnit" label="产权单位" align="center"/>
|
||||
<el-table-column
|
||||
width="160"
|
||||
show-overflow-tooltip
|
||||
prop="buyPrice"
|
||||
prop="originalValue"
|
||||
label="资产原值(元)"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="productDate" label="出厂日期" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="buyPrice" label="使用年限" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="proName" label="所在项目" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="maxServiceLifeYears" label="最大使用年限" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="usingProject" label="使用项目" align="center"/>
|
||||
<el-table-column
|
||||
width="160"
|
||||
show-overflow-tooltip
|
||||
prop="nextDate"
|
||||
prop="nextMaintenanceDate"
|
||||
label="下次检验日期"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="nextDate" label="生产厂商" align="center"/>
|
||||
<el-table-column width="160" show-overflow-tooltip prop="manufacturer" label="生产厂商" align="center"/>
|
||||
<template v-for="item in tableColumns">
|
||||
<!-- 特征项列 -->
|
||||
<el-table-column
|
||||
|
|
@ -310,6 +310,7 @@ import {
|
|||
getVoltageListAPI,
|
||||
addProjectOutAPI
|
||||
} from '@/api/EquipmentLedger/equ-out'
|
||||
import { getDeviceListAPI } from '@/api/EquipmentLedger/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -362,7 +363,7 @@ export default {
|
|||
addEquipmentQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
devName: '',
|
||||
name: '',
|
||||
status: '1',
|
||||
companyId: ''
|
||||
},
|
||||
|
|
@ -390,9 +391,9 @@ export default {
|
|||
// 获取可选择的变更设备列表
|
||||
getSelectEquipmentList() {
|
||||
return new Promise((resolve) => {
|
||||
getSelectEquipmentListAPI(this.addEquipmentQueryParams).then((res) => {
|
||||
this.addEquipmentList = res.rows
|
||||
this.addEquipmentTotal = res.total
|
||||
getDeviceListAPI(this.addEquipmentQueryParams).then((res) => {
|
||||
this.addEquipmentList = res.data.rows
|
||||
this.addEquipmentTotal = res.data.total
|
||||
this.getMaxFeature()
|
||||
|
||||
// 延迟执行确保DOM完全渲染
|
||||
|
|
@ -456,7 +457,7 @@ export default {
|
|||
this.addEquipmentQueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
devName: '',
|
||||
name: '',
|
||||
status: '1',
|
||||
companyId: ''
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产厂家" prop="manufacturer">
|
||||
<el-input v-model="form.manufacturer" placeholder="请输入生产厂家" readonly />
|
||||
<el-input v-model="form.manufacturerName" placeholder="生产厂家" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
|
@ -128,9 +128,9 @@
|
|||
>
|
||||
<div v-for="(item, index) in form.appearanceImages" :key="index">
|
||||
<el-image
|
||||
:src="item.url"
|
||||
:src="item.fileUrl"
|
||||
alt=""
|
||||
:preview-src-list="[item.url]"
|
||||
:preview-src-list="[item.fileUrl]"
|
||||
style="width: 120px; height: 120px; margin-right: 10px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
<div v-for="(item, index) in form.certificates" :key="index">
|
||||
<!-- 后缀如果包含 .pdf 显示pdf图标 -->
|
||||
<img
|
||||
v-if="item.url.includes('.pdf') || item.url.includes('.PDF')"
|
||||
v-if="item.fileUrl && (item.fileUrl.includes('.pdf') || item.fileUrl.includes('.PDF'))"
|
||||
style="width: 120px; height: 120px; margin-right: 10px; cursor: pointer"
|
||||
src="@/assets/images/pdf.png"
|
||||
fit="fill"
|
||||
|
|
@ -162,10 +162,11 @@
|
|||
<!-- 后缀如果包含 .word 显示 word图片 -->
|
||||
<img
|
||||
v-else-if="
|
||||
item.url.includes('.doc') ||
|
||||
item.url.includes('.docx') ||
|
||||
item.url.includes('.DOC') ||
|
||||
item.url.includes('.DOCX')
|
||||
item.fileUrl &&
|
||||
(item.fileUrl.includes('.doc') ||
|
||||
item.fileUrl.includes('.docx') ||
|
||||
item.fileUrl.includes('.DOC') ||
|
||||
item.fileUrl.includes('.DOCX'))
|
||||
"
|
||||
style="width: 120px; height: 120px; margin-right: 10px; cursor: pointer"
|
||||
src="@/assets/images/word.png"
|
||||
|
|
@ -174,9 +175,9 @@
|
|||
/>
|
||||
<el-image
|
||||
v-else
|
||||
:src="item.url"
|
||||
:src="item.fileUrl"
|
||||
alt=""
|
||||
:preview-src-list="[item.url]"
|
||||
:preview-src-list="[item.fileUrl]"
|
||||
style="width: 120px; height: 120px; margin-right: 10px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -191,7 +192,7 @@
|
|||
<div v-for="(item, index) in form.inspectionReports" :key="index">
|
||||
<!-- 后缀如果包含 .pdf 显示pdf图标 -->
|
||||
<img
|
||||
v-if="item.url.includes('.pdf') || item.url.includes('.PDF')"
|
||||
v-if="item.fileUrl && (item.fileUrl.includes('.pdf') || item.fileUrl.includes('.PDF'))"
|
||||
style="width: 120px; height: 120px; margin-right: 10px; cursor: pointer"
|
||||
src="@/assets/images/pdf.png"
|
||||
fit="fill"
|
||||
|
|
@ -200,10 +201,11 @@
|
|||
<!-- 后缀如果包含 .word 显示 word图片 -->
|
||||
<img
|
||||
v-else-if="
|
||||
item.url.includes('.doc') ||
|
||||
item.url.includes('.docx') ||
|
||||
item.url.includes('.DOC') ||
|
||||
item.url.includes('.DOCX')
|
||||
item.fileUrl &&
|
||||
(item.fileUrl.includes('.doc') ||
|
||||
item.fileUrl.includes('.docx') ||
|
||||
item.fileUrl.includes('.DOC') ||
|
||||
item.fileUrl.includes('.DOCX'))
|
||||
"
|
||||
style="width: 120px; height: 120px; margin-right: 10px; cursor: pointer"
|
||||
src="@/assets/images/word.png"
|
||||
|
|
@ -212,9 +214,9 @@
|
|||
/>
|
||||
<el-image
|
||||
v-else
|
||||
:src="item.url"
|
||||
:src="item.fileUrl"
|
||||
alt=""
|
||||
:preview-src-list="[item.url]"
|
||||
:preview-src-list="[item.fileUrl]"
|
||||
style="width: 120px; height: 120px; margin-right: 10px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -229,7 +231,7 @@
|
|||
<div v-for="(item, index) in form.purchaseInvoices" :key="index">
|
||||
<!-- 后缀如果包含 .pdf 显示pdf图标 -->
|
||||
<img
|
||||
v-if="item.url.includes('.pdf') || item.url.includes('.PDF')"
|
||||
v-if="item.fileUrl && (item.fileUrl.includes('.pdf') || item.fileUrl.includes('.PDF'))"
|
||||
style="width: 120px; height: 120px; margin-right: 10px; cursor: pointer"
|
||||
src="@/assets/images/pdf.png"
|
||||
fit="fill"
|
||||
|
|
@ -238,10 +240,11 @@
|
|||
<!-- 后缀如果包含 .word 显示 word图片 -->
|
||||
<img
|
||||
v-else-if="
|
||||
item.url.includes('.doc') ||
|
||||
item.url.includes('.docx') ||
|
||||
item.url.includes('.DOC') ||
|
||||
item.url.includes('.DOCX')
|
||||
item.fileUrl &&
|
||||
(item.fileUrl.includes('.doc') ||
|
||||
item.fileUrl.includes('.docx') ||
|
||||
item.fileUrl.includes('.DOC') ||
|
||||
item.fileUrl.includes('.DOCX'))
|
||||
"
|
||||
style="width: 120px; height: 120px; margin-right: 10px; cursor: pointer"
|
||||
src="@/assets/images/word.png"
|
||||
|
|
@ -250,9 +253,9 @@
|
|||
/>
|
||||
<el-image
|
||||
v-else
|
||||
:src="item.url"
|
||||
:src="item.fileUrl"
|
||||
alt=""
|
||||
:preview-src-list="[item.url]"
|
||||
:preview-src-list="[item.fileUrl]"
|
||||
style="width: 120px; height: 120px; margin-right: 10px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -305,7 +308,7 @@ export default {
|
|||
this.$router.go(-1)
|
||||
},
|
||||
handleFile(item) {
|
||||
window.open(item.url, '_blank')
|
||||
window.open(item.fileUrl, '_blank')
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@
|
|||
<!-- 装备列表表格 -->
|
||||
<div class="card-container">
|
||||
<el-row :gutter="10" class="mb8" style="display: flex; align-items: center">
|
||||
<el-col :span="22">
|
||||
<el-col :span="21">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<span class="table-title">装备列表 </span>
|
||||
|
|
@ -367,6 +367,13 @@
|
|||
{{ row.branch ? row.subCategory + '>' : row.subCategory }}{{ row.branch }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="item.prop == 'status'">
|
||||
<el-tag v-if="row.status == 1" size="mini">在库</el-tag>
|
||||
<el-tag v-if="row.status == 2" size="mini">自用</el-tag>
|
||||
<el-tag v-if="row.status == 3" size="mini">共享</el-tag>
|
||||
<el-tag v-if="row.status == 4" size="mini" type="info">退役</el-tag>
|
||||
<el-tag v-if="row.status == 5" size="mini" type="danger">维修</el-tag>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="item.prop == 'appearanceImages'">
|
||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 1)">查看</span>
|
||||
</template>
|
||||
|
|
@ -983,7 +990,7 @@ export default {
|
|||
* 出库按钮
|
||||
*/
|
||||
onHandleOut() {
|
||||
this.$router.push('/equipment-ledger-out/index')
|
||||
this.$router.push('/equipment/euq-out')
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -1008,14 +1015,14 @@ export default {
|
|||
* 维修按钮
|
||||
*/
|
||||
onHandleRepair() {
|
||||
this.$router.push('/equipment-ledger-repair/index')
|
||||
this.$router.push('/equipment/equ-repair')
|
||||
},
|
||||
|
||||
/**
|
||||
* 退役按钮
|
||||
*/
|
||||
onHandleRetire() {
|
||||
this.$router.push('/equipment-ledger-retire/index')
|
||||
this.$router.push('/equipment/equ-retire')
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
row-key="menuId"
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
:max-height="680"
|
||||
>
|
||||
<el-table-column prop="menuName" label="菜单名称" align="center" :show-overflow-tooltip="true" width="160"></el-table-column>
|
||||
<el-table-column prop="icon" label="图标" align="center" min-width="100">
|
||||
|
|
|
|||
Loading…
Reference in New Issue