index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. <template>
  2. <view>
  3. <!-- 选择业务类型 -->
  4. <u-action-sheet :list="billTypeList" :tips="{text: '请选择业务类型',color: '#2979ff',fontSize: 36}" v-model="opengShow" :mask-close-able="false" :cancel-btn="false" @click="actionSheet"/>
  5. <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"/>
  6. <!-- 时间选择组件 -->
  7. <u-calendar v-model="show" max-date="2050" mode="range" :closeable="false" :mask-close-able="false" @change="changeTwo" />
  8. <!-- 状态选择组件 -->
  9. <u-action-sheet :list="listData" v-model="showTwo" :mask-close-able="false" @click="click" @close="close" />
  10. <view v-for="(item,index) in dataList" :key="index" style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 10rpx auto;padding-top: 10rpx;">
  11. <span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
  12. <h4 style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">
  13. {{item.audit}}
  14. </h4>
  15. <view style="width: 90%;margin: 0 auto;">
  16. <view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;border-bottom: 1rpx solid #eff4ff;">
  17. <h4>{{item.type == '仓库'? '提单号:'+item.fmblno :'系统编号:'+item.refno3}}</h4>
  18. </view>
  19. <view v-if="item.type == '仓库'">
  20. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  21. <view style="float: left;">项目名称</view>
  22. <view style="float: right;">{{item.actName}}</view>
  23. </view>
  24. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  25. <view style="float: left;">贸易方式</view>
  26. <view style="float: right;">{{item.ftrademodeid}}</view>
  27. </view>
  28. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  29. <view style="float: left;">商品名称</view>
  30. <view style="float: right;">{{item.goodsName}}</view>
  31. </view>
  32. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  33. <view style="float: left;">仓库名称</view>
  34. <view style="float: right;">{{item.warehouseName}}</view>
  35. </view>
  36. </view>
  37. <view v-else>
  38. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  39. <view style="float: left;">供应商</view>
  40. <view style="float: right;">{{item.refno1}}</view>
  41. </view>
  42. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  43. <view style="float: left;">提货日期</view>
  44. <view style="float: right;">{{item.fBsdate}}</view>
  45. </view>
  46. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  47. <view style="float: left;">项目名称</view>
  48. <view style="float: right;">{{item.projectName}}</view>
  49. </view>
  50. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  51. <view style="float: left;">申请人</view>
  52. <view style="float: right;">{{item.nickName}}</view>
  53. </view>
  54. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  55. <view style="float: left;">申请日期</view>
  56. <view style="float: right;">
  57. {{item.sendTime ? item.sendTime.slice(0,10) : item.sendTime}}
  58. </view>
  59. </view>
  60. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  61. <view style="float: left;">审核人</view>
  62. <view style="float: right;">{{item.nickName}}</view>
  63. </view>
  64. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  65. <view style="float: left;">审核日期</view>
  66. <view style="float: right;">
  67. {{item.auditOpTime ? item.auditOpTime.slice(0,10) : item.auditOpTime}}
  68. </view>
  69. </view>
  70. </view>
  71. <view
  72. style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;"
  73. @click="expenseDetails(item)">
  74. <view style="float: left;">
  75. <h3>立即审核业务</h3>
  76. </view>
  77. <view style="float: right;">
  78. <u-icon name="arrow-right"></u-icon>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  84. </view>
  85. </template>
  86. <script>
  87. export default {
  88. data() {
  89. return {
  90. opengShow: true,
  91. status: 'loadmore',
  92. iconType: 'flower',
  93. total: 0,
  94. billTypeList: [{
  95. text: '入库',
  96. value: 'SJRK'
  97. }, {
  98. text: '出库',
  99. value: 'SJCK'
  100. }, {
  101. text: '调拨',
  102. value: 'CKDB'
  103. }, {
  104. text: '货转',
  105. value: 'HQZY'
  106. }],
  107. loadText: {
  108. loadmore: '轻轻上拉',
  109. loading: '努力加载中',
  110. nomore: '实在没有了'
  111. },
  112. dataList: [],
  113. listData: [{
  114. text: '全部',
  115. value: null
  116. }, {
  117. text: '提交',
  118. value: '0'
  119. }, {
  120. text: '待审',
  121. value: 'S'
  122. }, {
  123. text: '审核退回',
  124. value: 'B'
  125. }, {
  126. text: '审核通过',
  127. value: 'A'
  128. }],
  129. showTwo: false,
  130. show: false,
  131. billType: '',
  132. list: [{
  133. name: '待审核'
  134. }, {
  135. name: this.type = '仓库' ? '申请时间' : '提货时间'
  136. }, {
  137. name: '状态'
  138. }, {
  139. name: '业务类型'
  140. }],
  141. current: 0,
  142. form: {
  143. //安品默认传
  144. // refno2: 'SQ',
  145. auditStatus: 'S',
  146. pageNum: 1,
  147. pageSize: 10
  148. },
  149. type: '',
  150. }
  151. },
  152. onShow() {
  153. this.form = {
  154. //安品默认传
  155. // refno2: 'SQ',
  156. auditStatus: 'S',
  157. pageNum: 1,
  158. pageSize: 10
  159. }
  160. this.dataList = []
  161. this.queryAudit()
  162. },
  163. onReachBottom() {
  164. this.status = 'loading'
  165. if (this.dataList.length < this.total) {
  166. this.form.pageNum++
  167. this.queryAudit()
  168. } else {
  169. this.status = 'nomore'
  170. }
  171. },
  172. methods: {
  173. actionSheet(index) {
  174. this.current = null
  175. this.billType = this.billTypeList[index].value
  176. this.dataList = []
  177. this.queryAudit()
  178. },
  179. change(index) {
  180. this.current = index
  181. console.log(index)
  182. if (index == 1) {
  183. this.show = true
  184. } else if (index == 2) {
  185. this.showTwo = true
  186. } else if (index == 3) {
  187. this.opengShow = true
  188. } else {
  189. this.form = {
  190. // 安品默认传
  191. // refno2: 'SQ',
  192. auditStatus: 'S',
  193. pageNum: 1,
  194. pageSize: 10
  195. }
  196. this.dataList = []
  197. this.queryAudit(false)
  198. }
  199. },
  200. changeTwo(e) {
  201. // console.log(e);
  202. this.current = null
  203. let data = [e.startDate, e.endDate]
  204. if (this.type = '仓库') {
  205. this.form = {
  206. pageNum: 1,
  207. pageSize: 10,
  208. sendTimeInterval: data
  209. }
  210. } else {
  211. this.form = {
  212. refno2: 'SQ',
  213. pageNum: 1,
  214. pageSize: 10,
  215. sendTimeList: data
  216. }
  217. }
  218. this.dataList = []
  219. this.queryAudit()
  220. },
  221. click(index) {
  222. this.form = {
  223. // refno2: 'SQ',
  224. pageNum: 1,
  225. pageSize: 10,
  226. auditStatus: this.listData[index].value
  227. }
  228. this.dataList = []
  229. this.queryAudit()
  230. this.current = null
  231. },
  232. close() {
  233. this.current = null
  234. },
  235. queryAudit(e) {
  236. // if(e == false) this.current = null
  237. // console.log(this.form)
  238. if (this.billType) this.form.billType = this.billType
  239. this.$u.get('/warehouse/paths/selectOrderAuditItems', this.form).then(res => {
  240. this.total = res.total
  241. if (res.rows) {
  242. this.dataList = this.dataList.concat(res.rows)
  243. this.type = '仓库'
  244. } else {
  245. res.data.map((e) => {
  246. if (e.sendTime) {
  247. e.sendTime = e.sendTime.slice(0, 10);
  248. }
  249. if (e.refno2) {
  250. switch (e.refno2) {
  251. case "SJRK": {
  252. e.refno2 = "入库"
  253. break;
  254. }
  255. case "SJCK": {
  256. e.refno2 = "出库"
  257. break;
  258. }
  259. case "HQZY": {
  260. e.refno2 = "货转"
  261. break;
  262. }
  263. case "CKDB": {
  264. e.refno2 = "调拨"
  265. break;
  266. }
  267. case "HWTG": {
  268. e.refno2 = "货物通关"
  269. break;
  270. }
  271. case "JSCCF": {
  272. e.refno2 = "计算仓储费"
  273. break;
  274. }
  275. case "CCF": {
  276. e.refno2 = "仓储费"
  277. break;
  278. }
  279. case "ZYF": {
  280. e.refno2 = "作业费"
  281. break;
  282. }
  283. case "SF": {
  284. e.refno2 = "收费"
  285. break;
  286. }
  287. case "DZ": {
  288. e.refno2 = "对账"
  289. break;
  290. }
  291. case "FF": {
  292. e.refno2 = "付费"
  293. break;
  294. }
  295. case "SE": {
  296. e.refno2 = "下单配船"
  297. break;
  298. }
  299. case "ApplyFP": {
  300. e.refno2 = "凯合开票申请"
  301. break;
  302. }
  303. case "KHDZ": {
  304. e.refno2 = "凯合对账"
  305. break;
  306. }
  307. case "KHSF": {
  308. e.refno2 = "凯合收费"
  309. break;
  310. }
  311. case "KHFF": {
  312. e.refno2 = "凯合付费"
  313. break;
  314. }
  315. case "KHDD": {
  316. e.refno2 = "凯合订单"
  317. break;
  318. }
  319. case "XS": {
  320. e.refno2 = "销售出库"
  321. break;
  322. }
  323. case "SQ": {
  324. e.refno2 = "采购申请"
  325. break;
  326. }
  327. case "XMGL": {
  328. e.refno2 = "项目管理"
  329. break;
  330. }
  331. default: {
  332. return uni.showToast({
  333. icon: 'none',
  334. title: '未知错误,无状态',
  335. position: "center"
  336. })
  337. }
  338. }
  339. }
  340. })
  341. this.dataList = res.data
  342. }
  343. })
  344. },
  345. expenseDetails(item) {
  346. console.log(item)
  347. switch (item.refno4) {
  348. case 'SQ':
  349. this.$u.route('/pages/home/procurementApplicationApproval/detailsOrUpdates', {
  350. form: JSON.stringify(item),
  351. toExamine: JSON.stringify(true)
  352. });
  353. break
  354. case 'SJRK':
  355. this.$u.route('/pages/home/allReview/index', {
  356. form: JSON.stringify(item)
  357. });
  358. break
  359. case 'SJCK':
  360. this.$u.route('/pages/home/allReview/index', {
  361. form: JSON.stringify(item)
  362. });
  363. break
  364. case 'HQZY':
  365. this.$u.route('/pages/home/allReview/index', {
  366. form: JSON.stringify(item)
  367. });
  368. break
  369. case 'CKDB':
  370. this.$u.route('/pages/home/allReview/index', {
  371. form: JSON.stringify(item)
  372. });
  373. break
  374. default:
  375. return uni.showToast({
  376. icon: 'none',
  377. title: '该单据暂不能在APP上审核',
  378. position: "center"
  379. })
  380. break
  381. }
  382. }
  383. }
  384. }
  385. </script>
  386. <style scoped lang="scss">
  387. </style>