|
@@ -1,6 +1,45 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
+ <view class="opinionLine" v-for="(item,index) in suggestList">
|
|
|
+ <view class="lineNum"> <span>建议({{index+1}})</span>
|
|
|
+ <view class="delOpBox" v-if="index>0" @click="delOp(index)">
|
|
|
+ <image src="../../static/img/icon_list_del@2x.png" mode="" class="delopImg"></image>
|
|
|
+ <view class="delOpTxt">删除</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="lineCont">
|
|
|
+ <view class="lineContLeft">负责人</view>
|
|
|
+ <view class="lineContRight">
|
|
|
+ <input type="text" value="" v-model="item.managerName" class="lineContInput" placeholder="请输入负责人姓名"/>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="lineCont">
|
|
|
+ <view class="lineContLeft">预计完成时间</view>
|
|
|
+ <view class="lineContRight" @click="pickerClick(item)">
|
|
|
+ <picker mode="date" :value="item.orderFinishTime" @change="bindTimeChange">
|
|
|
+ <view class="uni-picker">
|
|
|
+ <span v-if='item.orderFinishTime'>{{item.orderFinishTime}}</span>
|
|
|
+ <span v-else class="timeNoSpan">请选择预计完成时间</span>
|
|
|
+ <image src="../../static/img/jiantou.png" mode="" class="jiantouImg"></image>
|
|
|
+ </view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="lineCont">
|
|
|
+ <textarea placeholder-style="color:#CCCCCC" placeholder="请输入您的建议~"
|
|
|
+ class="textareaCont" maxlength='200' v-model="item.suggest"/>
|
|
|
+ </view>
|
|
|
+ <view class="addBox" @click="addOp" v-show="index==suggestList.length-1">
|
|
|
+ <image src="../../static/img/icon_list_add@2x.png" mode="" class="addImg"></image>
|
|
|
+ <view class="addTxt">增加建议</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
+ <view style="height: 150rpx;"></view>
|
|
|
+ <view class="bottom">
|
|
|
+ <view class="zc" @click="zc">暂存</view>
|
|
|
+ <view class="submit" @click="submit">提交</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -8,15 +47,79 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ date:'',
|
|
|
+ suggestList:[
|
|
|
+ {
|
|
|
+ suggest:'',
|
|
|
+ orderFinishTime:'',
|
|
|
+ managerName:'',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ sheetID:'',
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(opt) {
|
|
|
//页面加载初始化生命周期函数
|
|
|
-
|
|
|
+ this.sheetID=opt.sheetID
|
|
|
},
|
|
|
methods: {
|
|
|
- //自己定义的方法函数
|
|
|
+ bindTimeChange(e){
|
|
|
+ console.log(e)
|
|
|
+ this.pickerItem.orderFinishTime=e.detail.value;
|
|
|
+ },
|
|
|
+ pickerClick(item){
|
|
|
+ this.pickerItem=item
|
|
|
+ },
|
|
|
+ addOp(){
|
|
|
+
|
|
|
+ var obj={
|
|
|
+ suggest:'',
|
|
|
+ orderFinishTime:'',
|
|
|
+ managerName:'',
|
|
|
+ }
|
|
|
+ this.suggestList.push(obj)
|
|
|
+ },
|
|
|
+ delOp(index){
|
|
|
+ this.suggestList.splice(index,1)
|
|
|
+ },
|
|
|
+ zc(){
|
|
|
+ uni.showLoading({ });
|
|
|
+ console.log(this.suggestList);
|
|
|
+ this.$http('accompany/SuperCheckSheet/saveSuperCheckSheetSuggest', {
|
|
|
+ sheetID:this.sheetID,
|
|
|
+
|
|
|
+ suggestList:JSON.stringify(this.suggestList)
|
|
|
+ }, 'POST').then(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '保存成功',
|
|
|
+ icon:'success',
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submit(){
|
|
|
+ uni.showLoading({ });
|
|
|
+ this.$http('accompany/SuperCheckSheet/saveSuperCheckSheetSuggest', {
|
|
|
+ sheetID:this.sheetID,
|
|
|
+
|
|
|
+ suggestList:JSON.stringify(this.suggestList)
|
|
|
+ }, 'POST').then(res => {
|
|
|
+ this.submitSuperCheckSheet()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submitSuperCheckSheet(){
|
|
|
+ uni.showLoading({ });
|
|
|
+ this.$http('accompany/SuperCheckSheet/submitSuperCheckSheet', {
|
|
|
+ sheetID:this.sheetID,
|
|
|
+
|
|
|
+ }, 'POST').then(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '保存成功',
|
|
|
+ icon:'success',
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -35,5 +138,102 @@
|
|
|
|
|
|
}
|
|
|
/* #endif */
|
|
|
-
|
|
|
+ .lineNum{
|
|
|
+ line-height: 74rpx;
|
|
|
+ padding-left: 24rpx;
|
|
|
+ color: #999999;
|
|
|
+ font-size: 24rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .lineCont{
|
|
|
+ background: #FFFFFF;
|
|
|
+ display: flex;
|
|
|
+ padding: 30rpx 24rpx;
|
|
|
+ border-bottom: 1px solid #EEEEEE;
|
|
|
+ }
|
|
|
+ .lineContLeft{
|
|
|
+ width: 200rpx;color: #3C3C3C;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ .uni-picker{
|
|
|
+ width: 500rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .jiantouImg{
|
|
|
+ width: 14rpx;
|
|
|
+ height: 26rpx;
|
|
|
+ margin-top: 5rpx;
|
|
|
+ }
|
|
|
+ .timeNoSpan{
|
|
|
+ color: #CCCCCC;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ .lineContInput{
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ .textareaCont{
|
|
|
+ width: 702rpx;
|
|
|
+ height: 200rpx;
|
|
|
+ }
|
|
|
+ .addTxt{
|
|
|
+ line-height: 36rpx;
|
|
|
+ color: #3F90F7;
|
|
|
+ padding-left: 16rpx;
|
|
|
+ }
|
|
|
+ .addImg{
|
|
|
+ width: 36rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ }
|
|
|
+ .addBox{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ background: #FFFFFF;
|
|
|
+ padding: 30rpx;
|
|
|
+ }
|
|
|
+ .bottom{
|
|
|
+ width: 750rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ box-shadow: 0px -4px 8px 0px rgba(153,153,153,0.08);
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ }
|
|
|
+ .submit{
|
|
|
+ width: 336rpx;
|
|
|
+ height: 74rpx;
|
|
|
+ background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
|
|
|
+ border-radius: 37rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 74rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-size: 30rpx;
|
|
|
+ margin-top: 22rpx;
|
|
|
+ }
|
|
|
+ .zc{
|
|
|
+ width: 336rpx;
|
|
|
+ height: 74rpx;
|
|
|
+ background: #F4F5F7;
|
|
|
+ border-radius: 37rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 74rpx;
|
|
|
+ color: #3C3C3C;
|
|
|
+ font-size: 30rpx;
|
|
|
+ margin-top: 22rpx;
|
|
|
+ }
|
|
|
+ .delopImg{
|
|
|
+ width: 22rpx;height: 24rpx;
|
|
|
+ margin-top: 24rpx;
|
|
|
+ margin-right: 10rpx;
|
|
|
+ }
|
|
|
+ .delOpBox{
|
|
|
+ display: flex;
|
|
|
+ color: #3F90F7;
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding: 0 24rpx;
|
|
|
+ }
|
|
|
</style>
|