|
@@ -634,6 +634,21 @@
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div v-if="functionType == 1" class="form-group" style="margin-top: 12px">
|
|
|
|
|
+ <label>{{
|
|
|
|
|
+ $t(
|
|
|
|
|
+ "lang.assetBasicSetting.exampleImportAssetCategoriesConfiguredByTheSystem"
|
|
|
|
|
+ )
|
|
|
|
|
+ }}</label>
|
|
|
|
|
+ <div class="input-group">
|
|
|
|
|
+ <button class="btn btn-default" @click="importCommonAsset()">
|
|
|
|
|
+ {{ $t("lang.assetBasicSetting.importCommonAssetsByCategory") }}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <button class="btn btn-default" @click="importDetailAsset()">
|
|
|
|
|
+ {{ $t("lang.assetBasicSetting.importDetailedAssetsByCategory") }}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<Loading v-if="loading" />
|
|
<Loading v-if="loading" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -645,8 +660,10 @@ import ImageEditor from '../widget/ImageEditor.vue';
|
|
|
import LoginContextResource from '../api/base/LoginContextResource.js';
|
|
import LoginContextResource from '../api/base/LoginContextResource.js';
|
|
|
import AssetConfigResource from '../api/asset/AssetConfigResource.js';
|
|
import AssetConfigResource from '../api/asset/AssetConfigResource.js';
|
|
|
import AssetInstanceResource from '../api/asset/AssetInstanceResource.js';
|
|
import AssetInstanceResource from '../api/asset/AssetInstanceResource.js';
|
|
|
|
|
+import CategoryImportResource from '../api/asset/CategoryImportResource.js';
|
|
|
import DepreciationMethodResource from '../api/asset/DepreciationMethodResource.js';
|
|
import DepreciationMethodResource from '../api/asset/DepreciationMethodResource.js';
|
|
|
import { Notify } from 'pc-component-v3';
|
|
import { Notify } from 'pc-component-v3';
|
|
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -687,6 +704,45 @@ export default {
|
|
|
_self.functionType = pageNo;
|
|
_self.functionType = pageNo;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ importCommonAsset: function () {
|
|
|
|
|
+ var _self = this;
|
|
|
|
|
+ _self.loading = true;
|
|
|
|
|
+ CategoryImportResource.importSimpleCategory().then(
|
|
|
|
|
+ successData => {
|
|
|
|
|
+ if (successData.errorCode == 0) {
|
|
|
|
|
+ message.success('通用资产分类导入成功。');
|
|
|
|
|
+ _self.loading = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ message.error(successData.errorMessage);
|
|
|
|
|
+ _self.loading = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ errorData => {
|
|
|
|
|
+ Common.processException(errorData);
|
|
|
|
|
+ _self.loading = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ importDetailAsset: function () {
|
|
|
|
|
+ var _self = this;
|
|
|
|
|
+ _self.loading = true;
|
|
|
|
|
+ CategoryImportResource.importDetailsCategory().then(
|
|
|
|
|
+ successData => {
|
|
|
|
|
+ if (successData.errorCode == 0) {
|
|
|
|
|
+ message.success('明细资产分类导入成功。');
|
|
|
|
|
+ _self.loading = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ message.error(successData.errorMessage);
|
|
|
|
|
+ _self.loading = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ errorData => {
|
|
|
|
|
+ Common.processException(errorData);
|
|
|
|
|
+ _self.loading = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查找账套相关信息
|
|
* 查找账套相关信息
|
|
|
* @return {[type]} [description]
|
|
* @return {[type]} [description]
|