|
@@ -21,8 +21,8 @@
|
|
|
@row-click="rowClick"
|
|
|
size="mini"
|
|
|
row-key="id"
|
|
|
+ :row-class-name="rowClassName"
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
|
-
|
|
|
<el-table-column label="资产编号" prop="assetNumber" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="物品名称" prop="assetName" min-width="100" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="部门编号" prop="deptAssetNumber" :show-overflow-tooltip="true"/>
|
|
@@ -38,7 +38,7 @@
|
|
|
<el-table-column label="生产厂家" prop="factoryName" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="领用日期" prop="receiveDate">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{parseTime(scope.row.receiveDate)}}</span>
|
|
|
+ <span>{{ parseTime(scope.row.receiveDate) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="120">
|
|
@@ -56,8 +56,12 @@
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 资产详情对话框 -->
|
|
|
- <el-dialog title="资产详情" :visible.sync="detailOpen" width="800px" append-to-body :close-on-click-modal="false">
|
|
|
+ <el-dialog title="资产详情" :visible.sync="detailOpen" width="800px" append-to-body @close="cancel">
|
|
|
<asset-detail :form="form"></asset-detail>
|
|
|
+ <div v-if="confirmDialog" slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" size="mini" @click="submitConfirm">确 定</el-button>
|
|
|
+ <el-button size="mini" @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -75,6 +79,8 @@ export default {
|
|
|
queryParams: {},
|
|
|
assetList: [],
|
|
|
detailOpen: false,
|
|
|
+ confirmDialog: false,
|
|
|
+ toConfirmTransferId: undefined,
|
|
|
form: {}
|
|
|
}
|
|
|
},
|
|
@@ -99,11 +105,26 @@ export default {
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
handleConfirm(row) {
|
|
|
- confirmReceive(row.transferId).then(res => {
|
|
|
+ this.toConfirmTransferId = row.transferId
|
|
|
+ getAsset(row.id).then(res => {
|
|
|
+ this.form = res.data
|
|
|
+ this.confirmDialog = true
|
|
|
+ this.detailOpen = true;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submitConfirm() {
|
|
|
+ confirmReceive(this.toConfirmTransferId).then(res => {
|
|
|
this.$message.success("确认成功")
|
|
|
+ this.cancel();
|
|
|
this.getList();
|
|
|
})
|
|
|
},
|
|
|
+ cancel() {
|
|
|
+ this.form = {}
|
|
|
+ this.confirmDialog = false
|
|
|
+ this.detailOpen = false;
|
|
|
+ this.toConfirmTransferId = undefined
|
|
|
+ },
|
|
|
rowClick(row, column, event) {
|
|
|
if (column.label === '操作') {
|
|
|
return
|
|
@@ -113,10 +134,18 @@ export default {
|
|
|
this.detailOpen = true;
|
|
|
})
|
|
|
},
|
|
|
+ rowClassName({row, rowIndex}) {
|
|
|
+ if (row.receiveConfirm === '0') {
|
|
|
+ return 'warning-row';
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
+<style scoped lang="scss">
|
|
|
+.el-table::v-deep .warning-row {
|
|
|
+ background: #fef0f0;
|
|
|
+}
|
|
|
</style>
|