| | |
| | | Vue.use(uView) |
| | | Vue.config.productionTip = false |
| | | // Vue.prototype.baseUrl = 'http://crm.zoneyung.net' |
| | | Vue.prototype.baseUrl = 'http://192.168.4.188:9528' |
| | | Vue.prototype.baseUrl = 'http://192.168.4.46:9528' |
| | | App.mpType = 'app' |
| | | const app = new Vue({ |
| | | ...App |
| | |
| | | "enablePullDownRefresh" : false |
| | | } |
| | | }, |
| | | // { |
| | | // "path" : "pages/business/process/weekly", |
| | | // "style" : |
| | | // { |
| | | // "navigationBarTitleText" : "周/日报", |
| | | // "enablePullDownRefresh" : false |
| | | // } |
| | | // }, |
| | | { |
| | | "path": "pages/business/process/weekly", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "周/日报" |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/business/process/weeklySelect", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "选择日期", |
| | | "enablePullDownRefresh" : false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/business/process/dayDetl", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "详情", |
| | | "enablePullDownRefresh" : false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/business/process/dayStroke", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "日行程", |
| | | "enablePullDownRefresh" : false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/business/process/dayStrokeCreate", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "新建日行程", |
| | | "enablePullDownRefresh" : false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/business/plan/modiPlan7", |
| | | "style" : |
| | |
| | | </view> |
| | | <view class="item-sort"> |
| | | <view> |
| | | <y-title title="过程管理" /> |
| | | </view> |
| | | <view class="grid-container"> |
| | | <view class="item" @click="select(11)"> |
| | | <view class="img"> |
| | | <image src="../../static/image/zhantiepeizhi.png" mode="aspectFit"></image> |
| | | </view> |
| | | <view>周/日报</view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="item-sort"> |
| | | <view> |
| | | <y-title title="出差管理"></y-title> |
| | | </view> |
| | | <view class="grid-container"> |
| | |
| | | case 10: |
| | | url = `${url}/pricing/contract` |
| | | break; |
| | | case 11: |
| | | url = `${url}/process/weekly` |
| | | break; |
| | | } |
| | | uni.navigateTo({ |
| | | url:url |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" title="详情" @clickLeft="back" @clickRight="scan" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | |
| | | </uni-nav-bar> |
| | | |
| | | <view class="card"> |
| | | <view class="box" v-for="item in list"> |
| | | <view class="box-single-row flex-row" v-for="rule in listRule"> |
| | | <view style="flex: 1;">{{rule.label}}</view> |
| | | <view style="flex: 4;">{{item[rule.attribute]}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="main-box"> |
| | | <view class="box"> |
| | | <view class="box-title">流程动态</view> |
| | | <u-steps :current="current" direction="column"> |
| | | <u-steps-item :title="`${item.title} ${item.time ? item.time : ''}`" :desc="item.msg" v-for="item in steps" /> |
| | | </u-steps> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data(){ |
| | | return{ |
| | | list: [], |
| | | listRule: [{ |
| | | label: "星期", |
| | | attribute: "weeklyDay$", |
| | | }, |
| | | { |
| | | label: "日期", |
| | | attribute: "dailyTime$", |
| | | }, |
| | | { |
| | | label: "工作内容", |
| | | attribute: "workContent", |
| | | }, |
| | | { |
| | | label: "工作目的", |
| | | attribute: "workPurpose", |
| | | }, |
| | | { |
| | | label: "评论", |
| | | attribute: "comment", |
| | | }, |
| | | { |
| | | label: "需协助事项", |
| | | attribute: "province", |
| | | }, |
| | | |
| | | { |
| | | label: "甲方单位", |
| | | attribute: "cstmrId$", |
| | | }, |
| | | { |
| | | label: "备注", |
| | | attribute: "memo", |
| | | }, |
| | | { |
| | | label: "更新时间", |
| | | attribute: "updateTime$", |
| | | }, |
| | | ], |
| | | current:0, |
| | | steps:[] |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | let _this = this |
| | | _this.list = [] |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.on('day', function(data) { |
| | | console.log(data.data) |
| | | _this.list.push(data.data) |
| | | _this.current = data.data.settle-1 |
| | | this.steps = data.data.settleMsg |
| | | }) |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | scan() { |
| | | uni.navigateTo({ |
| | | url: '/pages/authority/authority' |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style> |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | width: 100%; |
| | | background-color: #FFF; |
| | | position: sticky; |
| | | top: 0; |
| | | } |
| | | .card{ |
| | | border-radius: 20rpx; |
| | | } |
| | | .box { |
| | | margin: 16rpx 8rpx; |
| | | /* height: 200px; */ |
| | | box-shadow: 0 0 5px #dddddd; |
| | | background-color: #FFF; |
| | | padding: 16rpx 32rpx; |
| | | position: relative; |
| | | border-radius: 20rpx; |
| | | font-size: 24rpx; |
| | | /* color: #bdbdbd; */ |
| | | } |
| | | .box-single-row { |
| | | display: flex; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" title="日行程" @clickLeft="back" @clickRight="scan" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | |
| | | </uni-nav-bar> |
| | | |
| | | <view class="card"> |
| | | <view class="box" v-for="item in list"> |
| | | <view class="box-single-row flex-row" v-for="rule in listRule"> |
| | | <view style="flex: 1;">{{rule.label}}</view> |
| | | <view style="flex: 4;">{{item[rule.attribute]}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="main-box"> |
| | | <view class="box"> |
| | | <view class="box-title">流程动态</view> |
| | | <u-steps :current="current" direction="column"> |
| | | <u-steps-item :title="`${item.title} ${item.time ? item.time : ''}`" :desc="item.msg" v-for="item in steps" /> |
| | | </u-steps> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data(){ |
| | | return{ |
| | | list: [], |
| | | listRule: [{ |
| | | label: "星期", |
| | | attribute: "weeklyDay$", |
| | | }, |
| | | { |
| | | label: "日期", |
| | | attribute: "dailyTime$", |
| | | }, |
| | | { |
| | | label: "工作内容", |
| | | attribute: "workContent", |
| | | }, |
| | | { |
| | | label: "工作目的", |
| | | attribute: "workPurpose", |
| | | }, |
| | | { |
| | | label: "评论", |
| | | attribute: "comment", |
| | | }, |
| | | { |
| | | label: "需协助事项", |
| | | attribute: "province", |
| | | }, |
| | | |
| | | { |
| | | label: "甲方单位", |
| | | attribute: "cstmrId$", |
| | | }, |
| | | { |
| | | label: "备注", |
| | | attribute: "memo", |
| | | }, |
| | | { |
| | | label: "更新时间", |
| | | attribute: "updateTime$", |
| | | }, |
| | | ], |
| | | current:0, |
| | | steps:[] |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | let _this = this |
| | | _this.list = [] |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.on('dayStroke', function(data) { |
| | | _this.current = data.data.settle-1 |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/weeklyDailyReality/mobile/phone/get/kv`, |
| | | // method: 'POST', |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data: { |
| | | weeklyId: data.data.weeklyId, |
| | | weeklyDay: data.data.weeklyDay |
| | | }, |
| | | success(res) { |
| | | console.log(res) |
| | | res = res.data.data |
| | | _this.list = res |
| | | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | scan() { |
| | | uni.navigateTo({ |
| | | url: '/pages/authority/authority' |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style> |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | width: 100%; |
| | | background-color: #FFF; |
| | | position: sticky; |
| | | top: 0; |
| | | } |
| | | .card{ |
| | | border-radius: 20rpx; |
| | | } |
| | | .box { |
| | | margin: 16rpx 8rpx; |
| | | /* height: 200px; */ |
| | | box-shadow: 0 0 5px #dddddd; |
| | | background-color: #FFF; |
| | | padding: 16rpx 32rpx; |
| | | position: relative; |
| | | border-radius: 20rpx; |
| | | font-size: 24rpx; |
| | | /* color: #bdbdbd; */ |
| | | } |
| | | .box-single-row { |
| | | display: flex; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" title="创建日行程" @clickLeft="back" @clickRight="scan" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | |
| | | </uni-nav-bar> |
| | | |
| | | <view class="card"> |
| | | <view class="box"> |
| | | <view class="box-single-row flex-row"> |
| | | <view style="flex: 1;">星期</view> |
| | | <view style="flex: 4;"> |
| | | {{list.weeklyDay$}} |
| | | </view> |
| | | </view> |
| | | <view class="box-single-row flex-row"> |
| | | <view style="flex: 1;">日期</view> |
| | | <view style="flex: 4;"> |
| | | {{list.dailyTime$}} |
| | | </view> |
| | | </view> |
| | | <view class="box-single-row flex-row"> |
| | | <view style="flex: 1;">工作内容</view> |
| | | <view style="flex: 4;"> |
| | | <input class="inputCss" type="text" v-model="workContent"> |
| | | </view> |
| | | </view> |
| | | <view class="box-single-row flex-row"> |
| | | <view style="flex: 1;">工作目的</view> |
| | | <view style="flex: 4;"> |
| | | <input class="inputCss" type="text" v-model="workPurpose"> |
| | | </view> |
| | | </view> |
| | | <view class="box-single-row flex-row"> |
| | | <view style="flex: 1;">需协助事项</view> |
| | | <view style="flex: 3;"> |
| | | <input class="inputCss" type="text" v-model="weeklyMatter"> |
| | | </view> |
| | | </view> |
| | | <view class="box-single-row flex-row"> |
| | | <view style="flex: 1;">甲方单位</view> |
| | | <view style="flex: 4;"> |
| | | <uni-combox :border="false" class="inputCss" style="border-radius: 0;" :candidates="companys" v-model="company" @input=""></uni-combox> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="main-box"> |
| | | <view class="box"> |
| | | <view class="box-title">流程动态</view> |
| | | <u-steps :current="current" direction="column"> |
| | | <u-steps-item :title="`${item.title} ${item.time ? item.time : ''}`" :desc="item.msg" v-for="item in steps" /> |
| | | </u-steps> |
| | | </view> |
| | | </view> --> |
| | | <view class="floor"> |
| | | <!-- <view class="wran" @click="del()">删除</view> --> |
| | | <view class="default" @click="reset()">重置</view> |
| | | <view class="primary" @click="submit()">提交</view> |
| | | </view> |
| | | <view> |
| | | <!-- 提示信息弹窗 --> |
| | | <uni-popup ref="message" type="message"> |
| | | <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message> |
| | | </uni-popup> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data(){ |
| | | return{ |
| | | list: [], |
| | | listRule: [{ |
| | | label: "星期", |
| | | attribute: "weeklyDay$", |
| | | }, |
| | | { |
| | | label: "日期", |
| | | attribute: "dailyTime$", |
| | | }, |
| | | { |
| | | label: "工作内容", |
| | | attribute: "workContent", |
| | | }, |
| | | { |
| | | label: "工作目的", |
| | | attribute: "workPurpose", |
| | | }, |
| | | { |
| | | label: "评论", |
| | | attribute: "comment", |
| | | }, |
| | | { |
| | | label: "需协助事项", |
| | | attribute: "province", |
| | | }, |
| | | |
| | | { |
| | | label: "甲方单位", |
| | | attribute: "cstmrId$", |
| | | }, |
| | | { |
| | | label: "备注", |
| | | attribute: "memo", |
| | | }, |
| | | { |
| | | label: "更新时间", |
| | | attribute: "updateTime$", |
| | | }, |
| | | ], |
| | | current:0, |
| | | steps:[], |
| | | workContent:'', |
| | | workPurpose:'', |
| | | weeklyMatter:'', |
| | | companys:[], |
| | | company:'', |
| | | messageText:'', |
| | | msgType1: 'success', |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | let _this = this |
| | | _this.list = [] |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.on('dayStrokeCreate', function(data) { |
| | | _this.list = data.data |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/cstmr/all/get/kv`, |
| | | // method: 'POST', |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | success(res) { |
| | | console.log(res) |
| | | res = res.data.data |
| | | for (var i = 0,keys = Object.keys(res); i< keys.length; i++){ |
| | | console.log(res[keys[i]].name); |
| | | _this.companys.push(res[keys[i]].name); |
| | | } |
| | | // |
| | | |
| | | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | | methods:{ |
| | | submit(){ |
| | | let that = this |
| | | let params = [] |
| | | let param = { |
| | | weeklyDay: that.list.weeklyDay, |
| | | dailyTime: that.list.dailyTime, |
| | | workContent: that.workContent, |
| | | workPurpose: that.workPurpose, |
| | | weeklyMatter: that.weeklyMatter, |
| | | cstmrName: that.company |
| | | } |
| | | params.push(param) |
| | | uni.request({ |
| | | url: `${that.baseUrl}/weekly/from/add/phone/auth`, |
| | | method: 'POST', |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data:JSON.stringify({ |
| | | weeklyId: that.list.weeklyId, |
| | | weeklyType: that.list.weeklyType, |
| | | weeklyDailyRealityList: params |
| | | }), |
| | | success(res) { |
| | | console.log(res) |
| | | res = res.data |
| | | if (res.code === 200 ) { |
| | | that.reset(); |
| | | that.messageText = "创建成功" |
| | | that.messageToggle('success') |
| | | // that.save() |
| | | } else if (res.code == 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | } else { |
| | | uni.showToast({title: res.msg, icon: "none",position: 'top'}) |
| | | } |
| | | } |
| | | // |
| | | |
| | | |
| | | }) |
| | | |
| | | }, |
| | | messageToggle(type) { |
| | | this.msgType1 = type |
| | | this.$refs.message.open() |
| | | }, |
| | | reset(){ |
| | | let that = this |
| | | that.workContent = '' |
| | | that.workPurpose = '' |
| | | that.weeklyMatter = '' |
| | | that.company = '' |
| | | }, |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | scan() { |
| | | uni.navigateTo({ |
| | | url: '/pages/authority/authority' |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style> |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | width: 100%; |
| | | background-color: #FFF; |
| | | position: sticky; |
| | | top: 0; |
| | | } |
| | | .card{ |
| | | border-radius: 20rpx; |
| | | } |
| | | .box { |
| | | margin: 16rpx 8rpx; |
| | | /* height: 200px; */ |
| | | box-shadow: 0 0 5px #dddddd; |
| | | background-color: #FFF; |
| | | padding: 16rpx 32rpx; |
| | | position: relative; |
| | | border-radius: 20rpx; |
| | | font-size: 24rpx; |
| | | /* color: #bdbdbd; */ |
| | | } |
| | | .box-single-row { |
| | | margin-bottom: 20rpx; |
| | | display: flex; |
| | | } |
| | | .inputCss{ |
| | | border-bottom: 1px #a5a5a5 solid; |
| | | } |
| | | .floor { |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | width: 100%; |
| | | background-color: #fff; |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | text-align: center; |
| | | letter-spacing: 10rpx; |
| | | } |
| | | .default { |
| | | flex: 2; |
| | | } |
| | | .default:active { |
| | | background-color: #eff0f1; |
| | | } |
| | | .primary { |
| | | flex: 3; |
| | | background-color: #2d8cf0; |
| | | color: #fff; |
| | | } |
| | | .primary:active { |
| | | background-color: #007dea; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" title="周/日报" @clickLeft="back" @clickRight="scan" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">{{user.username}}</text> |
| | | </view> |
| | | <uni-icons type="arrowdown" color="#333333" size="20" /> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | <!-- 搜索框 --> |
| | | <view class="search-bg"> |
| | | <u-search placeholder="输入" v-model="keyword" :clearabled="true" @custom="search()" @search="search()"></u-search> |
| | | </view> |
| | | |
| | | <view class="main-box"> |
| | | <view class="box" v-for="item in list" > |
| | | <view @click="goDetl(item)"> |
| | | <view style="display: flex;"> |
| | | <view class="box-title" style="flex: 1;">{{item.userId$}}提交的周报</view> |
| | | <view class="box-time">{{item.weeklyYear+' '+item.weeklyDayMonth}}</view> |
| | | </view> |
| | | <!-- <view class="box-item">报销类型:{{item.templateName}}</view> |
| | | <view class="box-item">是否冲账:{{item.businessTripDays$}}</view> --> |
| | | <view style="display: flex;"> |
| | | <view class="box-item" style="flex: 1;">状态:{{item.status$}}</view> |
| | | <view class="box-settle" :style="item.bgcolor">{{item.settle$}}</view> |
| | | </view> |
| | | </view> |
| | | <view > |
| | | <uni-collapse accordion v-model="accordionVal" @change="change"> |
| | | <uni-collapse-item> |
| | | <template v-slot:title> |
| | | <text style="font-size: 13px;">流程详情</text> |
| | | </template> |
| | | <view class="box"> |
| | | <view > |
| | | <u-steps :current="item.settleCurrent-1" direction="column"> |
| | | <u-steps-item :title="`${item.title} ${item.time ? item.time : ''}`" :desc="item.msg" v-for="item in JSON.parse(item.settleMsg)" /> |
| | | </u-steps> |
| | | </view> |
| | | </view> |
| | | </uni-collapse-item> |
| | | </uni-collapse> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <u-empty v-if="true" icon="../../../static/image/emptyList.png" v-show="list.length <= 0" /> |
| | | <view class="fxbtn"> |
| | | <uni-icons type="plusempty" color="#fff" @click="add()" ></uni-icons> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import user from '@/pages/api/user/user.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | keyword: '', |
| | | user: { |
| | | username: '', |
| | | id: 0, |
| | | type: '' |
| | | }, |
| | | falg: true, |
| | | list: [], |
| | | curr: 2, |
| | | reload: false, |
| | | status: 'more', |
| | | current:0, |
| | | steps:[], |
| | | accordionVal:'', |
| | | steps:[] |
| | | } |
| | | }, |
| | | onShow() { |
| | | let that = this |
| | | uni.$on('isRefresh',function(data){ |
| | | that.user.username = data.title |
| | | that.user.id = data.id |
| | | that.user.type = data.key |
| | | that.falg = false |
| | | }) |
| | | if (this.falg) { |
| | | this.getDetail() |
| | | } |
| | | setTimeout(()=> { |
| | | this.getReimburseOnline1() |
| | | },50) |
| | | }, |
| | | onReachBottom() { |
| | | this.status = 'more'; |
| | | this.getReimburseOnline() |
| | | }, |
| | | methods: { |
| | | change(e){ |
| | | |
| | | }, |
| | | getReimburseOnline1() { |
| | | let _this = this |
| | | _this.list = [] |
| | | uni.showLoading({}) |
| | | let param = {curr:1,limit:8,dept_id: 0,user_id: 67} |
| | | if (_this.user.type == 'user_id') { |
| | | param = {curr:1,limit:8,user_id: _this.user.id} |
| | | } else if(_this.user.type == 'dept_id'){ |
| | | param = {curr:1,limit:8,dept_id: _this.user.id} |
| | | } else { |
| | | param = {curr:1,limit:8} |
| | | } |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/weekly/list/auth`, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data: param, |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | for (let k of res.data.records) { |
| | | if (k.settle == 3) { |
| | | k['bgcolor'] = 'color: #12d489' |
| | | } else if (k.settle == 2) { |
| | | k['bgcolor'] = 'color: #ffbd67' |
| | | } |
| | | } |
| | | let list = res.data.records |
| | | _this.list = _this.reload ? list : _this.list.concat(list); |
| | | if (res.data.records.length == 0) { |
| | | _this.status = 'noMore' |
| | | } |
| | | } |
| | | }, |
| | | fail(result) { |
| | | uni.showToast({title: '请求失败'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../../login/login' |
| | | }); |
| | | }, 1000); |
| | | }, |
| | | complete() { |
| | | uni.hideLoading() |
| | | } |
| | | }) |
| | | }, |
| | | getReimburseOnline() { |
| | | let _this = this |
| | | uni.showLoading({}) |
| | | let param = {curr:_this.curr,limit:8,dept_id: 0,user_id: 67} |
| | | if (this.user.type == 'user_id') { |
| | | param = {curr:_this.curr,limit:8,user_id: _this.user.id} |
| | | } else if(this.user.type == 'dept_id') { |
| | | param = {curr:_this.curr,limit:8,dept_id: _this.user.id} |
| | | } else { |
| | | param = {curr:_this.curr,limit:8} |
| | | } |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/reimburseOnline/list/auth`, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data: param, |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | for (let k of res.data.records) { |
| | | if (k.settle == 3) { |
| | | k['bgcolor'] = 'color: #12d489' |
| | | } else if (k.settle == 2) { |
| | | k['bgcolor'] = 'color: #ffbd67' |
| | | } |
| | | } |
| | | let list = res.data.records |
| | | _this.list = _this.reload ? list : _this.list.concat(list); |
| | | _this.curr = _this.curr + 1 |
| | | if (res.data.records.length == 0) { |
| | | _this.status = 'noMore' |
| | | } |
| | | } |
| | | }, |
| | | fail(result) { |
| | | uni.showToast({title: '请求失败'}) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../../login/login' |
| | | }); |
| | | }, 1000); |
| | | }, |
| | | complete() { |
| | | uni.hideLoading() |
| | | } |
| | | }) |
| | | }, |
| | | async getDetail() { |
| | | let res = await user.getDetail() |
| | | if (res.code === 200) { |
| | | this.user.username = res.data.username |
| | | this.user.id = res.data.id |
| | | } else if (res.code === 403) { |
| | | this.backLogin(res) |
| | | } |
| | | }, |
| | | add() { |
| | | uni.navigateTo({ |
| | | url: '/pages/business/process/weeklySelect', |
| | | success: function(res) { |
| | | res.eventChannel.emit('reimburseOnlineDetl', { |
| | | data: 'add' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | goDetl(e) { |
| | | // console.log(e); |
| | | uni.navigateTo({ |
| | | url: '/pages/business/process/weeklySelect', |
| | | success: function(res) { |
| | | res.eventChannel.emit('weekly', { |
| | | data: e |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | scan() { |
| | | uni.navigateTo({ |
| | | url: '/pages/authority/authority' |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .flex-row { |
| | | display: flex; |
| | | } |
| | | |
| | | .flex-col { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .main-box { |
| | | /* margin: 16rpx; */ |
| | | /* background-color: #FFF; */ |
| | | border-radius: 20rpx; |
| | | padding: 8rpx; |
| | | } |
| | | |
| | | .box { |
| | | margin: 16rpx 8rpx; |
| | | /* height: 200px; */ |
| | | box-shadow: 0 0 5px #dddddd; |
| | | background-color: #FFF; |
| | | padding: 16rpx 32rpx; |
| | | position: relative; |
| | | border-radius: 20rpx; |
| | | font-size: 24rpx; |
| | | color: #bdbdbd; |
| | | } |
| | | |
| | | .box-flag { |
| | | position: absolute; |
| | | right: 0; |
| | | top: 10rpx; |
| | | background-color: #74B9E9; |
| | | padding: 6rpx; |
| | | font-size: 10rpx; |
| | | color: #FFF; |
| | | } |
| | | |
| | | .box-time { |
| | | color: #bdbdbd; |
| | | } |
| | | |
| | | .box-settle { |
| | | font-size: 26rpx; |
| | | /* font-weight: bold; */ |
| | | } |
| | | |
| | | .box-title { |
| | | font-size: 28rpx; |
| | | font-weight: bold; |
| | | color: #000; |
| | | } |
| | | |
| | | .box-single-row {} |
| | | |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" title="日计划" @clickLeft="back" @clickRight="scan" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">{{user.username}}</text> |
| | | </view> |
| | | <uni-icons type="arrowdown" color="#333333" size="20" /> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | |
| | | <view class="card" v-for="item in items" > |
| | | <view class=card @click="goDetl(item)"> |
| | | <view class="item100noborder" > |
| | | <view class="box-time" style="flex: 1;">{{item.weeklyDay$}}</view> |
| | | <view class="box-time">{{item.dailyTime$}}</view> |
| | | </view> |
| | | <view class="item100"> |
| | | <view class="code-decs">工作内容</view> |
| | | {{item.workContent}} |
| | | </view> |
| | | <view class="item100"> |
| | | <view class="code-decs">工作目的</view> |
| | | {{item.workPurpose}} |
| | | </view> |
| | | <view class="item100"> |
| | | <view class="code-decs">甲方单位</view> |
| | | {{item.cstmrId$}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="buttomcss"> |
| | | <button size="mini" class="mini-btn" type="default" @click="goDayStroke(item)">查看当前日行程</button> |
| | | <button size="mini" class="mini-btn" type="primary" @click="goDayStrokeCreate(item)">创建日行程</button> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | user: { |
| | | username: '', |
| | | id: 0, |
| | | type: '' |
| | | }, |
| | | token: '', |
| | | items:[] |
| | | |
| | | } |
| | | }, |
| | | onShow() { |
| | | // this.baseUrl = uni.getStorageSync('baseUrl'); |
| | | this.token = uni.getStorageSync('token'); |
| | | |
| | | }, |
| | | onLoad(option) { |
| | | let _this = this |
| | | _this.items = [] |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.on('weekly', function(data) { |
| | | |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/weeklyDailyPlan/list/auth`, |
| | | // method: 'POST', |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data: { |
| | | weekly_id: data.data.id |
| | | }, |
| | | success(res) { |
| | | res = res.data.data |
| | | _this.items = res.records |
| | | console.log(res.records) |
| | | } |
| | | }) |
| | | _this.items = data |
| | | console.log(data); |
| | | |
| | | }) |
| | | |
| | | }, |
| | | methods: { |
| | | goDayStrokeCreate(e){ |
| | | uni.navigateTo({ |
| | | url: '/pages/business/process/dayStrokeCreate', |
| | | success: function(res) { |
| | | res.eventChannel.emit('dayStrokeCreate', { |
| | | data: e |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | goDayStroke(e){ |
| | | uni.navigateTo({ |
| | | url: '/pages/business/process/dayStroke', |
| | | success: function(res) { |
| | | res.eventChannel.emit('dayStroke', { |
| | | data: e |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | goDetl(e) { |
| | | // console.log(e); |
| | | uni.navigateTo({ |
| | | url: '/pages/business/process/dayDetl', |
| | | success: function(res) { |
| | | res.eventChannel.emit('day', { |
| | | data: e |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getOrderNoList() { |
| | | let that = this |
| | | uni.request({ |
| | | url: this.baseUrl + '/originRule/list/all', |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | that.menuList = res.data |
| | | } |
| | | }) |
| | | }, |
| | | chose(item) { |
| | | let that = this |
| | | uni.navigateTo({ |
| | | url: "./goodsUp2", |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的 |
| | | res.eventChannel.emit('item', { |
| | | item: item |
| | | }) |
| | | }, |
| | | events: { |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的 |
| | | acceptDataFromOpenedPage: function(data) { |
| | | // that.matnr = data.data |
| | | that.input(that.matnr) |
| | | }, |
| | | }, |
| | | |
| | | |
| | | }); |
| | | }, |
| | | back() { |
| | | uni.navigateBack({}) |
| | | },scan() { |
| | | uni.navigateTo({ |
| | | url: '/pages/authority/authority' |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .box-time { |
| | | color: #bdbdbd; |
| | | } |
| | | .card { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | margin: 20rpx; |
| | | background-color: #ffffff; |
| | | border-radius: 20rpx; |
| | | color: #000000; |
| | | } |
| | | .card2 { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 20rpx; |
| | | justify-content: space-between; |
| | | background-color: #ffffff; |
| | | border-radius: 20rpx; |
| | | color: #000000; |
| | | } |
| | | .uni-pb-5 { |
| | | padding-bottom: 10px; |
| | | } |
| | | .uni-px-5 { |
| | | padding-left: 10px; |
| | | padding-right: 10px; |
| | | } |
| | | .buttom { |
| | | width: 100%; |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | height: 100rpx; |
| | | background-color: #FFF; |
| | | box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.2) ; |
| | | } |
| | | .item { |
| | | width: 40%; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 70rpx; |
| | | padding: 0px 10upx 0px; |
| | | /* margin-left: 20rpx; */ |
| | | border-bottom: 1px solid #b7b7b7; |
| | | } |
| | | .item100 { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 70rpx; |
| | | padding: 0px 10upx 0px; |
| | | /* margin-left: 20rpx; */ |
| | | border-bottom: 1px solid #b7b7b7; |
| | | } |
| | | .item100noborder { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 70rpx; |
| | | padding: 0px 10upx 0px; |
| | | /* margin-top: 0rpx; */ |
| | | /* border-bottom: 1px solid #000000; */ |
| | | } |
| | | .code-decs { |
| | | width: 20vw; |
| | | font-size: 15px; |
| | | color: #8c8c8c; |
| | | } |
| | | .buttomcss { |
| | | display: flex; |
| | | width: 100%; |
| | | margin: 0 0 5px; |
| | | /* text-align: center; */ |
| | | } |
| | | button{ |
| | | font-size: 10rpx; |
| | | } |
| | | </style> |
New file |
| | |
| | | ## 0.0.1(2022-07-22) |
| | | - 初始化 |
New file |
| | |
| | | <template> |
| | | <view class="uni-section"> |
| | | <view class="uni-section-header" @click="onClick"> |
| | | <view class="uni-section-header__decoration" v-if="type" :class="type" /> |
| | | <slot v-else name="decoration"></slot> |
| | | |
| | | <view class="uni-section-header__content"> |
| | | <text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text> |
| | | <text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text> |
| | | </view> |
| | | |
| | | <view class="uni-section-header__slot-right"> |
| | | <slot name="right"></slot> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="uni-section-content" :style="{padding: _padding}"> |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | /** |
| | | * Section 标题栏 |
| | | * @description 标题栏 |
| | | * @property {String} type = [line|circle|square] 标题装饰类型 |
| | | * @value line 竖线 |
| | | * @value circle 圆形 |
| | | * @value square 正方形 |
| | | * @property {String} title 主标题 |
| | | * @property {String} titleFontSize 主标题字体大小 |
| | | * @property {String} titleColor 主标题字体颜色 |
| | | * @property {String} subTitle 副标题 |
| | | * @property {String} subTitleFontSize 副标题字体大小 |
| | | * @property {String} subTitleColor 副标题字体颜色 |
| | | * @property {String} padding 默认插槽 padding |
| | | */ |
| | | |
| | | export default { |
| | | name: 'UniSection', |
| | | emits:['click'], |
| | | props: { |
| | | type: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | title: { |
| | | type: String, |
| | | required: true, |
| | | default: '' |
| | | }, |
| | | titleFontSize: { |
| | | type: String, |
| | | default: '14px' |
| | | }, |
| | | titleColor:{ |
| | | type: String, |
| | | default: '#333' |
| | | }, |
| | | subTitle: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | subTitleFontSize: { |
| | | type: String, |
| | | default: '12px' |
| | | }, |
| | | subTitleColor: { |
| | | type: String, |
| | | default: '#999' |
| | | }, |
| | | padding: { |
| | | type: [Boolean, String], |
| | | default: false |
| | | } |
| | | }, |
| | | computed:{ |
| | | _padding(){ |
| | | if(typeof this.padding === 'string'){ |
| | | return this.padding |
| | | } |
| | | |
| | | return this.padding?'10px':'' |
| | | } |
| | | }, |
| | | watch: { |
| | | title(newVal) { |
| | | if (uni.report && newVal !== '') { |
| | | uni.report('title', newVal) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | onClick() { |
| | | this.$emit('click') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" > |
| | | $uni-primary: #2979ff !default; |
| | | |
| | | .uni-section { |
| | | background-color: #fff; |
| | | .uni-section-header { |
| | | position: relative; |
| | | /* #ifndef APP-NVUE */ |
| | | display: flex; |
| | | /* #endif */ |
| | | flex-direction: row; |
| | | align-items: center; |
| | | padding: 12px 10px; |
| | | font-weight: normal; |
| | | |
| | | &__decoration{ |
| | | margin-right: 6px; |
| | | background-color: $uni-primary; |
| | | &.line { |
| | | width: 4px; |
| | | height: 12px; |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | &.circle { |
| | | width: 8px; |
| | | height: 8px; |
| | | border-top-right-radius: 50px; |
| | | border-top-left-radius: 50px; |
| | | border-bottom-left-radius: 50px; |
| | | border-bottom-right-radius: 50px; |
| | | } |
| | | |
| | | &.square { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | } |
| | | |
| | | &__content { |
| | | /* #ifndef APP-NVUE */ |
| | | display: flex; |
| | | /* #endif */ |
| | | flex-direction: column; |
| | | flex: 1; |
| | | color: #333; |
| | | |
| | | .distraction { |
| | | flex-direction: row; |
| | | align-items: center; |
| | | } |
| | | &-sub { |
| | | margin-top: 2px; |
| | | } |
| | | } |
| | | |
| | | &__slot-right{ |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | |
| | | .uni-section-content{ |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | { |
| | | "id": "uni-section", |
| | | "displayName": "uni-section 标题栏", |
| | | "version": "0.0.1", |
| | | "description": "标题栏组件", |
| | | "keywords": [ |
| | | "uni-ui", |
| | | "uniui", |
| | | "标题栏" |
| | | ], |
| | | "repository": "https://github.com/dcloudio/uni-ui", |
| | | "engines": { |
| | | "HBuilderX": "" |
| | | }, |
| | | "directories": { |
| | | "example": "../../temps/example_temps" |
| | | }, |
| | | "dcloudext": { |
| | | "category": [ |
| | | "前端组件", |
| | | "通用组件" |
| | | ], |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "0.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "" |
| | | }, |
| | | "declaration": { |
| | | "ads": "无", |
| | | "data": "无", |
| | | "permissions": "无" |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": [ |
| | | "uni-scss" |
| | | ], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "y" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信浏览器(Android)": "y", |
| | | "QQ浏览器(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | }, |
| | | "小程序": { |
| | | "微信": "y", |
| | | "阿里": "y", |
| | | "百度": "y", |
| | | "字节跳动": "y", |
| | | "QQ": "y" |
| | | }, |
| | | "快应用": { |
| | | "华为": "u", |
| | | "联盟": "u" |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | ## Section 标题栏 |
| | | > **组件名:uni-section** |
| | | > 代码块: `uSection` |
| | | |
| | | uni-section 组件主要用于文章、列表详情等标题展示 |
| | | |
| | | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-section) |
| | | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 |