|
@@ -21,9 +21,10 @@
|
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
|
|
|
-import { materialNormList, materialNormListExport, materialNormAdd, materialNormEdit, materialNormDetail, materialNormBatchUpdateStatus } from "@/api/auxiliaryChargeManagement";
|
|
|
+import { materialNormList, materialNormListExport, materialNormAdd, materialNormEdit, materialNormDetail, materialNormBatchUpdateStatus, materialNormImport2, materialNormImport } from "@/api/auxiliaryChargeManagement";
|
|
|
import { materialCategoryTree } from "@/api/auxiliaryMaterialClass";
|
|
|
import { getTypeList } from "@/api/auxiliaryFittings/attachmentProfile";
|
|
|
+import { commonTemplateDownload } from '@/api/common.js'
|
|
|
export default {
|
|
|
components: { TemplatePage },
|
|
|
mixins: [import_mixin],
|
|
@@ -39,6 +40,60 @@ export default {
|
|
|
click: this.addData
|
|
|
}
|
|
|
],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '导入物料',
|
|
|
+ click: () => { }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '导入物料收费',
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(materialNormImport, '导入物料收费')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '下载物料收费模板',
|
|
|
+ click: () => {
|
|
|
+ commonTemplateDownload({ name: '辅材收费标准模板(物料收费).xlsx' }, `辅材收费标准模板(物料收费)`)
|
|
|
+ .then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '下载成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('下载失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '导入服务',
|
|
|
+ click: () => { }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '导入服务收费',
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(materialNormImport2, '导入服务收费')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '下载服务收费模板',
|
|
|
+ click: () => {
|
|
|
+ commonTemplateDownload({ name: '辅材收费标准模板(服务收费).xlsx' }, `辅材收费标准模板(服务收费)`)
|
|
|
+ .then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '下载成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('下载失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ],
|
|
|
],
|
|
|
[
|
|
|
[
|
|
@@ -377,7 +432,7 @@ export default {
|
|
|
openForm() {
|
|
|
Promise.all([
|
|
|
getTypeList({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.dict_type", "compare": "=", "value": `ASSIST_UNIT` }, { "param": "a.status", "compare": "=", "value": "ON" }] }),
|
|
|
- materialCategoryTree({state:"ON"})
|
|
|
+ materialCategoryTree({ state: "ON" })
|
|
|
]).then(([res1, res2]) => {
|
|
|
this.partsUnitList = res1.data.records
|
|
|
this.materialCategoryTree = res2.data.filter(item => (item.child && item.child.length > 0))
|