日发运计划接口同步后台更新。数字键盘动作更新。主页、申请页列表功能按钮更新(撤回,编辑,删除)。完善页面细节
| | |
| | | // import request from '@/config/request'; |
| | | import { BaseUrl } from '@/utils/request.js' |
| | | import { |
| | | BaseUrl |
| | | } from '@/utils/request.js' |
| | | // import { resolve } from 'node:path/win32'; |
| | | |
| | | // let BaseUrl = "/"; |
| | | // const CURRENT_KEY = 'CURRENT_KEY'; |
| | |
| | | }) |
| | | } |
| | | |
| | | function logout() { |
| | | uni.request({ |
| | | url: `${BaseUrl}/auth/token/logout`, |
| | | method: 'DELETE', |
| | | header: { |
| | | 'TENANT-ID': 5, |
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'), |
| | | VERSION: 'zzl' |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log('缓存清理成功'); |
| | | uni.showToast({ |
| | | title: '到达登录页!' |
| | | }); |
| | | }) |
| | | .catch(err => { |
| | | uni.showToast({ |
| | | title: '缓存清理失败!' |
| | | }); |
| | | }); |
| | | } |
| | | // 删除撤回申请接口 |
| | | function deleteWithDrawApplicationGlobal(id) { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: `${BaseUrl}/yunxiao/xswaybill/${id}`, |
| | | method: 'DELETE', |
| | | header: { |
| | | 'TENANT-ID': 5, |
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'), |
| | | VERSION: 'zzl' |
| | | }, |
| | | success: (res) => { |
| | | resolve(res.data); |
| | | }, |
| | | fail:(err) => { |
| | | uni.showToast({ |
| | | title: '删除出错', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | export default { |
| | | apiLogin, |
| | | wxSmallLogin |
| | | wxSmallLogin, |
| | | logout, |
| | | deleteWithDrawApplicationGlobal |
| | | } |
| | |
| | | <view class="bottom-container">
|
| | | <!-- 按钮区域 -->
|
| | | <view class="bottom-content__chulizhong bottom-content__item">
|
| | | <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
|
| | | <!-- <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
|
| | | <image src="@/static/home/cehui.png" mode=""></image>
|
| | | <view>撤回</view>
|
| | | </view>
|
| | | </view> -->
|
| | | <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
|
| | | <image src="@/static/home/jindu.png" mode=""></image>
|
| | | <view>查看进度</view>
|
| | |
| | | <image src="@/static/home/history.png" mode=""></image>
|
| | | <view>重新申请</view>
|
| | | </view> -->
|
| | | <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '发运通知单'">
|
| | | <!-- <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '发运通知单'">
|
| | | <image src="@/static/home/history.png" mode=""></image>
|
| | | <view>编辑</view>
|
| | | </view>
|
| | | </view> -->
|
| | | <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
|
| | | <image src="@/static/home/history.png" mode=""></image>
|
| | | <view>审批历史</view>
|
| | | </view>
|
| | | <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
|
| | | <!-- <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
|
| | | <image src="@/static/home/delete.png" mode=""></image>
|
| | | <view>删除</view>
|
| | | </view>
|
| | | </view> -->
|
| | | </view>
|
| | | <!-- 已结束小组按钮 -->
|
| | | <!-- <view class="bottom-content__chulizhong bottom-content__item" v-if="item.status == 2">
|
| | |
| | | <!-- 待办按钮 -->
|
| | | <view class="bottom-content__item">
|
| | | <view @click="theFormDataClick(item.tableId)">
|
| | | <image src="@/static/home/jindu.png" mode=""></image>
|
| | | <view>申请详情</view>
|
| | | </view>
|
| | | <image src="@/static/home/jindu.png" mode=""></image>
|
| | | <view>申请详情</view>
|
| | | </view>
|
| | | <view @click="adopClick(item)">
|
| | | <image src="@/static/home/tongguo.png" mode=""></image>
|
| | | <view>通过</view>
|
| | |
| | | </view>
|
| | | <view class="center-content__three center-margin">
|
| | | <view class="">
|
| | | <text>审批意见:{{ item.comment=='undefined'?'未填写':item.comment || '未填写' }}</text>
|
| | | <text>审批意见:{{ item.comment == 'undefined' ? '未填写' : item.comment || '未填写' }}</text>
|
| | | </view>
|
| | | <view class="">
|
| | | <text>
|
| | |
| | |
|
| | | <!-- 日计划 -->
|
| | | <combined-title title="日发运计划" detailsPath="/pages/jihua/jihua" v-if="rijihuaMenu"></combined-title>
|
| | | <view class="card-group bottomChild" >
|
| | | <view class="card-group bottomChild">
|
| | | <combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id" v-if="rijihuaMenu">
|
| | | <template v-slot:top></template>
|
| | | <template v-slot:center>
|
| | |
| | | import combinedTitle from '@/components/common/combined-title/combined-title.vue';
|
| | | import combinationCard from '@/components/common/combination-card/combination-card.vue';
|
| | | import { setAccessToken, redirectLogin } from '@/utils/status.js';
|
| | | import { logout } from '@/api/global.js';
|
| | |
|
| | | export default {
|
| | | name: 'home',
|
| | | onLaunch() {
|
| | | let that = this;
|
| | | uni.addInterceptor('redirectTo', {
|
| | | //监听关闭本页面跳转
|
| | | success(e) {
|
| | | that.watchRouter();
|
| | | }
|
| | | });
|
| | | },
|
| | | computed: {
|
| | | rijihuaMenu() {
|
| | | return this.$store.state.rijihuaMenu;
|
| | |
| | | onUnload(event) {
|
| | | //多层级跳转之后,监听左上角返回事件,直接退回到index
|
| | | console.log('监听左上角', event);
|
| | | uni
|
| | | .request({
|
| | | url: `${BaseUrl}/auth/token/logout`,
|
| | | method: 'DELETE',
|
| | | header: {
|
| | | 'TENANT-ID': 5,
|
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
|
| | | VERSION: 'zzl'
|
| | | }
|
| | | })
|
| | | .then(res => {
|
| | | console.log('缓存清理成功');
|
| | | })
|
| | | .catch(err => {
|
| | | uni.showToast({
|
| | | title: '缓存清理失败!'
|
| | | });
|
| | | });
|
| | | this.logout();
|
| | | },
|
| | | onShow() {
|
| | | // 菜单注释(app待用)
|
| | |
| | | // popupMenu
|
| | | },
|
| | | methods: {
|
| | | watchRouter() {
|
| | | console.log('路由跳转');
|
| | | },
|
| | | init() {
|
| | | this.getUserInfo(); // 用户信息
|
| | | this.getProcessDataList(); // 申请列表
|
| | |
| | | this.withDrawData.procInstId = procInstId;
|
| | | },
|
| | | withDrawConfirm() {
|
| | | this.$reqPost('cancel', this.withDrawData).then(res => {
|
| | | this.withDrawShow = false;
|
| | | if (res.code == 0) {
|
| | | uni.showToast({
|
| | | title: res.data,
|
| | | duration: 2000
|
| | | });
|
| | | }
|
| | | // 刷新列表
|
| | | this.getProcessDataList();
|
| | | this.todoList();
|
| | | this.doneList();
|
| | | });
|
| | | this.$reqPost('cancel', this.withDrawData).then(res => {
|
| | | this.withDrawShow = false;
|
| | | if (res.code == 0) {
|
| | | uni.showToast({
|
| | | title: res.data,
|
| | | duration: 2000
|
| | | });
|
| | | }
|
| | | // 刷新列表
|
| | | this.getProcessDataList();
|
| | | this.todoList();
|
| | | this.doneList();
|
| | | });
|
| | | },
|
| | | withDrawCancel() {
|
| | | this.withDrawShow = false;
|
| | |
| | | this.$u.toast('通过失败!!');
|
| | | }
|
| | | this.todoList(); // 我的待办
|
| | | this.doneList(); |
| | | this.doneList();
|
| | | });
|
| | | },
|
| | | adoptModalCancel() {
|
| | |
| | | this.$u.toast('操作失败!!!');
|
| | | }
|
| | | this.todoList(); // 我的待办
|
| | | this.doneList(); |
| | | this.doneList();
|
| | | });
|
| | | },
|
| | | rejectModalCancel() {
|
| | |
| | | });
|
| | | },
|
| | | // 删除撤回申请
|
| | | deleteWithDrawApplication(id){
|
| | | uni
|
| | | .request({
|
| | | url: `${BaseUrl}/yunxiao/xswaybill/${id}`,
|
| | | method: 'DELETE',
|
| | | header: {
|
| | | 'TENANT-ID': 5,
|
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
|
| | | VERSION: 'zzl'
|
| | | deleteWithDrawApplication(id) {
|
| | | this.deleteWithDrawApplicationGlobal(id)
|
| | | .then(res => {
|
| | | if (res.code == 0) {
|
| | | // 刷新列表
|
| | | this.getProcessDataList();
|
| | | }
|
| | | })
|
| | | .then(res => {
|
| | | uni.showToast({
|
| | | title:'删除成功',
|
| | | icon:'none'
|
| | | })
|
| | | |
| | | // 刷新列表
|
| | | this.getProcessDataList();
|
| | | |
| | | })
|
| | | .catch(err => {
|
| | | uni.showToast({
|
| | | title:'删除出错',
|
| | | icon:'none'
|
| | | })
|
| | | console.log('删除撤回申请异常');
|
| | | });
|
| | | },
|
| | | // 重新申请
|
| | |
| | | url: `/pages/approval-history/approval-history?index=${v}`
|
| | | });
|
| | | },
|
| | | |
| | | redirectLogin() {
|
| | | redirectLogin();
|
| | | },
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | .bottomChild{
|
| | | .bottomChild {
|
| | | margin-bottom: vww(20);
|
| | | }
|
| | |
|
| | |
| | | onPageScroll(e) {
|
| | | // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
|
| | | this.scrollTop = e.scrollTop;
|
| | | // console.log('屏幕滚动监听事件',this.scrollTop);
|
| | | },
|
| | | // 点击导航栏菜单后
|
| | | onNavigationBarButtonTap(e) {
|
| | |
| | | },
|
| | | deep: true,
|
| | | immediate: true
|
| | | },
|
| | | scrollTop: {
|
| | | handler: function(newV, oldV) {
|
| | | if (newV != oldV) {
|
| | | this.keyBoardClose();
|
| | | // this.keyBoardShow = false;
|
| | | }
|
| | | }
|
| | | },
|
| | | deep: true,
|
| | | immediate: true
|
| | | }
|
| | | // scrollTop: {
|
| | | // handler: function(newV, oldV) {
|
| | | // if (newV != oldV) {
|
| | | // this.keyBoardClose();
|
| | | // // this.keyBoardShow = false;
|
| | | // }
|
| | | // },
|
| | | // deep: true,
|
| | | // immediate: true
|
| | | // }
|
| | | },
|
| | | methods: {
|
| | | init() {
|
| | |
| | | //提交
|
| | | dataFormSubmit() {
|
| | | this.overlayShow = true;
|
| | | uni.showLoading({
|
| | | title:'加载中...'
|
| | | })
|
| | | this.fyData.forEach(e => {
|
| | | if(!e.shippingDate && e.numPlan){
|
| | | e.shippingDate = this.info.shippingDate
|
| | | }
|
| | | });
|
| | | this.$reqPost('addObj', this.fyData).then(res => {
|
| | | uni.hideLoading();
|
| | | if(res.code == 0){
|
| | | setTimeout(()=>{
|
| | | uni.showToast({
|
| | |
| | | // 修改弹出框
|
| | | editPopupClose(){
|
| | | console.log('修改弹出框Close');
|
| | | // this.editPopupShow = false;
|
| | | this.editPopupShow = false;
|
| | | this.keyBoardShow = false;
|
| | | },
|
| | | editPopupOpen(){
|
| | | console.log('修改弹出框Open');
|
| | | },
|
| | | // 切换全部和已设置
|
| | | groupChange(n) {
|
| | | this.initVariable();
|
| | | this.isTomJihua = n;
|
| | | if (n == '已设置的计划') {
|
| | | this.xscarshippingdayplan();
|
| | |
| | | },
|
| | | //切换今日和明日
|
| | | tabClick(item) {
|
| | | this.initVariable();
|
| | | if (item.index == 1) {
|
| | | this.info.shippingDate = this.tomorrowDate();
|
| | | if (this.isTomJihua == '已设置的计划') {
|
| | |
| | | }
|
| | | }
|
| | | },
|
| | | // 初始化变量
|
| | | initVariable(){
|
| | | this.keyBoardShow = false;
|
| | | this.keyBoardValue = null;
|
| | | this.fayunPlanFocusId = null;
|
| | | uni.pageScrollTo({
|
| | | scrollTop: 0,
|
| | | duration: 300
|
| | | });
|
| | | },
|
| | | inputChange(val) {
|
| | | console.log('全部计划', val);
|
| | | },
|
| | |
| | | },
|
| | | // input获取焦点
|
| | | faYunPlanCarsFocus(item) {
|
| | | // 获取该焦点在页面的位置
|
| | | // let boxBottom = document.getElementById('#u-dropdown');
|
| | | // console.log('元素',boxBottom);
|
| | | // let bottom = this.$refs.planViewRef.offsetHeight
|
| | | this.keyBoardShow = true;
|
| | | this.fayunPlanFocusId = item.orderId;
|
| | | this.keyBoardValue = item.numPlan + '';
|
| | |
| | | } else{
|
| | | this.isCursor = true;
|
| | | }
|
| | | |
| | | // 根据列表下标,使屏幕滚动到相应可视位置
|
| | | for(let i = 0;i<this.fyData.length;i++){
|
| | | if(this.fyData[i].orderId == item.orderId){
|
| | | uni.pageScrollTo({
|
| | | scrollTop: i*144,
|
| | | duration: 300
|
| | | });
|
| | | }
|
| | | }
|
| | | |
| | | },
|
| | | // 键盘
|
| | | valChange(val) {
|
| | |
| | | item.numPlan = val;
|
| | | this.keyBoardValue = item.numPlan;
|
| | | }
|
| | | }
|
| | | } |
| | | });
|
| | | },
|
| | | backspace() {
|
| | |
| | | display: flex;
|
| | | flex-direction: column;
|
| | | width: 100%;
|
| | | padding: vww(44) vww(10) vww(70) vww(10);
|
| | | padding: vww(44) vww(10) vww(270) vww(10);
|
| | | box-sizing: border-box;
|
| | | .main-inside {
|
| | | width: 100%;
|
| | |
| | | <view class="bottom-container"> |
| | | <!-- 按钮区域 --> |
| | | <view class="bottom-content__chulizhong bottom-content__item"> |
| | | <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1"> |
| | | <!-- <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1"> |
| | | <image src="@/static/home/cehui.png" mode=""></image> |
| | | <view>撤回</view> |
| | | </view> |
| | | </view> --> |
| | | <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1"> |
| | | <image src="@/static/home/jindu.png" mode=""></image> |
| | | <view>查看进度</view> |
| | |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>重新申请</view> |
| | | </view> --> |
| | | <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '发运通知单'"> |
| | | <!-- <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '发运通知单'"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>编辑</view> |
| | | </view> |
| | | </view> --> |
| | | <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>审批历史</view> |
| | | </view> |
| | | <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3"> |
| | | <!-- <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3"> |
| | | <image src="@/static/home/delete.png" mode=""></image> |
| | | <view>删除</view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | }, |
| | | // 删除已撤回申请 |
| | | deleteWithDrawApplication(id){ |
| | | this.deleteWithDrawApplicationGlobal(id).then(res=>{ |
| | | console.log('shenqing,回显',res); |
| | | }).catch(err=>{ |
| | | console.log('shenqing,删除错误'); |
| | | }) |
| | | }, |
| | | // 新增申请 |
| | | newApplicationClick() { |
| | | uni.navigateTo({ |
| | |
| | | const responseFailedDependency = () => { |
| | | uni.showToast({ |
| | | title: '登录状态过期,即将返回登录!', |
| | | icon: 'error', |
| | | icon: 'none', |
| | | position: 'top', |
| | | duration: 2000 |
| | | }); |