index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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. <u-popup v-model="screenOpen" z-index="10074" @close="closeScreen" mode="bottom" length="60%" border-radius="40" :closeable="true">
  85. <view>
  86. <view style="text-align: center;height: 100rpx;line-height: 100rpx;">
  87. <text style="font-weight: bold;font-size: 32rpx;">全部筛选</text>
  88. </view>
  89. <view style="width: 96%;margin: 0 auto;">
  90. <u-field style="padding: 10px 0px;" v-model="fCorpid.label" v-if="deptName != '外部用户'" label="货主名称:" placeholder="请选择货主名称" disabled @click="client = true"/>
  91. <u-field style="padding: 10px 0px;" v-model="fShipper" label="发货单位:" placeholder="请输入发货单位"/>
  92. <u-field style="padding: 10px 0px;" v-model="billTypeName" label="业务类型:" placeholder="请选择业务类型" disabled @click="opengShow = true"/>
  93. <u-field
  94. style="margin: 20rpx auto;padding: 10px 0px;"
  95. v-model="dataTime"
  96. label="申请时间:"
  97. placeholder="请选择申请时间"
  98. disabled
  99. @click="show = true"
  100. />
  101. <u-field
  102. style="margin: 20rpx auto;padding: 10px 0px;"
  103. v-model="auditName"
  104. label="单据状态:"
  105. placeholder="请选择单据状态"
  106. disabled
  107. @click="showTwo = true"
  108. />
  109. <view style="width: 100%;height: 120rpx;"></view>
  110. <view style="width: 100%;position:fixed;bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;z-index: 9999;">
  111. <u-button type="warning" @click="confirmReset" size="medium" style="float: left;">确认重置</u-button>
  112. <u-button type="primary" @click="confirmCompletion" size="medium" style="float: right;">确认完成</u-button>
  113. </view>
  114. </view>
  115. </view>
  116. </u-popup>
  117. <u-toast ref="uToast"/>
  118. <u-select v-model="client" :list="clientList" @confirm="confirmClient" @cancel="client = false"></u-select>
  119. </view>
  120. </template>
  121. <script>
  122. export default {
  123. data() {
  124. return {
  125. opengShow: true,
  126. client: false,
  127. screenOpen: false,
  128. deptName:'',
  129. clientList:[],
  130. dataTime:'',
  131. fShipper:'',
  132. fCorpid:{
  133. value: '',
  134. label: ''
  135. },
  136. status: 'loadmore',
  137. iconType: 'flower',
  138. total: 0,
  139. billTypeList: [{
  140. text: '入库',
  141. value: 'SJRK'
  142. }, {
  143. text: '出库',
  144. value: 'SJCK'
  145. }, {
  146. text: '调拨',
  147. value: 'CKDB'
  148. }, {
  149. text: '货转',
  150. value: 'HQZY'
  151. }],
  152. loadText: {
  153. loadmore: '轻轻上拉',
  154. loading: '努力加载中',
  155. nomore: '实在没有了'
  156. },
  157. dataList: [],
  158. listData: [{
  159. text: '全部',
  160. value: null
  161. }, {
  162. text: '提交',
  163. value: '0'
  164. }, {
  165. text: '待审',
  166. value: 'S'
  167. }, {
  168. text: '审核退回',
  169. value: 'B'
  170. }, {
  171. text: '审核通过',
  172. value: 'A'
  173. }],
  174. showTwo: false,
  175. show: false,
  176. billType: '',
  177. list: [{
  178. name: '待审核'
  179. }, {
  180. name: this.type = '仓库' ? '申请时间' : '提货时间'
  181. }, {
  182. name: '状态'
  183. }, {
  184. name: '业务类型'
  185. }, {
  186. name: '筛选'
  187. }],
  188. current: 0,
  189. form: {
  190. //安品默认传
  191. // refno2: 'SQ',
  192. auditStatus: 'S',
  193. pageNum: 1,
  194. pageSize: 10
  195. },
  196. type: '',
  197. auditName:'',
  198. auditStatus:'',
  199. billTypeName:'',
  200. billTypeId:'',
  201. }
  202. },
  203. onShow() {
  204. this.clientList = []
  205. this.$u.get('/basicdata/corps/list').then(res=>{
  206. for(let item in res.rows){
  207. this.clientList.push({
  208. value: res.rows[item].fId,
  209. label: res.rows[item].fName
  210. })
  211. }
  212. })
  213. this.form = {
  214. //安品默认传
  215. // refno2: 'SQ',
  216. // auditStatus: 'S',
  217. pageNum: 1,
  218. pageSize: 10
  219. }
  220. if(this.$u.http.config.baseUrl == 'https://ap.tubaosoft.com/prod-api'){
  221. this.form.refno2 = 'SQ'
  222. }else{
  223. this.form.auditStatus = 'S'
  224. }
  225. this.dataList = []
  226. this.queryAudit()
  227. },
  228. onReachBottom() {
  229. this.status = 'loading'
  230. if (this.dataList.length < this.total) {
  231. this.form.pageNum++
  232. this.queryAudit()
  233. } else {
  234. this.status = 'nomore'
  235. }
  236. },
  237. created() {
  238. this.deptName = uni.getStorageSync('deptName')
  239. },
  240. methods: {
  241. //确认货主
  242. confirmClient(e){
  243. this.fCorpid.value = e[0].value
  244. this.fCorpid.label = e[0].label
  245. },
  246. confirmCompletion(){
  247. this.form = {
  248. pageNum: 1,
  249. pageSize: 10,
  250. fShipper:this.fShipper
  251. }
  252. if(this.billTypeId)this.form.billType = this.billTypeId
  253. if(this.dataTime)this.form.sendTimeInterval = this.dataTime
  254. if(this.auditStatus)this.form.auditStatus = this.auditStatus
  255. if(!this.form.billType)return this.$refs.uToast.show({
  256. title: '请选择业务类型',
  257. position:'bottom'
  258. })
  259. if(this.fCorpid.value) this.form.fCorpid = this.fCorpid.value
  260. this.dataList = []
  261. this.screenOpen = false
  262. this.current = null
  263. this.queryAudit()
  264. },
  265. //弹出框收起触发
  266. closeScreen(){
  267. this.screenOpen = false
  268. },
  269. confirmReset(){
  270. this.dataTime = ''
  271. this.auditName = ''
  272. this.billTypeName = ''
  273. this.fShipper = ''
  274. this.fCorpid = {
  275. value: '',
  276. label: ''
  277. }
  278. },
  279. actionSheet(index) {
  280. if(this.screenOpen == true){
  281. this.billTypeName = this.billTypeList[index].text
  282. this.billTypeId = this.billTypeList[index].value
  283. }else{
  284. this.current = null
  285. this.form = {
  286. pageNum: 1,
  287. pageSize: 10,
  288. billType: this.billTypeList[index].value
  289. }
  290. this.dataList = []
  291. this.queryAudit()
  292. }
  293. },
  294. change(index) {
  295. this.current = index
  296. console.log(index)
  297. if (index == 1) {
  298. this.show = true
  299. } else if (index == 2) {
  300. this.showTwo = true
  301. } else if (index == 3) {
  302. this.opengShow = true
  303. } else if(index == 4){
  304. this.screenOpen = true
  305. } else {
  306. this.form = {
  307. // 安品默认传
  308. // refno2: 'SQ',
  309. // auditStatus: 'S',
  310. pageNum: 1,
  311. pageSize: 10
  312. }
  313. if(this.$u.http.config.baseUrl == 'https://ap.tubaosoft.com/prod-api'){
  314. this.form.refno2 = 'SQ'
  315. }else{
  316. this.form.auditStatus = 'S'
  317. }
  318. this.dataList = []
  319. this.queryAudit(false)
  320. }
  321. },
  322. changeTwo(e) {
  323. // console.log(e);
  324. if(this.screenOpen == true){
  325. this.dataTime =e.startDate+','+e.endDate
  326. }else{
  327. this.current = null
  328. let data = [e.startDate, e.endDate]
  329. if (this.type = '仓库') {
  330. this.form = {
  331. pageNum: 1,
  332. pageSize: 10,
  333. sendTimeInterval: data
  334. }
  335. } else {
  336. this.form = {
  337. refno2: 'SQ',
  338. pageNum: 1,
  339. pageSize: 10,
  340. sendTimeList: data
  341. }
  342. }
  343. this.dataList = []
  344. this.queryAudit()
  345. }
  346. },
  347. click(index) {
  348. if(this.screenOpen == true){
  349. this.auditName = this.listData[index].text
  350. this.auditStatus = this.listData[index].value
  351. }else{
  352. this.form = {
  353. // refno2: 'SQ',
  354. pageNum: 1,
  355. pageSize: 10,
  356. auditStatus: this.listData[index].value
  357. }
  358. this.dataList = []
  359. this.queryAudit()
  360. this.current = null
  361. }
  362. },
  363. close() {
  364. this.current = null
  365. },
  366. queryAudit(e) {
  367. // if(e == false) this.current = null
  368. // console.log(this.form)
  369. if (this.billType) this.form.billType = this.billType
  370. this.$u.get('/warehouse/paths/selectOrderAuditItems', this.form).then(res => {
  371. this.total = res.total
  372. if (res.rows) {
  373. this.dataList = this.dataList.concat(res.rows)
  374. this.type = '仓库'
  375. } else {
  376. res.data.map((e) => {
  377. if (e.sendTime) {
  378. e.sendTime = e.sendTime.slice(0, 10);
  379. }
  380. if (e.refno2) {
  381. switch (e.refno2) {
  382. case "SJRK": {
  383. e.refno2 = "入库"
  384. break;
  385. }
  386. case "SJCK": {
  387. e.refno2 = "出库"
  388. break;
  389. }
  390. case "HQZY": {
  391. e.refno2 = "货转"
  392. break;
  393. }
  394. case "CKDB": {
  395. e.refno2 = "调拨"
  396. break;
  397. }
  398. case "HWTG": {
  399. e.refno2 = "货物通关"
  400. break;
  401. }
  402. case "JSCCF": {
  403. e.refno2 = "计算仓储费"
  404. break;
  405. }
  406. case "CCF": {
  407. e.refno2 = "仓储费"
  408. break;
  409. }
  410. case "ZYF": {
  411. e.refno2 = "作业费"
  412. break;
  413. }
  414. case "SF": {
  415. e.refno2 = "收费"
  416. break;
  417. }
  418. case "DZ": {
  419. e.refno2 = "对账"
  420. break;
  421. }
  422. case "FF": {
  423. e.refno2 = "付费"
  424. break;
  425. }
  426. case "SE": {
  427. e.refno2 = "下单配船"
  428. break;
  429. }
  430. case "ApplyFP": {
  431. e.refno2 = "凯合开票申请"
  432. break;
  433. }
  434. case "KHDZ": {
  435. e.refno2 = "凯合对账"
  436. break;
  437. }
  438. case "KHSF": {
  439. e.refno2 = "凯合收费"
  440. break;
  441. }
  442. case "KHFF": {
  443. e.refno2 = "凯合付费"
  444. break;
  445. }
  446. case "KHDD": {
  447. e.refno2 = "凯合订单"
  448. break;
  449. }
  450. case "XS": {
  451. e.refno2 = "销售出库"
  452. break;
  453. }
  454. case "SQ": {
  455. e.refno2 = "采购申请"
  456. break;
  457. }
  458. case "XMGL": {
  459. e.refno2 = "项目管理"
  460. break;
  461. }
  462. default: {
  463. return uni.showToast({
  464. icon: 'none',
  465. title: '未知错误,无状态',
  466. position: "center"
  467. })
  468. }
  469. }
  470. }
  471. })
  472. this.dataList = res.data
  473. }
  474. })
  475. },
  476. expenseDetails(item) {
  477. console.log(item)
  478. switch (item.refno4) {
  479. case 'SQ':
  480. this.$u.route('/pages/home/procurementApplicationApproval/detailsOrUpdates', {
  481. form: JSON.stringify(item),
  482. toExamine: JSON.stringify(true)
  483. });
  484. break
  485. case 'SJRK':
  486. this.$u.route('/pages/home/allReview/index', {
  487. form: JSON.stringify(item)
  488. });
  489. break
  490. case 'SJCK':
  491. this.$u.route('/pages/home/allReview/index', {
  492. form: JSON.stringify(item)
  493. });
  494. break
  495. case 'HQZY':
  496. this.$u.route('/pages/home/allReview/index', {
  497. form: JSON.stringify(item)
  498. });
  499. break
  500. case 'CKDB':
  501. this.$u.route('/pages/home/allReview/index', {
  502. form: JSON.stringify(item)
  503. });
  504. break
  505. default:
  506. return uni.showToast({
  507. icon: 'none',
  508. title: '该单据暂不能在APP上审核',
  509. position: "center"
  510. })
  511. break
  512. }
  513. }
  514. }
  515. }
  516. </script>
  517. <style scoped lang="scss">
  518. </style>