Merge remote-tracking branch 'origin/anhui-mall-ui-test' into anhui-mall-ui-test
This commit is contained in:
commit
9a0130db4b
|
|
@ -94,11 +94,11 @@
|
|||
</el-row>
|
||||
<!-- 表格 -->
|
||||
<div >
|
||||
<el-table :data="tableData" border stripe :span-method="handleSpanMethod" height="546">
|
||||
<el-table ref="tableRef" :data="tableData" border stripe :span-method="handleSpanMethod" height="546">
|
||||
<!-- <el-table :data="tableData" >-->
|
||||
<el-table-column label="序号" align="center" width="55" type="index" fixed />
|
||||
<el-table-column label="序号" align="center" width="55" type="index" />
|
||||
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip column-key="orderNumber"
|
||||
fixed min-width="200" />
|
||||
min-width="200" />
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 4)">查看</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in columns" v-if="item.visible" :key="index" align="center"
|
||||
<el-table-column v-for="(item, index) in columns2" v-if="item.visible" :key="index" align="center"
|
||||
show-overflow-tooltip :label="item.label" :prop="item.prop">
|
||||
<template v-slot="{ row }" v-if="/^feature(Item|Value)\d+$/.test(item.prop)">
|
||||
<span>
|
||||
|
|
@ -240,6 +240,7 @@ export default {
|
|||
pageSize: 10
|
||||
},
|
||||
manufacturerList: [],
|
||||
columns2: [],
|
||||
columns: [
|
||||
{ key: 26, label: `特征项1`, prop: 'featureItem1', visible: true },
|
||||
{ key: 27, label: `特征值1`, prop: 'featureValue1', visible: true },
|
||||
|
|
@ -298,6 +299,18 @@ export default {
|
|||
|
||||
// 按 orderNumber 排序,确保相同订单连续
|
||||
this.tableData.sort((a, b) => a.orderNumber.localeCompare(b.orderNumber))
|
||||
let maxLength = 0
|
||||
this.tableData.forEach((item) => {
|
||||
if (item.propertyVoList && item.propertyVoList.length > maxLength) {
|
||||
maxLength = item.propertyVoList.length
|
||||
}
|
||||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取装备申请列表失败:', error)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<span class="page-title">{{ pageTitle }}</span>
|
||||
</div>
|
||||
<div class="dialog-footer" style="float: right">
|
||||
<el-button size="medium" @click="goBack">取消</el-button>
|
||||
<el-button size="medium" @click="close">取消</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleSubmit">确认</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -512,7 +512,13 @@ export default {
|
|||
},
|
||||
// 返回上一页
|
||||
goBack() {
|
||||
this.$tab.closePage()
|
||||
// this.$tab.closePage()
|
||||
this.$router.go(-1)
|
||||
},
|
||||
close() {
|
||||
this.$tab.closePage({ path: '/equipment/equipment-input/add' }).then(() => {
|
||||
this.$router.go(-1)
|
||||
})
|
||||
},
|
||||
deviceTypeChange(val) {
|
||||
if (val === 0) {
|
||||
|
|
|
|||
|
|
@ -170,7 +170,6 @@
|
|||
align="center"
|
||||
show-overflow-tooltip
|
||||
column-key="orderNumber"
|
||||
fixed
|
||||
min-width="200"
|
||||
/>
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" />
|
||||
|
|
@ -205,7 +204,7 @@
|
|||
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100" />
|
||||
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100" />
|
||||
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100" />
|
||||
<!-- <el-table-column prop="purchaseDate" label="采购日期" align="center"/>-->
|
||||
<el-table-column prop="purchaseDate" label="采购日期" align="center" />
|
||||
<el-table-column
|
||||
prop="originalValue"
|
||||
label="资产原值(万元)"
|
||||
|
|
@ -213,8 +212,8 @@
|
|||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
<!-- <el-table-column prop="maxServiceLifeYears" label="最大使用年限(年)" align="center"/>-->
|
||||
<!-- <el-table-column prop="nextMaintenanceDate" label="下次维保日期" align="center"/>-->
|
||||
<el-table-column prop="maxServiceLifeYears" label="最大使用年限(年)" align="center" />
|
||||
<el-table-column prop="nextMaintenanceDate" label="下次维保日期" align="center" />
|
||||
<el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="100" />
|
||||
<el-table-column prop="appearanceImages" label="装备外观" show-overflow-tooltip align="center" min-width="100">
|
||||
<template v-slot="{ row }">
|
||||
|
|
@ -257,7 +256,7 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
prop="orderCreateUser"
|
||||
label="申请人"
|
||||
show-overflow-tooltip
|
||||
|
|
@ -272,7 +271,7 @@
|
|||
align="center"
|
||||
fixed="right"
|
||||
min-width="100"
|
||||
/>
|
||||
/> -->
|
||||
<el-table-column
|
||||
prop="entryStatus"
|
||||
align="center"
|
||||
|
|
@ -301,12 +300,12 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination-wrapper">
|
||||
<pagination
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
<pagination
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<EquipmentEntryEditDialog
|
||||
|
|
@ -374,6 +373,7 @@ import {
|
|||
equipmentPassAndRejectApiNew,
|
||||
equipmentSubmitApiNew,
|
||||
removeDeviceApi,
|
||||
getEquipmentAddIdApi,
|
||||
} from '@/api/EquipmentEntryApply'
|
||||
import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
|
@ -440,6 +440,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
orderNumber: '',
|
||||
manufacturerList: [],
|
||||
// 可添加表单数据
|
||||
formData: {
|
||||
|
|
@ -639,6 +640,7 @@ export default {
|
|||
}
|
||||
|
||||
const orderNumber = row.orderNumber
|
||||
this.orderNumber = orderNumber
|
||||
let count = 1
|
||||
|
||||
// 计算从当前行开始,连续有多少个相同的 orderNumber
|
||||
|
|
@ -730,29 +732,46 @@ export default {
|
|||
importTemplate() {
|
||||
this.download('/material-mall/order/template', {}, `装备信息导入模板_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
addList() {
|
||||
const newRow = {
|
||||
orderNumber: '',
|
||||
major: '',
|
||||
mainProcess: '',
|
||||
subProcess: '',
|
||||
mainCategory: '',
|
||||
subCategory: '',
|
||||
branch: '',
|
||||
name: '',
|
||||
specificationModel: '',
|
||||
originalCode: '',
|
||||
unit: '',
|
||||
manufacturer: '',
|
||||
productionDate: '',
|
||||
originalValue: '',
|
||||
province: '',
|
||||
appearanceImages: [],
|
||||
certificates: [],
|
||||
inspectionReports: [],
|
||||
purchaseInvoices: [],
|
||||
async addList() {
|
||||
try {
|
||||
if (!this.$route.query.orderId) {
|
||||
const result = await getEquipmentAddIdApi()
|
||||
this.orderId = result.data.id
|
||||
this.$router.replace({
|
||||
query: {
|
||||
orderId: result.data.id,
|
||||
isAddVisible: this.isAddVisible,
|
||||
isApprovalVisible: this.isApprovalVisible,
|
||||
},
|
||||
})
|
||||
}
|
||||
const newRow = {
|
||||
orderNumber: this.orderNumber,
|
||||
major: '', // 专业
|
||||
process: [], // 工序
|
||||
category: [], // 类目
|
||||
name: '', // 装备名称
|
||||
specificationModel: '', // 规格型号
|
||||
originalValue: '', // 资产原值
|
||||
productionDate: '', // 出厂日期
|
||||
manufacturerId: '', // 生产厂家
|
||||
originalCode: '', // 装备原始编码
|
||||
nextMaintenanceDate: '', // 下次维保日期
|
||||
maxServiceLifeYears: '', // 装备寿命
|
||||
manageType: '0', // 管理模式
|
||||
count: 1, // 装备数量
|
||||
unit: '', // 计数单位
|
||||
purchaseDate: '', // 采购日期
|
||||
appearanceImages: [], // 装备图片
|
||||
certificates: [], // 合格证
|
||||
inspectionReports: [], // 检测证书
|
||||
purchaseInvoices: [], // 采购发票
|
||||
propertyVoList: [], // 特征属性
|
||||
}
|
||||
this.tableData.unshift(newRow)
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ error:', error)
|
||||
}
|
||||
this.tableData.unshift(newRow)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,11 +155,11 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableData" :span-method="handleSpanMethod" border stripe height="546">
|
||||
<el-table ref="tableRef" :data="tableData" :span-method="handleSpanMethod" border stripe height="546">
|
||||
<!-- <el-table :data="tableData" >-->
|
||||
<el-table-column label="序号" align="center" width="55" type="index" fixed/>
|
||||
<el-table-column label="序号" align="center" width="55" type="index"/>
|
||||
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip
|
||||
column-key="orderNumber" fixed min-width="200"
|
||||
column-key="orderNumber" min-width="200"
|
||||
/>
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
|
||||
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
||||
|
|
@ -390,6 +390,10 @@ export default {
|
|||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取装备申请列表失败:', error)
|
||||
|
|
|
|||
|
|
@ -141,11 +141,11 @@
|
|||
重置
|
||||
</el-button>
|
||||
|
||||
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!this.isAddVisible && this.orderStatus =='0'">
|
||||
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!isAddVisible && orderStatus =='0'">
|
||||
全部通过
|
||||
</el-button>
|
||||
|
||||
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="!this.isAddVisible && this.orderStatus =='0'">
|
||||
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="!isAddVisible && orderStatus =='0'">
|
||||
全部驳回
|
||||
</el-button>
|
||||
|
||||
|
|
@ -154,11 +154,11 @@
|
|||
</el-row>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableData" :span-method="handleSpanMethod" height="546">
|
||||
<el-table ref="tableRef" :data="tableData" :span-method="handleSpanMethod" height="546">
|
||||
<!-- <el-table :data="tableData" >-->
|
||||
<el-table-column label="序号" align="center" width="55" type="index" fixed/>
|
||||
<el-table-column label="序号" align="center" width="55" type="index"/>
|
||||
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip
|
||||
column-key="orderNumber" fixed min-width="200"
|
||||
column-key="orderNumber" min-width="200"
|
||||
/>
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
|
||||
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
||||
|
|
@ -238,23 +238,25 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="300" fixed="right">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" @click="handleViewDetail(row)">
|
||||
<i class="el-icon-view"></i> 查看
|
||||
<el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">
|
||||
查看
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="approved(row)"
|
||||
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0'"
|
||||
>
|
||||
<i class="el-icon-edit"></i> 通过
|
||||
通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="reject(row)"
|
||||
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0' "
|
||||
>
|
||||
<i class="el-icon-delete"></i> 驳回
|
||||
驳回
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
|
|
@ -350,7 +352,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
const { orderId, status, orderStatus, isAddVisible, isApprovalVisible } = this.$route.query
|
||||
this.isAddVisible = isAddVisible == 'true'
|
||||
this.isAddVisible = isAddVisible
|
||||
if (orderId) {
|
||||
this.queryParams.orderId = orderId
|
||||
this.orderStatus = status || orderStatus
|
||||
|
|
@ -387,6 +389,10 @@ export default {
|
|||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取装备申请列表失败:', error)
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@
|
|||
</el-row>
|
||||
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="tableData"
|
||||
:key="Date.now()"
|
||||
@selection-change="handleSelectionChange"
|
||||
|
|
@ -1302,6 +1303,10 @@ export default {
|
|||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
} catch (error) {
|
||||
// this.$message.error('获取设备列表失败:' + (error.message || '未知错误'))
|
||||
console.error(error)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="546"
|
||||
|
||||
class="table-container"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
|
|||
Loading…
Reference in New Issue