| | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" /> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { goodsModel, getCategorySelectTree } from '@/api/baseSetting/finsystenant'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | components: {MyButton, MyTableV2}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'label', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', |
| | | props:{checkStrictly:false} |
| | | props: {checkStrictly: false, emitPath: false, value: 'id'} |
| | | }, |
| | | }, |
| | | { |
| | |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/GOODS_PRICE', |
| | | }, |
| | | options: [{ |
| | | label: 'A', |
| | | value: '1' |
| | | }, { |
| | | label: 'B', |
| | | value: '2' |
| | | }, { |
| | | label: 'C', |
| | | value: '3' |
| | | }], |
| | | }, |
| | | ], |
| | | // 树数据 |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '物品名称', field: 'baseGoodsTemplateName', align: 'left' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '单位', field: 'unit', align: 'center' }, |
| | | { title: '当前库存', field: 'warehouseCount', align: 'center' }, |
| | | { title: '保底库存', field: 'lowerLimit', align: 'left' }, |
| | | { title: '封顶库存', field: 'upperLimit', align: 'left' }, |
| | | {title: '物品名称', field: 'baseGoodsTemplateName', align: 'left', minWidth: 140}, |
| | | {title: '规格型号', field: 'baseGoodsModelsName', align: 'left', minWidth: 130}, |
| | | {title: '单位', field: 'unit', align: 'center', width: 80}, |
| | | {title: '当前库存', field: 'warehouseCount', align: 'center', width: 130}, |
| | | {title: '保底库存', field: 'lowerLimit', align: 'center', width: 130}, |
| | | {title: '封顶库存', field: 'upperLimit', align: 'center', width: 130}, |
| | | { |
| | | title: '状态', |
| | | field: 'warningType', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 90, |
| | | formatter: (row) => { |
| | | return { |
| | | type: row.warningType == 1 ? 'warning' : 'danger', |
| | |
| | | { |
| | | title: '预警时间', |
| | | field: 'warningTime', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.warningTime) }; |
| | | return {value: DateFormatter.LongToDateTime(row.warningTime)}; |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | methods: { |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({ id: row.id }).then((res) => {}); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |