| | |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import myImport from '@/views/components/myImport'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { selectTenantWarehouse, treeList } from '@/api/baseSetting/finsystenant'; |
| | | import {warningConfigGetDel} from '@/api/stock/ledger' |
| | | import { warningConfigGetDel } from '@/api/stock/ledger'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import { mapGetters } from 'vuex'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2, edit }, |
| | | components: { MyButton, MyTableV2, edit,myImport }, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'warehouseId',queryKey: 'agencyId'},{key:'goodsTemplateId',queryKey: 'agencyId'}], |
| | | cascader: [ |
| | | { key: 'warehouseId', queryKey: 'agencyId' }, |
| | | { key: 'goodsTemplateId', queryKey: 'agencyId' }, |
| | | ], |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | }, |
| | | { |
| | |
| | | optionsConfig: { |
| | | label: 'warehouseName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse' |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | dataIndex: 'baseGoodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'categoryId',queryKey: 'goodsTemplatesId'}], |
| | | cascader: [{ key: 'categoryId', queryKey: 'goodsTemplatesId' }], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: 'cascader', |
| | | dataIndex: 'categoryId', |
| | | label: '分类', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | label: 'label', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel' |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', |
| | | props: { checkStrictly: false }, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/GOODS_PRICE', |
| | | }, |
| | | options: [{ |
| | | label:'A', |
| | | value:'1' |
| | | },{ |
| | | label:'B', |
| | | value:'2' |
| | | },{ |
| | | label:'C', |
| | | value:'3' |
| | | }], |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | warehouseType: 0, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name: '导出', |
| | | name: '导入', |
| | | click: () => { |
| | | this.handleExport(); |
| | | this.importOrg(); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | computed: { |
| | | ...mapGetters(['userInfo']), |
| | | }, |
| | | created() { |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | del(row) { |
| | | this.$modal.confirm('是否确认删除此条的数据吗?').then(() => { |
| | |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true; |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code === 1) { |
| | | this.$message.success(response.msg); |
| | | this.search(1); |
| | | } else { |
| | | this.$message.warning(response.msg); |
| | | } |
| | | callBack(); |
| | | }; |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |