From 13b0bad30ef1df53492cbab1c1b99dfc02dee63f Mon Sep 17 00:00:00 2001 From: haoyahui <2032914783@qq.com> Date: 星期二, 21 十一月 2023 17:51:16 +0800 Subject: [PATCH] 台账管理,盘点任务开发 --- admin-web/src/views/stock/ledger/alertQuery/index.vue | 214 +++++++++++++++++++++++++---------------------------- 1 files changed, 102 insertions(+), 112 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..0c53e12 100644 --- a/admin-web/src/views/stock/ledger/alertQuery/index.vue +++ b/admin-web/src/views/stock/ledger/alertQuery/index.vue @@ -10,67 +10,85 @@ <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', + }, }, ], // 鏍戞暟鎹� @@ -80,25 +98,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 +110,48 @@ 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, // 鏄剧ず鍒嗛〉 @@ -141,70 +160,41 @@ 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> -- Gitblit v1.9.1