handle.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <template>
  2. <view>
  3. <view class="cmain">
  4. <view class="box order_detail" style="padding: 13px">
  5. <u-steps :current="current">
  6. <u-steps-item title="订单确认"></u-steps-item>
  7. <u-steps-item title="进口申报确认"></u-steps-item>
  8. </u-steps>
  9. </view>
  10. <view class="box order_detail">
  11. <view v-if="current == 0">
  12. <view class="item ctt">订单确认</view>
  13. </view>
  14. <view v-if="current == 1">
  15. <view class="item ctt">进口申报确认</view>
  16. </view>
  17. <view class="expand" v-if="current == 0" :style="{height:expand?'auto':'340px'}">
  18. <view class="item">
  19. <text class="label">订单编号</text>
  20. <text class="desc omit">{{ item.tradeNo }}</text>
  21. </view>
  22. <view class="item">
  23. <text class="label">结算单号</text>
  24. <text class="desc omit">{{ item.settleBillNo }}</text>
  25. </view>
  26. <view class="item">
  27. <text class="label">预申报编号</text>
  28. <text class="desc omit">{{ item.platSeqNo }}</text>
  29. </view>
  30. <view class="item">
  31. <text class="label">买家</text>
  32. <text class="desc omit">{{ item.buyUserName }}</text>
  33. </view>
  34. <view class="item">
  35. <text class="label">车牌号</text>
  36. <text class="desc">{{ item.veNo }}</text>
  37. </view>
  38. <view class="item">
  39. <text class="label">商品名称</text>
  40. <text class="desc">{{ item.goodsNames }}</text>
  41. </view>
  42. <view class="item">
  43. <text class="label">申报时间</text>
  44. <text class="desc">{{ item.applyTime }}</text>
  45. </view>
  46. <view class="item">
  47. <text class="label">申报金额</text>
  48. <text class="desc">¥ {{ item.totalPrice }}</text>
  49. </view>
  50. <view class="item">
  51. <text class="label">净重(kg)</text>
  52. <text class="desc">{{ item.netWt }}</text>
  53. </view>
  54. <view class="item">
  55. <text class="label">毛重(kg)</text>
  56. <text class="desc">{{ item.grossWt }}</text>
  57. </view>
  58. <view class="item">
  59. <text class="label">申报数量</text>
  60. <text class="desc">{{ item.buyQty }}</text>
  61. </view>
  62. <view class="item">
  63. <text class="label">商户名称</text>
  64. <text class="desc">{{ item.enterpriseName }}</text>
  65. </view>
  66. <view class="item">
  67. <text class="label">交易地区名称</text>
  68. <text class="desc">{{ item.tradeAreaName }}</text>
  69. </view>
  70. <view class="item">
  71. <text class="label">进口预申报号</text>
  72. <text class="desc">{{ item.preIeportNo }}</text>
  73. </view>
  74. <view class="item">
  75. <text class="label">批次预录入号</text>
  76. <text class="desc">{{ item.preNo }}</text>
  77. </view>
  78. </view>
  79. <view class="expand" v-else :style="{height:expand?'auto':'300px'}">
  80. <view class="item">
  81. <text class="label">业务编号</text>
  82. <text class="desc omit">{{ item2.platSeqNo }}</text>
  83. </view>
  84. <view class="item">
  85. <text class="label">预录入编号</text>
  86. <text class="desc">{{ item2.preNo }}</text>
  87. </view>
  88. <view class="item">
  89. <text class="label">进境申报单编号</text>
  90. <text class="desc">{{ item2.itrdclDeclareId }}</text>
  91. </view>
  92. <view class="item">
  93. <text class="label">申报类型</text>
  94. <text class="desc">
  95. <text v-if=" item2.declareType==1">个人申报</text>
  96. <text v-if=" item2.declareType==2">商铺或代理人</text>
  97. <text v-if=" item2.declareType==3">合作社</text>
  98. <text v-if=" item2.declareType==4">互助组</text>
  99. </text>
  100. </view>
  101. <view class="item">
  102. <text class="label">申报人姓名</text>
  103. <text class="desc">{{ item2.declareName }}</text>
  104. </view>
  105. <view class="item">
  106. <text class="label">申报人身份证号</text>
  107. <text class="desc">{{ item2.ciphertextIdno }}</text>
  108. </view>
  109. <view class="item" v-if="item2.declareType == '2'">
  110. <text class="label">商铺编码</text>
  111. <text class="desc">{{ item2.shopNo }}</text>
  112. </view>
  113. <view class="item" v-if="item2.declareType == '2'">
  114. <text class="label">商铺名称</text>
  115. <text class="desc">{{ item2.shopName }}</text>
  116. </view>
  117. <view class="item">
  118. <text class="label">商品名称</text>
  119. <text class="desc">{{ item2.goodsNames }}</text>
  120. </view>
  121. <view class="item">
  122. <text class="label">总金额</text>
  123. <text class="desc">{{ item2.sumAmt }}</text>
  124. </view>
  125. <view class="item">
  126. <text class="label">总毛重({{item.goodsUnit }})</text>
  127. <text class="desc">{{ item2.sumGrossWt }}</text>
  128. </view>
  129. <view class="item">
  130. <text class="label">总净重({{item.goodsUnit }})</text>
  131. <text class="desc">{{ item2.sumNetWt }}</text>
  132. </view>
  133. <view class="item">
  134. <text class="label">件数</text>
  135. <text class="desc">{{ item2.packNo }}</text>
  136. </view>
  137. <view class="item">
  138. <text class="label">车牌号</text>
  139. <text class="desc">{{ item2.veNo }}</text>
  140. </view>
  141. <view class="item" v-if="item2.declareType == '3' || item2.declareType == '4'">
  142. <text class="label" v-if="item2.declareType == '3'">互助组备案编号</text>
  143. <text class="label" v-if="item2.declareType == '4'">合作社备案编号</text>
  144. <text class="desc">¥ {{ item2.orgPutrecNo }}</text>
  145. </view>
  146. <view class="item" v-if="item2.declareType == '3' || item2.declareType == '4'">
  147. <text class="label" v-if="item2.declareType == '3'">互助组名称</text>
  148. <text class="label" v-if="item2.declareType == '4'">合作社名称</text>
  149. <text class="desc">¥ {{ item2.orgName }}</text>
  150. </view>
  151. <view class="item" v-if="item2.declareType == '4'">
  152. <text class="label">合作社信用代码</text>
  153. <text class="desc">¥ {{ item2.orgScc }}</text>
  154. </view>
  155. <view class="item">
  156. <text class="label">监管场所</text>
  157. <text class="desc">{{ item2.fieldName }}</text>
  158. </view>
  159. <view class="item">
  160. <text class="label">贸易国别</text>
  161. <text class="desc">{{ item2.tradeCountry }}</text>
  162. </view>
  163. <view class="item">
  164. <text class="label">企业编码</text>
  165. <text class="desc">{{ item2.entCode }}</text>
  166. </view>
  167. <view class="item">
  168. <text class="label">企业名称</text>
  169. <text class="desc">{{ item2.entName }}</text>
  170. </view>
  171. </view>
  172. <view class="more" @click="expand = !expand">
  173. <text class="icon">&#xe649;</text>
  174. <text>{{expand?'收起':'更多信息'}}</text>
  175. </view>
  176. </view>
  177. </view>
  178. <view class="mfooter">
  179. <view class="flex">
  180. <view class="f">
  181. <button class="btn" @click="ok()">确定</button>
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. </template>
  187. <script>
  188. export default {
  189. data() {
  190. return {
  191. ip: this.http.ip,
  192. imgList: [],
  193. expand: false, //展开
  194. current: 0,
  195. item: {},
  196. item2: {},
  197. orderId: '',
  198. peopleConfirmStatus: '',
  199. cooperEntrustStatus: '',
  200. applyConfirmStatus: '',
  201. cooper_entrust: 2
  202. };
  203. },
  204. onLoad(e) {
  205. if (e.orderId && e.peopleConfirmStatus && e.applyConfirmStatus) {
  206. this.orderId = e.orderId;
  207. this.peopleConfirmStatus = e.peopleConfirmStatus;
  208. this.cooperEntrustStatus = e.cooperEntrustStatus;
  209. this.applyConfirmStatus = e.applyConfirmStatus;
  210. if (this.peopleConfirmStatus == 0) {
  211. this.current = 0;
  212. this.getData1();
  213. } else if (this.peopleConfirmStatus == 1 && this.applyConfirmStatus == 0) {
  214. this.current = 1;
  215. this.getData2();
  216. }
  217. }
  218. //人脸认证回调
  219. uni.$on('face', res => {
  220. if (res) {
  221. this.confirmFn()
  222. }
  223. })
  224. },
  225. methods: {
  226. confirmFn() {
  227. if (this.current == 0) {
  228. this.http.request({
  229. url: '/level-one-server/app/TbOrder/confirmOrder',
  230. method: 'POST',
  231. data: {
  232. orderId: this.item.id
  233. },
  234. success: res => {
  235. uni.showToast({
  236. title: '订单确认成功'
  237. });
  238. this.current = 1;
  239. uni.setNavigationBarTitle({
  240. title: '互助委托确认'
  241. });
  242. this.getData2();
  243. }
  244. });
  245. }
  246. if (this.current == 1) {
  247. this.http.request({
  248. url: '/level-one-server/app/TbOrder/applyOrder',
  249. method: 'POST',
  250. data: {
  251. orderId: this.orderId
  252. },
  253. success: res => {
  254. uni.showToast({
  255. title: '进口申报确认成功'
  256. });
  257. setTimeout(() => {
  258. uni.switchTab({
  259. url: '/pages/index/index'
  260. });
  261. }, 1000);
  262. }
  263. });
  264. }
  265. },
  266. getData1() {
  267. this.http.request({
  268. url: '/level-one-server/app/TbOrder/orderDetail',
  269. data: {
  270. orderId: this.orderId
  271. },
  272. success: res => {
  273. this.item = res.data.data;
  274. }
  275. });
  276. },
  277. getData2() {
  278. this.http.request({
  279. url: '/level-one-server/app/TbImportOrder/importOrderDetail',
  280. data: {
  281. orderId: this.orderId
  282. },
  283. success: res => {
  284. this.item2 = res.data.data;
  285. JSON.parse(this.item2.cooperEntrustImg).map(item => this.imgList.push(item))
  286. console.log("-----5-----" + this.imgList)
  287. }
  288. });
  289. },
  290. ok() {
  291. let user = this.getUser();
  292. if (user.wallet <= 0) {
  293. uni.showModal({
  294. title: '提示',
  295. content: '剩余服务点数不足,请先充值!',
  296. success: function(res) {
  297. if (res.confirm) {
  298. uni.navigateTo({
  299. url:'/pages/wallet/wallet'
  300. })
  301. } else if (res.cancel) {
  302. console.log('用户点击取消');
  303. }
  304. }
  305. })
  306. return;
  307. }
  308. //根据不同的步骤提交不同的url或者状态参数
  309. if (this.current == 0) {
  310. uni.showModal({
  311. title: '提示',
  312. content: '我已核对信息无误',
  313. success: res => {
  314. if (res.confirm) {
  315. //return;
  316. //跳转到人脸认证
  317. uni.navigateTo({
  318. url: '/pages/face/faceRegister?type=2'
  319. })
  320. }
  321. }
  322. });
  323. }
  324. if (this.current == 1) {
  325. //进口确认不用刷脸
  326. uni.showModal({
  327. title: '提示',
  328. content: '我已核对信息无误',
  329. success: res => {
  330. if (res.confirm) {
  331. //return;
  332. //跳转到人脸认证
  333. this.confirmFn();
  334. //uni.navigateTo({url:'/pages/face/faceRegister?type=2'})
  335. }
  336. }
  337. });
  338. }
  339. }
  340. },
  341. destroyed() {
  342. uni.$off('face');
  343. }
  344. };
  345. </script>
  346. <style lang="scss">
  347. page {
  348. background-color: $pg;
  349. }
  350. .cmain {
  351. padding-bottom: 100px;
  352. }
  353. .expand {
  354. overflow: hidden;
  355. }
  356. .more {
  357. text-align: center;
  358. padding: 10px 10px 15px 10px;
  359. .icon {
  360. padding-right: 3px;
  361. }
  362. }
  363. .ctt {
  364. text-align: center;
  365. font-weight: bold;
  366. }
  367. </style>