From 6843b10472482b305b5580cc2f5cdbb97fb9a203 Mon Sep 17 00:00:00 2001 From: haoyahui <2032914783@qq.com> Date: 星期一, 13 十一月 2023 17:31:43 +0800 Subject: [PATCH] 调拨,库存盘点,报废管理,台账管理 --- admin-web/src/views/stock/inventorycount/inventorytask/index.vue | 113 +- admin-web/src/views/stock/procure/purchaseOrder/detail.vue | 2 admin-web/src/utils/settingIplatform.js | 4 admin-web/src/views/stock/scrap/itemScrapping/edit.vue | 137 +- admin-web/src/views/stock/transfer/transferApplication/index.vue | 8 admin-web/src/views/stock/accessStock/outbound/detail.vue | 9 admin-web/src/views/stock/ledger/inventoryAlert/index.vue | 294 +++--- admin-web/src/api/baseSetting/finsystenant.js | 41 admin-web/src/views/stock/accessStock/outbound/index.vue | 32 admin-web/src/views/stock/inventorycount/inventorytask/edit.vue | 50 admin-web/src/views/stock/index.scss | 9 admin-web/src/views/stock/accessStock/outbound/edit.vue | 169 +-- admin-web/public/static/config.js | 3 admin-web/src/views/stock/ledger/alertQuery/index.vue | 182 +-- admin-web/src/views/stock/transfer/transferdetails/index.vue | 57 + admin-web/src/views/stock/ledger/inventoryQuery/index.vue | 290 ++--- admin-web/src/views/stock/procure/receiptDetails/index.vue | 2 admin-web/src/views/stock/procure/purchaseOrder/index.vue | 9 admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue | 125 + admin-web/src/views/stock/scrap/itemScrapping/detail.vue | 166 ++ admin-web/src/views/stock/ledger/ledgerQuery/index.vue | 306 +++--- /dev/null | 111 -- admin-web/src/views/stock/procure/purchaseOrder/edit.vue | 5 admin-web/src/api/stock/accessStock.js | 34 admin-web/src/views/stock/scrap/itemScrapping/index.vue | 177 ++- admin-web/src/views/stock/scrap/scrapDetails/index.vue | 162 +-- admin-web/src/views/stock/ledger/inventoryAlert/edit.vue | 151 +- 27 files changed, 1,313 insertions(+), 1,335 deletions(-) diff --git a/admin-web/public/static/config.js b/admin-web/public/static/config.js index 6dfc779..bac4b67 100644 --- a/admin-web/public/static/config.js +++ b/admin-web/public/static/config.js @@ -14,7 +14,8 @@ // 鎺ュ彛璇锋眰鍦板潃 // apiBaseURL: 'http://116.198.39.83:8082/progress', // 姝e紡 // apiBaseURL: 'http://172.16.60.90:8082/progress',//寮�鍙� - apiBaseURL: 'http://172.16.60.175:8083/lowConsum',//寮�鍙� + apiBaseURL: 'http://172.16.20.10:8083/lowConsum',//寮�鍙� + // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//寮�鍙� // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 娴嬭瘯, // socket杩炴帴 wsSocketUrl: VUE_APP_WS_URL, diff --git a/admin-web/src/api/baseSetting/finsystenant.js b/admin-web/src/api/baseSetting/finsystenant.js index 6c943c6..aafc643 100644 --- a/admin-web/src/api/baseSetting/finsystenant.js +++ b/admin-web/src/api/baseSetting/finsystenant.js @@ -137,3 +137,44 @@ export function getUserByOrgId(parameter) { return request.get(SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getUserByOrgId', {params: parameter}) } + +// 浠撳簱閫夋嫨鍒楄〃 +export function selectTenantWarehouse(params) { + return request({ + url: '/pc/base/warehouse/select/tenant_warehouse', + method: 'get', + params, + }); +} + +// 鐗╁搧鍒嗙被鍒楄〃 +export function getCategoryDetail(params) { + return request({ + url: '/pc/base/category/detail', + method: 'get', + params, + }); +} + +// 鐗╁搧鍒楄〃 +export function goodsTemplate(params) { + return request({ + url: '/pc/base/goods/template/query/goodsTemplate', + method: 'get', + params, + }); +} + +// 瑙勬牸鍨嬪彿 +export function goodsModel(params) { + return request({ + url: '/pc/base/goods/models/query/goodsModel', + method: 'get', + params, + }); +} + +// 鐗╁搧鍒嗙被tree +export function getCategorySelectTree(parameter) { + return request.get(SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', {params: parameter}) +} \ No newline at end of file diff --git a/admin-web/src/api/stock/accessStock.js b/admin-web/src/api/stock/accessStock.js new file mode 100644 index 0000000..12e3820 --- /dev/null +++ b/admin-web/src/api/stock/accessStock.js @@ -0,0 +1,34 @@ +import request from '@/utils/request'; + +// 鍑哄簱鍒楄〃 +export function outputList(params) { + return request({ + url: '/pc/l/wh/form/output/list', + method: 'get', + params, + }); +} +// 鏂板鍑哄簱 +export function outputAdd(data) { + return request({ + url: '/pc/l/wh/form/output/add', + method: 'post', + data, + }); +} +// 鍑哄簱璇︽儏 +export function outputDetail(params) { + return request({ + url: '/pc/l/wh/form/output/detail', + method: 'get', + params, + }); +} +// 搴撳瓨 +export function outputSelectNumber(params) { + return request({ + url: '/pc/l/wh/form/output/select/number', + method: 'get', + params, + }); +} diff --git a/admin-web/src/utils/settingIplatform.js b/admin-web/src/utils/settingIplatform.js index a733a0e..265c004 100644 --- a/admin-web/src/utils/settingIplatform.js +++ b/admin-web/src/utils/settingIplatform.js @@ -13,7 +13,9 @@ // 鎺ュ彛璇锋眰鍦板潃 // apiBaseURL: 'http://116.198.39.83:8082/progress', // 姝e紡 // apiBaseURL: 'http://172.16.60.90:8082/progress',//寮�鍙� - apiBaseURL: 'http://172.16.60.175:8083/lowConsum',//寮�鍙� + // apiBaseURL: 'http://172.16.60.175:8083/lowConsum',//寮�鍙� + apiBaseURL: 'http://172.16.20.10:8083/lowConsum',//寮�鍙� + // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//寮�鍙� // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 娴嬭瘯, // socket杩炴帴 wsSocketUrl: VUE_APP_WS_URL, diff --git a/admin-web/src/views/stock/accessStock/outbound/detail.vue b/admin-web/src/views/stock/accessStock/outbound/detail.vue index c973e30..cb6d618 100644 --- a/admin-web/src/views/stock/accessStock/outbound/detail.vue +++ b/admin-web/src/views/stock/accessStock/outbound/detail.vue @@ -30,7 +30,7 @@ <div class="img-box"></div> </el-col> </el-row> - <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex"> + <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.goods" :key="goodsIndex"> <el-row :gutter="20"> <el-col :span="8"> <span>鐗╁搧鍒嗙被锛�</span> @@ -67,7 +67,7 @@ </win-md> </template> <script> -import { procureDetail } from '@/api/stock/procure/purchaseOrder'; +import { outputDetail } from '@/api/stock/accessStock'; import winMd from '@/components/win/win-md'; import * as DateFormatter from '@/utils/DateFormatter'; @@ -90,8 +90,7 @@ agencyName: '', states: '', createName: '', - time: '', - procureGoods: [{}, {}], + goods: [], }, }; }, @@ -102,7 +101,7 @@ }, }, created() { - procureDetail({ id: this.setting.id }).then((res) => { + outputDetail({ id: this.setting.id }).then((res) => { this.detail = res; }); }, diff --git a/admin-web/src/views/stock/accessStock/outbound/edit.vue b/admin-web/src/views/stock/accessStock/outbound/edit.vue index 22d1448..fce80a0 100644 --- a/admin-web/src/views/stock/accessStock/outbound/edit.vue +++ b/admin-web/src/views/stock/accessStock/outbound/edit.vue @@ -6,14 +6,14 @@ <el-col :span="12"> <el-form-item label="鍑哄簱浠撳簱" prop="warehouseId"> <el-select v-model="formData.warehouseId" placeholder="璇烽�夋嫨" style="width: 100%"> - <el-option v-for="item in warehouses" :key="item.id" :label="item.warehouseName" :value="item.id" /> + <el-option v-for="item in warehouseOptions" :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="procureTime"> + <el-form-item label="鍑哄簱鏃堕棿" prop="dealTime"> <el-date-picker - v-model="formData.procureTime" + v-model="formData.dealTime" type="datetime" value="yyyy-MM-dd HH:mm:ss" value-format="yyyyMMddHHmmss" @@ -25,18 +25,18 @@ </el-col> </el-row> <el-row :gutter="24" class="headerHeight"> - <el-col :span="12"> + <el-col :span="24"> <el-form-item label="鍑哄簱鎵嬬画" prop="procureDoc"> - <upload :settings="uploadSettings" @on-change="uploadChange"></upload> + <upload ref="uploadRef" :settings="uploadSettings" @on-change="uploadChange"></upload> </el-form-item> </el-col> </el-row> - <div class="goods-card" v-for="(goodsItem, goodsIndex) in formData.procureGoods" :key="goodsIndex"> + <div class="goods-card" v-for="(goodsItem, goodsIndex) in formData.goods" :key="goodsIndex"> <el-row :gutter="24"> <el-col :span="12"> <el-form-item label="鐗╁搧鍒嗙被" - :prop="`procureGoods[${goodsIndex}].baseCategoryIds`" + :prop="`goods[${goodsIndex}].baseCategoryIds`" :rules="{ required: true, message: '璇烽�夋嫨', @@ -55,7 +55,7 @@ <el-col :span="12"> <el-form-item label="鐗╁搧鍚嶇О" - :prop="`procureGoods[${goodsIndex}].baseGoodsTemplateId`" + :prop="`goods[${goodsIndex}].baseGoodsTemplateId`" :rules="{ required: true, message: '璇烽�夋嫨', @@ -84,7 +84,7 @@ <el-col :span="12"> <el-form-item label="瑙勬牸鍨嬪彿" - :prop="`procureGoods[${goodsIndex}].modelsIds`" + :prop="`goods[${goodsIndex}].modelsIds`" :rules="{ required: true, message: '璇烽�夋嫨', @@ -138,7 +138,7 @@ </el-table> <div class="btn-group"> <el-button - v-if="formData.procureGoods.length > 1" + v-if="formData.goods.length > 1" name="绉婚櫎" type="danger" plain @@ -147,7 +147,7 @@ >绉婚櫎</el-button > <el-button - v-if="formData.procureGoods.length - 1 == goodsIndex" + v-if="formData.goods.length - 1 == goodsIndex" name="鏂板鐗╁搧" type="primary" plain @@ -168,12 +168,13 @@ <script> import { goodsTemplate, - procureAdd, - procureEdit, - selectTenantWarehouse, goodsModel, - procureDetail, -} from '@/api/stock/procure/purchaseOrder'; + selectTenantWarehouse, +} from '@/api/baseSetting/finsystenant'; +import { + outputAdd, + outputSelectNumber +} from '@/api/stock/accessStock'; import { getTree } from '@/api/foudation/classification'; import MyButton from '@/components/myButton/myButton'; import winMd from '@/components/win/win-md'; @@ -192,35 +193,21 @@ }, data() { return { - visible: false, loading: false, - buyTypeOptions: [ - { - label: '闆嗛噰', - value: '1', - }, - { - label: '鑷噰', - value: '2', - }, - ], - warehouses: [], // 鍑哄簱浠撳簱鍒楄〃 + warehouseOptions: [], // 鍑哄簱浠撳簱鍒楄〃 categoryOptions: [], // 鐗╁搧鍒嗙被鍒楄〃 modelList: [], //鍨嬪彿鍒楄〃 formData: { warehouseId: '', // 鍑哄簱浠撳簱id - procureTime: '', // 鍑哄簱鏃堕棿 - buyType: '2', // 鍑哄簱鏂瑰紡锛�1锛氶泦閲囷紱2=鑷噰锛� - procureGoods: [], + dealTime: '', // 鍑哄簱鏃堕棿 + procureDoc: '', + goods: [], }, goodsItem: { - whFormProcureId: '', // 鍑哄簱鍗旾D baseCategoryIds: '', // 鍒嗙被缂栧彿鏁扮粍 baseCategoryId: '', // 鍒嗙被缂栧彿 baseGoodsTemplateId: '', // 鐗╁搧妯$増缂栧彿 goodsTemplateName: '', // 鐗╁搧妯$増鍚嶇О - supplier: '', // 渚涘簲鍟� - sort: '', // 鏄剧ず椤哄簭 goodsOptions: [], // 鐗╁搧鍒楄〃select modelsOptions: [], //瑙勬牸鍨嬪彿select models: [], // 鐗╁搧鍚嶇О @@ -228,18 +215,16 @@ }, modelsItem: { baseGoodsModelsId: '', // 瑙勬牸鍨嬪彿缂栧彿 - price: 0, // 鍗曚环(鍑哄簱闇�瑕侊紝璋冩嫧涓嶉渶瑕�) worehouseCount: 0, counts: 0, // 鎿嶄綔鏁伴噺 - supplier: '', // 渚涘簲鍟� unit: null, //鍗曚綅 }, rules: { warehouseId: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], - procureTime: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], + dealTime: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], buyType: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], - // procureDoc: [{ required: true, message: '璇蜂笂浼�', trigger: 'change' }], + procureDoc: [{ required: true, message: '璇蜂笂浼�', trigger: 'change' }], baseCategoryIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], baseGoodsTemplateId: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], modelsIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], @@ -248,13 +233,13 @@ uploadSettings: { title: '涓婁紶', max: 20, // 鏈�澶уぇ灏忥紝鍗曚綅M - num: 2, // 鏀寔涓婁紶鍥剧墖涓暟 + num: 10, // 鏀寔涓婁紶鍥剧墖涓暟 accept: '.jpg,.png', // 闄愬埗鏍煎紡 tip: '', // 鎻愮ず 榛樿锛歚鍙兘涓婁紶${this.defaultSettings.num}涓�${this.defaultSettings.accept}鏂囦欢锛屼笖涓嶈秴杩�${this.defaultSettings.max}kb` uploadUrl: getUploadUrl(), // 涓婁紶璺緞 multiple: true, // 鏄惁鏀寔鎵归噺涓婁紶 disabled: false, // 鏄惁绂佺敤 - type: 'text', // text/picture + type: 'picture', // text/picture }, }; }, @@ -269,39 +254,17 @@ // 鑾峰彇鐗╁搧鍒嗙被鍒楄〃 const treeRes = await getTree(); this.categoryOptions = this.removeEmptyChildren(treeRes); - if (this.setting.id) { - const detail = await procureDetail({ id: this.setting.id }); - this.formData = Object.assign(this.formData, detail); - this.$set(this.formData, 'buyType', this.formData.buyType.toString()); - this.formData.procureTime = this.formData.procureTime.toString(); - this.formData.procureGoods.map((item, index) => { - // 鏍规嵁瀛愰泦ID鎷兼帴鐗╁搧鍒嗙被鍒楄〃 - let pIds = this.findParentIds(this.categoryOptions, item.baseCategoryId); - pIds = pIds.reverse(); - item.baseCategoryIds = [...pIds, item.baseCategoryId]; - this.$set( - this.formData.procureGoods[index], - 'modelsIds', - item.models.map((v) => v.baseGoodsModelsId), - ); - this.getgoodsTemplate(item.baseCategoryId, index); - this.getgoodsModel(item.baseGoodsTemplateId, index); - return item; - }); - } else { - this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); - } - this.visible = true; + this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem))); }, // 鑾峰彇鍑哄簱浠撳簱鍒楄〃 getWarehouseList() { selectTenantWarehouse() .then((res) => { - this.warehouses = res; - if (this.warehouses.length && !this.formData.warehouseId) { + this.warehouseOptions = res; + if (this.warehouseOptions.length && !this.formData.warehouseId) { // 榛樿閫変腑绗竴涓粨搴� - this.formData.warehouseId = this.warehouses[0].id; + this.formData.warehouseId = this.warehouseOptions[0].id; } }) .catch((err) => { @@ -324,7 +287,7 @@ getgoodsTemplate(id, index) { goodsTemplate({ categoryId: id || '' }).then((res) => { if (index || index == 0) { - this.$set(this.formData.procureGoods[index], 'goodsOptions', res); + this.$set(this.formData.goods[index], 'goodsOptions', res); } else { this.goodsTemplatelAll = res; } @@ -335,7 +298,7 @@ getgoodsModel(id, index) { goodsModel({ goodsTemplatesId: id || '' }).then((res) => { if (index || index == 0) { - this.$set(this.formData.procureGoods[index], 'modelsOptions', res); + this.$set(this.formData.goods[index], 'modelsOptions', res); } else { this.goodsModelAll = res; } @@ -362,67 +325,70 @@ // 鐗╁搧鍒嗙被閫夋嫨 categoryChange(e, index) { - this.formData.procureGoods[index].goodsOptions = []; - this.formData.procureGoods[index].baseGoodsTemplateId = ''; - this.formData.procureGoods[index].goodsTemplateName = ''; - this.formData.procureGoods[index].modelsOptions = []; - this.formData.procureGoods[index].modelsIds = []; - this.formData.procureGoods[index].models = []; + this.formData.goods[index].goodsOptions = []; + this.formData.goods[index].baseGoodsTemplateId = ''; + this.formData.goods[index].goodsTemplateName = ''; + this.formData.goods[index].modelsOptions = []; + this.formData.goods[index].modelsIds = []; + this.formData.goods[index].models = []; - this.formData.procureGoods[index].baseCategoryId = e[e.length - 1]; + this.formData.goods[index].baseCategoryId = e[e.length - 1]; // 鏍规嵁閫変腑鍒嗙被璇锋眰鐗╁搧鍚嶇О鍒楄〃 this.getgoodsTemplate(e[e.length - 1], index); }, // 鐗╁搧鍚嶇О鍒楄〃 goodsTemplateChange(e, index) { - this.formData.procureGoods[index].modelsOptions = []; - this.formData.procureGoods[index].modelsIds = []; - this.formData.procureGoods[index].models = []; + this.formData.goods[index].modelsOptions = []; + this.formData.goods[index].modelsIds = []; + this.formData.goods[index].models = []; - this.formData.procureGoods[index].goodsTemplateName = this.getGoodsTemplateName(e); + this.formData.goods[index].goodsTemplateName = this.getGoodsTemplateName(e); // 鏍规嵁閫変腑鐗╁搧鍚嶇Оid鑾峰彇瑙勬牸鍨嬪彿鍒楄〃 this.getgoodsModel(e, index); }, // 瑙勬牸鍨嬪彿閫夋嫨 - modelChange(e, index) { - let arr = [...this.formData.procureGoods[index].models]; + async modelChange(e, index) { + let arr = [...this.formData.goods[index].models]; let str = JSON.stringify(arr); - e.forEach((item) => { + for(let item of e) { if (str.indexOf(item) == -1) { let temp = this.goodsModelAll.find((v) => v.id == item); - arr.push({ ...this.modelsItem, baseGoodsModelsId: item, unit: temp.unit }); + // 鑾峰彇搴撳瓨 + let num = await outputSelectNumber({warehouseId:this.formData.warehouseId,baseGoodsModelsId:item}) + arr.push({ ...this.modelsItem, baseGoodsModelsId: item, unit: temp.unit,worehouseCount: num}); } - }); - this.formData.procureGoods[index].models = arr; + } + this.formData.goods[index].models = arr; }, // 瑙勬牸鍨嬪彿绉婚櫎 modelRemoveTag(e, index) { - let arr = this.formData.procureGoods[index].models; + let arr = this.formData.goods[index].models; let delIndex = arr.findIndex((v) => v.baseGoodsModelsId == e); - this.formData.procureGoods[index].models.splice(delIndex, 1); + this.formData.goods[index].models.splice(delIndex, 1); }, // 涓婁紶 - uploadChange(e) { - console.log('uploadChange', e); + uploadChange() { + let arr = this.$refs.uploadRef.fileList + this.formData.procureDoc = JSON.stringify(arr) }, // 鐐瑰嚮鏂板鐗╁搧 addGoods() { - this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); + this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem))); }, // 鐐瑰嚮绉婚櫎 removeGoods(index) { - this.formData.procureGoods.splice(index, 1); + this.formData.goods.splice(index, 1); }, // 鍑哄簱鏁伴噺鏍¢獙 countsChange(e, goodsIndex,index) { - const curItem = this.formData.procureGoods[goodsIndex].models[index] + const curItem = this.formData.goods[goodsIndex].models[index] const worehouseCount = curItem.worehouseCount if (e > worehouseCount) { this.$message.warning('鏁伴瓒呰繃鐜版湁搴撳瓨'); @@ -435,19 +401,7 @@ this.$refs['ruleForm'].validate((valid) => { if (valid) { console.log('this.formData', this.formData); - if (this.setting.id) { - procureAdd(this.formData) - .then((res) => { - this.$message.success('淇濆瓨鎴愬姛锛�'); - this.close(); - this.$emit('search'); - }) - .catch((err) => { - console.log('create err', err); - this.$message.error('淇濆瓨澶辫触'); - }); - } else { - procureEdit(this.formData) + outputAdd(this.formData) .then((res) => { this.$message.success('淇濆瓨鎴愬姛锛�'); this.close(); @@ -457,7 +411,6 @@ console.log('edit err', err); this.$message.error('淇濆瓨澶辫触'); }); - } } else { this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��'); } @@ -467,8 +420,8 @@ close() { this.formData = { warehouseId: '', // 鍑哄簱浠撳簱id - procureTime: '', // 鍑哄簱鏃堕棿 - procureGoods: [], + dealTime: '', // 鍑哄簱鏃堕棿 + goods: [], }; this.$emit('close'); }, diff --git a/admin-web/src/views/stock/accessStock/outbound/index.vue b/admin-web/src/views/stock/accessStock/outbound/index.vue index 28c09d9..30595e1 100644 --- a/admin-web/src/views/stock/accessStock/outbound/index.vue +++ b/admin-web/src/views/stock/accessStock/outbound/index.vue @@ -11,10 +11,9 @@ <!--鍒楄〃--> <div class="table-tool-bar" style="margin-bottom: 15px;"> <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" /> - <my-button name="瀵煎叆" @click="importSetting.dialogShow = true" site="tools" size="medium" /> </div> <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> - <el-row class="card" :gutter="5"> + <el-row v-if="list.length" class="card" :gutter="5"> <el-col v-for="(item, index) in list" :key="index" class="cm-item"> <el-card class="card-data"> <div class="card-container"> @@ -55,6 +54,7 @@ </el-card> </el-col> </el-row> + <div class="no-data" v-else>鏆傛棤鏁版嵁</div> </div> <el-pagination :small="false" @@ -82,7 +82,7 @@ </template> <script> -import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder'; +import { outputList, procureDel, procureIncome } from '@/api/stock/accessStock'; import MyButton from '@/components/myButton/myButton'; import SettingIplatform from '@/utils/settingIplatform'; import myImport from '@/views/components/myImport'; @@ -116,10 +116,11 @@ defaultValue: '', }, { - type: 'select', - dataIndex: 'name', + type: 'cascader', + dataIndex: 'agencyId', label: '鏈烘瀯', placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, defaultValue: '', options: [], }, @@ -199,11 +200,12 @@ }, created() { this.fetchData(); + }, methods: { fetchData() { this.loading = true; - procureList({ + outputList({ pageNum: this.pageNum, pageSize: this.pageSize, ...this.filterFrom, @@ -279,11 +281,14 @@ this.search({ pageNum: 1 }); }, handleCurrentChange(pageNum) { - this.myTable.paging.page.pageNum = pageNum; - this.search({ pageNum: pageNum }); + this.pageNum = pageNum; + this.search(); }, // 鏌ヨtable鍒楄〃 search(pageNum) { + if(pageNum){ + this.pageNum = pageNum + } this.fetchData(); }, refreshData() { @@ -293,7 +298,16 @@ }, fifterForm(params) { this.filterFrom = Object.assign(this.filterFrom, params); - this.search(1); + if (this.filterFrom.incomeTimeStart) { + this.filterFrom.incomeTimeStart = this.filterFrom.incomeTimeStart.replace(/\-/g, ''); + } + if (this.filterFrom.incomeTimeEnd) { + this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, ''); + } + if (this.filterFrom.agencyId.length) { + this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; + } + this.search({ pageNum: 1 }); }, }, }; diff --git a/admin-web/src/views/stock/index.scss b/admin-web/src/views/stock/index.scss index fc19052..2e75344 100644 --- a/admin-web/src/views/stock/index.scss +++ b/admin-web/src/views/stock/index.scss @@ -2,10 +2,12 @@ .ml-20 { margin-left: 20px; } - .card { + .card,.list-item { display: flex; flex-wrap: wrap; margin: 0px !important; + width: 100%; + min-height: 100%; .cm-item { width: 100%; } @@ -14,6 +16,7 @@ } } .card-data { + width: 100%; position: relative; margin-top: 8px; .card-container { @@ -121,6 +124,10 @@ } } } +.no-data{ + margin-top: 100px; + text-align: center; +} /*缂栬緫*/ .stock-edit{ diff --git a/admin-web/src/views/stock/inventorycount/exceptionDetails/edit.vue b/admin-web/src/views/stock/inventorycount/exceptionDetails/edit.vue deleted file mode 100644 index 37b0db9..0000000 --- a/admin-web/src/views/stock/inventorycount/exceptionDetails/edit.vue +++ /dev/null @@ -1,111 +0,0 @@ -<template> - <win-sm :title="setting.title" @close="close" :width="'800px'"> - <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> - <el-form-item label="缂栧彿" prop="code"> - <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鍦板潃" > - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-switch - v-model="formData.status" - active-color="#0d997c" - inactive-color="#C0CCDA"> - </el-switch> - </el-form-item> - </el-form> - <div slot="footer" align="center" class="dialog-footer"> - <my-button name="鍙栨秷" site="form" @click="close"/> - <my-button name="淇濆瓨" site="form" @click="save"/> - </div> - </win-sm> -</template> - -<script> -import winSm from '@/components/win/win-sm' -import myButton from '@/components/myButton/myButton' -import * as finsystenant from '@/api/baseSetting/finsystenant' - -export default { - components: {winSm, myButton}, - props: { - setting: { - type: Object, - default: () => { - } - } - }, - data() { - return { - checkAll: false, - checkedList: [], - formData: { - code: '', - name: '', - status: true, - summary: '', - }, - rules: { - code: [ - {required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur'} - ], - name: [ - {required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur'} - ], - status: [ - {required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur'} - ] - } - } - }, - created() { - if(this.setting.info){ - this.formData = Object.assign({},JSON.parse(this.setting.info)) - } - }, - methods: { - getEditInfo(id){ - - }, - close() { - this.$emit('close') - }, - 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('淇濆瓨澶辫触') - } - }) - }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('淇濆瓨澶辫触') - } - }) - } - } else { - this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��') - } - }) - } - } -} -</script> diff --git a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue b/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue index 54f2d7d..53c6390 100644 --- a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue +++ b/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue @@ -13,8 +13,6 @@ <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> </el-col> </el-row> - <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> </el-card> </el-container> </el-container> @@ -30,48 +28,90 @@ import MyTableV2 from "@/components/myTable/myTableV2"; 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'; export default { name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + components: {MyButton, MyTableV2, myImport}, data() { return { // 鎼滅储妗� items: [ { - type: 'text', - dataIndex: 'name', - label: '鐩樼偣鍗曞彿', - placeholder: '璇疯緭鍏�', - defaultValue: '' + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], }, - // { - // type: 'select', - // dataIndex: 'status', - // label: '绫诲瀷', - // placeholder: '璇烽�夋嫨', - // defaultValue: '1', - // options: [ - // { - // label: '鍚敤', - // value: '1' - // }, - // { - // label: '绂佺敤', - // value: '0' - // } - // ] - // }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '鐩樼偣浠撳簱', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, { type: 'text', dataIndex: 'name', - label: '浠诲姟鍚嶇О', + label: '鐗╁搧鍚嶇О', placeholder: '璇疯緭鍏�', defaultValue: '' + }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '绫诲瀷', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '鍑哄叆搴撶被鍨�', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'text', + dataIndex: 'name', + label: '鍗曞彿', + placeholder: '璇疯緭鍏�', + defaultValue: '' + }, + { + type: 'text', + dataIndex: 'name', + label: '鎿嶄綔浜�', + placeholder: '璇疯緭鍏�', + defaultValue: '' + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeStart', + label: '鏃堕棿', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeEnd', + label: '鑷�', + defaultValue: '', }, ], // 鏍戞暟鎹� @@ -126,27 +166,24 @@ }, // 鍒椾俊鎭� 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: 'name', align: 'left',}, + {title: '鐗╁搧鍚嶇О', field: 'WAREHOUSE_NAME', 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: 'summary', align: 'left',}, + {title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left',}, ], // 鎿嶄綔淇℃伅 operation: { - show: true, // 鏄剧ず鎿嶄綔鍒� + show: false, // 鏄剧ず鎿嶄綔鍒� width: '150', // 鍒楀 - attr: [ - { - title: '璇︽儏', - events: (row) => { - this.showAudit(row); - }, - }, - ], + attr: [], }, paging: { show: true, // 鏄剧ず鍒嗛〉 diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue b/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue index 7a747d4..78b8913 100644 --- a/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue +++ b/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue @@ -1,23 +1,36 @@ <template> <win-sm :title="setting.title" @close="close" :width="'800px'"> <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> - <el-form-item label="鐩樼偣鍗曞悕" prop="code"> - <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%" /> + <el-form-item label="鐩樼偣鍗曞悕" prop="businessFormName"> + <el-input + disabled + v-model="formData.businessFormName" + clearable + maxlength="20" + show-word-limit + style="width: 100%" + /> </el-form-item> - <el-form-item label="鐩樼偣浠撳簱" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%" /> + <el-form-item label="鐩樼偣浠撳簱" prop="warehouseName"> + <el-select v-model="formData.warehouseId" placeholder="璇烽�夋嫨" style="width: 100%"> + <el-option v-for="item in warehouseOptions" :key="item.id" :label="item.warehouseName" :value="item.id" /> + </el-select> </el-form-item> - <el-form-item label="鐩樼偣浜�"> - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%" /> + <el-form-item label="鐩樼偣浜�" prop="operatorName"> + <el-select v-model="formData.warehouseId" placeholder="璇烽�夋嫨" style="width: 100%"> + <el-option v-for="item in operatorOptions" :key="item.id" :label="item.warehouseName" :value="item.id" /> + </el-select> </el-form-item> - <el-form-item label="鐩戠洏浜�"> - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%" /> + <el-form-item label="鐩戠洏浜�" prop="operatorName2"> + <el-select v-model="formData.warehouseId" placeholder="璇烽�夋嫨" style="width: 100%"> + <el-option v-for="item in operatorOptions" :key="item.id" :label="item.warehouseName" :value="item.id" /> + </el-select> </el-form-item> - <el-form-item label="澶囨敞" prop="status"> + <el-form-item label="澶囨敞" prop="beiz1"> <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" - v-model="formData.adss" + v-model="formData.beiz1" resize="none" maxlength="100" show-word-limit @@ -32,6 +45,7 @@ </template> <script> +import { selectTenantWarehouse } from '@/api/baseSetting/finsystenant'; import winSm from '@/components/win/win-sm'; import myButton from '@/components/myButton/myButton'; import * as finsystenant from '@/api/baseSetting/finsystenant'; @@ -48,6 +62,8 @@ return { checkAll: false, checkedList: [], + warehouseOptions: [], // 浠撳簱鍒楄〃 + operatorOptions:[], formData: { code: '', name: '', @@ -55,9 +71,10 @@ summary: '', }, rules: { - code: [{ required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur' }], - name: [{ required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur' }], - status: [{ required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur' }], + businessFormName: [{ required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur' }], + warehouseName: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }], + operatorName: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }], + operatorName2: [{ required: true, message: '璇烽�夋嫨', trigger: 'blur' }], }, }; }, @@ -65,8 +82,15 @@ if (this.setting.info) { this.formData = Object.assign({}, JSON.parse(this.setting.info)); } + this.handleSelectTenantWarehouse(); }, methods: { + // 鑾峰彇浠撳簱鍒楄〃 + handleSelectTenantWarehouse() { + selectTenantWarehouse().then((res) => { + this.warehouseOptions = res; + }); + }, getEditInfo(id) {}, close() { this.$emit('close'); diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue index 97040e4..2313f2c 100644 --- a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue +++ b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue @@ -41,6 +41,7 @@ import * as finsystenant from '@/api/baseSetting/finsystenant'; import myImport from '@/views/components/myImport'; import { getBaseUrl } from '@/utils/base'; +import { selectTenantWarehouse } from '@/api/baseSetting/finsystenant'; export default { name: 'index', @@ -51,16 +52,36 @@ items: [ { type: 'text', - dataIndex: 'name', + dataIndex: 'businessFormCode', label: '鐩樼偣鍗曞彿', placeholder: '璇疯緭鍏�', defaultValue: '', }, { type: 'text', - dataIndex: 'name', + dataIndex: 'businessFormName', label: '浠诲姟鍚嶇О', placeholder: '璇疯緭鍏�', + defaultValue: '', + }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '鐩樼偣浠撳簱', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeStart', + label: '鐩樼偣鏃堕棿', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeEnd', + label: '鑷�', defaultValue: '', }, ], @@ -130,14 +151,14 @@ }, // 鍒椾俊鎭� 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: 'businessFormCode', align: 'left' }, + { title: '浠诲姟鍚嶇О', field: 'businessFormName', align: 'center' }, + { title: '鐩樼偣浠撳簱', field: 'warehouseName', align: 'center' }, + { title: '鐩樼偣浜�', field: 'operatorName', align: 'center' }, + { title: '鐩戠洏浜�', field: 'operatorName2', align: 'left' }, + { title: '鐩樼偣鏃堕棿', field: 'inventoryDate', align: 'left' }, + { title: '鍒涘缓鏃堕棿', field: 'createTime', align: 'left' }, + { title: '鐘舵��', field: 'states', align: 'left' }, ], // 鎿嶄綔淇℃伅 operation: { @@ -152,7 +173,7 @@ }, { title: '鐩樼偣', - type:'success', + type: 'success', events: (row) => { this.showInventory(row); }, @@ -173,8 +194,17 @@ }; }, created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData(); + 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 + }) + } + }) + }) }, methods: { //瀵煎叆 @@ -190,41 +220,14 @@ callBack(); }; }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then((res) => { - const content = res || []; - this.treeDataList.splice(0, this.treeDataList.length); - this.treeDataList = content; - if (content.length > 0) { - this.importSetting.fileSettings.data = { pid: content[0].id }; - } - }); - }, - updState(row) { - let vm = this; - let text = row.status == 0 ? '鍚敤' : '绂佺敤'; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row); - params.status = row.status == 1 ? 0 : 1; - finsystenant.edit(params).then((res) => { - if (res) { - row.status = row.status === 1 ? 0 : 1; - vm.$modal.msgSuccess(text + '鎴愬姛'); - vm.search(); - } - }); - }); - }, del(row) { this.$modal .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�') - .then(function () { - finsystenant.del({ id: row.id }).then((res) => {}); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search(); + .then(() => { + finsystenant.del({ id: row.id }).then((res) => { + this.$message.success('鍒犻櫎鎴愬姛锛�'); + this.search(); + }); }) .catch(() => {}); }, @@ -240,30 +243,12 @@ this.editSetting.title = '缂栬緫'; this.editSetting.show = true; }, + // 鐩樼偣 showInventory(row) { this.inventorySetting.id = row.id; this.inventorySetting.info = JSON.stringify(row); this.inventorySetting.title = '鐩樼偣'; this.inventorySetting.show = true; - }, - nodeClick(param) { - param = param || {}; - this.p = Object.assign( - {}, - { - id: param.id, - name: param.name, - }, - ); - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id; - this.editSetting.orgId = this.p.id; - } else { - this.filterFrom.tenantId = null; - this.editSetting.orgId = null; - } - this.importSetting.fileSettings.data = { pid: param.id }; - this.search(1); }, // 鏌ヨtable鍒楄〃 search(pageNum) { diff --git a/admin-web/src/views/stock/ledger/alertQuery/index.vue b/admin-web/src/views/stock/ledger/alertQuery/index.vue index 2936cd9..1bd1040 100644 --- a/admin-web/src/views/stock/ledger/alertQuery/index.vue +++ b/admin-web/src/views/stock/ledger/alertQuery/index.vue @@ -13,8 +13,6 @@ <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> </el-col> </el-row> - <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> </el-card> </el-container> </el-container> @@ -30,42 +28,19 @@ import MyTableV2 from "@/components/myTable/myTableV2"; 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 { getDicts } from '@/api/system/dict/data'; export default { name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + components: {MyButton, MyTableV2, myImport}, data() { return { // 鎼滅储妗� items: [ - { - type: 'text', - dataIndex: 'name', - label: '鍗曞彿', - placeholder: '璇疯緭鍏�', - defaultValue: '' - }, - { - type: 'select', - dataIndex: 'status', - label: '绫诲瀷', - placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] - }, { type: 'text', dataIndex: 'name', @@ -74,11 +49,28 @@ defaultValue: '' }, { - type: 'text', - dataIndex: 'name', - label: '鍒涘缓浜�', - placeholder: '璇疯緭鍏�', - defaultValue: '' + type: 'select', + dataIndex: 'status', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [] + }, + { + type: 'select', + dataIndex: 'status', + label: '鍒嗙被', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [] + }, + { + type: 'select', + dataIndex: 'status', + label: '绫诲埆', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [] }, ], // 鏍戞暟鎹� @@ -133,29 +125,15 @@ }, // 鍒椾俊鎭� 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: 'summary', align: 'left',}, + {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',}, ], - // 鎿嶄綔淇℃伅 - operation: { - show: true, // 鏄剧ず鎿嶄綔鍒� - width: '150', // 鍒楀 - attr: [ - { - title: '璇︽儏', - events: (row) => { - this.showAudit(row); - }, - }, - ], - }, paging: { show: true, // 鏄剧ず鍒嗛〉 // 鍒嗛〉淇℃伅 @@ -170,48 +148,32 @@ } }, created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData() + this.initQuery(); }, methods: { - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then(res => { - const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) - this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } - }) - }, - updState(row) { - let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.edit(params).then(res => { - if (res) { - row.status = row.status === 1 ? 0 : 1 - vm.$modal.msgSuccess(text + "鎴愬姛"); - vm.search() + 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 @@ -226,38 +188,6 @@ }) .catch(() => { }); - }, - showAdd() { - // if (!this.editSetting.orgId) { - // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') - // } else { - this.editSetting.id = null; - this.editSetting.info = null; - this.editSetting.title = '鏂板'; - this.editSetting.show = true; - // } - }, - showAudit(row) { - this.editSetting.id = row.id; - this.editSetting.info = JSON.stringify(row); - this.editSetting.title = '缂栬緫'; - this.editSetting.show = true; - }, - nodeClick(param) { - param = param || {} - this.p = Object.assign({}, { - id: param.id, - name: param.name - }) - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id - this.editSetting.orgId = this.p.id - } else { - this.filterFrom.tenantId = null - this.editSetting.orgId = null - } - this.importSetting.fileSettings.data = {pid: param.id} - this.search(1) }, // 鏌ヨtable鍒楄〃 search(pageNum) { diff --git a/admin-web/src/views/stock/ledger/inventoryAlert/edit.vue b/admin-web/src/views/stock/ledger/inventoryAlert/edit.vue index 37b0db9..c700a5d 100644 --- a/admin-web/src/views/stock/ledger/inventoryAlert/edit.vue +++ b/admin-web/src/views/stock/ledger/inventoryAlert/edit.vue @@ -1,111 +1,124 @@ <template> - <win-sm :title="setting.title" @close="close" :width="'800px'"> + <win-md :title="setting.title" @close="close" :width="'800px'"> <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> - <el-form-item label="缂栧彿" prop="code"> - <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鍦板潃" > - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-switch - v-model="formData.status" - active-color="#0d997c" - inactive-color="#C0CCDA"> - </el-switch> - </el-form-item> + <el-row :gutter="24"> + <el-col :span="12"> + <el-form-item label="鐗╁搧鍒嗙被" prop="code"> + <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%" /> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐗╁搧鍚嶇О" prop="name"> + <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%" /> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="24"> + <el-col :span="12"> + <el-form-item label="瑙勬牸鍨嬪彿"> + <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%" /> + </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="baseGoodsModelsId" label="淇濆簳搴撳瓨" align="center"> + <template slot-scope="scope"> + <el-input v-model="scope.row.baseGoodsModelsId"></el-input> + </template> + </el-table-column> + <el-table-column prop="baseGoodsModelsId" label="灏侀《搴撳瓨" align="center"> + <template slot-scope="scope"> + <el-input v-model="scope.row.baseGoodsModelsId"></el-input> + </template> + </el-table-column> + </el-table> </el-form> <div slot="footer" align="center" class="dialog-footer"> - <my-button name="鍙栨秷" site="form" @click="close"/> - <my-button name="淇濆瓨" site="form" @click="save"/> + <my-button name="鍙栨秷" site="form" @click="close" /> + <my-button name="淇濆瓨" site="form" @click="save" /> </div> - </win-sm> + </win-md> </template> <script> -import winSm from '@/components/win/win-sm' -import myButton from '@/components/myButton/myButton' -import * as finsystenant from '@/api/baseSetting/finsystenant' +import winMd from '@/components/win/win-md'; +import myButton from '@/components/myButton/myButton'; +import * as finsystenant from '@/api/baseSetting/finsystenant'; export default { - components: {winSm, myButton}, + components: { winMd, myButton }, props: { setting: { type: Object, - default: () => { - } - } + default: () => {}, + }, }, data() { return { checkAll: false, checkedList: [], formData: { - code: '', - name: '', - status: true, - summary: '', + baseCategoryIds: '', // 鍒嗙被缂栧彿鏁扮粍 + baseCategoryId: '', // 鍒嗙被缂栧彿 + 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'} - ] - } - } + code: [{ required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur' }], + name: [{ required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur' }], + status: [{ required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur' }], + }, + }; }, created() { - if(this.setting.info){ - this.formData = Object.assign({},JSON.parse(this.setting.info)) + if (this.setting.info) { + this.formData = Object.assign({}, JSON.parse(this.setting.info)); } }, methods: { - getEditInfo(id){ - - }, + getEditInfo(id) {}, close() { - this.$emit('close') + this.$emit('close'); }, save() { this.$refs.ruleForm.validate((valid) => { if (valid) { - const params = Object.assign({}, this.formData) - if(this.setting.id){ + const params = Object.assign({}, this.formData); + if (this.setting.id) { // 缂栬緫鎺ュ彛 - finsystenant.edit(params).then(res => { + finsystenant.edit(params).then((res) => { if (res) { - this.$message.success('淇濆瓨鎴愬姛锛�') - this.close() - this.$emit('search') + this.$message.success('淇濆瓨鎴愬姛锛�'); + this.close(); + this.$emit('search'); } else { - this.$message.error('淇濆瓨澶辫触') + this.$message.error('淇濆瓨澶辫触'); } - }) - }else{ - params.orgId = this.setting.orgId - finsystenant.add(params).then(res => { + }); + } else { + params.orgId = this.setting.orgId; + finsystenant.add(params).then((res) => { if (res) { - this.$message.success('淇濆瓨鎴愬姛锛�') - this.close() - this.$emit('search') + this.$message.success('淇濆瓨鎴愬姛锛�'); + this.close(); + this.$emit('search'); } else { - this.$message.error('淇濆瓨澶辫触') + this.$message.error('淇濆瓨澶辫触'); } - }) + }); } } else { - this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��') + this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��'); } - }) - } - } -} + }); + }, + }, +}; </script> diff --git a/admin-web/src/views/stock/ledger/inventoryAlert/index.vue b/admin-web/src/views/stock/ledger/inventoryAlert/index.vue index 2936cd9..c4a97a1 100644 --- a/admin-web/src/views/stock/ledger/inventoryAlert/index.vue +++ b/admin-web/src/views/stock/ledger/inventoryAlert/index.vue @@ -10,11 +10,11 @@ <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> <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> + <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search" /> </el-card> </el-container> </el-container> @@ -27,58 +27,62 @@ </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 edit from './edit' -import * as finsystenant from '@/api/baseSetting/finsystenant' -import myImport from '@/views/components/myImport' -import {getBaseUrl} from '@/utils/base'; +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 { getDicts } from '@/api/system/dict/data'; export default { - name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + name: 'index', + components: { MyButton, MyTableV2, edit, myImport }, data() { return { // 鎼滅储妗� items: [ { - type: 'text', - dataIndex: 'name', - label: '鍗曞彿', - placeholder: '璇疯緭鍏�', - defaultValue: '' + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], }, { type: 'select', - dataIndex: 'status', - label: '绫诲瀷', + dataIndex: 'warehouseId', + label: '浠撳簱', placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] + defaultValue: '', + options: [], }, { type: 'text', dataIndex: 'name', label: '鐗╁搧鍚嶇О', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', }, { - type: 'text', - dataIndex: 'name', - label: '鍒涘缓浜�', - placeholder: '璇疯緭鍏�', - defaultValue: '' + type: 'select', + dataIndex: 'warehouseId', + label: '鍒嗙被', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '绫诲埆', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], }, ], // 鏍戞暟鎹� @@ -88,25 +92,25 @@ tenantId: null, userName: null, userPhone: null, - status: 1 + 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 + 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, }, editSetting: { title: '', @@ -121,27 +125,40 @@ url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃 // 宸ュ叿鏉� tools: { - columnsCtrl: {// 鍒楁帶鍒舵寜閽� - show: false + columnsCtrl: { + // 鍒楁帶鍒舵寜閽� + show: false, }, - generalExport: {// 閫氱敤瀵煎嚭鎸夐挳 - show: false + generalExport: { + // 閫氱敤瀵煎嚭鎸夐挳 + show: false, }, // 鑷畾涔夊伐鍏锋潯鎸夐挳 custom: [ - ] + { + name: '鏂板', + click: () => { + this.showAdd(null); + }, + }, + { + name: '瀵煎嚭', + click: () => { + this.handleExport(); + }, + }, + ], }, // 鍒椾俊鎭� 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: 'summary', align: 'left',}, + { 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' }, ], // 鎿嶄綔淇℃伅 operation: { @@ -149,9 +166,15 @@ width: '150', // 鍒楀 attr: [ { - title: '璇︽儏', + title: '缂栬緫', events: (row) => { this.showAudit(row); + }, + }, + { + title: '鍒犻櫎', + events: (row) => { + this.del(row); }, }, ], @@ -163,79 +186,64 @@ small: false, pageNum: 1, pageSize: 10, - total: 0 - } - } + total: 0, + }, + }, }, - } + }; }, created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData() + this.initQuery(); }, methods: { - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then(res => { - const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) - this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } - }) - }, - updState(row) { - let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.edit(params).then(res => { - if (res) { - row.status = row.status === 1 ? 0 : 1 - vm.$modal.msgSuccess(text + "鎴愬姛"); - vm.search() + 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(function () { - finsystenant.del({id: row.id}).then((res) => { - }); - }) - .then((res) => { + this.$modal.confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�').then(() => { + finsystenant.del({ id: row.id }).then((res) => { this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search() - }) - .catch(() => { + this.search(); }); + }); }, showAdd() { - // if (!this.editSetting.orgId) { - // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') - // } else { - this.editSetting.id = null; - this.editSetting.info = null; - this.editSetting.title = '鏂板'; - this.editSetting.show = true; - // } + this.editSetting.id = null; + this.editSetting.info = null; + this.editSetting.title = '鏂板'; + this.editSetting.show = true; }, showAudit(row) { this.editSetting.id = row.id; @@ -243,38 +251,20 @@ this.editSetting.title = '缂栬緫'; this.editSetting.show = true; }, - nodeClick(param) { - param = param || {} - this.p = Object.assign({}, { - id: param.id, - name: param.name - }) - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id - this.editSetting.orgId = this.p.id - } else { - this.filterFrom.tenantId = null - this.editSetting.orgId = null - } - this.importSetting.fileSettings.data = {pid: param.id} - this.search(1) - }, // 鏌ヨ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> diff --git a/admin-web/src/views/stock/ledger/inventoryQuery/edit.vue b/admin-web/src/views/stock/ledger/inventoryQuery/edit.vue deleted file mode 100644 index 37b0db9..0000000 --- a/admin-web/src/views/stock/ledger/inventoryQuery/edit.vue +++ /dev/null @@ -1,111 +0,0 @@ -<template> - <win-sm :title="setting.title" @close="close" :width="'800px'"> - <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> - <el-form-item label="缂栧彿" prop="code"> - <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鍦板潃" > - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-switch - v-model="formData.status" - active-color="#0d997c" - inactive-color="#C0CCDA"> - </el-switch> - </el-form-item> - </el-form> - <div slot="footer" align="center" class="dialog-footer"> - <my-button name="鍙栨秷" site="form" @click="close"/> - <my-button name="淇濆瓨" site="form" @click="save"/> - </div> - </win-sm> -</template> - -<script> -import winSm from '@/components/win/win-sm' -import myButton from '@/components/myButton/myButton' -import * as finsystenant from '@/api/baseSetting/finsystenant' - -export default { - components: {winSm, myButton}, - props: { - setting: { - type: Object, - default: () => { - } - } - }, - data() { - return { - checkAll: false, - checkedList: [], - formData: { - code: '', - name: '', - status: true, - summary: '', - }, - rules: { - code: [ - {required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur'} - ], - name: [ - {required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur'} - ], - status: [ - {required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur'} - ] - } - } - }, - created() { - if(this.setting.info){ - this.formData = Object.assign({},JSON.parse(this.setting.info)) - } - }, - methods: { - getEditInfo(id){ - - }, - close() { - this.$emit('close') - }, - 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('淇濆瓨澶辫触') - } - }) - }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('淇濆瓨澶辫触') - } - }) - } - } else { - this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��') - } - }) - } - } -} -</script> diff --git a/admin-web/src/views/stock/ledger/inventoryQuery/index.vue b/admin-web/src/views/stock/ledger/inventoryQuery/index.vue index 2936cd9..4f67bc0 100644 --- a/admin-web/src/views/stock/ledger/inventoryQuery/index.vue +++ b/admin-web/src/views/stock/ledger/inventoryQuery/index.vue @@ -10,11 +10,9 @@ <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> - <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> </el-card> </el-container> </el-container> @@ -27,58 +25,62 @@ </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 edit from './edit' -import * as finsystenant from '@/api/baseSetting/finsystenant' -import myImport from '@/views/components/myImport' -import {getBaseUrl} from '@/utils/base'; +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'; export default { - name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + name: 'index', + components: { MyButton, MyTableV2, myImport }, data() { return { // 鎼滅储妗� items: [ { - type: 'text', - dataIndex: 'name', - label: '鍗曞彿', - placeholder: '璇疯緭鍏�', - defaultValue: '' + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], }, { type: 'select', - dataIndex: 'status', - label: '绫诲瀷', + dataIndex: 'warehouseId', + label: '浠撳簱', placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] + defaultValue: '', + options: [], }, { type: 'text', dataIndex: 'name', label: '鐗╁搧鍚嶇О', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', }, { - type: 'text', - dataIndex: 'name', - label: '鍒涘缓浜�', - placeholder: '璇疯緭鍏�', - defaultValue: '' + type: 'select', + dataIndex: 'modelsIds', + multiple: true, + label: '鍒嗙被', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '绫诲埆', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], }, ], // 鏍戞暟鎹� @@ -88,25 +90,25 @@ tenantId: null, userName: null, userPhone: null, - status: 1 + 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 + 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, }, editSetting: { title: '', @@ -121,41 +123,28 @@ url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃 // 宸ュ叿鏉� 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: 'summary', align: 'left',}, + { 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' }, ], - // 鎿嶄綔淇℃伅 - operation: { - show: true, // 鏄剧ず鎿嶄綔鍒� - width: '150', // 鍒楀 - attr: [ - { - title: '璇︽儏', - events: (row) => { - this.showAudit(row); - }, - }, - ], - }, paging: { show: true, // 鏄剧ず鍒嗛〉 // 鍒嗛〉淇℃伅 @@ -163,118 +152,65 @@ small: false, pageNum: 1, pageSize: 10, - total: 0 - } - } + total: 0, + }, + }, }, - } + }; }, created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData() + this.initQuery(); }, methods: { - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then(res => { - const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) - this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } - }) - }, - updState(row) { - let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.edit(params).then(res => { - if (res) { - row.status = row.status === 1 ? 0 : 1 - vm.$modal.msgSuccess(text + "鎴愬姛"); - vm.search() + 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; + }); } - }) - }) - }, - del(row) { - this.$modal - .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�') - .then(function () { - finsystenant.del({id: row.id}).then((res) => { - }); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search() - }) - .catch(() => { }); - }, - showAdd() { - // if (!this.editSetting.orgId) { - // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') - // } else { - this.editSetting.id = null; - this.editSetting.info = null; - this.editSetting.title = '鏂板'; - this.editSetting.show = true; - // } - }, - showAudit(row) { - this.editSetting.id = row.id; - this.editSetting.info = JSON.stringify(row); - this.editSetting.title = '缂栬緫'; - this.editSetting.show = true; - }, - nodeClick(param) { - param = param || {} - this.p = Object.assign({}, { - id: param.id, - name: param.name - }) - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id - this.editSetting.orgId = this.p.id - } else { - this.filterFrom.tenantId = null - this.editSetting.orgId = null - } - this.importSetting.fileSettings.data = {pid: param.id} - this.search(1) + }); + 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; + }); + } + }); + }); }, // 鏌ヨ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> diff --git a/admin-web/src/views/stock/ledger/ledgerQuery/edit.vue b/admin-web/src/views/stock/ledger/ledgerQuery/edit.vue deleted file mode 100644 index 37b0db9..0000000 --- a/admin-web/src/views/stock/ledger/ledgerQuery/edit.vue +++ /dev/null @@ -1,111 +0,0 @@ -<template> - <win-sm :title="setting.title" @close="close" :width="'800px'"> - <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> - <el-form-item label="缂栧彿" prop="code"> - <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鍦板潃" > - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-switch - v-model="formData.status" - active-color="#0d997c" - inactive-color="#C0CCDA"> - </el-switch> - </el-form-item> - </el-form> - <div slot="footer" align="center" class="dialog-footer"> - <my-button name="鍙栨秷" site="form" @click="close"/> - <my-button name="淇濆瓨" site="form" @click="save"/> - </div> - </win-sm> -</template> - -<script> -import winSm from '@/components/win/win-sm' -import myButton from '@/components/myButton/myButton' -import * as finsystenant from '@/api/baseSetting/finsystenant' - -export default { - components: {winSm, myButton}, - props: { - setting: { - type: Object, - default: () => { - } - } - }, - data() { - return { - checkAll: false, - checkedList: [], - formData: { - code: '', - name: '', - status: true, - summary: '', - }, - rules: { - code: [ - {required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur'} - ], - name: [ - {required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur'} - ], - status: [ - {required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur'} - ] - } - } - }, - created() { - if(this.setting.info){ - this.formData = Object.assign({},JSON.parse(this.setting.info)) - } - }, - methods: { - getEditInfo(id){ - - }, - close() { - this.$emit('close') - }, - 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('淇濆瓨澶辫触') - } - }) - }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('淇濆瓨澶辫触') - } - }) - } - } else { - this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��') - } - }) - } - } -} -</script> diff --git a/admin-web/src/views/stock/ledger/ledgerQuery/index.vue b/admin-web/src/views/stock/ledger/ledgerQuery/index.vue index 2936cd9..b32fc38 100644 --- a/admin-web/src/views/stock/ledger/ledgerQuery/index.vue +++ b/admin-web/src/views/stock/ledger/ledgerQuery/index.vue @@ -10,11 +10,9 @@ <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> - <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> </el-card> </el-container> </el-container> @@ -27,58 +25,87 @@ </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 edit from './edit' -import * as finsystenant from '@/api/baseSetting/finsystenant' -import myImport from '@/views/components/myImport' -import {getBaseUrl} from '@/utils/base'; +import * as finsystenant from '@/api/baseSetting/finsystenant'; +import myImport from '@/views/components/myImport'; +import { getBaseUrl } from '@/utils/base'; +import { getCategorySelectTree, goodsModel } from '@/api/baseSetting/finsystenant'; +import { getDicts } from '@/api/system/dict/data'; export default { - name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + name: 'index', + components: { MyButton, MyTableV2, myImport }, data() { return { // 鎼滅储妗� items: [ { - type: 'text', - dataIndex: 'name', - label: '鍗曞彿', - placeholder: '璇疯緭鍏�', - defaultValue: '' - }, - { - type: 'select', - dataIndex: 'status', - label: '绫诲瀷', + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], }, { type: 'text', dataIndex: 'name', label: '鐗╁搧鍚嶇О', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', + }, + { + type: 'select', + dataIndex: 'status', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'status', + label: '鍒嗙被', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'status', + label: '绫诲埆', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], }, { type: 'text', dataIndex: 'name', - label: '鍒涘缓浜�', + label: '鍗曞彿', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', + }, + { + type: 'text', + dataIndex: 'name', + label: '鎿嶄綔浜�', + placeholder: '璇疯緭鍏�', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'val1', + label: '鍑哄簱鏃堕棿', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'val2', + label: '鑷�', + defaultValue: '', }, ], // 鏍戞暟鎹� @@ -88,25 +115,25 @@ tenantId: null, userName: null, userPhone: null, - status: 1 + 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 + 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, }, editSetting: { title: '', @@ -121,41 +148,31 @@ url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃 // 宸ュ叿鏉� 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: 'summary', align: 'left',}, + { 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: 'summary', align: 'left' }, + { title: '鍦ㄩ��', field: 'summary', align: 'left' }, + { title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left' }, ], - // 鎿嶄綔淇℃伅 - operation: { - show: true, // 鏄剧ず鎿嶄綔鍒� - width: '150', // 鍒楀 - attr: [ - { - title: '璇︽儏', - events: (row) => { - this.showAudit(row); - }, - }, - ], - }, paging: { show: true, // 鏄剧ず鍒嗛〉 // 鍒嗛〉淇℃伅 @@ -163,78 +180,71 @@ small: false, pageNum: 1, pageSize: 10, - total: 0 - } - } + total: 0, + }, + }, }, - } + }; }, created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData() + this.initQuery(); }, methods: { - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then(res => { - const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) - this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } - }) - }, - updState(row) { - let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.edit(params).then(res => { - if (res) { - row.status = row.status === 1 ? 0 : 1 - vm.$modal.msgSuccess(text + "鎴愬姛"); - vm.search() + 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 + '"鐨勬満鏋勫悧锛�') .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(() => {}); }, showAdd() { // if (!this.editSetting.orgId) { // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') // } else { - this.editSetting.id = null; - this.editSetting.info = null; - this.editSetting.title = '鏂板'; - this.editSetting.show = true; + this.editSetting.id = null; + this.editSetting.info = null; + this.editSetting.title = '鏂板'; + this.editSetting.show = true; // } }, showAudit(row) { @@ -243,38 +253,18 @@ this.editSetting.title = '缂栬緫'; this.editSetting.show = true; }, - nodeClick(param) { - param = param || {} - this.p = Object.assign({}, { - id: param.id, - name: param.name - }) - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id - this.editSetting.orgId = this.p.id - } else { - this.filterFrom.tenantId = null - this.editSetting.orgId = null - } - this.importSetting.fileSettings.data = {pid: param.id} - this.search(1) - }, // 鏌ヨ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> diff --git a/admin-web/src/views/stock/procure/purchaseOrder/detail.vue b/admin-web/src/views/stock/procure/purchaseOrder/detail.vue index d98bfd2..b5bf873 100644 --- a/admin-web/src/views/stock/procure/purchaseOrder/detail.vue +++ b/admin-web/src/views/stock/procure/purchaseOrder/detail.vue @@ -137,7 +137,7 @@ }, filters: { formatTime(time) { - if (!time) return; + if (!time) return '-'; return DateFormatter.LongToDateTime(time); }, }, diff --git a/admin-web/src/views/stock/procure/purchaseOrder/edit.vue b/admin-web/src/views/stock/procure/purchaseOrder/edit.vue index 259b8c8..121b417 100644 --- a/admin-web/src/views/stock/procure/purchaseOrder/edit.vue +++ b/admin-web/src/views/stock/procure/purchaseOrder/edit.vue @@ -224,7 +224,6 @@ procureGoods: [], }, goodsItem: { - whFormProcureId: '', // 閲囪喘鍗旾D baseCategoryIds: '', // 鍒嗙被缂栧彿鏁扮粍 baseCategoryId: '', // 鍒嗙被缂栧彿 baseGoodsTemplateId: '', // 鐗╁搧妯$増缂栧彿 @@ -288,13 +287,13 @@ this.formData.procureTime = this.formData.procureTime.toString(); this.formData.procureGoods.map((item, index) => { // 鏍规嵁瀛愰泦ID鎷兼帴鐗╁搧鍒嗙被鍒楄〃 - let pIds = this.findParentIds(this.categoryOptions, item.baseCategoryId); - item.baseCategoryIds = [...pIds, item.baseCategoryId]; + item.baseCategoryIds = this.findParentIds(this.categoryOptions, item.baseCategoryId); this.$set(this.formData.procureGoods[index],'modelsIds',item.models.map((v) => v.baseGoodsModelsId)) this.getgoodsTemplate(item.baseCategoryId, index); this.getgoodsModel(item.baseGoodsTemplateId, index); return item }); + console.log('this.formData.procureGoods',this.formData.procureGoods) } else { this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); } diff --git a/admin-web/src/views/stock/procure/purchaseOrder/index.vue b/admin-web/src/views/stock/procure/purchaseOrder/index.vue index d0deb5a..039e815 100644 --- a/admin-web/src/views/stock/procure/purchaseOrder/index.vue +++ b/admin-web/src/views/stock/procure/purchaseOrder/index.vue @@ -13,8 +13,8 @@ <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" /> <my-button name="瀵煎叆" @click="importSetting.dialogShow = true" site="tools" size="medium" /> </div> - <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> - <el-row class="card" :gutter="5"> + <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }"> + <el-row class="card" :gutter="5" v-loading="loading"> <el-col v-for="(item, index) in list" :key="index" class="cm-item"> <el-card class="card-data"> <div class="card-container"> @@ -326,7 +326,8 @@ // 鍒嗛〉 handleSizeChange(pageSize) { this.pageSize = pageSize; - this.search(1); + this.pageNum = 1; + this.search(); }, handleCurrentChange(pageNum) { this.pageNum = pageNum; @@ -355,7 +356,7 @@ if (this.filterFrom.agencyId.length) { this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; } - this.search(1); + this.search(); }, }, }; diff --git a/admin-web/src/views/stock/procure/receiptDetails/index.vue b/admin-web/src/views/stock/procure/receiptDetails/index.vue index dd58717..64d606b 100644 --- a/admin-web/src/views/stock/procure/receiptDetails/index.vue +++ b/admin-web/src/views/stock/procure/receiptDetails/index.vue @@ -60,7 +60,7 @@ }, { type: 'select', - dataIndex: 'baseGoodsTemplateId', + dataIndex: 'baseGoodsModelsId', label: '瑙勬牸鍨嬪彿', placeholder: '璇烽�夋嫨', defaultValue: '', diff --git a/admin-web/src/views/stock/scrap/itemScrapping/detail.vue b/admin-web/src/views/stock/scrap/itemScrapping/detail.vue index c1b2bc7..f8efa9f 100644 --- a/admin-web/src/views/stock/scrap/itemScrapping/detail.vue +++ b/admin-web/src/views/stock/scrap/itemScrapping/detail.vue @@ -1,59 +1,56 @@ <template> - <el-dialog - title="璇︽儏" - width="60%" - :modal="true" - :visible.sync="visible" - :top="'15vh'" - :close-on-click-modal="false" - :append-to-body="true" - :destroy-on-close="true" - @close="close" - class="stock-detail" - > + <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'"> <el-row :gutter="20"> <el-col :span="8"> - <span>鍏ュ簱鍗曞彿锛�</span> + <span>鎶ュ簾鍗曞彿锛�</span> <span>{{ detail.businessFormCode }}</span> </el-col> <el-col :span="8"> - <span>鍏ュ簱浠撳簱锛�</span> - <span>{{ detail.goodsTemplateName }}</span> + <span>鎶ュ簾浠撳簱锛�</span> + <span>{{ detail.warehouseName }}</span> </el-col> <el-col :span="8"> <span>鎵�灞炴満鏋勶細</span> - <span>{{ detail.agencyId }}</span> + <span>{{ detail.agencyName }}</span> </el-col> </el-row> <el-row :gutter="20" style="margin-top: 20px"> <el-col :span="8"> <span>鐘舵�侊細</span> - <span>{{ detail.states == 1 ? '寰呭叆搴�' : '宸插叆搴�' }}</span> + <span>{{ detail.states == 1 ? '寰呮姤搴�' : '宸叉姤搴�' }}</span> </el-col> <el-col :span="8"> <span>鍒涘缓浜猴細</span> <span>{{ detail.buyerName }}</span> </el-col> <el-col :span="8"> - <span>鍏ュ簱鏃堕棿锛�</span> - <span>{{ detail.time }}</span> + <span>鎶ュ簾鏃堕棿锛�</span> + <span>{{ detail.incomeTime | formatTime }}</span> + </el-col> + </el-row> + <el-row :gutter="20" style="margin-top: 20px"> + <el-col class="img-row" :span="12"> + <span>鎶ュ簾绫诲瀷锛�</span> + <span>{{ detail.buyType == 1 ? '闆嗛噰' : '鑷噰' }}</span> </el-col> </el-row> <el-row :gutter="20" style="margin-top: 20px"> <el-col class="img-row" :span="24"> - <span>閲囪喘鎵嬬画鐓х墖锛�</span> - <div class="img-box"></div> + <span>鎶ュ簾鎵嬬画鐓х墖锛�</span> + <div class="img-box" v-for="(item, index) in fileList" :key="index" @click="handlePreview(item)"> + <img class="img" :src="getUrl(item.path)" alt="" /> + </div> </el-col> </el-row> <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex"> <el-row :gutter="20"> <el-col :span="8"> <span>鐗╁搧鍒嗙被锛�</span> - <span>{{ goodsItem.baseCategoryId }}</span> + <span>{{ goodsItem.baseCategoryName }}</span> </el-col> <el-col :span="8"> <span>鐗╁搧鍚嶇О锛�</span> - <span>{{ goodsItem.baseGoodsTemplateId }}</span> + <span>{{ goodsItem.goodsTemplateName }}</span> </el-col> <el-col :span="8"> <span>渚涜揣鍟嗭細</span> @@ -61,9 +58,9 @@ </el-col> </el-row> <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px"> - <el-table-column prop="baseGoodsModelsId" label="瑙勬牸鍨嬪彿" align="center"> + <el-table-column prop="baseGoodsModelsName" label="瑙勬牸鍨嬪彿" align="center"> <template slot-scope="scope"> - {{ scope.row.baseGoodsModelsId }} + {{ scope.row.baseGoodsModelsName }} </template> </el-table-column> <el-table-column label="鍗曚綅" align="center"> @@ -71,50 +68,145 @@ {{ scope.row.unit }} </template> </el-table-column> - <el-table-column prop="price" label="鐜版湁搴撳瓨" align="center"> + <el-table-column prop="price" label="鍗曚环" align="center"> <template slot-scope="scope"> - <el-input v-model="scope.row.price"></el-input> + {{ scope.row.price }} </template> </el-table-column> - <el-table-column prop="counts" label="鍑哄簱鏁伴噺" align="center"> + <el-table-column prop="counts" label="鎶ュ簾鏁伴噺" align="center"> <template slot-scope="scope"> - <el-input v-model="scope.row.counts"></el-input> + {{ scope.row.counts }} + </template> + </el-table-column> + <el-table-column prop="counts" label="閲戦" align="center"> + <template slot-scope="scope"> + {{ (scope.row.price * scope.row.counts).toFixed(2) }} </template> </el-table-column> </el-table> </div> - </el-dialog> + <div id="uploadPreviewImages" style="display: none"> + <span v-for="(src, index) in fileList" :key="index"> + <img + v-if="checkImg(src.name)" + class="v-img" + :src="src.url" + :alt="src.name" + style="width: 100px; height: 100px" + /> + </span> + </div> + </win-md> </template> <script> import { procureDetail } from '@/api/stock/procure/purchaseOrder'; +import winMd from '@/components/win/win-md'; +import * as DateFormatter from '@/utils/DateFormatter'; +import { getDownUrl } from '@/utils/base'; +import Viewer from 'viewerjs'; +import 'viewerjs/dist/viewer.css'; + +let viewer = null; + export default { + components: { winMd }, + + props: { + setting: { + type: Object, + default: () => {}, + }, + }, data() { return { - visible: false, + fileList: [], detail: { + baseCategoryName: '', businessFormCode: '', goodsTemplateName: '', + procureDoc: '', agencyId: '', + agencyName: '', states: '', createName: '', time: '', procureGoods: [{}, {}], + fileKey: Math.random(), }, }; }, - methods: { - open(id) { - this.visible = true; - procureDetail({ id }).then((res) => { - this.detail = res; + filters: { + formatTime(time) { + if (!time) return; + return DateFormatter.LongToDateTime(time); + }, + }, + created() { + procureDetail({ id: this.setting.id }).then((res) => { + this.detail = res; + this.fileList = this.detail.procureDoc ? JSON.parse(this.detail.procureDoc) : []; + this.$nextTick(() => { + this.initPreviewImg(); }); + }); + }, + methods: { + initPreviewImg() { + if (viewer != null) { + viewer.destroy(); + } + const ViewerDom = document.querySelector('#uploadPreviewImages'); + viewer = new Viewer(ViewerDom, {}); + }, + handlePreview(file) { + if (!this.checkImg(file.name)) { + return false; + } + let index = 0; + for (let i = 0; i < this.fileList.length; i++) { + const f = this.fileList[i]; + if (this.checkImg(f.name)) { + if (file.id == f.id) { + break; + } + index++; + } + } + // this.fileList.forEach((f, i) => { + // if (file.uid == f.uid) { + // index = i + // } + // }) + // document.querySelector('#uploadPreviewImages').children[0].click() + viewer.view(index); + }, + checkImg(name) { + const suffix = name.substring(name.lastIndexOf('.'), name.length); + const imgArray = ['.jpg', '.jpeg', '.png', '.bmp']; + if (imgArray.indexOf(suffix) < 0) { + return false; + } + return true; + }, + getUrl(path) { + if (path.substr(0, 7).toLowerCase() == 'http://' || path.substr(0, 8).toLowerCase() == 'https://') { + return path; + } else { + return getDownUrl() + path; + } }, close() { - this.visible = false; + this.$emit('close'); }, }, }; </script> <style lang="scss" scoped> @import url(../../index.scss); +.el-dialog { + z-index: 1100 !important; +} +>>> .el-dialog { + z-index: 1100 !important; +} </style> diff --git a/admin-web/src/views/stock/scrap/itemScrapping/edit.vue b/admin-web/src/views/stock/scrap/itemScrapping/edit.vue index 7c48f51..88d341f 100644 --- a/admin-web/src/views/stock/scrap/itemScrapping/edit.vue +++ b/admin-web/src/views/stock/scrap/itemScrapping/edit.vue @@ -1,28 +1,17 @@ <template> - <el-dialog - :title="`${type == 'create' ? '鏂板' : '缂栬緫'}${title}`" - width="60%" - :modal="true" - :visible.sync="visible" - :top="'15vh'" - :close-on-click-modal="false" - :append-to-body="true" - :destroy-on-close="true" - @close="close" - class="stock-edit" - > + <win-md class="stock-edit" :title="`${setting.title}鎶ュ簾鎶ュ簾`" @close="close" :width="'800px'"> <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> <div class="main-w"> <el-row :gutter="24" class="headerHeight"> <el-col :span="12"> - <el-form-item label="鍏ュ簱浠撳簱" prop="warehouseId"> + <el-form-item label="鎶ュ簾浠撳簱" prop="warehouseId"> <el-select v-model="formData.warehouseId" placeholder="璇烽�夋嫨" style="width: 100%"> <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="procureTime"> + <el-form-item label="鎶ュ簾鏃堕棿" prop="procureTime"> <el-date-picker v-model="formData.procureTime" type="datetime" @@ -36,9 +25,18 @@ </el-col> </el-row> <el-row :gutter="24" class="headerHeight"> + <el-col :span="12"> + <el-form-item label="鎶ュ簾绫诲瀷" prop="buyType"> + <el-select v-model="formData.buyType" placeholder="璇烽�夋嫨" style="width: 100%"> + <el-option v-for="item in buyTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="24" class="headerHeight"> <el-col :span="24"> - <el-form-item label="閲囪喘鍏ュ簱鎵嬬画" prop="procureDoc"> - <upload :settings="uploadSettings" @on-change="uploadChange"></upload> + <el-form-item label="鎶ュ簾鎶ュ簾鎵嬬画" prop="procureDoc"> + <upload ref="uploadRef" :values="fileList" :settings="uploadSettings" @on-change="uploadChange"></upload> </el-form-item> </el-col> </el-row> @@ -142,7 +140,7 @@ <el-input type="number" v-model="scope.row.price"></el-input> </template> </el-table-column> - <el-table-column prop="counts" label="閲囪喘鏁伴噺" align="center"> + <el-table-column prop="counts" label="鎶ュ簾鏁伴噺" align="center"> <template slot-scope="scope"> <el-input type="number" v-model="scope.row.counts"></el-input> </template> @@ -172,10 +170,10 @@ </div> </el-form> <div slot="footer" align="center" class="dialog-footer"> - <el-button name="纭畾" site="form" type="primary" @click="handleSubmit">纭畾</el-button> - <el-button name="鍙栨秷" site="form" @click="close">鍙栨秷</el-button> + <my-button name="鍙栨秷" site="form" @click="close"/> + <my-button name="淇濆瓨" site="form" @click="handleSubmit"/> </div> - </el-dialog> + </win-md> </template> <script> import { @@ -190,33 +188,42 @@ import MyButton from '@/components/myButton/myButton'; import winMd from '@/components/win/win-md'; import upload from '@/components/upload/index'; -import { getUploadUrl } from '@/utils/base'; +import { getUploadUrl,getDownUrl} from '@/utils/base'; import SettingIplatform from '../../../../../public/static/config'; export default { components: { MyButton, winMd, upload }, props: { - title: { - type: String, - default: '閲囪喘鍏ュ簱', - }, + setting: { + type: Object, + default: () => { + } + } }, data() { return { - type: 'create', visible: false, loading: false, - warehouses: [], // 鍏ュ簱浠撳簱鍒楄〃 + buyTypeOptions:[{ + label:'闆嗛噰', + value: '1' + },{ + label:'鑷噰', + value: '2' + }], + fileList:[], + warehouses: [], // 鎶ュ簾浠撳簱鍒楄〃 categoryOptions: [], // 鐗╁搧鍒嗙被鍒楄〃 modelList: [], //鍨嬪彿鍒楄〃 formData: { - warehouseId: '', // 鍏ュ簱浠撳簱id - procureTime: '', // 閲囪喘鏃堕棿 + procureDoc:'', + warehouseId: '', // 鎶ュ簾浠撳簱id + procureTime: '', // 鎶ュ簾鏃堕棿 + buyType: '2', // 鎶ュ簾鏂瑰紡锛�1锛氶泦閲囷紱2=鑷噰锛� procureGoods: [], }, goodsItem: { - whFormProcureId: '', // 閲囪喘鍗旾D baseCategoryIds: '', // 鍒嗙被缂栧彿鏁扮粍 baseCategoryId: '', // 鍒嗙被缂栧彿 baseGoodsTemplateId: '', // 鐗╁搧妯$増缂栧彿 @@ -230,7 +237,7 @@ }, modelsItem: { baseGoodsModelsId: '', // 瑙勬牸鍨嬪彿缂栧彿 - price: 0, // 鍗曚环(閲囪喘闇�瑕侊紝璋冩嫧涓嶉渶瑕�) + price: 0, // 鍗曚环(鎶ュ簾闇�瑕侊紝璋冩嫧涓嶉渶瑕�) counts: 0, // 鎿嶄綔鏁伴噺 supplier: '', // 渚涘簲鍟� unit: null, //鍗曚綅 @@ -238,8 +245,9 @@ rules: { warehouseId: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], procureTime: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], + buyType: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], - // procureDoc: [{ required: true, message: '璇蜂笂浼�', trigger: 'change' }], + procureDoc: [{ required: true, message: '璇蜂笂浼�', trigger: 'change' }], baseCategoryIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], baseGoodsTemplateId: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], modelsIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], @@ -248,47 +256,51 @@ uploadSettings: { title: '涓婁紶', max: 20, // 鏈�澶уぇ灏忥紝鍗曚綅M - num: 2, // 鏀寔涓婁紶鍥剧墖涓暟 + num: 10, // 鏀寔涓婁紶鍥剧墖涓暟 accept: '.jpg,.png', // 闄愬埗鏍煎紡 tip: '', // 鎻愮ず 榛樿锛歚鍙兘涓婁紶${this.defaultSettings.num}涓�${this.defaultSettings.accept}鏂囦欢锛屼笖涓嶈秴杩�${this.defaultSettings.max}kb` uploadUrl: getUploadUrl(), // 涓婁紶璺緞 multiple: true, // 鏄惁鏀寔鎵归噺涓婁紶 disabled: false, // 鏄惁绂佺敤 - type: 'text', // text/picture + type: 'picture', // text/picture }, }; }, - created() {}, + created() { + this.init() + }, methods: { - async open(id) { + async init() { this.getWarehouseList(); + this.getgoodsTemplate() this.getgoodsModel(); // 鑾峰彇鐗╁搧鍒嗙被鍒楄〃 const treeRes = await getTree(); this.categoryOptions = this.removeEmptyChildren(treeRes); - if (id) { - this.type = 'edit'; - const detail = await procureDetail({ id }); - console.log('procureDetail', detail); + if (this.setting.id) { + const detail = await procureDetail({ id:this.setting.id }); this.formData = Object.assign(this.formData, detail); + if(this.formData.procureDoc) { + this.fileList = JSON.parse(this.formData.procureDoc) + } + this.$set(this.formData,'buyType',this.formData.buyType.toString()) this.formData.procureTime = this.formData.procureTime.toString(); this.formData.procureGoods.map((item, index) => { // 鏍规嵁瀛愰泦ID鎷兼帴鐗╁搧鍒嗙被鍒楄〃 - let pIds = this.findParentIds(this.categoryOptions, item.baseCategoryId); - pIds = pIds.reverse(); - item.baseCategoryIds = [...pIds, item.baseCategoryId]; - item.modelsIds = item.models.map((v) => v.baseGoodsModelsId); + item.baseCategoryIds = this.findParentIds(this.categoryOptions, item.baseCategoryId); + this.$set(this.formData.procureGoods[index],'modelsIds',item.models.map((v) => v.baseGoodsModelsId)) this.getgoodsTemplate(item.baseCategoryId, index); this.getgoodsModel(item.baseGoodsTemplateId, index); + return item }); + console.log('this.formData.procureGoods',this.formData.procureGoods) } else { - this.type = 'create'; this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); } this.visible = true; }, - // 鑾峰彇鍏ュ簱浠撳簱鍒楄〃 + // 鑾峰彇鎶ュ簾浠撳簱鍒楄〃 getWarehouseList() { selectTenantWarehouse() .then((res) => { @@ -319,6 +331,8 @@ goodsTemplate({ categoryId: id || '' }).then((res) => { if (index || index == 0) { this.$set(this.formData.procureGoods[index], 'goodsOptions', res); + }else { + this.goodsTemplatelAll = res; } }); }, @@ -332,6 +346,15 @@ this.goodsModelAll = res; } }); + }, + + // 鏍规嵁鐗╁搧鍚嶇Оid鑾峰彇鍚嶅瓧 + getGoodsTemplateName(id) { + let item = this.goodsTemplatelAll.find((v) => v.id == id); + if (item) { + return item.goodsName; + } + return; }, // 鏍规嵁瑙勬牸鍨嬪彿id鑾峰彇鍚嶅瓧 @@ -348,6 +371,9 @@ this.formData.procureGoods[index].goodsOptions = [] this.formData.procureGoods[index].baseGoodsTemplateId = '' this.formData.procureGoods[index].goodsTemplateName = '' + this.formData.procureGoods[index].modelsOptions = [] + this.formData.procureGoods[index].modelsIds = [] + this.formData.procureGoods[index].models = [] this.formData.procureGoods[index].baseCategoryId = e[e.length - 1]; // 鏍规嵁閫変腑鍒嗙被璇锋眰鐗╁搧鍚嶇О鍒楄〃 @@ -360,7 +386,7 @@ this.formData.procureGoods[index].modelsIds = [] this.formData.procureGoods[index].models = [] - this.formData.goodsTemplateName = this.getGoodsModelsName(e) + this.formData.procureGoods[index].goodsTemplateName = this.getGoodsTemplateName(e) // 鏍规嵁閫変腑鐗╁搧鍚嶇Оid鑾峰彇瑙勬牸鍨嬪彿鍒楄〃 this.getgoodsModel(e, index); }, @@ -386,8 +412,9 @@ }, // 涓婁紶 - uploadChange(e) { - console.log('uploadChange', e); + uploadChange() { + let arr = this.$refs.uploadRef.fileList + this.formData.procureDoc = JSON.stringify(arr) }, // 鐐瑰嚮鏂板鐗╁搧 @@ -405,7 +432,7 @@ this.$refs['ruleForm'].validate((valid) => { if (valid) { console.log('this.formData', this.formData); - if (this.type == 'create') { + if (!this.setting.id) { procureAdd(this.formData) .then((res) => { this.$message.success('淇濆瓨鎴愬姛锛�'); @@ -436,16 +463,16 @@ close() { this.formData ={ - warehouseId: '', // 鍏ュ簱浠撳簱id - procureTime: '', // 閲囪喘鏃堕棿 + warehouseId: '', // 鎶ュ簾浠撳簱id + procureTime: '', // 鎶ュ簾鏃堕棿 procureGoods: [], } - this.visible = false; + this.$emit('close') }, // 閫氳繃瀛愰泦id鏌ュ埌鎵�浠ョ浉鍏崇埗绾d骞惰繑鍥炴暟缁� findParentIds(dataSource, nodeId) { - const parentIds = []; // 鐢ㄤ簬瀛樺偍鎵�鏈夌埗鑺傜偣ID鐨勬暟缁� + const parentIds = [nodeId]; // 鐢ㄤ簬瀛樺偍鎵�鏈夌埗鑺傜偣ID鐨勬暟缁� // 瀹氫箟涓�涓�掑綊鍑芥暟锛岀敤浜庨亶鍘嗘暣妫垫爲骞舵煡鎵惧瓙鑺傜偣鐨勬墍鏈夌埗鑺傜偣 function traverse(node, nodeId) { @@ -459,7 +486,7 @@ for (const childNode of node.children) { if (traverse(childNode, nodeId)) { // 濡傛灉鍦ㄥ瓙鑺傜偣涓壘鍒颁簡瀛愯妭鐐圭殑鐖惰妭鐐癸紝鍒欏皢褰撳墠鑺傜偣鐨処D娣诲姞鍒扮埗鑺傜偣ID鏁扮粍涓紝骞惰繑鍥瀟rue琛ㄧず宸茬粡鎵惧埌浜嗗瓙鑺傜偣 - parentIds.push(node.id); + parentIds.unshift(node.id); return true; } } diff --git a/admin-web/src/views/stock/scrap/itemScrapping/index.vue b/admin-web/src/views/stock/scrap/itemScrapping/index.vue index 0c7be3d..5263192 100644 --- a/admin-web/src/views/stock/scrap/itemScrapping/index.vue +++ b/admin-web/src/views/stock/scrap/itemScrapping/index.vue @@ -9,22 +9,25 @@ <el-row style="margin-top: 15px"> <el-col> <!--鍒楄〃--> - <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> - <el-row class="card" :gutter="5"> + <div class="table-tool-bar" style="margin-bottom: 15px"> + <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" /> + </div> + <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }"> + <el-row class="card" :gutter="5" v-loading="loading"> <el-col v-for="(item, index) in list" :key="index" class="cm-item"> <el-card class="card-data"> <div class="card-container"> <div class="card-header"> <div class="card-header-left"> - <span>璋冩嫧鍗曞彿锛�</span> + <span>鎶ュ簾鍗曞彿锛�</span> <span class="value">{{ item.businessFormCode }}</span> <div class="states" :class="item.states == 1 ? '' : 'states-success'"> - {{ item.states == 1 ? '寰呰皟鎷�' : '宸茶皟鎷�' }} + {{ item.states == 1 ? '寰呮姤搴�' : '宸叉姤搴�' }} </div> </div> <div class="card-header-right"> <el-button site="form" type="success" size="mini" @click="handleExport(item)" - >瀵煎嚭璋冩嫧鍑哄簱鍗�</el-button + >瀵煎嚭鎶ュ簾鍗�</el-button > <el-button name="鏌ョ湅璇︽儏" site="form" type="info" size="mini" @click="handleDetail(item)" >鏌ョ湅璇︽儏</el-button @@ -32,21 +35,19 @@ </div> </div> <div class="one-hed"> - <div class="box"><span class="span-two">鎺ユ敹鏈烘瀯锛�</span>{{ item.agencyId }}</div> - <div class="box"><span class="span-two">鐢宠浜猴細</span>{{ item.buyerName }}</div> - <div class="box"><span class="span-two">鐢宠璋冩嫧鏃堕棿锛�</span>{{ item.procureTime }}</div> - <div class="box"><span class="span-two">鎺ユ敹鏃堕棿锛�</span>{{ item.procureTime }}</div> - <div class="box"><span class="span-two">璋冩嫧鏈烘瀯锛�</span>{{ item.procureTime }}</div> - <div class="box"><span class="span-two">璋冩嫧浜猴細</span>{{ item.procureTime }}</div> - <div class="box"><span class="span-two">璋冩嫧鏃堕棿锛�</span>{{ item.procureTime }}</div> + <div class="box"><span class="span-two">鏈烘瀯锛�</span>{{ item.agencyId }}</div> + <div class="box"><span class="span-two">鎿嶄綔浜猴細</span>{{ item.buyerName }}</div> + <div class="box"> + <span class="span-two">鎶ュ簾鏃堕棿锛�</span>{{ item.procureTime | formatTime }} + </div> </div> <div class="card-end"> - <div v-for="(just, index) in item.models" :key="index" class="item"> - <div class="name">{{ just.baseGoodsModelsId }}</div> + <div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item"> + <div class="name">{{ just.goodsTemplateName }}</div> <div class="value-box"> <div class="value-box-item"> <span class="label">鏁伴噺锛�</span> - <span class="value">{{ just.counts }}</span> + <span class="value">{{ just.count }}</span> <span class="unit">{{ just.unit }}</span> </div> </div> @@ -72,8 +73,19 @@ </el-card> </el-container> <!--娣诲姞/缂栬緫寮圭獥--> - <edit ref="editRef"></edit> - <detail ref="detailRef"></detail> + <edit + v-if="editSetting.show" + :setting="editSetting" + ref="editRef" + @close="editSetting.show = false" + @search="refreshData" + ></edit> + <detail + v-if="detailSetting.show" + :setting="detailSetting" + @close="detailSetting.show = false" + ref="detailRef" + ></detail> <my-import :import-setting="importSetting" :dialog-show="importSetting.dialogShow" @@ -84,12 +96,14 @@ <script> import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder'; +import { getTree } from '@/api/baseSetting/finsystenant'; import MyButton from '@/components/myButton/myButton'; import SettingIplatform from '@/utils/settingIplatform'; import myImport from '@/views/components/myImport'; import edit from './edit'; import detail from './detail'; import { getBaseUrl } from '@/utils/base'; +import * as DateFormatter from '@/utils/DateFormatter'; export default { name: 'index', @@ -104,7 +118,7 @@ { type: 'text', dataIndex: 'businessFormCode', - label: '璋冩嫧鍗曞彿', + label: '鎶ュ簾鍗曞彿', placeholder: '璇疯緭鍏�', defaultValue: '', }, @@ -116,50 +130,23 @@ defaultValue: '', }, { - type: 'select', - dataIndex: 'name', + type: 'cascader', + dataIndex: 'agencyId', label: '鏈烘瀯', placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, defaultValue: '', options: [], }, { - type: 'text', - dataIndex: 'buyerName', - label: '鍒涘缓浜�', - placeholder: '璇疯緭鍏�', - defaultValue: '', - }, - { - type: 'select', - dataIndex: 'states', - label: '鐘舵��', - placeholder: '璇烽�夋嫨', - defaultValue: '', - options: [ - { - label: '鍏ㄩ儴', - value: '', - }, - { - label: '寰呰皟鎷�', - value: '1', - }, - { - label: '宸茶皟鎷�', - value: '2', - }, - ], - }, - { type: 'date-picker', - dataIndex: 'val1', - label: '璋冩嫧鏃堕棿', + dataIndex: 'incomeTimeStart', + label: '鎶ュ簾鏃堕棿', defaultValue: '', }, { type: 'date-picker', - dataIndex: 'val2', + dataIndex: 'incomeTimeEnd', label: '鑷�', defaultValue: '', }, @@ -197,6 +184,11 @@ orgId: '', show: false, }, + detailSetting: { + title: '璇︽儏', + id: '', + show: false, + }, pageNum: 1, pageSize: 10, total: 0, @@ -205,6 +197,12 @@ computed: { clientHeight() { return document.documentElement.clientHeight; + }, + }, + filters: { + formatTime(time) { + if (!time) return; + return DateFormatter.LongToDateTime(time); }, }, created() { @@ -224,6 +222,7 @@ console.log(this.list); }); }, + //瀵煎叆 importOrg() { this.importSetting.dialogShow = true; @@ -240,57 +239,77 @@ // 瀵煎嚭 handleExport() {}, // 鏂板 - addtable() { - this.$refs.editRef.open(); + handleAdd() { + this.editSetting.id = null; + this.editSetting.info = null; + this.editSetting.title = '鏂板'; + this.editSetting.show = true; }, // 缂栬緫 handleEdit(row) { - this.$refs.editRef.open(row.id); + this.editSetting.id = row.id; + this.editSetting.info = null; + this.editSetting.title = '缂栬緫'; + this.editSetting.show = true; }, // 璇︽儏 handleDetail(row) { - this.$refs.detailRef.open(row.id); + this.detailSetting.id = row.id; + this.detailSetting.show = true; }, - // 璋冩嫧 + // 鎶ュ簾 handleIncome(row) { - this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 璋冩嫧鍚�?`, '閲囪喘璋冩嫧') - .then(function () { - procureIncome({ id: row.id }).then((res) => { - this.$message.success('璋冩嫧鎴愬姛锛�'); - }); - }) - .then((res) => { - this.search(); - }) - .catch(() => {}); + this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鎶ュ簾鍚�?`, '鎶ュ簾鎶ュ簾').then(() => { + procureIncome({ id: row.id }) + .then((res) => { + this.$message.success('鎶ュ簾鎴愬姛锛�'); + this.search(); + }) + .catch(() => {}); + }); }, del(row) { - this.$modal - .confirm('鏄惁纭鍒犻櫎璋冩嫧鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�') - .then(function () { - procureDel({ id: row.id }).then((res) => {}); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search(); - }) - .catch(() => {}); + this.$modal.confirm('鏄惁纭鍒犻櫎鎶ュ簾鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then(() => { + procureDel({ id: row.id }) + .then((res) => { + this.$message.success('鍒犻櫎鎴愬姛锛�'); + this.search(); + }) + .catch(() => {}); + }); }, // 鍒嗛〉 handleSizeChange(pageSize) { this.pageSize = pageSize; - this.search({ pageNum: 1 }); + this.search(1); }, handleCurrentChange(pageNum) { - this.myTable.paging.page.pageNum = pageNum; - this.search({ pageNum: pageNum }); + this.pageNum = pageNum; + this.search(pageNum); }, // 鏌ヨtable鍒楄〃 search(pageNum) { + if (pageNum) { + this.pageNum = pageNum; + } this.fetchData(); + }, + refreshData() { + this.pageNum = 1; + this.pageSize = 10; + this.search(); }, fifterForm(params) { this.filterFrom = Object.assign(this.filterFrom, params); + if (this.filterFrom.incomeTimeStart) { + this.filterFrom.incomeTimeStart = this.filterFrom.incomeTimeStart.replace(/\-/g, ''); + } + if (this.filterFrom.incomeTimeEnd) { + this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, ''); + } + if (this.filterFrom.agencyId.length) { + this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; + } this.search(1); }, }, diff --git a/admin-web/src/views/stock/scrap/scrapDetails/edit.vue b/admin-web/src/views/stock/scrap/scrapDetails/edit.vue deleted file mode 100644 index 37b0db9..0000000 --- a/admin-web/src/views/stock/scrap/scrapDetails/edit.vue +++ /dev/null @@ -1,111 +0,0 @@ -<template> - <win-sm :title="setting.title" @close="close" :width="'800px'"> - <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> - <el-form-item label="缂栧彿" prop="code"> - <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鍦板潃" > - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-switch - v-model="formData.status" - active-color="#0d997c" - inactive-color="#C0CCDA"> - </el-switch> - </el-form-item> - </el-form> - <div slot="footer" align="center" class="dialog-footer"> - <my-button name="鍙栨秷" site="form" @click="close"/> - <my-button name="淇濆瓨" site="form" @click="save"/> - </div> - </win-sm> -</template> - -<script> -import winSm from '@/components/win/win-sm' -import myButton from '@/components/myButton/myButton' -import * as finsystenant from '@/api/baseSetting/finsystenant' - -export default { - components: {winSm, myButton}, - props: { - setting: { - type: Object, - default: () => { - } - } - }, - data() { - return { - checkAll: false, - checkedList: [], - formData: { - code: '', - name: '', - status: true, - summary: '', - }, - rules: { - code: [ - {required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur'} - ], - name: [ - {required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur'} - ], - status: [ - {required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur'} - ] - } - } - }, - created() { - if(this.setting.info){ - this.formData = Object.assign({},JSON.parse(this.setting.info)) - } - }, - methods: { - getEditInfo(id){ - - }, - close() { - this.$emit('close') - }, - 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('淇濆瓨澶辫触') - } - }) - }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('淇濆瓨澶辫触') - } - }) - } - } else { - this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��') - } - }) - } - } -} -</script> diff --git a/admin-web/src/views/stock/scrap/scrapDetails/index.vue b/admin-web/src/views/stock/scrap/scrapDetails/index.vue index 2936cd9..257a248 100644 --- a/admin-web/src/views/stock/scrap/scrapDetails/index.vue +++ b/admin-web/src/views/stock/scrap/scrapDetails/index.vue @@ -13,8 +13,6 @@ <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> </el-col> </el-row> - <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> </el-card> </el-container> </el-container> @@ -23,6 +21,12 @@ :dialog-show="importSetting.dialogShow" :dialog-title="importSetting.dialogTitle" /> + <detail + v-if="detailSetting.show" + :setting="detailSetting" + @close="detailSetting.show = false" + ref="detailRef" + ></detail> </div> </template> @@ -30,14 +34,14 @@ import MyTableV2 from "@/components/myTable/myTableV2"; 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 detail from '../itemScrapping/detail'; import {getBaseUrl} from '@/utils/base'; export default { name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + components: {MyButton, MyTableV2, myImport,detail}, data() { return { // 鎼滅储妗� @@ -50,23 +54,6 @@ defaultValue: '' }, { - type: 'select', - dataIndex: 'status', - label: '绫诲瀷', - placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] - }, - { type: 'text', dataIndex: 'name', label: '鐗╁搧鍚嶇О', @@ -74,11 +61,40 @@ defaultValue: '' }, { + type: 'select', + dataIndex: 'warehouseId', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], + }, + { type: 'text', dataIndex: 'name', label: '鍒涘缓浜�', placeholder: '璇疯緭鍏�', defaultValue: '' + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeStart', + label: '鎶ュ簾鏃堕棿', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeEnd', + label: '鑷�', + defaultValue: '', }, ], // 鏍戞暟鎹� @@ -133,12 +149,10 @@ }, // 鍒椾俊鎭� columns: [ - {title: '绫诲瀷', field: 'name', align: 'left',}, - {title: '鍗曞彿', field: 'code', align: 'center'}, - {title: '鐗╁搧鍚嶇О', field: 'lv', align: 'center', }, + {title: '鍗曞彿', field: 'name', align: 'left',}, + {title: '鐗╁搧鍚嶇О', field: 'code', align: 'center'}, {title: '瑙勬牸鍨嬪彿', field: 'lv', align: 'center', }, - {title: '鍑哄叆搴撴暟閲�', field: 'summary', align: 'left',}, - {title: '閲戦', field: 'summary', align: 'left',}, + {title: '鎶ュ簾鏁伴噺', field: 'lv', align: 'center', }, {title: '鎵�灞炴満鏋�', field: 'summary', align: 'left',}, {title: '鍒涘缓浜�', field: 'summary', align: 'left',}, {title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left',}, @@ -151,7 +165,7 @@ { title: '璇︽儏', events: (row) => { - this.showAudit(row); + this.showDetail(row); }, }, ], @@ -167,97 +181,19 @@ } } }, + detailSetting: { + title: '璇︽儏', + id: '', + show: false, + }, } }, created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData() }, methods: { - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then(res => { - const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) - this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } - }) - }, - updState(row) { - let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.edit(params).then(res => { - if (res) { - row.status = row.status === 1 ? 0 : 1 - vm.$modal.msgSuccess(text + "鎴愬姛"); - vm.search() - } - }) - }) - }, - del(row) { - this.$modal - .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�') - .then(function () { - finsystenant.del({id: row.id}).then((res) => { - }); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search() - }) - .catch(() => { - }); - }, - showAdd() { - // if (!this.editSetting.orgId) { - // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') - // } else { - this.editSetting.id = null; - this.editSetting.info = null; - this.editSetting.title = '鏂板'; - this.editSetting.show = true; - // } - }, - showAudit(row) { - this.editSetting.id = row.id; - this.editSetting.info = JSON.stringify(row); - this.editSetting.title = '缂栬緫'; - this.editSetting.show = true; - }, - nodeClick(param) { - param = param || {} - this.p = Object.assign({}, { - id: param.id, - name: param.name - }) - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id - this.editSetting.orgId = this.p.id - } else { - this.filterFrom.tenantId = null - this.editSetting.orgId = null - } - this.importSetting.fileSettings.data = {pid: param.id} - this.search(1) + showDetail(row) { + this.detailSetting.id = row.id; + this.detailSetting.show = true; }, // 鏌ヨtable鍒楄〃 search(pageNum) { diff --git a/admin-web/src/views/stock/transfer/transferApplication/index.vue b/admin-web/src/views/stock/transfer/transferApplication/index.vue index fe44d28..f0c1418 100644 --- a/admin-web/src/views/stock/transfer/transferApplication/index.vue +++ b/admin-web/src/views/stock/transfer/transferApplication/index.vue @@ -115,18 +115,20 @@ defaultValue: '', }, { - type: 'select', - dataIndex: 'name', + type: 'cascader', + dataIndex: 'agencyId', label: '璋冩嫧鏈烘瀯', placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, defaultValue: '', options: [], }, { - type: 'select', + type: 'cascader', dataIndex: 'name', label: '鎺ユ敹鏈烘瀯', placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, defaultValue: '', options: [], }, diff --git a/admin-web/src/views/stock/transfer/transferdetails/index.vue b/admin-web/src/views/stock/transfer/transferdetails/index.vue index a0db784..cfd17a1 100644 --- a/admin-web/src/views/stock/transfer/transferdetails/index.vue +++ b/admin-web/src/views/stock/transfer/transferdetails/index.vue @@ -50,6 +50,39 @@ defaultValue: '' }, { + type: 'text', + dataIndex: 'name', + label: '鐗╁搧鍚嶇О', + placeholder: '璇疯緭鍏�', + defaultValue: '' + }, + { + type: 'select', + dataIndex: 'warehouseId', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'cascader', + dataIndex: 'name', + label: '璋冩嫧鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], + }, + { + type: 'cascader', + dataIndex: 'name', + label: '鎺ユ敹鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], + }, + { type: 'select', dataIndex: 'status', label: '绫诲瀷', @@ -80,6 +113,30 @@ placeholder: '璇疯緭鍏�', defaultValue: '' }, + { + type: 'date-picker', + dataIndex: 'val1', + label: '鐢宠鏃堕棿', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'val2', + label: '鑷�', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'val1', + label: '鎺ユ敹鏃堕棿', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'val2', + label: '鑷�', + defaultValue: '', + }, ], // 鏍戞暟鎹� treeDataList: [], -- Gitblit v1.9.1