| | |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'warehouseName', |
| | | label: '仓库名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | dataIndex: 'states', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | |
| | | }, |
| | | // 列信息 |
| | | 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: 'warehouseName', align: 'left',}, |
| | | {title: '编号', field: 'warehouseCode', align: 'center'}, |
| | | {title: '类型', field: 'classificationName', align: 'center', }, |
| | | {title: '地址', field: 'adress', align: 'center', }, |
| | | // {title: '所属机构', field: 'summary', align: 'left',}, |
| | | { |
| | | field: 'belongProvince', |
| | | field: 'states', |
| | | title: '状态', |
| | | align: 'center', |
| | | width: 100, |
| | | switch: row => { |
| | | const result = {} |
| | | if (row.status == 1) { |
| | | if (row.states == 1) { |
| | | Object.assign(result, { |
| | | value: true, // 开 |
| | | label: '是', // 开的描述 |
| | |
| | | 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 () { |
| | | let text = row.states == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.warehouseName + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | params.states = row.states == 1 ? 0 : 1 |
| | | finsystenant.editstore(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | row.states = row.states === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | | vm.search() |
| | | } |
| | |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .confirm('是否确认删除名称为"' + row.warehouseName + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | finsystenant.delstore({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |