|
@@ -10,22 +10,42 @@ import { required, mobileRequired, mobile } from '@/components/template/rules_ve
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- // 事件组合
|
|
|
- optionsEvensGroup: [
|
|
|
+ // 表格属性
|
|
|
+ tableAttributes: {
|
|
|
+ // 启用勾选列
|
|
|
+ selectColumn: false
|
|
|
+ },
|
|
|
+ // 表格事件
|
|
|
+ tableEvents: {
|
|
|
+ 'selection-change': this.selectionChange
|
|
|
+ },
|
|
|
+ recordSelected: [],
|
|
|
+ formDialog: false,
|
|
|
+ formDialogType: 0, // 0:新增, 1:编辑, 2:查看, 3:审核
|
|
|
+ formDialogTitles: ['新增', '编辑', '查看', '审核'],
|
|
|
+ pageType: this?.$route?.name,
|
|
|
+ materialCategoryListL1: [],
|
|
|
+ materialCategoryListL2: [],
|
|
|
+ materialNormList: [],
|
|
|
+ peijianList: [],
|
|
|
+ websitPurchaseInList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // 事件组合
|
|
|
+ optionsEvensGroup(){
|
|
|
+ return [
|
|
|
[
|
|
|
[
|
|
|
- {
|
|
|
- name: '新建',
|
|
|
- isRole: true,
|
|
|
+ this.optionsEvensAuth("add", {
|
|
|
click: this.addData
|
|
|
- }
|
|
|
+ }),
|
|
|
],
|
|
|
],
|
|
|
[
|
|
|
[
|
|
|
- {
|
|
|
+ this.optionsEvensAuth("template", {
|
|
|
isRole: !!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this?.$route?.name),
|
|
|
- name: '采购入库模板',
|
|
|
click: () => {
|
|
|
commonTemplateDownload({ name: '采购入库模板.xlsx' }, `${this.$route.meta.title}`)
|
|
|
.then(res => {
|
|
@@ -38,23 +58,24 @@ export default {
|
|
|
this.$message.error('下载失败')
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ }),
|
|
|
],
|
|
|
[
|
|
|
- {
|
|
|
- isRole: !!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this?.$route?.name),
|
|
|
- name: '导入模板',
|
|
|
- render: () => {
|
|
|
- return this.importButton(websitPurchaseInImport, '导入模板', { goodsType: this.storageType })
|
|
|
+ this.optionsEvensAuth("imp", ({ moduleName }) => {
|
|
|
+ return {
|
|
|
+ isRole: !!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this?.$route?.name),
|
|
|
+ name: moduleName,
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(websitPurchaseInImport, moduleName, { goodsType: this.storageType })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ }),
|
|
|
],
|
|
|
],
|
|
|
[
|
|
|
[
|
|
|
- {
|
|
|
+ this.optionsEvensAuth("template", {
|
|
|
isRole: !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this?.$route?.name),
|
|
|
- name: '采购退货模板',
|
|
|
click: () => {
|
|
|
commonTemplateDownload({ name: '采购退货模板.xlsx' }, `${this.$route.meta.title}`)
|
|
|
.then(res => {
|
|
@@ -67,41 +88,22 @@ export default {
|
|
|
this.$message.error('下载失败')
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ }),
|
|
|
],
|
|
|
[
|
|
|
- {
|
|
|
- isRole: !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this?.$route?.name),
|
|
|
- name: '导入模板',
|
|
|
- render: () => {
|
|
|
- return this.importButton(websitPurchaseRetImport, '导入模板', { goodsType: this.storageType })
|
|
|
+ this.optionsEvensAuth("imp", ({ moduleName }) => {
|
|
|
+ return {
|
|
|
+ isRole: !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this?.$route?.name),
|
|
|
+ name: moduleName,
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(websitPurchaseRetImport, moduleName, { goodsType: this.storageType })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ }),
|
|
|
],
|
|
|
],
|
|
|
- ],
|
|
|
- // 表格属性
|
|
|
- tableAttributes: {
|
|
|
- // 启用勾选列
|
|
|
- selectColumn: false
|
|
|
- },
|
|
|
- // 表格事件
|
|
|
- tableEvents: {
|
|
|
- 'selection-change': this.selectionChange
|
|
|
- },
|
|
|
- recordSelected: [],
|
|
|
- formDialog: false,
|
|
|
- formDialogType: 0, // 0:新增, 1:编辑, 2:查看, 3:审核
|
|
|
- formDialogTitles: ['新增', '编辑', '查看', '审核'],
|
|
|
- pageType: this?.$route?.name,
|
|
|
- materialCategoryListL1: [],
|
|
|
- materialCategoryListL2: [],
|
|
|
- materialNormList: [],
|
|
|
- peijianList: [],
|
|
|
- websitPurchaseInList: []
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
+ ]
|
|
|
+ },
|
|
|
moreParameters() {
|
|
|
return [
|
|
|
{
|