From 9834dbff448908d2008d8c52a2544aad00c099b1 Mon Sep 17 00:00:00 2001 From: haoyahui <2032914783@qq.com> Date: 星期三, 22 十一月 2023 17:34:26 +0800 Subject: [PATCH] 库存盘点, 异常明细,报废管理 --- admin-web/src/views/stock/procure/purchaseOrder/index.vue | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 15 deletions(-) diff --git a/admin-web/src/views/stock/procure/purchaseOrder/index.vue b/admin-web/src/views/stock/procure/purchaseOrder/index.vue index 621f136..7000dc4 100644 --- a/admin-web/src/views/stock/procure/purchaseOrder/index.vue +++ b/admin-web/src/views/stock/procure/purchaseOrder/index.vue @@ -120,7 +120,7 @@ import edit from './edit'; import detail from './detail'; import { getBaseUrl } from '@/utils/base'; -import listPage from '../../../mixins/listPage' +import listPage from '../../../mixins/listPage'; export default { name: 'index', @@ -140,12 +140,25 @@ placeholder: '璇疯緭鍏�', defaultValue: '', }, + // { + // type: 'text', + // dataIndex: 'goodsTemplateName', + // label: '鐗╁搧鍚嶇О', + // placeholder: '鍙ā绯婃悳绱�', + // defaultValue: '', + // }, { - type: 'text', - dataIndex: 'goodsTemplateName', + type: 'select', + dataIndex: 'goodsTemplateId', label: '鐗╁搧鍚嶇О', - placeholder: '鍙ā绯婃悳绱�', + placeholder: '璇疯緭鍏�', defaultValue: '', + options: [], + optionsConfig: { + label: 'goodsName', + value: 'id', + url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate', + }, }, { type: 'cascader', @@ -219,6 +232,9 @@ }, }; }, + created(){ + this.fetchData() + }, methods: { fetchData() { this.loading = true; @@ -249,17 +265,29 @@ }, // 鍏ュ簱 handleIncome(row) { - this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鍏ュ簱鍚�?`, '閲囪喘鍏ュ簱').then(() => { - procureIncome({ id: row.id }) - .then((res) => { - this.$message.success('鍏ュ簱鎴愬姛锛�'); - this.search(); - }) - .catch(() => {}); + this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鍏ュ簱鍚�?`, '閲囪喘鍏ュ簱', { + beforeClose: (action, instance, done) => { + if (action == 'confirm') { + instance.confirmButtonLoading = true; + instance.confirmButtonText = '鎵ц涓�...'; + procureIncome({ id: row.id }) + .then((res) => { + this.$message.success('鍏ュ簱鎴愬姛锛�'); + done(); + instance.confirmButtonLoading = false; + this.search(); + }) + .catch(() => { + done(); + }); + } else { + done(); + } + }, }); }, del(row) { - this.$modal.confirm('鏄惁纭鍒犻櫎鍏ュ簱鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then( () => { + this.$modal.confirm('鏄惁纭鍒犻櫎鍏ュ簱鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then(() => { procureDel({ id: row.id }) .then((res) => { this.$message.success('鍒犻櫎鎴愬姛锛�'); @@ -275,9 +303,6 @@ } if (this.filterFrom.incomeTimeEnd) { this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, ''); - } - if (this.filterFrom.agencyId && this.filterFrom.agencyId.length) { - this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; } this.search(1); }, -- Gitblit v1.9.1