From 20913c80c3f5fc8e533cb92b90e6f20bcd68e032 Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期三, 29 十一月 2023 17:49:32 +0800 Subject: [PATCH] feat: 1、优化导入 2、部门物品台账查询对接 --- admin-web/src/views/stock/transfer/transferApplication/index.vue | 87 ++++++++++++++++++++----------------------- 1 files changed, 41 insertions(+), 46 deletions(-) diff --git a/admin-web/src/views/stock/transfer/transferApplication/index.vue b/admin-web/src/views/stock/transfer/transferApplication/index.vue index 64f853c..3b02061 100644 --- a/admin-web/src/views/stock/transfer/transferApplication/index.vue +++ b/admin-web/src/views/stock/transfer/transferApplication/index.vue @@ -12,7 +12,7 @@ <div class="table-tool-bar" style="margin-bottom: 15px"> <my-button name="璋冩嫧鐢宠" icon="el-icon-plus" @click="handleAdd" site="tools" size="medium" /> </div> - <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> + <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading"> <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"> @@ -62,9 +62,7 @@ <div class="box"> <span class="span-two">鐢宠璋冩嫧鏃堕棿锛�</span>{{ item.createTime | formatTime }} </div> - <div class="box"> - <span class="span-two">鎺ユ敹鏃堕棿锛�</span>{{ item.inTime | formatTime }} - </div> + <div class="box"><span class="span-two">鎺ユ敹鏃堕棿锛�</span>{{ item.inTime | formatTime }}</div> </div> <div class="one-hed"> <div class="box"><span class="span-two">璋冩嫧鏈烘瀯锛�</span>{{ item.outAgencyName }}</div> @@ -89,7 +87,7 @@ </el-card> </el-col> </el-row> - <div class="no-data" v-else>鏆傛棤鏁版嵁</div> + <el-empty v-else description="鏆傛棤鏁版嵁"></el-empty> </div> <el-pagination :small="false" @@ -123,14 +121,14 @@ </template> <script> -import { transferList, transferUpdStatus, transfeIncome, transferExport } from '@/api/stock/transfer'; +import {transfeIncome, transferExport, transferList, transferUpdStatus} from '@/api/stock/transfer'; import MyButton from '@/components/myButton/myButton'; import myImport from '@/views/components/myImport'; import edit from './edit'; import detail from './detail'; import listPage from '../../../mixins/listPage'; import transfer from '../../../mixins/transfer'; -import { commonsApi } from '@/api/commonsApi'; +import SettingIplatform from '@/utils/settingIplatform'; export default { name: 'index', @@ -151,29 +149,17 @@ defaultValue: '', }, { - type: 'text', - dataIndex: 'goodsTemplateName', + type: 'select', + dataIndex: 'goodsTemplateId', label: '鐗╁搧鍚嶇О', - placeholder: '鍙ā绯婃悳绱�', - defaultValue: '', - }, - { - type: 'cascader', - dataIndex: 'outAgencyId', - label: '璋冩嫧鏈烘瀯', - placeholder: '璇烽�夋嫨', - optionsConfig: { url: commonsApi.cascader_tree_fin_tenant, props: null }, + placeholder: '璇疯緭鍏�', defaultValue: '', options: [], - }, - { - type: 'cascader', - dataIndex: 'inAgencyId', - label: '鎺ユ敹鏈烘瀯', - placeholder: '璇烽�夋嫨', - optionsConfig: { url: commonsApi.cascader_tree_fin_tenant, props: null }, - defaultValue: '', - options: [], + optionsConfig: { + label: 'goodsName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', + }, }, { type: 'select', @@ -208,14 +194,13 @@ defaultValue: '', }, ], - filterFrom:{ - } + filterFrom: {}, }; }, created() { this.filterFrom = { - operatorId:this.userInfo.id - } + inAgencyId: this.userInfo.tenantId, + }; this.fetchData(); this.items.map((v) => { if (v.label == '鐘舵��') { @@ -238,33 +223,43 @@ console.log(this.list); }); }, - + // 鍏ュ簱 handleIncome(row) { - this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 璋冩嫧鍑哄簱鍚�?`, '璋冩嫧鍑哄簱').then(() => { - transfeIncome({ id: row.id }) - .then((res) => { - this.$message.success('璋冩嫧鍑哄簱鎴愬姛锛�'); - this.search(1); - }) + this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鎺ユ敹鍏ュ簱鍚�?`, '鎺ユ敹鍏ュ簱', { + beforeClose: (action, instance, done) => { + if (action == 'confirm') { + instance.confirmButtonLoading = true; + instance.confirmButtonText = '鎵ц涓�...'; + transfeIncome({ id: row.id }) + .then((res) => { + this.$message.success('鎺ユ敹鍏ュ簱鎴愬姛锛�'); + done(); + instance.confirmButtonLoading = false; + this.search(1); + }) + .catch(() => { + done(); + }); + } else { + done(); + } + }, }); }, // 瀵煎嚭 handleExport(row) { - transferExport({id:row.id}).then(res=>{ - - }) + transferExport({ id: row.id }).then((res) => {}); }, // 鎾ら攢 handleRevoke(row) { this.$confirm(`鎮ㄧ‘瀹氭挙閿�鍗曞彿涓�"${row.businessFormCode}" 鐨勬暟鎹悧?`, '鎾ら攢').then(() => { - transferUpdStatus({ id: row.id }) - .then((res) => { - this.$message.success('鎾ら攢鎴愬姛锛�'); - this.search(1); - }) + transferUpdStatus({ id: row.id }).then((res) => { + this.$message.success('鎾ら攢鎴愬姛锛�'); + this.search(1); + }); }); }, fifterForm(params) { -- Gitblit v1.9.1