Showing
8 changed files
with
133 additions
and
136 deletions
| @@ -12,7 +12,11 @@ | @@ -12,7 +12,11 @@ | ||
| 12 | <uni-easyinput v-model="form.unitName" placeholder="请输入单位名称" :inputBorder="false" /> | 12 | <uni-easyinput v-model="form.unitName" placeholder="请输入单位名称" :inputBorder="false" /> |
| 13 | </template> | 13 | </template> |
| 14 | </uni-list-item> | 14 | </uni-list-item> |
| 15 | - | 15 | + <uni-list-item title="客户简称"> |
| 16 | + <template v-slot:footer> | ||
| 17 | + <uni-easyinput v-model="form.customerShortName" placeholder="请输入客户简称" :inputBorder="false" /> | ||
| 18 | + </template> | ||
| 19 | + </uni-list-item> | ||
| 16 | <uni-list-item class="select-item" :class="form.companyNatureName ? 'is-filled' : 'is-empty'" clickable | 20 | <uni-list-item class="select-item" :class="form.companyNatureName ? 'is-filled' : 'is-empty'" clickable |
| 17 | @click="openMultiSheet('companyNature')" :rightText="displayLabel('companyNatureName')" showArrow> | 21 | @click="openMultiSheet('companyNature')" :rightText="displayLabel('companyNatureName')" showArrow> |
| 18 | <template v-slot:body> | 22 | <template v-slot:body> |
| @@ -295,10 +299,9 @@ | @@ -295,10 +299,9 @@ | ||
| 295 | </template> | 299 | </template> |
| 296 | </uni-list-item> | 300 | </uni-list-item> |
| 297 | 301 | ||
| 298 | - <uni-list-item class="select-item" :class="form.purchaseDepartment ? 'is-filled' : 'is-empty'" clickable | ||
| 299 | - @click="openSheet('purchaseDepartment')" :rightText="displayLabel('purchaseDepartment')" showArrow> | ||
| 300 | - <template v-slot:body> | ||
| 301 | - <view class="item-title"><text>采购处</text></view> | 302 | + <uni-list-item title="采购处"> |
| 303 | + <template v-slot:footer> | ||
| 304 | + <uni-easyinput v-model="form.purchaseDepartmentName" disabled placeholder="" :inputBorder="false" /> | ||
| 302 | </template> | 305 | </template> |
| 303 | </uni-list-item> | 306 | </uni-list-item> |
| 304 | 307 | ||
| @@ -366,9 +369,9 @@ export default { | @@ -366,9 +369,9 @@ export default { | ||
| 366 | operationMethodOptions: [], | 369 | operationMethodOptions: [], |
| 367 | developNewOptions: [], | 370 | developNewOptions: [], |
| 368 | purchaseSourceOptions: [], | 371 | purchaseSourceOptions: [], |
| 369 | - purchaseDeptOptions: [], | ||
| 370 | form: { | 372 | form: { |
| 371 | unitName: '', | 373 | unitName: '', |
| 374 | + customerShortName: '', | ||
| 372 | companyNature: '', | 375 | companyNature: '', |
| 373 | companyNatureName: '', | 376 | companyNatureName: '', |
| 374 | companyNatureOther: '', | 377 | companyNatureOther: '', |
| @@ -415,6 +418,7 @@ export default { | @@ -415,6 +418,7 @@ export default { | ||
| 415 | investigatorId: '', | 418 | investigatorId: '', |
| 416 | investigatorName: '', | 419 | investigatorName: '', |
| 417 | purchaseDepartment: '', | 420 | purchaseDepartment: '', |
| 421 | + purchaseDepartmentName: '', | ||
| 418 | reviewValidUntil: '' | 422 | reviewValidUntil: '' |
| 419 | } | 423 | } |
| 420 | } | 424 | } |
| @@ -460,21 +464,14 @@ export default { | @@ -460,21 +464,14 @@ export default { | ||
| 460 | async loadPurchaseDeptOptions() { | 464 | async loadPurchaseDeptOptions() { |
| 461 | try { | 465 | try { |
| 462 | const res = await getPurchaseDeptApi() | 466 | const res = await getPurchaseDeptApi() |
| 463 | - const list = (res && res.data) ? res.data : [] | ||
| 464 | - this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | ||
| 465 | - label: it && it.name != null ? String(it.name) : '', | ||
| 466 | - value: it && it.id != null ? String(it.id) : '' | ||
| 467 | - })).filter(it => it.value) | 467 | + const data = (res && res.data) ? res.data : {} |
| 468 | + this.form.purchaseDepartment = data && data.id != null ? String(data.id) : '' | ||
| 469 | + this.form.purchaseDepartmentName = data && data.name != null ? String(data.name) : '' | ||
| 468 | } catch (e) { | 470 | } catch (e) { |
| 469 | - this.purchaseDeptOptions = [] | 471 | + this.form.purchaseDepartment = '' |
| 472 | + this.form.purchaseDepartmentName = '' | ||
| 470 | } | 473 | } |
| 471 | }, | 474 | }, |
| 472 | - getOptionLabel(options, value) { | ||
| 473 | - const v = value == null ? '' : String(value) | ||
| 474 | - if (!v) return '' | ||
| 475 | - const found = (options || []).find(o => String(o.value) === v) | ||
| 476 | - return found ? String(found.label || '') : '' | ||
| 477 | - }, | ||
| 478 | dicToSheetOptions(items) { | 475 | dicToSheetOptions(items) { |
| 479 | const list = Array.isArray(items) ? items : [] | 476 | const list = Array.isArray(items) ? items : [] |
| 480 | return list.map(it => ({ label: it && it.name != null ? String(it.name) : '', value: it && it.code != null ? String(it.code) : '' })).filter(it => it.value) | 477 | return list.map(it => ({ label: it && it.name != null ? String(it.name) : '', value: it && it.code != null ? String(it.code) : '' })).filter(it => it.value) |
| @@ -498,7 +495,6 @@ export default { | @@ -498,7 +495,6 @@ export default { | ||
| 498 | purchaseSource: '请选择', | 495 | purchaseSource: '请选择', |
| 499 | operationMode: '请选择', | 496 | operationMode: '请选择', |
| 500 | isNewDevelopment: '请选择', | 497 | isNewDevelopment: '请选择', |
| 501 | - purchaseDepartment: '请选择', | ||
| 502 | hasPreferentialPolicy: '请选择', | 498 | hasPreferentialPolicy: '请选择', |
| 503 | investInFutures: '请选择', | 499 | investInFutures: '请选择', |
| 504 | hasPenaltyRecord: '请选择', | 500 | hasPenaltyRecord: '请选择', |
| @@ -524,10 +520,6 @@ export default { | @@ -524,10 +520,6 @@ export default { | ||
| 524 | const v = m.isNewDevelopment | 520 | const v = m.isNewDevelopment |
| 525 | return v ? getDicName('DEVELOP_NEW', String(v), this.dicOptions.DEVELOP_NEW) : map[field] | 521 | return v ? getDicName('DEVELOP_NEW', String(v), this.dicOptions.DEVELOP_NEW) : map[field] |
| 526 | } | 522 | } |
| 527 | - if (field === 'purchaseDepartment') { | ||
| 528 | - const label = this.getOptionLabel(this.purchaseDeptOptions, m.purchaseDepartment) | ||
| 529 | - return label || map[field] | ||
| 530 | - } | ||
| 531 | const v = m[field] | 523 | const v = m[field] |
| 532 | if (v === true) return '是' | 524 | if (v === true) return '是' |
| 533 | if (v === false) return '否' | 525 | if (v === false) return '否' |
| @@ -538,7 +530,6 @@ export default { | @@ -538,7 +530,6 @@ export default { | ||
| 538 | purchaseSource: { title: '收购来源', options: this.purchaseSourceOptions }, | 530 | purchaseSource: { title: '收购来源', options: this.purchaseSourceOptions }, |
| 539 | operationMode: { title: '操作方式', options: this.operationMethodOptions }, | 531 | operationMode: { title: '操作方式', options: this.operationMethodOptions }, |
| 540 | isNewDevelopment: { title: '是否新开发', options: this.developNewOptions }, | 532 | isNewDevelopment: { title: '是否新开发', options: this.developNewOptions }, |
| 541 | - purchaseDepartment: { title: '采购处', options: this.purchaseDeptOptions }, | ||
| 542 | hasPreferentialPolicy: { title: '是否享有优惠政策', options: this.yesNoOptions }, | 533 | hasPreferentialPolicy: { title: '是否享有优惠政策', options: this.yesNoOptions }, |
| 543 | investInFutures: { title: '是否投资期货', options: this.yesNoOptions }, | 534 | investInFutures: { title: '是否投资期货', options: this.yesNoOptions }, |
| 544 | hasPenaltyRecord: { title: '是否有被处罚记录', options: this.yesNoOptions }, | 535 | hasPenaltyRecord: { title: '是否有被处罚记录', options: this.yesNoOptions }, |
| @@ -623,6 +614,7 @@ export default { | @@ -623,6 +614,7 @@ export default { | ||
| 623 | validate() { | 614 | validate() { |
| 624 | const requiredTextFields = [ | 615 | const requiredTextFields = [ |
| 625 | { key: 'unitName', label: '单位名称' }, | 616 | { key: 'unitName', label: '单位名称' }, |
| 617 | + { key: 'customerShortName', label: '客户简称' }, | ||
| 626 | { key: 'companyNature', label: '公司性质' }, | 618 | { key: 'companyNature', label: '公司性质' }, |
| 627 | { key: 'bankName', label: '开户行' }, | 619 | { key: 'bankName', label: '开户行' }, |
| 628 | { key: 'bankAccount', label: '账号' }, | 620 | { key: 'bankAccount', label: '账号' }, |
| @@ -714,6 +706,7 @@ export default { | @@ -714,6 +706,7 @@ export default { | ||
| 714 | if (!this.showCompanyNatureOther) payload.companyNatureOther = '' | 706 | if (!this.showCompanyNatureOther) payload.companyNatureOther = '' |
| 715 | delete payload.companyNatureName | 707 | delete payload.companyNatureName |
| 716 | delete payload.investigatorName | 708 | delete payload.investigatorName |
| 709 | + delete payload.purchaseDepartmentName | ||
| 717 | payload.registeredCapital = Number(payload.registeredCapital) | 710 | payload.registeredCapital = Number(payload.registeredCapital) |
| 718 | const files = (Array.isArray(this.attachmentFiles) ? this.attachmentFiles : []).filter(it => it && it.id) | 711 | const files = (Array.isArray(this.attachmentFiles) ? this.attachmentFiles : []).filter(it => it && it.id) |
| 719 | payload.attachmentFileIds = files.map(it => String(it.id || '')).filter(Boolean).join(',') | 712 | payload.attachmentFileIds = files.map(it => String(it.id || '')).filter(Boolean).join(',') |
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | <view class="detail-page"> | 4 | <view class="detail-page"> |
| 5 | <view class="section"> | 5 | <view class="section"> |
| 6 | <text class="row company">{{ safeText(form.unitName) }}</text> | 6 | <text class="row company">{{ safeText(form.unitName) }}</text> |
| 7 | + <view class="row"><text class="label">客户简称</text><text class="value">{{ safeText(form.customerShortName) }}</text></view> | ||
| 7 | <view class="row"><text class="label">公司性质</text><text class="value">{{ safeText(companyNatureName) }}</text></view> | 8 | <view class="row"><text class="label">公司性质</text><text class="value">{{ safeText(companyNatureName) }}</text></view> |
| 8 | <view v-if="showCompanyNatureOther" class="row"><text class="label">其他</text><text class="value">{{ safeText(form.companyNatureOther) }}</text></view> | 9 | <view v-if="showCompanyNatureOther" class="row"><text class="label">其他</text><text class="value">{{ safeText(form.companyNatureOther) }}</text></view> |
| 9 | <view class="row"><text class="label">开户行</text><text class="value">{{ safeText(form.bankName) }}</text></view> | 10 | <view class="row"><text class="label">开户行</text><text class="value">{{ safeText(form.bankName) }}</text></view> |
| @@ -114,7 +115,7 @@ export default { | @@ -114,7 +115,7 @@ export default { | ||
| 114 | OPERATION_METHOD: [], | 115 | OPERATION_METHOD: [], |
| 115 | PURCHASE_SOURCE: [] | 116 | PURCHASE_SOURCE: [] |
| 116 | }, | 117 | }, |
| 117 | - purchaseDeptOptions: [], | 118 | + purchaseDept: null, |
| 118 | buttons: [{ | 119 | buttons: [{ |
| 119 | text: '审核详情', | 120 | text: '审核详情', |
| 120 | visible: true, | 121 | visible: true, |
| @@ -183,10 +184,9 @@ export default { | @@ -183,10 +184,9 @@ export default { | ||
| 183 | return v ? getDicName('DEVELOP_NEW', v, this.dicOptions.DEVELOP_NEW) : '-' | 184 | return v ? getDicName('DEVELOP_NEW', v, this.dicOptions.DEVELOP_NEW) : '-' |
| 184 | }, | 185 | }, |
| 185 | purchaseDepartmentName() { | 186 | purchaseDepartmentName() { |
| 186 | - const v = this.form && this.form.purchaseDepartment != null ? String(this.form.purchaseDepartment) : '' | ||
| 187 | - if (!v) return '-' | ||
| 188 | - const found = (this.purchaseDeptOptions || []).find(o => String(o.value) === v) | ||
| 189 | - return found ? String(found.label || '') : v | 187 | + if (this.purchaseDept && this.purchaseDept.name != null) return String(this.purchaseDept.name) |
| 188 | + const v = this.form && this.form.purchaseDepartmentName != null ? String(this.form.purchaseDepartmentName) : '' | ||
| 189 | + return v || '-' | ||
| 190 | } | 190 | } |
| 191 | }, | 191 | }, |
| 192 | created() { | 192 | created() { |
| @@ -216,13 +216,10 @@ export default { | @@ -216,13 +216,10 @@ export default { | ||
| 216 | async loadPurchaseDeptOptions() { | 216 | async loadPurchaseDeptOptions() { |
| 217 | try { | 217 | try { |
| 218 | const res = await getPurchaseDeptApi() | 218 | const res = await getPurchaseDeptApi() |
| 219 | - const list = (res && res.data) ? res.data : [] | ||
| 220 | - this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | ||
| 221 | - label: it && it.name != null ? String(it.name) : '', | ||
| 222 | - value: it && it.id != null ? String(it.id) : '' | ||
| 223 | - })).filter(it => it.value) | 219 | + const data = (res && res.data) ? res.data : {} |
| 220 | + this.purchaseDept = (data && typeof data === 'object') ? data : null | ||
| 224 | } catch (e) { | 221 | } catch (e) { |
| 225 | - this.purchaseDeptOptions = [] | 222 | + this.purchaseDept = null |
| 226 | } | 223 | } |
| 227 | }, | 224 | }, |
| 228 | dicToSheetOptions(items) { | 225 | dicToSheetOptions(items) { |
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | <scroll-view class="scroll" scroll-y> | 3 | <scroll-view class="scroll" scroll-y> |
| 4 | <view class="section"> | 4 | <view class="section"> |
| 5 | <text class="row company">{{ safeText(form.unitName) }}</text> | 5 | <text class="row company">{{ safeText(form.unitName) }}</text> |
| 6 | + <view class="row"><text class="label">客户简称</text><text class="value">{{ safeText(form.customerShortName) }}</text></view> | ||
| 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(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.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.bankAccount) }}</text></view> |
| @@ -104,7 +105,7 @@ export default { | @@ -104,7 +105,7 @@ export default { | ||
| 104 | OPERATION_METHOD: [], | 105 | OPERATION_METHOD: [], |
| 105 | PURCHASE_SOURCE: [] | 106 | PURCHASE_SOURCE: [] |
| 106 | }, | 107 | }, |
| 107 | - purchaseDeptOptions: [] | 108 | + purchaseDept: null |
| 108 | } | 109 | } |
| 109 | }, | 110 | }, |
| 110 | computed: { | 111 | computed: { |
| @@ -139,10 +140,9 @@ export default { | @@ -139,10 +140,9 @@ export default { | ||
| 139 | return v ? getDicName('DEVELOP_NEW', v, this.dicOptions.DEVELOP_NEW) : '-' | 140 | return v ? getDicName('DEVELOP_NEW', v, this.dicOptions.DEVELOP_NEW) : '-' |
| 140 | }, | 141 | }, |
| 141 | purchaseDepartmentName() { | 142 | 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 | 143 | + if (this.purchaseDept && this.purchaseDept.name != null) return String(this.purchaseDept.name) |
| 144 | + const v = this.form && this.form.purchaseDepartmentName != null ? String(this.form.purchaseDepartmentName) : '' | ||
| 145 | + return v || '-' | ||
| 146 | } | 146 | } |
| 147 | }, | 147 | }, |
| 148 | created() { | 148 | created() { |
| @@ -175,13 +175,10 @@ export default { | @@ -175,13 +175,10 @@ export default { | ||
| 175 | async loadPurchaseDeptOptions() { | 175 | async loadPurchaseDeptOptions() { |
| 176 | try { | 176 | try { |
| 177 | const res = await getPurchaseDeptApi() | 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) | 178 | + const data = (res && res.data) ? res.data : {} |
| 179 | + this.purchaseDept = (data && typeof data === 'object') ? data : null | ||
| 183 | } catch (e) { | 180 | } catch (e) { |
| 184 | - this.purchaseDeptOptions = [] | 181 | + this.purchaseDept = null |
| 185 | } | 182 | } |
| 186 | }, | 183 | }, |
| 187 | dicToSheetOptions(items) { | 184 | dicToSheetOptions(items) { |
| @@ -12,7 +12,11 @@ | @@ -12,7 +12,11 @@ | ||
| 12 | <uni-easyinput v-model="form.unitName" placeholder="请输入单位名称" :inputBorder="false" /> | 12 | <uni-easyinput v-model="form.unitName" placeholder="请输入单位名称" :inputBorder="false" /> |
| 13 | </template> | 13 | </template> |
| 14 | </uni-list-item> | 14 | </uni-list-item> |
| 15 | - | 15 | + <uni-list-item title="客户简称"> |
| 16 | + <template v-slot:footer> | ||
| 17 | + <uni-easyinput v-model="form.customerShortName" placeholder="请输入客户简称" :inputBorder="false" /> | ||
| 18 | + </template> | ||
| 19 | + </uni-list-item> | ||
| 16 | <uni-list-item class="select-item" :class="form.companyNatureName ? 'is-filled' : 'is-empty'" clickable | 20 | <uni-list-item class="select-item" :class="form.companyNatureName ? 'is-filled' : 'is-empty'" clickable |
| 17 | @click="openMultiSheet('companyNature')" :rightText="displayLabel('companyNatureName')" showArrow> | 21 | @click="openMultiSheet('companyNature')" :rightText="displayLabel('companyNatureName')" showArrow> |
| 18 | <template v-slot:body> | 22 | <template v-slot:body> |
| @@ -295,10 +299,9 @@ | @@ -295,10 +299,9 @@ | ||
| 295 | </template> | 299 | </template> |
| 296 | </uni-list-item> | 300 | </uni-list-item> |
| 297 | 301 | ||
| 298 | - <uni-list-item class="select-item" :class="form.purchaseDepartment ? 'is-filled' : 'is-empty'" clickable | ||
| 299 | - @click="openSheet('purchaseDepartment')" :rightText="displayLabel('purchaseDepartment')" showArrow> | ||
| 300 | - <template v-slot:body> | ||
| 301 | - <view class="item-title"><text>采购处</text></view> | 302 | + <uni-list-item title="采购处"> |
| 303 | + <template v-slot:footer> | ||
| 304 | + <uni-easyinput v-model="form.purchaseDepartmentName" disabled placeholder="" :inputBorder="false" /> | ||
| 302 | </template> | 305 | </template> |
| 303 | </uni-list-item> | 306 | </uni-list-item> |
| 304 | 307 | ||
| @@ -368,10 +371,11 @@ export default { | @@ -368,10 +371,11 @@ export default { | ||
| 368 | operationMethodOptions: [], | 371 | operationMethodOptions: [], |
| 369 | developNewOptions: [], | 372 | developNewOptions: [], |
| 370 | purchaseSourceOptions: [], | 373 | purchaseSourceOptions: [], |
| 371 | - purchaseDeptOptions: [], | 374 | + purchaseDept: null, |
| 372 | form: { | 375 | form: { |
| 373 | id: '', | 376 | id: '', |
| 374 | unitName: '', | 377 | unitName: '', |
| 378 | + customerShortName: '', | ||
| 375 | companyNature: '', | 379 | companyNature: '', |
| 376 | companyNatureName: '', | 380 | companyNatureName: '', |
| 377 | companyNatureOther: '', | 381 | companyNatureOther: '', |
| @@ -418,6 +422,7 @@ export default { | @@ -418,6 +422,7 @@ export default { | ||
| 418 | investigatorId: '', | 422 | investigatorId: '', |
| 419 | investigatorName: '', | 423 | investigatorName: '', |
| 420 | purchaseDepartment: '', | 424 | purchaseDepartment: '', |
| 425 | + purchaseDepartmentName: '', | ||
| 421 | reviewValidUntil: '' | 426 | reviewValidUntil: '' |
| 422 | } | 427 | } |
| 423 | } | 428 | } |
| @@ -466,21 +471,16 @@ export default { | @@ -466,21 +471,16 @@ export default { | ||
| 466 | async loadPurchaseDeptOptions() { | 471 | async loadPurchaseDeptOptions() { |
| 467 | try { | 472 | try { |
| 468 | const res = await getPurchaseDeptApi() | 473 | const res = await getPurchaseDeptApi() |
| 469 | - const list = (res && res.data) ? res.data : [] | ||
| 470 | - this.purchaseDeptOptions = (Array.isArray(list) ? list : []).map(it => ({ | ||
| 471 | - label: it && it.name != null ? String(it.name) : '', | ||
| 472 | - value: it && it.id != null ? String(it.id) : '' | ||
| 473 | - })).filter(it => it.value) | 474 | + const data = (res && res.data) ? res.data : {} |
| 475 | + this.purchaseDept = (data && typeof data === 'object') ? data : null | ||
| 476 | + this.form.purchaseDepartment = data && data.id != null ? String(data.id) : '' | ||
| 477 | + this.form.purchaseDepartmentName = data && data.name != null ? String(data.name) : '' | ||
| 474 | } catch (e) { | 478 | } catch (e) { |
| 475 | - this.purchaseDeptOptions = [] | 479 | + this.purchaseDept = null |
| 480 | + this.form.purchaseDepartment = '' | ||
| 481 | + this.form.purchaseDepartmentName = '' | ||
| 476 | } | 482 | } |
| 477 | }, | 483 | }, |
| 478 | - getOptionLabel(options, value) { | ||
| 479 | - const v = value == null ? '' : String(value) | ||
| 480 | - if (!v) return '' | ||
| 481 | - const found = (options || []).find(o => String(o.value) === v) | ||
| 482 | - return found ? String(found.label || '') : '' | ||
| 483 | - }, | ||
| 484 | displayLabel(field) { | 484 | displayLabel(field) { |
| 485 | const m = this.form | 485 | const m = this.form |
| 486 | const map = { | 486 | const map = { |
| @@ -488,7 +488,6 @@ export default { | @@ -488,7 +488,6 @@ export default { | ||
| 488 | purchaseSource: '请选择', | 488 | purchaseSource: '请选择', |
| 489 | operationMode: '请选择', | 489 | operationMode: '请选择', |
| 490 | isNewDevelopment: '请选择', | 490 | isNewDevelopment: '请选择', |
| 491 | - purchaseDepartment: '请选择', | ||
| 492 | hasPreferentialPolicy: '请选择', | 491 | hasPreferentialPolicy: '请选择', |
| 493 | investInFutures: '请选择', | 492 | investInFutures: '请选择', |
| 494 | hasPenaltyRecord: '请选择', | 493 | hasPenaltyRecord: '请选择', |
| @@ -514,10 +513,6 @@ export default { | @@ -514,10 +513,6 @@ export default { | ||
| 514 | const v = m.isNewDevelopment | 513 | const v = m.isNewDevelopment |
| 515 | return v ? getDicName('DEVELOP_NEW', String(v), this.dicOptions.DEVELOP_NEW) : map[field] | 514 | return v ? getDicName('DEVELOP_NEW', String(v), this.dicOptions.DEVELOP_NEW) : map[field] |
| 516 | } | 515 | } |
| 517 | - if (field === 'purchaseDepartment') { | ||
| 518 | - const label = this.getOptionLabel(this.purchaseDeptOptions, m.purchaseDepartment) | ||
| 519 | - return label || map[field] | ||
| 520 | - } | ||
| 521 | const v = m[field] | 516 | const v = m[field] |
| 522 | if (v === true) return '是' | 517 | if (v === true) return '是' |
| 523 | if (v === false) return '否' | 518 | if (v === false) return '否' |
| @@ -528,7 +523,6 @@ export default { | @@ -528,7 +523,6 @@ export default { | ||
| 528 | purchaseSource: { title: '收购来源', options: this.purchaseSourceOptions }, | 523 | purchaseSource: { title: '收购来源', options: this.purchaseSourceOptions }, |
| 529 | operationMode: { title: '操作方式', options: this.operationMethodOptions }, | 524 | operationMode: { title: '操作方式', options: this.operationMethodOptions }, |
| 530 | isNewDevelopment: { title: '是否新开发', options: this.developNewOptions }, | 525 | isNewDevelopment: { title: '是否新开发', options: this.developNewOptions }, |
| 531 | - purchaseDepartment: { title: '采购处', options: this.purchaseDeptOptions }, | ||
| 532 | hasPreferentialPolicy: { title: '是否享有优惠政策', options: this.yesNoOptions }, | 526 | hasPreferentialPolicy: { title: '是否享有优惠政策', options: this.yesNoOptions }, |
| 533 | investInFutures: { title: '是否投资期货', options: this.yesNoOptions }, | 527 | investInFutures: { title: '是否投资期货', options: this.yesNoOptions }, |
| 534 | hasPenaltyRecord: { title: '是否有被处罚记录', options: this.yesNoOptions }, | 528 | hasPenaltyRecord: { title: '是否有被处罚记录', options: this.yesNoOptions }, |
| @@ -613,6 +607,7 @@ export default { | @@ -613,6 +607,7 @@ export default { | ||
| 613 | validate() { | 607 | validate() { |
| 614 | const requiredTextFields = [ | 608 | const requiredTextFields = [ |
| 615 | { key: 'unitName', label: '单位名称' }, | 609 | { key: 'unitName', label: '单位名称' }, |
| 610 | + { key: 'customerShortName', label: '客户简称' }, | ||
| 616 | { key: 'companyNature', label: '公司性质' }, | 611 | { key: 'companyNature', label: '公司性质' }, |
| 617 | { key: 'bankName', label: '开户行' }, | 612 | { key: 'bankName', label: '开户行' }, |
| 618 | { key: 'bankAccount', label: '账号' }, | 613 | { key: 'bankAccount', label: '账号' }, |
| @@ -704,6 +699,7 @@ export default { | @@ -704,6 +699,7 @@ export default { | ||
| 704 | if (!this.showCompanyNatureOther) payload.companyNatureOther = '' | 699 | if (!this.showCompanyNatureOther) payload.companyNatureOther = '' |
| 705 | delete payload.companyNatureName | 700 | delete payload.companyNatureName |
| 706 | delete payload.investigatorName | 701 | delete payload.investigatorName |
| 702 | + delete payload.purchaseDepartmentName | ||
| 707 | payload.registeredCapital = Number(payload.registeredCapital) | 703 | payload.registeredCapital = Number(payload.registeredCapital) |
| 708 | const files = (Array.isArray(this.attachmentFiles) ? this.attachmentFiles : []).filter(it => it && it.id) | 704 | const files = (Array.isArray(this.attachmentFiles) ? this.attachmentFiles : []).filter(it => it && it.id) |
| 709 | payload.attachmentFileIds = files.map(it => String(it.id || '')).filter(Boolean).join(',') | 705 | payload.attachmentFileIds = files.map(it => String(it.id || '')).filter(Boolean).join(',') |
| @@ -731,6 +727,10 @@ export default { | @@ -731,6 +727,10 @@ export default { | ||
| 731 | const res = await domesticCustomerCreditGetApi(this.id) | 727 | const res = await domesticCustomerCreditGetApi(this.id) |
| 732 | const data = res && res.data ? res.data : {} | 728 | const data = res && res.data ? res.data : {} |
| 733 | const next = { ...this.form, ...(data || {}) } | 729 | const next = { ...this.form, ...(data || {}) } |
| 730 | + if (this.purchaseDept && this.purchaseDept.id != null) { | ||
| 731 | + next.purchaseDepartment = String(this.purchaseDept.id) | ||
| 732 | + next.purchaseDepartmentName = this.purchaseDept.name != null ? String(this.purchaseDept.name) : '' | ||
| 733 | + } | ||
| 734 | next.id = next.id || this.id || '' | 734 | next.id = next.id || this.id || '' |
| 735 | const u = (this.$store && this.$store.state && this.$store.state.user) ? this.$store.state.user : {} | 735 | const u = (this.$store && this.$store.state && this.$store.state.user) ? this.$store.state.user : {} |
| 736 | if (!next.investigatorId) next.investigatorId = u && u.id ? String(u.id) : '' | 736 | if (!next.investigatorId) next.investigatorId = u && u.id ? String(u.id) : '' |
| @@ -169,13 +169,19 @@ | @@ -169,13 +169,19 @@ | ||
| 169 | <span>供应商分类</span> | 169 | <span>供应商分类</span> |
| 170 | </view> | 170 | </view> |
| 171 | 171 | ||
| 172 | - <uni-list-item class="select-item mgb10" :class="form.supplierCategory ? 'is-filled' : 'is-empty'" clickable | 172 | + <uni-list-item class="select-item" :class="form.supplierCategory ? 'is-filled' : 'is-empty'" clickable |
| 173 | @click="openSheet('supplierCategory')" :rightText="displayLabel('supplierCategory')" showArrow> | 173 | @click="openSheet('supplierCategory')" :rightText="displayLabel('supplierCategory')" showArrow> |
| 174 | <template v-slot:body> | 174 | <template v-slot:body> |
| 175 | <view class="item-title"><text>供应商分类</text></view> | 175 | <view class="item-title"><text>供应商分类</text></view> |
| 176 | </template> | 176 | </template> |
| 177 | </uni-list-item> | 177 | </uni-list-item> |
| 178 | 178 | ||
| 179 | + <uni-list-item v-if="form.supplierCategory" class="mgb10" title="分类说明"> | ||
| 180 | + <template v-slot:footer> | ||
| 181 | + <uni-easyinput type="textarea" :value="supplierCategoryDesc" :inputBorder="false" disabled placeholder="选择供应商分类后自动显示" maxlength="2000" /> | ||
| 182 | + </template> | ||
| 183 | + </uni-list-item> | ||
| 184 | + | ||
| 179 | <view class="title-header"> | 185 | <view class="title-header"> |
| 180 | <image class="title-header_icon" src="/static/images/title.png" /> | 186 | <image class="title-header_icon" src="/static/images/title.png" /> |
| 181 | <span>操作方案</span> | 187 | <span>操作方案</span> |
| @@ -235,10 +241,9 @@ | @@ -235,10 +241,9 @@ | ||
| 235 | </template> | 241 | </template> |
| 236 | </uni-list-item> | 242 | </uni-list-item> |
| 237 | 243 | ||
| 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> | 244 | + <uni-list-item class="mgb10" title="采购处"> |
| 245 | + <template v-slot:footer> | ||
| 246 | + <uni-easyinput v-model="form.purchaseDepartmentName" :inputBorder="false" disabled /> | ||
| 242 | </template> | 247 | </template> |
| 243 | </uni-list-item> | 248 | </uni-list-item> |
| 244 | </uni-list> | 249 | </uni-list> |
| @@ -271,7 +276,6 @@ export default { | @@ -271,7 +276,6 @@ export default { | ||
| 271 | { label: 'D类供应商', value: 'D' } | 276 | { label: 'D类供应商', value: 'D' } |
| 272 | ], | 277 | ], |
| 273 | companyNatureOptions: [], | 278 | companyNatureOptions: [], |
| 274 | - purchaseDeptOptions: [], | ||
| 275 | sheet: { visible: false, title: '', options: [], field: '', value: '' }, | 279 | sheet: { visible: false, title: '', options: [], field: '', value: '' }, |
| 276 | form: { | 280 | form: { |
| 277 | id: '', | 281 | id: '', |
| @@ -313,8 +317,8 @@ export default { | @@ -313,8 +317,8 @@ export default { | ||
| 313 | reviewDepartment: '', | 317 | reviewDepartment: '', |
| 314 | investigatorId: '', | 318 | investigatorId: '', |
| 315 | investigatorName: '', | 319 | investigatorName: '', |
| 316 | - purchase_department: '', | ||
| 317 | - purchase_departmentName: '' | 320 | + purchaseDepartment: '', |
| 321 | + purchaseDepartmentName: '' | ||
| 318 | } | 322 | } |
| 319 | } | 323 | } |
| 320 | }, | 324 | }, |
| @@ -325,6 +329,18 @@ export default { | @@ -325,6 +329,18 @@ export default { | ||
| 325 | this.form.investigatorId = u && u.id ? String(u.id) : '' | 329 | this.form.investigatorId = u && u.id ? String(u.id) : '' |
| 326 | this.form.investigatorName = u && u.name ? String(u.name) : '' | 330 | this.form.investigatorName = u && u.name ? String(u.name) : '' |
| 327 | }, | 331 | }, |
| 332 | + computed: { | ||
| 333 | + supplierCategoryDesc() { | ||
| 334 | + const v = this.form && this.form.supplierCategory != null ? String(this.form.supplierCategory) : '' | ||
| 335 | + const map = { | ||
| 336 | + A: '资信调查有担保函无资金风险、资料齐全,料质可控,价格较好,若出现质量、磅差问题可以索赔解决,进口倒挂时可协商延迟点价,可推迟发货,可试操作(前3个月每月操作量300-500吨);第一次计划货到厂验收结束后进行评审,正常后可以增量操作,要求每年评审一次;', | ||
| 337 | + B: '资信调查无担保函,国外企业属国内企业控股,无资金风险、资料齐全,价格较好,料质可控,若出现质量、磅差问题可以索赔解决(前3个月每月操作量200-400吨),第一次货到厂验收合格后可增量操作;操作正常每年评审一次;', | ||
| 338 | + C: '资信调查无担保函,资料齐全,料质可控,价格一般,出现质量、磅差问题可以索赔解决,可试单限量操作(前3个月每月操作量100-200吨),第一次货到厂验收合格后可增量操作,新开发供应商首年操作按每半年评审一次,操作正常则次年调整为每年评审一次;若出现索赔问题不及时解决可中止后续开信用证和中止到港货物的DP/TT付款,且立即暂停业务操作。', | ||
| 339 | + D: '资信调查无担保函,通过委托第三方机构调查无风险,虽然资料不齐全,但料质可控,价格略高,出现质量、磅差问题索赔解决有难度,一单一议,D类供应商第一次货到厂验收、付款、退款或者索赔正常后,可继续操作逐步增量(每月操作量100-200吨),每半年评审一次,操作正常到则次年调整为每年评审一次;若出现索赔问题不及时解决可终止后续到港货物的付款,且立即停止业务操作。' | ||
| 340 | + } | ||
| 341 | + return map[v] || '' | ||
| 342 | + } | ||
| 343 | + }, | ||
| 328 | methods: { | 344 | methods: { |
| 329 | async loadDicData() { | 345 | async loadDicData() { |
| 330 | try { | 346 | try { |
| @@ -341,20 +357,18 @@ export default { | @@ -341,20 +357,18 @@ export default { | ||
| 341 | async loadPurchaseDeptOptions() { | 357 | async loadPurchaseDeptOptions() { |
| 342 | try { | 358 | try { |
| 343 | const res = await getPurchaseDeptApi() | 359 | 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) | 360 | + const data = (res && res.data) ? res.data : {} |
| 361 | + this.form.purchaseDepartment = data && data.id != null ? String(data.id) : '' | ||
| 362 | + this.form.purchaseDepartmentName = data && data.name != null ? String(data.name) : '' | ||
| 349 | } catch (e) { | 363 | } catch (e) { |
| 350 | - this.purchaseDeptOptions = [] | 364 | + this.form.purchaseDepartment = '' |
| 365 | + this.form.purchaseDepartmentName = '' | ||
| 351 | } | 366 | } |
| 352 | }, | 367 | }, |
| 353 | displayLabel(field) { | 368 | displayLabel(field) { |
| 354 | const m = this.form || {} | 369 | const m = this.form || {} |
| 355 | const map = { | 370 | const map = { |
| 356 | companyNatureName: '请选择', | 371 | companyNatureName: '请选择', |
| 357 | - purchase_departmentName: '请选择', | ||
| 358 | supplierCategory: '请选择' | 372 | supplierCategory: '请选择' |
| 359 | } | 373 | } |
| 360 | if (field === 'supplierCategory') { | 374 | if (field === 'supplierCategory') { |
| @@ -369,8 +383,7 @@ export default { | @@ -369,8 +383,7 @@ export default { | ||
| 369 | openSheet(field) { | 383 | openSheet(field) { |
| 370 | const map = { | 384 | const map = { |
| 371 | companyNature: { title: '公司性质', options: this.companyNatureOptions, valueField: 'companyNature', labelField: 'companyNatureName' }, | 385 | 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' } | 386 | + supplierCategory: { title: '供应商分类', options: this.supplierCategoryOptions, valueField: 'supplierCategory', labelField: '' } |
| 374 | } | 387 | } |
| 375 | const cfg = map[field] | 388 | const cfg = map[field] |
| 376 | if (!cfg) return | 389 | if (!cfg) return |
| @@ -391,9 +404,7 @@ export default { | @@ -391,9 +404,7 @@ export default { | ||
| 391 | if (field === 'supplierCategory') { | 404 | if (field === 'supplierCategory') { |
| 392 | this.form.supplierCategory = value | 405 | this.form.supplierCategory = value |
| 393 | } | 406 | } |
| 394 | - if (field === 'purchase_department') this.form.purchase_departmentName = label | ||
| 395 | if (field === 'companyNature') this.form.companyNature = value | 407 | if (field === 'companyNature') this.form.companyNature = value |
| 396 | - if (field === 'purchase_department') this.form.purchase_department = value | ||
| 397 | this.sheet.visible = false | 408 | this.sheet.visible = false |
| 398 | }, | 409 | }, |
| 399 | validate() { | 410 | validate() { |
| @@ -434,7 +445,7 @@ export default { | @@ -434,7 +445,7 @@ export default { | ||
| 434 | { key: 'nextReviewTime', label: '下次评审时间' }, | 445 | { key: 'nextReviewTime', label: '下次评审时间' }, |
| 435 | { key: 'reviewDepartment', label: '评审部门' }, | 446 | { key: 'reviewDepartment', label: '评审部门' }, |
| 436 | { key: 'investigatorId', label: '资信调查人ID' }, | 447 | { key: 'investigatorId', label: '资信调查人ID' }, |
| 437 | - { key: 'purchase_department', label: '采购处' } | 448 | + { key: 'purchaseDepartment', label: '采购处' } |
| 438 | ] | 449 | ] |
| 439 | for (let i = 0; i < requiredFields.length; i++) { | 450 | for (let i = 0; i < requiredFields.length; i++) { |
| 440 | const f = requiredFields[i] | 451 | const f = requiredFields[i] |
| @@ -85,7 +85,7 @@ export default { | @@ -85,7 +85,7 @@ export default { | ||
| 85 | AUDIT_STATUS: [], | 85 | AUDIT_STATUS: [], |
| 86 | COMPANY_NATURE: [] | 86 | COMPANY_NATURE: [] |
| 87 | }, | 87 | }, |
| 88 | - purchaseDeptOptions: [], | 88 | + purchaseDept: null, |
| 89 | buttons: [{ | 89 | buttons: [{ |
| 90 | text: '审核详情', | 90 | text: '审核详情', |
| 91 | visible: true, | 91 | visible: true, |
| @@ -130,10 +130,9 @@ export default { | @@ -130,10 +130,9 @@ export default { | ||
| 130 | return getDicName('AUDIT_STATUS', v, this.dicOptions.AUDIT_STATUS) || v | 130 | return getDicName('AUDIT_STATUS', v, this.dicOptions.AUDIT_STATUS) || v |
| 131 | }, | 131 | }, |
| 132 | purchaseDeptName() { | 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 | 133 | + if (this.purchaseDept && this.purchaseDept.name != null) return String(this.purchaseDept.name) |
| 134 | + const v = this.form && this.form.purchaseDepartmentName != null ? String(this.form.purchaseDepartmentName) : '' | ||
| 135 | + return v || '-' | ||
| 137 | }, | 136 | }, |
| 138 | supplierCategoryName() { | 137 | supplierCategoryName() { |
| 139 | const v = this.form && this.form.supplierCategory != null ? String(this.form.supplierCategory) : '' | 138 | const v = this.form && this.form.supplierCategory != null ? String(this.form.supplierCategory) : '' |
| @@ -185,13 +184,10 @@ export default { | @@ -185,13 +184,10 @@ export default { | ||
| 185 | async loadPurchaseDeptOptions() { | 184 | async loadPurchaseDeptOptions() { |
| 186 | try { | 185 | try { |
| 187 | const res = await getPurchaseDeptApi() | 186 | 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) | 187 | + const data = (res && res.data) ? res.data : {} |
| 188 | + this.purchaseDept = data && typeof data === 'object' ? data : null | ||
| 193 | } catch (e) { | 189 | } catch (e) { |
| 194 | - this.purchaseDeptOptions = [] | 190 | + this.purchaseDept = null |
| 195 | } | 191 | } |
| 196 | }, | 192 | }, |
| 197 | handleButtonClick(btn) { | 193 | handleButtonClick(btn) { |
| @@ -64,7 +64,7 @@ export default { | @@ -64,7 +64,7 @@ export default { | ||
| 64 | dicOptions: { | 64 | dicOptions: { |
| 65 | COMPANY_NATURE: [] | 65 | COMPANY_NATURE: [] |
| 66 | }, | 66 | }, |
| 67 | - purchaseDeptOptions: [] | 67 | + purchaseDept: null |
| 68 | } | 68 | } |
| 69 | }, | 69 | }, |
| 70 | computed: { | 70 | computed: { |
| @@ -79,10 +79,9 @@ export default { | @@ -79,10 +79,9 @@ export default { | ||
| 79 | return map[v] || (v ? v : '-') | 79 | return map[v] || (v ? v : '-') |
| 80 | }, | 80 | }, |
| 81 | purchaseDeptName() { | 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 | 82 | + if (this.purchaseDept && this.purchaseDept.name != null) return String(this.purchaseDept.name) |
| 83 | + const v = this.form && this.form.purchaseDepartmentName != null ? String(this.form.purchaseDepartmentName) : '' | ||
| 84 | + return v || '-' | ||
| 86 | } | 85 | } |
| 87 | }, | 86 | }, |
| 88 | created() { | 87 | created() { |
| @@ -110,13 +109,10 @@ export default { | @@ -110,13 +109,10 @@ export default { | ||
| 110 | async loadPurchaseDeptOptions() { | 109 | async loadPurchaseDeptOptions() { |
| 111 | try { | 110 | try { |
| 112 | const res = await getPurchaseDeptApi() | 111 | 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) | 112 | + const data = (res && res.data) ? res.data : {} |
| 113 | + this.purchaseDept = data && typeof data === 'object' ? data : null | ||
| 118 | } catch (e) { | 114 | } catch (e) { |
| 119 | - this.purchaseDeptOptions = [] | 115 | + this.purchaseDept = null |
| 120 | } | 116 | } |
| 121 | }, | 117 | }, |
| 122 | safeText(v) { | 118 | safeText(v) { |
| @@ -169,13 +169,19 @@ | @@ -169,13 +169,19 @@ | ||
| 169 | <span>供应商分类</span> | 169 | <span>供应商分类</span> |
| 170 | </view> | 170 | </view> |
| 171 | 171 | ||
| 172 | - <uni-list-item class="select-item mgb10" :class="form.supplierCategory ? 'is-filled' : 'is-empty'" clickable | 172 | + <uni-list-item class="select-item" :class="form.supplierCategory ? 'is-filled' : 'is-empty'" clickable |
| 173 | @click="openSheet('supplierCategory')" :rightText="displayLabel('supplierCategory')" showArrow> | 173 | @click="openSheet('supplierCategory')" :rightText="displayLabel('supplierCategory')" showArrow> |
| 174 | <template v-slot:body> | 174 | <template v-slot:body> |
| 175 | <view class="item-title"><text>供应商分类</text></view> | 175 | <view class="item-title"><text>供应商分类</text></view> |
| 176 | </template> | 176 | </template> |
| 177 | </uni-list-item> | 177 | </uni-list-item> |
| 178 | 178 | ||
| 179 | + <uni-list-item v-if="form.supplierCategory" class="mgb10" title="分类说明"> | ||
| 180 | + <template v-slot:footer> | ||
| 181 | + <uni-easyinput type="textarea" :value="supplierCategoryDesc" :inputBorder="false" disabled placeholder="选择供应商分类后自动显示" maxlength="2000" /> | ||
| 182 | + </template> | ||
| 183 | + </uni-list-item> | ||
| 184 | + | ||
| 179 | <view class="title-header"> | 185 | <view class="title-header"> |
| 180 | <image class="title-header_icon" src="/static/images/title.png" /> | 186 | <image class="title-header_icon" src="/static/images/title.png" /> |
| 181 | <span>操作方案</span> | 187 | <span>操作方案</span> |
| @@ -235,10 +241,9 @@ | @@ -235,10 +241,9 @@ | ||
| 235 | </template> | 241 | </template> |
| 236 | </uni-list-item> | 242 | </uni-list-item> |
| 237 | 243 | ||
| 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> | 244 | + <uni-list-item class="mgb10" title="采购处"> |
| 245 | + <template v-slot:footer> | ||
| 246 | + <uni-easyinput v-model="form.purchaseDepartmentName" :inputBorder="false" disabled /> | ||
| 242 | </template> | 247 | </template> |
| 243 | </uni-list-item> | 248 | </uni-list-item> |
| 244 | </uni-list> | 249 | </uni-list> |
| @@ -273,7 +278,6 @@ export default { | @@ -273,7 +278,6 @@ export default { | ||
| 273 | { label: 'D类供应商', value: 'D' } | 278 | { label: 'D类供应商', value: 'D' } |
| 274 | ], | 279 | ], |
| 275 | companyNatureOptions: [], | 280 | companyNatureOptions: [], |
| 276 | - purchaseDeptOptions: [], | ||
| 277 | sheet: { visible: false, title: '', options: [], field: '', value: '' }, | 281 | sheet: { visible: false, title: '', options: [], field: '', value: '' }, |
| 278 | form: { | 282 | form: { |
| 279 | id: '', | 283 | id: '', |
| @@ -315,9 +319,21 @@ export default { | @@ -315,9 +319,21 @@ export default { | ||
| 315 | reviewDepartment: '', | 319 | reviewDepartment: '', |
| 316 | investigatorId: '', | 320 | investigatorId: '', |
| 317 | investigatorName: '', | 321 | investigatorName: '', |
| 318 | - purchase_department: '', | ||
| 319 | - purchase_departmentName: '' | 322 | + purchaseDepartment: '', |
| 323 | + purchaseDepartmentName: '' | ||
| 324 | + } | ||
| 325 | + } | ||
| 326 | + }, | ||
| 327 | + computed: { | ||
| 328 | + supplierCategoryDesc() { | ||
| 329 | + const v = this.form && this.form.supplierCategory != null ? String(this.form.supplierCategory) : '' | ||
| 330 | + const map = { | ||
| 331 | + A: '资信调查有担保函无资金风险、资料齐全,料质可控,价格较好,若出现质量、磅差问题可以索赔解决,进口倒挂时可协商延迟点价,可推迟发货,可试操作(前3个月每月操作量300-500吨);第一次计划货到厂验收结束后进行评审,正常后可以增量操作,要求每年评审一次;', | ||
| 332 | + B: '资信调查无担保函,国外企业属国内企业控股,无资金风险、资料齐全,价格较好,料质可控,若出现质量、磅差问题可以索赔解决(前3个月每月操作量200-400吨),第一次货到厂验收合格后可增量操作;操作正常每年评审一次;', | ||
| 333 | + C: '资信调查无担保函,资料齐全,料质可控,价格一般,出现质量、磅差问题可以索赔解决,可试单限量操作(前3个月每月操作量100-200吨),第一次货到厂验收合格后可增量操作,新开发供应商首年操作按每半年评审一次,操作正常则次年调整为每年评审一次;若出现索赔问题不及时解决可中止后续开信用证和中止到港货物的DP/TT付款,且立即暂停业务操作。', | ||
| 334 | + D: '资信调查无担保函,通过委托第三方机构调查无风险,虽然资料不齐全,但料质可控,价格略高,出现质量、磅差问题索赔解决有难度,一单一议,D类供应商第一次货到厂验收、付款、退款或者索赔正常后,可继续操作逐步增量(每月操作量100-200吨),每半年评审一次,操作正常到则次年调整为每年评审一次;若出现索赔问题不及时解决可终止后续到港货物的付款,且立即停止业务操作。' | ||
| 320 | } | 335 | } |
| 336 | + return map[v] || '' | ||
| 321 | } | 337 | } |
| 322 | }, | 338 | }, |
| 323 | async onLoad(query) { | 339 | async onLoad(query) { |
| @@ -343,20 +359,18 @@ export default { | @@ -343,20 +359,18 @@ export default { | ||
| 343 | async loadPurchaseDeptOptions() { | 359 | async loadPurchaseDeptOptions() { |
| 344 | try { | 360 | try { |
| 345 | const res = await getPurchaseDeptApi() | 361 | 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) | 362 | + const data = (res && res.data) ? res.data : {} |
| 363 | + this.form.purchaseDepartment = data && data.id != null ? String(data.id) : '' | ||
| 364 | + this.form.purchaseDepartmentName = data && data.name != null ? String(data.name) : '' | ||
| 351 | } catch (e) { | 365 | } catch (e) { |
| 352 | - this.purchaseDeptOptions = [] | 366 | + this.form.purchaseDepartment = '' |
| 367 | + this.form.purchaseDepartmentName = '' | ||
| 353 | } | 368 | } |
| 354 | }, | 369 | }, |
| 355 | displayLabel(field) { | 370 | displayLabel(field) { |
| 356 | const m = this.form || {} | 371 | const m = this.form || {} |
| 357 | const map = { | 372 | const map = { |
| 358 | companyNatureName: '请选择', | 373 | companyNatureName: '请选择', |
| 359 | - purchase_departmentName: '请选择', | ||
| 360 | supplierCategory: '请选择' | 374 | supplierCategory: '请选择' |
| 361 | } | 375 | } |
| 362 | if (field === 'supplierCategory') { | 376 | if (field === 'supplierCategory') { |
| @@ -371,8 +385,7 @@ export default { | @@ -371,8 +385,7 @@ export default { | ||
| 371 | openSheet(field) { | 385 | openSheet(field) { |
| 372 | const map = { | 386 | const map = { |
| 373 | companyNature: { title: '公司性质', options: this.companyNatureOptions, valueField: 'companyNature', labelField: 'companyNatureName' }, | 387 | 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' } | 388 | + supplierCategory: { title: '供应商分类', options: this.supplierCategoryOptions, valueField: 'supplierCategory', labelField: '' } |
| 376 | } | 389 | } |
| 377 | const cfg = map[field] | 390 | const cfg = map[field] |
| 378 | if (!cfg) return | 391 | if (!cfg) return |
| @@ -393,9 +406,7 @@ export default { | @@ -393,9 +406,7 @@ export default { | ||
| 393 | if (field === 'supplierCategory') { | 406 | if (field === 'supplierCategory') { |
| 394 | this.form.supplierCategory = value | 407 | this.form.supplierCategory = value |
| 395 | } | 408 | } |
| 396 | - if (field === 'purchase_department') this.form.purchase_departmentName = label | ||
| 397 | if (field === 'companyNature') this.form.companyNature = value | 409 | if (field === 'companyNature') this.form.companyNature = value |
| 398 | - if (field === 'purchase_department') this.form.purchase_department = value | ||
| 399 | this.sheet.visible = false | 410 | this.sheet.visible = false |
| 400 | }, | 411 | }, |
| 401 | async loadDetail() { | 412 | async loadDetail() { |
| @@ -412,10 +423,6 @@ export default { | @@ -412,10 +423,6 @@ export default { | ||
| 412 | const found = (this.companyNatureOptions || []).find(o => String(o.value) === String(this.form.companyNature)) | 423 | const found = (this.companyNatureOptions || []).find(o => String(o.value) === String(this.form.companyNature)) |
| 413 | if (found) this.form.companyNatureName = String(found.label || '') | 424 | if (found) this.form.companyNatureName = String(found.label || '') |
| 414 | } | 425 | } |
| 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 || '') | ||
| 418 | - } | ||
| 419 | } catch (e) { | 426 | } catch (e) { |
| 420 | uni.showToast({ title: '详情加载失败', icon: 'none' }) | 427 | uni.showToast({ title: '详情加载失败', icon: 'none' }) |
| 421 | } finally { | 428 | } finally { |
| @@ -460,7 +467,7 @@ export default { | @@ -460,7 +467,7 @@ export default { | ||
| 460 | { key: 'nextReviewTime', label: '下次评审时间' }, | 467 | { key: 'nextReviewTime', label: '下次评审时间' }, |
| 461 | { key: 'reviewDepartment', label: '评审部门' }, | 468 | { key: 'reviewDepartment', label: '评审部门' }, |
| 462 | { key: 'investigatorId', label: '资信调查人ID' }, | 469 | { key: 'investigatorId', label: '资信调查人ID' }, |
| 463 | - { key: 'purchase_department', label: '采购处' } | 470 | + { key: 'purchaseDepartment', label: '采购处' } |
| 464 | ] | 471 | ] |
| 465 | for (let i = 0; i < requiredFields.length; i++) { | 472 | for (let i = 0; i < requiredFields.length; i++) { |
| 466 | const f = requiredFields[i] | 473 | const f = requiredFields[i] |