index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template>
  2. <view style="background-color: #f2f2f6;padding-bottom: 0.01rpx;">
  3. <view style="background-color: #fff;position: fixed;top: 0;width: 100%;z-index: 8;">
  4. <view
  5. style="background-color:#E75F37;padding: 24rpx 32rpx;display: flex;justify-content: space-between;align-items: center;">
  6. <u-search placeholder="请输入商品名" v-model="cname" @custom="custom" @search="custom" :showAction="false"
  7. bgColor="#fff"></u-search>
  8. </view>
  9. <u-tabs :list="list" :current="current" lineColor="#E75F37" @click="sectionChange"></u-tabs>
  10. </view>
  11. <view style="margin-top: 180rpx;">
  12. <view class="card" v-for="(item,index) in dataList" :key="index" @click="choice(item,index)">
  13. <view>
  14. <view
  15. style="font-size: 26rpx;color: #717171;margin-bottom: 28rpx;display: flex;justify-content: space-between;">
  16. <view class="">
  17. {{item.salesCompanyName}}
  18. </view>
  19. <view style="color: #E75F37;">
  20. {{item.xcxStatus=='录入'?'待付款':item.xcxStatus || ''}}
  21. </view>
  22. </view>
  23. <view>
  24. <view style="display: flex;" v-for="(ite,inde) in item.orderItemsList" :key="inde">
  25. <view style="display: flex;width: 100%;align-items: center;margin-bottom: 20rpx;">
  26. <image :src="ite.url" mode="scaleToFill"
  27. style="width:120rpx;height: 120rpx;border-radius: 10rpx;border: 2rpx solid #EEEEEE;margin-right: 27rpx;">
  28. </image>
  29. <view style="width:477rpx;">
  30. <view
  31. style="display: flex;justify-content: space-between;align-items: center;font-size: 26rpx;color: #4E4E4E;font-weight: 500;">
  32. <u--text color="#4E4E4E" size="26rpx" :lines="1"
  33. :text="ite.goodsName"></u--text>
  34. <view>
  35. ¥{{ite.price}}
  36. </view>
  37. </view>
  38. <view style="display: flex;justify-content:flex-end;margin-top: 20rpx;">
  39. <view style="font-size: 26rpx;color: #4D4D4D;">
  40. x{{ite.goodsNum}}
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <!-- <view style="display: flex;justify-content: flex-end;">
  48. <view style="width: 136rpx;margin-right: 17rpx;">
  49. <u-button type="primary" text="取消订单" color="#E75F37" shape='circle' plain
  50. @click="deleteGoods(item.id)"></u-button>
  51. </view>
  52. <view style="width: 136rpx;">
  53. <u-button type="primary" text="去支付" color="#E75F37" shape='circle'
  54. @click="paySubmit(item,index,ind)"></u-button>
  55. </view>
  56. </view> -->
  57. <view style="width: 623rpx;height: 2rpx;background: #F1F1F1;margin: 48rpx 0 40rpx 0;">
  58. </view>
  59. <view style="font-size: 26rpx;color: #717171;">
  60. <view style="margin-bottom: 20rx;">
  61. 订单编号:<text style="color: #C4C4C4;">{{item.ordNo}}</text>
  62. </view>
  63. <view style="margin-bottom: 20rx;">
  64. 支付方式:<text style="color: #C4C4C4;">
  65. <!-- {{item.payType && item.payType.indexOf('01') != -1?'扫码支付':'微信支付'}}-->
  66. {{ item.receivableType ? item.receivableType : '' }}
  67. </text>
  68. </view>
  69. <view>
  70. 下单时间:<text style="color: #C4C4C4;">{{item.createTime}}</text>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <u-empty v-if="page.total == 0" style="position: absolute;top: 45%;left: 50%;transform:translate(-50%,-50%)"
  77. mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
  78. <u-loadmore v-if="page.total !== 0 && dataList.length != 0" :status="status" />
  79. </view>
  80. </template>
  81. <script>
  82. import {
  83. appStatusList,
  84. appStatusShareList
  85. } from '@/api/views/salesSlip/index.js'
  86. export default {
  87. data() {
  88. return {
  89. current: 0,
  90. cname: "",
  91. list: [{
  92. name: '全部',
  93. status: '',
  94. badge: {
  95. value: 0
  96. }
  97. }
  98. // , {
  99. // name: '未付款',
  100. // status: '未付款',
  101. // badge: {
  102. // value: 0
  103. // }
  104. // }
  105. , {
  106. name: '待发货',
  107. status: '待发货',
  108. badge: {
  109. value: 0
  110. }
  111. }, {
  112. name: '待收货',
  113. status: '待收货',
  114. badge: {
  115. value: 0
  116. }
  117. }, {
  118. name: '已收货',
  119. status: '已收货',
  120. badge: {
  121. value: 0
  122. }
  123. }, {
  124. name: '退款售后',
  125. status: '退款请核,退款中,已取消',
  126. badge: {
  127. value: 0
  128. }
  129. }
  130. ],
  131. dataList: [],
  132. search: {},
  133. page: {
  134. total: 0,
  135. size: 10,
  136. current: 1
  137. },
  138. status: 'loadmore',
  139. }
  140. },
  141. onLoad(onLoad) {
  142. for (let i in this.list) {
  143. if (onLoad.text == this.list[i].name) {
  144. this.current = i
  145. }
  146. }
  147. this.page = {
  148. total: 0,
  149. size: 10,
  150. current: 1
  151. }
  152. this.search = {
  153. xcxStatus: this.list[this.current].status
  154. }
  155. this.dataList = []
  156. this.onSearch()
  157. },
  158. onReachBottom() {
  159. this.status = 'loading'
  160. if (this.dataList.length < this.page.total) {
  161. this.page.current++
  162. this.onSearch()
  163. } else {
  164. this.status = 'nomore'
  165. }
  166. },
  167. methods: {
  168. sectionChange(item) {
  169. this.current = item.index;
  170. this.search = {
  171. xcxStatus: this.list[item.index].name == "全部" ? "" : this.list[item.index].status
  172. }
  173. this.page = {
  174. total: 0,
  175. size: 10,
  176. current: 1
  177. }
  178. this.dataList = []
  179. this.onSearch()
  180. },
  181. onSearch() {
  182. uni.showLoading({
  183. title: '加载中',
  184. mask: true
  185. });
  186. if (uni.getStorageSync('whether_openShare') == 1) {
  187. appStatusShareList({
  188. size: this.page.size,
  189. current: this.page.current,
  190. ...this.search
  191. }).then(res => {
  192. this.dataList = this.dataList.concat(res.data.records)
  193. this.page.total = res.data.total
  194. if (this.dataList.length == res.data.total) {
  195. this.status = 'nomore'
  196. }
  197. uni.hideLoading();
  198. }).catch(err => {
  199. uni.hideLoading();
  200. })
  201. } else {
  202. appStatusList({
  203. size: this.page.size,
  204. current: this.page.current,
  205. ...this.search
  206. }).then(res => {
  207. this.dataList = this.dataList.concat(res.data.records)
  208. this.page.total = res.data.total
  209. if (this.dataList.length == res.data.total) {
  210. this.status = 'nomore'
  211. }
  212. uni.hideLoading();
  213. }).catch(err => {
  214. uni.hideLoading();
  215. })
  216. }
  217. },
  218. //搜索
  219. custom() {
  220. this.page = {
  221. total: 0,
  222. size: 10,
  223. current: 1
  224. }
  225. this.search = {
  226. retrieval: this.cname
  227. }
  228. this.dataList = []
  229. this.onSearch()
  230. },
  231. choice(item, index) {
  232. uni.$u.route('/pages/views/salesSlip/orderDetails', {
  233. id: item.id
  234. });
  235. }
  236. }
  237. }
  238. </script>
  239. <style lang="scss" scoped>
  240. .contentBox {
  241. width: 96%;
  242. margin: 20rpx auto;
  243. background-color: #FFFFFF;
  244. border-radius: 20rpx;
  245. /* box-shadow: 0 5rpx 14rpx 0 rgba(101, 176, 249, 0.42); */
  246. padding-top: 15rpx;
  247. padding-bottom: 10rpx;
  248. }
  249. .textBox {
  250. padding: 0 15px;
  251. display: flex;
  252. justify-content: space-between;
  253. font-size: 24rpx;
  254. margin-bottom: 10rpx;
  255. align-items: flex-end;
  256. }
  257. .card {
  258. padding: 54rpx 63rpx;
  259. background-color: #fff;
  260. margin-bottom: 20rpx;
  261. ::v-deep .u-button {
  262. height: 60rpx;
  263. }
  264. }
  265. </style>