From 34dc1aa1e6a2a063088c48d976f876fa3cacaf4e Mon Sep 17 00:00:00 2001
From: houjie <714924425@qq.com>
Date: 星期三, 30 八月 2023 17:09:10 +0800
Subject: [PATCH] 设备处理调整
---
src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue | 1
src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue | 3
src/views/spare/modules/sparePart/SparePart2List.vue | 16 ++++
src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue | 18 ------
src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue | 80 +++++++-------------------
src/views/spare/modules/sparePartInventory/SparePart2List.vue | 12 +++
6 files changed, 49 insertions(+), 81 deletions(-)
diff --git a/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue b/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue
index 57b6f95..99b6c58 100644
--- a/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue
+++ b/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue
@@ -4,6 +4,7 @@
<!-- <a-tabs v-model="activeKey" @change="handleChangeTabs">-->
<!--涓昏〃鍖哄煙 -->
<!-- <a-tab-pane tab="璁惧鍙樺姩" :key="refKeys[0]" :forceRender="true" :class="'jeecg-tabs-top'" :animated="false">-->
+ <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-row>
<a-col :xs="24" :sm="24">
@@ -29,7 +30,7 @@
</a-row>
</a-form-model>
-
+ </j-form-container>
<!-- </a-tab-pane>-->
<!-- <a-button-->
diff --git a/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue b/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue
index 741d53f..d54fbcb 100644
--- a/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue
+++ b/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue
@@ -5,6 +5,7 @@
:maskClosable="false"
switchFullscreen
@ok="handleOk"
+ :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
:title="title"
@cancel="handleCancel">
<equipment-scrap-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
diff --git a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue
index dbb8a88..7504805 100644
--- a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue
+++ b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue
@@ -74,8 +74,8 @@
:dataSource="equipmentSealDetailTable.dataSource"
:maxHeight="300"
:disabled="formDisabled"
- :alwaysEdit='true'
- :bordered='true'
+ :alwaysEdit="true"
+ :bordered="true"
:rowNumber="true"
:rowSelection="true"
:toolbar="true"
@@ -92,27 +92,6 @@
</a-button>
</template>
- <!-- 璁惧鍥剧墖鎻掓Ы -->
- <!-- <template v-slot:equipmentPhoto='props'>
- <Tooltip
- placement="top"
- title="棰勮鍥剧墖"
- >
- <span
- v-if="!text"
- style="font-size: 12px;font-style: italic;"
- >鏃犲浘鐗�</span>
- <img
- v-else
- :preview="props.equipmentId"
- :src="getImgView(text)"
- height="25px"
- alt=""
- style="max-width:80px;font-size: 12px;font-style: italic;"
- />
- </Tooltip>
- </template> -->
- <!-- :preview="props.rowId"equipmentId -->
<template v-slot:action="props">
<a-popconfirm
title="纭畾鍒犻櫎鍚楋紵"
@@ -125,19 +104,13 @@
</a-tab-pane>
</a-tabs>
<equipment-select-modal ref="EquipmentSelectModal"></equipment-select-modal>
- <!-- <equipment-selection @selectionRows="selectionRows" :equipmentStatus="['2', '3']"
- ref="EquipmentSelection"></equipment-selection> -->
</a-spin>
</template>
<script>
-import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
-import { randomUUID, randomNumber } from '@/utils/util'
import { validateDuplicateValue } from '@/utils/util'
-import pick from 'lodash.pick'
-import { getAction, postAction, requestPut } from '@api/manage'
// import EquipmentSelection from '@/components/tools/EquipmentSelection.vue'
import EquipmentSelectModal from './EquipmentSelectModal.vue'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
@@ -169,19 +142,15 @@
xs: { span: 24 },
sm: { span: 16 }
},
- // manageList: [
- // { label: '绌�', value: '' },
- // { label: '淇濆吇鏍囧噯涓�', value: '1001' },
- // { label: '淇濆吇鏍囧噯浜�', value: '1002' }
- // ],
- // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁
addDefaultRowNum: 0,
model: {},
validatorRules: {
+
num: [
{ required: true, message: '璇疯緭鍏ュ崟鎹彿!' },
{ validator: (rule, value, callback) => validateDuplicateValue('mom_eam_equipment_change', 'num', value, this.model.id, callback) }
],
+
remark: [
{ required: false, message: '璇疯緭鍏ュ娉�!' }
]
@@ -208,7 +177,7 @@
title: '璁惧灏佸瓨鏄庣粏id',
key: 'id',
type: JVXETypes.hidden,
- width: '100px',
+ width: '100px'
},
// fixed: 'left'
{
@@ -229,7 +198,7 @@
key: 'equipmentNum',
type: JVXETypes.normal,
width: '150px',
- align: "center",
+ align: 'center'
// placeholder: '璇疯緭鍏�${title}',
},
// fixed: 'left'
@@ -239,7 +208,7 @@
type: JVXETypes.normal,
disabled: true,
width: '150px',
- align: "center",
+ align: 'center',
defaultValue: ''
},
{
@@ -248,7 +217,7 @@
type: JVXETypes.normal,
disabled: true,
width: '150px',
- align: "center",
+ align: 'center',
defaultValue: ''
},
{
@@ -257,7 +226,7 @@
type: JVXETypes.normal,
disabled: true,
width: '150px',
- align: "center",
+ align: 'center',
placeholder: '璇疯緭鍏�${title}',
defaultValue: ''
},
@@ -266,7 +235,7 @@
key: 'assetNumber',
type: JVXETypes.normal,
width: '150px',
- align: "center",
+ align: 'center',
defaultValue: ''
},
{
@@ -274,7 +243,7 @@
key: 'sealReason',
type: JVXETypes.input,
width: '200px',
- align: "center",
+ align: 'center',
placeholder: '璇疯緭鍏�${title}',
defaultValue: '',
validateRules: [{
@@ -287,7 +256,7 @@
key: 'sealDate',
type: JVXETypes.datetime,
width: '150px',
- align: "center",
+ align: 'center',
placeholder: '璇烽�夋嫨${title}',
defaultValue: '',
validateRules: [{
@@ -301,7 +270,7 @@
key: 'planUnsealDate',
type: JVXETypes.date,
width: '150px',
- align: "center",
+ align: 'center',
placeholder: '璇疯緭鍏�${title}',
defaultValue: ''
},
@@ -312,7 +281,7 @@
disabled: true,
placeholder: '璇疯緭鍏�${title}',
defaultValue: '',
- width: '150px',
+ width: '150px'
},
{
title: '鐗圭璁惧',
@@ -320,7 +289,7 @@
type: JVXETypes.normal,
disabled: true,
width: '150px',
- align: "center",
+ align: 'center',
defaultValue: ''
},
@@ -330,7 +299,7 @@
type: JVXETypes.normal,
disabled: true,
width: '150px',
- align: "center",
+ align: 'center',
defaultValue: ''
},
{
@@ -339,7 +308,7 @@
type: JVXETypes.normal,
disabled: true,
width: '150px',
- align: "center",
+ align: 'center',
defaultValue: ''
},
{
@@ -348,7 +317,7 @@
type: JVXETypes.normal,
disabled: true,
width: '200px',
- align: "center",
+ align: 'center'
},
{
title: '閲嶈搴�',
@@ -356,14 +325,14 @@
type: JVXETypes.normal,
disabled: true,
width: '150px',
- align: "center",
+ align: 'center',
defaultValue: ''
},
{
title: '閲嶈搴�',
key: 'equipmentImportanceId',
type: JVXETypes.hidden
- },
+ }
// {
// title: '璁惧鍥剧墖',
// key: 'equipmentPhoto',
@@ -532,15 +501,8 @@
</script>
<style scoped>
-/** tab panel 涓湁涓嬫媺妗�/鏃ユ湡 杩欑被甯︿笅鎷夋晥鏋滅殑锛岄渶瑕佸姞姝ゆ牱寮� */
-::v-deep .jeecg-tabs-top {
+/deep/ .jeecg-tabs-top {
overflow: visible;
-}
-
-::v-deep .ant-form-explain {
- position: absolute;
- right: -50px;
- top: 12px;
}
</style>
\ No newline at end of file
diff --git a/src/views/spare/modules/sparePart/SparePart2List.vue b/src/views/spare/modules/sparePart/SparePart2List.vue
index f18402c..a48323b 100644
--- a/src/views/spare/modules/sparePart/SparePart2List.vue
+++ b/src/views/spare/modules/sparePart/SparePart2List.vue
@@ -68,8 +68,17 @@
<a-button
type="primary"
icon="download"
- @click="handleExportXls('???')"
+ @click="handleExportXls('澶囦欢淇℃伅')"
>瀵煎嚭</a-button>
+ <a-upload
+ name="file"
+ :showUploadList="false"
+ :multiple="false"
+ :headers="tokenHeader"
+ :action="importExcelUrl"
+ @change="handleImportExcel">
+ <a-button type="primary" icon="import">瀵煎叆</a-button>
+ </a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-button style="margin-left: 8px">
鎵归噺鎿嶄綔
@@ -305,7 +314,7 @@
delete: "/spare/sparePart/delete",
deleteBatch: "/spare/sparePart/deleteBatch",
exportXlsUrl: '/spare/sparePart/exportXls',
- // importExcelUrl: 'base/site/importExcel',
+ importExcelUrl: '/spare/sparePart/importExcel',
},
//鏂板銆佺紪杈戙�佸垹闄ゃ�佹壒閲忓垹闄ゆ搷浣滄敼鍙樻暟鎹悗鍒锋柊鍏宠仈鐨勭粍浠剁殑鐩戝惉灞炴��
alterFlag: "",
@@ -333,6 +342,9 @@
selectedRowKeys: this.selectedRowKeys,
};
},
+ importExcelUrl(){
+ return `${window._CONFIG['domianURL']}/${this.url.importUrl}`;
+ }
},
methods: {
diff --git a/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue
index 5e2810f..117bdce 100644
--- a/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue
+++ b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue
@@ -31,21 +31,6 @@
:labelCol='labelCol'
:wrapperCol='wrapperCol'
>
-<!-- <j-dict-select-tag
- allow-clear
- :disabled='disableSubmit'
- :placeholder="disableSubmit?'':'璇烽�夋嫨棰嗙敤閮ㄩ棬'"
- :triggerChange='true'
- dictCode="sys_depart,depart_name,id,del_flag!='1'"
- v-decorator="['departId', validatorRules.departId]"
- />-->
-<!-- <a-select
- :placeholder="'璇烽�夋嫨棰嗙敤閮ㄩ棬'"
- :options="this.departs"
- :disabled="disableSubmit"
- style="width: 100%"
- v-model='model.departId'
- />-->
<a-tree-select
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -343,9 +328,6 @@
model: data[i].model,
mainUnitId: data[i].mainUnitId,
mainUnitName: data[i].mainUnitName,
- /* auxiliaryUnitId: data[i].auxiliaryUnitId,
- auxiliaryUnitName: data[i].auxiliaryUnitName, */
- /* conversionRatio: data[i].conversionRatio, */
constructorId: data[i].constructorId,
constructorName: data[i].constructorName,
supplierId: data[i].supplierId,
diff --git a/src/views/spare/modules/sparePartInventory/SparePart2List.vue b/src/views/spare/modules/sparePartInventory/SparePart2List.vue
index 2e9e217..b6fae00 100644
--- a/src/views/spare/modules/sparePartInventory/SparePart2List.vue
+++ b/src/views/spare/modules/sparePartInventory/SparePart2List.vue
@@ -58,6 +58,15 @@
@click="searchReset"
icon="reload"
>閲嶇疆</a-button>
+ <a-upload
+ name="file"
+ :showUploadList="false"
+ :multiple="false"
+ :headers="tokenHeader"
+ :action="importExcelUrl"
+ @change="handleImportExcel">
+ <a-button type="primary" icon="import">瀵煎叆</a-button>
+ </a-upload>
</div>
<a-table
@@ -231,6 +240,7 @@
],
url: {
list: "/spare/sparePart/sparePartInventoryList",
+ importExcelUrl:'/spare/SparesPartInventory/importExcel'
},
//鏂板銆佺紪杈戙�佸垹闄ゃ�佹壒閲忓垹闄ゆ搷浣滄敼鍙樻暟鎹悗鍒锋柊鍏宠仈鐨勭粍浠剁殑鐩戝惉灞炴��
alterFlag: "",
@@ -278,7 +288,7 @@
}else if(record.totalMainQuantity > record.inventoryUpperLimit){
return 'yellow'
}
-
+
},
searchReset() {
this.queryParam = {};
--
Gitblit v1.9.3