supplierdetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <template>
  2. <view class="boxcon">
  3. <view class="container">
  4. <view class="titleall">
  5. <text class="pl">供应商</text>
  6. <text class="pr">{{form.name}}</text>
  7. </view>
  8. <view class="titleall">
  9. <text class="pl">统一社会信用代码</text>
  10. <text class="pr">{{form.socialCode}}</text>
  11. </view>
  12. <view class="titleall">
  13. <text class="pl">法人姓名</text>
  14. <text class="pr">{{form.socialCode}}</text>
  15. </view>
  16. <view class="titleall">
  17. <text class="pl">联系人</text>
  18. <text class="pr">{{form.contacts}}</text>
  19. </view>
  20. <view class="titleall">
  21. <text class="pl">联系电话</text>
  22. <text class="pr">{{form.contactsMobile}}</text>
  23. </view>
  24. <view class="titleall">
  25. <text class="pl">账号</text>
  26. <text class="pr">{{form.account}}</text>
  27. </view>
  28. <view class="titleall">
  29. <text class="pl">密码</text>
  30. <view style="display: flex;justify-content: center;align-items: center;" @click="show=true">
  31. <text class="pr">重置</text>
  32. <u-icon name="arrow-right" color="" size="15" bold="true"></u-icon>
  33. </view>
  34. </view>
  35. <view class="titleall ">
  36. <text class="pl psa ">认证照片</text>
  37. <text class="pr" v-if="!form.identifyPicList">暂无</text>
  38. <view class="fanuppic" v-if="form.identifyPicList.length>0">
  39. <view class="picbox" v-for="item in form.identifyPicList">
  40. <image :src="item" mode="aspectFill" @click="prviewPic(item)"></image>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="titleall ">
  45. <text class="pl psa ">授权委托书</text>
  46. <text class="pr" v-if="!form.proxyFileList">暂无</text>
  47. <view class="fanuppic" v-if="form.proxyFileList.length>0">
  48. <view class="picbox" v-for="item in form.proxyFileList">
  49. <image :src="item" mode="aspectFill" @click="prviewPic(item)"></image>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="titleall">
  54. <text class="pl">认证状态</text>
  55. <text class="pr">{{form.statusText}}</text>
  56. </view>
  57. </view>
  58. <view style="width: 100%;height: 80rpx;"></view>
  59. <view class="newbill flex1" v-if="form.isDeleted==0&&form.statusText=='未认证'">
  60. <view class="choosebtn">
  61. <view class="delbtn flex1" @click="examineFail">认证失败</view>
  62. <view class="succbtn flex1" @click="examineSuccess">认证成功</view>
  63. </view>
  64. </view>
  65. <view class="newbill flex1" v-if="form.isDeleted==0&&form.statusText=='已认证'" @click="forbidden">
  66. <view class="newbillbtn">
  67. <text>禁用</text>
  68. </view>
  69. </view>
  70. <view class="newbill flex1" @click="resert()" v-if="form.isDeleted==1">
  71. <view class="newbillbtn">
  72. <text>复原</text>
  73. </view>
  74. </view>
  75. <!-- 弹出层 -->
  76. <u-popup :show="show" @close="close" @open="open" mode="center">
  77. <view class="forgetbox">
  78. <!-- <view class="ciclebg">
  79. <image src="../../static/img/forpwdbg.png" mode="aspectFill"></image>
  80. </view> -->
  81. <!-- <view class="keybox">
  82. <image src="../../static/img/foricon.png" mode="aspectFill"></image>
  83. </view> -->
  84. <text class="keytitle">重置密码</text>
  85. <u--form labelPosition="left" :model="model1" ref="form1" labelWidth="50">
  86. <!-- <u-form-item label="旧密码" prop="pwd.oldPassword" borderBottom ref="item1">
  87. <u--input v-model="pwd.oldPassword" border="none" password></u--input>
  88. </u-form-item> -->
  89. <u-form-item label="新密码" prop="pwd.newPassword" borderBottom ref="item1">
  90. <u--input v-model="pwd.password" border="none" password></u--input>
  91. </u-form-item>
  92. </u--form>
  93. <!-- <text class="remindtitle">请电联系管理员,进行密码确定</text> -->
  94. <view class="surebtn" @click="makeSurePwd()">确认</view>
  95. </view>
  96. </u-popup>
  97. </view>
  98. </template>
  99. <script>
  100. let that
  101. export default {
  102. data() {
  103. return {
  104. form: {
  105. },
  106. pwd: {
  107. password: '',
  108. },
  109. show: false,
  110. // rules: {
  111. // 'pwd.oldPassword': {
  112. // type: 'string',
  113. // required: true,
  114. // message: '请填写旧密码',
  115. // trigger: ['blur', 'change']
  116. // },
  117. // 'pwd.newPassword': {
  118. // type: 'string',
  119. // required: true,
  120. // message: '请填写新密码',
  121. // trigger: ['blur', 'change']
  122. // },
  123. // },
  124. }
  125. },
  126. onLoad(o) {
  127. that = this
  128. if (o.id) {
  129. this.id = o.id
  130. }
  131. this.init()
  132. },
  133. methods: {
  134. close() {
  135. this.show = false
  136. },
  137. open() {
  138. this.show = true
  139. },
  140. tryAgain() {
  141. },
  142. init() {
  143. uni.showLoading()
  144. uni.$u.http.get(`/api/Supplier/${this.id}`, {
  145. custom: {
  146. auth: true
  147. }
  148. }).then((res) => {
  149. uni.hideLoading()
  150. this.form = res
  151. }).catch((err) => {
  152. uni.hideLoading()
  153. console.log(err)
  154. })
  155. },
  156. prviewPic(item) {
  157. let pics=[]
  158. pics.push(item)
  159. uni.previewImage({
  160. urls: pics,
  161. });
  162. },
  163. makeSurePwd() {
  164. uni.showLoading()
  165. let pwd={
  166. password:this.pwd.password,
  167. supplierId:this.form.id
  168. }
  169. uni.$u.http.post('/api/Account/password/resetSupplier', pwd, {
  170. custom: {
  171. auth: true
  172. }
  173. }).then((res) => {
  174. uni.hideLoading()
  175. this.$toast("重置成功")
  176. this.show = false
  177. }).catch((err) => {
  178. console.log(err)
  179. uni.hideLoading()
  180. this.$toast(err.msg)
  181. })
  182. },
  183. resert() {
  184. let ids = []
  185. ids.push(this.id)
  186. uni.showModal({
  187. title: '提示',
  188. content: "是否认复原?",
  189. success: function(res) {
  190. if (res.confirm) {
  191. uni.showLoading()
  192. uni.$u.http.post('/api/Supplier/manage', {
  193. ids: ids,
  194. operateType: 2
  195. }, {
  196. custom: {
  197. auth: true
  198. }
  199. }).then((res) => {
  200. uni.hideLoading()
  201. that.$toast("操作成功")
  202. setTimeout(() => {
  203. that.init()
  204. }, 500)
  205. }).catch((err) => {
  206. uni.hideLoading()
  207. that.$toast(err.msg)
  208. })
  209. } else if (res.cancel) {
  210. }
  211. }
  212. })
  213. },
  214. forbidden() {
  215. let ids = []
  216. ids.push(this.id)
  217. uni.showModal({
  218. title: '提示',
  219. content: "是否认禁用?",
  220. success: function(res) {
  221. if (res.confirm) {
  222. uni.showLoading()
  223. uni.$u.http.post('/api/Supplier/manage', {
  224. ids: ids,
  225. operateType: 1
  226. }, {
  227. custom: {
  228. auth: true
  229. }
  230. }).then((res) => {
  231. uni.hideLoading()
  232. that.$toast("操作成功")
  233. setTimeout(() => {
  234. that.init()
  235. }, 500)
  236. }).catch((err) => {
  237. uni.hideLoading()
  238. that.$toast(err.msg)
  239. })
  240. } else if (res.cancel) {
  241. }
  242. }
  243. })
  244. },
  245. examineSuccess() {
  246. let ids = []
  247. ids.push(this.id)
  248. uni.showModal({
  249. title: '提示',
  250. content: "是否认证成功?",
  251. success: function(res) {
  252. if (res.confirm) {
  253. uni.showLoading()
  254. uni.$u.http.post('/api/Supplier/manage', {
  255. ids: ids,
  256. operateType: 3
  257. }, {
  258. custom: {
  259. auth: true
  260. }
  261. }).then((res) => {
  262. uni.hideLoading()
  263. that.$toast("操作成功")
  264. setTimeout(() => {
  265. that.init()
  266. }, 500)
  267. }).catch((err) => {
  268. uni.hideLoading()
  269. that.$toast(err.msg)
  270. })
  271. } else if (res.cancel) {
  272. }
  273. }
  274. })
  275. },
  276. examineFail() {
  277. let ids = []
  278. ids.push(this.id)
  279. uni.showModal({
  280. title: '提示',
  281. content: "是否认证失败?",
  282. success: function(res) {
  283. if (res.confirm) {
  284. uni.showLoading()
  285. uni.$u.http.post('/api/Supplier/manage', {
  286. ids: ids,
  287. operateType: 4
  288. }, {
  289. custom: {
  290. auth: true
  291. }
  292. }).then((res) => {
  293. uni.hideLoading()
  294. that.$toast("操作成功")
  295. setTimeout(() => {
  296. that.init()
  297. }, 500)
  298. }).catch((err) => {
  299. uni.hideLoading()
  300. that.$toast(err.msg)
  301. })
  302. } else if (res.cancel) {
  303. }
  304. }
  305. })
  306. }
  307. }
  308. }
  309. </script>
  310. <style lang="scss">
  311. page {
  312. background-color: #F6F6F6 !important;
  313. }
  314. .boxcon {
  315. margin: 20rpx 20rpx;
  316. padding: 50rpx 20rpx;
  317. border-radius: 20rpx;
  318. background: #fff;
  319. .titlename {
  320. font-size: 36rpx;
  321. font-weight: 600;
  322. padding-bottom: 30rpx;
  323. display: block;
  324. margin-bottom: 30rpx;
  325. border-bottom: 1rpx solid #E8E8E8;
  326. }
  327. .container {
  328. .bod {
  329. border-bottom: 1rpx solid #E8E8E8;
  330. box-sizing: border-box;
  331. }
  332. .ptin {
  333. padding-top: 50rpx;
  334. }
  335. .plas {
  336. padding-left: 65rpx;
  337. word-wrap: wrap;
  338. box-sizing: border-box;
  339. }
  340. .ds {
  341. padding-top: 30rpx;
  342. }
  343. .psa {
  344. padding-right: 30rpx;
  345. }
  346. .cls {
  347. color: #68625B;
  348. }
  349. .titleall {
  350. display: flex;
  351. justify-content: space-between;
  352. font-size: 28rpx;
  353. padding-bottom: 30rpx;
  354. .pl {
  355. // width: 180rpx;
  356. color: #BEBDBB;
  357. flex-shrink: 0;
  358. // margin-right: 30rpx;
  359. }
  360. .pr {
  361. word-wrap: wrap;
  362. display: block;
  363. display: -webkit-box;
  364. }
  365. .uppic {
  366. display: flex;
  367. flex-wrap: wrap;
  368. justify-content: flex-end;
  369. }
  370. .picbox {
  371. width: 150rpx;
  372. height: 150rpx;
  373. margin-left: 20rpx;
  374. border-radius: 20rpx;
  375. image {
  376. width: 100%;
  377. height: 100%;
  378. }
  379. }
  380. .fanuppic {
  381. display: flex;
  382. flex-wrap: wrap;
  383. }
  384. }
  385. }
  386. }
  387. .forgetbox {
  388. width: 600rpx;
  389. height: 500rpx;
  390. background-color: #fff;
  391. display: flex;
  392. flex-direction: column;
  393. align-items: center;
  394. position: relative;
  395. background-image: url("@/static/img/forpwdbg.png");
  396. background-repeat: no-repeat;
  397. background-position: right 0 top 0;
  398. background-size: 367rpx 225rpx;
  399. .ciclebg {
  400. position: relative;
  401. right: 0;
  402. top: 0;
  403. width: 367rpx;
  404. height: 225rpx;
  405. }
  406. .keybox {
  407. margin-top: 84rpx;
  408. width: 196rpx;
  409. height: 161rpx;
  410. image {
  411. width: 100%;
  412. height: 100%;
  413. }
  414. }
  415. .keytitle {
  416. color: #1F242A;
  417. padding-top: 70rpx;
  418. padding-bottom: 70rpx;
  419. font-size: 36rpx;
  420. font-weight: 600;
  421. }
  422. .remindtitle {
  423. color: #68625B;
  424. font-size: 28rpx;
  425. padding-top: 30rpx;
  426. }
  427. .surebtn {
  428. width: 314rpx;
  429. height: 84rpx;
  430. line-height: 84rpx;
  431. border-radius: 43rpx;
  432. background: linear-gradient(to right, #FFE1AD, #D8AB5A);
  433. color: #412900;
  434. margin-top: 86rpx;
  435. text-align: center;
  436. }
  437. }
  438. </style>