|
|
@@ -3,22 +3,14 @@
|
|
|
<div class="grid-container">
|
|
|
<div class="grid-item-row1-column1">
|
|
|
<div class="btn-group m-panel" role="group">
|
|
|
- <button
|
|
|
- type="button"
|
|
|
- class="btn btn-success"
|
|
|
- @click="getAssetInstance(false)"
|
|
|
- >
|
|
|
+ <button type="button" class="btn btn-success" @click="getAssetInstance(false)">
|
|
|
{{ $t('lang.AssetInventorySearch.query') }}
|
|
|
</button>
|
|
|
|
|
|
<!-- <button type="button" class="btn btn-info" @click="generateAssetInventoryLine">
|
|
|
加入盘点清单(已选择:{{ checkedIds.length }})
|
|
|
</button> -->
|
|
|
- <button
|
|
|
- type="button"
|
|
|
- class="btn btn-info"
|
|
|
- @click="openAssetInventoryLine"
|
|
|
- >
|
|
|
+ <button type="button" class="btn btn-info" @click="openAssetInventoryLine">
|
|
|
查看盘点清单(已选择:{{ assetInstancesTempory.length }})
|
|
|
</button>
|
|
|
<button type="button" class="btn btn-danger" @click="clearFilter">
|
|
|
@@ -54,126 +46,83 @@
|
|
|
<a-button type="primary" style="height: 33.5px; margin-left: 30px" @click="showModal">上传</a-button>
|
|
|
</a-form-item>
|
|
|
</div>
|
|
|
- <a-modal
|
|
|
- v-model:visible="visible" title="上传盘点资产数据" ok-text="确认" cancel-text="取消"
|
|
|
- @ok="handleOk"
|
|
|
- >
|
|
|
+ <a-modal v-model:visible="visible" title="上传盘点资产数据" ok-text="确认" cancel-text="取消" @ok="handleOk">
|
|
|
<p>1、请点击【下载】按钮,下载所有的资产数据。</p>
|
|
|
<a-button style="height: 33.5px" type="primary" @click="downloadFile">
|
|
|
下载
|
|
|
</a-button>
|
|
|
<p>2、使用Excel打开下载的数据,删除不要盘点的数据,保存Excel。</p>
|
|
|
<p>3、点击上传按钮,上传数据。</p>
|
|
|
- <a-upload
|
|
|
- v-model:file-list="fileList"
|
|
|
- :show-upload-list="false"
|
|
|
- :before-upload="beforeUpload"
|
|
|
- @change="uploadFileChange"
|
|
|
- >
|
|
|
+ <a-upload v-model:file-list="fileList" :show-upload-list="false" :before-upload="beforeUpload" @change="uploadFileChange">
|
|
|
<a-button type="primary" style="height: 33.5px"> 上传</a-button>
|
|
|
</a-upload>
|
|
|
</a-modal>
|
|
|
<div class="grid-item-row3-column1">
|
|
|
<div>
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 1 ? (type = 0) : (type = 1)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 1 ? (type = 0) : (type = 1)">
|
|
|
{{ $t('lang.AssetInventorySearch.ownerDepartment') }}
|
|
|
</div>
|
|
|
<div v-show="type == 1" class="panel-body">
|
|
|
- <ClientOrganizationTree
|
|
|
- ref="organization"
|
|
|
- :ids="assetInventoryOrganizationIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <ClientOrganizationTree ref="organization" :ids="assetInventoryOrganizationIds" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 3 ? (type = 0) : (type = 3)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 3 ? (type = 0) : (type = 3)">
|
|
|
{{ $t('lang.AssetInventorySearch.useDepartment') }}
|
|
|
</div>
|
|
|
<div v-show="type == 3" class="panel-body">
|
|
|
- <ClientOrganizationTree
|
|
|
- ref="responseOrganization"
|
|
|
- :ids="assetInventoryResponseOrganizationIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <ClientOrganizationTree ref="responseOrganization" :ids="assetInventoryResponseOrganizationIds" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 2 ? (type = 0) : (type = 2)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 2 ? (type = 0) : (type = 2)">
|
|
|
{{ $t('lang.AssetInventorySearch.category') }}
|
|
|
</div>
|
|
|
<div v-show="type == 2" class="panel-body">
|
|
|
<div>
|
|
|
- <AssetCategoryTree
|
|
|
- ref="assetCategory"
|
|
|
- :ids="assetInventoryCategoryIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <AssetCategoryTree ref="assetCategory" :ids="assetInventoryCategoryIds" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 4 ? (type = 0) : (type = 4)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 4 ? (type = 0) : (type = 4)">
|
|
|
{{ $t('lang.AssetInventorySearch.project') }}
|
|
|
</div>
|
|
|
<div v-show="type == 4" class="panel-body">
|
|
|
<div>
|
|
|
- <ProjectItemTree
|
|
|
- ref="projectItem"
|
|
|
- :ids="assetInventoryProjectItemIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <ProjectItemTree ref="projectItem" :ids="assetInventoryProjectItemIds" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 6 ? (type = 0) : (type = 6)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 6 ? (type = 0) : (type = 6)">
|
|
|
其他筛选条件
|
|
|
</div>
|
|
|
<div v-show="type == 6" class="panel-body">
|
|
|
<div>资产价值</div>
|
|
|
<div>
|
|
|
<input
|
|
|
- v-model="filter.orginalValue1"
|
|
|
- style="
|
|
|
+ v-model="filter.orginalValue1" style="
|
|
|
width: 120px;
|
|
|
border: 1px solid #ccc;
|
|
|
border-radius: 4px;
|
|
|
"
|
|
|
- autocomplete="off"
|
|
|
- type="number"
|
|
|
+ autocomplete="off" type="number"
|
|
|
/>
|
|
|
<label class="control-label">~</label>
|
|
|
<input
|
|
|
- v-model="filter.orginalValue2"
|
|
|
- style="
|
|
|
+ v-model="filter.orginalValue2" style="
|
|
|
width: 120px;
|
|
|
border: 1px solid #ccc;
|
|
|
border-radius: 4px;
|
|
|
"
|
|
|
- autocomplete="off"
|
|
|
- type="number"
|
|
|
+ autocomplete="off" type="number"
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
@@ -201,43 +150,38 @@
|
|
|
</div> -->
|
|
|
<div>责任人</div>
|
|
|
<SearchWidget
|
|
|
- :info-window-no="userWindowNo"
|
|
|
- :field="custodianNameField"
|
|
|
- :field-value="custodianNameFieldValue"
|
|
|
- :display-name="custodianNameField.listDisplayFieldName"
|
|
|
- :where-clause-source="custodianIdWhereClauseSource"
|
|
|
+ :info-window-no="userWindowNo" :field="custodianNameField" :field-value="custodianNameFieldValue"
|
|
|
+ :display-name="custodianNameField.listDisplayFieldName" :where-clause-source="custodianIdWhereClauseSource"
|
|
|
@value-changed="custodianNameValueChanged"
|
|
|
/>
|
|
|
<div>保管人</div>
|
|
|
<SearchWidget
|
|
|
- :info-window-no="userWindowNo"
|
|
|
- :field="userField"
|
|
|
- :field-value="userFieldValue"
|
|
|
- :display-name="userField.listDisplayFieldName"
|
|
|
- :where-clause-source="userIdWhereClauseSource"
|
|
|
- @value-changed="userValueChanged"
|
|
|
+ :info-window-no="userWindowNo" :field="userField" :field-value="userFieldValue" :display-name="userField.listDisplayFieldName"
|
|
|
+ :where-clause-source="userIdWhereClauseSource" @value-changed="userValueChanged"
|
|
|
/>
|
|
|
|
|
|
<div>放置位置</div>
|
|
|
- <SearchWidget
|
|
|
+ <!-- <SearchWidget
|
|
|
:info-window-no="locationWindowNo"
|
|
|
:field="locationField"
|
|
|
:field-value="locationFieldValue"
|
|
|
:display-name="locationField.listDisplayFieldName"
|
|
|
:where-clause-source="whereClauseSource"
|
|
|
@value-changed="locationValueChanged"
|
|
|
+ /> -->
|
|
|
+ <a-select
|
|
|
+ v-model:value="filter.locationIds" mode="multiple" style="width: 100%" :filter-option="filterOption"
|
|
|
+ :options="locationData" @change="fetchLocation"
|
|
|
/>
|
|
|
<div>图号</div>
|
|
|
<input
|
|
|
- v-model="filter.selfNo"
|
|
|
- style="
|
|
|
+ v-model="filter.selfNo" style="
|
|
|
width: 250px;
|
|
|
height: 32px;
|
|
|
border: 1px solid #ccc;
|
|
|
border-radius: 4px;
|
|
|
"
|
|
|
- autocomplete="off"
|
|
|
- @input="selfNoChange"
|
|
|
+ autocomplete="off" @input="selfNoChange"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -251,12 +195,7 @@
|
|
|
{{ $t("lang.AssetInventorySearch.serialNumber") }}
|
|
|
</th>-->
|
|
|
<th style="width: 50px">
|
|
|
- <input
|
|
|
- autocomplete="off"
|
|
|
- type="checkbox"
|
|
|
- :checked="allChecked"
|
|
|
- @click="isAllChecked()"
|
|
|
- />
|
|
|
+ <input autocomplete="off" type="checkbox" :checked="allChecked" @click="isAllChecked()" />
|
|
|
</th>
|
|
|
<th style="width: 130px">
|
|
|
{{ $t('lang.AssetInventorySearch.ownerClient') }}
|
|
|
@@ -330,11 +269,7 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr
|
|
|
- v-for="assetInstance in assetInstances"
|
|
|
- :key="assetInstance.id"
|
|
|
- @dblclick="openCurdWindow(assetInstance)"
|
|
|
- >
|
|
|
+ <tr v-for="assetInstance in assetInstances" :key="assetInstance.id" @dblclick="openCurdWindow(assetInstance)">
|
|
|
<!-- <td>
|
|
|
{{
|
|
|
index +
|
|
|
@@ -345,11 +280,7 @@
|
|
|
</td>-->
|
|
|
<td>
|
|
|
<input
|
|
|
- id="assetInstance.id"
|
|
|
- v-model="assetInstance.checked"
|
|
|
- autocomplete="off"
|
|
|
- type="checkbox"
|
|
|
- :value="assetInstance"
|
|
|
+ id="assetInstance.id" v-model="assetInstance.checked" autocomplete="off" type="checkbox" :value="assetInstance"
|
|
|
@change="checkedChange(assetInstance)"
|
|
|
/>
|
|
|
</td>
|
|
|
@@ -407,10 +338,7 @@
|
|
|
<span>{{ $t('lang.AssetInventorySearch.strip') }}</span>
|
|
|
</div>
|
|
|
<div class="pull-right">
|
|
|
- <VueBootstrapPagination
|
|
|
- :pagination="pagination"
|
|
|
- :callback="pageStartChanged"
|
|
|
- />
|
|
|
+ <VueBootstrapPagination :pagination="pagination" :callback="pageStartChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -481,7 +409,7 @@
|
|
|
<th style="width: 60px">
|
|
|
{{ $t('lang.AssetInventorySearch.operation') }}
|
|
|
</th>
|
|
|
- <!-- <th style="width: 130px">
|
|
|
+ <!-- <th style="width: 130px">
|
|
|
{{ $t("lang.AssetInventorySearch.subordinateToTheProject") }}
|
|
|
</th>
|
|
|
<th style="width: 90px">
|
|
|
@@ -520,10 +448,7 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr
|
|
|
- v-for="assetInstance in assetInstancesTempory"
|
|
|
- :key="assetInstance.id"
|
|
|
- >
|
|
|
+ <tr v-for="assetInstance in assetInstancesTempory" :key="assetInstance.id">
|
|
|
<!-- <td>
|
|
|
{{
|
|
|
index +
|
|
|
@@ -545,15 +470,11 @@
|
|
|
<!-- <td>{{ assetInstance.type }}</td> -->
|
|
|
<td>{{ assetInstance.categoryName }}</td>
|
|
|
<td>
|
|
|
- <button
|
|
|
- type="button"
|
|
|
- class="btn btn-danger"
|
|
|
- @click="deleteCountList(assetInstance.id)"
|
|
|
- >
|
|
|
+ <button type="button" class="btn btn-danger" @click="deleteCountList(assetInstance.id)">
|
|
|
{{ $t('lang.AssetInventorySearch.delete') }}
|
|
|
</button>
|
|
|
</td>
|
|
|
- <!-- <td>{{ assetInstance.projectItemName }}</td>
|
|
|
+ <!-- <td>{{ assetInstance.projectItemName }}</td>
|
|
|
<td>{{ assetInstance.orginalValue }}</td>
|
|
|
<td>{{ assetInstance.savePosition }}</td>
|
|
|
<td>{{ assetInstance.locationName }}</td>
|
|
|
@@ -583,8 +504,14 @@ import AssetInventoryLineResource from '../../api/asset/AssetInventoryLineResour
|
|
|
import ClientOrganizationTree from '../../widget/ClientOrganizationTree.vue';
|
|
|
import ProjectItemTree from '../../widget/ProjectItemTree.vue';
|
|
|
import AssetCategoryTree from '../../widget/AssetCategoryTree.vue';
|
|
|
-import {Notify, Uuid} from 'pc-component-v3';
|
|
|
-import {message} from 'ant-design-vue';
|
|
|
+import {
|
|
|
+ Notify,
|
|
|
+ Uuid,
|
|
|
+ SqlApi,
|
|
|
+} from 'pc-component-v3';
|
|
|
+import {
|
|
|
+ message,
|
|
|
+} from 'ant-design-vue';
|
|
|
|
|
|
|
|
|
export default {
|
|
|
@@ -599,7 +526,7 @@ export default {
|
|
|
// 定义抛出的事件名称
|
|
|
emits: ['previous', 'next'],
|
|
|
|
|
|
- data: function () {
|
|
|
+ data: function() {
|
|
|
return {
|
|
|
visible: false, //模态框状态
|
|
|
clientOrganizations: [], // 所属部门
|
|
|
@@ -617,7 +544,9 @@ export default {
|
|
|
selfNo: null,
|
|
|
custodianId: null,
|
|
|
depositoryUserId: null,
|
|
|
+ locationIds: [],
|
|
|
},
|
|
|
+ locationData: [],
|
|
|
additionalHql: '',
|
|
|
pagination: {
|
|
|
total: 0,
|
|
|
@@ -645,13 +574,11 @@ export default {
|
|
|
fieldType: 'Key',
|
|
|
},
|
|
|
whereClauseSource: {
|
|
|
- customerDataDimensions: [
|
|
|
- {
|
|
|
- fieldName: 'ar.client.id',
|
|
|
- dataDimensionTypeNo: '202201191757',
|
|
|
- defaultDataDimensionTypeValueNo: '1',
|
|
|
- },
|
|
|
- ],
|
|
|
+ customerDataDimensions: [{
|
|
|
+ fieldName: 'ar.client.id',
|
|
|
+ dataDimensionTypeNo: '202201191757',
|
|
|
+ defaultDataDimensionTypeValueNo: '1',
|
|
|
+ }],
|
|
|
},
|
|
|
userWindowNo: '050408',
|
|
|
userField: {
|
|
|
@@ -673,22 +600,18 @@ export default {
|
|
|
fieldType: 'Key',
|
|
|
},
|
|
|
userIdWhereClauseSource: {
|
|
|
- customerDataDimensions: [
|
|
|
- {
|
|
|
- fieldName: 'client.id',
|
|
|
- dataDimensionTypeNo: '202201191757',
|
|
|
- defaultDataDimensionTypeValueNo: '4',
|
|
|
- },
|
|
|
- ],
|
|
|
+ customerDataDimensions: [{
|
|
|
+ fieldName: 'client.id',
|
|
|
+ dataDimensionTypeNo: '202201191757',
|
|
|
+ defaultDataDimensionTypeValueNo: '4',
|
|
|
+ }],
|
|
|
},
|
|
|
custodianIdWhereClauseSource: {
|
|
|
- customerDataDimensions: [
|
|
|
- {
|
|
|
- fieldName: 'client.id',
|
|
|
- dataDimensionTypeNo: '202201191757',
|
|
|
- defaultDataDimensionTypeValueNo: '4',
|
|
|
- },
|
|
|
- ],
|
|
|
+ customerDataDimensions: [{
|
|
|
+ fieldName: 'client.id',
|
|
|
+ dataDimensionTypeNo: '202201191757',
|
|
|
+ defaultDataDimensionTypeValueNo: '4',
|
|
|
+ }],
|
|
|
},
|
|
|
checkedIds: [],
|
|
|
loading: false,
|
|
|
@@ -700,11 +623,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
- allChecked: function () {
|
|
|
+ allChecked: function() {
|
|
|
for (
|
|
|
- let index = 0, size = this.assetInstances.length;
|
|
|
- index < size;
|
|
|
- index++
|
|
|
+ let index = 0, size = this.assetInstances.length; index < size; index++
|
|
|
) {
|
|
|
if (this.checkedIds.indexOf(this.assetInstances[index].id) < 0) {
|
|
|
return false;
|
|
|
@@ -714,21 +635,47 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
|
|
|
- mounted: function () {
|
|
|
+ mounted: function() {
|
|
|
var _self = this;
|
|
|
|
|
|
_self.getAssetInventory();
|
|
|
+ _self.getLocation();
|
|
|
// 固定行
|
|
|
_self.fixedTableHeader();
|
|
|
|
|
|
// 可调整表格列宽
|
|
|
- _self.$nextTick(function () {
|
|
|
+ _self.$nextTick(function() {
|
|
|
$('.fixed-table').resizableColumns();
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ filterOption: function(input, option) {
|
|
|
+ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
|
+ },
|
|
|
+ //获取当前登录人所在公司的放置位置
|
|
|
+ getLocation: function() {
|
|
|
+ var _self = this;
|
|
|
+ SqlApi.execute('20240418_161742').then(
|
|
|
+ successData => {
|
|
|
+ // console.log(successData);
|
|
|
+ if (successData.errorCode === 0) {
|
|
|
+ console.log(successData);
|
|
|
+ successData.dataList.forEach(function(item) {
|
|
|
+ var tempary = {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ _self.locationData.push(tempary);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ errorData => {
|
|
|
+ Common.processException(errorData);
|
|
|
+ },
|
|
|
+ );
|
|
|
+ },
|
|
|
// 下载文件
|
|
|
- downloadFile: function () {
|
|
|
+ downloadFile: function() {
|
|
|
const loginInfo = JSON.parse(localStorage.getItem('#LoginInfo'));
|
|
|
const envClientId = loginInfo.loginClientId;
|
|
|
$.ajax({
|
|
|
@@ -739,10 +686,10 @@ export default {
|
|
|
xhrFields: {
|
|
|
responseType: 'blob',
|
|
|
},
|
|
|
- beforeSend: function (request) {
|
|
|
+ beforeSend: function(request) {
|
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
|
- success: function (data) {
|
|
|
+ success: function(data) {
|
|
|
const blobUrl = window.URL.createObjectURL(data);
|
|
|
const link = document.createElement('a');
|
|
|
link.href = blobUrl;
|
|
|
@@ -753,13 +700,15 @@ export default {
|
|
|
URL.revokeObjectURL(blobUrl);
|
|
|
document.body.removeChild(link);
|
|
|
},
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
// 上传文件事件
|
|
|
- uploadFileChange: function ({file}) {
|
|
|
+ uploadFileChange: function({
|
|
|
+ file,
|
|
|
+ }) {
|
|
|
const _self = this;
|
|
|
const formData = new FormData();
|
|
|
formData.append('file', file);
|
|
|
@@ -768,13 +717,17 @@ export default {
|
|
|
'AssetInstanceResource/assetInstanceLedgerUpload',
|
|
|
),
|
|
|
type: 'post',
|
|
|
- beforeSend: function (request) {
|
|
|
+ beforeSend: function(request) {
|
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
|
data: formData,
|
|
|
contentType: false,
|
|
|
processData: false,
|
|
|
- success: function ({errorCode, datas,errorMessage}) {
|
|
|
+ success: function({
|
|
|
+ errorCode,
|
|
|
+ datas,
|
|
|
+ errorMessage,
|
|
|
+ }) {
|
|
|
if (errorCode === 0) {
|
|
|
if (datas) {
|
|
|
datas.forEach(item => {
|
|
|
@@ -791,7 +744,7 @@ export default {
|
|
|
}
|
|
|
_self.loading = false;
|
|
|
},
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
_self.loading = false;
|
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
},
|
|
|
@@ -799,22 +752,29 @@ export default {
|
|
|
},
|
|
|
|
|
|
//开启上传资产数据模态框
|
|
|
- showModal: function () {
|
|
|
+ showModal: function() {
|
|
|
const _self = this;
|
|
|
_self.visible = true;
|
|
|
},
|
|
|
//关闭上传资产数据模态框
|
|
|
- handleOk: function () {
|
|
|
+ handleOk: function() {
|
|
|
const _self = this;
|
|
|
_self.visible = false;
|
|
|
},
|
|
|
|
|
|
+ //查询放置位置
|
|
|
+ fetchLocation: function() {
|
|
|
+ console.log('查询位置');
|
|
|
+ var _self = this;
|
|
|
+ console.log(_self.filter.locationIds);
|
|
|
+ },
|
|
|
+
|
|
|
// 取消默认上传
|
|
|
- beforeUpload: function () {
|
|
|
+ beforeUpload: function() {
|
|
|
return false;
|
|
|
},
|
|
|
// 选择责任人
|
|
|
- custodianNameValueChanged: function (newResponsibilityFieldValue) {
|
|
|
+ custodianNameValueChanged: function(newResponsibilityFieldValue) {
|
|
|
this.custodianNameFieldValue = newResponsibilityFieldValue;
|
|
|
if (this.custodianNameFieldValue != null) {
|
|
|
this.filter.custodianId = this.custodianNameFieldValue.id;
|
|
|
@@ -823,7 +783,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 选择责保管人
|
|
|
- userValueChanged: function (newResponsibilityFieldValue) {
|
|
|
+ userValueChanged: function(newResponsibilityFieldValue) {
|
|
|
this.userFieldValue = newResponsibilityFieldValue;
|
|
|
if (this.userFieldValue != null) {
|
|
|
this.filter.depositoryUserId = this.userFieldValue.id;
|
|
|
@@ -832,16 +792,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 自编号为null
|
|
|
- selfNoChange: function () {
|
|
|
+ selfNoChange: function() {
|
|
|
const _self = this;
|
|
|
if (_self.filter.selfNo == '') {
|
|
|
_self.filter.selfNo = null;
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
- * 删除已选择的盘点清单
|
|
|
- */
|
|
|
- deleteCountList: function (data) {
|
|
|
+ * 删除已选择的盘点清单
|
|
|
+ */
|
|
|
+ deleteCountList: function(data) {
|
|
|
var _self = this;
|
|
|
for (var i = 0; i < _self.assetInstancesTempory.length; i++) {
|
|
|
if (_self.assetInstancesTempory[i].id == data) {
|
|
|
@@ -858,25 +818,25 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
- * 查看已选择的盘点清单
|
|
|
- */
|
|
|
- openAssetInventoryLine: function () {
|
|
|
+ * 查看已选择的盘点清单
|
|
|
+ */
|
|
|
+ openAssetInventoryLine: function() {
|
|
|
var _self = this;
|
|
|
_self.modal1 = true;
|
|
|
},
|
|
|
- next: function () {
|
|
|
+ next: function() {
|
|
|
var _self = this;
|
|
|
if (
|
|
|
_self.inventorySheetName == null ||
|
|
|
- _self.inventorySheetName == undefined ||
|
|
|
- _self.inventorySheetName == ''
|
|
|
+ _self.inventorySheetName == undefined ||
|
|
|
+ _self.inventorySheetName == ''
|
|
|
) {
|
|
|
Notify.error('错误', '请填写盘点单名称', 1000);
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
|
_self.assetInstancesTempory == null ||
|
|
|
- _self.assetInstancesTempory.length < 1
|
|
|
+ _self.assetInstancesTempory.length < 1
|
|
|
) {
|
|
|
Notify.error('错误', '请至少选择一条盘点明细', 1000);
|
|
|
return;
|
|
|
@@ -898,7 +858,7 @@ export default {
|
|
|
this.$emit('next', data);
|
|
|
},
|
|
|
|
|
|
- previous: function () {
|
|
|
+ previous: function() {
|
|
|
var data = {
|
|
|
currentStep: 0,
|
|
|
showPage: 0,
|
|
|
@@ -907,11 +867,11 @@ export default {
|
|
|
this.$emit('previous', data);
|
|
|
},
|
|
|
/**
|
|
|
- * 查询盘点单DTO,
|
|
|
- * 主要是获取资产盘点中的所属部门集合、使用部门集合、资产类别结合。
|
|
|
- * @author yangzhijie 20200806
|
|
|
- */
|
|
|
- getAssetInventory: function () {
|
|
|
+ * 查询盘点单DTO,
|
|
|
+ * 主要是获取资产盘点中的所属部门集合、使用部门集合、资产类别结合。
|
|
|
+ * @author yangzhijie 20200806
|
|
|
+ */
|
|
|
+ getAssetInventory: function() {
|
|
|
var _self = this;
|
|
|
|
|
|
AssetInventoryResource.getOrganizationsAndOrganizationsAndCategory().then(
|
|
|
@@ -919,7 +879,7 @@ export default {
|
|
|
_self.assetInventoryOrganizationIds = data.organizationIds;
|
|
|
|
|
|
_self.assetInventoryResponseOrganizationIds =
|
|
|
- data.responseOrganizationIds;
|
|
|
+ data.responseOrganizationIds;
|
|
|
|
|
|
_self.assetInventoryCategoryIds = data.categoryIds;
|
|
|
|
|
|
@@ -949,12 +909,12 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
/**
|
|
|
- * 执行全选/全不选
|
|
|
- */
|
|
|
- isAllChecked: function () {
|
|
|
+ * 执行全选/全不选
|
|
|
+ */
|
|
|
+ isAllChecked: function() {
|
|
|
var _self = this;
|
|
|
if (_self.allChecked == false) {
|
|
|
- _self.assetInstances.forEach(function (item) {
|
|
|
+ _self.assetInstances.forEach(function(item) {
|
|
|
if (!item.checked) {
|
|
|
item.checked = true;
|
|
|
_self.checkedIds.push(item.id);
|
|
|
@@ -962,7 +922,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- _self.assetInstances.forEach(function (item) {
|
|
|
+ _self.assetInstances.forEach(function(item) {
|
|
|
item.checked = false;
|
|
|
let index = _self.checkedIds.indexOf(item.id);
|
|
|
_self.checkedIds.splice(index, 1);
|
|
|
@@ -981,7 +941,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 单条checked改变更新清单和选择的id
|
|
|
- checkedChange: function (data) {
|
|
|
+ checkedChange: function(data) {
|
|
|
var _self = this;
|
|
|
if (data.checked) {
|
|
|
_self.assetInstancesTempory.push(data);
|
|
|
@@ -1003,9 +963,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 选择的房间发生了改变
|
|
|
- */
|
|
|
- locationValueChanged: function (newFieldValue) {
|
|
|
+ * 选择的房间发生了改变
|
|
|
+ */
|
|
|
+ locationValueChanged: function(newFieldValue) {
|
|
|
this.locationFieldValue = newFieldValue;
|
|
|
if (this.locationFieldValue != null) {
|
|
|
this.filter.locationId = this.locationFieldValue.id;
|
|
|
@@ -1014,16 +974,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- selectChanged: function () {
|
|
|
+ selectChanged: function() {
|
|
|
var _self = this;
|
|
|
_self.getAssetInstance(false);
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 根据界面选中的所属部门、使用部门、资产类别、项目查询资产清单
|
|
|
- * @author yangzhijie 20200806
|
|
|
- */
|
|
|
- getAssetInstance: function (isPageChange) {
|
|
|
+ * 根据界面选中的所属部门、使用部门、资产类别、项目查询资产清单
|
|
|
+ * @author yangzhijie 20200806
|
|
|
+ */
|
|
|
+ getAssetInstance: function(isPageChange) {
|
|
|
var _self = this;
|
|
|
|
|
|
if (!isPageChange) {
|
|
|
@@ -1034,7 +994,7 @@ export default {
|
|
|
var projectItemIds = _self.$refs.projectItem.getSelectedIds();
|
|
|
var organizationIds = _self.$refs.organization.getSelectedIds();
|
|
|
var responseOrganizationIds =
|
|
|
- _self.$refs.responseOrganization.getSelectedIds();
|
|
|
+ _self.$refs.responseOrganization.getSelectedIds();
|
|
|
var categoryIds = _self.$refs.assetCategory.getSelectedIds();
|
|
|
|
|
|
//_self.clearPageData();
|
|
|
@@ -1057,8 +1017,7 @@ export default {
|
|
|
projectItemIds: projectItemIds,
|
|
|
filter: _self.filter,
|
|
|
range: {
|
|
|
- start:
|
|
|
- (_self.pagination.current_page - 1) * _self.pagination.per_page,
|
|
|
+ start: (_self.pagination.current_page - 1) * _self.pagination.per_page,
|
|
|
length: _self.pagination.per_page,
|
|
|
},
|
|
|
inventoryStatus: 'RANDOM_STOCKTAKING',
|
|
|
@@ -1080,14 +1039,14 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 重新绘制资产卡片
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- redrawAssetInstance: function (data) {
|
|
|
+ * 重新绘制资产卡片
|
|
|
+ * @author YangZhiJie 20200806
|
|
|
+ */
|
|
|
+ redrawAssetInstance: function(data) {
|
|
|
var _self = this;
|
|
|
console.log(data);
|
|
|
_self.assetInstances = data.dataList;
|
|
|
- _self.assetInstances.forEach(function (item) {
|
|
|
+ _self.assetInstances.forEach(function(item) {
|
|
|
if (_self.checkedIds.indexOf(item.id) < 0) {
|
|
|
item.checked = false;
|
|
|
// _self.$set(item, 'checked', false);
|
|
|
@@ -1109,10 +1068,10 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 清空分页数据
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- clearPageData: function () {
|
|
|
+ * 清空分页数据
|
|
|
+ * @author YangZhiJie 20200806
|
|
|
+ */
|
|
|
+ clearPageData: function() {
|
|
|
var data = {
|
|
|
dataList: [],
|
|
|
totalSize: 0,
|
|
|
@@ -1128,11 +1087,11 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 清空界面的搜索条件
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- * @author XiongLiuJie 20211119
|
|
|
- */
|
|
|
- clearFilter: function () {
|
|
|
+ * 清空界面的搜索条件
|
|
|
+ * @author YangZhiJie 20200806
|
|
|
+ * @author XiongLiuJie 20211119
|
|
|
+ */
|
|
|
+ clearFilter: function() {
|
|
|
this.filter.orginalValue1 = null;
|
|
|
this.filter.orginalValue2 = null;
|
|
|
this.filter.assetDecrease = 0;
|
|
|
@@ -1142,6 +1101,7 @@ export default {
|
|
|
this.filter.custodianId = null;
|
|
|
this.filter.depositoryUserId = null;
|
|
|
this.filter.selfNo = null;
|
|
|
+ this.filter.locationIds = [];
|
|
|
(this.custodianNameFieldValue = {
|
|
|
id: null,
|
|
|
displayValue: [''],
|
|
|
@@ -1162,11 +1122,11 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 初始化数据
|
|
|
- * @author LeiGuoXian
|
|
|
- * @date 2020-09-15
|
|
|
- */
|
|
|
- initTreeData: function () {
|
|
|
+ * 初始化数据
|
|
|
+ * @author LeiGuoXian
|
|
|
+ * @date 2020-09-15
|
|
|
+ */
|
|
|
+ initTreeData: function() {
|
|
|
var _self = this;
|
|
|
_self.$refs.projectItem.initProjectItem1();
|
|
|
_self.$refs.organization.initClientOrganization1();
|
|
|
@@ -1175,29 +1135,29 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 表格显示行数发生改变
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- pageSizeChanged: function (newPageSize) {
|
|
|
+ * 表格显示行数发生改变
|
|
|
+ * @author YangZhiJie 20200806
|
|
|
+ */
|
|
|
+ pageSizeChanged: function(newPageSize) {
|
|
|
this.pagination.per_page = newPageSize;
|
|
|
this.pagination.current_page = 1;
|
|
|
this.getAssetInstance(true);
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 页数发生变化
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- pageStartChanged: function () {
|
|
|
+ * 页数发生变化
|
|
|
+ * @author YangZhiJie 20200806
|
|
|
+ */
|
|
|
+ pageStartChanged: function() {
|
|
|
this.getAssetInstance(true);
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 冻结表头
|
|
|
- */
|
|
|
- fixedTableHeader: function () {
|
|
|
+ * 冻结表头
|
|
|
+ */
|
|
|
+ fixedTableHeader: function() {
|
|
|
var _self = this;
|
|
|
- _self.$nextTick(function () {
|
|
|
+ _self.$nextTick(function() {
|
|
|
$('.fixed-table').tableFixer({
|
|
|
head: true,
|
|
|
});
|
|
|
@@ -1209,14 +1169,14 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 打开资产卡片的CURD窗口
|
|
|
- */
|
|
|
- openCurdWindow: function (assetInstance) {
|
|
|
+ * 打开资产卡片的CURD窗口
|
|
|
+ */
|
|
|
+ openCurdWindow: function(assetInstance) {
|
|
|
let url = Common.getRedirectUrl(
|
|
|
'#/desktop/window/window-read/view/040701/0/' +
|
|
|
- assetInstance.id +
|
|
|
- '?currPage=1&currIndex=1&totalCount=1&uuid=' +
|
|
|
- Uuid.createUUID(),
|
|
|
+ assetInstance.id +
|
|
|
+ '?currPage=1&currIndex=1&totalCount=1&uuid=' +
|
|
|
+ Uuid.createUUID(),
|
|
|
);
|
|
|
window.open(url, '资产卡片');
|
|
|
},
|
|
|
@@ -1225,103 +1185,104 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.grid-container {
|
|
|
- margin-top: 10px;
|
|
|
- display: grid;
|
|
|
- grid-template-columns: 300px auto;
|
|
|
- grid-template-rows: 35px 30px 1fr 40px;
|
|
|
- gap: 10px;
|
|
|
- justify-items: stretch;
|
|
|
- align-items: stretch;
|
|
|
- height: calc(100vh - 170px);
|
|
|
- overflow: auto;
|
|
|
-}
|
|
|
-
|
|
|
-.grid-item-row1-column1 {
|
|
|
- grid-row-start: 1;
|
|
|
- grid-row-end: 2;
|
|
|
- grid-column-start: 1;
|
|
|
- grid-column-end: 3;
|
|
|
-}
|
|
|
-
|
|
|
-.grid-item-row1-column2 {
|
|
|
- grid-row-start: 1;
|
|
|
- grid-row-end: 2;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
-}
|
|
|
-
|
|
|
-/* .grid-item-row2-column1 {
|
|
|
+ .grid-container {
|
|
|
+ margin-top: 10px;
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: 300px auto;
|
|
|
+ grid-template-rows: 35px 30px 1fr 40px;
|
|
|
+ gap: 10px;
|
|
|
+ justify-items: stretch;
|
|
|
+ align-items: stretch;
|
|
|
+ height: calc(100vh - 170px);
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .grid-item-row1-column1 {
|
|
|
+ grid-row-start: 1;
|
|
|
+ grid-row-end: 2;
|
|
|
+ grid-column-start: 1;
|
|
|
+ grid-column-end: 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ .grid-item-row1-column2 {
|
|
|
+ grid-row-start: 1;
|
|
|
+ grid-row-end: 2;
|
|
|
+ grid-column-start: 2;
|
|
|
+ grid-column-end: 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* .grid-item-row2-column1 {
|
|
|
grid-row-start: 2;
|
|
|
grid-row-end: 3;
|
|
|
grid-column-start: 1;
|
|
|
grid-column-end: 3;
|
|
|
}
|
|
|
*/
|
|
|
-.grid-item-row2-column2 {
|
|
|
- grid-row-start: 2;
|
|
|
- grid-row-end: 4;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
- overflow: auto;
|
|
|
-}
|
|
|
-
|
|
|
-.grid-item-row3-column1 {
|
|
|
- grid-row-start: 2;
|
|
|
- grid-row-end: 6;
|
|
|
- grid-column-start: 1;
|
|
|
- grid-column-end: 2;
|
|
|
- overflow: auto;
|
|
|
-}
|
|
|
-
|
|
|
-.grid-item-row3-column2 {
|
|
|
- grid-row-start: 4;
|
|
|
- grid-row-end: 5;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
-}
|
|
|
-
|
|
|
-.grid-item-row4-column2 {
|
|
|
- grid-row-start: 5;
|
|
|
- grid-row-end: 6;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
-}
|
|
|
-
|
|
|
-.grid-item-row5-column2 {
|
|
|
- grid-row-start: 6;
|
|
|
- grid-row-end: 7;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
-}
|
|
|
+ .grid-item-row2-column2 {
|
|
|
+ grid-row-start: 2;
|
|
|
+ grid-row-end: 4;
|
|
|
+ grid-column-start: 2;
|
|
|
+ grid-column-end: 3;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .grid-item-row3-column1 {
|
|
|
+ grid-row-start: 2;
|
|
|
+ grid-row-end: 6;
|
|
|
+ grid-column-start: 1;
|
|
|
+ grid-column-end: 2;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .grid-item-row3-column2 {
|
|
|
+ grid-row-start: 4;
|
|
|
+ grid-row-end: 5;
|
|
|
+ grid-column-start: 2;
|
|
|
+ grid-column-end: 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ .grid-item-row4-column2 {
|
|
|
+ grid-row-start: 5;
|
|
|
+ grid-row-end: 6;
|
|
|
+ grid-column-start: 2;
|
|
|
+ grid-column-end: 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ .grid-item-row5-column2 {
|
|
|
+ grid-row-start: 6;
|
|
|
+ grid-row-end: 7;
|
|
|
+ grid-column-start: 2;
|
|
|
+ grid-column-end: 3;
|
|
|
+ }
|
|
|
</style>
|
|
|
|
|
|
<style scoped>
|
|
|
-.m-grid-footer {
|
|
|
- padding: 10px;
|
|
|
-}
|
|
|
-
|
|
|
-.m-panel {
|
|
|
- margin-bottom: 0px;
|
|
|
-}
|
|
|
-
|
|
|
-.fixed-table {
|
|
|
- table-layout: fixed;
|
|
|
- width: 600px !important;
|
|
|
- min-width: 600px !important;
|
|
|
-}
|
|
|
-
|
|
|
-table.fixed-table tr {
|
|
|
- height: 40px;
|
|
|
-}
|
|
|
-
|
|
|
-table.fixed-table th,
|
|
|
-table.fixed-table td {
|
|
|
- overflow: hidden;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
-}
|
|
|
-:deep(.ant-form-item-control-input-content){
|
|
|
- display: flex;
|
|
|
-}
|
|
|
+ .m-grid-footer {
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .m-panel {
|
|
|
+ margin-bottom: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .fixed-table {
|
|
|
+ table-layout: fixed;
|
|
|
+ width: 600px !important;
|
|
|
+ min-width: 600px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ table.fixed-table tr {
|
|
|
+ height: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ table.fixed-table th,
|
|
|
+ table.fixed-table td {
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.ant-form-item-control-input-content) {
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
</style>
|