Commit a16a9ee2 authored by 李苏's avatar 李苏 💬

增加工作流和节流搜索

parent ff96ec7c
...@@ -2,7 +2,7 @@ let BASE_URL = '' ...@@ -2,7 +2,7 @@ let BASE_URL = ''
if (process.env.NODE_ENV == 'development') { if (process.env.NODE_ENV == 'development') {
BASE_URL = 'http://119.3.92.249:18080/dmg' /* 开发环境*/ BASE_URL = 'http://119.3.92.249:18080/dmg' /* 开发环境*/
} else { } else {
BASE_URL = '/app'// 生产环境 BASE_URL = 'http://119.3.92.249:18080/dmg'// 生产环境
} }
let staticDomainURL = BASE_URL+ '/sys/common/static'; let staticDomainURL = BASE_URL+ '/sys/common/static';
......
<template> <template>
<view class="bg-white"> <view class="bg-white">
<!--
退回的意见框
-->
<u-popup style="border-radius: 40px;" :show="show" mode="center" @close='show=false' >
<view class="psdoalog">
<u-form>
<u-row>
<u-col span="12">
<u-form-item label="处理意见" >
<u-textarea v-model="comment" ></u-textarea>
</u-form-item>
</u-col>
</u-row>
</u-form>
<u-button type="primary" @tap='clyj' class="psbutton" text="确定"></u-button>
</view>
</u-popup>
<cu-custom bgColor="bg-gradual-blue" :isBack="true"> <cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="backText">返回</block> <block slot="backText">返回</block>
<block slot="content">{{$Route.meta.title}}</block> <block slot="content">{{$Route.meta.title}}</block>
</cu-custom> </cu-custom>
<view class="padding10 bt1"> <view class="padding10 bt1">
<u-notify ref="uNotify"></u-notify>
<view style="line-height: 34px;font-size: 17px;font-weight: 800;"> <view style="line-height: 34px;font-size: 17px;font-weight: 800;">
日报详情 日报详情
</view> </view>
...@@ -35,113 +53,159 @@ ...@@ -35,113 +53,159 @@
{{query.qzkhName||'无'}} {{query.qzkhName||'无'}}
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="商机" borderBottom> <u-form-item label="商机编码" borderBottom>
<view class="common-line"> <view class="common-line">
{{query.sjwhSjms||'无'}} {{query.sjwhCode||'无'}}
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="商机" borderBottom>
<u-textarea autoHeight disabled :maxlength='1500' v-model="query.sjwhSjms"></u-textarea>
</u-form-item>
<u-form-item label="工作内容" borderBottom> <u-form-item label="工作内容" borderBottom>
<u-textarea autoHeight disabled :maxlength='1500' v-model="query.gznr" ></u-textarea> <u-textarea autoHeight disabled :maxlength='1500' v-model="query.gznr"></u-textarea>
</u-form-item> </u-form-item>
<u-form-item label="下一步计划" borderBottom> <u-form-item label="下一步计划" borderBottom>
<u-textarea autoHeight disabled :maxlength='1500' v-model="query.gzjh" ></u-textarea> <u-textarea autoHeight disabled :maxlength='1500' v-model="query.gzjh"></u-textarea>
</u-form-item> </u-form-item>
</u-form> </u-form>
<!-- 附件列表 --> <!-- 附件列表 -->
</view> </view>
<u-divider text="事务操作"></u-divider>
<!-- 提交退回工作流 -->
<view class="padding10 flex">
<u-button style="margin-right: 30px;margin-left: 30px;" @tap='swcz(1)' type='primary' text="提交"></u-button>
<u-button style="margin-right: 30px;margin-left: 30px;" @tap='swcz(2)' type='warning' text="退回"></u-button>
</view>
</view> </view>
</template> </template>
<script> <script>
export default {
async onLoad() {
export default{ this.query = this.$Route.query
async onLoad(){ this.typeMap = await this.$match({
url: 'kqgl/gzrb/init/type'
this.query=this.$Route.query })
this.typeMap = await this.$match({
url: 'kqgl/gzrb/init/type'
})
}, },
data(){ data() {
return{ return {
typeMap:{}, show:false,
comment:'',
typeMap: {},
onload:false, onload: false,
/* 传递的信息 */ /* 传递的信息 */
query:{ query: {
}, },
/* 完成表单 */ /* 完成表单 */
rules:{ rules: {
sjwcsj:[{
required:true,
message:'请选择实际完成时间',
}],
wxwcjg:[{
required:true,
message:'请选择维修完成结果',
}],
sjgz:[{
required:true,
message:'请输入实际故障',
}],
wxfy:[{
required:true,
message:'请输入维修费用',
}]
} }
} }
}, },
methods:{ methods: {
submit(){ async swcz(wfoperate) {
this.$refs.form.validate().then(res => {
uni.showModal({
uni.showModal({ title: '提示',
title: '提示', content: '是否继续操作。',
content: '是否继续操作。', success: async (res) => {
success: (res) => { if (res.confirm) {
if (res.confirm) {
let attachments=[...this.$refs.uploadimage.getList(),...this.$refs.uploadvideo.getList()]
this.$post('device/sbwx/wxysfk/addWxjg', { // 具体操作内容
attachments, const wfdata = this.query
data: { wfdata.wfoperate = wfoperate
...this.form, let userres = await this.$post(
id:this.query.id 'kqgl/gzrb/wfnextinfo', wfdata)
}
const tjlist = userres.data.records[0]
this.tjlist=tjlist
/* 提交 wfoperate=1 */
if(wfoperate==1){
this.$post('kqgl/gzrb/wfgo', {
nextinfo: tjlist,
records: [wfdata]
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$tip.toast('提交成功') this.btext = '继续提交'
this.$refs.uploadimage.clearList() this.$refs.uNotify.show({
this.$refs.uploadvideo.clearList() top: 10,
/* 重置表单 */ type: 'success',
this.$refs.form.resetFields() message: '操作成功!',
this.form.sjwcsj = new Date().getTime() duration: 1000 * 3,
eventBus.$emit('save'); fontSize: 14,
uni.navigateBack({ safeAreaInsetTop: true
delta: 1 })
}); setTimeout(()=>{
uni.navigateBack({
delta: 1
});
},800)
} }
}) })
} }
/* 2 wfgoback */
else if(wfoperate==2){
/* 弹出意见框 */
this.show=true
}
} }
}); }
}) })
/* 根据wfoperatep判定提交退回 */
},
clyj(){
if(this.comment){
/* 提交退回 */
this.show=false
const wfdata = this.query
const tjlist =this.tjlist
tjlist.comment=this.comment
this.$post('kqgl/gzrb/wfgoback', {
nextinfo: tjlist,
records: [wfdata]
}).then(res => {
if (res.success) {
this.$refs.uNotify.show({
top: 10,
type: 'success',
message: '操作成功!',
duration: 1000 * 3,
fontSize: 14,
safeAreaInsetTop: true
})
}
setTimeout(()=>{
uni.navigateBack({
delta: 1
});
},800)
})
}else{
this.$tip.toast('请输入退回意见')
}
} }
}, },
computed:{ computed: {
attachmentsQueryParams(){ attachmentsQueryParams() {
return { return {
groupid:this.query.lydjid groupid: this.query.lydjid
} }
} }
} }
...@@ -150,5 +214,16 @@ ...@@ -150,5 +214,16 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> .psdoalog{
height: 180px;
width: 80vw;
padding: 10px;
padding-top: 30px;
position: relative;
border-radius: 30px;
}
.psbutton{
width: 76px;height: 29px;margin-top: 5px;position: absolute;right: 20px;bottom: 10px;
}
</style>
\ No newline at end of file
...@@ -15,23 +15,28 @@ ...@@ -15,23 +15,28 @@
<u-form :labelStyle=" <u-form labelAlign='center' :labelStyle="
{ {
fontSize:'13px' fontSize:'13px'
} }
" labelWidth='45px'> " labelWidth='45px'>
<u-row> <u-row>
<u-col span="12"> <u-col span="6">
<u-form-item label="单号"> <u-form-item label="开始">
<u-input class="ac-border search-input" v-model="dwxQueryParams.djid"></u-input> <ac-timeselect height='25px' v-model="dwxQueryParams.start"></ac-timeselect>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item label="结束">
<ac-timeselect height='25px' v-model="dwxQueryParams.end"></ac-timeselect>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<u-row> <u-row>
<u-col span="12"> <u-col span="12">
<u-form-item label="状态"> <u-form-item label="事务">
<ac-relselect height='25px' url='kqgl/gzrb/init/zt' v-model="dwxQueryParams.zt"></ac-relselect> <ac-relselect height='25px' url='wf/common/wfstate' v-model="dwxQueryParams.swlx"></ac-relselect>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
...@@ -45,15 +50,18 @@ ...@@ -45,15 +50,18 @@
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-button type="primary" @tap='dwxSearch' class="search-button" icon="search" <u-button throttle-time='1000' type="primary" @tap='dwxSearch' class="search-button" icon="search"
text="搜索"></u-button> text="搜索"></u-button>
</u-col> </u-col>
</u-row> </u-row>
</u-form> </u-form>
<!-- 待维修列表 --> <!-- 待维修列表 -->
<view class="padding10"> <view class="padding10">
<ac-card v-for="(item) in dwxList" :key="item.id" :title="'汇报单号:'+item.djid" <ac-card style="position: relative;" v-for="(item) in dwxList" :key="item.id" :title="'汇报单号:'+item.djid"
:bottomLeftText="'汇报日期:'+$formatDate(item.ywrq) " :bottomRightText="'创建人:'+item.cjr"> :bottomLeftText="'汇报日期:'+$formatDate(item.ywrq) " :bottomRightText="'创建人:'+item.cjr">
<view style="position: absolute;right: 12px;top: 10px;font-size: 15px;font-weight: 700;color: #999;" class="ac-card-value">
{{ztMap[item.zt] }}
</view>
<view class="ac-card-item "> <view class="ac-card-item ">
<view class="ac-card-label"> <view class="ac-card-label">
考勤类型 考勤类型
...@@ -70,14 +78,14 @@ ...@@ -70,14 +78,14 @@
{{item.gs}}天 {{item.gs}}天
</view> </view>
</view> </view>
<view class="ac-card-item "> <!-- <view class="ac-card-item ">
<view class="ac-card-label"> <view class="ac-card-label">
状态 状态
</view> </view>
<view class="ac-card-value"> <view class="ac-card-value">
{{ztMap[item.zt] }} {{ztMap[item.zt] }}
</view> </view>
</view> </view> -->
<template #unique > <template #unique >
<view class="ac-card-item "> <view class="ac-card-item ">
<view class="ac-card-label"> <view class="ac-card-label">
...@@ -87,6 +95,14 @@ ...@@ -87,6 +95,14 @@
{{item.gcxmName}} {{item.gcxmName}}
</view> </view>
</view> </view>
<view class="ac-card-item ">
<view class="ac-card-label">
工作内容
</view>
<view class="ac-card-value">
{{item.gznr}}
</view>
</view>
<view class="ac-card-item " style="text-align: right;padding-right: 10px;padding-top: 0px;"> <view class="ac-card-item " style="text-align: right;padding-right: 10px;padding-top: 0px;">
<text @tap='handleIt(item)' class="tap"> <text @tap='handleIt(item)' class="tap">
详情 详情
...@@ -114,8 +130,10 @@ ...@@ -114,8 +130,10 @@
/* 待维修任务 */ /* 待维修任务 */
dwxQueryParams: { dwxQueryParams: {
start:'',
end:'',
djid: '', djid: '',
zt: '', swlx: 'W',
pageSize: 20, pageSize: 20,
pageNo: 1 pageNo: 1
}, },
...@@ -153,11 +171,12 @@ ...@@ -153,11 +171,12 @@
}) })
}, },
dwxSearch() { dwxSearch() {
this.dwxQueryParams.pageNo = 1; this.dwxQueryParams.pageNo = 1;
this.dwxList = []; this.dwxList = [];
this.dwxToltal = 0 this.dwxToltal = 0
this.apiGetDwxList() this.apiGetDwxList()
}, },
dwxLoadmore() { dwxLoadmore() {
this.dwxQueryParams.pageNo++ this.dwxQueryParams.pageNo++
...@@ -176,12 +195,14 @@ ...@@ -176,12 +195,14 @@
}, },
},
onShow() {
console.log(uni.$u.throttle)
this.dwxSearch()
}, },
async onLoad() { async onLoad() {
uni.$on('save', () => {
this.dwxSearch() // this.apiGetDwxList()
})
this.apiGetDwxList()
this.ztMap = await this.$match({ this.ztMap = await this.$match({
url: 'kqgl/gzrb/init/zt' url: 'kqgl/gzrb/init/zt'
}) })
......
...@@ -31,14 +31,17 @@ ...@@ -31,14 +31,17 @@
v-model="form.qzkhid" /> v-model="form.qzkhid" />
</u-form-item> </u-form-item>
<u-form-item label="商机" prop='sjwhid'> <u-form-item label="商机编码" prop='sjwhid'>
<u-input @tap.native='xzsj' readonly class="ac-border" style="height: 33px;" border="" <u-input @tap.native='xzsj' readonly class="ac-border" style="height: 33px;" border=""
suffixIcon="search" v-model="form.sjwhName"></u-input> suffixIcon="search" v-model="form.sjwhCode"></u-input>
</u-form-item>
<u-form-item label="商机" prop='sjwhSjms'>
<u-textarea disabled :maxlength='1500' v-model="form.sjwhSjms" placeholder="请输入内容" count></u-textarea>
</u-form-item> </u-form-item>
<u-form-item label="商机描述"> <!-- <u-form-item label="商机描述">
<u-textarea :maxlength='1500' v-model="form.sjwhSjms" placeholder="请输入内容" count></u-textarea> <u-textarea :maxlength='1500' v-model="form.sjwhSjms" placeholder="请输入内容" count></u-textarea>
</u-form-item> </u-form-item> -->
<u-form-item required label="工作内容" prop='gznr'> <u-form-item required label="工作内容" prop='gznr'>
<u-textarea :maxlength='1500' v-model="form.gznr" placeholder="请输入内容" count></u-textarea> <u-textarea :maxlength='1500' v-model="form.gznr" placeholder="请输入内容" count></u-textarea>
</u-form-item> </u-form-item>
...@@ -73,7 +76,6 @@ ...@@ -73,7 +76,6 @@
uni.getStorage({ uni.getStorage({
key: 'mobile', key: 'mobile',
success: (res) => { success: (res) => {
console.log(res)
this.form.hbrid = res.data.userid this.form.hbrid = res.data.userid
} }
}); });
...@@ -83,7 +85,8 @@ ...@@ -83,7 +85,8 @@
}) })
uni.$on('xzsj', (sjxx) => { uni.$on('xzsj', (sjxx) => {
this.form.sjwhid = sjxx.id this.form.sjwhid = sjxx.id
this.form.sjwhName = sjxx.sjms this.form.sjwhSjms = sjxx.sjms
this.form.sjwhCode = sjxx.code
}) })
}, },
onUnload() { onUnload() {
...@@ -95,6 +98,9 @@ ...@@ -95,6 +98,9 @@
btext: '提交日报', btext: '提交日报',
/* 表单信息 */ /* 表单信息 */
form: { form: {
/* 退回意见 */
comment:'',
sjwhCode:'',
xmName: '', xmName: '',
sjwhid: '', sjwhid: '',
sjwhName: '', sjwhName: '',
...@@ -196,6 +202,7 @@ ...@@ -196,6 +202,7 @@
this.form.xmid = '' this.form.xmid = ''
this.form.xmName = '' this.form.xmName = ''
} }
}) })
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-button type="primary" @tap='dwxSearch' class="search-button" icon="search" <u-button type="primary" throttle-time='1000' @tap='dwxSearch' class="search-button" icon="search"
text="搜索"></u-button> text="搜索"></u-button>
</u-col> </u-col>
</u-row> </u-row>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-button type="primary" @tap='dwxSearch' class="search-button" icon="search" <u-button type="primary" throttle-time='1000' @tap='dwxSearch' class="search-button" icon="search"
text="搜索"></u-button> text="搜索"></u-button>
</u-col> </u-col>
</u-row> </u-row>
......
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