| | |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'warehouseId',queryKey: 'agencyId'},{key:'goodsTemplateId',queryKey: 'agencyId'}], |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goodsTemplateName', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | optionsConfig: { |
| | | label: 'warehouseName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse' |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'categoryId',queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | dataIndex: 'categoryId', |
| | | label: '分类', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'label', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', |
| | | props:{checkStrictly:false} |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | options: [{ |
| | | label:'A', |
| | | value:'1' |
| | | },{ |
| | | label:'B', |
| | | value:'2' |
| | | },{ |
| | | label:'C', |
| | | value:'3' |
| | | }], |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1, |
| | | warehouseType:0 |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '机构', field: 'agencyName', align: 'center' }, |
| | | { title: '仓库', field: 'warehouseName', align: 'center' }, |
| | | { title: '分类', field: 'categoryName', align: 'center' }, |
| | | { title: '所属类别', field: 'costType', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left' }, |
| | | { title: '单位', field: 'unit', align: 'left' }, |
| | | { title: '当前库存', field: 'kucun', align: 'left' }, |
| | | { title: '机构', field: 'agencyName', align: 'left', minWidth: 130 }, |
| | | { title: '仓库', field: 'warehouseName', align: 'left', minWidth: 130 }, |
| | | { title: '分类', field: 'categoryName', align: 'left', minWidth: 130 }, |
| | | { title: '所属类别', field: 'costType', align: 'center', width:80 }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 140 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', minWidth: 130 }, |
| | | { title: '单位', field: 'unit', align: 'center', width:80 }, |
| | | { title: '当前库存', field: 'kucun', align: 'center' }, |
| | | ], |
| | | paging: { |
| | | show: true, // 显示分页 |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initQuery(); |
| | | }, |
| | | methods: { |
| | | initQuery() { |
| | | selectTenantWarehouse().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '仓库') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.warehouseName; |
| | | item.value = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | console.log('this.items', this.items); |
| | | }); |
| | | getDicts('GOODS_PRICE').then((res) => { |
| | | // 价值类型1A 2B 3C |
| | | this.items.forEach((v) => { |
| | | if (v.label == '类别') { |
| | | v.options = res.map((v) => { |
| | | v.label = v.dict_label; |
| | | if (v.dict_value == 'A') { |
| | | v.value = 1; |
| | | } else if (v.dict_value == 'B') { |
| | | v.value = 2; |
| | | } else { |
| | | v.value = 3; |
| | | } |
| | | return v; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | treeList().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '分类') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.categoryName; |
| | | item.value = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 导出 |
| | | handleExport() { |
| | | let loading = this.$loading({ |
| | |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | if (params.agencyId && params.agencyId.length) { |
| | | this.filterFrom.agencyId = params.agencyId[params.agencyId.length - 1]; |
| | | } |
| | | this.search(1); |
| | | }, |
| | | }, |