| | |
| | | </template> |
| | | |
| | | <script> |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import myTree from '@/components/myTree/index' |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goods_Name', |
| | | dataIndex: 'goodsName', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goods_Code', |
| | | dataIndex: 'goodsCode', |
| | | label: '物品编号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | dataIndex: 'classification', |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | defaultValue: '', |
| | | options: [ |
| | | { |
| | | label: 'A', |
| | | value: '1' |
| | | value: 'A' |
| | | }, |
| | | { |
| | | label: 'B', |
| | | value: '2' |
| | | value: 'B' |
| | | }, |
| | | { |
| | | label: 'C', |
| | | value: '3' |
| | | value: 'C' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '采购类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '全部', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '自采', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: '集采', |
| | | value: '3' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | dataIndex: 'states', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | states: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '物品编号', field: 'goods_Code', align: 'center'}, |
| | | {title: '物品名称', field: 'goods_Name', align: 'center'}, |
| | | {title: '分类', field: 'classification', align: 'center'}, |
| | | {title: '类别', field: 'states', align: 'center'}, |
| | | {title: '采购类型', field: 'category_id', align: 'center'}, |
| | | {title: '所属机构', field: 'agency_Name', align: 'center'}, |
| | | {title: '物品编号', field: 'goodsCode', align: 'center'}, |
| | | {title: '物品名称', field: 'goodsName', align: 'center'}, |
| | | {title: '分类', field: 'categoryName', align: 'center'}, |
| | | {title: '类别', field: 'classification', align: 'center'}, |
| | | // {title: '采购类型', field: 'categoryId', align: 'center'}, |
| | | {title: '所属机构', field: '', align: 'center'}, |
| | | { |
| | | title: '创建时间', |
| | | field: 'create_Date', |
| | | field: 'createDate', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return {value: DateFormatter.LongToDateTime(row.create_Date)}; |
| | | return {value: DateFormatter.LongToDateTime(row.createDate)}; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | width: 100, |
| | | switch: row => { |
| | | const result = {} |
| | | if (row.status == 1) { |
| | | if (row.states == 1) { |
| | | Object.assign(result, { |
| | | value: true, // 开 |
| | | label: '是', // 开的描述 |
| | |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | width: '250', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '编辑', |
| | |
| | | this.del(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '规格型号', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | // { |
| | | // title: '规格型号', |
| | | // events: (row) => { |
| | | // this.showAudit(row); |
| | | // }, |
| | | // }, |
| | | ], |
| | | }, |
| | | paging: { |
| | |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.status == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () { |
| | | vm.$modal.confirm('确认要' + text + '"' + row.goodsName + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | finsystenant.editcode(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .confirm('是否确认删除名称为"' + row.goodsName + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | finsystenant.delCode({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | |
| | | // } |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | finsystenant.editmaterial(row.id).then(res => { |
| | | // console.log(res,'res'); |
| | | this.editSetting.id = res.id; |
| | | this.editSetting.info = JSON.stringify(res); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }) |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |