detail.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view class="apply-wrap flex flex_column" v-if="form" >
  3. <view class="title flex align_center justify_center">
  4. <u-icon :name="form.auditStatus == 'PASS'?'icon_complete':(form.auditStatus == 'WAIT'?'wait':'icon_cancel')" custom-prefix="iscm-icon" size="40"></u-icon>
  5. <view class="flex align_center">
  6. <text style="margin-left: 0.5rem;margin-right: 0.5rem;">{{form.auditStatusDictValue}}</text>
  7. <u-tag size='mini' type="info" shape="circle" v-if="form.state=='WRITE_OFF'" text="已注销"></u-tag>
  8. <u-tag size='mini' type="info" shape="circle" v-if="form.state=='DISABLED'" text="已停用"></u-tag>
  9. <u-tag size='mini' type="info" shape="circle" v-if="form.state=='SUSPEND'" text="已暂停"></u-tag>
  10. </view>
  11. </view>
  12. <view class="login-form">
  13. <u-form :model="form" label-width="180rpx" :error-type="['toast']" ref="uForm">
  14. <u-form-item label="门头照片">
  15. <u-image v-if="form.storeImage" :src="form.storeImage" width="200" height="150"></u-image>
  16. <text v-else>未上传</text>
  17. </u-form-item>
  18. <u-form-item label="营业执照">
  19. <u-image v-if="form.licenseImage" :src="form.licenseImage" width="200" height="150"></u-image>
  20. <text v-else>未上传</text>
  21. </u-form-item>
  22. <u-form-item label="门店名称">
  23. <view style="word-break: break-all;line-height: normal;">
  24. {{form.storeName||'--'}}
  25. </view>
  26. </u-form-item>
  27. <u-form-item label="所在地区">
  28. <view style="word-break: break-all;line-height: normal;">
  29. {{form.label||'--'}}
  30. </view>
  31. </u-form-item>
  32. <u-form-item label="详细地址">
  33. <view style="word-break: break-all;line-height: normal;">{{form.addrDetail||'--'}}</view>
  34. </u-form-item>
  35. <u-form-item label="联系人姓名">
  36. <view style="word-break: break-all;line-height: normal;">
  37. {{form.contactName||'--'}}
  38. </view>
  39. </u-form-item>
  40. <u-form-item label="联系人手机">
  41. {{form.contactPhone||'--'}}
  42. </u-form-item>
  43. <u-form-item label="关联客户" v-if="form.auditStatus == 'PASS'">
  44. <view style="word-break: break-all;line-height: normal;">
  45. {{form.customerName||'--'}}
  46. </view>
  47. </u-form-item>
  48. <u-form-item label="结算方式" v-if="form.auditStatus == 'PASS'">
  49. {{form.settleTypeDictValue||'--'}}
  50. </u-form-item>
  51. <u-form-item label="授信金额" v-if="form.auditStatus == 'PASS'&&form.settleType == 'CREDIT'">
  52. {{form.creditLimit||'--'}}
  53. </u-form-item>
  54. <view class="flex">
  55. <view style="padding: 0.5rem 0;width: 90px;">价格权限</view>
  56. <view>
  57. <view style="padding: 0.5rem 1rem 0.3rem 0;">
  58. 货架产品:{{showPriceStr.length ? showPriceStr.join("/") : '--'}}
  59. </view>
  60. <view style="padding: 0.5rem 1rem 0.5rem 0">
  61. 非货架产品:{{showNonPriceStr.length ? showNonPriceStr.join("/") : '--'}}
  62. </view>
  63. </view>
  64. </view>
  65. </u-form>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. import { xprhStoreApplyDetail } from '@/api/approveStore'
  71. import { getShelfPriceShow } from '@/api/shelf'
  72. export default{
  73. data(){
  74. return{
  75. loading: false,
  76. theme: '',
  77. form: {
  78. storeName: '', // 门店名称
  79. contactPhone: '', // 联系手机
  80. contactName: '', // 联系人
  81. addrProvince: undefined, // 省
  82. addrProvinceName: '',
  83. addrCity: undefined, // 市
  84. addrCityName: '',
  85. addrDistrict: undefined, // 区
  86. addrDistrictName: '',
  87. addrDetail: '', // 详细地址
  88. storeImage: '', // 门头照片
  89. licenseImage: '', // 营业执照
  90. settleType: undefined, // 结算方式
  91. settleTypeDictValue: undefined,
  92. customerSn: undefined, // 关联客户
  93. customerName: undefined,
  94. creditLimit: '', // 授信额度
  95. delearSn: undefined,
  96. applySn: undefined,
  97. auditStatus: undefined // 审核状态
  98. },
  99. rules: {},
  100. areaIdArr: [], // 省市区id数组
  101. labelArr: [],
  102. showPriceStr: [],
  103. showNonPriceStr: []
  104. }
  105. },
  106. onLoad(options) {
  107. const _this = this
  108. this.applySn = options.sn
  109. this.getDetail()
  110. },
  111. methods: {
  112. // 获取详细
  113. getDetail () {
  114. xprhStoreApplyDetail({ sn: this.applySn }).then(res => {
  115. console.log(res)
  116. if (res.status == 200) {
  117. this.form = Object.assign(this.form, res.data)
  118. this.form.addrDetail = this.form.addrDetail || '--'
  119. if(this.form.addrProvinceName&&this.form.addrCityName&&this.form.addrDistrictName){
  120. this.labelArr = [this.form.addrProvinceName,this.form.addrCityName,this.form.addrDistrictName]
  121. this.areaIdArr = [this.form.addrProvince,this.form.addrCity,this.form.addrDistrict]
  122. this.form.label = this.labelArr.join('-')
  123. }else{
  124. this.labelArr = []
  125. this.areaIdArr = []
  126. this.form.label = '--'
  127. }
  128. this.getShelfPriceShow(res.data)
  129. }
  130. })
  131. },
  132. // 获取价格显示设置
  133. getShelfPriceShow(data) {
  134. this.showPriceStr = []
  135. this.showNonPriceStr = []
  136. getShelfPriceShow({
  137. shelfSn: data.shelfSn
  138. }).then(res => {
  139. if (res.status == 200) {
  140. const ret = res.data && res.data
  141. ret.map(item => {
  142. if (item.paramCode == 'shelf_price_show' && item.paramValue == 1) {
  143. this.showPriceStr.push("车主价")
  144. }
  145. if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
  146. this.showPriceStr.push("结算价")
  147. }
  148. if (item.paramCode == 'non_shelf_price_show' && item.paramValue == 1) {
  149. this.showNonPriceStr.push("车主价")
  150. }
  151. if (item.paramCode == 'non_shelf_cost_show' && item.paramValue == 1) {
  152. this.showNonPriceStr.push("结算价")
  153. }
  154. })
  155. }
  156. })
  157. },
  158. }
  159. }
  160. </script>
  161. <style scoped lang="scss">
  162. .apply-wrap{
  163. width:100%;
  164. height: 100vh;
  165. background-color: #fff;
  166. .title{
  167. text-align: center;
  168. font-size: 1.2rem;
  169. border-bottom: 0.5rem solid #f8f8f8;
  170. padding: 0.5rem;
  171. }
  172. .login-form{
  173. padding: 0.7rem 1.5rem;
  174. flex-grow: 1;
  175. overflow: auto;
  176. }
  177. }
  178. </style>