From 774e6e650b6235a9e34dfecab65c4322c1767714 Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期五, 01 十二月 2023 16:48:15 +0800 Subject: [PATCH] feat: 库存管理 查询条件梳理 --- admin-web/src/views/stock/ledger/alertQuery/index.vue | 229 ++++++++++++++++++++++++++++----------------------------- 1 files changed, 112 insertions(+), 117 deletions(-) diff --git a/admin-web/src/views/stock/ledger/alertQuery/index.vue b/admin-web/src/views/stock/ledger/alertQuery/index.vue index 1bd1040..9ae6e63 100644 --- a/admin-web/src/views/stock/ledger/alertQuery/index.vue +++ b/admin-web/src/views/stock/ledger/alertQuery/index.vue @@ -16,61 +16,81 @@ </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 { getDicts } from '@/api/system/dict/data'; +import * as finsystenant from '@/api/baseSetting/finsystenant'; +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: 'goodsTemplateId', queryKey: 'categoryId'}], + optionsConfig: { + label: 'label', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', + props: {checkStrictly: false, emitPath: false, value: 'id'} + }, }, { 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: [{ + label: 'A', + value: '1' + }, { + label: 'B', + value: '2' + }, { + label: 'C', + value: '3' + }], }, ], // 鏍戞暟鎹� @@ -80,25 +100,7 @@ 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: '', @@ -110,29 +112,49 @@ 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', 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: 'center', + width: 90, + formatter: (row) => { + return { + type: row.warningType == 1 ? 'warning' : 'danger', + value: row.warningType == 1 ? '搴撳瓨宸茶秴' : '棰勮缂鸿揣', + }; //棰勮绫诲瀷锛�1=搴撳瓨宸茶秴锛�2=棰勮缂鸿揣锛� + }, + }, + { + title: '棰勮鏃堕棿', + field: 'warningTime', + align: 'center', + width: 160, + formatter: (row) => { + return {value: DateFormatter.LongToDateTime(row.warningTime)}; + }, + }, ], paging: { show: true, // 鏄剧ず鍒嗛〉 @@ -141,70 +163,43 @@ 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) => { + .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�') + .then(function () { + finsystenant.del({id: row.id}).then((res) => { + }); + }) + .then((res) => { + this.$message.success('鍒犻櫎鎴愬姛锛�'); + this.search(); + }) + .catch(() => { }); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search() - }) - .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> -- Gitblit v1.9.1