| | |
| | | import myImport from '@/views/components/myImport'; |
| | | import { goodsTemplate, goodsModel } from '@/api/baseSetting/finsystenant'; |
| | | import { outputDtailList } from '@/api/stock/accessStock'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'thisType', |
| | | dataIndex: 'flowType', |
| | | label: '类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [{ |
| | | label:'采购入库', |
| | | value:1 |
| | | },{ |
| | | label:'退还入库', |
| | | value:2 |
| | | }], |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/FLOW_TYPE', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | { title: '金额', field: 'totalPrice', align: 'left' }, |
| | | { title: '所属机构', field: 'agencyName', align: 'left' }, |
| | | { title: '创建人', field: 'createdName', align: 'left' }, |
| | | { title: '操作时间', field: 'dealTime', align: 'left' }, |
| | | { |
| | | title: '操作时间', |
| | | field: 'dealTime', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.createTime) }; |
| | | }, |
| | | }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initSearch(); |
| | | }, |
| | | methods: { |
| | | initSearch() { |
| | | this.items.map(async (item) => { |
| | | if (item.label == '物品名称') { |
| | | let res = await goodsTemplate(); |
| | | item.options = res.map((v) => { |
| | | v.label = v.goodsName; |
| | | v.value = v.id; |
| | | return v; |
| | | }); |
| | | } |
| | | 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); |