Commit 202fdcfbbdbf1f01b7cf1966b1024164398cacd1

Authored by 史婷婷
1 parent 204bc7fa

feat: 审核-驳回&通过 改为变量,产品试样确认单-审核 按钮文案

Showing 1 changed file with 31 additions and 11 deletions
... ... @@ -16,21 +16,20 @@
16 16 </view>
17 17 <view class="footer">
18 18 <button v-if="extraBtnText" class="btn extra" @click="onExtra">{{ extraBtnText }}</button>
19   - <button class="btn reject" @click="onReject">驳回</button>
20   - <button class="btn pass" type="primary" @click="onPass">通过</button>
  19 + <button class="btn reject" @click="onReject">{{ rejectText }}</button>
  20 + <button class="btn pass" type="primary" @click="onPass">{{ passText }}</button>
21 21 </view>
22 22
23 23 <uni-popup ref="approvePopup" type="center" :mask-click="false">
24 24 <view class="action-modal">
25   - <view class="action-modal_header">{{ approveType === 'PASS' ? '通过' : '驳回' }}</view>
  25 + <view class="action-modal_header">{{ approveType === 'PASS' ? passText : rejectText }}</view>
26 26 <view class="action-modal_body">
27   - <text class="tip">{{ approveType === 'PASS' ? '您将通过该信息的审核' : '您将驳回该信息的审核' }}</text>
28   - <uni-easyinput v-model="message" :placeholder="approveType === 'PASS' ? '请输入通过原因' : '请输入驳回原因'" />
  27 + <text class="tip">{{ approveType === 'PASS' ? '您将' + passText + '该信息的审核' : '您将' + rejectText + '该信息的审核' }}</text>
  28 + <uni-easyinput v-model="message" :placeholder="approveType === 'PASS' ? '请输入' + passText + '原因' : '请输入' + rejectText + '原因'" />
29 29 </view>
30 30 <view class="action-modal_footer">
31 31 <button class="btn cancel" @click="cancelApprove">取消</button>
32   - <button class="btn confirm" type="primary" @click="confirmApprove">{{ approveType === 'PASS' ? '通过'
33   - : '驳回' }}</button>
  32 + <button class="btn confirm" type="primary" @click="confirmApprove">{{ approveType === 'PASS' ? passText : rejectText }}</button>
34 33 </view>
35 34 </view>
36 35 </uni-popup>
... ... @@ -143,7 +142,9 @@ export default {
143 142 customerInfo: { businessFileName: '', businessFileId: '', shareholderFileName: '', shareholderFileId: '' },
144 143 companyReview: { companySettlementPeriod: '', companyMaterialSupplyPlan: '', companySuggestedCategory: '', companySuggestedCategoryName: '', companyCreditLimit: '' },
145 144 categoryOptions: [],
146   - sheet: { visible: false, title: '请选择', options: [], value: '', field: '' }
  145 + sheet: { visible: false, title: '请选择', options: [], value: '', field: '' },
  146 + passText: '通过',
  147 + rejectText: '驳回',
147 148 }
148 149 },
149 150 computed: {
... ... @@ -176,6 +177,25 @@ export default {
176 177 return text
177 178 }
178 179 },
  180 + watch: {
  181 + 'auditCtx.bizFlag': {
  182 + deep: true,
  183 + handler(v) {
  184 + console.log('审核__bizFlag', v)
  185 + if (v) {
  186 + // 产品试样确认单-审核 按钮文案
  187 + if (v === 'CONFIRMATION_SLIP_EDIT') {
  188 + this.passText = '同意生产'
  189 + this.rejectText = '不同意生产'
  190 + } else {
  191 + this.passText = '通过'
  192 + this.rejectText = '驳回'
  193 + }
  194 + }
  195 + },
  196 + immediate: true
  197 + }
  198 + },
179 199 onLoad() {
180 200 const CACHE_KEY_2 = 'sourceBusinessId'; // 业务列表 跳转过来的数据存储key
181 201 const _sourceBusinessId = uni.getStorageSync(CACHE_KEY_2) || '';
... ... @@ -399,7 +419,7 @@ export default {
399 419 console.log('审核__approvePass', res)
400 420 if (res.code === 200) {
401 421 uni.showToast({
402   - title: '已通过',
  422 + title: '已' + this.passText,
403 423 icon: 'none'
404 424 })
405 425 setTimeout(() => {
... ... @@ -412,7 +432,7 @@ export default {
412 432 console.log('审核__approveRefuse', res)
413 433 if (res.code === 200) {
414 434 uni.showToast({
415   - title: '已驳回',
  435 + title: '已' + this.rejectText,
416 436 icon: 'none'
417 437 })
418 438 setTimeout(() => {
... ... @@ -424,7 +444,7 @@ export default {
424 444 console.log('审核__confirmApprove', payload)
425 445 this.$refs.approvePopup.close()
426 446 uni.showToast({
427   - title: this.approveType === 'PASS' ? '已通过' : '已驳回',
  447 + title: this.approveType === 'PASS' ? '已' + this.passText : '已' + this.rejectText,
428 448 icon: 'none'
429 449 })
430 450 }
... ...