提交 175628f7 编写于 作者: Y yang-zongying@qq.com

增加流程

上级 79ccf3e0
<template>
<view class="timeline">
<view
v-for="(item, index) in timelineItems"
:key="index"
class="timeline-item"
>
<view class="timeline-marker" :class="'timeline-marker--'+ item.status "></view>
<view class="timeline-content">
<view class="fl mgb"><h3 class="timeline-title">{{ item.title }}</h3><p class="timeline-date">{{ item.date }}</p> </view>
<view class="timeline-header">
<u-avatar :src="item.avatar" class="timeline-avatar"></u-avatar>
<view class="timeline-username">{{ item.username }}</view>
</view>
<p class="timeline-description">{{ item.content }}</p>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'TimeLine',
props: {
items: {
type: Array,
required: true,
validator: function (value) {
return value.every(item => {
return (
typeof item === 'object' &&
typeof item.title === 'string' &&
typeof item.date === 'string' &&
typeof item.content === 'string' &&
typeof item.username === 'string' &&
typeof item.avatar === 'string' &&
['status1', 'status2', 'status3'].includes(item.status) // 假设有三种状态
);
});
}
}
},
computed: {
timelineItems() {
return this.items;
}
}
};
</script>
<style lang="scss" scoped>
.timeline {
position: relative;
padding-left: 8px;
padding-top: 5px;
}
.timeline::before {
content: '';
position: absolute;
top: 8px;
bottom: 0;
width: 1px;
background-color: #ccc;
left: 10px;
margin-left: -1px;
}
.timeline-item {
position: relative;
margin-bottom: 20px;
}
.timeline .timeline-item:last-child { margin-bottom: 10px;}
.timeline-marker {
position: absolute;
top: 0;
left: -5px;
width: 10px;
height: 10px;
background-color: #333;
border-radius: 50%;
border: 2px solid #fff;
&--status1 {
background: rgba(255, 255, 255, 1);
border: 2px solid rgba(229, 229, 229, 1);
}
&--status2 {
background:rgba(255,255,255,1); padding: 1px; border:2px solid rgba(36,82,209,1);
}
&--status3 {
background: rgba(229, 229, 229, 1);
border: 2px solid rgba(255, 255, 255, 1);
}
}
.timeline-content {
padding: 10px;
background-color: #FFF;
border-radius: 5px;
position: relative;
left: 15px;
width: calc(100vw - 78px);
}
.timeline-header {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.timeline-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
margin-right: 10px;
}
.timeline-username {
/* font-weight: bold; */
}
.timeline-title {
font-size: 16px;
font-weight: 500;
margin-right: 5px;
}
.timeline-date {
font-size: 14px;
color: #888;
}
.timeline-description {
font-size: 14px;
}
</style>
\ No newline at end of file
<template>
<view class="timeline">
<view v-for="(item, index) in timelineItems" :key="index" class="timeline-item">
<view class="timeline-marker" :class="'timeline-marker--status'+ item.status "></view>
<view class="timeline-content">
<view class="fl-rsb mgb10">
<view class="stit" :class="'timeline-marker--colorstatus'+ item.status ">{{ item.title }}</view>
<view class="timeline-date desc">{{ item.date }}</view>
</view>
<view class="timeline-header mgb5 pdtb5 fl bdr4" style="background: linear-gradient(145.89deg, rgba(65, 178, 255, 0) 0%, rgba(211, 236, 254, 0.5) 100%);">
<u-avatar :src="item.avatar" class="timeline-avatar" size="80"></u-avatar>
<view class="timeline-username fl-cs">
<view class="fl mgb10">
<view class="desctext mgr5">{{ item.username }}</view>
<view class="desc">{{ item.role }}</view>
</view>
<view class="desctit">{{ item.content }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'TimeLine',
props: {
items: {
type: Array,
required: true,
validator: function(value) {
return value.every(item => {
return (
typeof item === 'object' &&
typeof item.title === 'string' &&
typeof item.date === 'string' &&
typeof item.content === 'string' &&
typeof item.username === 'string' &&
typeof item.avatar === 'string' && ['status1', 'status2', 'status3'].includes(
item.status) // 假设有三种状态
);
});
}
}
},
data(){
// 1 初始
// 2 处理中
// 3 延时
// 4 紧急
// 5 正常完成
// 6 待处理
// 7 打回
return {
statusTextList:[],
};
},
computed: {
timelineItems() {
return this.items;
}
}
};
</script>
<style lang="scss" scoped>
.timeline {
position: relative;
padding-left: 8px;
padding-top: 5px;
}
.timeline::before {
content: '';
position: absolute;
top: 8px;
bottom: 0;
width: 1px;
background-color: #ccc;
left: 10px;
margin-left: -1px;
}
.timeline-item {
position: relative;
margin-bottom: 20px;
}
.timeline .timeline-item:last-child {
margin-bottom: 10px;
}
.timeline-marker {
position: absolute;
top: 0;
left: -6px;
width: 10px;
height: 10px;
background-color: #333;
border-radius: 50%;
border: 2px solid #fff;
&--status1 {
background: rgba(255, 255, 255, 1);
border: 2px solid $uni-text-color;
color: $uni-text-color;
}
&--status2 {
background: rgba(255, 255, 255, 1);
padding: 1px;
border: 2px solid $subColor;
color: $subColor;
}
&--status3 {
background: rgba(229, 229, 229, 1);
border: 2px solid rgba(255, 255, 255, 1);
color: $uni-color-warning;
}
&--status4 {
background: rgba(255, 255, 255, 1);
border: 2px solid $uni-color-success;
color: $uni-color-error;
}
&--status5 {
background: rgba(255, 255, 255, 1);
padding: 1px;
border: 2px solid $uni-color-success;
color: $uni-color-success;
}
&--status6 {
background: #FFF;
border: 2px solid $subColor;
color: $subColor;
}
&--status7 {
background: rgba(229, 229, 229, 1);
border: 2px solid rgba(255, 255, 255, 1);
color: $uni-text-color-grey;
}
&--colorstatus1 {
color: $uni-text-color;
}
&--colorstatus2 {
color: $sColor;
}
&--colorstatus3 {
color: $uni-color-warning;
}
&--colorstatus4 {
color: $uni-color-error;
}
&--colorstatus5 {
color: $uni-color-success;
}
&--colorstatus6 {
color: $subColor;
}
&--colorstatus7 {
color: $uni-text-color-grey;
}
}
.timeline-content {
padding: 10px;
background: #FFF;
border-radius: 5px;
position: relative;
left: 15px;
width: calc(100vw - 78px);
}
.timeline-header {
display: flex;
align-items: center;
}
.timeline-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
margin-right: 10px;
}
.timeline-username {
/* font-weight: bold; */
}
.timeline-title {
font-size: 16px;
font-weight: 500;
margin-right: 5px;
}
.timeline-date {
font-size: 14px;
color: #888;
}
.timeline-description {
font-size: 14px;
}
</style>
\ No newline at end of file
......@@ -37,15 +37,14 @@
<text class="desctit blod">{{ goodsInfo.sqsl }}</text>
</view>
<view v-else>
<u-number-box v-model="goodsInfo.sqsl" :min="0" :max="goodsInfo.goodsKC" inputWidth="140"
bgColor="#EEF6FF">
<u-number-box v-model="goodsInfo.sqsl" :min="0" :max="goodsInfo.goodsKC" inputWidth="140" bgColor="#EEF6FF" integer>
<view slot="minus" class="minus">
<u-icon name="minus" size="20"></u-icon>
<u-icon name="minus" size="28"></u-icon>
</view>
<!-- <view slot="input" style="width: 80px;text-align: center;background-color: rgba(36, 86, 205, 0.1); padding: 2px 0px; margin: 0px 2px; border-radius: 3px;"
class="input">{{goodsInfo.goodsCount}}</view> -->
<view slot="plus" class="plus">
<u-icon name="plus" color="#2452D1" size="20"></u-icon>
<u-icon name="plus" color="#2452D1" size="28"></u-icon>
</view>
</u-number-box>
</view>
......@@ -168,10 +167,16 @@
.input {
padding: 0 10px;
}
.uni-input-input {
height: 100%;
height: 2.2em;
}
.plus {
width: 24px;
height: 24px;
border-width: 1px;
border-color: #d0e3ff;
border-style: solid;
background-color: #d7e7ff;
border-radius: 50%;
/* #ifndef APP-NVUE */
......
......@@ -50,12 +50,12 @@
<view v-else>
<u-number-box v-model="goodsInfo.sqsl" :min="0" :max="goodsInfo.goodsKC" inputWidth="140" bgColor="#EEF6FF">
<view slot="minus" class="minus">
<u-icon name="minus" size="12"></u-icon>
<u-icon name="minus" size="18"></u-icon>
</view>
<!-- <view slot="input" style="width: 80px;text-align: center;background-color: rgba(36, 86, 205, 0.1); padding: 2px 0px; margin: 0px 2px; border-radius: 3px;"
class="input">{{goodsInfo.goodsCount}}</view> -->
<view slot="plus" class="plus">
<u-icon name="plus" color="#2452D1" size="12"></u-icon>
<u-icon name="plus" color="#2452D1" size="18"></u-icon>
</view>
</u-number-box>
</view>
......@@ -152,6 +152,9 @@
width: 22px;
height: 22px;
background-color: #d7e7ff;
border-width: 1px;
border-color: #d0e3ff;
border-style: solid;
border-radius: 50%;
/* #ifndef APP-NVUE */
display: flex;
......
const http = uni.$u.http
import globalVariable from "@/config/global-variable.js";
// post请求,获取菜单
export const postMenu = (params, config = {}) => http.post('/ebapi/public_api/index', params, config)
// get请求,获取菜单,注意:get请求的配置等,都在第二个参数中,详见前面解释
export const getMenu = (data) => http.get(globalVariable.baseUrl + '/ebapi/public_api/index', data)
export const postLogin = (params, config = {}) => http.post(baseUrl + '/ebapi/public_api/index', params, config)
import {BaseService} from '@/config/base.service.js'
export class commonApiService extends BaseService {
findTableList(params) {
// /TaskInfor
return this.httpUtil.myPost({
url: `sysuser/findTableList?${params.pagination.appendToUrl()}`,
data: params.data
})
}
}
export class SysUserService extends BaseService {
findTableList(params) {
......@@ -31,60 +34,4 @@ export class SysUserService extends BaseService {
data: sysUser
})
}
register(sysUser) {
return http.post('/api/Management/Promoter/Create', sysUser )
}
validRawPassword(sysUser) {
const _self = this;
return _self.httpUtil.myPost({
url: `sysuser/validRawPassword`,
data: sysUser
})
}
updatePassword(sysUser) {
return this.httpUtil.myPost({
url: `sysuser/updatePassword`,
data: sysUser
})
}
changePhone(sysUser) {
return this.httpUtil.myPost({
url: `sysuser/changePhone`,
data: sysUser
})
}
updateSysUser(sysUser) {
return this.httpUtil.myPost({
url: `sysuser/update`,
data: sysUser
})
}
updateSessionData(sysUser) {
return this.httpUtil.myPostJson({
url: `sysuser/updateSessionData`,
data: sysUser
})
}
markTbCommunityUserTypeById(id) {
return this.httpUtil.myPost({
url: `sysuser/markTbCommunityUserTypeById`,
data: {id: id}
})
}
batchDeleteSysUserList(ids) {
return this.httpUtil.myPost({
url: `sysuser/deleteByIds`,
data: {
ids: ids
}
})
}
}
export class CommonApi {
static async getHeadImgSrc(st_id) {
let data
await uni.$u.http.post('/GetStaffImg', {
"st_id": st_id
}).then((res2) => {
console.log('getHeadImgSrc:', res2);
data = "data:image/png;base64," + res2[0]["imgStr"]
})
return data
}
static getWupinTypeList(tableName) {
let actions = []
let data = {
"tableName": tableName
}
uni.$u.http.post('/DictList', data).then(res => {
console.log(data);
// 数据处理:
res.map(item => {
actions.push({
name: item.mc,
value: item.id
})
})
}).catch(err => {
uni.$u.toast(err)
})
}
static async getTaskInfor(st_id,row_guid) {
let data
await uni.$u.http.post('/TaskInfor', {"st_id":st_id,"row_guid":row_guid}).then((res2) => {
console.log('getTaskInfor:', res2);
data = res2
})
return data
}
}
\ No newline at end of file
......@@ -249,6 +249,16 @@ export class CommonUtil {
return obj
}
/**
* 判断对象中的null、undefined属性值
*/
static checkedNull(str, removeEmptyStr = true) {
if (str === null || str === undefined || str === ''|| str === NaN) {
return false
}
return true
}
static urlParamsAppendToUrl(url, urlParams) {
if (urlParams) {
if (url.indexOf("?") === -1) {
......
......@@ -23,6 +23,18 @@
<u--textarea height="140" v-model="jdForm.reasons" placeholder="备注:" count></u--textarea>
</view>
</view>
<view class="pdt">
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
width="150"
height="150"
multiple
:maxCount="10"
></u-upload>
</view>
<!-- <view class="mgt">
<InfoCard :infoItem="jiudianInfo" />
</view> -->
......@@ -71,6 +83,7 @@
imgbaseUrl: this.$globalv.imgBaseUrl,
pageTitle: "报修申请",
jfDate: Date.now(),
fileList1: [],
fileList: [{
fileName: '2024-09-01 物品清单附件1'
}],
......@@ -145,6 +158,50 @@
selectedPicker(e) {
console.log(e)
},
// 删除图片
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
// 新增图片
async afterRead(event) {
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
filePath: url,
name: 'file',
formData: {
user: 'test'
},
success: (res) => {
setTimeout(() => {
resolve(res.data.data)
}, 1000)
}
});
})
},
},
onReady() {},
};
......
......@@ -3,52 +3,79 @@
<!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
<u--form labelPosition="top" :model="cgForm" :rules="rules" labelWidth="400" ref="uForm">
<view class="pdb10">
<view class="mgb10 cardview">
<view class="fl-rsbc pdlr bluebg pdt pdlr">
<view class="mgb10 cardview bgwhite bluebg2">
<!-- <CardTit title="预约人信息填写" icon="fkyy.png" :userInfo="userInfo" :iDate="jfDate" /> -->
<view class="pdt10">
<!-- <view class="fl-rsbc pdlr bluebg pdt pdlr">
<view class="fl">
<view class="mgr5">
<u--image :showLoading="true" :src="imgbaseUrl + 'fkyy.png'" width="24px" height="24px"></u--image>
</view>
<view class="stit">
预约人信息填写
</view>
</view>
</view>
<view class="bgwhite pdlr pdb">
<view class="fl-rsb mgb10">
<view class="bgwhite mgr">
<view class="pdtb10 fl-rsbc bgwhite bd1">
<u--input border="none" :maxlength="10" placeholder="姓名(必填)" type="number" clearable></u--input>
</view> -->
<view class=" pdlr pdb">
<view class="fl-rsb">
<view class=" mgr">
<view class="pdtb10 fl-rsbc bd1">
<u--input border="none" :maxlength="10" placeholder="姓名(必填)" type="number"
clearable></u--input>
</view>
</view>
<view class="">
<view class="pdtb10 fl-rsbc bd1">
<u--input border="none" :maxlength="10" placeholder="电话(必填)" type="number"
clearable></u--input>
</view>
</view>
</view>
</view>
<view class="bgwhite">
<view class="pdtb10 fl-rsbc bgwhite bd1">
<u--input border="none" :maxlength="10" placeholder="电话(必填)" type="number" clearable></u--input>
<view class="">
<view class="pdtb10 fl-rsbc bd1">
<u--input border="none" :maxlength="10" placeholder="身份证号码" type="number"
clearable></u--input>
</view>
</view>
</view>
</view>
<view class="bgwhite mgb10">
<view class="pdtb10 fl-rsbc bgwhite bd1">
<u--input border="none" :maxlength="10" placeholder="身份证号码" type="number" clearable></u--input>
<view class="">
<view class="pdtb10 fl-rsbc bd1">
<u--input border="none" :maxlength="10" placeholder="车牌号" type="number"
clearable></u--input>
</view>
</view>
</view>
<view class="bgwhite mgb10">
<view class="pdtb10 fl-rsbc bgwhite bd1">
<u--input border="none" :maxlength="10" placeholder="车牌号(必填)" type="number" clearable></u--input>
<view class="">
<view class="bd1 pdtb10 mgb5 fl-rsbc bgwhite cu" @click="isShowlyType = true">
<view class="">
<u--input v-model="cgForm.cgtype" readonly placeholder="拜访人(必填)" border="none"></u--input>
</view>
<view class="cu mgr5"><u-icon name="arrow-down"></u-icon></view>
</view>
</view>
</view>
<view class="fl-rsbc pdt">
<view>是否进入生产区</view>
<view class="fl"><u-switch v-model="isIn" @change="changeExpense" size="40"></u-switch>
<view class="pdt10 fl-rsbc mgb10 bgwhite">
<view class="w100 fl-rsbc bgwhite cu bdr">
<checkbox-group @change="radioChange" class="fl-wrap">
<view style="font-size: 16px; width:120px;" >
<checkbox color="#2452D1" style="transform: translateX(-3px) scale(0.6);" />生产区
</view>
<view style="font-size: 16px; width:110px;" >
<checkbox color="#2452D1" style="transform: translateX(-3px) scale(0.6);" />组织会议
</view>
</checkbox-group>
</view>
</view>
</view>
<view class="pdtb">
<!-- <view class="fl-rsbc pdtb10 mgtb5">
<view>是否进入生产区</view>
<view class="fl"><u-switch v-model="isIn" @change="changeExpense" size="40"></u-switch>
</view>
</view> -->
<!-- <view class="pdtb">
<view class="stit">来访事由:</view>
</view>
<view class="w100 fl-rsbc bgwhite cu">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--textarea height="140" v-model="cgForm.reasons" placeholder="请输入事由"
count></u--textarea>
</view> -->
<view class="w100 fl-rsbc bgwhite cu">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--textarea height="140" v-model="cgForm.reasons" placeholder="请输入事由(必填)"
count></u--textarea>
</view>
</view>
</view>
</view>
......@@ -64,8 +91,11 @@
</template>
<script>
import CardTit from '@/components/cardTit.vue'
export default {
components: {},
components: {
CardTit
},
data() {
return {
isIn: false,
......
......@@ -4,31 +4,32 @@
<u--form labelPosition="top" :model="cgForm" :rules="rules" labelWidth="400" ref="uForm">
<view class="pdb10">
<view class="mgb10 cardview bgwhite">
<CardTit title="寄件信息录入" icon="jjsq.png" :userInfo="userInfo" :iDate="jfDate"/>
<view class="pdlr pdt">
<view class="w100 fl-rsbc bgwhite cu">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--textarea height="140" v-model="cgForm.reasons" placeholder="请输入内件品名"
count></u--textarea>
</view>
</view>
<view class="mgb">
<view class="fl-rsb">
<view class="pdtb10 fl-rsbc bgwhite bd1 mgr">
<u--input border="none" placeholder="请输入姓名" type="number" clearable></u--input>
</view>
<view class="pdtb10 fl-rsbc bgwhite bd1">
<u--input border="none" placeholder="请输入电话" type="number" clearable></u--input>
<CardTit title="寄件信息录入" icon="jjsq.png" :userInfo="userInfo" :iDate="jfDate" />
<view class="pdlr pdt">
<view class="w100 fl-rsbc bgwhite cu">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--textarea height="140" v-model="cgForm.reasons" placeholder="请输入内件品名"
count></u--textarea>
</view>
</view>
</view>
<view class="mgtb fl-rsbc">
<view class="mgb">
<view class="fl-rsb mgb">
<view class="pdtb10 fl-rsbc bgwhite bd1 mgr">
<u--input border="none" placeholder="请输入姓名" type="number" clearable></u--input>
</view>
<view class="pdtb10 fl-rsbc bgwhite bd1">
<u--input border="none" placeholder="请输入电话" type="number" clearable></u--input>
</view>
</view>
<!-- <view class="mgtb fl-rsbc">
<view class="desctit">备注:</view>
</view> -->
<view class="fl-rsbc">
<u--textarea height="140" v-model="cgForm.remark" placeholder="请输入备注内容"
count></u--textarea>
</view>
</view>
<view class="fl-rsbc">
<u--textarea height="140" v-model="cgForm.remark" placeholder="请输入备注内容" count></u--textarea>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="mgb">
......@@ -44,24 +45,27 @@
<u--input border="none" placeholder="请输入电话" type="number" clearable></u--input>
</view>
</view>
<view class="pdtb10 fl-rsbc bgwhite bd1">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--input border="none" placeholder="请输入单位" type="number" clearable></u--input>
</view>
</view>
<view class="pdtb10 fl-rsbc bgwhite">
<view class="w100 bd1">
<uni-data-picker placeholder="请选择省/市" popup-title="请选择所在地区" :localdata="dataTree" v-model="classes" @change="onchange" @nodeclick="onnodeclick" @popupopened="onpopupopened" @popupclosed="onpopupclosed" :border="false"> </uni-data-picker>
<view class="pdtb10 fl-rsbc bgwhite bd1">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--input border="none" placeholder="请输入单位" type="number" clearable></u--input>
</view>
</view>
</view>
<u-form-item label="" class="bd1" labelPosition="left" prop="rzForm." ref="item1" >
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--input border="none" placeholder="详细地址" type="number" clearable></u--input>
<view class="pdtb5 fl-rsbc bgwhite bd1">
<view class="w100 ">
<uni-data-picker placeholder="请选择省/市" popup-title="请选择所在地区" :localdata="dataTree"
v-model="classes" @change="onchange" @nodeclick="onnodeclick"
@popupopened="onpopupopened" @popupclosed="onpopupclosed" :border="false">
</uni-data-picker>
</view>
</view>
</u-form-item>
<u-form-item label="" class="bd1" labelPosition="left" prop="rzForm." ref="item1">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--input border="none" placeholder="详细地址" type="number" clearable></u--input>
</view>
</u-form-item>
</view>
</view>
<view class="fix-area bgwhite">
<view class="pdlr pdt">
<u-button type="primary" class="confirm-btn" @click="onGoodsCG">提交</u-button>
......@@ -74,16 +78,19 @@
<script>
import CardTit from '@/components/cardTit.vue';
import {
mapGetters, mapState
mapGetters,
mapState
} from 'vuex';
export default {
components: {CardTit},
components: {
CardTit
},
data() {
return {
imgbaseUrl: this.$globalv.imgBaseUrl,
pageTitle:"寄件申请",
pageTitle: "寄件申请",
jfDate: Date.now(),
classes:[],
classes: [],
// 物品清单
goodsList: [],
fileList: [{
......@@ -125,34 +132,37 @@
},
},
dataTree: [{
text: "一年级",
value: "1-0",
children: [{
text: "1.1班",
value: "1-1"
text: "一年级",
value: "1-0",
children: [{
text: "1.1班",
value: "1-1"
},
{
text: "1.2班",
value: "1-2"
}
]
},
{
text: "1.2班",
value: "1-2"
}]
},
{
text: "二年级",
value: "2-0",
children: [{
text: "2.1班",
value: "2-1"
text: "二年级",
value: "2-0",
children: [{
text: "2.1班",
value: "2-1"
},
{
text: "2.2班",
value: "2-2"
}
]
},
{
text: "2.2班",
value: "2-2"
}]
},
{
text: "三年级",
value: "3-0",
disable: true
}]
text: "三年级",
value: "3-0",
disable: true
}
]
};
},
created() {
......@@ -169,6 +179,7 @@
uni.setNavigationBarTitle({
title: this.pageTitle
});
this.initData()
},
watch: {
jfDate() {
......@@ -176,6 +187,13 @@
},
},
methods: {
async initData(){
// 获取采购列表
await this.getWupinTypeList("dict_dq").then(res=>{
console.log('getWupinTypeList',res)
// this.dataTree = res
})
},
onGoodsCG() {
uni.navigateBack()
},
......@@ -202,21 +220,45 @@
console.log("delGoodsInfo", e)
this.goodsList.splice(e)
},
selectedGoodsList(goodsList){
selectedGoodsList(goodsList) {
console.log("selectedGoodsList", goodsList)
this.goodsList = goodsList
this.isAddWupin = false
},
onpopupclosed(){
async getWupinTypeList(tbName) {
let _self = this
let data = {
"tableName": tbName
}
let typeList = []
uni.$u.http.post('/DictList', data).then(data => {
// 数据处理:
data.map(item => {
typeList.push({
name: item.mc,
value: item.id
})
})
// uni.setStorage({
// key: 'wupinTypeList',
// data: _self.cgTypeList
// })
console.log(typeList);
}).catch(err => {
uni.$u.toast(err)
})
return typeList
},
onpopupclosed() {
}
},
onReady() {
},
onReady() {},
};
</script>
<style scoped lang="scss">
.input-value{
font-size: 16px !important; padding: 0px !important;
.input-value {
font-size: 16px !important;
padding: 0px !important;
}
</style>
\ No newline at end of file
......@@ -9,21 +9,17 @@
<view class="fl-grid2">
<view class="bd1 pdtb10 mgb fl-rsbc bgwhite cu mgr" @click="isShowlyType = true">
<view class="">
<u--input v-model="cgForm.cgtype" readonly placeholder="请选择申请采购类型"
border="none"></u--input>
<u--input v-model="cgForm.cgtype" readonly placeholder="采购物品类型" border="none"></u--input>
</view>
<view class="cu mgr5"><u-icon name="arrow-down"></u-icon></view>
</view>
<view class="mgb bd1">
<view class="pdtb10 tr">
{{userInfo.deptName}}
</view>
<view class="pdtb10 tr">{{userInfo.deptName}}</view>
</view>
</view>
<view class="w100 fl-rsbc bgwhite cu">
<view class="w100 fl-rsbc bgwhite cu bdr">
<u--textarea height="140" v-model="cgForm.remark" placeholder="请输入事由"
count></u--textarea>
<u--textarea height="140" v-model="cgForm.remark" placeholder="请输入事由" count></u--textarea>
</view>
</view>
</view>
......@@ -145,7 +141,7 @@
fileName: '2024-09-01 物品清单附件1'
}],
cgForm: {
cgtype: "请选择采购类型",
cgtype: "",
type: null,
remark: ''
},
......
<template>
<view class="detailPage bggray cardpd h100">
<!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
<u--form
labelPosition="top"
labelWidth="400"
ref="uForm"
>
<view class="mgb cardview pd bgwhite">
<ApplyCard :sqItem="sqItem" />
<view>
<view class="pd bggray" v-show="false">
<view class="pd bgwhite bdr">
<u-skeleton rows="3" title avatarSize="80" avatar loading></u-skeleton>
<view class="pdt">
<u-skeleton rows="3" loading></u-skeleton>
</view>
</view>
<view class="pd bgwhite bdr mgt">
<view class="pdt">
<u-skeleton rows="3" loading></u-skeleton>
</view>
</view>
<!-- 物品领用卡片 -->
<view class="pdb" v-if="goodsInfoList.length > 0">
<view class="pdb fl-rsbc">
<view class="stit">物品清单</view>
</view>
<view class="detailPage bggray cardpd h100">
<!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
<u--form labelPosition="top" labelWidth="400" ref="uForm">
<view class="mgb cardview pd bgwhite">
<ApplyCard :sqItem="sqItem" />
</view>
<view class="cardview bgwhite pd mgb10" v-for="(item,index) in goodsInfoList" :key="index">
<addDonegoodsCard :goodsInfo="item" :isDetail="true" :isFold="false" :isCG="true" :isAdd="false"/>
<!-- <view class="fl mgt">
<!-- 物品领用卡片 -->
<view class="pdb" v-if="goodsInfoList.length > 0">
<view class="pdb fl-rsbc">
<view class="stit">物品清单</view>
</view>
<view class="cardview bgwhite pd mgb10" v-for="(item,index) in goodsInfoList" :key="index">
<addDonegoodsCard :goodsInfo="item" :isDetail="true" :isFold="false" :isCG="true"
:isAdd="false" />
<!-- <view class="fl mgt">
<view class="mgr5"><u--image :src="imgbaseUrl + 'sl.png'" width="15px" height="15px" @click="click"></u--image></view>
<view class="stext">期望交付日期:2024-03-11 10:28</view>
</view>
......@@ -24,132 +35,125 @@
<text class="desctit">备注:</text>
<text class="dectext">备注</text>
</view> -->
</view>
</view>
</view>
<!-- <view class="pdb">
<view class="stit pdb">审批流程:</view>
<view>
<TimeLine :items="timelineData" />
<view class="pdb">
<view class="stit pdb">审批流程:</view>
<view>
<TimeLine :items="timelineData" />
</view>
</view>
</view> -->
</u--form>
<!-- <view class="">
</u--form>
<!-- <view class="">
<u-button type="primary" class="confirm-btn" @click="onGoodsCG" >提交</u-button>
</view> -->
</view>
</view>
</template>
<script>
import TimeLine from '@/components/TimeLine.vue'
import ApplyCard from '@/components/applyCard.vue'
import addDonegoodsCard from '@/components/addDonegoodsCard.vue'
import AddWupinSL from '@/pages/workSpace/wupin/addWupinSL.vue'
export default {
components: {TimeLine,addDonegoodsCard,AddWupinSL,ApplyCard},
data() {
return {
imgbaseUrl : this.$globalv.imgBaseUrl,
pageTitle:"物品采购详细",
timelineData: [
{
title: '事件一111111',
date: '2023-04-01',
content: '这是第一个事件的内容111',
username: '张三',
avatar: 'avatar1.jpg',
status: 'status1' // 假设这是状态1
},
{
title: '事件二',
date: '2023-04-05',
content: '这是第二个事件的内容',
username: '李四',
avatar: 'avatar2.jpg',
status: 'status2' // 假设这是状态2
},
{
title: '事件三',
date: '2023-04-10',
content: '这是第三个事件的内容',
username: '王五',
avatar: 'avatar3.jpg',
status: 'status3' // 假设这是状态3
} ],
sqItem:{
// Num: "24XQ0008",
// Status: 1,
// StatusName: "运行",
// sqBumen: "IT管理部",
// sqDate: "2024-03-29 21:11:40",
// sqUser: "系统管理员",
// zyid: 1021,
// bz:'',
},
goodsInfoList:[],
userInfo:{
nickname:"蒋晓飞",
department:"技术咨询",
avatar:""
},
zyid:0,
};
},
methods: {
open(){
console.log("打开")
import TimeLine from '@/components/TimeLine.vue'
import ApplyCard from '@/components/applyCard.vue'
import addDonegoodsCard from '@/components/addDonegoodsCard.vue'
import AddWupinSL from '@/pages/workSpace/wupin/addWupinSL.vue'
import {CommonApi} from "@/config/commonApi.js";
export default {
components: {
TimeLine,
addDonegoodsCard,
AddWupinSL,
ApplyCard
},
async initData(){
console.log("initData")
const eventChannel = this.getOpenerEventChannel();
eventChannel.once('cgDetail', ({data}) => {
console.log(data)
let headImgSrc
uni.$u.http.post('/xzgl/cgsqList', {"st_id":data.stid,"zyid":data.zyid} ).then( async( res ) => {
console.log('cgsqList:',res);
await uni.$u.http.post('/GetStaffImg', {"st_id": res[0].sqr } ).then((res2) => {
console.log('data', res2);
headImgSrc = "data:image/png;base64," + res2[0]["imgStr"]
data() {
return {
imgbaseUrl: this.$globalv.imgBaseUrl,
pageTitle: "物品采购详细",
timelineData: [],
sqItem: {
// Num: "24XQ0008",
// Status: 1,
// StatusName: "运行",
// sqBumen: "IT管理部",
// sqDate: "2024-03-29 21:11:40",
// sqUser: "系统管理员",
// zyid: 1021,
// bz:'',
},
goodsInfoList: [],
userInfo: {
nickname: "蒋晓飞",
department: "技术咨询",
avatar: ""
},
zyid: 0,
};
},
methods: {
open() {
console.log("打开")
},
async initData() {
console.log("initData")
const eventChannel = this.getOpenerEventChannel();
eventChannel.once('cgDetail', ({
data
}) => {
console.log(data)
let headImgSrc
let TaskInfor
uni.$u.http.post('/xzgl/cgsqList', {
"st_id": data.stid,
"zyid": data.zyid
}).then(async (res) => {
console.log('cgsqList:', res);
headImgSrc = await CommonApi.getHeadImgSrc(res[0].sqr)
TaskInfor = await CommonApi.getTaskInfor(res[0].sqr,res[0].row_guid)
console.log('TaskInfor:', TaskInfor);
// 流程信息
TaskInfor["listData"].map(listDataRes=>{
this.timelineData.push(
{
title: listDataRes.task_statusname,
date: listDataRes.task_endtime,
content: listDataRes.node_name,
username: listDataRes.st_name,
avatar: "data:image/png;base64," + listDataRes.grzp,
status: listDataRes.task_status
}
)
})
// 数据处理
this.sqItem = {
Num: data.Num,
headImgSrc: headImgSrc,
Status: res[0].flowStatus,
StatusName: data.StatusName,
sqBumen: res[0].sqbmmc,
sqDate: data.sqDate,
sqcglxmc: res[0].sqcglxmc,
sqUser: res[0].sqrmc,
zyid: res[0].zyid,
bz: res[0].bz
}
this.goodsInfoList = res
console.log('sqItem:', this.sqItem);
console.log('goodsInfoList:', this.goodsInfoList);
}).catch(err => {
uni.$u.toast(err)
})
// 数据处理
this.sqItem = {
Num: data.Num,
headImgSrc: headImgSrc,
Status: res[0].flowStatus,
StatusName: data.StatusName,
sqBumen: res[0].sqbmmc,
sqDate: data.sqDate,
sqcglxmc: res[0].sqcglxmc,
sqUser: res[0].sqrmc,
zyid: res[0].zyid,
bz:res[0].bz
}
this.goodsInfoList = res
console.log('sqItem:',this.sqItem);
console.log('goodsInfoList:',this.goodsInfoList);
}).catch(err => {
uni.$u.toast(err)
})
})
},
},
onReady() {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
// this.$refs.uForm.setRules(this.rules)
},
onLoad() {
this.initData()
// 设置首页标题
uni.setNavigationBarTitle({
title: this.pageTitle
});
},
async getHeadImgSrc(st_id){
console.log('getHeadImgSrc', st_id);
uni.$u.http.post('/GetStaffImg', {"st_id": st_id } ).then((res) => {
console.log('data', res);
return "data:image/png;base64," + res[0]["imgStr"]
})
}
},
onReady() {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
// this.$refs.uForm.setRules(this.rules)
},
onLoad() {
this.initData()
// 设置首页标题
uni.setNavigationBarTitle({
title: this.pageTitle
});
},
};
</script>
};
</script>
\ No newline at end of file
......@@ -10,7 +10,7 @@
<view class="fl-grid2">
<view class="bd1 pdtb10 mgb fl-rsbc bgwhite cu mgr" @click="isShowlyType = true">
<view class="">
<u--input v-model="slForm.cgtype" readonly placeholder="请选择申请采购类型"
<u--input v-model="slForm.cgtype" readonly placeholder="申领物品类型"
border="none"></u--input>
</view>
<view class="cu mgr5"><u-icon name="arrow-down"></u-icon></view>
......
......@@ -18,7 +18,7 @@
<u--input border="none" :maxlength="10" placeholder="驾驶员" type="number" clearable></u--input>
</view>
</view>
<view class="pdtb10 fl-rsbc bgwhite bd1">
<view class="pdtb5 fl-rsbc bgwhite bd1">
<uni-datetime-picker :border="false" returnType="timestamp" v-model="jdForm.jfDate"
@change="selectedPicker($event)" type="date" :end="Date.now() + 10000000000000"
:start="Date.now()" />
......
......@@ -41,7 +41,7 @@
<view class="mgb">
<view class="pdb">
<view class="fl">
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'zs.png'" width="22px" height="22px"></u--image></view>
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'zs.png'" width="25px" height="25px"></u--image></view>
<view class="stit" style="width: 80px;">住宿</view>
<view class="line"></view>
<view class="circle"></view>
......@@ -82,7 +82,7 @@
</view>
<view class="mgb">
<view class="fl">
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'zs.png'" width="22px" height="22px"></u--image></view>
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'lp.png'" width="22px" height="22px"></u--image></view>
<view class="stit" style="width: 80px;">礼品</view>
<view class="line"></view>
<view class="circle"></view>
......@@ -113,7 +113,7 @@
<view class="mgb">
<view class="pdb">
<view class="fl">
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'zs.png'" width="22px" height="22px"></u--image></view>
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'yj.png'" width="25px" height="25px"></u--image></view>
<view class="stit" style="width: 80px;">迎接</view>
<view class="line"></view>
<view class="circle"></view>
......@@ -138,7 +138,7 @@
</view>
<view class="pdtb">
<view class="fl">
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'zs.png'" width="22px" height="22px"></u--image></view>
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'jc.png'" width="22px" height="22px"></u--image></view>
<view class="stit" style="width: 80px;">就餐</view>
<view class="line"></view>
<view class="circle"></view>
......@@ -158,7 +158,7 @@
</view>
<view class="pdtb">
<view class="fl">
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'zs.png'" width="22px" height="22px"></u--image></view>
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'sb.png'" width="25px" height="25px"></u--image></view>
<view class="stit" style="width: 80px;">送行</view>
<view class="line"></view>
<view class="circle"></view>
......@@ -178,7 +178,7 @@
</view>
<view class="pdtb">
<view class="fl">
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'zs.png'" width="22px" height="22px"></u--image></view>
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'cg.png'" width="25px" height="25px"></u--image></view>
<view class="stit" style="width: 80px;">参观</view>
<view class="line"></view>
<view class="circle"></view>
......@@ -207,9 +207,15 @@
<u--textarea height="80" v-model="zdForm.reasons" placeholder="其他要求:" count></u--textarea>
</view>
</view>
<view class="pdt fl-rsbc">
<view class="stit">其他</view>
</view>
<view class="fl pdtb">
<view class="cu mgr5"><u--image :showLoading="true" :src="imgbaseUrl + 'qt.png'" width="25px" height="25px"></u--image></view>
<view class="stit" style="width: 80px;">其他</view>
<view class="line"></view>
<view class="circle"></view>
</view>
<view class="cardview bgwhite pd">
<view class="pdb fl-rsbc bgwhite">
<view class="w100 fl-rsbc mgt10 bgwhite cu bdr">
<checkbox-group @change="radioChange" class="fl-wrap">
......
......@@ -885,6 +885,12 @@ vertical-align: top;
border-style: solid ;
border-color: rgba(255, 255, 255, 1);
}
.bluebg2{
background: linear-gradient(180deg, rgba(214, 238, 255, 1) 0%, rgba(255, 255, 255, 1) 8%, rgba(255, 255, 255, 1) 100%);
border-top-width: 1px;
border-style: solid ;
border-color: rgba(255, 255, 255, 1);
}
.bluebg1{
background: linear-gradient(145.89deg, rgba(211, 236, 254, 1) 0%, rgba(65, 178, 255, 1) 100%);
}
......
......@@ -255,7 +255,7 @@
}
.placeholder {
color: grey;
color: #c0c4cc;
font-size: 14px;
}
......
......@@ -359,7 +359,7 @@
}
.placeholder {
color: grey;
color: #c0c4cc;
font-size: 15px;
}
......
......@@ -110,7 +110,7 @@
>
<u-icon
:name="uploadIcon"
size="26"
size="72"
:color="uploadIconColor"
></u-icon>
<text
......
......@@ -885,6 +885,12 @@ vertical-align: top;
border-style: solid ;
border-color: rgba(255, 255, 255, 1);
}
.bluebg2{
background: linear-gradient(180deg, rgba(214, 238, 255, 1) 0%, rgba(255, 255, 255, 1) 8%, rgba(255, 255, 255, 1) 100%);
border-top-width: 1px;
border-style: solid ;
border-color: rgba(255, 255, 255, 1);
}
.bluebg1{
background: linear-gradient(145.89deg, rgba(211, 236, 254, 1) 0%, rgba(65, 178, 255, 1) 100%);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册