123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521 |
- <template>
- <view>
- <!-- 选择业务类型 -->
- <u-action-sheet :list="billTypeList" :tips="{text: '请选择业务类型',color: '#2979ff',fontSize: 36}" v-model="opengShow" :mask-close-able="false" :cancel-btn="false" @click="actionSheet"/>
- <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"/>
- <!-- 时间选择组件 -->
- <u-calendar v-model="show" max-date="2050" mode="range" :closeable="false" :mask-close-able="false" @change="changeTwo" />
- <!-- 状态选择组件 -->
- <u-action-sheet :list="listData" v-model="showTwo" :mask-close-able="false" @click="click" @close="close" />
- <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;">
- <span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
- <h4 style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">
- {{item.audit}}
- </h4>
- <view style="width: 90%;margin: 0 auto;">
- <view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;border-bottom: 1rpx solid #eff4ff;">
- <h4>{{item.type == '仓库'? '提单号:'+item.fmblno :'系统编号:'+item.refno3}}</h4>
- </view>
- <view v-if="item.type == '仓库'">
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">项目名称</view>
- <view style="float: right;">{{item.actName}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">贸易方式</view>
- <view style="float: right;">{{item.ftrademodeid}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">商品名称</view>
- <view style="float: right;">{{item.goodsName}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">仓库名称</view>
- <view style="float: right;">{{item.warehouseName}}</view>
- </view>
- </view>
- <view v-else>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">供应商</view>
- <view style="float: right;">{{item.refno1}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">提货日期</view>
- <view style="float: right;">{{item.fBsdate}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">项目名称</view>
- <view style="float: right;">{{item.projectName}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">申请人</view>
- <view style="float: right;">{{item.nickName}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">申请日期</view>
- <view style="float: right;">
- {{item.sendTime ? item.sendTime.slice(0,10) : item.sendTime}}
- </view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">审核人</view>
- <view style="float: right;">{{item.nickName}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">审核日期</view>
- <view style="float: right;">
- {{item.auditOpTime ? item.auditOpTime.slice(0,10) : item.auditOpTime}}
- </view>
- </view>
- </view>
- <view
- style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;"
- @click="expenseDetails(item)">
- <view style="float: left;">
- <h3>立即审核业务</h3>
- </view>
- <view style="float: right;">
- <u-icon name="arrow-right"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
- <u-popup v-model="screenOpen" z-index="10074" @close="closeScreen" mode="bottom" length="60%" border-radius="40" :closeable="true">
- <view>
- <view style="text-align: center;height: 100rpx;line-height: 100rpx;">
- <text style="font-weight: bold;font-size: 32rpx;">全部筛选</text>
- </view>
- <view style="width: 96%;margin: 0 auto;">
- <u-field style="padding: 10px 0px;" v-model="fCorpid.label" v-if="deptName != '外部用户'" label="货主名称:" placeholder="请选择货主名称" disabled @click="client = true"/>
- <u-field style="padding: 10px 0px;" v-model="fShipper" label="发货单位:" placeholder="请输入发货单位"/>
- <u-field style="padding: 10px 0px;" v-model="billTypeName" label="业务类型:" placeholder="请选择业务类型" disabled @click="opengShow = true"/>
- <u-field
- style="margin: 20rpx auto;padding: 10px 0px;"
- v-model="dataTime"
- label="申请时间:"
- placeholder="请选择申请时间"
- disabled
- @click="show = true"
- />
- <u-field
- style="margin: 20rpx auto;padding: 10px 0px;"
- v-model="auditName"
- label="单据状态:"
- placeholder="请选择单据状态"
- disabled
- @click="showTwo = true"
- />
- <view style="width: 100%;height: 120rpx;"></view>
- <view style="width: 100%;position:fixed;bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;z-index: 9999;">
- <u-button type="warning" @click="confirmReset" size="medium" style="float: left;">确认重置</u-button>
- <u-button type="primary" @click="confirmCompletion" size="medium" style="float: right;">确认完成</u-button>
- </view>
- </view>
- </view>
- </u-popup>
- <u-toast ref="uToast"/>
- <u-select v-model="client" :list="clientList" @confirm="confirmClient" @cancel="client = false"></u-select>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- opengShow: true,
- client: false,
- screenOpen: false,
- deptName:'',
- clientList:[],
- dataTime:'',
- fShipper:'',
- fCorpid:{
- value: '',
- label: ''
- },
- status: 'loadmore',
- iconType: 'flower',
- total: 0,
- billTypeList: [{
- text: '入库',
- value: 'SJRK'
- }, {
- text: '出库',
- value: 'SJCK'
- }, {
- text: '调拨',
- value: 'CKDB'
- }, {
- text: '货转',
- value: 'HQZY'
- }],
- loadText: {
- loadmore: '轻轻上拉',
- loading: '努力加载中',
- nomore: '实在没有了'
- },
- dataList: [],
- listData: [{
- text: '全部',
- value: null
- }, {
- text: '提交',
- value: '0'
- }, {
- text: '待审',
- value: 'S'
- }, {
- text: '审核退回',
- value: 'B'
- }, {
- text: '审核通过',
- value: 'A'
- }],
- showTwo: false,
- show: false,
- billType: '',
- list: [{
- name: '待审核'
- }, {
- name: this.type = '仓库' ? '申请时间' : '提货时间'
- }, {
- name: '状态'
- }, {
- name: '业务类型'
- }, {
- name: '筛选'
- }],
- current: 0,
- form: {
- //安品默认传
- // refno2: 'SQ',
- auditStatus: 'S',
- pageNum: 1,
- pageSize: 10
- },
- type: '',
- auditName:'',
- auditStatus:'',
- billTypeName:'',
- billTypeId:'',
- }
- },
- onShow() {
- this.clientList = []
- this.$u.get('/basicdata/corps/list').then(res=>{
- for(let item in res.rows){
- this.clientList.push({
- value: res.rows[item].fId,
- label: res.rows[item].fName
- })
- }
- })
- this.form = {
- //安品默认传
- // refno2: 'SQ',
- // auditStatus: 'S',
- pageNum: 1,
- pageSize: 10
- }
- if(this.$u.http.config.baseUrl == 'https://ap.tubaosoft.com/prod-api'){
- this.form.refno2 = 'SQ'
- }else{
- this.form.auditStatus = 'S'
- }
- this.dataList = []
- this.queryAudit()
- },
- onReachBottom() {
- this.status = 'loading'
- if (this.dataList.length < this.total) {
- this.form.pageNum++
- this.queryAudit()
- } else {
- this.status = 'nomore'
- }
- },
- created() {
- this.deptName = uni.getStorageSync('deptName')
- },
- methods: {
- //确认货主
- confirmClient(e){
- this.fCorpid.value = e[0].value
- this.fCorpid.label = e[0].label
- },
- confirmCompletion(){
- this.form = {
- pageNum: 1,
- pageSize: 10,
- fShipper:this.fShipper
- }
- if(this.billTypeId)this.form.billType = this.billTypeId
- if(this.dataTime)this.form.sendTimeInterval = this.dataTime
- if(this.auditStatus)this.form.auditStatus = this.auditStatus
- if(!this.form.billType)return this.$refs.uToast.show({
- title: '请选择业务类型',
- position:'bottom'
- })
- if(this.fCorpid.value) this.form.fCorpid = this.fCorpid.value
- this.dataList = []
- this.screenOpen = false
- this.current = null
- this.queryAudit()
- },
- //弹出框收起触发
- closeScreen(){
- this.screenOpen = false
- },
- confirmReset(){
- this.dataTime = ''
- this.auditName = ''
- this.billTypeName = ''
- this.fShipper = ''
- this.fCorpid = {
- value: '',
- label: ''
- }
- },
- actionSheet(index) {
- if(this.screenOpen == true){
- this.billTypeName = this.billTypeList[index].text
- this.billTypeId = this.billTypeList[index].value
- }else{
- this.current = null
- this.form = {
- pageNum: 1,
- pageSize: 10,
- billType: this.billTypeList[index].value
- }
- this.dataList = []
- this.queryAudit()
- }
- },
- change(index) {
- this.current = index
- console.log(index)
- if (index == 1) {
- this.show = true
- } else if (index == 2) {
- this.showTwo = true
- } else if (index == 3) {
- this.opengShow = true
- } else if(index == 4){
- this.screenOpen = true
- } else {
- this.form = {
- // 安品默认传
- // refno2: 'SQ',
- // auditStatus: 'S',
- pageNum: 1,
- pageSize: 10
- }
- if(this.$u.http.config.baseUrl == 'https://ap.tubaosoft.com/prod-api'){
- this.form.refno2 = 'SQ'
- }else{
- this.form.auditStatus = 'S'
- }
- this.dataList = []
- this.queryAudit(false)
- }
- },
- changeTwo(e) {
- // console.log(e);
- if(this.screenOpen == true){
- this.dataTime =e.startDate+','+e.endDate
- }else{
- this.current = null
- let data = [e.startDate, e.endDate]
- if (this.type = '仓库') {
- this.form = {
- pageNum: 1,
- pageSize: 10,
- sendTimeInterval: data
- }
- } else {
- this.form = {
- refno2: 'SQ',
- pageNum: 1,
- pageSize: 10,
- sendTimeList: data
- }
- }
- this.dataList = []
- this.queryAudit()
- }
- },
- click(index) {
- if(this.screenOpen == true){
- this.auditName = this.listData[index].text
- this.auditStatus = this.listData[index].value
- }else{
- this.form = {
- // refno2: 'SQ',
- pageNum: 1,
- pageSize: 10,
- auditStatus: this.listData[index].value
- }
- this.dataList = []
- this.queryAudit()
- this.current = null
- }
- },
- close() {
- this.current = null
- },
- queryAudit(e) {
- // if(e == false) this.current = null
- // console.log(this.form)
- if (this.billType) this.form.billType = this.billType
- this.$u.get('/warehouse/paths/selectOrderAuditItems', this.form).then(res => {
- this.total = res.total
- if (res.rows) {
- this.dataList = this.dataList.concat(res.rows)
- this.type = '仓库'
- } else {
- res.data.map((e) => {
- if (e.sendTime) {
- e.sendTime = e.sendTime.slice(0, 10);
- }
- if (e.refno2) {
- switch (e.refno2) {
- case "SJRK": {
- e.refno2 = "入库"
- break;
- }
- case "SJCK": {
- e.refno2 = "出库"
- break;
- }
- case "HQZY": {
- e.refno2 = "货转"
- break;
- }
- case "CKDB": {
- e.refno2 = "调拨"
- break;
- }
- case "HWTG": {
- e.refno2 = "货物通关"
- break;
- }
- case "JSCCF": {
- e.refno2 = "计算仓储费"
- break;
- }
- case "CCF": {
- e.refno2 = "仓储费"
- break;
- }
- case "ZYF": {
- e.refno2 = "作业费"
- break;
- }
- case "SF": {
- e.refno2 = "收费"
- break;
- }
- case "DZ": {
- e.refno2 = "对账"
- break;
- }
- case "FF": {
- e.refno2 = "付费"
- break;
- }
- case "SE": {
- e.refno2 = "下单配船"
- break;
- }
- case "ApplyFP": {
- e.refno2 = "凯合开票申请"
- break;
- }
- case "KHDZ": {
- e.refno2 = "凯合对账"
- break;
- }
- case "KHSF": {
- e.refno2 = "凯合收费"
- break;
- }
- case "KHFF": {
- e.refno2 = "凯合付费"
- break;
- }
- case "KHDD": {
- e.refno2 = "凯合订单"
- break;
- }
- case "XS": {
- e.refno2 = "销售出库"
- break;
- }
- case "SQ": {
- e.refno2 = "采购申请"
- break;
- }
- case "XMGL": {
- e.refno2 = "项目管理"
- break;
- }
- default: {
- return uni.showToast({
- icon: 'none',
- title: '未知错误,无状态',
- position: "center"
- })
- }
- }
- }
- })
- this.dataList = res.data
- }
- })
- },
- expenseDetails(item) {
- console.log(item)
- switch (item.refno4) {
- case 'SQ':
- this.$u.route('/pages/home/procurementApplicationApproval/detailsOrUpdates', {
- form: JSON.stringify(item),
- toExamine: JSON.stringify(true)
- });
- break
- case 'SJRK':
- this.$u.route('/pages/home/allReview/index', {
- form: JSON.stringify(item)
- });
- break
- case 'SJCK':
- this.$u.route('/pages/home/allReview/index', {
- form: JSON.stringify(item)
- });
- break
- case 'HQZY':
- this.$u.route('/pages/home/allReview/index', {
- form: JSON.stringify(item)
- });
- break
- case 'CKDB':
- this.$u.route('/pages/home/allReview/index', {
- form: JSON.stringify(item)
- });
- break
- default:
- return uni.showToast({
- icon: 'none',
- title: '该单据暂不能在APP上审核',
- position: "center"
- })
- break
- }
- }
- }
- }
- </script>
- <style scoped lang="scss">
- </style>
|