Commit db4be9dd authored by 刘杰's avatar 刘杰

企业微信

parent e0c536a5
/node_modules/ /node_modules/
/unpackage/dist /unpackage/dist
manifest.json .idea
.idea" " \ No newline at end of file
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
uni-actionsheet {
display: none !important;
}
</style>
# zc-qiyewx-app
兆驰供应链企业微信侧边栏应用
\ No newline at end of file
This diff is collapsed.
import { BASEURL, TokenPrefix, APIPrefix } from '../publicConfig/config'
let downloadFile = (api, filePath, header = {}) => {
filePath = filePath.split('=')[1] ? filePath.split('=')[1] : filePath
header = {
'Cookie': 'XSRF-TOKEN=' + uni.getStorageSync(`${TokenPrefix}_XSRFToken`) || '',
"X-XSRF-TOKEN": uni.getStorageSync(`${TokenPrefix}_XSRFToken`) || '',
"Authorization": uni.getStorageSync(`${TokenPrefix}_token`) || '',
}
uni.showLoading({
title: '下载中',
})
return new Promise((reslove, reject) => {
api = APIPrefix + api
uni.downloadFile({
//#ifdef MP
url: BASEURL.url + `${api}/` + filePath, //下载资源的 url
//#endif
//#ifdef H5
url: `${api}/` + filePath, //H5使用代理
//#endif
header,
success: (res) => {
uni.hideLoading()
if (res.statusCode == 401 || res.statusCode == -1) {
let app = getApp()
uni.showToast({
title: '登录已过期',
icon: 'error',
duration: 3000
})
uni.removeStorageSync(`${TokenPrefix}_token`)
uni.removeStorageSync(`${TokenPrefix}_XSRFToken`)
uni.removeStorageSync('cookies')
app.judgePlatform();
}
reslove(res.tempFilePath)
},
fail: (err) => {
uni.hideLoading()
uni.showToast({
title: '下载失败!',
icon: 'error'
})
reject(err)
}
})
})
}
export default downloadFile
import { BASEURL, TokenPrefix, APIPrefix } from "../publicConfig/config";
let serverCode = {
3: "重定向",
4: "请求包含错误或未找到资源",
5: "服务器错误",
};
let Request = (api, data, method = "POST", header = {}, showLoading = true) => {
header = {
"Content-Type": "application/json;charset=UTF-8",
Cookie:
"XSRF-TOKEN=" + uni.getStorageSync(`${TokenPrefix}_XSRFToken`) || "",
"X-XSRF-TOKEN": uni.getStorageSync(`${TokenPrefix}_XSRFToken`) || "",
Authorization: uni.getStorageSync(`${TokenPrefix}_token`) || "",
...header,
};
if (showLoading) {
uni.showLoading({
title: "加载中...",
});
}
console.log("请求参数:", data);
return new Promise((reslove, reject) => {
const { projectMini } = getApp().globalData;
const newApi = APIPrefix + api.replace(/{mini}/g, projectMini);
uni.request({
//#ifdef MP
url: BASEURL.url + newApi,
//#endif
//#ifdef H5
url: newApi,
//#endif
data,
method,
header,
success: (res) => {
if (showLoading) {
uni.hideLoading();
}
if (res.statusCode == "404") {
uni.showToast({
title: "无法找到资源",
icon: "error",
duration: 3000,
});
} else if (
res.statusCode === 401 &&
!newApi.includes("/auth/app-login")
) {
let app = getApp();
uni.showToast({
title: "登录已过期",
icon: "error",
duration: 3000,
});
uni.removeStorageSync(`${TokenPrefix}_token`);
uni.removeStorageSync(`${TokenPrefix}_XSRFToken`);
uni.removeStorageSync("cookies");
app.judgePlatform();
} else if (res.statusCode !== 200) {
console.log("响应日志:", res.data);
if (res.data.messageType) {
if (!newApi.includes("/auth/app-login")) {
//登录接口自定义处理
uni.showToast({
title: res.data.message,
icon: "none",
duration: 3000,
});
}
reject(res.data);
} else {
uni.showToast({
title: serverCode[res.statusCode.toString()[0]],
icon: "error",
duration: 3000,
});
}
} else {
reslove(res);
}
},
fail: (err) => {
if (showLoading) {
uni.hideLoading();
}
uni.showToast({
title: err.info || "请求失败!",
icon: "error",
duration: 2000,
});
reject(err);
},
});
});
};
export default Request;
import {BASEURL, TokenPrefix, APIPrefix} from '../publicConfig/config'
import compress from '../utils/compress'
let uploadFile = async (api, filePath, fileType, header = {}) => {
header = {
'Cookie': 'XSRF-TOKEN=' + uni.getStorageSync(`${TokenPrefix}_XSRFToken`) || '',
"X-XSRF-TOKEN": uni.getStorageSync(`${TokenPrefix}_XSRFToken`) || '',
"Authorization": uni.getStorageSync(`${TokenPrefix}_token`) || '',
}
uni.showLoading({
title: '上传中',
})
if(fileType === 'image'){
filePath = await compress(filePath) //图片压缩
}
return new Promise((reslove, reject) => {
api = APIPrefix + api
uni.uploadFile({
//#ifdef MP
url: BASEURL.url + `${api}`, //开发者服务器地址
//#endif
//#ifdef H5
url: api, //H5使用代理
//#endif
filePath,
name: 'file',
header,
success: (res) => {
uni.hideLoading()
if (res.data.reCode == 401 || res.data.reCode == -1) {
let app = getApp()
uni.showToast({
title: '登录已过期',
icon: 'error',
duration: 3000
})
uni.removeStorageSync(`${TokenPrefix}_token`)
uni.removeStorageSync(`${TokenPrefix}_XSRFToken`)
uni.removeStorageSync('cookies')
app.judgePlatform();
}
reslove(res.data)
},
fail: (err) => {
uni.hideLoading()
uni.showToast({
title: '上传失败!',
icon: 'error'
})
console.log(err);
reject(err)
}
})
})
}
export default uploadFile
<template>
<view class="custom-cell-row">
<u-row>
<u-col :span="labelCol" @click.stop>
<view class="custom-cell-label">
<slot name="label"></slot>
<text class="custom-cell-col" v-if="label">{{label}}</text>
</view>
</u-col>
<u-col :span="wrapCol">
<view class="custom-cell-value">
<slot name="value"></slot>
<text class="custom-cell-col" v-if="value">{{value}}</text>
</view>
</u-col>
<slot name="right-icon"></slot>
</u-row>
</view>
</template>
<script>
export default {
name: 'bs-customCell',
props: {
label: {
type: String,
default: "" //默认值为空
},
value: {
type: String,
default: "" //默认值为空
},
labelCol: {
type: String,
default: '6'
},
wrapCol: {
type: String,
default: '6'
},
}
}
</script>
<style lang="scss">
.custom-cell-row {
font-size: 28rpx;
margin-top: 24rpx;
color: #434343;
.custom-cell-col {
width: 100%;
}
}
</style>
<template>
<view class="customRowCell">
<u-cell-group>
<u-cell center :url="linkUrl" :link-type="linkType" arrow="false">
<view slot="icon" :class="['t-icon cell-leftIcon', 't-icon-' + leftIcon]" />
<view slot="title" class="customRow-title">
<slot name="title"></slot>
<text :class="{ overflowOmitRows: isOmits}" v-if="title">{{title}}</text>
</view>
<view class="customRow-value" slot="value">
<slot name="value"></slot>
<text v-if="value"> {{value}}</text>
</view>
<view slot="right-icon" class="flex_sb icon-min-width">
<text class="right-separator" v-if="separator" />
<slot name="rightIcon"></slot>
<view slot="icon" :class="['t-icon cell-rightIcon', 't-icon-' + rightIcon]" v-if="rightIcon" />
</view>
</u-cell>
</u-cell-group>
</view>
</template>
<script>
export default {
name: 'bs-customRowCell',
options: { styleIsolation: 'shared' },
props: {
title: { //标题
type: String,
default: ''
},
value: { //右侧内容
type: String,
default: ''
},
leftIcon: { //标题左侧图标
type: String,
default: ""
},
rightIcon: { //右侧图标
type: String,
default: ""
},
linkUrl: { //跳转页面地址
type: String,
default: ""
},
linkType: { //跳转类型
type: String,
default: 'navigateTo'
},
isOmits: { //是否多行省略
type: Boolean,
default: false
},
separator: { //是否显示分隔符
type: Boolean,
default: false
}
}
}
</script>
<style lang="scss">
.customRowCell {
&/deep/.u-cell-group {
.u-line {
border: none !important;
}
.u-cell__body {
padding: 20rpx 0;
border: none !important;
}
}
.cell-leftIcon,
.cell-rightIcon {
width: 44rpx;
height: 45rpx;
}
.right-separator {
border-left: 2rpx solid #E5E5E5;
min-height: 30rpx;
}
.customRow-title {
margin-left: 20rpx;
}
.customRow-value {
color: #333333;
white-space: nowrap;
}
.icon-min-width {
min-width: 75rpx;
}
}
</style>
<template>
<view class="datetimePicker" @touchmove.stop.prevent="moveHandle">
<u-datetime-picker ref="datetimePicker" itemHeight="120" :visibleItemCount="visibleItem" :show="visible"
v-model="timestamp" :mode="dateType" @confirm="onSelsectDate" @cancel="onVisible" />
</view>
</template>
<script>
export default {
name: "bs-datetimePicker",
options: { styleIsolation: 'shared' },
props: {
visible: {
type: Boolean,
default: false
},
dateType: {
type: String,
default: 'date'
}
},
onReady() {
// 微信小程序需要用此写法
this.$refs.datetimePicker.setFormatter(this.formatter)
},
data() {
return {
//时间选择配置
showPopup: false,
timestamp: new Date().getTime(),
dateValue: "", //时间戳转换后 年-月-日
visibleItem: 4,
};
},
methods: {
moveHandle(){
},
//自定义时间格式
formatter(type, value) {
if (type === 'year') {
return `${value}年`;
}
if (type === 'month') {
return `${value}月`;
}
if (type === 'day') {
return `${value}日`;
}
if (type === 'hour') {
return `${value}时`;
}
return `${value}分`;
},
onVisible() {
this.$emit('onVisible')
},
// 时间选择
onSelsectDate(dateInfo) {
const date = this.formatDate(dateInfo.value)
this.dateValue = date
this.timestamp = dateInfo.value
this.$emit('onSelsectDate', { dateValue: date, timestamp: dateInfo.value, })
},
//时间戳转换
formatDate(timestamp) {
const nowDate = new Date(timestamp)
var year = nowDate.getFullYear();
var month = nowDate.getMonth() + 1;
var date = nowDate.getDate();
const hour = nowDate.getHours()
const minute = nowDate.getMinutes()
if (this.dateType === 'date') {
return `${year}-${ month}-${date}`
} else {
return `${year}-${ month}-${date} ${hour}-${ minute}`
}
},
}
}
</script>
<style lang="scss">
.datetimePicker{
z-index: 1000;
/* #ifdef MP */
/deep/.u-popup__content {
height: 40vh !important;
.u-picker__view__column {
.u-picker__view__column__item {
line-height: 88rpx !important;
}
}
}
/* #endif */
}
</style>
<template>
<view class="page-header">
<view class="page-header-orderNo flex_center">
运单号: {{shipmentNo}}
</view>
</view>
</template>
<script>
export default {
name: "bs-pageHeader-orderNo",
props: {
shipmentNo: {
type: String,
default: "" //运单号
},
}
}
</script>
<style lang="scss">
.page-header {
padding: 40rpx 24rpx 0;
background: #2E75E6;
border-radius: 0 0 32rpx 32rpx;
.page-header-orderNo {
color: #2E75E6;
padding: 30rpx 24rpx;
background: linear-gradient(90deg, rgba(46, 117, 230, .1), rgba(46, 117, 230, .1));
background-color: #EDEFFD;
border-radius: 16rpx 16rpx 0 0;
}
}
</style>
<template>
<view class="selectPicker" @touchmove.stop.prevent="moveHandle">
<u-picker ref="uPicker" keyName="label" immediateChange confirmText="确定" :show="visible" :title="PanelTitle" :closeOnClickOverlay="true" :itemHeight="68"
:columns="[pickerEnums]" :singleIndex="singleIndex" :visibleItemCount="visibleNum" @cancel="onCancel" @confirm="onConfirm" @close="onCancel"/>
</view>
</template>
<script>
export default {
name: "bs-selectPicker",
options: { styleIsolation: 'shared' },
data() {
return {
singleIndex: 0 //默认选中项
};
},
props: {
visible: {
type: Boolean,
default: false
},
pickerEnums: { //选择项枚举
type: Array,
default: []
},
PanelTitle: { //面板标题
type: String,
default: ""
},
visibleNum: {
type: Number,
default: 3
}
},
methods: {
moveHandle(){
},
//确定
onConfirm(e) {
const value = e.value[0].value
this.$emit('onConfirm', value)
},
//设置默认值
setDefaultValue(index) {
this.singleIndex = index
},
//取消
onCancel() {
this.$emit('onVisible')
}
}
}
</script>
<style lang="scss">
.selectPicker{
/deep/.u-toolbar{
height: 80rpx !important;
}
/deep/.u-slide-up-enter-active {
height: 240rpx;
}
}
</style>
<template>
<!-- 选择弹窗 -->
<view class="selectPopup" @touchmove.stop.prevent="onTouchMove">
<u-popup :show="visible" round="32" mode="bottom" closeable @close="onCancel" duration="1">
<view class="select-container">
<view class="popTitle"> <text>{{popTitle}}</text> </view>
<scroll-view scroll-y class="select-list">
<u-radio-group v-model="currentChecked" placement="column" iconPlacement="right">
<u-radio :customStyle="{margin: '22rpx 40rpx'}" :size="40" :iconSize="32" :labelSize="32"
labelColor="#262626" v-for="(item, index) in selectEnum" :key="index" :label="item.label"
:name="item.value" @change="onChange">
</u-radio>
</u-radio-group>
</scroll-view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
name: "bs-selectPopup",
options: { styleIsolation: 'shared' },
props: {
visible: { //弹窗显隐
type: Boolean,
default: false
},
selectEnum: { //选择项枚举
type: Array,
default: []
},
popTitle: { //弹窗标题
type: String,
default: ""
}
},
data() {
return {
currentChecked: '', //当前选中类型
};
},
methods: {
setSelect(value) {
this.currentChecked = value
},
onChange(value) {
this.setSelect(value)
setTimeout(() => {
this.onConfirm()
}, 350)
},
onCancel() {
this.$emit('onVisible')
},
//确认选择
onConfirm() {
this.$emit('onConfirm', this.currentChecked)
},
//防止滚动穿透
onTouchMove() {}
}
}
</script>
<style lang="scss">
.selectPopup {
.select-container {
min-width: 70vw;
height: 50vh;
padding: 30rpx;
font-weight: 400;
.popTitle {
color: #8C8C8C;
font-size: 32rpx;
text-align: center;
margin-bottom: 44rpx;
}
.select-list{
height: 460rpx;
}
}
/deep/.uicon-close {
font-size: 40rpx !important;
width: 24rpx;
height: 24rpx;
margin-right: 20rpx;
}
}
</style>
<template>
<view class="uploade-file">
<view class="uploade-title" v-if="uploadTitle">
<text style="color: #f56c6c;position: absolute;left: 18rpx;" v-if="required">*</text>
<text>{{uploadTitle}}{{fileList.length}}/6)</text>
</view>
<view class="fileList flex flex_wrap">
<view class="previewImages" v-for="(item,index) in fileDetailList" :key="index">
<template v-if="item.type === 'image'">
<image mode="aspectFill" :src="item.url" :data-index="index" @click="previewImage" class="previewImg" />
</template>
<template v-else-if="item.type === 'video'">
<video class="previewImg" :src="item.url" :page-gesture="true" :show-mute-btn="true" :enable-play-gesture="true"/>
</template>
<template v-else>
<image src="../../../static/img/icons/xsl.png" class="previewImg" />
</template>
<u-icon name="close-circle-fill" class="clearIcon" size="30" @click="deleteFile" :index='index' />
</view>
<template v-if="isIos">
<view class="uploadeBtn flex_col" @click="onUpLoad">
<view class="t-icon t-icon-picture" />
<text style="margin-top:10rpx">{{btnTitle}}</text>
<text class="font_bolder orderTotal" v-if="!uploadTitle">{{fileList.length}}/6)</text>
</view>
</template>
<template v-else>
<u-upload v-if="addFileBtn" :fileList="fileList" :maxCount="maxCount" :accept="uploadAccept" :maxDuration="maxDuration"
:sizeType="['compressed']" multiple @afterRead="uploadAfterRead" :previewImage="false">
<!-- 自定义上传按钮 -->
<view class="uploadeBtn flex_col" v-if="isShowBtn">
<view class="t-icon t-icon-picture" />
<text style="margin-top:10rpx">{{btnTitle}}</text>
<text class="font_bolder orderTotal" v-if="!uploadTitle">{{fileList.length}}/6)</text>
</view>
<view v-else style=" height: 140rpx"></view>
</u-upload>
</template>
</view>
</view>
</template>
<script>
const uploadBehavior = require('../../../mixins/uploadBehavior')
export default {
name: "bs-uploader",
mixins: [uploadBehavior],
options: { styleIsolation: 'shared' },
watch:{
fileList(file){
if(this.uploadAccept==="file"){
if(file.length<this.maxFileCount){
this.addFileBtn=true;
}else{
this.addFileBtn=false;
}
}else{
this.addFileBtn=true;
}
}
},
props: {
uploadTitle: {
type: String,
default: ""
},
uploadAccept: {
type: String, //接受的文件类型: image | video | file | all | media; file只支持H5(all、media仅小程序支持)
default: "image"
},
maxDuration: {
type: Number, //当accept为video时生效,拍摄视频最长拍摄时间,单位秒
default: 60
},
maxCount: {
type: Number, //最大上传数量
default: 6
},
btnTitle: { //按钮名字
type: String,
default: "上传图片"
},
isShowBtn: {
type: Boolean,
default: true //是否显示上传按钮
},
required: {
type: Boolean,
default: false //图片是否必传
},
maxFileCount:{
type:Number,
default:1
}
},
data() {
return {
addFileBtn:true
}
}
}
</script>
<style lang="scss">
.uploade-file {
.uploade-title {
font-size: 28rpx;
color: #8C8C8C;
margin-bottom: 24rpx;
}
.fileList {
width: 100%;
.previewImages {
position: relative;
overflow: hidden;
.previewImg {
width: 180rpx;
height: 140rpx;
margin: 0 0 20rpx 20rpx;
}
/deep/.uicon-close-circle-fill {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: #fff;
color: #D81E06 !important;
position: absolute;
top: 4rpx;
right: 4rpx;
}
}
.uploadeBtn {
position: relative;
color: #929292;
width: 180rpx;
height: 140rpx;
border: 2rpx dashed #D9D9D9;
margin-left: 20rpx;
background-color: #FAFAFA;
justify-content: center;
align-items: center;
font-size: 24rpx;
.t-icon-picture{
width: 50rpx;
height: 50rpx;
}
.orderTotal {
color: #333333;
position: absolute;
right: -100rpx;
bottom: 0;
z-index: 999;
}
}
}
}
</style>
<template>
<view class="user-agreement flex_center flex_cen">
<u-checkbox-group>
<u-checkbox name="userAuth" shape="circle" size="44" iconSize='44' @change="onChange" />
</u-checkbox-group>
<text>请您详细阅读并授权</text>
<text class="special-text" @click="onVisible(true)">运匠用户协议</text>
<text></text>
<text class="special-text" @click="onVisible(true)">隐私政策</text>
<!-- 协议详情 -->
<view @touchmove.stop.prevent="onTouchMove">
<u-popup :show="visible" mode="right" duration="300" :overlay="false">
<view class="agreement-contentBox" style="width: 100%;">
<view class="agreement-title flex_center">
<u-icon name="arrow-left" size="48" style="margin-right: 25rpx;" @click="onVisible(false)" />
<view class="flex_cen" style="flex-grow: 1;font-size: 38rpx; color: #2c3e50;">用户隐私协议</view>
</view>
<scroll-view scroll-y class="agreement-container">
<view class="detail-title">一、位置及第三方授权</view>
<view class="detail-content">
您明确知悉并同意,您授权我平台通过中交兴路及关联方、第三方机构对您在平台认证的车辆进行当前位置、轨迹跟踪等定位信息查询并授权我平台及其关联方予以使用。授权时间为长期有效。
</view>
<view class="detail-title">二、其它</view>
<view class="detail-content">本应用仅公司内部用户和POC演示使用</view>
</scroll-view>
</view>
</u-popup>
</view>
</view>
</template>
<script>
export default {
name: 'bs-userPrivacy',
data() {
return {
userAuth: false, //用户是否授权
visible: false,
}
},
methods: {
onTouchMove() {
//防止滚动穿透
},
onVisible(value) {
this.visible = value
},
onChange(value) {
this.userAuth = value
this.$emit('onAuthChange', value)
}
}
}
</script>
<style lang="scss">
.user-agreement {
font-size: 26rpx;
font-weight: 400;
color: #8C8C8C;
line-height: 37rpx;
letter-spacing: 2rpx;
margin: 40rpx 0 95rpx;
.special-text {
font-size: 28rpx;
font-weight: bolder;
color: #2E75E6;
margin: 0 4rpx
}
.agreement-title {
padding: 50rpx 25rpx;
}
.agreement-container {
padding: 0 12rpx;
height: calc(100vh - 148rpx);
.detail-title {
color: #2c3e50;
font-weight: 400;
padding: 10rpx 14rpx;
}
.detail-content {
text-indent: 50rpx; //首行缩进
letter-spacing: 4rpx; //字符间距
}
}
}
</style>
\ No newline at end of file
<template>
<view class="bill_Card">
<view class=" bill_Card_top">
<view class="bill_Card_top_left">
<view class="bill_Card_top_left_date">
{{ formatDate(sellInfo.endSettleDate
) }}
</view>
<!-- <view class="bill_Card_top_left_point">
·
</view>
<view class="bill_Card_top_left_project">
{{ sellInfo['project.name'] }}
</view> -->
</view>
<view class="bill_Card_top_right"
:style="sellInfo.status === 'Confirm' ? 'background-color: #6DCECEFF' : ''">
{{ sellInfo.statusLabel }}
</view>
</view>
<view class="bill_Card_middle">
<view class="bill_Card_middle_item">
<view class="bill_Card_middle_item_value">
{{ sellInfo.outTaxAmount }}
</view>
<view class="bill_Card_middle_item_title">
未税金额
</view>
</view>
<u-line direction="col" color="#D9D9D9FF" length="70%"></u-line>
<view class="bill_Card_middle_item">
<view class="bill_Card_middle_item_value">
{{ sellInfo.taxAmount }}
</view>
<view class="bill_Card_middle_item_title">
税额
</view>
</view>
<u-line direction="col" color="#D9D9D9FF" length="70%"></u-line>
<view class="bill_Card_middle_item">
<view class="bill_Card_middle_item_value">
{{ sellInfo.totalAmount }}
</view>
<view class="bill_Card_middle_item_title">
含税金额
</view>
</view>
</view>
<view class="bill_Card_bottom">
<button @click="sellConfirm" class="confirm_style">确认</button>
<button class="unconfirm_style">发送</button>
<button @click="downloadSettlement" class="unconfirm_style">下载</button>
</view>
</view>
</template>
<script>
import { SellConfirm, DownloadSettlement } from '../../api/apiList'
export default {
methods: {
downloadSettlement() {
DownloadSettlement({
"aux": {
},
'args': {
"selectedIds": [this.sellInfo.id]
}
}).then(res => {
console.log(res)
window.open(URL.createObjectURL(new Blob(['\ufeff', res.data], { type: 'application/vnd.ms-excel' }))
)
})
},
sellConfirm() {
SellConfirm({
"aux": {
},
'args': {
"selectedIds": [this.sellInfo.id]
}
}).then(res => {
uni.showToast({
icon: 'success',
title: '确认完成'
})
})
},
formatDate(date) {
if (date) {
date = new Date(date);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份是从0开始的
return `${year}-${month}`;
}
return ''
},
},
props: {
sellInfo: {
type: Object,
default: {
}
}
}
}
</script>
<style lang="scss">
.bill_Card {
background-color: #FFFFFFFF;
border-radius: 12px;
margin-bottom: 12px;
.bill_Card_top {
padding: 13px;
display: flex;
justify-content: space-between;
align-items: center;
.bill_Card_top_left {
display: flex;
align-items: center;
.bill_Card_top_left_date {
font-size: 14px;
color: #434343FF;
}
.bill_Card_top_left_point {
font-size: 14px;
color: #8C8C8CFF;
}
.bill_Card_top_left_project {
padding: 1px;
border-radius: 4px;
background-color: #F5F5F5FF;
color: #8C8C8CFF;
font-size: 14px;
}
}
.bill_Card_top_right {
border-radius: 4px;
background-color: #BFBFBFFF;
color: #FFFFFFFF;
font-size: 14px;
padding: 2px 12px;
}
}
.bill_Card_middle {
height: 74px;
background-color: rgba(47, 91, 252, 0.313);
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
.bill_Card_middle_item {
text-align: center;
.bill_Card_middle_item_value {
color: #2E75E6FF;
font-size: 14px;
}
.bill_Card_middle_item_title {
color: #8C8C8CFF;
font-size: 12px;
}
}
}
.bill_Card_bottom {
display: flex;
justify-content: flex-end;
padding: 8px 12px;
button {
height: 32px;
width: 90px;
line-height: 32px;
font-size: 14px;
margin-right: 12px;
margin-left: 0;
}
.confirm_style {
color: #FFFFFFFF;
background-color: #2E75E6FF;
}
.unconfirm_style {
color: #2E75E6FF;
background-color: #FFFFFFFF;
border: 1px solid #2E75E6FF;
}
.confirm_style {
color: #FFFFFFFF;
background-color: #2E75E6FF;
}
.unconfirm_style {
color: #2E75E6FF;
background-color: #FFFFFFFF;
border: 1px solid #2E75E6FF;
}
}
}
</style>
\ No newline at end of file
<template>
<view>
<billCard v-for="(sell, index) in sellList" :key="index" :sellInfo="sell"></billCard>
</view>
</template>
<script>
import { SellQuery } from '../../api/apiList'
export default {
data() {
return {
sellList: []
};
},
methods: {
sellQuery() {
SellQuery({
"args": {
pageNum: 1,
pageSize: 10000
}
}).then(res => {
this.sellList = res.data.data.datas
})
}
},
mounted() {
this.sellQuery()
}
};
</script>
<style lang="scss"></style>
This diff is collapsed.
<template>
<view class="daily-report">
<!-- 顶部统计 -->
<view class="report-stats">
<view class="stat-item">
<text class="number" style="color: #52c41a;">{{ stats.submitted }}</text>
<text class="label">已提交</text>
</view>
<view class="stat-item">
<text class="number" style="color: #ff4d4f;">{{ stats.unsubmitted }}</text>
<text class="label">未提交</text>
</view>
<view class="stat-item">
<text class="number" style="color: #1890ff;">{{ stats.total }}</text>
<text class="label">总人数</text>
</view>
</view>
<!-- 日报列表 -->
<scroll-view class="report-list" scroll-y :style="{ height: 'calc(100vh - 190px)' }">
<view class="report-card" v-for="(report, index) in searchDatas" :key="index">
<view class="card-header">
<view class="left">
<text class="name">{{ report.reporter }}</text>
<text class="status" :class="report.status ? 'submitted' : 'unsubmitted'">
{{ report.status ? '已提交' : '未提交' }}
</text>
</view>
<text class="time">{{ report.date || '-' }}</text>
</view>
<!-- v-if="report.status" -->
<view class="card-content">
<view class="work-item">
<view class="work-header">
<text class="work-title">今日重点工作</text>
</view>
<view class="work-content">{{ report.today_work }}</view>
</view>
<view class="work-item">
<view class="work-header">
<text class="work-title">本周重点工作</text>
</view>
<view class="work-content">{{ report.week_work }}</view>
</view>
</view>
</view>
</scroll-view>
<!-- 分页器 -->
<view class="pagination">
<view class="page-btn" :class="{ disabled: pageNum <= 1 }" @click="prevPage">上一页</view>
<text class="page-info">{{pageNum}}/{{totalPages}} 页,共 {{totalCount}}</text>
<view class="page-btn" :class="{ disabled: !hasNextPage }" @click="nextPage">下一页</view>
</view>
</view>
</template>
<script>
import {
dailyReportSearch
} from '../../api/apiList'
import {
formatGMT
} from '../../utils/util'
export default {
data() {
return {
pageNum: 1,
pageSize: 5,
hasNextPage: true, // 是否有下一页
totalCount: 0, // 添加总条数
searchDatas: [],
stats: {
total: 20,
submitted: 15,
unsubmitted: 5
}
}
},
computed: {
// 计算总页数
totalPages() {
return Math.ceil(this.totalCount / this.pageSize)
}
},
mounted() {
this.initData()
},
onPullDownRefresh: function() {
console.log("下拉刷新")
this.onReload()
},
methods: {
// 上一页
prevPage() {
if (this.pageNum > 1) {
this.pageNum--
this.initData()
}
},
// 下一页
nextPage() {
if (this.hasNextPage) {
this.pageNum++
this.initData()
}
},
initData() {
const {
pageNum,
pageSize
} = this
let data = {
"getTotalBy": "count",
"fields": [],
"keyword": {
"value": "",
"exact": false,
"partialMatchMode": "contain",
"caseSensitive": true
},
"filter": {
"fields": []
},
"refFields": [],
"order": [],
"tableHeaderFilter": {
"relationDataset": "zcgyl_dailyreport_search__tableHeaderFilterDataSet",
"fields": []
},
"pageNum": pageNum,
"pageSize": pageSize,
"aggregation": {}
}
dailyReportSearch(data).then(res => {
uni.showLoading({
title: '加载中...',
});
uni.stopPullDownRefresh()
const data = res.data.data.datas
this.totalCount = res.data.data.total // 获取总条数
// 判断是否还有下一页
this.hasNextPage = this.pageNum < this.totalPages
if (data.length > 0) {
data.map(item => {
item.date = formatGMT(item.date, 'T')
})
}
this.searchDatas = data
setTimeout(function() {
uni.hideLoading();
}, 100);
})
},
onReload() {
this.pageNum = 1
this.totalCount = 0
this.hasNextPage = true
this.initData()
}
}
}
</script>
<style lang="scss">
.daily-report {
// padding: 15px;
background: #f5f7fa;
min-height: 100vh;
.report-stats {
display: flex;
justify-content: space-around;
background: #fff;
padding: 20px 15px;
border-radius: 8px;
// margin-bottom: 15px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
.stat-item {
text-align: center;
padding: 15px 24px;
background: #f9f9f9;
border-radius: 6px;
.number {
display: block;
font-size: 28px;
font-weight: bold;
color: #333;
margin-bottom: 8px;
&:after {
content: '';
display: block;
width: 24px;
height: 2px;
background: #1890ff;
margin: 8px auto 0;
border-radius: 1px;
}
}
.label {
font-size: 14px;
color: #999;
}
}
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
padding: 15px;
background: #fff;
position: fixed;
bottom: 0;
left: 0;
right: 0;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
.page-btn {
padding: 6px 15px;
background: #2E75E6;
color: #fff;
border-radius: 4px;
font-size: 14px;
&.disabled {
background: #ccc;
cursor: not-allowed;
}
}
.page-info {
margin: 0 20px;
font-size: 14px;
color: #666;
white-space: nowrap; // 防止文字换行
}
}
.report-list {
// 移除固定高度设置,改用 template 中的 style 绑定
// height: calc(100vh - 120px);
.report-card {
display: block;
background: #fff;
border-radius: 8px;
padding: 15px;
margin-bottom: 15px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.left {
display: flex;
align-items: center;
gap: 10px;
.name {
font-size: 16px;
font-weight: bold;
color: #333;
position: relative;
padding-left: 12px;
&:before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 16px;
background: #1890ff;
border-radius: 2px;
}
}
.status {
padding: 4px 12px;
border-radius: 10px;
font-size: 12px;
&.submitted {
background: rgba(82, 196, 26, 0.1);
color: #52c41a;
border: 1px solid rgba(82, 196, 26, 0.2);
}
&.unsubmitted {
background: rgba(255, 77, 79, 0.1);
color: #ff4d4f;
border: 1px solid rgba(255, 77, 79, 0.2);
}
}
}
.time {
font-size: 14px;
color: #999;
}
}
.card-content {
.work-item {
display: block;
border-top: 1px solid #f0f0f0;
padding-top: 10px;
margin-bottom: 10px;
.work-header {
display: flex;
align-items: center;
margin-bottom: 8px;
position: relative;
padding-left: 12px;
&:before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 14px;
background: #1890ff;
opacity: 1;
border-radius: 1.5px;
}
}
.work-title {
font-size: 14px;
color: #333;
font-weight: 500;
}
.work-content {
font-size: 14px;
color: #666;
line-height: 1.6;
padding: 12px 15px;
background: #fafafa;
border-radius: 4px;
white-space: pre-wrap;
word-break: break-all;
text-align: justify;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="wrap">
<!-- @scrolltolower:滚动到底部触发 lower-threshold:距离底部多少距离触发@scrolltolower -->
<view class="top" id="top" style="width: 100vw ">
<view v-for="(h, n) in header" :key='n' :class="{ 'header_dyg': true, 'flexs': h.flxe }"
:style="{ width: h.hWidth }">
{{ h.name || '' }}
</view>
</view>
<scroll-view class="scroll-view_H" scroll-y="true" @scrolltolower='scrollBottom' :lower-threshold='2'>
<view class="bottom" :style="{ maxHeight: tableHeight, width: '100vw' }">
<view class="tablebox" v-for="(t, s) in tableData" :key='s' @click="jumpDetailed(t)">
<view v-for="(h, n) in header" :key="n"
:class="{ 'table_dyg': true, 'tdColClass': h.bgcolor, 'tdRowClass': t.bgcolor, 'flexs': h.flxe }">
<!-- 不等于操作列就显示文字 -->
<text v-if="h.key !== 'edit'" :style="{ color: getColor(t, h) }">{{ t[h.key] || '' }}</text>
<!-- 操作列显示按钮,后期用插槽 -->
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
// 表头配置:flxe(固定列),bgcolor(列底纹)
// 表体配置:bgcolor(行底纹)
export default {
props: {
data2: {
type: Array,
required: true,
default: function () {
return [];
}
},
head: {
type: Array,
required: true,
default: function () {
return [];
}
},
tableHeight: {
required: true,
type: String,
default: function () {
return '60vh';
}
}
},
data() {
return {
//表体
tableData: [],
//表头
header: [],
// 表格总长度
tableWidths: 0
}
},
watch: {
// 监听列表
'data2'(a, b) {
this.tableData = a
},
// 监听表头
'head'(a, b) {
this.header = a
//计算列宽
this.tableWidth()
},
},
created() {
this.tableData = this.data2 //列表
this.header = this.head //表头
this.tableWidth()
},
methods: {
// 返回行数据
jumpDetailed(row) {
this.$emit('rowData', row)
},
// 滚动到底部,调用父组件方法
scrollBottom(e) {
// 滚动到底部才触发,滚动到右边不触发
if (e.detail.direction == "bottom") {
this.$emit('scrollBottom')
}
},
// 颜色对比
getColor(row, col) {
let color = 'black'
// 传值给父组件,通过父组件的方法内计算判断当前单元格数据是否需要标红,然后通过回调函数,返回一个color值来渲染
this.$emit('getTextColor', row, col, val => {
color = val
})
return color
},
// 修改按钮
editTable(val) {
this.$emit('getEdit', val)
},
// 删除按钮
deleteTable(val) {
this.$emit('getDelete', val)
},
// 计算单元格宽度
tableWidth() {
let w = 0 //计算表格长度
this.header.forEach((head, index) => {
let hw = head.name.length //表头单元格宽度
let dw = 0 //列表单元格宽度
this.tableData.forEach(data => {
// 如果是操作列,就直接给十个字符长度,也就是列宽自动150,不是操作列的统一看字符串长度决定宽度
let a = (head.key == 'edit' ? '1234567891' : (data[head.key] ? data[head.key].toString() : '1'))
let tw = (head.key == 'edit' ? 10 : a.length)
// 这里每次循环找出更大的数赋值,确保dw中是表体单元格这一列中最大宽度,根据最大宽度来判断单元格显示
if (dw < tw) {
dw = tw
}
})
// 表体单元格内容宽度小于表头内容时,以表头的宽度为主。根据表头的字符长度来区分宽度
if (dw <= hw) {
if (hw <= 3) {
head['hWidth'] = 50
} else if (hw <= 5) {
head['hWidth'] = 80
} else {
head['hWidth'] = 130
}
} else {
// 表体内容宽度大于表头内容宽度时,以表体宽度为主。根据表头的字符长度来区分宽度
if (dw <= 3) {
head['hWidth'] = 50
} else if (dw <= 5) {
head['hWidth'] = 80
} else {
head['hWidth'] = 130
}
}
w += head['hWidth'] //叠加表格总长度
})
this.tableWidths = w //给表格赋值总长度
}
}
}
</script>
<style lang="scss">
.wrap {
width: 100%;
}
.scroll-view_H {
height: 60vh;
}
// 表头
.top {
display: flex;
position: sticky; //表头向上滚动时固定住
top: 0;
//width: 750px; //左右滚动时不会把固定的表头滚动走
z-index: 100; //滑动时表头不被覆盖
flex-direction: row;
justify-content: space-between;
.header_dyg {
height: 40px;
text-align: center;
line-height: 40px;
flex: 1;
/* 使所有单元格具有相等的宽度 */
padding: 0 5px;
font-size: 14px;
font-weight: bold;
color: #2b2b2b;
flex-shrink: 0;
}
// 列定位固定单元格
.flexs {
position: sticky;
left: 0;
background-color: #f5f5f6;
z-index: 10;
}
}
// 表格列表
.bottom {
//width: 750px;
.tablebox {
display: flex;
flex-direction: row;
justify-content: space-between;
border-top: 1px solid #ccc;
font-size: 14px;
width: 100vw;
.table_dyg {
height: 30px;
text-align: center;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
/* 使所有单元格具有相等的宽度 */
padding: 0 5px;
flex-shrink: 0;
}
// 列定位固定单元格
.flexs {
position: sticky;
left: 0;
background-color: #fff;
z-index: 10;
}
}
}
// 列的颜色
.tdColClass {
background-color: #d9edf7;
}
// 行的颜色
.tdRowClass {
background-color: #afdfe4;
}
</style>
<template>
<view class="invoice_Card">
<view class=" invoice_Card_top">
<view class="invoice_Card_top_left">
<view class="invoice_Card_top_left_date">
{{ formatDate(sellInfo.endSettleDate
) }}
</view>
<!-- <view class="invoice_Card_top_left_point">
·
</view>
<view class="invoice_Card_top_left_project">
{{ sellInfo['project.name'] }}
</view> -->
</view>
<view class="invoice_Card_top_right"
:style="sellInfo.status === 'Confirm' ? 'background-color: #6DCECEFF' : ''">
{{ sellInfo.statusLabel }}
</view>
</view>
<view class="invoice_Card_middle">
<view class="invoice_Card_middle_item">
<view class="invoice_Card_middle_item_value">
{{ sellInfo.outTaxAmount }}
</view>
<view class="invoice_Card_middle_item_title">
未税金额
</view>
</view>
<u-line direction="col" color="#D9D9D9FF" length="70%"></u-line>
<view class="invoice_Card_middle_item">
<view class="invoice_Card_middle_item_value">
{{ sellInfo.taxAmount }}
</view>
<view class="invoice_Card_middle_item_title">
税额
</view>
</view>
<u-line direction="col" color="#D9D9D9FF" length="70%"></u-line>
<view class="invoice_Card_middle_item">
<view class="invoice_Card_middle_item_value">
{{ sellInfo.totalAmount }}
</view>
<view class="invoice_Card_middle_item_title">
含税金额
</view>
</view>
</view>
<view class="invoice_Card_bottom">
<button @click="sellConfirm" class="confirm_style">确认</button>
<button class="unconfirm_style">发送</button>
<button @click="downloadSettlement" class="unconfirm_style">下载</button>
</view>
</view>
</template>
<script>
import { SellConfirm, DownloadSettlement } from '../../api/apiList'
export default {
methods: {
downloadSettlement() {
DownloadSettlement({
"aux": {
adjustCost
:
false,
adjustTax
:
false,
allSettlement
:
true,
basicData
:
true,
totalCost
:
false
},
'args': {
"selectedIds": [this.sellInfo.id]
}
}).then(res => {
window.open(URL.createObjectURL(new Blob([res.data]))
)
})
},
sellConfirm() {
SellConfirm({
"aux": {
},
'args': {
"selectedIds": [this.sellInfo.id]
}
}).then(res => {
console.log(res)
})
},
formatDate(date) {
if (date) {
date = new Date(date);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份是从0开始的
return `${year}-${month}`;
}
return ''
},
},
props: {
sellInfo: {
type: Object,
default: {
}
}
}
}
</script>
<style lang="scss">
.invoice_Card {
background-color: #FFFFFFFF;
border-radius: 12px;
margin-bottom: 12px;
.invoice_Card_top {
padding: 13px;
display: flex;
justify-content: space-between;
align-items: center;
.invoice_Card_top_left {
display: flex;
align-items: center;
.invoice_Card_top_left_date {
font-size: 14px;
color: #434343FF;
}
.invoice_Card_top_left_point {
font-size: 14px;
color: #8C8C8CFF;
}
.invoice_Card_top_left_project {
padding: 1px;
border-radius: 4px;
background-color: #F5F5F5FF;
color: #8C8C8CFF;
font-size: 14px;
}
}
.invoice_Card_top_right {
border-radius: 4px;
background-color: #BFBFBFFF;
color: #FFFFFFFF;
font-size: 14px;
padding: 2px 12px;
}
}
.invoice_Card_middle {
height: 74px;
background-color: rgba(47, 91, 252, 0.313);
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
.invoice_Card_middle_item {
text-align: center;
.invoice_Card_middle_item_value {
color: #2E75E6FF;
font-size: 14px;
}
.invoice_Card_middle_item_title {
color: #8C8C8CFF;
font-size: 12px;
}
}
}
.invoice_Card_bottom {
display: flex;
justify-content: flex-end;
padding: 8px 12px;
button {
height: 32px;
width: 60px;
line-height: 32px;
border-radius: 4px;
font-size: 14px;
margin-right: 12px;
margin-left: 0;
}
.confirm_style {
color: #FFFFFFFF;
background-color: #2E75E6FF;
}
.unconfirm_style {
color: #2E75E6FF;
background-color: #FFFFFFFF;
border: 1px solid #2E75E6FF;
}
.confirm_style {
color: #FFFFFFFF;
background-color: #2E75E6FF;
}
.unconfirm_style {
color: #2E75E6FF;
background-color: #FFFFFFFF;
border: 1px solid #2E75E6FF;
}
}
}
</style>
\ No newline at end of file
<template>
<view>
<invoiceCard v-for="(invoice, index) in invoiceList" :key="index" :invoiceInfo="invoice"></invoiceCard>
</view>
</template>
<script>
import { SellQuery } from '../../api/apiList'
export default {
data() {
return {
invoiceList: [{}, {}]
};
},
methods: {
sellQuery() {
SellQuery({
"args": {
pageNum: 1,
pageSize: 10000
}
}).then(res => {
this.sellList = res.data.data.datas
})
}
},
mounted() {
// this.sellQuery()
}
};
</script>
<style lang="scss"></style>
<template>
<view class="orderCard">
<bs-customCell :label="propData.orderNo" labelCol="9.4" wrapCol="2">
<text slot="value" @click="navToOrderDetail">查看详情</text>
<view slot="right-icon" class="t-icon t-icon-rightArrow" @click="navToOrderDetail" />
</bs-customCell>
<!-- 起始目的地 -->
<u-line color="#E5E5E5" margin="0" />
<view class="orderCard-container">
<view class="stations">
<view class="start-station flex">
<view class="start-icon flex_center"></view>{{propData['originalAddress.name']}}
</view>
<view class="end-station flex">
<view class="end-icon flex_center"></view>{{propData['destinationAddress.name']}}
</view>
</view>
<bs-customCell label="货量 :" labelCol="2" wrapCol="10"
:value="`${propData.qty}件 / ${propData.weight}千克 / ${propData.volume}方`" />
</view>
</view>
</template>
<script>
export default {
name: "orderCard",
options: { styleIsolation: 'shared' },
props: {
propData: {
type: Object,
default: {}
},
},
data() {
return {
};
},
methods: {
navToOrderDetail() {
wx.navigateTo({
url: `/subpkg/orderDetail/orderDetail?data=${JSON.stringify(this.propData)}`,
})
},
}
}
</script>
<style lang="scss">
.orderCard {
margin-bottom: 24rpx;
background-color: #FFFFFF;
.start-station,
.end-station {
margin: 20rpx 0;
font-size: 30rpx;
font-weight: bolder;
.start-icon,
.end-icon {
width: 40rpx;
height: 40rpx;
font-size: 24rpx;
padding: 8rpx;
border-radius: 50%;
color: #FFFFFF;
background-color: #2E75E6;
margin-right: 20rpx;
}
.end-icon {
background-color: #F7A64A;
}
}
.custom-cell-row {
color: #8C8C8C;
margin: 0;
padding: 28rpx 30rpx 24rpx 32rpx;
}
.orderCard-container {
padding: 8rpx 32rpx;
.custom-cell-row {
color: #434343;
padding: 0;
margin: 49rpx 0 32rpx;
}
}
}
</style>
This diff is collapsed.
<template>
<view class="order_import_content">
<view class="order_import_content_header">
<view class="order_import_content_header_top">
<view class="order_import_content_header_top_select">
<view class="order_import_content_header_top_title">导入模版</view>
<view class="order_import_content_header_top_title_content">
<view @click="openPicker">{{ this.choiceFileType.label ? this.choiceFileType.label : '请选择导入模版' }}</view>
<bs-selectPicker ref="mySelectPicker" :pickerEnums="pickerColumns" :visible="showPicker"
@onVisible="closePicker" @onConfirm="confirmPicker" />
<u-icon name="arrow-right" size="14" color="#0000001A" @click="openPicker"></u-icon>
</view>
</view>
<u-line margin="19px 0" color="#F0F0F0FF"></u-line>
<view>
<view class="order_import_content_header_top_title">导入文件</view>
<uploader ref="uploader"></uploader>
</view>
</view>
<view class="order_import_content_header_top"></view>
</view>
<view class="order_import_content_title">导入日志</view>
<view class="order_import_content_body">
<view class="order_import_content_body_title">
<view style="width: 30%">导入时间</view>
<view style="width: 40%">结果</view>
<view style="width: 30%">操作</view>
</view>
<view class="order_import_content_body_content">
<view class="order_import_content_body_content_item" v-for="(task, index) in taskList" :key="index"
:style="index === taskList.length - 1 ? 'border-bottom: none' : ''">
<view style="width: 30%">{{ formatDate(task.insertDate) }}</view>
<view style="width: 40%" v-if="task.status === 'Finish'"> 导入成功
</view>
<view style="width: 40%; color: #EB2F48FF" v-else>
{{ '导入失败:' + task.errorRowSize + '行' }}
</view>
<view style="width: 30%">
<a :href="downloadFailData(task.errorFile)" v-if="task.errorFile">下载失败数据</a>
</view>
</view>
</view>
</view>
<view class="order_import_content_footer">
<button>取消</button>
<button @click="adaptImport">导入</button>
</view>
</view>
</template>
<script>
import {
GetImportTemplate,
TaskQuery,
downloadImg,
AdaptImport,
userMobileOperation
} from "../../api/apiList";
export default {
data() {
return {
showPicker: false,
pickerColumns: [],
choiceFileType: {},
taskList: []
};
},
methods: {
closePicker() {
this.showPicker = false;
},
confirmPicker(e) {
this.closePicker();
this.pickerColumns.map(item => {
if (item.value === e) {
this.choiceFileType = item;
}
});
},
openPicker() {
this.showPicker = true;
},
getImportTemplate() {
GetImportTemplate({
aux: {}
}).then(res => {
res.data.data.map(template => {
this.pickerColumns.push({
label: template.title,
value: template.name
});
});
console.log("pickerColumns", this.pickerColumns);
});
},
taskQuery() {
userMobileOperation('getUserInfo').then(res => {
TaskQuery({
args: {
pageNum: 1,
pageSize: 10000,
"restrictions": [{
"field": 'insertUser',
"type": "EQ",
"value": res.data.data.username
}]
}
}).then(res => {
this.taskList = res.data.data.datas
});
})
},
downloadFailData(fileCode) {
downloadImg(
fileCode
).then(res => {
return res
});
},
formatDate(date) {
if (date) {
date = new Date(date);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份是从0开始的
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
return ''
},
adaptImport() {
const that = this;
this.$refs.uploader.uploadFile((fileCode) => {
AdaptImport({
aux: {
code: that.choiceFileType.value,
file: fileCode
}
}).then(res => {
uni.showToast({
icon: 'success',
title: '导入完成'
})
}).catch(err=>{
uni.showToast({
icon: 'success',
title: '操作成功'
})
});
});
}
},
mounted() {
this.getImportTemplate();
this.taskQuery();
}
};
</script>
<style lang="scss">
.order_import_content {
padding: 12px;
background-color: #fafafaff;
.order_import_content_header {
height: 229px;
border-radius: 12px;
background-color: #ffffffff;
padding: 12px;
.order_import_content_header_top_select {
display: flex;
justify-content: space-between;
align-items: center;
}
.order_import_content_header_top_title_content {
color: #bfbfbfff;
font-size: 14px;
display: flex;
justify-content: space-between;
align-items: center;
width: 80%;
}
.order_import_content_header_top_title {
color: #8c8c8cff;
font-size: 14px;
&::after {
content: "*";
color: #eb2f48ff;
font-size: 14px;
margin-left: 4px;
}
}
}
.order_import_content_title {
color: #434343ff;
font-size: 14px;
font-weight: bold;
margin-bottom: 8px;
margin-top: 16px;
}
.order_import_content_body {
max-height: 431px;
border-radius: 12px;
background-color: #ffffffff;
padding: 12px;
.order_import_content_body_title {
color: #434343ff;
font-size: 14px;
font-weight: bold;
display: flex;
align-items: center;
height: 43px;
background-color: #FAFAFAFF;
}
.order_import_content_body_content {
max-height: 375px;
overflow-y: auto;
.order_import_content_body_content_item {
color: #434343ff;
font-size: 14px;
display: flex;
align-items: center;
height: 59px;
border-bottom: 1px solid #e5e5e5ff;
}
}
.order_import_content_body_content_item {
height: 59px;
display: flex;
align-items: center;
}
}
.order_import_content_footer {
height: 72px;
width: 100vw;
transform: translateX(-24px);
display: flex;
justify-content: center;
align-items: center;
background-color: #ffffffff;
margin-top: 10px;
button {
width: 170px;
height: 44px;
line-height: 44px;
border-radius: 6px;
&:first-child {
background-color: #306DF01A;
color: #2F5CFCFF;
border: 0.5px solid #2F5CFCFF;
}
&:last-child {
background-color: #2F5CFCFF;
color: #FFFFFFFF;
border: none;
}
}
}
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"dependencies": {
"@dcloudio/uni-ui": "^1.5.7",
"@qiun/ucharts": "^2.5.0-20230101",
"echarts": "^5.6.0",
"lodash": "^4.17.21"
}
}
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
}
},{
"path": "pages/dailyReport/index",
"style": {
"navigationBarTitleText": "日报详情"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "运营看板",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"titleAlign": "center"
},
"uniIdRouter": {}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment