| | |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import detail from '../transferApplication/detail'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import myImport from '@/views/components/myImport'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { goodsModel } from '@/api/baseSetting/finsystenant'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goodsName', |
| | | type: 'select', |
| | | 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: '请选择', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '单号', field: 'businessFormCode', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsName', align: 'center' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '数量', field: 'counts', align: 'left' }, |
| | | { title: '接受机构', field: 'inAgencyName', align: 'left' }, |
| | | { title: '创建人', field: 'operatorName', align: 'left' }, |
| | | { title: '单号', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '物品名称', field: 'goodsName', align: 'left', width: 140 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { title: '数量', field: 'counts', align: 'center' }, |
| | | { title: '接受机构', field: 'inAgencyName', align: 'left', width: 130 }, |
| | | { title: '创建人', field: 'operatorName', align: 'center', width: 90 }, |
| | | { |
| | | title: '申请时间', |
| | | field: 'createTime', |
| | |
| | | return { value: row.inTime ? DateFormatter.LongToDateTime(row.inTime) : '-' }; |
| | | }, |
| | | }, |
| | | { title: '调拨机构', field: 'outAgencyName', align: 'left' }, |
| | | { title: '调拨机构', field: 'outAgencyName', align: 'left', width: 130 }, |
| | | { |
| | | title: '调拨人', |
| | | field: 'outOperatorName', |
| | | align: 'center', |
| | | width: 90, |
| | | formatter: (row) => { |
| | | return { value: row.outOperatorName || '-' }; |
| | | }, |
| | |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | width: 100, // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initSearch(); |
| | | }, |
| | | methods: { |
| | | initSearch() { |
| | | this.items.map(async (item) => { |
| | | if (item.label == '规格型号') { |
| | | let res = await goodsModel(); |
| | | item.options = res.map((v) => { |
| | | v.label = v.modelName; |
| | | v.value = v.id; |
| | | return v; |
| | | }); |
| | | } |
| | | return item; |
| | | }); |
| | | }, |
| | | showDetail(row) { |
| | | this.detailSetting.id = row.id; |
| | | this.detailSetting.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(); |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | if (this.filterFrom.outAgencyId && this.filterFrom.outAgencyId.length) { |
| | | this.filterFrom.outAgencyId = this.filterFrom.outAgencyId[this.filterFrom.outAgencyId.length - 1]; |
| | | } |
| | | if (this.filterFrom.inAgencyId && this.filterFrom.inAgencyId.length) { |
| | | this.filterFrom.inAgencyId = this.filterFrom.inAgencyId[this.filterFrom.inAgencyId.length - 1]; |
| | | } |
| | | if (this.filterFrom.createTimeStart) { |
| | | this.filterFrom.createTimeStart = this.filterFrom.createTimeStart.replace(/\-/g, ''); |
| | | } |