Commit 618f557e authored by 李苏's avatar 李苏 💬

调整

parent 3f82e231
<template>
<view class="bg-white">
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">{{$Route.meta.title}}</block>
......@@ -48,34 +48,34 @@
</u-form-item>
</u-form>
<!-- 附件列表 -->
</view>
</view>
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default{
async onLoad(){
this.query=this.$Route.query
this.typeMap = await this.$match({
url: 'kqgl/gzrb/init/type'
})
},
data(){
return{
typeMap:{},
onload:false,
/* 传递的信息 */
query:{
},
/* 完成表单 */
rules:{
sjwcsj:[{
required:true,
......@@ -84,26 +84,26 @@
wxwcjg:[{
required:true,
message:'请选择维修完成结果',
}],
sjgz:[{
required:true,
message:'请输入实际故障',
}],
wxfy:[{
required:true,
message:'请输入维修费用',
}]
}
}
},
methods:{
submit(){
this.$refs.form.validate().then(res => {
uni.showModal({
title: '提示',
content: '是否继续操作。',
......@@ -128,10 +128,10 @@
uni.navigateBack({
delta: 1
});
}
})
}
}
});
......@@ -146,9 +146,9 @@
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
</style>
......@@ -8,7 +8,7 @@
<u-icon @tap='xjgzrb' name="plus" color="#fff" size="20"></u-icon>
</template>
</cu-custom>
<!-- 待维修任务 -->
<view class="padding10" style="padding-top: 10px;position: relative;">
<!-- 搜索条件 -->
......@@ -93,7 +93,7 @@
</text>
</view>
</template>
</ac-card>
......@@ -106,12 +106,12 @@
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default {
data() {
return {
/* tags标签页需求属性 */
/* 待维修任务 */
dwxQueryParams: {
djid: '',
......@@ -153,7 +153,7 @@
})
},
dwxSearch() {
this.dwxQueryParams.pageNo = 1;
this.dwxList = [];
this.dwxToltal = 0
......@@ -174,13 +174,12 @@
})
},
},
async onLoad() {
this.apiGetDwxList()
eventBus.$on('save', () => {
uni.$on('save', () => {
this.dwxSearch()
})
this.ztMap = await this.$match({
......@@ -189,12 +188,12 @@
this.kqlxMap = await this.$match({
url: 'kqgl/gzrb/init/type'
})
},
onUnload() {
eventBus.$off('save')
uni.$off('save')
},
}
</script>
......
......@@ -5,22 +5,24 @@
<block slot="backText">返回</block>
<block slot="content">{{$Route.meta.title}}</block>
</cu-custom>
<!-- 提交提示 -->
<u-notify ref="uNotify"></u-notify>
<view class="padding10">
<!-- 填写报修信息 -->
<u-form ref="form" :model='form' :rules='rules' labelPosition='top'
:labelStyle="{fontSize:'15px',fontWeight:550}" labelWidth='200px'>
<u-form-item label="工作日期" prop='ywrq'>
<u-form-item required label="工作日期" prop='ywrq'>
<ac-timeselect mode='date' height='35px' style="width: 100%;" v-model="form.ywrq" />
</u-form-item>
<u-form-item label="考勤类型" prop='type'>
<u-form-item required label="考勤类型" prop='type'>
<ac-relselect url='kqgl/gzrb/init/type' v-model="form.type" />
</u-form-item>
<u-form-item label="项目" prop='xmid'>
<u-form-item required label="项目" prop='xmid'>
<u-input @tap.native='xzxm' readonly class="ac-border" style="height: 33px;" border=""
suffixIcon="search" v-model="form.xmName"></u-input>
</u-form-item>
<u-form-item label="工时(天)" prop='gs'>
<u-form-item required label="工时(天)" prop='gs'>
<u-input type='number' class="ac-border" style="height: 33px;" border=""
v-model="form.gs"></u-input>
</u-form-item>
......@@ -37,18 +39,18 @@
<u-form-item label="商机描述">
<u-textarea :maxlength='1500' v-model="form.sjwhSjms" placeholder="请输入内容" count></u-textarea>
</u-form-item>
<u-form-item label="工作内容" prop='gznr'>
<u-form-item required label="工作内容" prop='gznr'>
<u-textarea :maxlength='1500' v-model="form.gznr" placeholder="请输入内容" count></u-textarea>
</u-form-item>
<u-form-item label="下一步计划" prop='gzjh'>
<u-textarea :maxlength='1500' v-model="form.gzjh" placeholder="请输入内容" count></u-textarea>
</u-form-item>
<u-form-item label="汇报人" prop='hbrid'>
<u-form-item required label="汇报人" prop='hbrid'>
<ac-personselectcode mode='date' height='35px' style="width: 100%;" v-model="form.hbrid" />
</u-form-item>
<!-- <ac-upload accept='image' ref="uploadimage" />
<ac-upload accept='video' ref="uploadvideo" /> -->
<u-button @tap='submit' type="primary" style="width: 60vw;height: 40px;margin-top: 15px;"
......@@ -65,7 +67,7 @@
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default {
onLoad() {
uni.getStorage({
......@@ -75,22 +77,22 @@
this.form.hbrid = res.data.userid
}
});
eventBus.$on('xzxm', (xmxx) => {
uni.$on('xzxm', (xmxx) => {
this.form.xmid = xmxx.id
this.form.xmName = xmxx.name
})
eventBus.$on('xzsj', (sjxx) => {
uni.$on('xzsj', (sjxx) => {
this.form.sjwhid = sjxx.id
this.form.sjwhName = sjxx.sjms
})
},
onUnload() {
eventBus.$off('xzxm')
eventBus.$off('xzsj')
uni.$off('xzxm')
uni.$off('xzsj')
},
data() {
return {
btext:'提交日报',
btext: '提交日报',
/* 表单信息 */
form: {
xmName: '',
......@@ -149,11 +151,11 @@
})
},
submit() {
this.$refs.form.validate().then(res => {
uni.showModal({
title: '提示',
content: '是否继续操作。',
......@@ -171,7 +173,8 @@
})
const wfdata = addres.data.records[0]
wfdata.wfoperate = '1'
let userres = await this.$post('kqgl/gzrb/wfnextinfo', wfdata)
let userres = await this.$post(
'kqgl/gzrb/wfnextinfo', wfdata)
const tjlist = userres.data.records[0]
this.$post('kqgl/gzrb/wfgo', {
nextinfo: tjlist,
......@@ -179,16 +182,33 @@
}).then(res => {
if (res.success) {
this.btext='继续提交'
this.$tip.toast('提交成功')
this.form.gznr=''
this.form.gzjh=''
this.btext = '继续提交'
this.$refs.uNotify.show({
top: 10,
type: 'success',
message: '日报提交成功!',
duration: 1000 * 3,
fontSize: 14,
safeAreaInsetTop: true
})
this.form.gznr = ''
this.form.gzjh = ''
this.form.xmid = ''
this.form.xmName = ''
}
})
} else {
this.$tip.toast('提交失败')
this.$refs.uNotify.show({
top: 10,
type: 'error',
message: '日报提交失败!',
duration: 1000 * 3,
fontSize: 14,
safeAreaInsetTop: true
})
}
})
......@@ -203,4 +223,4 @@
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
</style>
......@@ -22,7 +22,7 @@
<u-input class="ac-border search-input" v-model="queryParams.xmmc"></u-input>
</u-form-item>
</u-col>
</u-row>
<!-- <u-row>
......@@ -88,7 +88,7 @@
{{item.sjms}}
</view>
</view>
<view class="ac-card-item " style="text-align: right;padding-right: 10px;padding-top: 0px;">
<text @tap='handleIt(item)' class="tap">
选择
......@@ -107,9 +107,9 @@
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default{
async onLoad(){
this.ztMap= await this.$match({
url:'/xmgl/gcxm/init/zt'
......@@ -118,12 +118,12 @@
// url:'device/sbdxj/dxjrw/init/zt'
// })
this.dwxSearch()
eventBus.$on('save', () => {
uni.$on('save', () => {
this.dwxSearch()
})
},
onUnload() {
eventBus.$off('save')
uni.$off('save')
},
data() {
return{
......@@ -154,7 +154,7 @@
/* 获取待点检任务 */
apiGetList() {
this.$post('crm/sjwh/query', {
...this.queryParams
}).then(res => {
this.total = res.data.total || 0
......@@ -165,8 +165,8 @@
},
/* 处理点检任务 */
handleIt(item) {
eventBus.$emit('xzsj',item)
uni.$emit('xzsj',item)
uni.navigateBack({
delta: 1
});
......
......@@ -22,7 +22,7 @@
<u-input class="ac-border search-input" v-model="queryParams.xmmc"></u-input>
</u-form-item>
</u-col>
</u-row>
<u-row>
......@@ -130,7 +130,7 @@
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default{
async onLoad(){
this.ztMap= await this.$match({
......@@ -140,12 +140,12 @@
// url:'device/sbdxj/dxjrw/init/zt'
// })
this.dwxSearch()
eventBus.$on('save', () => {
uni.$on('save', () => {
this.dwxSearch()
})
},
onUnload() {
eventBus.$off('save')
uni.$off('save')
},
data() {
return{
......@@ -176,7 +176,7 @@
/* 获取待点检任务 */
apiGetList() {
this.$post('xmgl/gcxm/query', {
...this.queryParams
}).then(res => {
this.total = res.data.total || 0
......@@ -187,8 +187,8 @@
},
/* 处理点检任务 */
handleIt(item) {
eventBus.$emit('xzxm',item)
uni.$emit('xzxm',item)
uni.navigateBack({
delta: 1
});
......
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