|
@@ -4,14 +4,14 @@
|
|
<view class="autograph-con">
|
|
<view class="autograph-con">
|
|
<text class="autograph-tit">店长签名:</text>
|
|
<text class="autograph-tit">店长签名:</text>
|
|
<view class="autograph-main">
|
|
<view class="autograph-main">
|
|
- <autograph-to-pic canvasId="handWriting-dz" :isEmpty="isEmpty" />
|
|
|
|
|
|
+ <autograph-to-pic ref="dz" canvasId="handWriting-dz"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 巡店人签名 -->
|
|
<!-- 巡店人签名 -->
|
|
<view class="autograph-con">
|
|
<view class="autograph-con">
|
|
<text class="autograph-tit">巡店人签名:</text>
|
|
<text class="autograph-tit">巡店人签名:</text>
|
|
<view class="autograph-main">
|
|
<view class="autograph-main">
|
|
- <autograph-to-pic canvasId="handWriting-xd" :isEmpty="isEmpty" />
|
|
|
|
|
|
+ <autograph-to-pic ref="xdr" canvasId="handWriting-xd" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-button type="primary" shape="circle" class="submit-btn" @click="submitFun">提交</u-button>
|
|
<u-button type="primary" shape="circle" class="submit-btn" @click="submitFun">提交</u-button>
|
|
@@ -28,10 +28,6 @@
|
|
},
|
|
},
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
- isEmpty: [ // 是否为空判断
|
|
|
|
- {name: 'handWriting-dz', state: true},
|
|
|
|
- {name: 'handWriting-xd', state: true}
|
|
|
|
- ],
|
|
|
|
taskId: '',
|
|
taskId: '',
|
|
inspectorSign:'', // 巡店人签名
|
|
inspectorSign:'', // 巡店人签名
|
|
storeManagerSign:'', // 店长签名
|
|
storeManagerSign:'', // 店长签名
|
|
@@ -44,35 +40,55 @@
|
|
// 提交本次任务
|
|
// 提交本次任务
|
|
submitFun(){
|
|
submitFun(){
|
|
const _this = this
|
|
const _this = this
|
|
- console.log({inspectorSign: _this.inspectorSign, storeManagerSign: _this.storeManagerSign})
|
|
|
|
- // clzConfirm({
|
|
|
|
- // title: '提示',
|
|
|
|
- // content: '确定提交本次巡店?',
|
|
|
|
- // success: function(res) {
|
|
|
|
- // if (res.confirm || res.index == 0) {
|
|
|
|
- // submitTask({
|
|
|
|
- // id: _this.taskId,
|
|
|
|
- // inspectorSign: _this.inspectorSign,
|
|
|
|
- // storeManagerSign: _this.storeManagerSign
|
|
|
|
- // }).then(ret=>{
|
|
|
|
- // console.log(ret)
|
|
|
|
- // if(ret.status == 200){
|
|
|
|
- // // 关闭上页
|
|
|
|
- // uni.$emit("closeTour",1)
|
|
|
|
- // // 打开完成页面
|
|
|
|
- // uni.redirectTo({
|
|
|
|
- // url:"/pages/shopTourCompleted/shopTourCompleted?taskId="+_this.taskId
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // uni.showToast({
|
|
|
|
- // icon:'none',
|
|
|
|
- // title: ret.message
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
|
|
+ console.log(_this.$refs.dz.isEmpty)
|
|
|
|
+ const dzIsEmpty = _this.$refs.dz.isEmpty
|
|
|
|
+ const xdrIsEmpty = _this.$refs.xdr.isEmpty
|
|
|
|
+ if(dzIsEmpty){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon:'none',
|
|
|
|
+ title:'店长未签名'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(xdrIsEmpty){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon:'none',
|
|
|
|
+ title:'巡店人未签名'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ clzConfirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确定提交本次巡店?',
|
|
|
|
+ success: function(res) {
|
|
|
|
+ if (res.confirm || res.index == 0) {
|
|
|
|
+ // 上传图片后提交代码
|
|
|
|
+ //_this.submitTask()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
|
|
+ submitTask(){
|
|
|
|
+ submitTask({
|
|
|
|
+ id: _this.taskId,
|
|
|
|
+ inspectorSign: _this.inspectorSign,
|
|
|
|
+ storeManagerSign: _this.storeManagerSign
|
|
|
|
+ }).then(ret=>{
|
|
|
|
+ console.log(ret)
|
|
|
|
+ if(ret.status == 200){
|
|
|
|
+ // 关闭上页
|
|
|
|
+ uni.$emit("closeTour",1)
|
|
|
|
+ // 打开完成页面
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url:"/pages/shopTourCompleted/shopTourCompleted?taskId="+_this.taskId
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon:'none',
|
|
|
|
+ title: ret.message
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|