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

调整

parent 3f82e231
......@@ -54,7 +54,7 @@
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default{
async onLoad(){
......
......@@ -106,7 +106,7 @@
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default {
data() {
return {
......@@ -179,8 +179,7 @@
},
async onLoad() {
this.apiGetDwxList()
eventBus.$on('save', () => {
uni.$on('save', () => {
this.dwxSearch()
})
this.ztMap = await this.$match({
......@@ -194,7 +193,7 @@
},
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,13 +39,13 @@
<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>
......@@ -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: '',
......@@ -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
})
}
})
......
......@@ -107,7 +107,7 @@
</template>
<script>
import eventBus from '@/common/util/eventBus.js'
export default{
async onLoad(){
......@@ -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{
......@@ -166,7 +166,7 @@
/* 处理点检任务 */
handleIt(item) {
eventBus.$emit('xzsj',item)
uni.$emit('xzsj',item)
uni.navigateBack({
delta: 1
});
......
......@@ -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{
......@@ -188,7 +188,7 @@
/* 处理点检任务 */
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