| | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" /> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | |
| | | import MyTableV2 from '@/components/myTable/myTableV2'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { mapGetters } from 'vuex'; |
| | | import { selectTenantWarehouse,goodsModel } from '@/api/baseSetting/finsystenant'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import {mapGetters} from 'vuex'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | components: {MyButton, MyTableV2}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null}, |
| | | cascader: [{key:'warehouseId',queryKey: 'agencyId'},{key:'goodsTemplateId',queryKey: 'agencyId'}], |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | optionsConfig: { |
| | | label: 'warehouseName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'warehouseId', |
| | | label: '规格型号', |
| | | placeholder: '请选择', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'baseGoodsModelsId', |
| | | label: '规格型号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | label: '类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [{ |
| | | label:'全部', |
| | | value:'' |
| | | },{ |
| | | label:'盘盈', |
| | | value:'1' |
| | | },{ |
| | | label:'盘亏', |
| | | value:'2' |
| | | }], |
| | | options: [ |
| | | { |
| | | label: '全部', |
| | | value: '', |
| | | }, |
| | | { |
| | | label: '盘盈', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '盘亏', |
| | | value: '2', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | label: '出入库类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [{ |
| | | label:'全部', |
| | | value:'' |
| | | },{ |
| | | label:'盘盈入库', |
| | | value:'1' |
| | | },{ |
| | | label:'盘亏出库', |
| | | value:'2' |
| | | }], |
| | | options: [ |
| | | { |
| | | label: '全部', |
| | | value: '', |
| | | }, |
| | | { |
| | | label: '盘盈入库', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '盘亏出库', |
| | | value: '2', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'businessFormCode', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'operatorName', |
| | | label: '操作人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeStart', |
| | | dataIndex: 'startTime', |
| | | label: '时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeEnd', |
| | | dataIndex: 'endTime', |
| | | label: '至', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1, |
| | | }, |
| | | filterFrom: {}, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '仓库', field: 'name', align: 'left' }, |
| | | { title: '物品名称', field: 'WAREHOUSE_NAME', align: 'center' }, |
| | | { title: '规格型号', field: 'lv', align: 'center' }, |
| | | { title: '类型', field: 'lv', align: 'center' }, |
| | | { title: '库存数量', field: 'summary', align: 'left' }, |
| | | { title: '盘点数量', field: 'summary', align: 'left' }, |
| | | { title: '异常数量', field: 'summary', align: 'left' }, |
| | | { title: '出入库类型', field: 'summary', align: 'left' }, |
| | | { title: '出入库单号', field: 'summary', align: 'left' }, |
| | | { title: '机构', field: 'summary', align: 'left' }, |
| | | { title: '操作人', field: 'summary', align: 'left' }, |
| | | { title: '操作时间', field: 'summary', align: 'left' }, |
| | | {title: '仓库', field: 'warehouseName', align: 'left', width: 140}, |
| | | {title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 130}, |
| | | {title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 120}, |
| | | {title: '类型', field: 'inventoryResultType', align: 'center'}, |
| | | {title: '库存数量', field: 'initCounts', align: 'left'}, |
| | | {title: '盘点数量', field: 'inventoryCounts', align: 'left'}, |
| | | {title: '异常数量', field: 'errorCounts', align: 'left'}, |
| | | { |
| | | title: '出入库类型', |
| | | field: 'inventoryType', |
| | | align: 'center', |
| | | width: 100, |
| | | formatter: (row) => { |
| | | return { |
| | | value: row.inventoryType, |
| | | type: row.inventoryType && row.inventoryType.includes('盘盈') ? 'success' : 'danger' |
| | | }; |
| | | }, |
| | | }, |
| | | {title: '出入库单号', field: 'warehouseFormCode', align: 'center', width: 130}, |
| | | {title: '机构', field: 'agencyName', align: 'left', width: 130}, |
| | | {title: '操作人', field: 'operatorName', align: 'center', width: 90}, |
| | | { |
| | | title: '操作时间', |
| | | field: 'operatorTime', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return {value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-'}; |
| | | }, |
| | | }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | |
| | | ...mapGetters(['userInfo']), |
| | | }, |
| | | created() { |
| | | this.initQuery(); |
| | | }, |
| | | methods: { |
| | | initQuery() { |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '盘点仓库') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.warehouseName; |
| | | item.value = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | goodsModel().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '规格型号') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.modelName; |
| | | item.value = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum); |
| | | this.$refs.myTable.search({pageNum}); |
| | | } else { |
| | | this.$refs.myTable.search(); |
| | | } |