| | |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import myImport from '@/views/components/myImport'; |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import stockType from '@/utils/stockType' |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | components: { MyButton, MyTableV2, myImport }, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [ |
| | | { key: 'inWarehouseId', queryKey: 'tenantId' }, |
| | | { key: 'goodsTemplateId', queryKey: 'agencyId' }, |
| | | ], |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'inWarehouseId', |
| | | label: '部门', |
| | | placeholder: '请选择', |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'name', |
| | | label: '部门', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | 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: 'name', |
| | | dataIndex: 'baseGoodsModelsId', |
| | | label: '规格型号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | dataIndex: 'flowType', |
| | | label: '类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '启用', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: '0', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/FLOW_TYPE', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '操作人', |
| | | dataIndex: 'businessFormCode', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | userPhone: null, |
| | | status: 1, |
| | | }, |
| | | // 导入 |
| | | 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, |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | url: SettingIplatform.apiBaseURL + '/pc/warehouse/flow/getTaiZhangList', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: { |
| | |
| | | }, |
| | | generalExport: { |
| | | // 通用导出按钮 |
| | | show: true, |
| | | show: false, |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [], |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '机构', field: 'name', align: 'left' }, |
| | | { title: '部门', field: 'code', 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: 'agencyName', align: 'left', width: 130 }, |
| | | { title: '部门', field: 'departName', align: 'left', width: 130 }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 130 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { |
| | | title: '类型', |
| | | field: 'summary', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | let result = stockType(row) |
| | | return { value: result }; |
| | | }, |
| | | }, |
| | | { title: '单号', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '数量', field: 'thisCount', align: 'center', width: 100 }, |
| | | { title: '操作前数量', field: 'initialCount', align: 'center', width: 100 }, |
| | | { title: '操作后数量', field: 'endCount', align: 'center', width: 100 }, |
| | | { |
| | | title: '操作时间', |
| | | field: 'summary', |
| | | align: 'left', |
| | | field: 'dealTime', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.procureTime) }; |
| | | return { value: DateFormatter.LongToDateTime(row.dealTime) }; |
| | | }, |
| | | }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: false // 显示操作列 |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |