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

调整

parent 3f82e231
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default{ export default{
async onLoad(){ async onLoad(){
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default { export default {
data() { data() {
return { return {
...@@ -179,8 +179,7 @@ ...@@ -179,8 +179,7 @@
}, },
async onLoad() { async onLoad() {
this.apiGetDwxList() this.apiGetDwxList()
eventBus.$on('save', () => { uni.$on('save', () => {
this.dwxSearch() this.dwxSearch()
}) })
this.ztMap = await this.$match({ this.ztMap = await this.$match({
...@@ -194,7 +193,7 @@ ...@@ -194,7 +193,7 @@
}, },
onUnload() { onUnload() {
eventBus.$off('save') uni.$off('save')
}, },
} }
</script> </script>
......
...@@ -5,22 +5,24 @@ ...@@ -5,22 +5,24 @@
<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>
<!-- 提交提示 -->
<u-notify ref="uNotify"></u-notify>
<view class="padding10"> <view class="padding10">
<!-- 填写报修信息 --> <!-- 填写报修信息 -->
<u-form ref="form" :model='form' :rules='rules' labelPosition='top' <u-form ref="form" :model='form' :rules='rules' labelPosition='top'
:labelStyle="{fontSize:'15px',fontWeight:550}" labelWidth='200px'> :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" /> <ac-timeselect mode='date' height='35px' style="width: 100%;" v-model="form.ywrq" />
</u-form-item> </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" /> <ac-relselect url='kqgl/gzrb/init/type' v-model="form.type" />
</u-form-item> </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="" <u-input @tap.native='xzxm' readonly class="ac-border" style="height: 33px;" border=""
suffixIcon="search" v-model="form.xmName"></u-input> suffixIcon="search" v-model="form.xmName"></u-input>
</u-form-item> </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="" <u-input type='number' class="ac-border" style="height: 33px;" border=""
v-model="form.gs"></u-input> v-model="form.gs"></u-input>
</u-form-item> </u-form-item>
...@@ -37,13 +39,13 @@ ...@@ -37,13 +39,13 @@
<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 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>
<u-form-item label="下一步计划" prop='gzjh'> <u-form-item label="下一步计划" prop='gzjh'>
<u-textarea :maxlength='1500' v-model="form.gzjh" placeholder="请输入内容" count></u-textarea> <u-textarea :maxlength='1500' v-model="form.gzjh" placeholder="请输入内容" count></u-textarea>
</u-form-item> </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" /> <ac-personselectcode mode='date' height='35px' style="width: 100%;" v-model="form.hbrid" />
</u-form-item> </u-form-item>
...@@ -65,7 +67,7 @@ ...@@ -65,7 +67,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default { export default {
onLoad() { onLoad() {
uni.getStorage({ uni.getStorage({
...@@ -75,22 +77,22 @@ ...@@ -75,22 +77,22 @@
this.form.hbrid = res.data.userid this.form.hbrid = res.data.userid
} }
}); });
eventBus.$on('xzxm', (xmxx) => { uni.$on('xzxm', (xmxx) => {
this.form.xmid = xmxx.id this.form.xmid = xmxx.id
this.form.xmName = xmxx.name this.form.xmName = xmxx.name
}) })
eventBus.$on('xzsj', (sjxx) => { uni.$on('xzsj', (sjxx) => {
this.form.sjwhid = sjxx.id this.form.sjwhid = sjxx.id
this.form.sjwhName = sjxx.sjms this.form.sjwhName = sjxx.sjms
}) })
}, },
onUnload() { onUnload() {
eventBus.$off('xzxm') uni.$off('xzxm')
eventBus.$off('xzsj') uni.$off('xzsj')
}, },
data() { data() {
return { return {
btext:'提交日报', btext: '提交日报',
/* 表单信息 */ /* 表单信息 */
form: { form: {
xmName: '', xmName: '',
...@@ -171,7 +173,8 @@ ...@@ -171,7 +173,8 @@
}) })
const wfdata = addres.data.records[0] const wfdata = addres.data.records[0]
wfdata.wfoperate = '1' 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] const tjlist = userres.data.records[0]
this.$post('kqgl/gzrb/wfgo', { this.$post('kqgl/gzrb/wfgo', {
nextinfo: tjlist, nextinfo: tjlist,
...@@ -179,16 +182,33 @@ ...@@ -179,16 +182,33 @@
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.btext='继续提交' this.btext = '继续提交'
this.$tip.toast('提交成功') this.$refs.uNotify.show({
this.form.gznr='' top: 10,
this.form.gzjh='' type: 'success',
message: '日报提交成功!',
duration: 1000 * 3,
fontSize: 14,
safeAreaInsetTop: true
})
this.form.gznr = ''
this.form.gzjh = ''
this.form.xmid = ''
this.form.xmName = ''
} }
}) })
} else { } else {
this.$tip.toast('提交失败')
this.$refs.uNotify.show({
top: 10,
type: 'error',
message: '日报提交失败!',
duration: 1000 * 3,
fontSize: 14,
safeAreaInsetTop: true
})
} }
}) })
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default{ export default{
async onLoad(){ async onLoad(){
...@@ -118,12 +118,12 @@ ...@@ -118,12 +118,12 @@
// url:'device/sbdxj/dxjrw/init/zt' // url:'device/sbdxj/dxjrw/init/zt'
// }) // })
this.dwxSearch() this.dwxSearch()
eventBus.$on('save', () => { uni.$on('save', () => {
this.dwxSearch() this.dwxSearch()
}) })
}, },
onUnload() { onUnload() {
eventBus.$off('save') uni.$off('save')
}, },
data() { data() {
return{ return{
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
/* 处理点检任务 */ /* 处理点检任务 */
handleIt(item) { handleIt(item) {
eventBus.$emit('xzsj',item) uni.$emit('xzsj',item)
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default{ export default{
async onLoad(){ async onLoad(){
this.ztMap= await this.$match({ this.ztMap= await this.$match({
...@@ -140,12 +140,12 @@ ...@@ -140,12 +140,12 @@
// url:'device/sbdxj/dxjrw/init/zt' // url:'device/sbdxj/dxjrw/init/zt'
// }) // })
this.dwxSearch() this.dwxSearch()
eventBus.$on('save', () => { uni.$on('save', () => {
this.dwxSearch() this.dwxSearch()
}) })
}, },
onUnload() { onUnload() {
eventBus.$off('save') uni.$off('save')
}, },
data() { data() {
return{ return{
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
/* 处理点检任务 */ /* 处理点检任务 */
handleIt(item) { handleIt(item) {
eventBus.$emit('xzxm',item) uni.$emit('xzxm',item)
uni.navigateBack({ uni.navigateBack({
delta: 1 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