| | |
| | | // 接口请求地址 |
| | | // apiBaseURL: 'http://116.198.39.83:8082/progress', // 正式 |
| | | // apiBaseURL: 'http://172.16.60.90:8082/progress',//开发 |
| | | // apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发 |
| | | apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发 |
| | | // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 测试, |
| | | // socket连接 |
| | | wsSocketUrl: VUE_APP_WS_URL, |
| | |
| | | method: 'get', |
| | | params, |
| | | }); |
| | | } |
| | | |
| | | // 根据物品型号查询物品信息 |
| | | export function queryGoodsModelInfo(params) { |
| | | return request({ |
| | | url: '/pc/base/goods/models/queryGoodsModelInfo', |
| | | method: 'get', |
| | | params, |
| | | }); |
| | | } |
| | |
| | | // 盘点暂存 |
| | | export function inventoryTemporaryStorage(data) { |
| | | return request({ |
| | | url: '/pc/l/wh/form/inventory/temporaryStorage', |
| | | url: '/pc/l/wh/form/inventory/temporary/storage', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | |
| | | } |
| | | |
| | | // 盘点 |
| | | export function inventorySelectPdList(params) { |
| | | export function inventoryQuery(params) { |
| | | return request({ |
| | | url: '/pc/l/wh/form/inventory/select/pdList', |
| | | url: '/pc/l/wh/form/inventory/query', |
| | | method: 'get', |
| | | params, |
| | | }); |
| | |
| | | import request from '@/utils/request'; |
| | | |
| | | // 单据新增 |
| | | // 库存查询导出 |
| | | export function doExport(params) { |
| | | return request({ |
| | | url: '/pc/fin/warehouse/ledger/getListExport', |
| | |
| | | params, |
| | | }); |
| | | } |
| | | |
| | | // 预警设置 |
| | | // 列表 |
| | | export function warningConfigGetList(params) { |
| | | return request({ |
| | | url: '/pc/warehouse/warningConfig/getList', |
| | | method: 'get', |
| | | params, |
| | | }); |
| | | } |
| | | |
| | | // 新增 |
| | | export function warningConfigAdd(data) { |
| | | return request({ |
| | | url: '/pc/warehouse/warningConfig/add', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 编辑 |
| | | export function warningConfigUpd(data) { |
| | | return request({ |
| | | url: '/pc/warehouse/warningConfig/upd', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 编辑回显 |
| | | export function warningConfigGetById(params) { |
| | | return request({ |
| | | url: '/pc/warehouse/warningConfig/getById', |
| | | method: 'get', |
| | | params, |
| | | }); |
| | | } |
| | | |
| | | // 删除 |
| | | export function warningConfigGetDel(data) { |
| | | return request({ |
| | | url: '/pc/warehouse/warningConfig/del', |
| | | method: 'delete', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 查询已有配置 |
| | | export function warningConfigGetConfigList(params) { |
| | | return request({ |
| | | url: '/pc/warehouse/warningConfig/getConfigList', |
| | | method: 'get', |
| | | params, |
| | | }); |
| | | } |
| | |
| | | // apiBaseURL: 'http://116.198.39.83:8082/progress', // 正式 |
| | | // apiBaseURL: 'http://172.16.60.90:8082/progress',//开发 |
| | | // apiBaseURL: 'http://172.16.60.175:8083/lowConsum',//开发 |
| | | // apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发 |
| | | apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发 |
| | | // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 测试, |
| | | // socket连接 |
| | | wsSocketUrl: VUE_APP_WS_URL, |
New file |
| | |
| | | function stockType(str, selStr,color) { |
| | | color=color||'#F3595A' |
| | | //str为要改变颜色的字符(传入的参数) |
| | | //selStr是指定的字符串 |
| | | let res = new RegExp('(' + str + ')', 'g'); |
| | | return selStr.replace(res, `<span style='color:${color}'>${str}</span>`); |
| | | } |
| | | export default stockType; |
| | | |
| | |
| | | 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: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'goodsTemplateName', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'baseGoodsModelsId', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'operatorName', |
| | | label: '操作人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeStart', |
| | | dataIndex: 'startTime', |
| | | label: '时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeEnd', |
| | | dataIndex: 'endTime', |
| | | label: '至', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '仓库', field: 'name', align: 'left' }, |
| | | { title: '物品名称', field: 'WAREHOUSE_NAME', align: 'center' }, |
| | | { title: '仓库', field: 'warehouseFormCode', align: 'left' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: '规格型号', field: 'lv', align: 'center' }, |
| | | { title: '类型', field: 'lv', align: 'center' }, |
| | | { title: '库存数量', field: 'summary', align: 'left' }, |
| | |
| | | { title: '异常数量', field: 'summary', align: 'left' }, |
| | | { title: '出入库类型', field: 'summary', align: 'left' }, |
| | | { title: '出入库单号', field: 'summary', align: 'left' }, |
| | | { title: '机构', field: 'summary', align: 'left' }, |
| | | { title: '操作人', field: 'summary', align: 'left' }, |
| | | { title: '机构', field: 'agencyName', align: 'left' }, |
| | | { title: '操作人', field: 'operatorName', align: 'left' }, |
| | | { title: '操作时间', field: 'summary', align: 'left' }, |
| | | ], |
| | | // 操作信息 |
| | |
| | | import myImport from '@/views/components/myImport'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { selectTenantWarehouse } from '@/api/baseSetting/finsystenant'; |
| | | import { inventoryListApi,inventoryDel } from '@/api/stock/inventory'; |
| | | import { inventoryListApi, inventoryDel } from '@/api/stock/inventory'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import {mapGetters} from 'vuex' |
| | | import { mapGetters } from 'vuex'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | align: 'left', |
| | | width: '220', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '编辑', |
| | | hidden:(row)=>{ |
| | | if(row.states!=0){ |
| | | return true |
| | | hidden: (row) => { |
| | | if (row.states != 0) { |
| | | return true; |
| | | } |
| | | }, |
| | | events: (row) => { |
| | |
| | | }, |
| | | { |
| | | title: '删除', |
| | | hidden:(row)=>{ |
| | | if(row.states!=0){ |
| | | return true |
| | | hidden: (row) => { |
| | | if (row.states != 0) { |
| | | return true; |
| | | } |
| | | }, |
| | | events: (row) => { |
| | |
| | | { |
| | | title: '盘点', |
| | | type: 'success', |
| | | hidden:(row)=>{ |
| | | if(row.states!=0){ |
| | | return true |
| | | hidden: (row) => { |
| | | if (row.states != 0) { |
| | | return true; |
| | | } |
| | | }, |
| | | events: (row) => { |
| | | this.showInventory(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '继续盘点', |
| | | type: 'success', |
| | | hidden: (row) => { |
| | | if (row.states != 1) { |
| | | return true; |
| | | } |
| | | }, |
| | | events: (row) => { |
| | | this.showInventory(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '盘点详情', |
| | | type: 'info', |
| | | hidden: (row) => { |
| | | if (row.states != 2) { |
| | | return true; |
| | | } |
| | | }, |
| | | events: (row) => { |
| | | this.showInventoryDetail(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '生产盘点表', |
| | | type: 'primary', |
| | | hidden: (row) => { |
| | | if (row.states != 2) { |
| | | return true; |
| | | } |
| | | }, |
| | | events: (row) => { |
| | | this.showInventoryDetail(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(['userInfo']) |
| | | computed: { |
| | | ...mapGetters(['userInfo']), |
| | | }, |
| | | created() { |
| | | selectTenantWarehouse({agencyId: this.userInfo.tenantId}).then((res) => { |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '盘点仓库') { |
| | | v.options = res.map((item) => { |
| | |
| | | this.inventorySetting.title = '盘点'; |
| | | this.inventorySetting.show = true; |
| | | }, |
| | | showInventoryDetail(row) { |
| | | this.inventorySetting.id = row.id; |
| | | this.inventorySetting.info = JSON.stringify(row); |
| | | this.inventorySetting.title = '盘点'; |
| | | this.inventorySetting.show = true; |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | |
| | | |
| | | if (this.filterFrom.startTime) { |
| | | this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, ''); |
| | | } |
| | |
| | | <template> |
| | | <win-md :title="setting.title" @close="close" :width="'1200px'"> |
| | | <el-row :gutter="20" style="margin-bottom: 20px" type="flex" align="middle"> |
| | | <el-col :span="6">盘点单号:{{ formData.businessFormCode }}</el-col> |
| | | <el-col :span="6">盘点任务:{{ formData.businessTaskCode }}</el-col> |
| | | <el-col :span="6">盘点仓库:{{ formData.warehouseId }}</el-col> |
| | | <el-col :span="3" :offset="3"> |
| | | <my-button name="导出盘点单" site="form" size="medium" type="primary" /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table v-loading="loading" :data="formData.tableData" height="100%" :stripe="true" class="the-table"> |
| | | <el-table-column prop="goodsTemplateName" label="物品名称"> </el-table-column> |
| | | <el-table-column prop="baseGoodsModelsId" label="型号" align="center"> </el-table-column> |
| | | <el-table-column prop="classification" label="类别"> </el-table-column> |
| | | <el-table-column prop="unit" label="单位" align="center"> </el-table-column> |
| | | <el-table-column prop="kc" label="应有库存" align="center"> </el-table-column> |
| | | <el-table-column prop="price" label="单价" align="center"> </el-table-column> |
| | | <el-table-column prop="inventoryResult" label="金额" align="center"> </el-table-column> |
| | | <el-table-column prop="inventoryCounts" label="实盘数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.inventoryCounts"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-form class="form" ref="ruleForm" :model="formData" :rules="rules"> |
| | | <el-row :gutter="20" style="margin-bottom: 20px" type="flex" align="middle"> |
| | | <el-col :span="6">盘点单号:{{ formData.businessFormCode }}</el-col> |
| | | <el-col :span="6">盘点任务:{{ formData.businessFormName }}</el-col> |
| | | <el-col :span="6">盘点仓库:{{ formData.warehouseName }}</el-col> |
| | | <el-col :span="3" :offset="3"> |
| | | <my-button name="导出盘点单" site="form" size="medium" type="primary" /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="formData.formInventoryGoodsList" |
| | | :rules="rules" |
| | | height="400" |
| | | :stripe="true" |
| | | class="the-table" |
| | | > |
| | | <el-table-column prop="goodsTemplateName" label="物品名称"> </el-table-column> |
| | | <el-table-column prop="baseGoodsModelsName" label="型号" align="center"> </el-table-column> |
| | | <el-table-column prop="type" label="类别"> </el-table-column> |
| | | <el-table-column prop="unit" label="单位" align="center"> </el-table-column> |
| | | <el-table-column prop="inventoryCount" label="应有库存" align="center"> </el-table-column> |
| | | <el-table-column prop="realNum" label="实盘数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-form-item |
| | | label-width="0" |
| | | :prop="`formInventoryGoodsList[${scope.$index}].realNum`" |
| | | :rules="rules.realNum" |
| | | > |
| | | <el-input v-model.number="scope.row.realNum" maxlength="8"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form> |
| | | |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="暂存" site="form" type="primary" @click="close" /> |
| | | <my-button name="暂存" site="form" type="primary" @click="staging" /> |
| | | <my-button name="完成盘点" site="form" type="success" @click="save" /> |
| | | </div> |
| | | </win-md> |
| | |
| | | <script> |
| | | import winMd from '@/components/win/win-md'; |
| | | import myButton from '@/components/myButton/myButton'; |
| | | import { inventorySelectPdList,inventoryTemporaryStorage,inventoryFinish } from '@/api/stock/inventory'; |
| | | import { inventoryQuery, inventoryTemporaryStorage, inventoryFinish } from '@/api/stock/inventory'; |
| | | export default { |
| | | components: { winMd, myButton }, |
| | | props: { |
| | |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | btnLoading: false, |
| | | formData: { |
| | | businessFormCode: '2023080812', |
| | | businessTaskCode: '2023年9月盘点单', |
| | | warehouseId: '开封市仓库', |
| | | tableData: [], |
| | | businessFormCode: '', |
| | | businessFormName: '', |
| | | warehouseName: '', |
| | | formInventoryGoodsList: [], |
| | | }, |
| | | rules: { |
| | | realNum: [ |
| | | { required: true, message: '请输入', trigger: 'blur' }, |
| | | { type: 'number', message: '请输入数字值' }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | // for (let i = 0; i < 10; i++) { |
| | | // this.formData.tableData.push({ |
| | | // goodsTemplateName: '施乐黑色碳粉', |
| | | // baseGoodsModelsId: '施乐c2201', |
| | | // classification: 'A', |
| | | // unit: '套', |
| | | // kc: 10, |
| | | // price: 20, |
| | | // inventoryResult: 200, |
| | | // inventoryCounts: 0, |
| | | // }); |
| | | // } |
| | | inventorySelectPdList({id:this.setting.id}).then(res=>{ |
| | | this.formData = res |
| | | }) |
| | | const info = JSON.parse(this.setting.info); |
| | | console.log('info', info); |
| | | if (info.states == 1) { |
| | | // 继续盘点 |
| | | |
| | | } else { |
| | | inventoryQuery({ id: this.setting.id }).then((res) => { |
| | | this.formData = res; |
| | | this.formData.id = this.setting.id; |
| | | }); |
| | | } |
| | | inventoryQuery({ id: this.setting.id }).then((res) => { |
| | | this.formData = res; |
| | | this.formData.id = this.setting.id; |
| | | }); |
| | | }, |
| | | methods: { |
| | | close() { |
| | | this.$emit('close'); |
| | | }, |
| | | staging() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | const params = { |
| | | ...this.formData, |
| | | inventoryGoodsList: this.formData.formInventoryGoodsList, |
| | | }; |
| | | inventoryTemporaryStorage(params).then(() => { |
| | | this.$message.success('暂存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | save() { |
| | | |
| | | } |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | const params = { |
| | | ...this.formData, |
| | | inventoryGoodsList: this.formData.formInventoryGoodsList, |
| | | }; |
| | | inventoryFinish(params).then(() => { |
| | | this.$message.success('暂存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <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> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import MyTableV2 from '@/components/myTable/myTableV2'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | import { selectTenantWarehouse, getCategorySelectTree } from '@/api/baseSetting/finsystenant'; |
| | | 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, myImport}, |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '规格型号', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | type: 'cascader', |
| | | dataIndex: 'categoryId', |
| | | label: '分类', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [] |
| | | options: [], |
| | | cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'label', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', |
| | | props:{checkStrictly:false} |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | 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: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'costType', |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [] |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/GOODS_PRICE', |
| | | }, |
| | | }, |
| | | ], |
| | | // 树数据 |
| | |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | status: 1, |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | url: SettingIplatform.apiBaseURL + '/pc/warehouse/warning/getList', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | columnsCtrl: { |
| | | // 列控制按钮 |
| | | show: false, |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | generalExport: { |
| | | // 通用导出按钮 |
| | | show: false, |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | ] |
| | | custom: [], |
| | | }, |
| | | // 列信息 |
| | | 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: 'summary', align: 'left',}, |
| | | {title: '状态', field: 'summary', align: 'left',}, |
| | | {title: '预警时间', field: 'summary', align: 'left',}, |
| | | { 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: 'warningType', |
| | | align: 'left', |
| | | formatter: (row) => { |
| | | return { |
| | | type: row.warningType == 1 ? 'warning' : 'danger', |
| | | value: row.warningType == 1 ? '库存已超' : '预计缺货', |
| | | }; //预警类型(1=库存已超;2=预计缺货) |
| | | }, |
| | | }, |
| | | { |
| | | title: '预警时间', |
| | | field: 'warningTime', |
| | | align: 'left', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.warningTime) }; |
| | | }, |
| | | }, |
| | | ], |
| | | paging: { |
| | | show: true, // 显示分页 |
| | |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | total: 0, |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initQuery(); |
| | | }, |
| | | methods: { |
| | | initQuery() { |
| | | getDicts('GOODS_PRICE').then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '类别') { |
| | | v.options = res.map((v) => { |
| | | v.label = v.dict_label; |
| | | v.value = v.dict_value; |
| | | return v; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | getCategorySelectTree().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '分类') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.label; |
| | | item.vlaue = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | finsystenant.del({ id: row.id }).then((res) => {}); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search() |
| | | this.search(); |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | .catch(() => {}); |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | this.$refs.myTable.search(pageNum); |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | this.$refs.myTable.search(); |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | this.search(1); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="物品分类"> |
| | | <el-form-item label="入库仓库" prop="baseWarehouseId"> |
| | | <el-select |
| | | v-model="formData.baseWarehouseId" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | :disabled="type == 'edit'" |
| | | > |
| | | <el-option v-for="item in warehouses" :key="item.id" :label="item.warehouseName" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="物品分类" prop="baseCategoryIds"> |
| | | <el-cascader |
| | | v-model="formData.baseCategoryIds" |
| | | :options="categoryOptions" |
| | | :props="{ value: 'id' }" |
| | | @change="categoryChange" |
| | | style="width: 100%" |
| | | :disabled="type == 'edit'" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="物品名称"> |
| | | <el-select |
| | | :value="formData.baseGoodsTemplateId" |
| | | placeholder="请先择物品分类" |
| | | filterable |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in goodsTemplatelAll" :key="item.id" :label="item.goodsName" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号"> |
| | | <el-form-item label="物品名称" prop="baseGoodsTemplateId"> |
| | | <el-select |
| | | :value="formData.baseGoodsTemplateId" |
| | | placeholder="请先择物品分类" |
| | | filterable |
| | | :disabled="!formData.baseCategoryId || type == 'edit'" |
| | | @change="goodsTemplateChange" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in goodsTemplatelOptions" |
| | | :key="item.id" |
| | | :label="item.goodsName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号" prop="modelsIds"> |
| | | <el-select |
| | | v-model="formData.modelsIds" |
| | | multiple |
| | | :disabled="!formData.baseGoodsTemplateId || type == 'edit'" |
| | | placeholder="请先择物品名称" |
| | | @change="modelChange($event)" |
| | | @remove-tag="modelRemoveTag($event)" |
| | | @change="modelChange" |
| | | @remove-tag="modelRemoveTag" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in goodsModelAll" :key="item.id" :label="item.modelName" :value="item.id" /> |
| | | <el-option v-for="item in modelsOptions" :key="item.id" :label="item.modelName" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="formData.models" :stripe="true"> |
| | | <el-table-column prop="baseGoodsModelsId" label="规格型号" align="center"> </el-table-column> |
| | | <el-table-column prop="bdcount" label="保底库存" align="center"> |
| | | <el-row v-if="type == 'edit'"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="保底库存" prop="lowerLimit"> |
| | | <el-input placeholder="请输入" v-model.number="formData.lowerLimit"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="封顶库存" prop="upperLimit"> |
| | | <el-input placeholder="请输入" v-model.number="formData.upperLimit"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table v-if="type != 'edit'" :data="formData.models" :stripe="true"> |
| | | <el-table-column prop="baseGoodsModelsId" label="规格型号" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.bdcount"></el-input> |
| | | {{ getGoodsModelsName(scope.row.baseGoodsModelsId) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="count" label="封顶库存" align="center"> |
| | | <el-table-column prop="lowerLimit" label="保底库存" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.count"></el-input> |
| | | <el-form-item |
| | | v-if="scope.row.lowerLimit || scope.row.upperLimit" |
| | | label-width="0" |
| | | :prop="`models[${scope.$index}].lowerLimit`" |
| | | :rules="rules.lowerLimit" |
| | | > |
| | | <el-input v-model.number="scope.row.lowerLimit"></el-input> |
| | | </el-form-item> |
| | | <el-input v-else v-model.number="scope.row.lowerLimit"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="upperLimit" label="封顶库存" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-form-item |
| | | v-if="scope.row.lowerLimit || scope.row.upperLimit" |
| | | label-width="0" |
| | | :prop="`models[${scope.$index}].upperLimit`" |
| | | :rules="rules.upperLimit" |
| | | > |
| | | <el-input v-model.number="scope.row.upperLimit"></el-input> |
| | | </el-form-item> |
| | | <el-input v-else v-model.number="scope.row.upperLimit"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <script> |
| | | import winMd from '@/components/win/win-md'; |
| | | import myButton from '@/components/myButton/myButton'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { |
| | | getCategorySelectTree, |
| | | goodsModel, |
| | | warehouseSelectNumber, |
| | | goodsTemplate, |
| | | selectTenantWarehouse, |
| | | queryGoodsModelInfo, |
| | | } from '@/api/baseSetting/finsystenant'; |
| | | import { |
| | | warningConfigAdd, |
| | | warningConfigUpd, |
| | | warningConfigGetById, |
| | | warningConfigGetConfigList, |
| | | } from '@/api/stock/ledger'; |
| | | import { mapGetters } from 'vuex'; |
| | | import { findParentIds } from '@/utils/index'; |
| | | |
| | | export default { |
| | | components: { winMd, myButton }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | type: '', |
| | | warehouses: [], // 入库仓库列表 |
| | | agencyOptions: [], // 调拨机构 |
| | | categoryOptions: [], // 物品分类列表 |
| | | modelList: [], //型号列表 |
| | | goodsTemplatelOptions: [], //物品名称 |
| | | modelsOptions: [], //型号列表 |
| | | formData: { |
| | | warehouseType: 0, //仓库类型0机构1部门 |
| | | baseWarehouseId: '', //仓库编号 |
| | | baseCategoryIds: '', // 分类编号数组 |
| | | baseCategoryId: '', // 分类编号 |
| | | baseGoodsTemplateId: '', // 物品模版编号 |
| | | baseGoodsTemplateId: '', // 物品名称模版编号 |
| | | modelsIds: [], //规格型号 |
| | | models: [], |
| | | }, |
| | | modelsItem: { |
| | | baseGoodsModelsId: '', // 规格型号编号 |
| | | worehouseCount: 0, |
| | | counts: 0, // 操作数量 |
| | | }, |
| | | rules: { |
| | | code: [{ required: true, message: '请输入机构编号', trigger: 'blur' }], |
| | | name: [{ required: true, message: '请输入机构名称', trigger: 'blur' }], |
| | | status: [{ required: true, message: '请选择状态', trigger: 'blur' }], |
| | | baseCategoryIds: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | baseGoodsTemplateId: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | modelsIds: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | | lowerLimit: [ |
| | | { required: true, message: '请输入', trigger: 'blur' }, |
| | | { type: 'number', message: '请输入数字值', trigger: 'blur' }, |
| | | ], |
| | | upperLimit: [ |
| | | { required: true, message: '请输入', trigger: 'blur' }, |
| | | { type: 'number', message: '请输入数字值', trigger: 'blur' }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['userInfo']), |
| | | }, |
| | | created() { |
| | | if (this.setting.info) { |
| | | this.formData = Object.assign({}, JSON.parse(this.setting.info)); |
| | | } |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | async init() { |
| | | this.getCategoryTree(); |
| | | this.getgoodsTemplate(); |
| | | this.getgoodsModel(); |
| | | if (this.setting.id) { |
| | | this.type = 'edit'; |
| | | const detail = await warningConfigGetById({ id: this.setting.id }); |
| | | await this.getCategoryTree(); |
| | | this.formData = Object.assign({}, detail); |
| | | // 分类反显 |
| | | let res = await queryGoodsModelInfo({ baseGoodsModelsId: this.formData.baseGoodsModelsId }); |
| | | this.formData.baseCategoryId = res[0].categoryId; |
| | | this.formData.baseCategoryIds = findParentIds(this.categoryOptions, this.formData.baseCategoryId); |
| | | // 物品名称反显 |
| | | this.getgoodsTemplate(this.formData.baseCategoryId); |
| | | // 规格型号反显 |
| | | this.getgoodsModel(this.formData.baseGoodsTemplateId); |
| | | this.formData.modelsIds = [this.formData.baseGoodsModelsId]; |
| | | this.getWarehouseList(); |
| | | } else { |
| | | this.getWarehouseList(); |
| | | this.getCategoryTree(); |
| | | } |
| | | }, |
| | | // 获取入库仓库列表 |
| | | getWarehouseList() { |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) |
| | | .then((res) => { |
| | | this.warehouses = res; |
| | | if (this.warehouses.length && !this.formData.baseWarehouseId) { |
| | | // 默认选中第一个仓库 |
| | | this.formData.baseWarehouseId = this.warehouses[0].id; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log('err', err); |
| | | }); |
| | | }, |
| | | |
| | | async getCategoryTree() { |
| | | getCategoryTree() { |
| | | // 获取物品分类列表 |
| | | const treeRes = await getCategorySelectTree(); |
| | | this.categoryOptions = this.removeEmptyChildren(treeRes); |
| | | console.log('categoryOptions', this.categoryOptions); |
| | | return new Promise(async (resolve) => { |
| | | const treeRes = await getCategorySelectTree(); |
| | | this.categoryOptions = this.removeEmptyChildren(treeRes); |
| | | resolve(); |
| | | }); |
| | | }, |
| | | |
| | | // 获取物品名称列表 |
| | | getgoodsTemplate(id) { |
| | | goodsTemplate({ categoryId: id || '', agencyId: this.formData.outAgencyId }).then((res) => { |
| | | this.goodsTemplatelAll = res; |
| | | goodsTemplate({ categoryId: id || '', agencyId: this.userInfo.tenantId }).then((res) => { |
| | | this.goodsTemplatelOptions = res; |
| | | }); |
| | | }, |
| | | |
| | | // 规格型号 |
| | | getgoodsModel(id) { |
| | | goodsModel({ goodsTemplatesId: id || '' }).then((res) => { |
| | | this.goodsModelAll = res; |
| | | this.modelsOptions = res; |
| | | }); |
| | | }, |
| | | |
| | | // 根据规格型号id获取名字 |
| | | getGoodsModelsName(id) { |
| | | let item = this.modelsOptions.find((v) => v.id == id); |
| | | if (item) { |
| | | return item.modelName; |
| | | } |
| | | return; |
| | | }, |
| | | |
| | | // 物品分类选择 |
| | | categoryChange(e) { |
| | | this.formData.goodsOptions = []; |
| | | if (!e) return; |
| | | this.goodsTemplatelOptions = []; |
| | | this.modelsOptions = []; |
| | | this.formData.baseGoodsTemplateId = ''; |
| | | this.formData.goodsTemplateName = ''; |
| | | this.formData.modelsOptions = []; |
| | | this.formData.modelsIds = []; |
| | | this.formData.models = []; |
| | | |
| | | this.formData.transferGoods.baseCategoryId = e[e.length - 1]; |
| | | this.formData.baseCategoryId = e[e.length - 1]; |
| | | // 根据选中分类请求物品名称列表 |
| | | this.getgoodsTemplate(e[e.length - 1]); |
| | | this.getgoodsTemplate(this.formData.baseCategoryId); |
| | | }, |
| | | |
| | | // 物品名称列表选择 |
| | | goodsTemplateChange(e, index) { |
| | | let temp = this.formData.transferGoods.find((v) => v.baseGoodsTemplateId == e); |
| | | if (temp) { |
| | | this.$message.warning('已选过此物品'); |
| | | return; |
| | | } else { |
| | | this.formData.transferGoods[index].baseGoodsTemplateId = e; |
| | | } |
| | | this.formData.transferGoods[index].modelsOptions = []; |
| | | this.formData.transferGoods[index].modelsIds = []; |
| | | this.formData.transferGoods[index].models = []; |
| | | goodsTemplateChange(e) { |
| | | this.formData.modelsIds = []; |
| | | this.formData.models = []; |
| | | |
| | | this.formData.transferGoods[index].goodsTemplateName = this.getGoodsTemplateName(e); |
| | | this.formData.baseGoodsTemplateId = e; |
| | | // 根据选中物品名称id获取规格型号列表 |
| | | this.getgoodsModel(e, index); |
| | | this.getgoodsModel(e); |
| | | }, |
| | | |
| | | removeEmptyChildren(arr) { |
| | |
| | | |
| | | // 规格型号选择 |
| | | modelChange(e) { |
| | | let arr = [...this.formData.models]; |
| | | let arr = this.formData.models; |
| | | let str = JSON.stringify(arr); |
| | | e.forEach((item) => { |
| | | if (str.indexOf(item) == -1) { |
| | | arr.push({ baseGoodsModelsId: item, bdcount: null,count:null }); |
| | | e.forEach((item, index) => { |
| | | if (str && !str.includes(item)) { |
| | | arr.push({ baseGoodsModelsId: item, lowerLimit: null, upperLimit: null }); |
| | | } |
| | | }); |
| | | this.formData.models = arr; |
| | | }, |
| | | |
| | | // 规格型号移除 |
| | | modelRemoveTag(e) { |
| | | let arr = this.formData.models; |
| | | let delIndex = arr.findIndex((v) => v.baseGoodsModelsId == e); |
| | | let delIndex = this.formData.models.findIndex((v) => v.baseGoodsModelsId == e); |
| | | this.formData.models.splice(delIndex, 1); |
| | | }, |
| | | |
| | |
| | | save() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData); |
| | | if (this.setting.id) { |
| | | // 编辑接口 |
| | | finsystenant.edit(params).then((res) => { |
| | | if (res) { |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | } else { |
| | | this.$message.error('保存失败'); |
| | | } |
| | | const params = { |
| | | id: this.setting.id, |
| | | lowerLimit: this.formData.lowerLimit, |
| | | upperLimit: this.formData.upperLimit, |
| | | }; |
| | | warningConfigUpd(params).then((res) => { |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }); |
| | | } else { |
| | | params.orgId = this.setting.orgId; |
| | | finsystenant.add(params).then((res) => { |
| | | if (res) { |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | } else { |
| | | this.$message.error('保存失败'); |
| | | } |
| | | const params = { |
| | | warehouseType: this.formData.warehouseType, |
| | | baseWarehouseId: this.formData.baseWarehouseId, |
| | | baseGoodsTemplateId: this.formData.baseGoodsTemplateId, |
| | | modelConfigStr: JSON.stringify(this.formData.models), |
| | | }; |
| | | warningConfigAdd(params).then((res) => { |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }); |
| | | } |
| | | } else { |
| | |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import edit from './edit'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import myImport from '@/views/components/myImport'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { selectTenantWarehouse, getCategorySelectTree } from '@/api/baseSetting/finsystenant'; |
| | | import { selectTenantWarehouse, treeList } from '@/api/baseSetting/finsystenant'; |
| | | import {warningConfigGetDel} from '@/api/stock/ledger' |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import { mapGetters } from 'vuex'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2, edit, myImport }, |
| | | components: { MyButton, MyTableV2, edit }, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'warehouseId',queryKey: 'agencyId'},{key:'goodsTemplateId',queryKey: 'agencyId'}], |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | optionsConfig: { |
| | | label: 'warehouseName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse' |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'warehouseId', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'categoryId',queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'categoryId', |
| | | label: '分类', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel' |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'warehouseId', |
| | | dataIndex: 'costType', |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/GOODS_PRICE', |
| | | }, |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1, |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl() + '/pc/fin/sys/tenant/import', // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false, // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate', // 下载地址 |
| | | }, |
| | | onSuccess: null, |
| | | warehouseType: 0, |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | url: SettingIplatform.apiBaseURL + '/pc/warehouse/warningConfig/getList', // 请求地址 |
| | | // 工具条 |
| | | 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: 'summary', align: 'left' }, |
| | | { title: '保底库存', field: 'summary', align: 'left' }, |
| | | { title: '封顶库存', field: 'summary', align: 'left' }, |
| | | { title: '机构', field: 'agencyName', align: 'left' }, |
| | | { title: '仓库', field: 'warehouseName', align: 'center' }, |
| | | { title: '分类', field: 'categoryName', align: 'center' }, |
| | | { title: '所属类别', field: 'costType', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsName', align: 'left' }, |
| | | { title: '规格型号', field: 'modelName', align: 'left' }, |
| | | { title: '保底库存', field: 'lowerLimit', align: 'left' }, |
| | | { title: '封顶库存', field: 'upperLimit', align: 'left' }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['userInfo']), |
| | | }, |
| | | created() { |
| | | this.initQuery(); |
| | | }, |
| | | methods: { |
| | | initQuery() { |
| | | selectTenantWarehouse().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '仓库') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.warehouseName; |
| | | item.vlaue = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | getDicts('GOODS_PRICE').then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '类别') { |
| | | v.options = res.map((v) => { |
| | | v.label = v.dict_label; |
| | | v.value = v.dict_value; |
| | | return v; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | getCategorySelectTree().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '分类') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.label; |
| | | item.vlaue = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | del(row) { |
| | | this.$modal.confirm('是否确认删除名称为"' + row.name + '"的机构吗?').then(() => { |
| | | finsystenant.del({ id: row.id }).then((res) => { |
| | | this.$modal.confirm('是否确认删除此条的数据吗?').then(() => { |
| | | warningConfigGetDel({ id: row.id }).then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }); |
| | |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | if (this.filterFrom.agencyId && this.filterFrom.agencyId.length) { |
| | | this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; |
| | | } |
| | | this.search(1); |
| | | }, |
| | | }, |
| | |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'warehouseId',queryKey: 'agencyId'},{key:'goodsTemplateId',queryKey: 'agencyId'}], |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'warehouseName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse' |
| | | }, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goodsTemplateName', |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'categoryId',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: 'select', |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/GOODS_PRICE', |
| | | }, |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1, |
| | | warehouseType:0 |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initQuery(); |
| | | // this.initQuery(); |
| | | }, |
| | | methods: { |
| | | initQuery() { |
| | | selectTenantWarehouse().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '仓库') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.warehouseName; |
| | | item.value = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | console.log('this.items', this.items); |
| | | }); |
| | | getDicts('GOODS_PRICE').then((res) => { |
| | | // 价值类型1A 2B 3C |
| | | this.items.forEach((v) => { |
| | | if (v.label == '类别') { |
| | | v.options = res.map((v) => { |
| | | v.label = v.dict_label; |
| | | if (v.dict_value == 'A') { |
| | | v.value = 1; |
| | | } else if (v.dict_value == 'B') { |
| | | v.value = 2; |
| | | } else { |
| | | v.value = 3; |
| | | } |
| | | return v; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | treeList().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '分类') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.categoryName; |
| | | item.value = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 导出 |
| | | handleExport() { |
| | | let loading = this.$loading({ |
| | |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | if (params.agencyId && params.agencyId.length) { |
| | | this.filterFrom.agencyId = params.agencyId[params.agencyId.length - 1]; |
| | | } |
| | | this.search(1); |
| | | }, |
| | | }, |
| | |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { getCategorySelectTree, goodsModel } from '@/api/baseSetting/finsystenant'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [ |
| | | { key: 'warehouseId', queryKey: 'agencyId' }, |
| | | { key: 'goodsTemplateId', queryKey: 'agencyId' }, |
| | | ], |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | type: 'select', |
| | | dataIndex: 'warehouseId', |
| | | label: '仓库', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'warehouseName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{ key: 'categoryId', queryKey: 'goodsTemplatesId' }], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | dataIndex: 'baseGoodsModelsId', |
| | | label: '规格型号', |
| | | placeholder: '请选择', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '分类', |
| | | dataIndex: 'flowType', |
| | | label: '类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'dict_label', |
| | | value: 'dict_value', |
| | | url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/FLOW_TYPE', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '操作人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val1', |
| | | label: '出库时间', |
| | | label: '时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | url: SettingIplatform.apiBaseURL + '/pc/warehouse/flow/getTaiZhangList', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: { |
| | |
| | | { title: '仓库', field: 'warehouseName', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '类型', field: 'summary', align: 'left' }, |
| | | { title: '单号', field: 'summary', align: 'left' }, |
| | | { title: '数量', field: 'counts', align: 'left' }, |
| | | { title: '操作前数量', field: 'summary', align: 'left' }, |
| | | { title: '操作后数量', field: 'summary', align: 'left' }, |
| | | { title: '在途', field: 'summary', align: 'left' }, |
| | | { title: '操作时间', field: 'summary', align: 'left' }, |
| | | { |
| | | title: '类型', |
| | | field: 'summary', |
| | | align: 'left', |
| | | formatter: (row) => { |
| | | let result = ''; |
| | | let arr = ['采购入库', '调拨', '其他出库', '部门分发', '报废出库', '部门物品回退仓库', '物品盘点']; |
| | | if (row.businessType == 7) { |
| | | if (this.thisType == 1) { |
| | | result = '盘盈入库'; |
| | | } else { |
| | | result = '盘亏出库'; |
| | | } |
| | | }else if(this.businessType == 2) { |
| | | if (this.thisType == 1) { |
| | | result = '调拨入库'; |
| | | } else { |
| | | result = '调拨出库'; |
| | | } |
| | | }else { |
| | | result = arr[row.businessType - 1]; |
| | | } |
| | | return { value: result }; |
| | | }, |
| | | }, |
| | | { title: '单号', field: 'businessFormCode', align: 'left' }, |
| | | { title: '数量', field: 'thisCount', align: 'left' }, |
| | | { title: '操作前数量', field: 'initialCount', align: 'left' }, |
| | | { title: '操作后数量', field: 'endCount', align: 'left' }, |
| | | { title: '在途', field: 'zaiTuCount', align: 'left' }, |
| | | { |
| | | title: '操作时间', |
| | | field: 'dealTime', |
| | | align: 'left', |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.dealTime) }; |
| | | }, |
| | | }, |
| | | ], |
| | | paging: { |
| | | show: true, // 显示分页 |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initQuery(); |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | initQuery() { |
| | | goodsModel().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '规格型号') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.modelName; |
| | | item.vlaue = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | getDicts('GOODS_PRICE').then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '类别') { |
| | | v.options = res.map((v) => { |
| | | v.label = v.dict_label; |
| | | v.value = v.dict_value; |
| | | return v; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | getCategorySelectTree().then((res) => { |
| | | this.items.forEach((v) => { |
| | | if (v.label == '分类') { |
| | | v.options = res.map((item) => { |
| | | item.label = item.label; |
| | | item.vlaue = item.id; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | |
| | | this.getCategoryTree(); |
| | | this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); |
| | | this.formData.operatorId = this.userInfo.userCode; |
| | | this.formData.operatorName = this.userInfo.id; |
| | | this.formData.operatorName = this.userInfo.userName; |
| | | this.formData.agencyId = this.userInfo.tenantId; |
| | | this.formData.agencyName = this.userInfo.tenantName; |
| | | this.formData.warehouseId = this.userInfo.tenantId; |
| | | this.formData.warehouseName = this.userInfo.tenantName; |
| | | this.formData.WAREHOUSE_TYPE = 0; |
| | | this.formData.warehouseType = 0; |
| | | }, |
| | | async getCategoryTree() { |
| | | // 获取物品分类列表 |