Showing
11 changed files
with
1047 additions
and
233 deletions
| ... | ... | @@ -26,6 +26,22 @@ export function domesticCustomerCreditGetApi(id) { |
| 26 | 26 | }) |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | +export function domesticCustomerCreditGetExamineByIdApi(id) { | |
| 30 | + return request({ | |
| 31 | + url: '/procurement/domesticCustomerCredit/getExamineById', | |
| 32 | + method: 'get', | |
| 33 | + params: { id } | |
| 34 | + }) | |
| 35 | +} | |
| 36 | + | |
| 37 | +export function domesticCustomerCreditCancelApi(id) { | |
| 38 | + return request({ | |
| 39 | + url: '/procurement/domesticCustomerCredit/cancel', | |
| 40 | + method: 'get', | |
| 41 | + params: { id } | |
| 42 | + }) | |
| 43 | +} | |
| 44 | + | |
| 29 | 45 | export function getPurchaseDeptApi() { |
| 30 | 46 | return request({ |
| 31 | 47 | url: '/system/dept/getPurchaseDept', | ... | ... |
api/procure-manage/foreignTradeCredit.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | +import { ContentTypeEnum } from '@/utils/httpEnum' | |
| 3 | + | |
| 4 | +export function foreignTradeCreditQueryApi(params) { | |
| 5 | + return request({ | |
| 6 | + url: '/procurement/foreignTradeCredit/query', | |
| 7 | + method: 'get', | |
| 8 | + params | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +export function foreignTradeCreditSaveApi(data) { | |
| 13 | + return request({ | |
| 14 | + url: '/procurement/foreignTradeCredit', | |
| 15 | + method: 'post', | |
| 16 | + data, | |
| 17 | + contentType: ContentTypeEnum.JSON | |
| 18 | + }) | |
| 19 | +} | |
| 20 | + | |
| 21 | +export function foreignTradeCreditGetApi(id) { | |
| 22 | + return request({ | |
| 23 | + url: '/procurement/foreignTradeCredit/get', | |
| 24 | + method: 'get', | |
| 25 | + params: { id } | |
| 26 | + }) | |
| 27 | +} | |
| 28 | + | |
| 29 | +export function foreignTradeCreditCancelApi(id) { | |
| 30 | + return request({ | |
| 31 | + url: '/procurement/foreignTradeCredit/cancel', | |
| 32 | + method: 'get', | |
| 33 | + params: { id } | |
| 34 | + }) | |
| 35 | +} | |
| 36 | + | |
| 37 | +export function foreignTradeCreditGetExamineByIdApi(id) { | |
| 38 | + return request({ | |
| 39 | + url: '/procurement/foreignTradeCredit/getExamineById', | |
| 40 | + method: 'get', | |
| 41 | + params: { id } | |
| 42 | + }) | |
| 43 | +} | |
| 44 | + | |
| 45 | +export function getPurchaseDeptApi() { | |
| 46 | + return request({ | |
| 47 | + url: '/system/dept/getPurchaseDept', | |
| 48 | + method: 'get' | |
| 49 | + }) | |
| 50 | +} | ... | ... |
| ... | ... | @@ -95,7 +95,7 @@ |
| 95 | 95 | import { downloadFile } from '@/utils/downloadFile.js' |
| 96 | 96 | import DetailButtons from '@/components/detail-buttons/index.vue' |
| 97 | 97 | import { getDicByCodes, getDicName } from '@/utils/dic.js' |
| 98 | -import { domesticCustomerCreditGetApi } from '@/api/procure-manage/domesticCustomerCredit.js' | |
| 98 | +import { domesticCustomerCreditCancelApi, domesticCustomerCreditGetApi } from '@/api/procure-manage/domesticCustomerCredit.js' | |
| 99 | 99 | import { getPurchaseDeptApi } from '@/api/procure-manage/domesticCustomerCredit.js' |
| 100 | 100 | |
| 101 | 101 | export default { |
| ... | ... | @@ -116,17 +116,36 @@ export default { |
| 116 | 116 | }, |
| 117 | 117 | purchaseDeptOptions: [], |
| 118 | 118 | buttons: [{ |
| 119 | + text: '审核详情', | |
| 120 | + visible: true, | |
| 121 | + variant: 'outline', | |
| 122 | + event: 'auditDetail', | |
| 123 | + },{ | |
| 124 | + text: '审核', | |
| 125 | + visible: true, | |
| 126 | + variant: 'primary', | |
| 127 | + event: 'audit', | |
| 128 | + },{ | |
| 119 | 129 | text: '编辑', |
| 120 | 130 | visible: true, |
| 121 | 131 | variant: 'outline', |
| 122 | 132 | event: 'edit', |
| 133 | + },{ | |
| 134 | + text: '取消', | |
| 135 | + visible: true, | |
| 136 | + variant: 'outline', | |
| 137 | + event: 'cancel', | |
| 123 | 138 | }] |
| 124 | 139 | } |
| 125 | 140 | }, |
| 126 | 141 | computed: { |
| 127 | 142 | displayButtons() { |
| 143 | + const s = this.form && this.form.status || false | |
| 128 | 144 | return [ |
| 129 | - { ...this.buttons[0], visible: true }, | |
| 145 | + { ...this.buttons[0], visible: s && this.$auth.hasPermi('procure-manage:domestic-trade:review') }, | |
| 146 | + { ...this.buttons[1], visible: s === 'AUDIT' && this.$auth.hasPermi('procure-manage:domestic-trade:approve') }, | |
| 147 | + { ...this.buttons[2], visible: this.$auth.hasPermi('procure-manage:domestic-trade:modify') }, | |
| 148 | + { ...this.buttons[3], visible: this.$auth.hasPermi('procure-manage:domestic-trade:cancel') }, | |
| 130 | 149 | ] |
| 131 | 150 | }, |
| 132 | 151 | companyNatureOptions() { |
| ... | ... | @@ -212,13 +231,55 @@ export default { |
| 212 | 231 | }, |
| 213 | 232 | handleButtonClick(btn) { |
| 214 | 233 | if (!btn || btn.disabled) return |
| 215 | - if (typeof btn.onClick === 'function') return btn.onClick(this.detail, btn.params) | |
| 234 | + if (typeof btn.onClick === 'function') return btn.onClick(this.form, btn.params) | |
| 216 | 235 | const e = btn.event || '' |
| 217 | 236 | if (e === 'edit') return this.onEdit(btn && btn.params) |
| 237 | + if (e === 'audit') return this.onAudit(btn && btn.params) | |
| 238 | + if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params) | |
| 239 | + if (e === 'cancel') return this.onCancel(btn && btn.params) | |
| 218 | 240 | }, |
| 219 | 241 | onEdit(params) { |
| 220 | 242 | uni.navigateTo({ url: '/pages/domestic_trade/modify?id=' + this.id }) |
| 221 | 243 | }, |
| 244 | + onAudit(params) { | |
| 245 | + const id = this.id || (this.form && this.form.id) || '' | |
| 246 | + if (!id) return | |
| 247 | + const CACHE_KEY = 'sourceBusinessId' | |
| 248 | + const TYPE = 'contractType' | |
| 249 | + uni.setStorageSync(TYPE, 'CUSTOMER_CREDIT_IN') | |
| 250 | + uni.setStorageSync(CACHE_KEY, id) | |
| 251 | + uni.navigateTo({ url: '/pages/flow/audit' }) | |
| 252 | + }, | |
| 253 | + onAuditDetail(params) { | |
| 254 | + const id = this.id || (this.form && this.form.id) || '' | |
| 255 | + if (!id) return | |
| 256 | + const CACHE_KEY = 'sourceBusinessId' | |
| 257 | + const TYPE = 'contractType' | |
| 258 | + uni.setStorageSync(TYPE, 'CUSTOMER_CREDIT_IN') | |
| 259 | + uni.setStorageSync(CACHE_KEY, id) | |
| 260 | + uni.navigateTo({ url: '/pages/flow/audit_detail' }) | |
| 261 | + }, | |
| 262 | + onCancel(params) { | |
| 263 | + const id = this.id || (this.form && this.form.id) || '' | |
| 264 | + if (!id) return | |
| 265 | + uni.showModal({ | |
| 266 | + title: '系统提示', | |
| 267 | + content: '是否确定取消该流程?', | |
| 268 | + confirmText: '确定', | |
| 269 | + cancelText: '取消', | |
| 270 | + success: (res) => { | |
| 271 | + if (res && res.confirm) { | |
| 272 | + domesticCustomerCreditCancelApi(id).then(() => { | |
| 273 | + uni.showToast({ title: '已取消', icon: 'none' }) | |
| 274 | + try { uni.setStorageSync('DOMESTIC_TRADE_LIST_NEED_REFRESH', '1') } catch (e) {} | |
| 275 | + setTimeout(() => { uni.redirectTo({ url: '/pages/domestic_trade/index' }) }, 300) | |
| 276 | + }).catch((e) => { | |
| 277 | + uni.showToast({ title: (e && e.msg) || '取消失败', icon: 'none' }) | |
| 278 | + }) | |
| 279 | + } | |
| 280 | + } | |
| 281 | + }) | |
| 282 | + }, | |
| 222 | 283 | boolText(v) { |
| 223 | 284 | if (v === true) return '是' |
| 224 | 285 | if (v === false) return '否' | ... | ... |
| 1 | +<template> | |
| 2 | + <view class="detail-page"> | |
| 3 | + <scroll-view class="scroll" scroll-y> | |
| 4 | + <view class="section"> | |
| 5 | + <text class="row company">{{ safeText(form.unitName) }}</text> | |
| 6 | + <view class="row"><text class="label">公司性质</text><text class="value">{{ safeText(companyNatureName) }}</text></view> | |
| 7 | + <view class="row"><text class="label">开户行</text><text class="value">{{ safeText(form.bankName) }}</text></view> | |
| 8 | + <view class="row"><text class="label">账号</text><text class="value">{{ safeText(form.bankAccount) }}</text></view> | |
| 9 | + <view class="row"><text class="label">注册资金(万元)</text><text class="value">{{ safeText(form.registeredCapital) }}</text></view> | |
| 10 | + <view class="row"><text class="label">法人代表</text><text class="value">{{ safeText(form.legalRepresentative) }}</text></view> | |
| 11 | + <view class="row"><text class="label">公司成立时间</text><text class="value">{{ safeText(form.companyEstablishedTime) }}</text></view> | |
| 12 | + <view class="row"><text class="label">地址</text><text class="value">{{ safeText(form.address) }}</text></view> | |
| 13 | + <view class="row"><text class="label">业务负责人</text><text class="value">{{ safeText(form.businessPrincipal) }}</text></view> | |
| 14 | + <view class="row"><text class="label">职务</text><text class="value">{{ safeText(form.businessPrincipalPosition) }}</text></view> | |
| 15 | + <view class="row"><text class="label">电话</text><text class="value">{{ safeText(form.businessPrincipalPhone) }}</text></view> | |
| 16 | + <view class="row"><text class="label">法人与业务负责人关系</text><text class="value">{{ safeText(form.legalBusinessRelation) }}</text></view> | |
| 17 | + </view> | |
| 18 | + | |
| 19 | + <view class="title-header"> | |
| 20 | + <image class="title-header_icon" src="/static/images/title.png" /> | |
| 21 | + <span>资产状况</span> | |
| 22 | + </view> | |
| 23 | + <view class="section"> | |
| 24 | + <view class="row"><text class="label">生产厂房及办公楼产权</text><text class="value">{{ safeText(form.factoryOfficeProperty) }}</text></view> | |
| 25 | + <view class="row"><text class="label">生产厂房及办公楼面积</text><text class="value">{{ safeText(form.factoryOfficeArea) }}</text></view> | |
| 26 | + <view class="row"><text class="label">仓库或货场产权</text><text class="value">{{ safeText(form.warehouseYardProperty) }}</text></view> | |
| 27 | + <view class="row"><text class="label">仓库或货场产权面积</text><text class="value">{{ safeText(form.warehouseYardArea) }}</text></view> | |
| 28 | + <view class="row"><text class="label">主要生产设备</text><text class="value pre">{{ safeText(form.mainEquipment) }}</text></view> | |
| 29 | + <view class="row"><text class="label">正常库存量</text><text class="value">{{ safeText(form.normalInventory) }}</text></view> | |
| 30 | + </view> | |
| 31 | + | |
| 32 | + <view class="title-header"> | |
| 33 | + <image class="title-header_icon" src="/static/images/title.png" /> | |
| 34 | + <span>生产经营环节风险调查</span> | |
| 35 | + </view> | |
| 36 | + <view class="section"> | |
| 37 | + <view class="row"><text class="label">主要品种</text><text class="value">{{ safeText(form.mainVarieties) }}</text></view> | |
| 38 | + <view class="row"><text class="label">月度收购量</text><text class="value">{{ safeText(form.monthlyPurchaseVolume) }}</text></view> | |
| 39 | + <view class="row"><text class="label">收购来源</text><text class="value">{{ safeText(purchaseSourceName) }}</text></view> | |
| 40 | + <view class="row"><text class="label">入库品名</text><text class="value">{{ safeText(form.stockInProductName) }}</text></view> | |
| 41 | + <view class="row"><text class="label">产品名称</text><text class="value">{{ safeText(form.productName) }}</text></view> | |
| 42 | + <view class="row"><text class="label">产能</text><text class="value">{{ safeText(form.capacity) }}</text></view> | |
| 43 | + <view class="row"><text class="label">销售渠道</text><text class="value">{{ safeText(form.salesChannel) }}</text></view> | |
| 44 | + <view class="row"><text class="label">操作方式</text><text class="value">{{ safeText(operationModeName) }}</text></view> | |
| 45 | + <view class="row"><text class="label">是否享有优惠政策</text><text class="value">{{ boolText(form.hasPreferentialPolicy) }}</text></view> | |
| 46 | + <view class="row"><text class="label">是否投资期货</text><text class="value">{{ boolText(form.investInFutures) }}</text></view> | |
| 47 | + <view class="row"><text class="label">是否有被处罚记录</text><text class="value">{{ boolText(form.hasPenaltyRecord) }}</text></view> | |
| 48 | + <view class="row"><text class="label">经营范围是否相符</text><text class="value">{{ boolText(form.businessScopeMatch) }}</text></view> | |
| 49 | + <view class="row"><text class="label">常见料质问题</text><text class="value pre">{{ safeText(form.commonMaterialIssue) }}</text></view> | |
| 50 | + <view class="row"><text class="label">合作中的其它问题</text><text class="value pre">{{ safeText(form.otherIssue) }}</text></view> | |
| 51 | + </view> | |
| 52 | + | |
| 53 | + <view class="title-header"> | |
| 54 | + <image class="title-header_icon" src="/static/images/title.png" /> | |
| 55 | + <span>与我司的合作状况</span> | |
| 56 | + </view> | |
| 57 | + <view class="section"> | |
| 58 | + <view class="row"><text class="label">首次合作年份</text><text class="value">{{ safeText(form.firstCooperationYear) }}</text></view> | |
| 59 | + <view class="row"><text class="label">是否新开发</text><text class="value">{{ safeText(isNewDevelopmentName) }}</text></view> | |
| 60 | + <view class="row"><text class="label">计划落空不良记录</text><text class="value">{{ boolText(form.hasFailedPlanRecord) }}</text></view> | |
| 61 | + <view class="row"><text class="label">履行不到位现象</text><text class="value">{{ boolText(form.hasPlanPerformanceIssue) }}</text></view> | |
| 62 | + <view class="row"><text class="label">进销账务如何处理</text><text class="value pre">{{ safeText(form.accountingProcess) }}</text></view> | |
| 63 | + <view class="row"><text class="label">开票品名是否一致</text><text class="value">{{ boolText(form.invoiceNameMatch) }}</text></view> | |
| 64 | + <view class="row"><text class="label">出库流程是否规范</text><text class="value">{{ boolText(form.outboundProcessStandard) }}</text></view> | |
| 65 | + <view class="row"><text class="label">运输方式</text><text class="value">{{ safeText(form.transportMode) }}</text></view> | |
| 66 | + </view> | |
| 67 | + | |
| 68 | + <view class="title-header"> | |
| 69 | + <image class="title-header_icon" src="/static/images/title.png" /> | |
| 70 | + <span>其他</span> | |
| 71 | + </view> | |
| 72 | + <view class="section"> | |
| 73 | + <view class="row"><text class="label">资信调查人</text><text class="value">{{ safeText(form.investigatorName) }}</text></view> | |
| 74 | + <view class="row"><text class="label">采购处</text><text class="value">{{ safeText(purchaseDepartmentName) }}</text></view> | |
| 75 | + <view class="row"><text class="label">评审有效期</text><text class="value">{{ safeText(form.reviewValidUntil) }}</text></view> | |
| 76 | + <view class="row"> | |
| 77 | + <text class="label">附件</text> | |
| 78 | + <view class="value"> | |
| 79 | + <view v-if="!attachments.length" class="value">-</view> | |
| 80 | + <view v-for="item in attachments" :key="item.id || item.name" class="file-item" @click="onDownload(item)"> | |
| 81 | + <text class="value act">{{ item.name }}</text> | |
| 82 | + </view> | |
| 83 | + </view> | |
| 84 | + </view> | |
| 85 | + </view> | |
| 86 | + </scroll-view> | |
| 87 | + </view> | |
| 88 | +</template> | |
| 89 | + | |
| 90 | +<script> | |
| 91 | +import { downloadFile } from '@/utils/downloadFile.js' | |
| 92 | +import { getDicByCodes, getDicName } from '@/utils/dic.js' | |
| 93 | +import { domesticCustomerCreditGetExamineByIdApi, getPurchaseDeptApi } from '@/api/procure-manage/domesticCustomerCredit.js' | |
| 94 | + | |
| 95 | +export default { | |
| 96 | + name: 'DomesticCustomerCreditViewer', | |
| 97 | + props: { id: { type: [String, Number], default: '' } }, | |
| 98 | + data() { | |
| 99 | + return { | |
| 100 | + form: {}, | |
| 101 | + dicOptions: { | |
| 102 | + COMPANY_NATURE: [], | |
| 103 | + DEVELOP_NEW: [], | |
| 104 | + OPERATION_METHOD: [], | |
| 105 | + PURCHASE_SOURCE: [] | |
| 106 | + }, | |
| 107 | + purchaseDeptOptions: [] | |
| 108 | + } | |
| 109 | + }, | |
| 110 | + computed: { | |
| 111 | + attachments() { | |
| 112 | + const f = this.form || {} | |
| 113 | + const ids = f.attachmentFileIds != null ? String(f.attachmentFileIds) : '' | |
| 114 | + const names = f.attachmentFileNames != null ? String(f.attachmentFileNames) : '' | |
| 115 | + const idArr = ids ? ids.split(',').map(s => s.trim()).filter(Boolean) : [] | |
| 116 | + const nameArr = names ? names.split(',') : [] | |
| 117 | + if (idArr.length) { | |
| 118 | + return idArr.map((id, i) => ({ id, name: (nameArr[i] != null ? String(nameArr[i]) : '') })) | |
| 119 | + } | |
| 120 | + const legacy = Array.isArray(f.attachments) ? f.attachments : [] | |
| 121 | + return legacy.filter(it => it && (it.id || it.name)).map(it => ({ id: it.id || '', name: it.name || '' })) | |
| 122 | + }, | |
| 123 | + companyNatureOptions() { | |
| 124 | + return this.dicToSheetOptions(this.dicOptions.COMPANY_NATURE) | |
| 125 | + }, | |
| 126 | + companyNatureName() { | |
| 127 | + return this.safeText(this.form.companyNatureName) || this.labelsOf(this.companyNatureOptions, this.form.companyNature) | |
| 128 | + }, | |
| 129 | + purchaseSourceName() { | |
| 130 | + const v = this.form && this.form.purchaseSource != null ? String(this.form.purchaseSource) : '' | |
| 131 | + return v ? getDicName('PURCHASE_SOURCE', v, this.dicOptions.PURCHASE_SOURCE) : '-' | |
| 132 | + }, | |
| 133 | + operationModeName() { | |
| 134 | + const v = this.form && this.form.operationMode != null ? String(this.form.operationMode) : '' | |
| 135 | + return v ? getDicName('OPERATION_METHOD', v, this.dicOptions.OPERATION_METHOD) : '-' | |
| 136 | + }, | |
| 137 | + isNewDevelopmentName() { | |
| 138 | + const v = this.form && this.form.isNewDevelopment != null ? String(this.form.isNewDevelopment) : '' | |
| 139 | + return v ? getDicName('DEVELOP_NEW', v, this.dicOptions.DEVELOP_NEW) : '-' | |
| 140 | + }, | |
| 141 | + purchaseDepartmentName() { | |
| 142 | + const v = this.form && this.form.purchaseDepartment != null ? String(this.form.purchaseDepartment) : '' | |
| 143 | + if (!v) return '-' | |
| 144 | + const found = (this.purchaseDeptOptions || []).find(o => String(o.value) === v) | |
| 145 | + return found ? String(found.label || '') : v | |
| 146 | + } | |
| 147 | + }, | |
| 148 | + created() { | |
| 149 | + this.loadDicData() | |
| 150 | + this.loadPurchaseDeptOptions() | |
| 151 | + }, | |
| 152 | + watch: { | |
| 153 | + id: { | |
| 154 | + immediate: true, | |
| 155 | + handler(val) { | |
| 156 | + const v = (val !== undefined && val !== null) ? String(val) : '' | |
| 157 | + if (v) this.loadDetail(v) | |
| 158 | + } | |
| 159 | + } | |
| 160 | + }, | |
| 161 | + methods: { | |
| 162 | + async loadDicData() { | |
| 163 | + try { | |
| 164 | + const results = await getDicByCodes(['COMPANY_NATURE', 'DEVELOP_NEW', 'OPERATION_METHOD', 'PURCHASE_SOURCE']) | |
| 165 | + this.dicOptions = { | |
| 166 | + COMPANY_NATURE: (results.COMPANY_NATURE && results.COMPANY_NATURE.data) || [], | |
| 167 | + DEVELOP_NEW: (results.DEVELOP_NEW && results.DEVELOP_NEW.data) || [], | |
| 168 | + OPERATION_METHOD: (results.OPERATION_METHOD && results.OPERATION_METHOD.data) || [], | |
| 169 | + PURCHASE_SOURCE: (results.PURCHASE_SOURCE && results.PURCHASE_SOURCE.data) || [] | |
| 170 | + } | |
| 171 | + } catch (e) { | |
| 172 | + this.dicOptions = { COMPANY_NATURE: [], DEVELOP_NEW: [], OPERATION_METHOD: [], PURCHASE_SOURCE: [] } | |
| 173 | + } | |
| 174 | + }, | |
| 175 | + async loadPurchaseDeptOptions() { | |
| 176 | + try { | |
| 177 | + const res = await getPurchaseDeptApi() | |
| 178 | + const list = (res && res.data) ? res.data : [] | |
| 179 | + this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | |
| 180 | + label: it && it.name != null ? String(it.name) : '', | |
| 181 | + value: it && it.id != null ? String(it.id) : '' | |
| 182 | + })).filter(it => it.value) | |
| 183 | + } catch (e) { | |
| 184 | + this.purchaseDeptOptions = [] | |
| 185 | + } | |
| 186 | + }, | |
| 187 | + dicToSheetOptions(items) { | |
| 188 | + const list = Array.isArray(items) ? items : [] | |
| 189 | + return list.map(it => ({ label: it && it.name != null ? String(it.name) : '', value: it && it.code != null ? String(it.code) : '' })).filter(it => it.value) | |
| 190 | + }, | |
| 191 | + labelsOf(options, csv) { | |
| 192 | + const v = csv == null ? '' : String(csv) | |
| 193 | + if (!v) return '-' | |
| 194 | + const parts = v.split(',').filter(Boolean) | |
| 195 | + if (!parts.length) return '-' | |
| 196 | + const labels = [] | |
| 197 | + ;(options || []).forEach(opt => { | |
| 198 | + const ov = opt && opt.value != null ? String(opt.value) : '' | |
| 199 | + if (ov && parts.includes(ov)) labels.push(opt.label != null ? String(opt.label) : '') | |
| 200 | + }) | |
| 201 | + return labels.filter(Boolean).join(',') || '-' | |
| 202 | + }, | |
| 203 | + boolText(v) { | |
| 204 | + if (v === true) return '是' | |
| 205 | + if (v === false) return '否' | |
| 206 | + return '-' | |
| 207 | + }, | |
| 208 | + safeText(v) { | |
| 209 | + const s = v == null ? '' : String(v) | |
| 210 | + return s.trim() ? s : '' | |
| 211 | + }, | |
| 212 | + async loadDetail(id) { | |
| 213 | + try { | |
| 214 | + const res = await domesticCustomerCreditGetExamineByIdApi(id) | |
| 215 | + this.form = (res && res.data) ? res.data : {} | |
| 216 | + } catch (e) { | |
| 217 | + this.form = {} | |
| 218 | + } | |
| 219 | + }, | |
| 220 | + onDownload(item) { | |
| 221 | + if (!item || !item.id) return | |
| 222 | + downloadFile(item.id, item.name || 'download') | |
| 223 | + } | |
| 224 | + } | |
| 225 | +} | |
| 226 | +</script> | |
| 227 | + | |
| 228 | +<style lang="scss" scoped> | |
| 229 | +.detail-page { | |
| 230 | + background: #f3f3f3; | |
| 231 | +} | |
| 232 | + | |
| 233 | +.scroll { | |
| 234 | + flex: 1; | |
| 235 | + padding: 8rpx 0 144rpx; | |
| 236 | +} | |
| 237 | + | |
| 238 | +.title-header { | |
| 239 | + display: flex; | |
| 240 | + align-items: center; | |
| 241 | + padding: 24rpx 32rpx 12rpx; | |
| 242 | + background-color: #ffffff; | |
| 243 | + | |
| 244 | + .title-header_icon { | |
| 245 | + width: 36rpx; | |
| 246 | + height: 36rpx; | |
| 247 | + margin-right: 12rpx; | |
| 248 | + } | |
| 249 | + | |
| 250 | + span { | |
| 251 | + font-size: 34rpx; | |
| 252 | + font-weight: 600; | |
| 253 | + color: rgba(0, 0, 0, 0.9); | |
| 254 | + } | |
| 255 | +} | |
| 256 | + | |
| 257 | +.section { | |
| 258 | + padding: 32rpx; | |
| 259 | + background: #fff; | |
| 260 | + margin-bottom: 20rpx; | |
| 261 | +} | |
| 262 | + | |
| 263 | +.row { | |
| 264 | + display: flex; | |
| 265 | + margin-bottom: 28rpx; | |
| 266 | + | |
| 267 | + &:last-child { | |
| 268 | + margin-bottom: 0; | |
| 269 | + } | |
| 270 | + | |
| 271 | + &.company { | |
| 272 | + font-size: 36rpx; | |
| 273 | + font-weight: 600; | |
| 274 | + color: rgba(0, 0, 0, 0.9); | |
| 275 | + padding-top: 8rpx; | |
| 276 | + line-height: 50rpx; | |
| 277 | + } | |
| 278 | + | |
| 279 | + .label { | |
| 280 | + max-width: 420rpx; | |
| 281 | + margin-right: 20rpx; | |
| 282 | + line-height: 32rpx; | |
| 283 | + font-size: 28rpx; | |
| 284 | + color: rgba(0, 0, 0, 0.6); | |
| 285 | + } | |
| 286 | + | |
| 287 | + .value { | |
| 288 | + flex: 1; | |
| 289 | + line-height: 32rpx; | |
| 290 | + font-size: 28rpx; | |
| 291 | + color: rgba(0, 0, 0, 0.9); | |
| 292 | + text-align: right; | |
| 293 | + word-break: break-all; | |
| 294 | + | |
| 295 | + &.act { | |
| 296 | + color: $theme-primary; | |
| 297 | + } | |
| 298 | + | |
| 299 | + &.pre { | |
| 300 | + white-space: pre-wrap; | |
| 301 | + } | |
| 302 | + } | |
| 303 | +} | |
| 304 | + | |
| 305 | +.file-item { | |
| 306 | + margin-bottom: 12rpx; | |
| 307 | + | |
| 308 | + &:last-child { | |
| 309 | + margin-bottom: 0; | |
| 310 | + } | |
| 311 | +} | |
| 312 | +</style> | ... | ... |
| ... | ... | @@ -4,18 +4,6 @@ |
| 4 | 4 | <uni-list> |
| 5 | 5 | <view class="title-header"> |
| 6 | 6 | <image class="title-header_icon" src="/static/images/title.png" /> |
| 7 | - <span>供应商</span> | |
| 8 | - </view> | |
| 9 | - | |
| 10 | - <uni-list-item class="select-item" :class="form.supplierName ? 'is-filled' : 'is-empty'" clickable | |
| 11 | - @click="openSheet('supplier')" :rightText="displayLabel('supplierName')" showArrow> | |
| 12 | - <template v-slot:body> | |
| 13 | - <view class="item-title"><text>供应商</text></view> | |
| 14 | - </template> | |
| 15 | - </uni-list-item> | |
| 16 | - | |
| 17 | - <view class="title-header"> | |
| 18 | - <image class="title-header_icon" src="/static/images/title.png" /> | |
| 19 | 7 | <span>基本资料</span> |
| 20 | 8 | </view> |
| 21 | 9 | |
| ... | ... | @@ -25,9 +13,10 @@ |
| 25 | 13 | </template> |
| 26 | 14 | </uni-list-item> |
| 27 | 15 | |
| 28 | - <uni-list-item title="公司性质"> | |
| 29 | - <template v-slot:footer> | |
| 30 | - <uni-easyinput v-model="form.companyNature" placeholder="请输入" :inputBorder="false" /> | |
| 16 | + <uni-list-item class="select-item" :class="form.companyNature ? 'is-filled' : 'is-empty'" clickable | |
| 17 | + @click="openSheet('companyNature')" :rightText="displayLabel('companyNatureName')" showArrow> | |
| 18 | + <template v-slot:body> | |
| 19 | + <view class="item-title"><text>公司性质</text></view> | |
| 31 | 20 | </template> |
| 32 | 21 | </uni-list-item> |
| 33 | 22 | |
| ... | ... | @@ -39,7 +28,7 @@ |
| 39 | 28 | |
| 40 | 29 | <uni-list-item title="电话及传真"> |
| 41 | 30 | <template v-slot:footer> |
| 42 | - <uni-easyinput v-model="form.phoneFax" placeholder="请输入" :inputBorder="false" /> | |
| 31 | + <uni-easyinput v-model="form.phoneAndFax" placeholder="请输入" :inputBorder="false" /> | |
| 43 | 32 | </template> |
| 44 | 33 | </uni-list-item> |
| 45 | 34 | |
| ... | ... | @@ -57,13 +46,13 @@ |
| 57 | 46 | |
| 58 | 47 | <uni-list-item title="国内业务负责人"> |
| 59 | 48 | <template v-slot:footer> |
| 60 | - <uni-easyinput v-model="form.domesticBusinessLeader" placeholder="请输入" :inputBorder="false" /> | |
| 49 | + <uni-easyinput v-model="form.domesticBusinessPrincipal" placeholder="请输入" :inputBorder="false" /> | |
| 61 | 50 | </template> |
| 62 | 51 | </uni-list-item> |
| 63 | 52 | |
| 64 | 53 | <uni-list-item title="负责人身份证/护照号"> |
| 65 | 54 | <template v-slot:footer> |
| 66 | - <uni-easyinput v-model="form.leaderIdPassportNo" placeholder="请输入" :inputBorder="false" /> | |
| 55 | + <uni-easyinput v-model="form.principalCertificateNo" placeholder="请输入" :inputBorder="false" /> | |
| 67 | 56 | </template> |
| 68 | 57 | </uni-list-item> |
| 69 | 58 | |
| ... | ... | @@ -75,7 +64,7 @@ |
| 75 | 64 | |
| 76 | 65 | <uni-list-item title="经营品种、规模"> |
| 77 | 66 | <template v-slot:footer> |
| 78 | - <uni-easyinput type="textarea" v-model="form.overallBusinessVarietyScale" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 67 | + <uni-easyinput type="textarea" v-model="form.overallBusinessVarietiesScale" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 79 | 68 | </template> |
| 80 | 69 | </uni-list-item> |
| 81 | 70 | |
| ... | ... | @@ -87,13 +76,13 @@ |
| 87 | 76 | |
| 88 | 77 | <uni-list-item title="出口规模、品种"> |
| 89 | 78 | <template v-slot:footer> |
| 90 | - <uni-easyinput type="textarea" v-model="form.exportToDomesticScaleVariety" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 79 | + <uni-easyinput type="textarea" v-model="form.exportToDomesticScaleVarieties" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 91 | 80 | </template> |
| 92 | 81 | </uni-list-item> |
| 93 | 82 | |
| 94 | 83 | <uni-list-item title="与国内合作企业"> |
| 95 | 84 | <template v-slot:footer> |
| 96 | - <uni-easyinput type="textarea" v-model="form.domesticCooperationCompanies" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 85 | + <uni-easyinput type="textarea" v-model="form.cooperatingDomesticCompanies" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 97 | 86 | </template> |
| 98 | 87 | </uni-list-item> |
| 99 | 88 | |
| ... | ... | @@ -111,13 +100,13 @@ |
| 111 | 100 | |
| 112 | 101 | <uni-list-item title="销售代表办公地考察"> |
| 113 | 102 | <template v-slot:footer> |
| 114 | - <uni-easyinput type="textarea" v-model="form.domesticSalesRepOfficeInspection" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 103 | + <uni-easyinput type="textarea" v-model="form.domesticSalesOfficeInspection" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 115 | 104 | </template> |
| 116 | 105 | </uni-list-item> |
| 117 | 106 | |
| 118 | 107 | <uni-list-item title="有无担保函"> |
| 119 | 108 | <template v-slot:footer> |
| 120 | - <uni-easyinput v-model="form.hasGuaranteeLetter" placeholder="请输入" :inputBorder="false" /> | |
| 109 | + <uni-easyinput v-model="form.guaranteeLetter" placeholder="请输入" :inputBorder="false" /> | |
| 121 | 110 | </template> |
| 122 | 111 | </uni-list-item> |
| 123 | 112 | |
| ... | ... | @@ -135,25 +124,25 @@ |
| 135 | 124 | |
| 136 | 125 | <uni-list-item title="滞箱滞报费用"> |
| 137 | 126 | <template v-slot:footer> |
| 138 | - <uni-easyinput v-model="form.demurrageFee" placeholder="请输入" :inputBorder="false" /> | |
| 127 | + <uni-easyinput v-model="form.detentionDemurrageFee" placeholder="请输入" :inputBorder="false" /> | |
| 139 | 128 | </template> |
| 140 | 129 | </uni-list-item> |
| 141 | 130 | |
| 142 | 131 | <uni-list-item title="操作品种"> |
| 143 | 132 | <template v-slot:footer> |
| 144 | - <uni-easyinput v-model="form.operatingVariety" placeholder="请输入" :inputBorder="false" /> | |
| 133 | + <uni-easyinput v-model="form.operationVariety" placeholder="请输入" :inputBorder="false" /> | |
| 145 | 134 | </template> |
| 146 | 135 | </uni-list-item> |
| 147 | 136 | |
| 148 | 137 | <uni-list-item title="操作规模"> |
| 149 | 138 | <template v-slot:footer> |
| 150 | - <uni-easyinput v-model="form.operatingScale" placeholder="请输入" :inputBorder="false" /> | |
| 139 | + <uni-easyinput v-model="form.operationScale" placeholder="请输入" :inputBorder="false" /> | |
| 151 | 140 | </template> |
| 152 | 141 | </uni-list-item> |
| 153 | 142 | |
| 154 | 143 | <uni-list-item title="定价模式"> |
| 155 | 144 | <template v-slot:footer> |
| 156 | - <uni-easyinput v-model="form.pricingModel" placeholder="请输入" :inputBorder="false" /> | |
| 145 | + <uni-easyinput v-model="form.pricingMode" placeholder="请输入" :inputBorder="false" /> | |
| 157 | 146 | </template> |
| 158 | 147 | </uni-list-item> |
| 159 | 148 | |
| ... | ... | @@ -165,7 +154,7 @@ |
| 165 | 154 | |
| 166 | 155 | <uni-list-item title="磅差约定"> |
| 167 | 156 | <template v-slot:footer> |
| 168 | - <uni-easyinput v-model="form.weightDiffAgreement" placeholder="请输入" :inputBorder="false" /> | |
| 157 | + <uni-easyinput v-model="form.weightDifferenceAgreement" placeholder="请输入" :inputBorder="false" /> | |
| 169 | 158 | </template> |
| 170 | 159 | </uni-list-item> |
| 171 | 160 | |
| ... | ... | @@ -194,31 +183,31 @@ |
| 194 | 183 | |
| 195 | 184 | <uni-list-item title="操作时间"> |
| 196 | 185 | <template v-slot:footer> |
| 197 | - <uni-easyinput v-model="form.operationTime" placeholder="请输入" :inputBorder="false" /> | |
| 186 | + <uni-easyinput v-model="form.schemeOperationTime" placeholder="请输入" :inputBorder="false" /> | |
| 198 | 187 | </template> |
| 199 | 188 | </uni-list-item> |
| 200 | 189 | |
| 201 | 190 | <uni-list-item title="操作模式"> |
| 202 | 191 | <template v-slot:footer> |
| 203 | - <uni-easyinput v-model="form.operationMode" placeholder="请输入" :inputBorder="false" /> | |
| 192 | + <uni-easyinput v-model="form.schemeOperationMode" placeholder="请输入" :inputBorder="false" /> | |
| 204 | 193 | </template> |
| 205 | 194 | </uni-list-item> |
| 206 | 195 | |
| 207 | 196 | <uni-list-item title="操作品种"> |
| 208 | 197 | <template v-slot:footer> |
| 209 | - <uni-easyinput v-model="form.operationVariety" placeholder="请输入" :inputBorder="false" /> | |
| 198 | + <uni-easyinput v-model="form.schemeOperationVariety" placeholder="请输入" :inputBorder="false" /> | |
| 210 | 199 | </template> |
| 211 | 200 | </uni-list-item> |
| 212 | 201 | |
| 213 | 202 | <uni-list-item title="操作数量"> |
| 214 | 203 | <template v-slot:footer> |
| 215 | - <uni-easyinput v-model="form.operationQuantity" placeholder="请输入" :inputBorder="false" /> | |
| 204 | + <uni-easyinput v-model="form.schemeOperationQuantity" placeholder="请输入" :inputBorder="false" /> | |
| 216 | 205 | </template> |
| 217 | 206 | </uni-list-item> |
| 218 | 207 | |
| 219 | 208 | <uni-list-item title="发货要求"> |
| 220 | 209 | <template v-slot:footer> |
| 221 | - <uni-easyinput type="textarea" v-model="form.deliveryRequirement" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 210 | + <uni-easyinput type="textarea" v-model="form.shippingRequirement" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 222 | 211 | </template> |
| 223 | 212 | </uni-list-item> |
| 224 | 213 | |
| ... | ... | @@ -234,11 +223,24 @@ |
| 234 | 223 | </template> |
| 235 | 224 | </uni-list-item> |
| 236 | 225 | |
| 237 | - <uni-list-item class="mgb10" title="评审部门"> | |
| 226 | + <uni-list-item title="评审部门"> | |
| 238 | 227 | <template v-slot:footer> |
| 239 | 228 | <uni-easyinput v-model="form.reviewDepartment" placeholder="请输入" :inputBorder="false" /> |
| 240 | 229 | </template> |
| 241 | 230 | </uni-list-item> |
| 231 | + | |
| 232 | + <uni-list-item title="资信调查人"> | |
| 233 | + <template v-slot:footer> | |
| 234 | + <uni-easyinput v-model="form.investigatorName" :inputBorder="false" disabled /> | |
| 235 | + </template> | |
| 236 | + </uni-list-item> | |
| 237 | + | |
| 238 | + <uni-list-item class="select-item mgb10" :class="form.purchase_department ? 'is-filled' : 'is-empty'" clickable | |
| 239 | + @click="openSheet('purchase_department')" :rightText="displayLabel('purchase_departmentName')" showArrow> | |
| 240 | + <template v-slot:body> | |
| 241 | + <view class="item-title"><text>采购处</text></view> | |
| 242 | + </template> | |
| 243 | + </uni-list-item> | |
| 242 | 244 | </uni-list> |
| 243 | 245 | </scroll-view> |
| 244 | 246 | |
| ... | ... | @@ -254,7 +256,7 @@ |
| 254 | 256 | <script> |
| 255 | 257 | import SingleSelectSheet from '@/components/single-select/index.vue' |
| 256 | 258 | import { getDicByCodes } from '@/utils/dic.js' |
| 257 | -import { foreignCustomerCreditSaveApi } from '@/api/procure-manage/foreignCustomerCredit.js' | |
| 259 | +import { foreignTradeCreditSaveApi, getPurchaseDeptApi } from '@/api/procure-manage/foreignTradeCredit.js' | |
| 258 | 260 | |
| 259 | 261 | export default { |
| 260 | 262 | name: 'ForeignTradeAdd', |
| ... | ... | @@ -262,90 +264,113 @@ export default { |
| 262 | 264 | data() { |
| 263 | 265 | return { |
| 264 | 266 | submitting: false, |
| 265 | - supplierOptions: [], | |
| 266 | 267 | supplierCategoryOptions: [ |
| 267 | 268 | { label: 'A类供应商', value: 'A' }, |
| 268 | 269 | { label: 'B类供应商', value: 'B' }, |
| 269 | 270 | { label: 'C类供应商', value: 'C' }, |
| 270 | 271 | { label: 'D类供应商', value: 'D' } |
| 271 | 272 | ], |
| 273 | + companyNatureOptions: [], | |
| 274 | + purchaseDeptOptions: [], | |
| 272 | 275 | sheet: { visible: false, title: '', options: [], field: '', value: '' }, |
| 273 | 276 | form: { |
| 274 | - supplier: '', | |
| 275 | - supplierName: '', | |
| 277 | + id: '', | |
| 276 | 278 | unitName: '', |
| 277 | 279 | companyNature: '', |
| 280 | + companyNatureName: '', | |
| 278 | 281 | legalRepresentative: '', |
| 279 | - phoneFax: '', | |
| 282 | + phoneAndFax: '', | |
| 280 | 283 | registrationCertificateNo: '', |
| 281 | 284 | address: '', |
| 282 | - domesticBusinessLeader: '', | |
| 283 | - leaderIdPassportNo: '', | |
| 285 | + domesticBusinessPrincipal: '', | |
| 286 | + principalCertificateNo: '', | |
| 284 | 287 | establishedTimeAndYardScale: '', |
| 285 | - overallBusinessVarietyScale: '', | |
| 288 | + overallBusinessVarietiesScale: '', | |
| 286 | 289 | exportToDomesticTime: '', |
| 287 | - exportToDomesticScaleVariety: '', | |
| 288 | - domesticCooperationCompanies: '', | |
| 290 | + exportToDomesticScaleVarieties: '', | |
| 291 | + cooperatingDomesticCompanies: '', | |
| 289 | 292 | cooperationEffect: '', |
| 290 | 293 | supplierInspection: '', |
| 291 | - domesticSalesRepOfficeInspection: '', | |
| 292 | - hasGuaranteeLetter: '', | |
| 294 | + domesticSalesOfficeInspection: '', | |
| 295 | + guaranteeLetter: '', | |
| 293 | 296 | contractDispute: '', |
| 294 | 297 | insuranceTransportMode: '', |
| 295 | - demurrageFee: '', | |
| 296 | - operatingVariety: '', | |
| 297 | - operatingScale: '', | |
| 298 | - pricingModel: '', | |
| 298 | + detentionDemurrageFee: '', | |
| 299 | + operationVariety: '', | |
| 300 | + operationScale: '', | |
| 301 | + pricingMode: '', | |
| 299 | 302 | settlementMethod: '', |
| 300 | - weightDiffAgreement: '', | |
| 303 | + weightDifferenceAgreement: '', | |
| 301 | 304 | qualityStandard: '', |
| 302 | 305 | supplierCategory: '', |
| 303 | - operationTime: '', | |
| 304 | - operationMode: '', | |
| 305 | - operationVariety: '', | |
| 306 | - operationQuantity: '', | |
| 307 | - deliveryRequirement: '', | |
| 306 | + schemeOperationTime: '', | |
| 307 | + schemeOperationMode: '', | |
| 308 | + schemeOperationVariety: '', | |
| 309 | + schemeOperationQuantity: '', | |
| 310 | + shippingRequirement: '', | |
| 308 | 311 | paymentMethod: '', |
| 309 | 312 | nextReviewTime: '', |
| 310 | - reviewDepartment: '' | |
| 313 | + reviewDepartment: '', | |
| 314 | + investigatorId: '', | |
| 315 | + investigatorName: '', | |
| 316 | + purchase_department: '', | |
| 317 | + purchase_departmentName: '' | |
| 311 | 318 | } |
| 312 | 319 | } |
| 313 | 320 | }, |
| 314 | 321 | created() { |
| 315 | - this.loadSupplierOptions() | |
| 322 | + this.loadDicData() | |
| 323 | + this.loadPurchaseDeptOptions() | |
| 324 | + const u = (this.$store && this.$store.state && this.$store.state.user) ? this.$store.state.user : {} | |
| 325 | + this.form.investigatorId = u && u.id ? String(u.id) : '' | |
| 326 | + this.form.investigatorName = u && u.name ? String(u.name) : '' | |
| 316 | 327 | }, |
| 317 | 328 | methods: { |
| 318 | - async loadSupplierOptions() { | |
| 329 | + async loadDicData() { | |
| 319 | 330 | try { |
| 320 | - const results = await getDicByCodes(['SUPPLIER']) | |
| 321 | - const items = results && results.SUPPLIER && results.SUPPLIER.data ? results.SUPPLIER.data : [] | |
| 322 | - this.supplierOptions = (Array.isArray(items) ? items : []).map(it => ({ | |
| 331 | + const results = await getDicByCodes(['COMPANY_NATURE']) | |
| 332 | + const items = results && results.COMPANY_NATURE && results.COMPANY_NATURE.data ? results.COMPANY_NATURE.data : [] | |
| 333 | + this.companyNatureOptions = (Array.isArray(items) ? items : []).map(it => ({ | |
| 323 | 334 | label: it && it.name != null ? String(it.name) : '', |
| 324 | 335 | value: it && it.code != null ? String(it.code) : '' |
| 325 | 336 | })).filter(it => it.value) |
| 326 | 337 | } catch (e) { |
| 327 | - this.supplierOptions = [] | |
| 338 | + this.companyNatureOptions = [] | |
| 339 | + } | |
| 340 | + }, | |
| 341 | + async loadPurchaseDeptOptions() { | |
| 342 | + try { | |
| 343 | + const res = await getPurchaseDeptApi() | |
| 344 | + const list = (res && res.data) ? res.data : [] | |
| 345 | + this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | |
| 346 | + label: it && it.name != null ? String(it.name) : '', | |
| 347 | + value: it && it.id != null ? String(it.id) : '' | |
| 348 | + })).filter(it => it.value) | |
| 349 | + } catch (e) { | |
| 350 | + this.purchaseDeptOptions = [] | |
| 328 | 351 | } |
| 329 | 352 | }, |
| 330 | 353 | displayLabel(field) { |
| 331 | 354 | const m = this.form || {} |
| 332 | 355 | const map = { |
| 333 | - supplierName: '请选择', | |
| 356 | + companyNatureName: '请选择', | |
| 357 | + purchase_departmentName: '请选择', | |
| 334 | 358 | supplierCategory: '请选择' |
| 335 | 359 | } |
| 336 | - const v = m[field] | |
| 337 | - if (v != null && String(v).trim()) return String(v) | |
| 338 | 360 | if (field === 'supplierCategory') { |
| 339 | 361 | const code = m.supplierCategory |
| 340 | 362 | const found = (this.supplierCategoryOptions || []).find(o => String(o.value) === String(code)) |
| 341 | 363 | return found ? String(found.label || '') : map[field] |
| 342 | 364 | } |
| 365 | + const v = m[field] | |
| 366 | + if (v != null && String(v).trim()) return String(v) | |
| 343 | 367 | return map[field] || '请选择' |
| 344 | 368 | }, |
| 345 | 369 | openSheet(field) { |
| 346 | 370 | const map = { |
| 347 | - supplier: { title: '选择供应商', options: this.supplierOptions, valueField: 'supplier', labelField: 'supplierName' }, | |
| 348 | - supplierCategory: { title: '供应商分类', options: this.supplierCategoryOptions, valueField: 'supplierCategory', labelField: '' } | |
| 371 | + companyNature: { title: '公司性质', options: this.companyNatureOptions, valueField: 'companyNature', labelField: 'companyNatureName' }, | |
| 372 | + supplierCategory: { title: '供应商分类', options: this.supplierCategoryOptions, valueField: 'supplierCategory', labelField: '' }, | |
| 373 | + purchase_department: { title: '采购处', options: this.purchaseDeptOptions, valueField: 'purchase_department', labelField: 'purchase_departmentName' } | |
| 349 | 374 | } |
| 350 | 375 | const cfg = map[field] |
| 351 | 376 | if (!cfg) return |
| ... | ... | @@ -362,53 +387,54 @@ export default { |
| 362 | 387 | }, |
| 363 | 388 | onSheetConfirm({ value, label }) { |
| 364 | 389 | const field = this.sheet.field |
| 365 | - if (field === 'supplier') { | |
| 366 | - this.form.supplier = value | |
| 367 | - this.form.supplierName = label | |
| 368 | - } | |
| 390 | + if (field === 'companyNature') this.form.companyNatureName = label | |
| 369 | 391 | if (field === 'supplierCategory') { |
| 370 | 392 | this.form.supplierCategory = value |
| 371 | 393 | } |
| 394 | + if (field === 'purchase_department') this.form.purchase_departmentName = label | |
| 395 | + if (field === 'companyNature') this.form.companyNature = value | |
| 396 | + if (field === 'purchase_department') this.form.purchase_department = value | |
| 372 | 397 | this.sheet.visible = false |
| 373 | 398 | }, |
| 374 | 399 | validate() { |
| 375 | 400 | const requiredFields = [ |
| 376 | - { key: 'supplier', label: '供应商' }, | |
| 377 | 401 | { key: 'unitName', label: '单位名称' }, |
| 378 | 402 | { key: 'companyNature', label: '公司性质' }, |
| 379 | 403 | { key: 'legalRepresentative', label: '法人代表' }, |
| 380 | - { key: 'phoneFax', label: '电话及传真' }, | |
| 404 | + { key: 'phoneAndFax', label: '电话及传真' }, | |
| 381 | 405 | { key: 'registrationCertificateNo', label: '注册证书号' }, |
| 382 | 406 | { key: 'address', label: '地址' }, |
| 383 | - { key: 'domesticBusinessLeader', label: '国内业务负责人' }, | |
| 384 | - { key: 'leaderIdPassportNo', label: '负责人身份证/护照号' }, | |
| 407 | + { key: 'domesticBusinessPrincipal', label: '国内业务负责人' }, | |
| 408 | + { key: 'principalCertificateNo', label: '负责人身份证/护照号' }, | |
| 385 | 409 | { key: 'establishedTimeAndYardScale', label: '成立时间及货场规模' }, |
| 386 | - { key: 'overallBusinessVarietyScale', label: '经营品种、规模' }, | |
| 410 | + { key: 'overallBusinessVarietiesScale', label: '经营品种、规模' }, | |
| 387 | 411 | { key: 'exportToDomesticTime', label: '出口到国内时间' }, |
| 388 | - { key: 'exportToDomesticScaleVariety', label: '出口规模、品种' }, | |
| 389 | - { key: 'domesticCooperationCompanies', label: '与国内合作企业' }, | |
| 412 | + { key: 'exportToDomesticScaleVarieties', label: '出口规模、品种' }, | |
| 413 | + { key: 'cooperatingDomesticCompanies', label: '与国内合作企业' }, | |
| 390 | 414 | { key: 'cooperationEffect', label: '合作效果' }, |
| 391 | 415 | { key: 'supplierInspection', label: '供应商考察' }, |
| 392 | - { key: 'domesticSalesRepOfficeInspection', label: '销售代表办公地考察' }, | |
| 393 | - { key: 'hasGuaranteeLetter', label: '有无担保函' }, | |
| 416 | + { key: 'domesticSalesOfficeInspection', label: '销售代表办公地考察' }, | |
| 417 | + { key: 'guaranteeLetter', label: '有无担保函' }, | |
| 394 | 418 | { key: 'contractDispute', label: '合同纠纷' }, |
| 395 | 419 | { key: 'insuranceTransportMode', label: '保险、运输方式' }, |
| 396 | - { key: 'demurrageFee', label: '滞箱滞报费用' }, | |
| 397 | - { key: 'operatingVariety', label: '操作品种' }, | |
| 398 | - { key: 'operatingScale', label: '操作规模' }, | |
| 399 | - { key: 'pricingModel', label: '定价模式' }, | |
| 420 | + { key: 'detentionDemurrageFee', label: '滞箱滞报费用' }, | |
| 421 | + { key: 'operationVariety', label: '操作品种' }, | |
| 422 | + { key: 'operationScale', label: '操作规模' }, | |
| 423 | + { key: 'pricingMode', label: '定价模式' }, | |
| 400 | 424 | { key: 'settlementMethod', label: '结算方式' }, |
| 401 | - { key: 'weightDiffAgreement', label: '磅差约定' }, | |
| 425 | + { key: 'weightDifferenceAgreement', label: '磅差约定' }, | |
| 402 | 426 | { key: 'qualityStandard', label: '质量标准' }, |
| 403 | 427 | { key: 'supplierCategory', label: '供应商分类' }, |
| 404 | - { key: 'operationTime', label: '操作时间' }, | |
| 405 | - { key: 'operationMode', label: '操作模式' }, | |
| 406 | - { key: 'operationVariety', label: '操作品种' }, | |
| 407 | - { key: 'operationQuantity', label: '操作数量' }, | |
| 408 | - { key: 'deliveryRequirement', label: '发货要求' }, | |
| 428 | + { key: 'schemeOperationTime', label: '操作时间' }, | |
| 429 | + { key: 'schemeOperationMode', label: '操作模式' }, | |
| 430 | + { key: 'schemeOperationVariety', label: '操作品种' }, | |
| 431 | + { key: 'schemeOperationQuantity', label: '操作数量' }, | |
| 432 | + { key: 'shippingRequirement', label: '发货要求' }, | |
| 409 | 433 | { key: 'paymentMethod', label: '付款方式' }, |
| 410 | 434 | { key: 'nextReviewTime', label: '下次评审时间' }, |
| 411 | - { key: 'reviewDepartment', label: '评审部门' } | |
| 435 | + { key: 'reviewDepartment', label: '评审部门' }, | |
| 436 | + { key: 'investigatorId', label: '资信调查人ID' }, | |
| 437 | + { key: 'purchase_department', label: '采购处' } | |
| 412 | 438 | ] |
| 413 | 439 | for (let i = 0; i < requiredFields.length; i++) { |
| 414 | 440 | const f = requiredFields[i] |
| ... | ... | @@ -429,7 +455,7 @@ export default { |
| 429 | 455 | this.submitting = true |
| 430 | 456 | const payload = this.buildPayload() |
| 431 | 457 | try { |
| 432 | - await foreignCustomerCreditSaveApi(payload) | |
| 458 | + await foreignTradeCreditSaveApi(payload) | |
| 433 | 459 | uni.showToast({ title: '提交成功', icon: 'success' }) |
| 434 | 460 | try { uni.setStorageSync('FOREIGN_TRADE_LIST_NEED_REFRESH', '1') } catch (e) {} |
| 435 | 461 | setTimeout(() => { uni.navigateBack() }, 300) | ... | ... |
| ... | ... | @@ -4,31 +4,30 @@ |
| 4 | 4 | <view class="detail-page"> |
| 5 | 5 | <view class="section"> |
| 6 | 6 | <text class="row company">{{ safeText(form.unitName) }}</text> |
| 7 | - <view class="row"><text class="label">供应商</text><text class="value">{{ safeText(form.supplierName) }}</text></view> | |
| 8 | - <view class="row"><text class="label">公司性质</text><text class="value">{{ safeText(form.companyNature) }}</text></view> | |
| 7 | + <view class="row"><text class="label">公司性质</text><text class="value">{{ safeText(companyNatureText) }}</text></view> | |
| 9 | 8 | <view class="row"><text class="label">法人代表</text><text class="value">{{ safeText(form.legalRepresentative) }}</text></view> |
| 10 | - <view class="row"><text class="label">电话及传真</text><text class="value">{{ safeText(form.phoneFax) }}</text></view> | |
| 9 | + <view class="row"><text class="label">电话及传真</text><text class="value">{{ safeText(form.phoneAndFax) }}</text></view> | |
| 11 | 10 | <view class="row"><text class="label">注册证书号</text><text class="value">{{ safeText(form.registrationCertificateNo) }}</text></view> |
| 12 | 11 | <view class="row"><text class="label">地址</text><text class="value">{{ safeText(form.address) }}</text></view> |
| 13 | - <view class="row"><text class="label">国内业务负责人</text><text class="value">{{ safeText(form.domesticBusinessLeader) }}</text></view> | |
| 14 | - <view class="row"><text class="label">负责人身份证/护照号</text><text class="value">{{ safeText(form.leaderIdPassportNo) }}</text></view> | |
| 12 | + <view class="row"><text class="label">国内业务负责人</text><text class="value">{{ safeText(form.domesticBusinessPrincipal) }}</text></view> | |
| 13 | + <view class="row"><text class="label">负责人身份证/护照号</text><text class="value">{{ safeText(form.principalCertificateNo) }}</text></view> | |
| 15 | 14 | <view class="row"><text class="label">成立时间及货场规模</text><text class="value pre">{{ safeText(form.establishedTimeAndYardScale) }}</text></view> |
| 16 | - <view class="row"><text class="label">经营品种、规模</text><text class="value pre">{{ safeText(form.overallBusinessVarietyScale) }}</text></view> | |
| 15 | + <view class="row"><text class="label">经营品种、规模</text><text class="value pre">{{ safeText(form.overallBusinessVarietiesScale) }}</text></view> | |
| 17 | 16 | <view class="row"><text class="label">出口到国内时间</text><text class="value">{{ safeText(form.exportToDomesticTime) }}</text></view> |
| 18 | - <view class="row"><text class="label">出口规模、品种</text><text class="value pre">{{ safeText(form.exportToDomesticScaleVariety) }}</text></view> | |
| 19 | - <view class="row"><text class="label">与国内合作企业</text><text class="value pre">{{ safeText(form.domesticCooperationCompanies) }}</text></view> | |
| 17 | + <view class="row"><text class="label">出口规模、品种</text><text class="value pre">{{ safeText(form.exportToDomesticScaleVarieties) }}</text></view> | |
| 18 | + <view class="row"><text class="label">与国内合作企业</text><text class="value pre">{{ safeText(form.cooperatingDomesticCompanies) }}</text></view> | |
| 20 | 19 | <view class="row"><text class="label">合作效果</text><text class="value pre">{{ safeText(form.cooperationEffect) }}</text></view> |
| 21 | 20 | <view class="row"><text class="label">供应商考察</text><text class="value pre">{{ safeText(form.supplierInspection) }}</text></view> |
| 22 | - <view class="row"><text class="label">销售代表办公地考察</text><text class="value pre">{{ safeText(form.domesticSalesRepOfficeInspection) }}</text></view> | |
| 23 | - <view class="row"><text class="label">有无担保函</text><text class="value">{{ safeText(form.hasGuaranteeLetter) }}</text></view> | |
| 21 | + <view class="row"><text class="label">销售代表办公地考察</text><text class="value pre">{{ safeText(form.domesticSalesOfficeInspection) }}</text></view> | |
| 22 | + <view class="row"><text class="label">有无担保函</text><text class="value">{{ safeText(form.guaranteeLetter) }}</text></view> | |
| 24 | 23 | <view class="row"><text class="label">合同纠纷</text><text class="value pre">{{ safeText(form.contractDispute) }}</text></view> |
| 25 | 24 | <view class="row"><text class="label">保险、运输方式</text><text class="value">{{ safeText(form.insuranceTransportMode) }}</text></view> |
| 26 | - <view class="row"><text class="label">滞箱滞报费用</text><text class="value">{{ safeText(form.demurrageFee) }}</text></view> | |
| 27 | - <view class="row"><text class="label">操作品种</text><text class="value">{{ safeText(form.operatingVariety) }}</text></view> | |
| 28 | - <view class="row"><text class="label">操作规模</text><text class="value">{{ safeText(form.operatingScale) }}</text></view> | |
| 29 | - <view class="row"><text class="label">定价模式</text><text class="value">{{ safeText(form.pricingModel) }}</text></view> | |
| 25 | + <view class="row"><text class="label">滞箱滞报费用</text><text class="value">{{ safeText(form.detentionDemurrageFee) }}</text></view> | |
| 26 | + <view class="row"><text class="label">操作品种</text><text class="value">{{ safeText(form.operationVariety) }}</text></view> | |
| 27 | + <view class="row"><text class="label">操作规模</text><text class="value">{{ safeText(form.operationScale) }}</text></view> | |
| 28 | + <view class="row"><text class="label">定价模式</text><text class="value">{{ safeText(form.pricingMode) }}</text></view> | |
| 30 | 29 | <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> |
| 31 | - <view class="row"><text class="label">磅差约定</text><text class="value">{{ safeText(form.weightDiffAgreement) }}</text></view> | |
| 30 | + <view class="row"><text class="label">磅差约定</text><text class="value">{{ safeText(form.weightDifferenceAgreement) }}</text></view> | |
| 32 | 31 | <view class="row"><text class="label">质量标准</text><text class="value">{{ safeText(form.qualityStandard) }}</text></view> |
| 33 | 32 | </view> |
| 34 | 33 | |
| ... | ... | @@ -46,14 +45,16 @@ |
| 46 | 45 | <span>操作方案</span> |
| 47 | 46 | </view> |
| 48 | 47 | <view class="section"> |
| 49 | - <view class="row"><text class="label">操作时间</text><text class="value">{{ safeText(form.operationTime) }}</text></view> | |
| 50 | - <view class="row"><text class="label">操作模式</text><text class="value">{{ safeText(form.operationMode) }}</text></view> | |
| 51 | - <view class="row"><text class="label">操作品种</text><text class="value">{{ safeText(form.operationVariety) }}</text></view> | |
| 52 | - <view class="row"><text class="label">操作数量</text><text class="value">{{ safeText(form.operationQuantity) }}</text></view> | |
| 53 | - <view class="row"><text class="label">发货要求</text><text class="value pre">{{ safeText(form.deliveryRequirement) }}</text></view> | |
| 48 | + <view class="row"><text class="label">操作时间</text><text class="value">{{ safeText(form.schemeOperationTime) }}</text></view> | |
| 49 | + <view class="row"><text class="label">操作模式</text><text class="value">{{ safeText(form.schemeOperationMode) }}</text></view> | |
| 50 | + <view class="row"><text class="label">操作品种</text><text class="value">{{ safeText(form.schemeOperationVariety) }}</text></view> | |
| 51 | + <view class="row"><text class="label">操作数量</text><text class="value">{{ safeText(form.schemeOperationQuantity) }}</text></view> | |
| 52 | + <view class="row"><text class="label">发货要求</text><text class="value pre">{{ safeText(form.shippingRequirement) }}</text></view> | |
| 54 | 53 | <view class="row"><text class="label">付款方式</text><text class="value">{{ safeText(form.paymentMethod) }}</text></view> |
| 55 | 54 | <view class="row"><text class="label">下次评审时间</text><text class="value">{{ safeText(form.nextReviewTime) }}</text></view> |
| 56 | 55 | <view class="row"><text class="label">评审部门</text><text class="value">{{ safeText(form.reviewDepartment) }}</text></view> |
| 56 | + <view class="row"><text class="label">资信调查人</text><text class="value">{{ safeText(form.investigatorName) }}</text></view> | |
| 57 | + <view class="row"><text class="label">采购处</text><text class="value">{{ safeText(purchaseDeptName) }}</text></view> | |
| 57 | 58 | <view v-if="reviewHint" class="hint">{{ reviewHint }}</view> |
| 58 | 59 | </view> |
| 59 | 60 | |
| ... | ... | @@ -70,7 +71,7 @@ |
| 70 | 71 | <script> |
| 71 | 72 | import DetailButtons from '@/components/detail-buttons/index.vue' |
| 72 | 73 | import { getDicByCodes, getDicName } from '@/utils/dic.js' |
| 73 | -import { foreignCustomerCreditGetApi } from '@/api/procure-manage/foreignCustomerCredit.js' | |
| 74 | +import { foreignTradeCreditCancelApi, foreignTradeCreditGetApi, getPurchaseDeptApi } from '@/api/procure-manage/foreignTradeCredit.js' | |
| 74 | 75 | |
| 75 | 76 | export default { |
| 76 | 77 | name: 'ForeignTradeDetail', |
| ... | ... | @@ -81,25 +82,59 @@ export default { |
| 81 | 82 | loading: false, |
| 82 | 83 | form: {}, |
| 83 | 84 | dicOptions: { |
| 84 | - AUDIT_STATUS: [] | |
| 85 | + AUDIT_STATUS: [], | |
| 86 | + COMPANY_NATURE: [] | |
| 85 | 87 | }, |
| 88 | + purchaseDeptOptions: [], | |
| 86 | 89 | buttons: [{ |
| 90 | + text: '审核详情', | |
| 91 | + visible: true, | |
| 92 | + variant: 'outline', | |
| 93 | + event: 'auditDetail', | |
| 94 | + },{ | |
| 95 | + text: '审核', | |
| 96 | + visible: true, | |
| 97 | + variant: 'primary', | |
| 98 | + event: 'audit', | |
| 99 | + },{ | |
| 87 | 100 | text: '编辑', |
| 88 | 101 | visible: true, |
| 89 | 102 | variant: 'outline', |
| 90 | 103 | event: 'edit', |
| 104 | + },{ | |
| 105 | + text: '取消', | |
| 106 | + visible: true, | |
| 107 | + variant: 'outline', | |
| 108 | + event: 'cancel', | |
| 91 | 109 | }] |
| 92 | 110 | } |
| 93 | 111 | }, |
| 94 | 112 | computed: { |
| 95 | 113 | displayButtons() { |
| 96 | - return [{ ...this.buttons[0], visible: true }] | |
| 114 | + const s = this.form && this.form.status || false | |
| 115 | + return [ | |
| 116 | + { ...this.buttons[0], visible: s && this.$auth.hasPermi('procure-manage:foreign-trade:review') }, | |
| 117 | + { ...this.buttons[1], visible: s === 'AUDIT' && this.$auth.hasPermi('procure-manage:foreign-trade:approve') }, | |
| 118 | + { ...this.buttons[2], visible: this.$auth.hasPermi('procure-manage:foreign-trade:modify') }, | |
| 119 | + { ...this.buttons[3], visible: this.$auth.hasPermi('procure-manage:foreign-trade:cancel') }, | |
| 120 | + ] | |
| 121 | + }, | |
| 122 | + companyNatureText() { | |
| 123 | + const v = this.form && this.form.companyNature != null ? String(this.form.companyNature) : '' | |
| 124 | + if (!v) return '-' | |
| 125 | + return getDicName('COMPANY_NATURE', v, this.dicOptions.COMPANY_NATURE) || v | |
| 97 | 126 | }, |
| 98 | 127 | auditStatusText() { |
| 99 | 128 | const v = this.form && this.form.status != null ? String(this.form.status) : '' |
| 100 | 129 | if (!v) return '-' |
| 101 | 130 | return getDicName('AUDIT_STATUS', v, this.dicOptions.AUDIT_STATUS) || v |
| 102 | 131 | }, |
| 132 | + purchaseDeptName() { | |
| 133 | + const v = this.form && this.form.purchase_department != null ? String(this.form.purchase_department) : '' | |
| 134 | + if (!v) return '-' | |
| 135 | + const found = (this.purchaseDeptOptions || []).find(o => String(o.value) === v) | |
| 136 | + return found ? String(found.label || '') : v | |
| 137 | + }, | |
| 103 | 138 | supplierCategoryName() { |
| 104 | 139 | const v = this.form && this.form.supplierCategory != null ? String(this.form.supplierCategory) : '' |
| 105 | 140 | const map = { A: 'A类供应商', B: 'B类供应商', C: 'C类供应商', D: 'D类供应商' } |
| ... | ... | @@ -128,6 +163,7 @@ export default { |
| 128 | 163 | }, |
| 129 | 164 | created() { |
| 130 | 165 | this.loadDicData() |
| 166 | + this.loadPurchaseDeptOptions() | |
| 131 | 167 | }, |
| 132 | 168 | onShow() { |
| 133 | 169 | const options = (this.$route && this.$route.query) ? this.$route.query : {} |
| ... | ... | @@ -138,21 +174,77 @@ export default { |
| 138 | 174 | methods: { |
| 139 | 175 | async loadDicData() { |
| 140 | 176 | try { |
| 141 | - const results = await getDicByCodes(['AUDIT_STATUS']) | |
| 177 | + const results = await getDicByCodes(['AUDIT_STATUS', 'COMPANY_NATURE']) | |
| 142 | 178 | this.dicOptions.AUDIT_STATUS = (results.AUDIT_STATUS && results.AUDIT_STATUS.data) || [] |
| 179 | + this.dicOptions.COMPANY_NATURE = (results.COMPANY_NATURE && results.COMPANY_NATURE.data) || [] | |
| 143 | 180 | } catch (e) { |
| 144 | 181 | this.dicOptions.AUDIT_STATUS = [] |
| 182 | + this.dicOptions.COMPANY_NATURE = [] | |
| 183 | + } | |
| 184 | + }, | |
| 185 | + async loadPurchaseDeptOptions() { | |
| 186 | + try { | |
| 187 | + const res = await getPurchaseDeptApi() | |
| 188 | + const list = (res && res.data) ? res.data : [] | |
| 189 | + this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | |
| 190 | + label: it && it.name != null ? String(it.name) : '', | |
| 191 | + value: it && it.id != null ? String(it.id) : '' | |
| 192 | + })).filter(it => it.value) | |
| 193 | + } catch (e) { | |
| 194 | + this.purchaseDeptOptions = [] | |
| 145 | 195 | } |
| 146 | 196 | }, |
| 147 | 197 | handleButtonClick(btn) { |
| 148 | 198 | if (!btn || btn.disabled) return |
| 149 | - if (typeof btn.onClick === 'function') return btn.onClick(this.detail, btn.params) | |
| 199 | + if (typeof btn.onClick === 'function') return btn.onClick(this.form, btn.params) | |
| 150 | 200 | const e = btn.event || '' |
| 201 | + if (e === 'audit') return this.onAudit(btn && btn.params) | |
| 202 | + if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params) | |
| 151 | 203 | if (e === 'edit') return this.onEdit(btn && btn.params) |
| 204 | + if (e === 'cancel') return this.onCancel(btn && btn.params) | |
| 205 | + }, | |
| 206 | + onAudit() { | |
| 207 | + const id = this.id || (this.form && this.form.id) || '' | |
| 208 | + if (!id) return | |
| 209 | + const CACHE_KEY = 'sourceBusinessId' | |
| 210 | + const TYPE = 'contractType' | |
| 211 | + uni.setStorageSync(TYPE, 'CUSTOMER_CREDIT_OUT') | |
| 212 | + uni.setStorageSync(CACHE_KEY, id) | |
| 213 | + uni.navigateTo({ url: '/pages/flow/audit' }) | |
| 214 | + }, | |
| 215 | + onAuditDetail() { | |
| 216 | + const id = this.id || (this.form && this.form.id) || '' | |
| 217 | + if (!id) return | |
| 218 | + const CACHE_KEY = 'sourceBusinessId' | |
| 219 | + const TYPE = 'contractType' | |
| 220 | + uni.setStorageSync(TYPE, 'CUSTOMER_CREDIT_OUT') | |
| 221 | + uni.setStorageSync(CACHE_KEY, id) | |
| 222 | + uni.navigateTo({ url: '/pages/flow/audit_detail' }) | |
| 152 | 223 | }, |
| 153 | 224 | onEdit() { |
| 154 | 225 | uni.navigateTo({ url: '/pages/foreign_trade/modify?id=' + this.id }) |
| 155 | 226 | }, |
| 227 | + onCancel() { | |
| 228 | + const id = this.id || (this.form && this.form.id) || '' | |
| 229 | + if (!id) return | |
| 230 | + uni.showModal({ | |
| 231 | + title: '系统提示', | |
| 232 | + content: '是否确定取消该流程?', | |
| 233 | + confirmText: '确定', | |
| 234 | + cancelText: '取消', | |
| 235 | + success: (res) => { | |
| 236 | + if (res && res.confirm) { | |
| 237 | + foreignTradeCreditCancelApi(id).then(() => { | |
| 238 | + uni.showToast({ title: '已取消', icon: 'none' }) | |
| 239 | + try { uni.setStorageSync('FOREIGN_TRADE_LIST_NEED_REFRESH', '1') } catch (e) {} | |
| 240 | + setTimeout(() => { uni.redirectTo({ url: '/pages/foreign_trade/index' }) }, 300) | |
| 241 | + }).catch((e) => { | |
| 242 | + uni.showToast({ title: (e && e.msg) || '取消失败', icon: 'none' }) | |
| 243 | + }) | |
| 244 | + } | |
| 245 | + } | |
| 246 | + }) | |
| 247 | + }, | |
| 156 | 248 | safeText(v) { |
| 157 | 249 | const s = v == null ? '' : String(v) |
| 158 | 250 | return s.trim() ? s : '-' |
| ... | ... | @@ -168,7 +260,7 @@ export default { |
| 168 | 260 | if (!this.id) return |
| 169 | 261 | this.loading = true |
| 170 | 262 | try { |
| 171 | - const res = await foreignCustomerCreditGetApi(this.id) | |
| 263 | + const res = await foreignTradeCreditGetApi(this.id) | |
| 172 | 264 | const data = (res && res.data) ? res.data : {} |
| 173 | 265 | this.form = data |
| 174 | 266 | } catch (e) { | ... | ... |
| 1 | +<template> | |
| 2 | + <view class="detail-page"> | |
| 3 | + <scroll-view class="scroll" scroll-y> | |
| 4 | + <view class="section"> | |
| 5 | + <text class="row company">{{ safeText(form.unitName) }}</text> | |
| 6 | + <view class="row"><text class="label">公司性质</text><text class="value">{{ safeText(companyNatureText) }}</text></view> | |
| 7 | + <view class="row"><text class="label">法人代表</text><text class="value">{{ safeText(form.legalRepresentative) }}</text></view> | |
| 8 | + <view class="row"><text class="label">电话及传真</text><text class="value">{{ safeText(form.phoneAndFax) }}</text></view> | |
| 9 | + <view class="row"><text class="label">注册证书号</text><text class="value">{{ safeText(form.registrationCertificateNo) }}</text></view> | |
| 10 | + <view class="row"><text class="label">地址</text><text class="value">{{ safeText(form.address) }}</text></view> | |
| 11 | + <view class="row"><text class="label">国内业务负责人</text><text class="value">{{ safeText(form.domesticBusinessPrincipal) }}</text></view> | |
| 12 | + <view class="row"><text class="label">负责人身份证/护照号</text><text class="value">{{ safeText(form.principalCertificateNo) }}</text></view> | |
| 13 | + <view class="row"><text class="label">成立时间及货场规模</text><text class="value pre">{{ safeText(form.establishedTimeAndYardScale) }}</text></view> | |
| 14 | + <view class="row"><text class="label">经营品种、规模</text><text class="value pre">{{ safeText(form.overallBusinessVarietiesScale) }}</text></view> | |
| 15 | + <view class="row"><text class="label">出口到国内时间</text><text class="value">{{ safeText(form.exportToDomesticTime) }}</text></view> | |
| 16 | + <view class="row"><text class="label">出口规模、品种</text><text class="value pre">{{ safeText(form.exportToDomesticScaleVarieties) }}</text></view> | |
| 17 | + <view class="row"><text class="label">与国内合作企业</text><text class="value pre">{{ safeText(form.cooperatingDomesticCompanies) }}</text></view> | |
| 18 | + <view class="row"><text class="label">合作效果</text><text class="value pre">{{ safeText(form.cooperationEffect) }}</text></view> | |
| 19 | + <view class="row"><text class="label">供应商考察</text><text class="value pre">{{ safeText(form.supplierInspection) }}</text></view> | |
| 20 | + <view class="row"><text class="label">销售代表办公地考察</text><text class="value pre">{{ safeText(form.domesticSalesOfficeInspection) }}</text></view> | |
| 21 | + <view class="row"><text class="label">有无担保函</text><text class="value">{{ safeText(form.guaranteeLetter) }}</text></view> | |
| 22 | + <view class="row"><text class="label">合同纠纷</text><text class="value pre">{{ safeText(form.contractDispute) }}</text></view> | |
| 23 | + <view class="row"><text class="label">保险、运输方式</text><text class="value">{{ safeText(form.insuranceTransportMode) }}</text></view> | |
| 24 | + <view class="row"><text class="label">滞箱滞报费用</text><text class="value">{{ safeText(form.detentionDemurrageFee) }}</text></view> | |
| 25 | + <view class="row"><text class="label">操作品种</text><text class="value">{{ safeText(form.operationVariety) }}</text></view> | |
| 26 | + <view class="row"><text class="label">操作规模</text><text class="value">{{ safeText(form.operationScale) }}</text></view> | |
| 27 | + <view class="row"><text class="label">定价模式</text><text class="value">{{ safeText(form.pricingMode) }}</text></view> | |
| 28 | + <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> | |
| 29 | + <view class="row"><text class="label">磅差约定</text><text class="value">{{ safeText(form.weightDifferenceAgreement) }}</text></view> | |
| 30 | + <view class="row"><text class="label">质量标准</text><text class="value">{{ safeText(form.qualityStandard) }}</text></view> | |
| 31 | + <view class="row"><text class="label">供应商分类</text><text class="value">{{ safeText(supplierCategoryName) }}</text></view> | |
| 32 | + </view> | |
| 33 | + | |
| 34 | + <view class="title-header"> | |
| 35 | + <image class="title-header_icon" src="/static/images/title.png" /> | |
| 36 | + <span>操作方案</span> | |
| 37 | + </view> | |
| 38 | + <view class="section"> | |
| 39 | + <view class="row"><text class="label">操作时间</text><text class="value">{{ safeText(form.schemeOperationTime) }}</text></view> | |
| 40 | + <view class="row"><text class="label">操作模式</text><text class="value">{{ safeText(form.schemeOperationMode) }}</text></view> | |
| 41 | + <view class="row"><text class="label">操作品种</text><text class="value">{{ safeText(form.schemeOperationVariety) }}</text></view> | |
| 42 | + <view class="row"><text class="label">操作数量</text><text class="value">{{ safeText(form.schemeOperationQuantity) }}</text></view> | |
| 43 | + <view class="row"><text class="label">发货要求</text><text class="value pre">{{ safeText(form.shippingRequirement) }}</text></view> | |
| 44 | + <view class="row"><text class="label">付款方式</text><text class="value">{{ safeText(form.paymentMethod) }}</text></view> | |
| 45 | + <view class="row"><text class="label">下次评审时间</text><text class="value">{{ safeText(form.nextReviewTime) }}</text></view> | |
| 46 | + <view class="row"><text class="label">评审部门</text><text class="value">{{ safeText(form.reviewDepartment) }}</text></view> | |
| 47 | + <view class="row"><text class="label">资信调查人</text><text class="value">{{ safeText(form.investigatorName) }}</text></view> | |
| 48 | + <view class="row"><text class="label">采购处</text><text class="value">{{ safeText(purchaseDeptName) }}</text></view> | |
| 49 | + </view> | |
| 50 | + </scroll-view> | |
| 51 | + </view> | |
| 52 | +</template> | |
| 53 | + | |
| 54 | +<script> | |
| 55 | +import { getDicByCodes, getDicName } from '@/utils/dic.js' | |
| 56 | +import { foreignTradeCreditGetExamineByIdApi, getPurchaseDeptApi } from '@/api/procure-manage/foreignTradeCredit.js' | |
| 57 | + | |
| 58 | +export default { | |
| 59 | + name: 'ForeignTradeCreditViewer', | |
| 60 | + props: { id: { type: [String, Number], default: '' } }, | |
| 61 | + data() { | |
| 62 | + return { | |
| 63 | + form: {}, | |
| 64 | + dicOptions: { | |
| 65 | + COMPANY_NATURE: [] | |
| 66 | + }, | |
| 67 | + purchaseDeptOptions: [] | |
| 68 | + } | |
| 69 | + }, | |
| 70 | + computed: { | |
| 71 | + companyNatureText() { | |
| 72 | + const v = this.form && this.form.companyNature != null ? String(this.form.companyNature) : '' | |
| 73 | + if (!v) return '-' | |
| 74 | + return getDicName('COMPANY_NATURE', v, this.dicOptions.COMPANY_NATURE) || v | |
| 75 | + }, | |
| 76 | + supplierCategoryName() { | |
| 77 | + const v = this.form && this.form.supplierCategory != null ? String(this.form.supplierCategory) : '' | |
| 78 | + const map = { A: 'A类供应商', B: 'B类供应商', C: 'C类供应商', D: 'D类供应商' } | |
| 79 | + return map[v] || (v ? v : '-') | |
| 80 | + }, | |
| 81 | + purchaseDeptName() { | |
| 82 | + const v = this.form && this.form.purchase_department != null ? String(this.form.purchase_department) : '' | |
| 83 | + if (!v) return '-' | |
| 84 | + const found = (this.purchaseDeptOptions || []).find(o => String(o.value) === v) | |
| 85 | + return found ? String(found.label || '') : v | |
| 86 | + } | |
| 87 | + }, | |
| 88 | + created() { | |
| 89 | + this.loadDicData() | |
| 90 | + this.loadPurchaseDeptOptions() | |
| 91 | + }, | |
| 92 | + watch: { | |
| 93 | + id: { | |
| 94 | + immediate: true, | |
| 95 | + handler(val) { | |
| 96 | + const v = (val !== undefined && val !== null) ? String(val) : '' | |
| 97 | + if (v) this.loadDetail(v) | |
| 98 | + } | |
| 99 | + } | |
| 100 | + }, | |
| 101 | + methods: { | |
| 102 | + async loadDicData() { | |
| 103 | + try { | |
| 104 | + const results = await getDicByCodes(['COMPANY_NATURE']) | |
| 105 | + this.dicOptions.COMPANY_NATURE = (results.COMPANY_NATURE && results.COMPANY_NATURE.data) || [] | |
| 106 | + } catch (e) { | |
| 107 | + this.dicOptions.COMPANY_NATURE = [] | |
| 108 | + } | |
| 109 | + }, | |
| 110 | + async loadPurchaseDeptOptions() { | |
| 111 | + try { | |
| 112 | + const res = await getPurchaseDeptApi() | |
| 113 | + const list = (res && res.data) ? res.data : [] | |
| 114 | + this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | |
| 115 | + label: it && it.name != null ? String(it.name) : '', | |
| 116 | + value: it && it.id != null ? String(it.id) : '' | |
| 117 | + })).filter(it => it.value) | |
| 118 | + } catch (e) { | |
| 119 | + this.purchaseDeptOptions = [] | |
| 120 | + } | |
| 121 | + }, | |
| 122 | + safeText(v) { | |
| 123 | + const s = v == null ? '' : String(v) | |
| 124 | + return s.trim() ? s : '-' | |
| 125 | + }, | |
| 126 | + async loadDetail(id) { | |
| 127 | + try { | |
| 128 | + const res = await foreignTradeCreditGetExamineByIdApi(id) | |
| 129 | + this.form = (res && res.data) ? res.data : {} | |
| 130 | + } catch (e) { | |
| 131 | + this.form = {} | |
| 132 | + } | |
| 133 | + } | |
| 134 | + } | |
| 135 | +} | |
| 136 | +</script> | |
| 137 | + | |
| 138 | +<style lang="scss" scoped> | |
| 139 | +.detail-page { | |
| 140 | + background: #f3f3f3; | |
| 141 | +} | |
| 142 | + | |
| 143 | +.scroll { | |
| 144 | + flex: 1; | |
| 145 | + padding: 8rpx 0 144rpx; | |
| 146 | +} | |
| 147 | + | |
| 148 | +.title-header { | |
| 149 | + display: flex; | |
| 150 | + align-items: center; | |
| 151 | + padding: 24rpx 32rpx 12rpx; | |
| 152 | + background-color: #ffffff; | |
| 153 | + | |
| 154 | + .title-header_icon { | |
| 155 | + width: 36rpx; | |
| 156 | + height: 36rpx; | |
| 157 | + margin-right: 12rpx; | |
| 158 | + } | |
| 159 | + | |
| 160 | + span { | |
| 161 | + font-size: 34rpx; | |
| 162 | + font-weight: 600; | |
| 163 | + color: rgba(0, 0, 0, 0.9); | |
| 164 | + } | |
| 165 | +} | |
| 166 | + | |
| 167 | +.section { | |
| 168 | + padding: 32rpx; | |
| 169 | + background: #fff; | |
| 170 | + margin-bottom: 20rpx; | |
| 171 | +} | |
| 172 | + | |
| 173 | +.row { | |
| 174 | + display: flex; | |
| 175 | + margin-bottom: 28rpx; | |
| 176 | + | |
| 177 | + &:last-child { | |
| 178 | + margin-bottom: 0; | |
| 179 | + } | |
| 180 | + | |
| 181 | + &.company { | |
| 182 | + font-size: 36rpx; | |
| 183 | + font-weight: 600; | |
| 184 | + color: rgba(0, 0, 0, 0.9); | |
| 185 | + padding-top: 8rpx; | |
| 186 | + line-height: 50rpx; | |
| 187 | + } | |
| 188 | + | |
| 189 | + .label { | |
| 190 | + max-width: 420rpx; | |
| 191 | + margin-right: 20rpx; | |
| 192 | + line-height: 32rpx; | |
| 193 | + font-size: 28rpx; | |
| 194 | + color: rgba(0, 0, 0, 0.6); | |
| 195 | + } | |
| 196 | + | |
| 197 | + .value { | |
| 198 | + flex: 1; | |
| 199 | + line-height: 32rpx; | |
| 200 | + font-size: 28rpx; | |
| 201 | + color: rgba(0, 0, 0, 0.9); | |
| 202 | + text-align: right; | |
| 203 | + word-break: break-all; | |
| 204 | + | |
| 205 | + &.pre { | |
| 206 | + white-space: pre-wrap; | |
| 207 | + } | |
| 208 | + } | |
| 209 | +} | |
| 210 | +</style> | ... | ... |
| ... | ... | @@ -22,10 +22,10 @@ |
| 22 | 22 | <text :class="['status', `status_${item.status}`]">{{ getAuditStatusText(item.status) }}</text> |
| 23 | 23 | </view> |
| 24 | 24 | <view class="info-row"> |
| 25 | - <text>供应商</text><text>{{ item.supplierName || '-' }}</text> | |
| 25 | + <text>公司性质</text><text>{{ getCompanyNatureText(item.companyNature) }}</text> | |
| 26 | 26 | </view> |
| 27 | 27 | <view class="info-row"> |
| 28 | - <text>供应商分类</text><text>{{ supplierCategoryText(item.supplierCategory) }}</text> | |
| 28 | + <text>法人代表</text><text>{{ item.legalRepresentative || '-' }}</text> | |
| 29 | 29 | </view> |
| 30 | 30 | <view class="info-row"> |
| 31 | 31 | <text>下次评审时间</text><text>{{ formatDateOnly(item.nextReviewTime) }}</text> |
| ... | ... | @@ -62,7 +62,7 @@ |
| 62 | 62 | import CardList from '@/components/card/index.vue' |
| 63 | 63 | import FilterModal from '@/components/filter/index.vue' |
| 64 | 64 | import { getDicByCodes, getDicName } from '@/utils/dic.js' |
| 65 | -import { foreignCustomerCreditQueryApi } from '@/api/procure-manage/foreignCustomerCredit.js' | |
| 65 | +import { foreignTradeCreditQueryApi } from '@/api/procure-manage/foreignTradeCredit.js' | |
| 66 | 66 | |
| 67 | 67 | export default { |
| 68 | 68 | name: 'ForeignTradeList', |
| ... | ... | @@ -88,7 +88,8 @@ export default { |
| 88 | 88 | { value: '', text: '全部' } |
| 89 | 89 | ], |
| 90 | 90 | dicOptions: { |
| 91 | - AUDIT_STATUS: [] | |
| 91 | + AUDIT_STATUS: [], | |
| 92 | + COMPANY_NATURE: [] | |
| 92 | 93 | }, |
| 93 | 94 | } |
| 94 | 95 | }, |
| ... | ... | @@ -123,23 +124,19 @@ export default { |
| 123 | 124 | methods: { |
| 124 | 125 | async loadDicData() { |
| 125 | 126 | try { |
| 126 | - const results = await getDicByCodes(['AUDIT_STATUS']) | |
| 127 | + const results = await getDicByCodes(['AUDIT_STATUS', 'COMPANY_NATURE']) | |
| 127 | 128 | this.dicOptions.AUDIT_STATUS = (results.AUDIT_STATUS && results.AUDIT_STATUS.data) || [] |
| 129 | + this.dicOptions.COMPANY_NATURE = (results.COMPANY_NATURE && results.COMPANY_NATURE.data) || [] | |
| 128 | 130 | const list = Array.isArray(this.dicOptions.AUDIT_STATUS) ? this.dicOptions.AUDIT_STATUS : [] |
| 129 | 131 | this.statusOptions = [{ value: '', text: '全部' }].concat( |
| 130 | 132 | list.map(it => ({ value: it && it.code != null ? String(it.code) : '', text: it && it.name != null ? String(it.name) : '' })).filter(it => it.value) |
| 131 | 133 | ) |
| 132 | 134 | } catch (e) { |
| 133 | 135 | this.dicOptions.AUDIT_STATUS = [] |
| 136 | + this.dicOptions.COMPANY_NATURE = [] | |
| 134 | 137 | this.statusOptions = [{ value: '', text: '全部' }] |
| 135 | 138 | } |
| 136 | 139 | }, |
| 137 | - supplierCategoryText(v) { | |
| 138 | - const s = v == null ? '' : String(v).trim() | |
| 139 | - if (!s) return '-' | |
| 140 | - const map = { A: 'A类供应商', B: 'B类供应商', C: 'C类供应商', D: 'D类供应商' } | |
| 141 | - return map[s] || s | |
| 142 | - }, | |
| 143 | 140 | formatDateOnly(v) { |
| 144 | 141 | const s = v == null ? '' : String(v).trim() |
| 145 | 142 | if (!s) return '-' |
| ... | ... | @@ -211,6 +208,11 @@ export default { |
| 211 | 208 | if (!v) return '-' |
| 212 | 209 | return getDicName('AUDIT_STATUS', v, this.dicOptions.AUDIT_STATUS) || v |
| 213 | 210 | }, |
| 211 | + getCompanyNatureText(v) { | |
| 212 | + const s = v == null ? '' : String(v).trim() | |
| 213 | + if (!s) return '-' | |
| 214 | + return getDicName('COMPANY_NATURE', s, this.dicOptions.COMPANY_NATURE) || s | |
| 215 | + }, | |
| 214 | 216 | fetchList({ pageIndex, pageSize, query }) { |
| 215 | 217 | const q = query || {} |
| 216 | 218 | const range = Array.isArray(q.dateRange) ? q.dateRange : [] |
| ... | ... | @@ -222,7 +224,7 @@ export default { |
| 222 | 224 | createDateStart: (range && range.length === 2) ? range[0] : '', |
| 223 | 225 | createDateEnd: (range && range.length === 2) ? range[1] : '' |
| 224 | 226 | } |
| 225 | - return foreignCustomerCreditQueryApi(params).then(res => { | |
| 227 | + return foreignTradeCreditQueryApi(params).then(res => { | |
| 226 | 228 | const _data = res && res.data ? res.data : {} |
| 227 | 229 | let records = _data.datas || _data.list || _data.records || [] |
| 228 | 230 | const totalCount = _data.totalCount || _data.count || 0 | ... | ... |
| ... | ... | @@ -4,18 +4,6 @@ |
| 4 | 4 | <uni-list> |
| 5 | 5 | <view class="title-header"> |
| 6 | 6 | <image class="title-header_icon" src="/static/images/title.png" /> |
| 7 | - <span>供应商</span> | |
| 8 | - </view> | |
| 9 | - | |
| 10 | - <uni-list-item class="select-item" :class="form.supplierName ? 'is-filled' : 'is-empty'" clickable | |
| 11 | - @click="openSheet('supplier')" :rightText="displayLabel('supplierName')" showArrow> | |
| 12 | - <template v-slot:body> | |
| 13 | - <view class="item-title"><text>供应商</text></view> | |
| 14 | - </template> | |
| 15 | - </uni-list-item> | |
| 16 | - | |
| 17 | - <view class="title-header"> | |
| 18 | - <image class="title-header_icon" src="/static/images/title.png" /> | |
| 19 | 7 | <span>基本资料</span> |
| 20 | 8 | </view> |
| 21 | 9 | |
| ... | ... | @@ -25,9 +13,10 @@ |
| 25 | 13 | </template> |
| 26 | 14 | </uni-list-item> |
| 27 | 15 | |
| 28 | - <uni-list-item title="公司性质"> | |
| 29 | - <template v-slot:footer> | |
| 30 | - <uni-easyinput v-model="form.companyNature" placeholder="请输入" :inputBorder="false" /> | |
| 16 | + <uni-list-item class="select-item" :class="form.companyNature ? 'is-filled' : 'is-empty'" clickable | |
| 17 | + @click="openSheet('companyNature')" :rightText="displayLabel('companyNatureName')" showArrow> | |
| 18 | + <template v-slot:body> | |
| 19 | + <view class="item-title"><text>公司性质</text></view> | |
| 31 | 20 | </template> |
| 32 | 21 | </uni-list-item> |
| 33 | 22 | |
| ... | ... | @@ -39,7 +28,7 @@ |
| 39 | 28 | |
| 40 | 29 | <uni-list-item title="电话及传真"> |
| 41 | 30 | <template v-slot:footer> |
| 42 | - <uni-easyinput v-model="form.phoneFax" placeholder="请输入" :inputBorder="false" /> | |
| 31 | + <uni-easyinput v-model="form.phoneAndFax" placeholder="请输入" :inputBorder="false" /> | |
| 43 | 32 | </template> |
| 44 | 33 | </uni-list-item> |
| 45 | 34 | |
| ... | ... | @@ -57,13 +46,13 @@ |
| 57 | 46 | |
| 58 | 47 | <uni-list-item title="国内业务负责人"> |
| 59 | 48 | <template v-slot:footer> |
| 60 | - <uni-easyinput v-model="form.domesticBusinessLeader" placeholder="请输入" :inputBorder="false" /> | |
| 49 | + <uni-easyinput v-model="form.domesticBusinessPrincipal" placeholder="请输入" :inputBorder="false" /> | |
| 61 | 50 | </template> |
| 62 | 51 | </uni-list-item> |
| 63 | 52 | |
| 64 | 53 | <uni-list-item title="负责人身份证/护照号"> |
| 65 | 54 | <template v-slot:footer> |
| 66 | - <uni-easyinput v-model="form.leaderIdPassportNo" placeholder="请输入" :inputBorder="false" /> | |
| 55 | + <uni-easyinput v-model="form.principalCertificateNo" placeholder="请输入" :inputBorder="false" /> | |
| 67 | 56 | </template> |
| 68 | 57 | </uni-list-item> |
| 69 | 58 | |
| ... | ... | @@ -75,7 +64,7 @@ |
| 75 | 64 | |
| 76 | 65 | <uni-list-item title="经营品种、规模"> |
| 77 | 66 | <template v-slot:footer> |
| 78 | - <uni-easyinput type="textarea" v-model="form.overallBusinessVarietyScale" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 67 | + <uni-easyinput type="textarea" v-model="form.overallBusinessVarietiesScale" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 79 | 68 | </template> |
| 80 | 69 | </uni-list-item> |
| 81 | 70 | |
| ... | ... | @@ -87,13 +76,13 @@ |
| 87 | 76 | |
| 88 | 77 | <uni-list-item title="出口规模、品种"> |
| 89 | 78 | <template v-slot:footer> |
| 90 | - <uni-easyinput type="textarea" v-model="form.exportToDomesticScaleVariety" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 79 | + <uni-easyinput type="textarea" v-model="form.exportToDomesticScaleVarieties" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 91 | 80 | </template> |
| 92 | 81 | </uni-list-item> |
| 93 | 82 | |
| 94 | 83 | <uni-list-item title="与国内合作企业"> |
| 95 | 84 | <template v-slot:footer> |
| 96 | - <uni-easyinput type="textarea" v-model="form.domesticCooperationCompanies" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 85 | + <uni-easyinput type="textarea" v-model="form.cooperatingDomesticCompanies" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 97 | 86 | </template> |
| 98 | 87 | </uni-list-item> |
| 99 | 88 | |
| ... | ... | @@ -111,13 +100,13 @@ |
| 111 | 100 | |
| 112 | 101 | <uni-list-item title="销售代表办公地考察"> |
| 113 | 102 | <template v-slot:footer> |
| 114 | - <uni-easyinput type="textarea" v-model="form.domesticSalesRepOfficeInspection" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 103 | + <uni-easyinput type="textarea" v-model="form.domesticSalesOfficeInspection" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 115 | 104 | </template> |
| 116 | 105 | </uni-list-item> |
| 117 | 106 | |
| 118 | 107 | <uni-list-item title="有无担保函"> |
| 119 | 108 | <template v-slot:footer> |
| 120 | - <uni-easyinput v-model="form.hasGuaranteeLetter" placeholder="请输入" :inputBorder="false" /> | |
| 109 | + <uni-easyinput v-model="form.guaranteeLetter" placeholder="请输入" :inputBorder="false" /> | |
| 121 | 110 | </template> |
| 122 | 111 | </uni-list-item> |
| 123 | 112 | |
| ... | ... | @@ -135,25 +124,25 @@ |
| 135 | 124 | |
| 136 | 125 | <uni-list-item title="滞箱滞报费用"> |
| 137 | 126 | <template v-slot:footer> |
| 138 | - <uni-easyinput v-model="form.demurrageFee" placeholder="请输入" :inputBorder="false" /> | |
| 127 | + <uni-easyinput v-model="form.detentionDemurrageFee" placeholder="请输入" :inputBorder="false" /> | |
| 139 | 128 | </template> |
| 140 | 129 | </uni-list-item> |
| 141 | 130 | |
| 142 | 131 | <uni-list-item title="操作品种"> |
| 143 | 132 | <template v-slot:footer> |
| 144 | - <uni-easyinput v-model="form.operatingVariety" placeholder="请输入" :inputBorder="false" /> | |
| 133 | + <uni-easyinput v-model="form.operationVariety" placeholder="请输入" :inputBorder="false" /> | |
| 145 | 134 | </template> |
| 146 | 135 | </uni-list-item> |
| 147 | 136 | |
| 148 | 137 | <uni-list-item title="操作规模"> |
| 149 | 138 | <template v-slot:footer> |
| 150 | - <uni-easyinput v-model="form.operatingScale" placeholder="请输入" :inputBorder="false" /> | |
| 139 | + <uni-easyinput v-model="form.operationScale" placeholder="请输入" :inputBorder="false" /> | |
| 151 | 140 | </template> |
| 152 | 141 | </uni-list-item> |
| 153 | 142 | |
| 154 | 143 | <uni-list-item title="定价模式"> |
| 155 | 144 | <template v-slot:footer> |
| 156 | - <uni-easyinput v-model="form.pricingModel" placeholder="请输入" :inputBorder="false" /> | |
| 145 | + <uni-easyinput v-model="form.pricingMode" placeholder="请输入" :inputBorder="false" /> | |
| 157 | 146 | </template> |
| 158 | 147 | </uni-list-item> |
| 159 | 148 | |
| ... | ... | @@ -165,7 +154,7 @@ |
| 165 | 154 | |
| 166 | 155 | <uni-list-item title="磅差约定"> |
| 167 | 156 | <template v-slot:footer> |
| 168 | - <uni-easyinput v-model="form.weightDiffAgreement" placeholder="请输入" :inputBorder="false" /> | |
| 157 | + <uni-easyinput v-model="form.weightDifferenceAgreement" placeholder="请输入" :inputBorder="false" /> | |
| 169 | 158 | </template> |
| 170 | 159 | </uni-list-item> |
| 171 | 160 | |
| ... | ... | @@ -194,31 +183,31 @@ |
| 194 | 183 | |
| 195 | 184 | <uni-list-item title="操作时间"> |
| 196 | 185 | <template v-slot:footer> |
| 197 | - <uni-easyinput v-model="form.operationTime" placeholder="请输入" :inputBorder="false" /> | |
| 186 | + <uni-easyinput v-model="form.schemeOperationTime" placeholder="请输入" :inputBorder="false" /> | |
| 198 | 187 | </template> |
| 199 | 188 | </uni-list-item> |
| 200 | 189 | |
| 201 | 190 | <uni-list-item title="操作模式"> |
| 202 | 191 | <template v-slot:footer> |
| 203 | - <uni-easyinput v-model="form.operationMode" placeholder="请输入" :inputBorder="false" /> | |
| 192 | + <uni-easyinput v-model="form.schemeOperationMode" placeholder="请输入" :inputBorder="false" /> | |
| 204 | 193 | </template> |
| 205 | 194 | </uni-list-item> |
| 206 | 195 | |
| 207 | 196 | <uni-list-item title="操作品种"> |
| 208 | 197 | <template v-slot:footer> |
| 209 | - <uni-easyinput v-model="form.operationVariety" placeholder="请输入" :inputBorder="false" /> | |
| 198 | + <uni-easyinput v-model="form.schemeOperationVariety" placeholder="请输入" :inputBorder="false" /> | |
| 210 | 199 | </template> |
| 211 | 200 | </uni-list-item> |
| 212 | 201 | |
| 213 | 202 | <uni-list-item title="操作数量"> |
| 214 | 203 | <template v-slot:footer> |
| 215 | - <uni-easyinput v-model="form.operationQuantity" placeholder="请输入" :inputBorder="false" /> | |
| 204 | + <uni-easyinput v-model="form.schemeOperationQuantity" placeholder="请输入" :inputBorder="false" /> | |
| 216 | 205 | </template> |
| 217 | 206 | </uni-list-item> |
| 218 | 207 | |
| 219 | 208 | <uni-list-item title="发货要求"> |
| 220 | 209 | <template v-slot:footer> |
| 221 | - <uni-easyinput type="textarea" v-model="form.deliveryRequirement" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 210 | + <uni-easyinput type="textarea" v-model="form.shippingRequirement" placeholder="请输入" :inputBorder="false" maxlength="2000" /> | |
| 222 | 211 | </template> |
| 223 | 212 | </uni-list-item> |
| 224 | 213 | |
| ... | ... | @@ -234,11 +223,24 @@ |
| 234 | 223 | </template> |
| 235 | 224 | </uni-list-item> |
| 236 | 225 | |
| 237 | - <uni-list-item class="mgb10" title="评审部门"> | |
| 226 | + <uni-list-item title="评审部门"> | |
| 238 | 227 | <template v-slot:footer> |
| 239 | 228 | <uni-easyinput v-model="form.reviewDepartment" placeholder="请输入" :inputBorder="false" /> |
| 240 | 229 | </template> |
| 241 | 230 | </uni-list-item> |
| 231 | + | |
| 232 | + <uni-list-item title="资信调查人"> | |
| 233 | + <template v-slot:footer> | |
| 234 | + <uni-easyinput v-model="form.investigatorName" :inputBorder="false" disabled /> | |
| 235 | + </template> | |
| 236 | + </uni-list-item> | |
| 237 | + | |
| 238 | + <uni-list-item class="select-item mgb10" :class="form.purchase_department ? 'is-filled' : 'is-empty'" clickable | |
| 239 | + @click="openSheet('purchase_department')" :rightText="displayLabel('purchase_departmentName')" showArrow> | |
| 240 | + <template v-slot:body> | |
| 241 | + <view class="item-title"><text>采购处</text></view> | |
| 242 | + </template> | |
| 243 | + </uni-list-item> | |
| 242 | 244 | </uni-list> |
| 243 | 245 | </scroll-view> |
| 244 | 246 | |
| ... | ... | @@ -254,7 +256,7 @@ |
| 254 | 256 | <script> |
| 255 | 257 | import SingleSelectSheet from '@/components/single-select/index.vue' |
| 256 | 258 | import { getDicByCodes } from '@/utils/dic.js' |
| 257 | -import { foreignCustomerCreditGetApi, foreignCustomerCreditSaveApi } from '@/api/procure-manage/foreignCustomerCredit.js' | |
| 259 | +import { foreignTradeCreditGetApi, foreignTradeCreditSaveApi, getPurchaseDeptApi } from '@/api/procure-manage/foreignTradeCredit.js' | |
| 258 | 260 | |
| 259 | 261 | export default { |
| 260 | 262 | name: 'ForeignTradeModify', |
| ... | ... | @@ -264,94 +266,113 @@ export default { |
| 264 | 266 | id: '', |
| 265 | 267 | submitting: false, |
| 266 | 268 | loading: false, |
| 267 | - supplierOptions: [], | |
| 268 | 269 | supplierCategoryOptions: [ |
| 269 | 270 | { label: 'A类供应商', value: 'A' }, |
| 270 | 271 | { label: 'B类供应商', value: 'B' }, |
| 271 | 272 | { label: 'C类供应商', value: 'C' }, |
| 272 | 273 | { label: 'D类供应商', value: 'D' } |
| 273 | 274 | ], |
| 275 | + companyNatureOptions: [], | |
| 276 | + purchaseDeptOptions: [], | |
| 274 | 277 | sheet: { visible: false, title: '', options: [], field: '', value: '' }, |
| 275 | 278 | form: { |
| 276 | 279 | id: '', |
| 277 | - supplier: '', | |
| 278 | - supplierName: '', | |
| 279 | 280 | unitName: '', |
| 280 | 281 | companyNature: '', |
| 282 | + companyNatureName: '', | |
| 281 | 283 | legalRepresentative: '', |
| 282 | - phoneFax: '', | |
| 284 | + phoneAndFax: '', | |
| 283 | 285 | registrationCertificateNo: '', |
| 284 | 286 | address: '', |
| 285 | - domesticBusinessLeader: '', | |
| 286 | - leaderIdPassportNo: '', | |
| 287 | + domesticBusinessPrincipal: '', | |
| 288 | + principalCertificateNo: '', | |
| 287 | 289 | establishedTimeAndYardScale: '', |
| 288 | - overallBusinessVarietyScale: '', | |
| 290 | + overallBusinessVarietiesScale: '', | |
| 289 | 291 | exportToDomesticTime: '', |
| 290 | - exportToDomesticScaleVariety: '', | |
| 291 | - domesticCooperationCompanies: '', | |
| 292 | + exportToDomesticScaleVarieties: '', | |
| 293 | + cooperatingDomesticCompanies: '', | |
| 292 | 294 | cooperationEffect: '', |
| 293 | 295 | supplierInspection: '', |
| 294 | - domesticSalesRepOfficeInspection: '', | |
| 295 | - hasGuaranteeLetter: '', | |
| 296 | + domesticSalesOfficeInspection: '', | |
| 297 | + guaranteeLetter: '', | |
| 296 | 298 | contractDispute: '', |
| 297 | 299 | insuranceTransportMode: '', |
| 298 | - demurrageFee: '', | |
| 299 | - operatingVariety: '', | |
| 300 | - operatingScale: '', | |
| 301 | - pricingModel: '', | |
| 300 | + detentionDemurrageFee: '', | |
| 301 | + operationVariety: '', | |
| 302 | + operationScale: '', | |
| 303 | + pricingMode: '', | |
| 302 | 304 | settlementMethod: '', |
| 303 | - weightDiffAgreement: '', | |
| 305 | + weightDifferenceAgreement: '', | |
| 304 | 306 | qualityStandard: '', |
| 305 | 307 | supplierCategory: '', |
| 306 | - operationTime: '', | |
| 307 | - operationMode: '', | |
| 308 | - operationVariety: '', | |
| 309 | - operationQuantity: '', | |
| 310 | - deliveryRequirement: '', | |
| 308 | + schemeOperationTime: '', | |
| 309 | + schemeOperationMode: '', | |
| 310 | + schemeOperationVariety: '', | |
| 311 | + schemeOperationQuantity: '', | |
| 312 | + shippingRequirement: '', | |
| 311 | 313 | paymentMethod: '', |
| 312 | 314 | nextReviewTime: '', |
| 313 | - reviewDepartment: '' | |
| 315 | + reviewDepartment: '', | |
| 316 | + investigatorId: '', | |
| 317 | + investigatorName: '', | |
| 318 | + purchase_department: '', | |
| 319 | + purchase_departmentName: '' | |
| 314 | 320 | } |
| 315 | 321 | } |
| 316 | 322 | }, |
| 317 | 323 | async onLoad(query) { |
| 318 | 324 | const id = (query && (query.id || query.code)) ? String(query.id || query.code) : '' |
| 319 | 325 | this.id = id |
| 320 | - await this.loadSupplierOptions() | |
| 326 | + await this.loadDicData() | |
| 327 | + await this.loadPurchaseDeptOptions() | |
| 321 | 328 | await this.loadDetail() |
| 322 | 329 | }, |
| 323 | 330 | methods: { |
| 324 | - async loadSupplierOptions() { | |
| 331 | + async loadDicData() { | |
| 325 | 332 | try { |
| 326 | - const results = await getDicByCodes(['SUPPLIER']) | |
| 327 | - const items = results && results.SUPPLIER && results.SUPPLIER.data ? results.SUPPLIER.data : [] | |
| 328 | - this.supplierOptions = (Array.isArray(items) ? items : []).map(it => ({ | |
| 333 | + const results = await getDicByCodes(['COMPANY_NATURE']) | |
| 334 | + const items = results && results.COMPANY_NATURE && results.COMPANY_NATURE.data ? results.COMPANY_NATURE.data : [] | |
| 335 | + this.companyNatureOptions = (Array.isArray(items) ? items : []).map(it => ({ | |
| 329 | 336 | label: it && it.name != null ? String(it.name) : '', |
| 330 | 337 | value: it && it.code != null ? String(it.code) : '' |
| 331 | 338 | })).filter(it => it.value) |
| 332 | 339 | } catch (e) { |
| 333 | - this.supplierOptions = [] | |
| 340 | + this.companyNatureOptions = [] | |
| 341 | + } | |
| 342 | + }, | |
| 343 | + async loadPurchaseDeptOptions() { | |
| 344 | + try { | |
| 345 | + const res = await getPurchaseDeptApi() | |
| 346 | + const list = (res && res.data) ? res.data : [] | |
| 347 | + this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | |
| 348 | + label: it && it.name != null ? String(it.name) : '', | |
| 349 | + value: it && it.id != null ? String(it.id) : '' | |
| 350 | + })).filter(it => it.value) | |
| 351 | + } catch (e) { | |
| 352 | + this.purchaseDeptOptions = [] | |
| 334 | 353 | } |
| 335 | 354 | }, |
| 336 | 355 | displayLabel(field) { |
| 337 | 356 | const m = this.form || {} |
| 338 | 357 | const map = { |
| 339 | - supplierName: '请选择', | |
| 358 | + companyNatureName: '请选择', | |
| 359 | + purchase_departmentName: '请选择', | |
| 340 | 360 | supplierCategory: '请选择' |
| 341 | 361 | } |
| 342 | - const v = m[field] | |
| 343 | - if (v != null && String(v).trim()) return String(v) | |
| 344 | 362 | if (field === 'supplierCategory') { |
| 345 | 363 | const code = m.supplierCategory |
| 346 | 364 | const found = (this.supplierCategoryOptions || []).find(o => String(o.value) === String(code)) |
| 347 | 365 | return found ? String(found.label || '') : map[field] |
| 348 | 366 | } |
| 367 | + const v = m[field] | |
| 368 | + if (v != null && String(v).trim()) return String(v) | |
| 349 | 369 | return map[field] || '请选择' |
| 350 | 370 | }, |
| 351 | 371 | openSheet(field) { |
| 352 | 372 | const map = { |
| 353 | - supplier: { title: '选择供应商', options: this.supplierOptions, valueField: 'supplier', labelField: 'supplierName' }, | |
| 354 | - supplierCategory: { title: '供应商分类', options: this.supplierCategoryOptions, valueField: 'supplierCategory', labelField: '' } | |
| 373 | + companyNature: { title: '公司性质', options: this.companyNatureOptions, valueField: 'companyNature', labelField: 'companyNatureName' }, | |
| 374 | + supplierCategory: { title: '供应商分类', options: this.supplierCategoryOptions, valueField: 'supplierCategory', labelField: '' }, | |
| 375 | + purchase_department: { title: '采购处', options: this.purchaseDeptOptions, valueField: 'purchase_department', labelField: 'purchase_departmentName' } | |
| 355 | 376 | } |
| 356 | 377 | const cfg = map[field] |
| 357 | 378 | if (!cfg) return |
| ... | ... | @@ -368,25 +389,32 @@ export default { |
| 368 | 389 | }, |
| 369 | 390 | onSheetConfirm({ value, label }) { |
| 370 | 391 | const field = this.sheet.field |
| 371 | - if (field === 'supplier') { | |
| 372 | - this.form.supplier = value | |
| 373 | - this.form.supplierName = label | |
| 374 | - } | |
| 392 | + if (field === 'companyNature') this.form.companyNatureName = label | |
| 375 | 393 | if (field === 'supplierCategory') { |
| 376 | 394 | this.form.supplierCategory = value |
| 377 | 395 | } |
| 396 | + if (field === 'purchase_department') this.form.purchase_departmentName = label | |
| 397 | + if (field === 'companyNature') this.form.companyNature = value | |
| 398 | + if (field === 'purchase_department') this.form.purchase_department = value | |
| 378 | 399 | this.sheet.visible = false |
| 379 | 400 | }, |
| 380 | 401 | async loadDetail() { |
| 381 | 402 | if (!this.id) return |
| 382 | 403 | this.loading = true |
| 383 | 404 | try { |
| 384 | - const res = await foreignCustomerCreditGetApi(this.id) | |
| 405 | + const res = await foreignTradeCreditGetApi(this.id) | |
| 385 | 406 | const data = (res && res.data) ? res.data : {} |
| 386 | 407 | this.form = { ...this.form, ...data, id: this.id } |
| 387 | - if (!this.form.supplierName && this.form.supplier) { | |
| 388 | - const found = (this.supplierOptions || []).find(o => String(o.value) === String(this.form.supplier)) | |
| 389 | - if (found) this.form.supplierName = String(found.label || '') | |
| 408 | + const u = (this.$store && this.$store.state && this.$store.state.user) ? this.$store.state.user : {} | |
| 409 | + if (!this.form.investigatorId) this.form.investigatorId = u && u.id ? String(u.id) : '' | |
| 410 | + if (!this.form.investigatorName) this.form.investigatorName = u && u.name ? String(u.name) : '' | |
| 411 | + if (!this.form.companyNatureName && this.form.companyNature) { | |
| 412 | + const found = (this.companyNatureOptions || []).find(o => String(o.value) === String(this.form.companyNature)) | |
| 413 | + if (found) this.form.companyNatureName = String(found.label || '') | |
| 414 | + } | |
| 415 | + if (!this.form.purchase_departmentName && this.form.purchase_department) { | |
| 416 | + const found = (this.purchaseDeptOptions || []).find(o => String(o.value) === String(this.form.purchase_department)) | |
| 417 | + if (found) this.form.purchase_departmentName = String(found.label || '') | |
| 390 | 418 | } |
| 391 | 419 | } catch (e) { |
| 392 | 420 | uni.showToast({ title: '详情加载失败', icon: 'none' }) |
| ... | ... | @@ -396,42 +424,43 @@ export default { |
| 396 | 424 | }, |
| 397 | 425 | validate() { |
| 398 | 426 | const requiredFields = [ |
| 399 | - { key: 'supplier', label: '供应商' }, | |
| 400 | 427 | { key: 'unitName', label: '单位名称' }, |
| 401 | 428 | { key: 'companyNature', label: '公司性质' }, |
| 402 | 429 | { key: 'legalRepresentative', label: '法人代表' }, |
| 403 | - { key: 'phoneFax', label: '电话及传真' }, | |
| 430 | + { key: 'phoneAndFax', label: '电话及传真' }, | |
| 404 | 431 | { key: 'registrationCertificateNo', label: '注册证书号' }, |
| 405 | 432 | { key: 'address', label: '地址' }, |
| 406 | - { key: 'domesticBusinessLeader', label: '国内业务负责人' }, | |
| 407 | - { key: 'leaderIdPassportNo', label: '负责人身份证/护照号' }, | |
| 433 | + { key: 'domesticBusinessPrincipal', label: '国内业务负责人' }, | |
| 434 | + { key: 'principalCertificateNo', label: '负责人身份证/护照号' }, | |
| 408 | 435 | { key: 'establishedTimeAndYardScale', label: '成立时间及货场规模' }, |
| 409 | - { key: 'overallBusinessVarietyScale', label: '经营品种、规模' }, | |
| 436 | + { key: 'overallBusinessVarietiesScale', label: '经营品种、规模' }, | |
| 410 | 437 | { key: 'exportToDomesticTime', label: '出口到国内时间' }, |
| 411 | - { key: 'exportToDomesticScaleVariety', label: '出口规模、品种' }, | |
| 412 | - { key: 'domesticCooperationCompanies', label: '与国内合作企业' }, | |
| 438 | + { key: 'exportToDomesticScaleVarieties', label: '出口规模、品种' }, | |
| 439 | + { key: 'cooperatingDomesticCompanies', label: '与国内合作企业' }, | |
| 413 | 440 | { key: 'cooperationEffect', label: '合作效果' }, |
| 414 | 441 | { key: 'supplierInspection', label: '供应商考察' }, |
| 415 | - { key: 'domesticSalesRepOfficeInspection', label: '销售代表办公地考察' }, | |
| 416 | - { key: 'hasGuaranteeLetter', label: '有无担保函' }, | |
| 442 | + { key: 'domesticSalesOfficeInspection', label: '销售代表办公地考察' }, | |
| 443 | + { key: 'guaranteeLetter', label: '有无担保函' }, | |
| 417 | 444 | { key: 'contractDispute', label: '合同纠纷' }, |
| 418 | 445 | { key: 'insuranceTransportMode', label: '保险、运输方式' }, |
| 419 | - { key: 'demurrageFee', label: '滞箱滞报费用' }, | |
| 420 | - { key: 'operatingVariety', label: '操作品种' }, | |
| 421 | - { key: 'operatingScale', label: '操作规模' }, | |
| 422 | - { key: 'pricingModel', label: '定价模式' }, | |
| 446 | + { key: 'detentionDemurrageFee', label: '滞箱滞报费用' }, | |
| 447 | + { key: 'operationVariety', label: '操作品种' }, | |
| 448 | + { key: 'operationScale', label: '操作规模' }, | |
| 449 | + { key: 'pricingMode', label: '定价模式' }, | |
| 423 | 450 | { key: 'settlementMethod', label: '结算方式' }, |
| 424 | - { key: 'weightDiffAgreement', label: '磅差约定' }, | |
| 451 | + { key: 'weightDifferenceAgreement', label: '磅差约定' }, | |
| 425 | 452 | { key: 'qualityStandard', label: '质量标准' }, |
| 426 | 453 | { key: 'supplierCategory', label: '供应商分类' }, |
| 427 | - { key: 'operationTime', label: '操作时间' }, | |
| 428 | - { key: 'operationMode', label: '操作模式' }, | |
| 429 | - { key: 'operationVariety', label: '操作品种' }, | |
| 430 | - { key: 'operationQuantity', label: '操作数量' }, | |
| 431 | - { key: 'deliveryRequirement', label: '发货要求' }, | |
| 454 | + { key: 'schemeOperationTime', label: '操作时间' }, | |
| 455 | + { key: 'schemeOperationMode', label: '操作模式' }, | |
| 456 | + { key: 'schemeOperationVariety', label: '操作品种' }, | |
| 457 | + { key: 'schemeOperationQuantity', label: '操作数量' }, | |
| 458 | + { key: 'shippingRequirement', label: '发货要求' }, | |
| 432 | 459 | { key: 'paymentMethod', label: '付款方式' }, |
| 433 | 460 | { key: 'nextReviewTime', label: '下次评审时间' }, |
| 434 | - { key: 'reviewDepartment', label: '评审部门' } | |
| 461 | + { key: 'reviewDepartment', label: '评审部门' }, | |
| 462 | + { key: 'investigatorId', label: '资信调查人ID' }, | |
| 463 | + { key: 'purchase_department', label: '采购处' } | |
| 435 | 464 | ] |
| 436 | 465 | for (let i = 0; i < requiredFields.length; i++) { |
| 437 | 466 | const f = requiredFields[i] |
| ... | ... | @@ -452,7 +481,7 @@ export default { |
| 452 | 481 | this.submitting = true |
| 453 | 482 | const payload = this.buildPayload() |
| 454 | 483 | try { |
| 455 | - await foreignCustomerCreditSaveApi(payload) | |
| 484 | + await foreignTradeCreditSaveApi(payload) | |
| 456 | 485 | uni.showToast({ title: '保存成功', icon: 'success' }) |
| 457 | 486 | try { uni.setStorageSync('FOREIGN_TRADE_LIST_NEED_REFRESH', '1') } catch (e) {} |
| 458 | 487 | setTimeout(() => { uni.navigateBack() }, 300) | ... | ... |
| 1 | 1 | import CustomerDevelopViewer from '@/pages/dev_manage/viewer.vue' |
| 2 | 2 | import CustomerCreditViewer from '@/pages/credit_manage/viewer.vue' |
| 3 | +import DomesticCustomerCreditViewer from '@/pages/domestic_trade/domesticCreditViewer.vue' | |
| 4 | +import ForeignTradeCreditViewer from '@/pages/foreign_trade/foreignTradeCreditViewer.vue' | |
| 3 | 5 | import RetailViewer from '@/pages/contract_retail/retailViewer.vue' |
| 4 | 6 | import ForeignStdViewer from '@/pages/contract_foreign_std/foreignStdViewer.vue' |
| 5 | 7 | import StockViewer from '@/pages/contract_stock/stockViewer.vue' |
| ... | ... | @@ -26,6 +28,8 @@ import FollowUpFormViewer from '@/pages/follow_up_form/viewer.vue' |
| 26 | 28 | export default function registerComponents(Vue) { |
| 27 | 29 | Vue.component('CustomerDevelopViewer', CustomerDevelopViewer) |
| 28 | 30 | Vue.component('CustomerCreditViewer', CustomerCreditViewer) |
| 31 | + Vue.component('DomesticCustomerCreditViewer', DomesticCustomerCreditViewer) | |
| 32 | + Vue.component('ForeignTradeCreditViewer', ForeignTradeCreditViewer) | |
| 29 | 33 | Vue.component('RetailViewer', RetailViewer) |
| 30 | 34 | Vue.component('StandardContractViewer', StandardContractViewer) |
| 31 | 35 | Vue.component('FormalContractViewer', FormalContractViewer) |
| ... | ... | @@ -48,4 +52,4 @@ export default function registerComponents(Vue) { |
| 48 | 52 | Vue.component('DraftDistAgmtViewer', DraftDistAgmtViewer) |
| 49 | 53 | Vue.component('ForeignDraftDistAgmtViewer', ForeignDraftDistAgmtViewer) |
| 50 | 54 | Vue.component('AgmtViewer', AgmtViewer) |
| 51 | -} | |
| \ No newline at end of file | ||
| 55 | +} | ... | ... |
| ... | ... | @@ -14,6 +14,18 @@ export const getSysFlowComponentPath = (bizFlag) => { |
| 14 | 14 | case 'CUSTOMER_CREDIT_EDIT': // 客户资信 |
| 15 | 15 | componentPath = 'CustomerCreditViewer'; // 客户资信-审批 |
| 16 | 16 | break; |
| 17 | + case 'CUSTOMER_CREDIT_IN': // 客户资信(内贸) | |
| 18 | + componentPath = 'DomesticCustomerCreditViewer'; // 客户资信(内贸)-审批详情 | |
| 19 | + break; | |
| 20 | + case 'CUSTOMER_CREDIT_IN_EDIT': // 客户资信(内贸) | |
| 21 | + componentPath = 'DomesticCustomerCreditViewer'; // 客户资信(内贸)-审批 | |
| 22 | + break; | |
| 23 | + case 'CUSTOMER_CREDIT_OUT': // 客户资信(外贸) | |
| 24 | + componentPath = 'ForeignTradeCreditViewer'; // 客户资信(外贸)-审批详情 | |
| 25 | + break; | |
| 26 | + case 'CUSTOMER_CREDIT_OUT_EDIT': // 客户资信(外贸) | |
| 27 | + componentPath = 'ForeignTradeCreditViewer'; // 客户资信(外贸)-审批 | |
| 28 | + break; | |
| 17 | 29 | case 'STANDARD_CONTRACT': // 标准合同 |
| 18 | 30 | componentPath = 'StandardContractViewer'; // 标准合同-审批详情 |
| 19 | 31 | break; |
| ... | ... | @@ -114,4 +126,4 @@ export const getSysFlowComponentPath = (bizFlag) => { |
| 114 | 126 | break; |
| 115 | 127 | } |
| 116 | 128 | return componentPath; |
| 117 | -}; | |
| \ No newline at end of file | ||
| 129 | +}; | ... | ... |