mushencc 8 mesi fa
parent
commit
73003710a9
40 ha cambiato i file con 1957 aggiunte e 70 eliminazioni
  1. 66 0
      StepPage/Detail/diao/diao.js
  2. 3 0
      StepPage/Detail/diao/diao.json
  3. 2 0
      StepPage/Detail/diao/diao.wxml
  4. 1 0
      StepPage/Detail/diao/diao.wxss
  5. 374 0
      StepPage/Detail/pan/pan.js
  6. 3 0
      StepPage/Detail/pan/pan.json
  7. 101 0
      StepPage/Detail/pan/pan.wxml
  8. 63 0
      StepPage/Detail/pan/pan.wxss
  9. 317 0
      StepPage/Detail/shi/shi.js
  10. 3 0
      StepPage/Detail/shi/shi.json
  11. 189 0
      StepPage/Detail/shi/shi.wxml
  12. 63 0
      StepPage/Detail/shi/shi.wxss
  13. 338 0
      StepPage/Detail/tui/tui.js
  14. 3 0
      StepPage/Detail/tui/tui.json
  15. 125 0
      StepPage/Detail/tui/tui.wxml
  16. 63 0
      StepPage/Detail/tui/tui.wxss
  17. 43 18
      StepPage/pages/fifth/fifth.js
  18. 7 2
      StepPage/pages/fifth/fifth.wxml
  19. 4 0
      StepPage/pages/first/first.js
  20. 0 3
      StepPage/pages/fourth/fourth.js
  21. 1 0
      StepPage/pages/lin/lin.js
  22. 1 0
      StepPage/pages/linNext/linNext.js
  23. 1 0
      StepPage/pages/pan/pan.js
  24. 3 3
      StepPage/pages/report/LinList/LinList.js
  25. 1 1
      StepPage/pages/report/LinList/LinList.wxml
  26. 1 1
      StepPage/pages/report/PanList/PanList.js
  27. 18 4
      StepPage/pages/report/ShiList/ShiList.js
  28. 1 1
      StepPage/pages/report/TuiList/TuiList.js
  29. 1 1
      StepPage/pages/report/TuiList/TuiList.wxml
  30. 11 3
      StepPage/pages/second/second.js
  31. 30 6
      StepPage/pages/sixth/sixth.js
  32. 1 1
      StepPage/pages/sixth/sixth.wxml
  33. 30 4
      StepPage/pages/third/third.js
  34. 5 3
      StepPage/pages/third/third.wxml
  35. 21 1
      StepPage/pages/tui/tui.js
  36. 3 2
      StepPage/pages/tui/tui.wxml
  37. 49 11
      StepPage/pages/writeVIN/writeVIN.js
  38. 3 2
      StepPage/pages/writeVIN/writeVIN.wxml
  39. 6 1
      app.json
  40. 2 2
      project.private.config.json

+ 66 - 0
StepPage/Detail/diao/diao.js

@@ -0,0 +1,66 @@
+// StepPage/Detail/diao/diao.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
StepPage/Detail/diao/diao.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
StepPage/Detail/diao/diao.wxml

@@ -0,0 +1,2 @@
+<!--StepPage/Detail/diao/diao.wxml-->
+<text>StepPage/Detail/diao/diao.wxml</text>

+ 1 - 0
StepPage/Detail/diao/diao.wxss

@@ -0,0 +1 @@
+/* StepPage/Detail/diao/diao.wxss */

+ 374 - 0
StepPage/Detail/pan/pan.js

@@ -0,0 +1,374 @@
+// StepPage/pages/first/first.js
+import Dialog from '../../../miniprogram_npm/@vant/weapp/dialog/dialog';
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    show_m:false,
+shopList:[],
+storehouseList:[],
+set_status:'',
+searchList:[],
+searchListC:[],
+searchValue:'',
+searchValueC:"",
+show:false,
+show_c:false,
+title_c:"",
+title:'',
+type:'',
+is_check:0,
+status:0,
+oa_state:'',
+oa_remark:'',
+oa_state_m:'',
+is_o:true,
+formData:{}
+  },
+  handleChangeRemark(e){
+this.setData({
+  oa_remark:e.detail
+})
+  },
+  onSure() {
+    let app = getApp();
+    let openid = app.globalData.openID;
+    if (this.data.is_o) {
+     this.setData({
+       is_o:false
+     })
+      let data = {
+        id:app.globalData.oa_id,
+        state:this.data.oa_state_m,
+        remark:this.data.oa_remark
+      }
+      wx.p.request({
+        url: `${app.globalData.url}wx/oaCheck`,
+        method:'POST',
+        data:{
+      openid,
+      ...data
+      }
+      }).then(res=>{
+        if(res.data.code === 200){
+        
+          this.setData({ show_m: false });
+          this.initData()
+          if(this.data.oa_state_m){
+            this.handleReturn();
+          }
+        }
+        wx.showToast({
+          icon:'none',
+          title: res.data.msg,
+        })
+        setTimeout(()=>{
+        this.setData({
+          is_o:true
+        })
+        },2000)
+      })
+    }
+  },
+  initData(){
+    let app = getApp();
+    let openid = app.globalData.openID;
+    let order_number = app.globalData.detailData.order_number;
+      wx.p.request({
+       url: `${app.globalData.url}wx/inventoryDetail`,
+       method:'POST',
+       data:{
+     order_number,
+     openid
+     }
+     }).then(res=>{
+       if(res.data.code==200){
+        this.setData({
+          status:res1.data.data.status
+        })
+        app.globalData.detailData.status = res1.data.data.status;
+      if(res.data.data.status==1){
+        wx.p.request({
+          url: `${app.globalData.url}wx/oaOrderState`,
+          method:'POST',
+          data:{
+        menu_id:249,
+        order_no:res.data.data.order_number,
+        openid
+        }
+        }).then(req=>{
+          if (req.data.code==200) {
+            app.globalData.oa_state = req.data.data.state;
+            app.globalData.oa_id = req.data.data.id
+          }else{
+            app.globalData.oa_state = '';
+            app.globalData.oa_id = ''
+          }
+        })
+      }
+       }
+     })
+  },
+  onClose() {
+    this.setData({ 
+      show_m: false,
+      // oa_remark:''
+     });
+  },
+  handleSearch(){
+   this.setData({
+     show:true,
+     searchList:this.data.shopList
+   })
+  },
+  handleSearchC(){
+    this.setData({
+      show_c:true,
+      searchListC:this.data.storehouseList
+    })
+   },
+  handleCancel(){
+    this.setData({
+      show:false
+    })
+  },
+  handleCancelC(){
+    this.setData({
+      show_c:false
+    })
+  },
+  onSearch(event){
+    let arr = this.data.shopList.filter(v=>v.title.indexOf(event.detail)!=-1);
+    this.setData({
+      searchList:arr
+    })
+  },
+  onSearchC(event){
+    let arr = this.data.storehouseList.filter(v=>v.title.indexOf(event.detail)!=-1);
+    this.setData({
+      searchListC:arr
+    })
+  },
+  handleReturn(){
+    let app = getApp();
+    app.globalData= {
+      openID:app.globalData.openID,
+      url:'https://zhapi.qingyaokeji.com/',
+      stepData:[]
+    }
+    wx.redirectTo({
+      url: '../../pages/report/PanList/PanList',
+    })
+  },
+  handleCheck(){
+    Dialog.confirm({
+      title: '审核',
+      message: '确认审核吗?',
+    })
+      .then(() => {
+        let app = getApp();
+        let openid = app.globalData.openID;
+        if(app.globalData.typePage==1){
+          wx.p.request({
+            url: `${app.globalData.url}wx/checkAll`,
+            method:'POST',
+            data:{
+          order_number:app.globalData.detailData.order_number,
+          openid,
+          opt_case: 5,
+           menu_id:224
+          }
+          }).then(res=>{
+            if(res.data.code==200){
+              wx.showToast({
+                title: res.data.msg
+              })
+             this.initData()
+            }else{
+              wx.showModal({
+                content: res.data.msg,
+                showCancel:false,
+                confirmText:'返回'
+              })
+            }
+          })
+        }else if(app.globalData.typePage==2){
+          wx.p.request({
+            url: `${app.globalData.url}wx/checkAll`,
+            method:'POST',
+            data:{
+          order_number:app.globalData.detailData.order_number,
+          openid,
+          opt_case: 10,
+           menu_id:249
+          }
+          }).then(res=>{
+            if(res.data.code==200){
+              wx.showToast({
+                title: res.data.msg
+              })
+             this.initData()
+            }else{
+              wx.showModal({
+                content: res.data.msg,
+                showCancel:false,
+                confirmText:'返回'
+              })
+            }
+          })
+        }
+      })
+      .catch(() => {
+        // on cancel
+      });
+  },
+  handlePassModal(e){
+this.setData({
+  show_m:true,
+  oa_state_m:e.currentTarget.dataset.item
+})
+  },
+  handleNext(){
+    let app = getApp()
+    if(!app.globalData.storehouse_id){
+      return
+    }
+    if(this.data.type==2){
+        wx.redirectTo({
+          url: '../pan/pan',
+        })
+    }else{
+      if(this.data.title){
+        let app = getApp();
+        if(app.globalData.set_status){
+          if(app.globalData.typePage==1){
+            wx.redirectTo({
+              url: '../second/second',
+            })
+          }else if(app.globalData.typePage==4){
+          wx.redirectTo({
+            url: '../tui/tui',
+          })
+       }
+        }else{
+          if(app.globalData.typePage==1){
+            let openid = app.globalData.openID;
+            app.globalData.stepData = app.globalData.stepData.filter(v=>v.sort!=1);
+            app.globalData.stepData=[{
+            sort:1,
+            data:{
+              title:this.data.title
+            }
+          }]
+           wx.p.request({
+            url: `${app.globalData.url}wx/saveWxConstructionData`,
+            method:'POST',
+            data:{
+          openid,
+          type:1,
+          data:JSON.stringify(app.globalData)
+          }
+          }).then(res=>{
+            if(res.data.code==200){
+                   wx.redirectTo({
+                     url: '../second/second',
+                   })
+              }
+          })
+          }else if(app.globalData.typePage==4){
+          wx.redirectTo({
+            url: '../tui/tui',
+          })
+       }
+        }
+      }
+    }
+  },
+handleChoose(item){
+  let app = getApp();
+  app.globalData.fourShopId = item.target.dataset.item.id;
+  app.globalData.storehouse_id = item.target.dataset.item.storehouse_id;
+  app.globalData.address = item.target.dataset.item.address;
+  app.globalData.area = item.target.dataset.item.area;
+  app.globalData.contract_person = item.target.dataset.item.contract_person;
+  app.globalData.contract_phone = item.target.dataset.item.contract_phone;
+  app.globalData.regional_manager = item.target.dataset.item.regional_manager;
+  app.globalData.technical_manager = item.target.dataset.item.technical_manager;
+  app.globalData.company_id = item.target.dataset.item.company_id;
+  this.setData({
+    show:false,
+    title:item.target.dataset.item.title
+  })
+}, 
+handleChooseC(item){
+  let app = getApp();
+  app.globalData.storehouse_id = item.target.dataset.item.id;
+  app.globalData.title_c = item.target.dataset.item.title;
+  this.setData({
+    show_c:false,
+    title_c:item.target.dataset.item.title
+  })
+}, 
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    let app = getApp();  
+         this.setData({
+            status:app.globalData.detailData.status,
+            oa_state:app.globalData.oa_state?app.globalData.oa_state:'',
+            formData:app.globalData.detailData
+             })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
StepPage/Detail/pan/pan.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 101 - 0
StepPage/Detail/pan/pan.wxml

@@ -0,0 +1,101 @@
+<!--StepPage/pages/first/first.wxml-->
+<van-dialog id="van-dialog" />
+<van-dialog
+  use-slot
+  title="原因"
+  show="{{ show_m }}"
+  show-cancel-button
+  bind:close="onClose"
+  bind:confirm="onSure"
+>
+ <van-cell-group>
+  <van-field
+    value="{{ oa_remark }}"
+    placeholder="请输入"
+    clearable
+    type='textarea'
+    autosize='true'
+    bind:change="handleChangeRemark"
+  >
+  </van-field>
+  </van-cell-group>
+</van-dialog>
+<image src="../../../images/head.png" style="width:100%;height: 250rpx;z-index:-1"></image>
+<view wx:if="{{formData.is_check>0?true:false}}">
+<view wx:if="{{status<=0}}" style="text-align: right;padding: 0 15rpx;"><van-button type='primary' bind:tap="handleCheck">审核</van-button></view>
+<view wx:if='{{status==1&&oa_state==1}}'>
+  <van-button style="margin-right: 10px" type="priamry" bind:tap="handlePassModal" data-item="1">通过</van-button>
+  <van-button style="margin-right: 10px" type="warning" bind:tap="handlePassModal" data-item="0">驳回</van-button>
+</view>
+</view>
+<view class="item_content">
+  <van-cell-group style="width: 100%;">
+    <van-field
+  label='盘点单号'
+  title-width='4.8rem'
+    value="{{ formData.order_number }}"
+    required
+    readonly
+  >
+  </van-field>
+    <van-field
+  label='仓库'
+  title-width='4.8rem'
+    value="{{ formData.storehouse_title }}"
+    required
+    readonly
+  >
+  </van-field>
+  </van-cell-group>
+  <view style='border:2rpx solid; padding:4rpx !important;width: 100%;border-radius: 20rpx;padding: 2rpx;margin-bottom: 20rpx;'  wx:for="{{formData.sub}}" wx:for-item="item" wx:for-index='index' wx:key="index">
+   <van-cell-group>
+  <van-field
+  label='卷膜分类'
+    value="{{ item.b_r_f_name }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='卷膜型号'
+    value="{{ item.title }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='卷膜编码'
+    value="{{ item.roll_film_number }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='盘点数量'
+    value="{{ item.inventory_number }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='盘盈数量'
+    value="{{ item.loss_gain_number }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='盘亏数量'
+    value="{{ item.inventory_loss_number }}"
+    readonly
+  >
+  </van-field>
+  </van-cell-group>
+  </view>
+  <van-cell-group>
+  <van-field
+  label='备注'
+  title-width='4.8rem'
+    value="{{ formData.mark }}"
+    required
+    readonly
+  >
+  </van-field>
+  </van-cell-group>
+</view>
+<button style="position: fixed;bottom: 0;width: 100%;z-index: 10;" bind:tap="handleReturn">返回</button>

+ 63 - 0
StepPage/Detail/pan/pan.wxss

@@ -0,0 +1,63 @@
+/* StepPage/pages/first/first.wxss */
+.title{
+  border-radius: 8pt;
+height: 30pt;
+line-height: 30pt;
+letter-spacing: 3pt;
+  text-align: center;
+  width: 90%;
+  margin: 10pt auto;
+  background:-webkit-linear-gradient(top,rgb(255, 255, 255),rgb(231, 229, 229),rgb(192, 189, 189)); 
+}
+.item_content{
+ padding-bottom: 150rpx;
+  width: 90%;
+  margin:0 auto; 
+  display: flex;
+  flex-wrap: wrap;
+}
+.item_content_shop{
+  background:-webkit-linear-gradient(top,rgb(255, 255, 255),rgb(231, 229, 229),rgb(192, 189, 189)); 
+   width: 44%;
+   text-align: center;
+   height: auto;
+   padding: 4pt;
+   /* line-height: 30pt; */
+   border-radius: 10pt;
+   margin: 15rpx 0;
+}
+.item_content_shop:nth-child(2n+1){
+  margin-right: 30rpx;
+}
+.show_box{
+  width: 100%;
+  height: 90%;
+  position: absolute;
+  bottom: 0;
+  background-color: #fff;
+}
+.show_item{
+  height: auto;
+  padding: 15rpx;
+font-size: 40rpx;
+margin:0 20rpx;
+color: rgb(97, 92, 92);
+  text-align: center;
+  border-bottom:1rpx solid rgb(167, 163, 163)
+}
+.btn{
+  text-align: center;
+  margin-top: 20pt;
+}
+.show_title{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.btn_item{
+  width: 200pt;
+  margin: 10pt;
+}
+.font_item{
+  color: black;
+}

+ 317 - 0
StepPage/Detail/shi/shi.js

@@ -0,0 +1,317 @@
+// StepPage/pages/first/first.js
+import Dialog from '../../../miniprogram_npm/@vant/weapp/dialog/dialog';
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    show_m:false,
+shopList:[],
+storehouseList:[],
+set_status:'',
+searchList:[],
+searchListC:[],
+searchValue:'',
+searchValueC:"",
+show:false,
+show_c:false,
+title_c:"",
+title:'',
+type:'',
+is_check:0,
+status:0,
+oa_state:'',
+oa_remark:'',
+oa_state_m:'',
+is_o:true,
+formData:{},
+special_type:false
+  },
+  handleChangeRemark(e){
+this.setData({
+  oa_remark:e.detail
+})
+  },
+  onSure() {
+    let app = getApp();
+    let openid = app.globalData.openID;
+    if (this.data.is_o) {
+     this.setData({
+       is_o:false
+     })
+      let data = {
+        id:app.globalData.oa_id,
+        state:this.data.oa_state_m,
+        remark:this.data.oa_remark
+      }
+      wx.p.request({
+        url: `${app.globalData.url}wx/oaCheck`,
+        method:'POST',
+        data:{
+      openid,
+      ...data
+      }
+      }).then(res=>{
+        if(res.data.code === 200){
+        
+          this.setData({ show_m: false });
+          this.initData()
+          if(this.data.oa_state_m){
+            this.handleReturn();
+          }
+        }
+        wx.showToast({
+          icon:'none',
+          title: res.data.msg,
+        })
+        setTimeout(()=>{
+        this.setData({
+          is_o:true
+        })
+        },2000)
+      })
+    }
+  },
+  initData(){
+    let app = getApp();
+    let openid = app.globalData.openID;
+    let order_number = app.globalData.detailData.order_number;
+      wx.p.request({
+        url: `${app.globalData.url}wx/constructionDetail`,
+        method:'POST',
+        data:{
+      order_number,
+      openid
+      }
+      }).then(res1=>{
+        if(res1.data.code==200){
+      this.setData({
+        status:res1.data.data.status
+      })
+      app.globalData.detailData.status = res1.data.data.status;
+      if ( res1.data.data.status === 1 ) {
+       wx.p.request({
+         url: `${app.globalData.url}wx/oaOrderState`,
+         method:'POST',
+         data:{
+       menu_id:224,
+       order_no:res1.data.data.order_number,
+       openid
+       }
+       }).then(req=>{
+         if (req.data.code==200) {
+           app.globalData.oa_state = req.data.data.state;
+           app.globalData.oa_id = req.data.data.id
+         }else{
+           app.globalData.oa_state = '';
+           app.globalData.oa_id = ''
+         }
+         this.setData({
+           oa_state:app.globalData.oa_state
+         })
+       })
+     }
+        }
+      })
+  },
+  onClose() {
+    this.setData({ 
+      show_m: false,
+      // oa_remark:''
+     });
+  },
+  handleSearch(){
+   this.setData({
+     show:true,
+     searchList:this.data.shopList
+   })
+  },
+  handleSearchC(){
+    this.setData({
+      show_c:true,
+      searchListC:this.data.storehouseList
+    })
+   },
+  handleCancel(){
+    this.setData({
+      show:false
+    })
+  },
+  handleCancelC(){
+    this.setData({
+      show_c:false
+    })
+  },
+  onSearch(event){
+    let arr = this.data.shopList.filter(v=>v.title.indexOf(event.detail)!=-1);
+    this.setData({
+      searchList:arr
+    })
+  },
+  onSearchC(event){
+    let arr = this.data.storehouseList.filter(v=>v.title.indexOf(event.detail)!=-1);
+    this.setData({
+      searchListC:arr
+    })
+  },
+  handleReturn(){
+    let app = getApp();
+    app.globalData= {
+      openID:app.globalData.openID,
+      url:'https://zhapi.qingyaokeji.com/',
+      stepData:[]
+    }
+    wx.redirectTo({
+      url: '../../pages/report/ShiList/ShiList',
+    })
+  },
+  handleCheck(){
+    Dialog.confirm({
+      title: '审核',
+      message: '确认审核吗?',
+    })
+      .then(() => {
+        let app = getApp();
+        let openid = app.globalData.openID;
+          wx.p.request({
+            url: `${app.globalData.url}wx/checkAll`,
+            method:'POST',
+            data:{
+          order_number:app.globalData.detailData.order_number,
+          openid,
+          opt_case: 5,
+           menu_id:224
+          }
+          }).then(res=>{
+            if(res.data.code==200){
+              wx.showToast({
+                title: res.data.msg
+              })
+             this.initData()
+            }else{
+              wx.showModal({
+                content: res.data.msg,
+                showCancel:false,
+                confirmText:'返回'
+              })
+            }
+          })
+      })
+      .catch(() => {
+        // on cancel
+      });
+  },
+  handlePassModal(e){
+this.setData({
+  show_m:true,
+  oa_state_m:e.currentTarget.dataset.item
+})
+  },
+handleChoose(item){
+  let app = getApp();
+  app.globalData.fourShopId = item.target.dataset.item.id;
+  app.globalData.storehouse_id = item.target.dataset.item.storehouse_id;
+  app.globalData.address = item.target.dataset.item.address;
+  app.globalData.area = item.target.dataset.item.area;
+  app.globalData.contract_person = item.target.dataset.item.contract_person;
+  app.globalData.contract_phone = item.target.dataset.item.contract_phone;
+  app.globalData.regional_manager = item.target.dataset.item.regional_manager;
+  app.globalData.technical_manager = item.target.dataset.item.technical_manager;
+  app.globalData.company_id = item.target.dataset.item.company_id;
+  this.setData({
+    show:false,
+    title:item.target.dataset.item.title
+  })
+}, 
+handleCheckImg(){
+  let arr = [];
+  let app = getApp();
+  this.data.formData.img.forEach(v=>{
+    if(v.src){
+      if(v.type==1||v.type==3){
+        let str = v.show_url.split(',');
+        str.forEach(s=>{
+          arr.push(`${s}`)
+        })
+      }else{
+        arr.push(v.show_url)
+      }
+    }
+  })
+    wx.previewImage({
+ urls:arr
+    })
+},
+handleChooseC(item){
+  let app = getApp();
+  app.globalData.storehouse_id = item.target.dataset.item.id;
+  app.globalData.title_c = item.target.dataset.item.title;
+  this.setData({
+    show_c:false,
+    title_c:item.target.dataset.item.title
+  })
+}, 
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    let app = getApp();
+    console.log(app)
+  this.setData({
+    formData:app.globalData.detailData,
+    status:app.globalData.detailData.status,
+    oa_state:app.globalData.oa_state?app.globalData.oa_state:'',
+    special_type:app.globalData.bussiness_special_type
+  })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
StepPage/Detail/shi/shi.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 189 - 0
StepPage/Detail/shi/shi.wxml

@@ -0,0 +1,189 @@
+<!--StepPage/pages/first/first.wxml-->
+<van-dialog id="van-dialog" />
+<van-dialog
+  use-slot
+  title="原因"
+  show="{{ show_m }}"
+  show-cancel-button
+  bind:close="onClose"
+  bind:confirm="onSure"
+>
+ <van-cell-group>
+  <van-field
+    value="{{ oa_remark }}"
+    placeholder="请输入"
+    clearable
+    type='textarea'
+    autosize='true'
+    bind:change="handleChangeRemark"
+  >
+  </van-field>
+  </van-cell-group>
+</van-dialog>
+<image src="../../../images/head.png" style="width:100%;height: 250rpx;z-index:-1"></image>
+<view>
+<view style="text-align: right;padding: 0 15rpx;" wx:if="{{formData.is_check>0}}">
+<van-button  wx:if="{{status<=0}}" style="margin-right: 10px" type='primary' bind:tap="handleCheck">审核</van-button>
+<van-button wx:if='{{status==1&&oa_state==1}}' style="margin-right: 10px" type="priamry" bind:tap="handlePassModal" data-item="1">通过</van-button>
+  <van-button wx:if='{{status==1&&oa_state==1}}' style="margin-right: 10px" type="warning" bind:tap="handlePassModal" data-item="0">驳回</van-button>
+</view>
+
+</view>
+<view class="item_content">
+  <van-cell-group style="width: 100%;">
+    <van-field
+  label='施工单号'
+  title-width='4.8rem'
+    value="{{ formData.order_number }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='4s门店'
+  title-width='4.8rem'
+    value="{{ formData.four_shop_name }}"
+    required
+    readonly
+    type='textarea'
+    autosize
+  >
+  </van-field>
+  <van-field
+  label='施工产品类型'
+    value="{{ formData.basic_type_item_name }}"
+    placeholder="请选择施工产品类型"
+    required
+    readonly
+    use-button-slot
+  >
+  </van-field>
+  <van-field
+  label='业务类型'
+    value="{{ formData.basic_type_bussiness_name }}"
+    placeholder="请选择业务类型"
+    required
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='特殊情况'
+    value="{{ formData.basic_type_special_name }}"
+    placeholder="请选择特殊情况"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='内饰检查'
+    value="{{ formData.inside==1?'完好':'划痕' }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='车表检查'
+    value="{{ formData.surface==1?'完好':'划痕' }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='车架号'
+    value="{{ formData.vin_no }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='客户姓名'
+    value="{{ formData.own_name }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='客户手机号'
+    value="{{ formData.own_phone }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='汽车品牌'
+    value="{{ formData.car_type_title }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='汽车型号'
+    value="{{ formData.car_file_title }}"
+    readonly
+  >
+  </van-field>
+  </van-cell-group>
+  <view style="background-color:rgb(236, 236, 236);width: 100%;padding: 20rpx;border-radius: 20rpx;">产品套餐</view>
+  <view wx:for="{{formData.sub}}" wx:key="index" style="width: 100%;">
+    <van-cell-group style="width: 100%;">
+    <van-field
+  label='套餐名称'
+    value="{{ item.title }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='套餐编码'
+    value="{{ item.code }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='数量'
+    value="{{ item.number }}"
+    readonly
+  >
+  </van-field>
+  </van-cell-group>
+  <view style='border:2rpx solid; padding:4rpx !important;width: 100%;border-radius: 20rpx;padding: 2rpx;'>
+   <van-cell-group wx:for="{{item.detail}}" wx:for-item="_item" wx:for-index='_index' wx:key="_index">
+    <van-field
+  label='施工部位'
+    value="{{ _item.car_depart_name }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='卷膜分类'
+  wx:if="{{!special_type}}"
+    value="{{ _item.b_r_f_name }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='卷膜型号'
+    value="{{ _item.title }}"
+    readonly
+    wx:if="{{!special_type}}"
+  >
+  </van-field>
+  <van-field
+  label='卷膜编码'
+    value="{{ _item.roll_film_number }}"
+    readonly
+    wx:if="{{!special_type}}"
+  >
+  </van-field>
+  <van-field
+  label='耗用米数'
+    value="{{ _item.meter }}"
+    readonly
+    wx:if="{{!special_type}}"
+  >
+  </van-field>
+  </van-cell-group>
+  </view>
+  </view>
+  <van-cell-group>
+  <van-field
+  label='备注'
+    value="{{ formData.mark }}"
+    readonly
+  >
+  </van-field>
+  </van-cell-group>
+  <view style="color: blue;" bind:tap='handleCheckImg'>点击查看图片</view>
+</view>
+<button style="position: fixed;bottom: 0;width: 100%;z-index: 10;" bind:tap="handleReturn">返回</button>

+ 63 - 0
StepPage/Detail/shi/shi.wxss

@@ -0,0 +1,63 @@
+/* StepPage/pages/first/first.wxss */
+.title{
+  border-radius: 8pt;
+height: 30pt;
+line-height: 30pt;
+letter-spacing: 3pt;
+  text-align: center;
+  width: 90%;
+  margin: 10pt auto;
+  background:-webkit-linear-gradient(top,rgb(255, 255, 255),rgb(231, 229, 229),rgb(192, 189, 189)); 
+}
+.item_content{
+ padding-bottom: 150rpx;
+  width: 90%;
+  margin:0 auto; 
+  display: flex;
+  flex-wrap: wrap;
+}
+.item_content_shop{
+  background:-webkit-linear-gradient(top,rgb(255, 255, 255),rgb(231, 229, 229),rgb(192, 189, 189)); 
+   width: 44%;
+   text-align: center;
+   height: auto;
+   padding: 4pt;
+   /* line-height: 30pt; */
+   border-radius: 10pt;
+   margin: 15rpx 0;
+}
+.item_content_shop:nth-child(2n+1){
+  margin-right: 30rpx;
+}
+.show_box{
+  width: 100%;
+  height: 90%;
+  position: absolute;
+  bottom: 0;
+  background-color: #fff;
+}
+.show_item{
+  height: auto;
+  padding: 15rpx;
+font-size: 40rpx;
+margin:0 20rpx;
+color: rgb(97, 92, 92);
+  text-align: center;
+  border-bottom:1rpx solid rgb(167, 163, 163)
+}
+.btn{
+  text-align: center;
+  margin-top: 20pt;
+}
+.show_title{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.btn_item{
+  width: 200pt;
+  margin: 10pt;
+}
+.font_item{
+  color: black;
+}

+ 338 - 0
StepPage/Detail/tui/tui.js

@@ -0,0 +1,338 @@
+import Dialog from '../../../miniprogram_npm/@vant/weapp/dialog/dialog';
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+shopList:[
+],
+mark:"",
+searchList:[],
+searchBList:[],
+searchBValue:'',
+searchValue:'',
+show:false,
+b_show:false,
+title:'',
+storehouse_name:'',
+basic_type_name:'',
+return_person_name:'',
+logistics_company:'',
+logistics_number:'',
+returnTypeList:[],
+set_status:'',
+is_check:0,
+status:0,
+oa_state:'',
+oa_remark:'',
+oa_state_m:'',
+is_o:true,
+show_m:false,
+formData:{},
+  },
+  handleSearch(){
+   this.setData({
+     show:true,
+     searchList:this.data.shopList
+   })
+  },
+  handleSearchB(){
+  this.setData({
+    b_show:true,
+    searchBList:this.data.returnTypeList
+  })
+  },
+  handleCancel(){
+    this.setData({
+      show:false
+    })
+  },
+  handleCancelB(){
+       this.setData({
+         b_show:false
+       })
+  },
+  handleChangeRemark(e){
+    this.setData({
+      oa_remark:e.detail
+    })
+  },
+  onClose(){
+    this.setData({ 
+      show_m: false,
+      // oa_remark:''
+     });
+  },
+  onSure(){
+    let app = getApp();
+    let openid = app.globalData.openID;
+    if (this.data.is_o) {
+     this.setData({
+       is_o:false
+     })
+      let data = {
+        id:app.globalData.oa_id,
+        state:this.data.oa_state_m,
+        remark:this.data.oa_remark
+      }
+      wx.p.request({
+        url: `${app.globalData.url}wx/oaCheck`,
+        method:'POST',
+        data:{
+      openid,
+      ...data
+      }
+      }).then(res=>{
+        if(res.data.code === 200){
+        
+          this.setData({ show_m: false });
+          this.initData()
+          if(this.data.oa_state_m){
+            this.handleReturn();
+          }
+        }
+        wx.showToast({
+          icon:'none',
+          title: res.data.msg,
+        })
+        setTimeout(()=>{
+        this.setData({
+          is_o:true
+        })
+        },2000)
+      })
+    }
+  },
+  initData(){
+      let app = getApp();
+      let openid = app.globalData.openID;
+      let order_number = app.globalData.detailData.order_number;
+      wx.p.request({
+       url: `${app.globalData.url}wx/materialReturnDetail`,
+       method:'POST',
+       data:{
+     order_number,
+     openid
+     }
+     }).then(res=>{
+       if(res.data.code==200){
+        this.setData({
+          status:res.data.data.status
+        })
+        app.globalData.detailData.status = res.data.data.status;
+      if(res.data.data.status==1){
+        wx.p.request({
+          url: `${app.globalData.url}wx/oaOrderState`,
+          method:'POST',
+          data:{
+        menu_id:220,
+        order_no:res.data.data.order_number,
+        openid
+        }
+        }).then(req=>{
+          if (req.data.code==200) {
+            app.globalData.oa_state = req.data.data.state;
+            app.globalData.oa_id = req.data.data.id
+          }else{
+            app.globalData.oa_state = '';
+            app.globalData.oa_id = ''
+          }
+          this.setData({
+            oa_state:app.globalData.oa_state
+          })
+        })
+      }
+       }
+     })
+  },
+  handleCheck(){
+    Dialog.confirm({
+      title: '审核',
+      message: '确认审核吗?',
+    })
+      .then(() => {
+        let app = getApp();
+        let openid = app.globalData.openID;
+          wx.p.request({
+            url: `${app.globalData.url}wx/checkAll`,
+            method:'POST',
+            data:{
+          order_number:app.globalData.detailData.order_number,
+          openid,
+          opt_case: 6,
+           menu_id:220
+          }
+          }).then(res=>{
+            if(res.data.code==200){
+              wx.showToast({
+                title: res.data.msg
+              })
+             this.initData()
+            }else{
+              wx.showModal({
+                content: res.data.msg,
+                showCancel:false,
+                confirmText:'返回'
+              })
+            }
+          })
+      })
+      .catch(() => {
+        // on cancel
+      });
+  },
+  handlePassModal(e){
+    this.setData({
+      show_m:true,
+      oa_state_m:e.currentTarget.dataset.item
+    })
+  },
+  handleChangeMark(e){
+    let app = getApp();
+    app.globalData.mark = e.detail;
+ this.setData({
+   mark:e.detail
+ })
+  },
+  onSearch(event){
+    let arr = this.data.shopList.filter(v=>v.title.indexOf(event.detail)!=-1);
+    this.setData({
+      searchList:arr
+    })
+  },
+  onSearchB(event){
+    let arr = this.data.returnTypeList.filter(v=>v.title.indexOf(event.detail)!=-1);
+    this.setData({
+      searchBList:arr
+    })
+  },
+  handleReturn(){
+    let app = getApp();
+    app.globalData= {
+      openID:app.globalData.openID,
+      url:'https://zhapi.qingyaokeji.com/',
+      stepData:[]
+    }
+    wx.redirectTo({
+      url: '../../pages/report/TuiList/TuiList',
+    })
+  },
+  handleNext(){
+    if(this.data.title){
+     wx.redirectTo({
+      url: '../tui/tui',
+    })
+    }
+  },
+  onChangeCompany(event){
+   let app = getApp();
+ app.globalData.logistics_company = event.detail;
+ console.log(app);
+ this.setData({
+   logistics_company:event.detail
+ })
+  },
+  onChangeOrder(event){
+    let app = getApp();
+    app.globalData.logistics_number = event.detail;
+    this.setData({
+      logistics_number:event.detail
+    })
+  },
+handleChoose(item){
+  let app = getApp();
+  app.globalData.fourShopId = item.target.dataset.item.id;
+  app.globalData.storehouse_id = item.target.dataset.item.storehouse_id;
+  app.globalData.address = item.target.dataset.item.address;
+  app.globalData.area = item.target.dataset.item.area;
+  app.globalData.company_id = item.target.dataset.item.company_id;
+  app.globalData.storehouse_name = item.target.dataset.item.storehouse_name;
+  this.setData({
+    show:false,
+    title:item.target.dataset.item.title,
+    storehouse_name:item.target.dataset.item.storehouse_name,
+  })
+}, 
+handleChooseB(item){
+  let app = getApp();
+  app.globalData.basic_type_id = item.target.dataset.item.id;
+  app.globalData.basic_type_name = item.target.dataset.item.title;
+ 
+  this.setData({
+    b_show:false,
+    basic_type_name:item.target.dataset.item.title,
+  })
+}, 
+handleShowPic(data){
+  if(data.currentTarget.dataset.item.show_url){
+    wx.previewImage({
+ urls:[data.currentTarget.dataset.item.show_url]
+    })
+  }else{
+    wx.showToast({
+      icon:'none',
+      title: '暂无图片',
+    })
+  }
+},
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    let app = getApp();
+    this.setData({
+      formData:app.globalData.detailData,
+      status:app.globalData.detailData.status,
+      oa_state:app.globalData.oa_state?app.globalData.oa_state:''
+    }) 
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
StepPage/Detail/tui/tui.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 125 - 0
StepPage/Detail/tui/tui.wxml

@@ -0,0 +1,125 @@
+<!--StepPage/pages/first/first.wxml-->
+<van-dialog id="van-dialog" />
+<van-dialog
+  use-slot
+  title="原因"
+  show="{{ show_m }}"
+  show-cancel-button
+  bind:close="onClose"
+  bind:confirm="onSure"
+>
+ <van-cell-group>
+  <van-field
+    value="{{ oa_remark }}"
+    placeholder="请输入"
+    clearable
+    type='textarea'
+    autosize='true'
+    bind:change="handleChangeRemark"
+  >
+  </van-field>
+  </van-cell-group>
+</van-dialog>
+<image src="../../../images/head.png" style="width:100%;height: 250rpx;z-index:-1"></image>
+<view wx:if="{{formData.is_check>0?true:false}}">
+<view wx:if="{{status<=0}}" style="text-align: right;padding: 0 15rpx;"><van-button type='primary' bind:tap="handleCheck">审核</van-button></view>
+<view wx:if='{{status==1&&oa_state==1}}'>
+  <van-button style="margin-right: 10px" type="priamry" bind:tap="handlePassModal" data-item="1">通过</van-button>
+  <van-button style="margin-right: 10px" type="warning" bind:tap="handlePassModal" data-item="0">驳回</van-button>
+</view>
+</view>
+<view class="item_content">
+  <van-cell-group style="width: 100%;">
+  <van-field
+  label='4s门店'
+  title-width='4.8rem'
+    value="{{ formData.four_shop_title }}"
+    required
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='关联仓库'
+  title-width='4.8rem'
+    value="{{ formData.storehouse_title }}"
+    placeholder="默认带出"
+    clearable
+    required
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='退料类型'
+  title-width='4.8rem'
+    value="{{ formData.basic_type_name }}"
+    required
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='物流公司'
+  title-width='4.8rem'
+    value="{{ formData.logistics_company }}"
+    clearable
+    required
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='物流单号'
+  title-width='4.8rem'
+    value="{{ formData.logistics_number }}"
+    required
+    readonly
+  >
+  </van-field>
+  </van-cell-group>
+  <view style='border:2rpx solid; padding:4rpx !important;width: 100%;border-radius: 20rpx;padding: 2rpx;margin-bottom: 20rpx;'  wx:for="{{formData.sub}}" wx:for-item="item" wx:for-index='index' wx:key="index">
+   <van-cell-group>
+  <van-field
+  label='卷膜分类'
+    value="{{ item.b_r_f_name }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='卷膜型号'
+    value="{{ item.title }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='卷膜编码'
+    value="{{ item.roll_film_number }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='退料数量'
+    value="{{ item.number }}"
+    readonly
+  >
+  </van-field>
+  <van-field
+  label='退料原因'
+    value="{{ item.reason }}"
+    readonly
+  >
+  </van-field>
+  <text style="padding: 26rpx;color: blue;" bind:tap="handleShowPic" data-item='{{item}}'>查看图片</text>
+  </van-cell-group>
+  </view>
+  <van-cell-group>
+  <van-field
+  label='备注'
+  title-width='4.8rem'
+    value="{{ formData.mark }}"
+    readonly
+    clearable
+  >
+  </van-field>
+</van-cell-group>
+</view>
+ <button  style="position: fixed;bottom: 0;width: 100%;z-index: 10;" bindtap="handleReturn">
+ 返回
+ </button>

+ 63 - 0
StepPage/Detail/tui/tui.wxss

@@ -0,0 +1,63 @@
+/* StepPage/pages/first/first.wxss */
+.title{
+  border-radius: 8pt;
+height: 30pt;
+line-height: 30pt;
+letter-spacing: 3pt;
+  text-align: center;
+  width: 90%;
+  margin: 10pt auto;
+  background:-webkit-linear-gradient(top,rgb(255, 255, 255),rgb(231, 229, 229),rgb(192, 189, 189)); 
+}
+.item_content{
+ padding-bottom: 150rpx;
+  width: 90%;
+  margin:0 auto; 
+  display: flex;
+  flex-wrap: wrap;
+}
+.item_content_shop{
+  background:-webkit-linear-gradient(top,rgb(255, 255, 255),rgb(231, 229, 229),rgb(192, 189, 189)); 
+   width: 44%;
+   text-align: center;
+   height: auto;
+   padding: 4pt;
+   /* line-height: 30pt; */
+   border-radius: 10pt;
+   margin: 15rpx 0;
+}
+.item_content_shop:nth-child(2n+1){
+  margin-right: 30rpx;
+}
+.show_box{
+  width: 100%;
+  height: 90%;
+  position: absolute;
+  bottom: 0;
+  background-color: #fff;
+}
+.show_item{
+  height: auto;
+  padding: 15rpx;
+font-size: 40rpx;
+margin:0 20rpx;
+color: rgb(97, 92, 92);
+  text-align: center;
+  border-bottom:1rpx solid rgb(167, 163, 163)
+}
+.btn{
+  text-align: center;
+  margin-top: 20pt;
+}
+.show_title{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.btn_item{
+  width: 200pt;
+  margin: 10pt;
+}
+.font_item{
+  color: black;
+}

+ 43 - 18
StepPage/pages/fifth/fifth.js

@@ -36,7 +36,8 @@ Page({
    rollFilmList:[],
    chooseIndex:'',
    chooseItemIndex:'',
-   set_status:''
+   set_status:'',
+   special_type:false
   },
   handleCancel(){
  this.setData({
@@ -156,8 +157,10 @@ onSearchN(event){
           title: '上传成功',
         })
         let src = JSON.parse(ress.data).data.url;
-      console.log(that.data,123);
         that.data.chooseList[that.data.chooseIndex].detail[that.data.chooseItemIndex].src = `${app.globalData.url}${src}`;
+        if(that.data.set_status){
+          that.data.chooseList[that.data.chooseIndex].detail[that.data.chooseItemIndex].show_url = `${app.globalData.url}${src}`;
+        }
         that.setData({
           chooseList:that.data.chooseList,
           showCamera:false
@@ -208,12 +211,17 @@ onSearchN(event){
         }
       })
       },
-      fail: function(res) {
-        console.log(res);
-      }
+      fail: function(res) {}
     })
   },
   handleOpenCamera(data){
+    console.log(data);
+    if(this.data.chooseList[data.currentTarget.dataset.index].detail[data.currentTarget.dataset.itemindex].src){
+      wx.previewImage({
+   urls:[this.data.chooseList[data.currentTarget.dataset.index].detail[data.currentTarget.dataset.itemindex].src]
+      })
+      return
+    }
     if(this.data.set_status=='is_detail'){
       return
     }
@@ -336,14 +344,19 @@ handleChooseN(item){
         }else{
           sub =JSON.parse(JSON.stringify(this.data.carDepartList.filter(c=>res.data.data.car_depart_sub.indexOf(c.id)!=-1)));
         }
-     
+        console.log(item.target.dataset.item.roll_film_id,this.data.rollFilmList)
+     if(!this.data.rollFilmList.find(c=>c.id==item.target.dataset.item.roll_film_id)){
+       return  wx.showToast({
+         icon:'none',
+        title: '套餐中的对应卷膜的未找到!',
+      })
+     }
      sub.forEach(b=>{
       b.car_depart_id = b.id,
       b.car_depart_name = b.title,
-      b. basic_roll_film_id=item.target.dataset.item.basic_roll_film_id,
+      b.basic_roll_film_id=item.target.dataset.item.basic_roll_film_id,
       b.basic_roll_film_name=item.target.dataset.item.roll_film_type,
       b.roll_film_id=item.target.dataset.item.roll_film_id,
-      console.log(this.data.rollFilmList);
       b.warranty_year = this.data.rollFilmList.find(c=>c.id==b.roll_film_id).warranty_year
       b.roll_film_name=item.target.dataset.item.roll_film_name,
       b.roll_film_number='',
@@ -472,6 +485,16 @@ this.setData({
     chooseList:arr
   })
   },
+  handleDelPic(e){
+    let arr = this.data.chooseList;
+    arr[e.currentTarget.dataset.index].detail[e.currentTarget.dataset.itemindex].src='';
+    if(this.data.set_status){
+      arr[e.currentTarget.dataset.index].detail[e.currentTarget.dataset.itemindex].show_url='';
+    }
+    this.setData({
+      chooseList: arr
+    })
+   },
   handleReturn(){
     let app = getApp();
     let openid = app.globalData.openID;
@@ -482,7 +505,6 @@ this.setData({
     }else{
       app.globalData.stepData.forEach((v,index)=>{
         if(v.sort === 6){
-          console.log(index);
           app.globalData.stepData.splice(index,1);
         }
       })
@@ -520,7 +542,6 @@ this.setData({
   onLoad(option) {
     let app = getApp();
     let openid = app.globalData.openID;
-    console.log(app);
     //获取套餐列表 productList
     wx.p.request({
       url: `${app.globalData.url}wx/rollFilmCombineList`,
@@ -538,7 +559,6 @@ this.setData({
        this.setData({
         productList:res.data.data.data.filter(v=>(v.company_id==app.globalData.company_id)&&(app.globalData.choose_b_r_f_id.indexOf(v.basic_roll_film_id)!=-1))
        })
-       console.log(this.data.productList);
       }
     })
     //获取施工部位
@@ -573,7 +593,6 @@ this.setData({
     let company_id = app.globalData.company_id;
     let img_type = app.globalData.img_type||'';
     let data = {}
-    console.log(app.globalData)
     if(app.globalData.set_status){
       data.order_number = app.globalData.detailData.order_number
     }
@@ -582,6 +601,7 @@ this.setData({
       url: `${app.globalData.url}wx/rollFilmList`,
       method:'POST',
       data:{
+        use:1,
     openid,
     storehouse_id,
     company_id,
@@ -611,16 +631,20 @@ this.setData({
           o.expend_meters = o.meter;
           if(app.globalData.detailData.img.find(d=>d.type==3)){
             let src = app.globalData.detailData.img.find(d=>d.type==3).src.split(',')
-            o.src = src[index]?`${app.globalData.url}${src[index]}`:''
+            let show_url = app.globalData.detailData.img.find(d=>d.type==3).show_url.split(',')
+            o.src = src[index]?`${app.globalData.url}${src[index]}`:'';
+            o.show_url = show_url[index]?show_url[index]:''
           }else{
-            o.src=''
+            o.src='';
+            o.show_url= '';
           }
           index++;
         })
       })
       this.setData({
         chooseList:sub,
-        set_status:app.globalData.set_status
+        set_status:app.globalData.set_status,
+        special_type:app.globalData.bussiness_special_type
       })
     }else{
       wx.p.request({
@@ -638,14 +662,15 @@ this.setData({
             app.globalData = data;
             app.globalData.set_status = '';
             if(box){
-              console.log(data.stepData);
               this.setData({
                 chooseList:box.data.chooseList,
-                set_status:''
+                set_status:'',
+                special_type:data.bussiness_special_type
               })
             }else{
               this.setData({
-                set_status:''
+                set_status:'',
+                special_type:data.bussiness_special_type
               })
             }
           }

+ 7 - 2
StepPage/pages/fifth/fifth.wxml

@@ -150,6 +150,7 @@
     </van-button>
   </van-field>
   <van-field
+  wx:if="{{!special_type}}"
   label='卷膜分类'
     value="{{ _item.basic_roll_film_name }}"
     placeholder="请选择卷膜分类"
@@ -163,6 +164,7 @@
   </van-field>
   <van-field
   label='卷膜型号'
+  wx:if="{{!special_type}}"
     value="{{ _item.roll_film_name }}"
     placeholder="请选择卷膜型号"
     required
@@ -175,6 +177,7 @@
   </van-field>
   <van-field
   label='卷膜编码'
+  wx:if="{{!special_type}}"
     value="{{ _item.roll_film_number }}"
     placeholder="请选择卷膜编码"
     required
@@ -190,6 +193,7 @@
   </van-field>
   <van-field
   label='耗用米数'
+  wx:if="{{!special_type}}"
     value="{{ _item.expend_meters }}"
     placeholder="默认带出"
     required
@@ -197,8 +201,9 @@
   >
   </van-field>
 </van-cell-group>
-<view class="image_item" bindtap="handleOpenCamera" data-index='{{index}}' data-itemIndex="{{_index}}" wx:if="{{showImg}}">
-  <image wx:if="{{_item.src?true:false}}" style="width: 100%;height: 100%;" src="{{_item.src}}"></image>
+<view class="image_item" bindtap="handleOpenCamera" data-index='{{index}}' data-itemIndex="{{_index}}" wx:if="{{showImg}}" style="position: relative;">
+  <view wx:if="{{_item.src&&set_status!=='is_detail'?true:false}}" style="position: absolute;right: 0;top: 0;" catch:tap="handleDelPic" data-index="{{index}}" data-itemIndex="{{_index}}"><van-icon name="close" color='red' size='30'/></view>
+  <image wx:if="{{_item.src?true:false}}" style="width: 100%;height: 100%;" src="{{set_status?_item.show_url:_item.src}}"></image>
   <image wx:else style="width: 100%;height: 100%;" src="https://zh.qingyaokeji.com/3.jpg"></image>
 </view>
 </view>

+ 4 - 0
StepPage/pages/first/first.js

@@ -286,6 +286,10 @@ this.setData({
 })
   },
   handleNext(){
+    let app = getApp()
+    if(!app.globalData.storehouse_id){
+      return
+    }
     if(this.data.type==2){
         wx.redirectTo({
           url: '../pan/pan',

+ 0 - 3
StepPage/pages/fourth/fourth.js

@@ -201,10 +201,7 @@ set_status:''
          })
        }
        if(app.globalData.car_file_id&&app.globalData.car_type){
-         console.log(app.globalData.car_file_id)
-         
         app.globalData.is_big = this.data.carFilesList.find(v=>v.id==app.globalData.car_file_id).is_big;
-        console.log(app.globalData.is_big)
         this.setData({
           title:app.globalData.car_type_name,
           fileTitle:app.globalData.car_file_name,

+ 1 - 0
StepPage/pages/lin/lin.js

@@ -221,6 +221,7 @@ wx.p.request({
   url: `${app.globalData.url}wx/rollFilmList`,
   method:'POST',
   data:{
+    use:1,
 openid,
 storehouse_id,
 company_id

+ 1 - 0
StepPage/pages/linNext/linNext.js

@@ -116,6 +116,7 @@ wx.p.request({
   url: `${app.globalData.url}wx/rollFilmList`,
   method:'POST',
   data:{
+    use:1,
 openid,
 storehouse_id,
 company_id

+ 1 - 0
StepPage/pages/pan/pan.js

@@ -388,6 +388,7 @@ getArr(arr){
       url: `${app.globalData.url}wx/rollFilmList`,
       method:'POST',
       data:{
+        use:1,
     openid,
     storehouse_id
     }

+ 3 - 3
StepPage/pages/report/LinList/LinList.js

@@ -151,10 +151,10 @@ if(res.data.code==200){
         icon:'error',
         title: '请选择',
       })
-    }else if(item[0].take_status!=0){
+    }else if(item[0].apply_status!=0){
       return wx.showToast({
-        icon:'error',
-        title: '已审核不能编辑',
+        icon:'none',
+        title: '已申领区域已审核不能编辑',
       })
   }else{
       let app = getApp();

+ 1 - 1
StepPage/pages/report/LinList/LinList.wxml

@@ -61,7 +61,7 @@
   <view class="item_child"><view class="child_text">物流单号:</view>{{item.logistics_number}}</view>
   <view class="item_child"><view class="child_text">单据日期:</view>{{item.crt_time}}</view>
   <view class="item_child"><view class="child_text">4s店名称:</view>{{item.four_shop_name}}</view>
-  <view class="item_child"><view class="child_text">状态:</view>{{item.take_status_name}}</view>
+  <view class="item_child"><view class="child_text">收货状态:</view>{{item.take_status_name}}</view>
   <button wx:if='{{(item.send_status==2&&item.take_status==0)?true:false}}' type="primary" catchtap="handleLock" data-item="{{item}}" data-index="{{index}}">签收</button>
   <button catchtap="handleClickCheck" data-item="{{item}}" style="background-color: rgb(252, 170, 48);color: black;" wx:if="{{(item.send_status==2&&item.take_status==1)?true:false}}">审核流程</button>
 </view>

+ 1 - 1
StepPage/pages/report/PanList/PanList.js

@@ -88,7 +88,7 @@ if(res.data.code==200){
         app.globalData.oa_id = ''
       }
       wx.redirectTo({
-        url: '../../first/first',
+        url: '../../../Detail/pan/pan',
       })
        }
      })

+ 18 - 4
StepPage/pages/report/ShiList/ShiList.js

@@ -88,8 +88,15 @@ if(res.data.code==200){
         app.globalData.oa_state = '';
         app.globalData.oa_id = ''
       }
-      wx.redirectTo({
-        url: '../../first/first',
+      wx.p.request({
+        url: `${app.globalData.url}wx/basicTypeList`,
+        method:'POST',
+        data:{ openid }
+      }).then(req=>{
+        app.globalData.bussiness_special_type = req.data.data.type_one.find(v=>v.id==app.globalData.detailData.basic_type_bussiness_id).special_type
+        wx.redirectTo({
+          url: '../../../Detail/shi/shi'
+        })
       })
        }
      })
@@ -153,8 +160,15 @@ if(res.data.code==200){
          app.globalData.set_status = 'is_edit';
       app.globalData.typePage = '1';
       app.globalData.detailData = res.data.data;
-      wx.redirectTo({
-        url: '../../first/first',
+      wx.p.request({
+        url: `${app.globalData.url}wx/basicTypeList`,
+        method:'POST',
+        data:{ openid }
+      }).then(req=>{
+        app.globalData.bussiness_special_type = req.data.data.type_one.find(v=>v.id==app.globalData.detailData.basic_type_bussiness_id).special_type
+        wx.redirectTo({
+          url: '../../first/first',
+        })
       })
        }
      })

+ 1 - 1
StepPage/pages/report/TuiList/TuiList.js

@@ -87,7 +87,7 @@ if(res.data.code==200){
         app.globalData.oa_id = ''
       }
       wx.redirectTo({
-        url: '../../firstTui/firstTui',
+        url: '../../../Detail/tui/tui',
       })
        }
      })

+ 1 - 1
StepPage/pages/report/TuiList/TuiList.wxml

@@ -55,7 +55,7 @@
 </van-dropdown-menu>
 <view wx:for="{{items}}" wx:key="index" class="{{item.is_choose?'is_item':'item'}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="handleChoose">
   <view style="position: absolute;right: 10rpx;"><van-button color='red' catchtap='handleDel' data-item="{{item}}">删除</van-button></view>
-  <view class="item_child"><view class="child_text">订单号:</view>{{item.crt_time}}</view>
+  <view class="item_child"><view class="child_text">订单号:</view>{{item.order_number}}</view>
   <view class="item_child"><view class="child_text">单据日期:</view>{{item.crt_time}}</view>
   <view class="item_child"><view class="child_text">退料类型:</view>{{item.basic_type_name}}</view>
   <view class="item_child"><view class="child_text">状态:</view>{{item.status_name}}</view>

+ 11 - 3
StepPage/pages/second/second.js

@@ -99,6 +99,7 @@ Page({
     let app = getApp();
     let basic_type_bussiness_id = data.target.dataset.item.id;
      app.globalData.basic_type_bussiness_id = basic_type_bussiness_id;
+     app.globalData.bussiness_special_type = data.target.dataset.item.special_type;
      this.setData({
       b_show:false,
       searchBvalue:'',
@@ -158,11 +159,19 @@ Page({
     let openid = app.globalData.openID;
     app.globalData.inside = this.data.inside;
     app.globalData.surface = this.data.surface;
+    if(!this.data.title||!this.data.b_title){
+      return wx.showToast({
+        icon:'none',
+        title: '请选择必填信息!',
+      })
+    }
     if(this.data.set_status){
       wx.redirectTo({
         url: '../third/third',
       })
     }else{
+      app.globalData.img = app.globalData.img?app.globalData.img:[];
+      app.globalData.img_type =app.globalData.img_type?app.globalData.img_type:'';
       app.globalData.stepData = app.globalData.stepData.filter(v=>v.sort!=2);
       app.globalData.stepData.push({
         sort:2,
@@ -235,7 +244,6 @@ Page({
   onLoad(options) {
     let app = getApp();
     let openid = app.globalData.openID;
-    console.log(app)
     app.globalData.inside = '1';
     app.globalData.surface = '1';
      wx.p.request({
@@ -271,13 +279,14 @@ Page({
            let obj ={};
            obj.type=ele;
            obj.src = '';
-           obj.url = `https://zh.qingyaokeji.com/${ele}.jpg`
+           obj.url = `https://zh.qingyaokeji.com/${ele}.jpg`;
            app.globalData.img.push(obj)
         }
        });
         app.globalData.choose_b_r_f_id = (app.globalData.detailData.item_message.b_r_f_id).split(',').map(c=>c&&(c*1));
         app.globalData.basic_type_bussiness_id = app.globalData.detailData.basic_type_bussiness_id;
         app.globalData.basic_type_special_id = app.globalData.detailData.basic_type_special_id;
+        console.log(app.globalData)
         this.setData({
           title: app.globalData.detailData.basic_type_item_name,
           s_title: app.globalData.detailData.basic_type_special_name,
@@ -305,7 +314,6 @@ Page({
                app.globalData = data;
                app.globalData.set_status = '';
               if(box){
-                console.log(box);
                 this.setData({
                   title:box.data.title,
                   s_title:box.data.s_title,

+ 30 - 6
StepPage/pages/sixth/sixth.js

@@ -13,6 +13,12 @@ Page({
    set_status:''
   },
   handleOpenCamera(row){
+    if(this.data.imgList[row.currentTarget.dataset.index].src){
+      wx.previewImage({
+   urls:[this.data.imgList[row.currentTarget.dataset.index].src]
+      })
+      return
+    }
     if(this.data.set_status=='is_detail'){
       return
     }
@@ -63,12 +69,20 @@ Page({
         }
         if(that.data.imgList[that.data.phoneIndex].src){
           that.data.imgList[that.data.phoneIndex].src = `${app.globalData.url}${src}`;
+          if(that.data.set_status){
+            that.data.imgList[that.data.phoneIndex].show_url = `${app.globalData.url}${src}`;
+          }
           that.setData({
             imgList:that.data.imgList,
           })
         }else{
           that.data.imgList[that.data.phoneIndex].src = `${app.globalData.url}${src}`;
-          that.data.imgList.push({type:'1',src:''})
+          if(that.data.set_status){
+            that.data.imgList[that.data.phoneIndex].show_url = `${app.globalData.url}${src}`;
+            that.data.imgList.push({type:'1',src:'',show_url:''})
+          }else{
+            that.data.imgList.push({type:'1',src:''})
+          }
           that.setData({
             imgList:that.data.imgList,
           })
@@ -176,13 +190,21 @@ wx.chooseImage({
         let src = JSON.parse(ress.data).data.url;
         if(that.data.imgList[that.data.phoneIndex].src){
           that.data.imgList[that.data.phoneIndex].src = `${app.globalData.url}${src}`;
+          if(that.data.set_status){
+            that.data.imgList[that.data.phoneIndex].show_url = `${app.globalData.url}${src}`;
+          }
           that.setData({
             imgList:that.data.imgList,
             showCamera:false
           })
         }else{
           that.data.imgList[that.data.phoneIndex].src = `${app.globalData.url}${src}`;
-          that.data.imgList.push({type:'1',src:''})
+          if(that.data.set_status){
+            that.data.imgList[that.data.phoneIndex].show_url = `${app.globalData.url}${src}`;
+            that.data.imgList.push({type:'1',src:'',show_url:''})
+          }else{
+            that.data.imgList.push({type:'1',src:''})
+          }
           that.setData({
             imgList:that.data.imgList,
             showCamera:false
@@ -369,16 +391,18 @@ handleBack(){
     if(app.globalData.set_status){
           if(app.globalData.detailData.img.find(v=>v.type==1)){
             let src = app.globalData.detailData.img.find(v=>v.type==1).src.split(',');
+            let show_url = app.globalData.detailData.img.find(v=>v.type==1).show_url.split(',');
             if(src.length!=0&&src[0]!=''){
               let arr = [];
-              src.forEach(v=>{
+              src.forEach((v,index)=>{
                 let obj = {
                   type:1,
-                  src:`${app.globalData.url}${v}`
+                  src:`${app.globalData.url}${v}`,
+                  show_url:show_url[index]
                 }
                 arr.push(obj)
               })
-              arr.push({type:1,src:''})
+              arr.push({type:1,src:'',show_url:''})
               this.setData({
                 imgList:arr,
                 mark:app.globalData.detailData.mark,
@@ -386,7 +410,7 @@ handleBack(){
               })
             }else{
               this.setData({
-                imgList:[{type:'1',src:''}],
+                imgList:[{type:'1',src:'',show_url:''}],
                 mark:app.globalData.detailData.mark,
                 set_status:app.globalData.set_status
               })

+ 1 - 1
StepPage/pages/sixth/sixth.wxml

@@ -25,7 +25,7 @@
 <view wx:for="{{imgList}}" wx:key="index" class="image_item" bindtap="handleOpenCamera" data-index='{{index}}'>
 <view style="width: 100%;height: 100%;" class="item1" wx:if="{{item.src||set_status!='is_detail'?true:false}}">
   <view wx:if="{{item.src?true:false}}" style="width: 100%;height: 100%;overflow: hidden;position: relative;">
-  <image style="width: 100%;height: 100%;" src="{{item.src}}"></image>
+  <image style="width: 100%;height: 100%;" src="{{set_status?item.show_url:item.src}}"></image>
   <view class="del" catchtap="handleDel" data-index="{{index}}" wx:if="{{set_status!=='is_detail'}}"><view class="del_x">x</view></view>
   </view>
   <image wx:else style="width: 100%;height: 100%;" src="https://zh.qingyaokeji.com/1.jpg"></image>

+ 30 - 4
StepPage/pages/third/third.js

@@ -11,7 +11,20 @@ Page({
    set_status:'',
    cameraSet:'back'
   },
+  handleDelPic(e){
+   let imgList = this.data.imgList;
+   imgList[e.currentTarget.dataset.index].src = '';
+   this.setData({
+     imgList:imgList
+   })
+  },
   handleOpenCamera(row){
+    if(this.data.imgList[row.currentTarget.dataset.index].src){
+      wx.previewImage({
+   urls:[this.data.imgList[row.currentTarget.dataset.index].src]
+      })
+      return
+    }
     if(this.data.set_status==='is_detail'){
       return
     }
@@ -51,15 +64,22 @@ Page({
         })
         let src = JSON.parse(ress.data).data.url;
         that.data.imgList[that.data.phoneIndex].src = `${app.globalData.url}${src}`;
+        if(that.data.set_status){
+          that.data.imgList[that.data.phoneIndex].show_url = `${app.globalData.url}${src}`;
+        }
         app.globalData.img.forEach(v=>{
         if(v.type== that.data.imgList[that.data.phoneIndex]){
-          v.src = `${app.globalData.url}${src}`
+          v.src = `${app.globalData.url}${src}`;
+          if(that.data.set_status){
+            v.show_url = `${app.globalData.url}${src}`;
+          }
         }
         })
         that.setData({
           imgList:that.data.imgList,
           showCamera:false
         })
+        console.log(that.data.imgList)
       },
       fail: function(ress){
       
@@ -155,13 +175,14 @@ handleReturn(){
   onLoad(options) {
        let app = getApp();
        let imgList = [];
-       imgList = app.globalData.img.filter(v=>['1','2','3'].indexOf(v.type)==-1);
+       imgList = app.globalData.img?app.globalData.img.filter(v=>['1','2','3'].indexOf(v.type)==-1):[];
        if(app.globalData.set_status){
          if(app.globalData.basic_type_item_id == app.globalData.detailData.basic_type_item_id){
              imgList.forEach(c=>{
-               if(app.globalData.detailData.img.find(v=>v.type==c.type)){
+               
                c.src = app.globalData.detailData.img.find(v=>v.type==c.type).src?`${app.globalData.url}${app.globalData.detailData.img.find(v=>v.type==c.type).src}`:''
-               }
+               c.show_url = app.globalData.detailData.img.find(v=>v.type==c.type).show_url?app.globalData.detailData.img.find(v=>v.type==c.type).show_url:''
+               
              })
          }
          this.setData({
@@ -169,6 +190,11 @@ handleReturn(){
           set_status:app.globalData.set_status
         })  
        }else{
+        if(app.globalData.stepData.length==0){
+          wx.redirectTo({
+            url: '../second/second',
+          })
+        }
         this.setData({
           imgList:imgList,
           set_status:''

+ 5 - 3
StepPage/pages/third/third.wxml

@@ -8,11 +8,13 @@
   </view>
 </view>
 <view wx:else>
-  <cover-image src="../../../images/head.png"></cover-image>
+  <!-- <cover-image src="../../../images/head.png"></cover-image> -->
+  <image src="../../../images/head.png" style="width:100%;height: 250rpx;z-index:-1"></image>
 <view class="title">2.车辆检查、车辆保护照片上传</view>
 <scroll-view class="img" style="height: 58vh;display: flex;flex-wrap: wrap;" scroll-y="true">
-<view wx:for="{{imgList}}" wx:key="index" class="image_item" bindtap="handleOpenCamera" data-index='{{index}}'>
-  <image wx:if="{{item.src?true:false}}" style="width: 100%;height: 100%;" src="{{item.src}}"></image>
+<view wx:for="{{imgList}}" wx:key="index" class="image_item" bindtap="handleOpenCamera" data-index='{{index}}' style="position: relative;">
+<view wx:if="{{item.src&&set_status!=='is_detail'?true:false}}" style="position: absolute;right: 0;top: 0;" catch:tap="handleDelPic" data-index="{{index}}"><van-icon name="close" color='red' size='30'/></view>
+  <image wx:if="{{item.src?true:false}}" style="width: 100%;height: 100%;" src="{{set_status?item.show_url:item.src}}"></image>
   <image wx:else style="width: 100%;height: 100%;" src="{{item.url}}"></image>
 </view>
 </scroll-view>

+ 21 - 1
StepPage/pages/tui/tui.js

@@ -50,6 +50,9 @@ Page({
         })
         let img = JSON.parse(ress.data).data.url;
         that.data.productList[that.data.chooseIndex].img = `${app.globalData.url}${img}`;
+        if(that.data.set_status){
+          that.data.productList[that.data.chooseIndex].show_url = `${app.globalData.url}${img}`;
+        }
         that.setData({
           productList:that.data.productList,
           showCamera:false
@@ -76,7 +79,21 @@ Page({
        url: '../report/TuiList/TuiList',
      })
   },
+  handleDelPic(e){
+    let arr = this.data.productList;
+    arr[e.currentTarget.dataset.index].img = '';
+    this.setData({
+      productList:arr
+    })
+  },
   handleOpenCamera(data){
+    console.log(this.data.productList)
+    if(this.data.productList[data.currentTarget.dataset.index].img){
+      wx.previewImage({
+   urls:[this.data.productList[data.currentTarget.dataset.index].img]
+      })
+      return
+    }
   if(this.data.set_status=='is_detail'){
     return
   }
@@ -345,6 +362,7 @@ wx.p.request({
   url: `${app.globalData.url}wx/rollFilmList`,
   method:'POST',
   data:{
+    use:1,
 openid,
 storehouse_id,
 company_id
@@ -360,7 +378,9 @@ company_id
 if(app.globalData.set_status&&app.globalData.storehouse_id==app.globalData.detailData.storehouse_id&&app.globalData.company_id == app.globalData.detailData.company_id){
   let arr = JSON.parse(JSON.stringify(app.globalData.detailData.sub))
   arr.forEach(v=>{
-    v.img = `${app.globalData.url}${v.img}`
+    if(v.img){
+      v.img = `${app.globalData.url}${v.img}`
+    }
   })
    this.setData({
      productList:arr,

+ 3 - 2
StepPage/pages/tui/tui.wxml

@@ -124,8 +124,9 @@ bind:change='handleChangeNumber'
   >
   </van-field>
   </van-cell-group>
-  <view class="image_item" bindtap="handleOpenCamera" data-index='{{index}}'>
-  <image style="width: 100%;height: 100%;" src="{{item.img}}"></image>
+  <view class="image_item" bindtap="handleOpenCamera" data-index='{{index}}' style="position: relative;">
+    <view wx:if="{{item.img&&set_status!=='is_detail'?true:false}}" style="position: absolute;right: 0;top: 0;" catch:tap="handleDelPic" data-index="{{index}}"><van-icon name="close" color='red' size='30'/></view>
+  <image style="width: 100%;height: 100%;" src="{{set_status?item.show_url:item.img}}"></image>
 </view>
 </view>
 </view>

+ 49 - 11
StepPage/pages/writeVIN/writeVIN.js

@@ -66,6 +66,9 @@ if(this.data.cameraSet=='back'){
         })
         let img = JSON.parse(ress.data).data.url;
         that.data.imgList[0].src = `${app.globalData.url}${img}`;
+        if(that.data.set_status){
+          that.data.imgList[0].show_url = `${app.globalData.url}${img}`;
+        }
         that.setData({
           imgList:that.data.imgList,
           showCamera:false
@@ -82,6 +85,12 @@ if(this.data.cameraSet=='back'){
     })
   },
   handleOpenCamera(data){
+    if(this.data.imgList[0].src){
+      wx.previewImage({
+   urls:[this.data.imgList[0].src]
+      })
+      return
+    }
     if(this.data.set_status=='is_detail'){
       return
     }
@@ -186,10 +195,27 @@ handleCancelp(){
   })
 },
   onSearch(event){
-     let arr = this.data.vinList.filter(v=>v.vin_no.indexOf(event.detail)!=-1);
-     this.setData({
-       searchList:arr
-     })
+    let app = getApp();
+    let openid = app.globalData.openID;
+     wx.p.request({
+      url: `${app.globalData.url}wx/ownerList`,
+      method:'POST',
+      data:{
+    openid,
+   vin_no:event.detail
+    }
+    }).then(res=>{
+      if(res.data.code==200){
+       this.setData({
+         vinList:res.data.data.data,
+         searchList:res.data.data.data
+       })
+      }
+    })
+    //  let arr = this.data.vinList.filter(v=>v.vin_no.indexOf(event.detail)!=-1);
+    //  this.setData({
+    //    searchList:arr
+    //  })
   },
   handleShow(){
  this.setData({
@@ -259,6 +285,14 @@ handleCancelp(){
       custom_mobile:event.detail
     })
   },
+  handleDelPic(e){
+    console.log(e);
+    let imgList = this.data.imgList;
+    imgList[e.currentTarget.dataset.index].src = '';
+    this.setData({
+      imgList:imgList
+    })
+   },
   onChangeName(event){
     let app = getApp();
     app.globalData.name_id = '';
@@ -355,7 +389,9 @@ handleCancelp(){
       url: `${app.globalData.url}wx/ownerList`,
       method:'POST',
       data:{
-    openid
+    openid,
+    page_index:1,
+    page_size:20
     }
     }).then(res=>{
       if(res.data.code==200){
@@ -365,11 +401,11 @@ handleCancelp(){
       }
       if(app.globalData.set_status){
         let vin_no = app.globalData.detailData.vin_no;
-        app.globalData.car_file_name = this.data.vinList.find(v=>v.vin_no==vin_no).car_file_name;
-        app.globalData.car_file_id = this.data.vinList.find(v=>v.vin_no==vin_no).car_file_id;
-        app.globalData.car_type_name = this.data.vinList.find(v=>v.vin_no==vin_no).car_type_name;
-        app.globalData.car_type = this.data.vinList.find(v=>v.vin_no==vin_no).car_type;
-        app.globalData.own_id = this.data.vinList.find(v=>v.vin_no==vin_no).id;
+        app.globalData.car_file_name = app.globalData.detailData.car_file_title;
+        app.globalData.car_file_id = app.globalData.detailData.car_file_id;
+        app.globalData.car_type_name = app.globalData.detailData.car_type_title;
+        app.globalData.car_type = app.globalData.detailData.car_type;
+        app.globalData.own_id = app.globalData.detailData.own_id;
         app.globalData.name_id = app.globalData.detailData.own_sub_id;
         app.globalData.custom_name = app.globalData.detailData.own_name;
         app.globalData.custom_mobile = app.globalData.detailData.own_phone;
@@ -378,9 +414,11 @@ handleCancelp(){
           this.setData({
             imgList:[{
               type:'2',
-              src:app.globalData.detailData.img.find(s=>s.type==2)&&app.globalData.detailData.img.find(s=>s.type==2).src?`${app.globalData.url}${app.globalData.detailData.img.find(s=>s.type==2).src}`:''
+              src:app.globalData.detailData.img.find(s=>s.type==2)&&app.globalData.detailData.img.find(s=>s.type==2).src?`${app.globalData.url}${app.globalData.detailData.img.find(s=>s.type==2).src}`:'',
+              show_url:app.globalData.detailData.img.find(s=>s.type==2)&&app.globalData.detailData.img.find(s=>s.type==2).show_url?app.globalData.detailData.img.find(s=>s.type==2).show_url:''
             }]
           })
+          console.log(this.data.imgList)
         }else{
           this.setData({
             imgList:[]

+ 3 - 2
StepPage/pages/writeVIN/writeVIN.wxml

@@ -103,8 +103,9 @@
     </van-button>
   </van-field>
 </van-cell-group>
-<view class="image_item" bindtap="handleOpenCamera" wx:for="{{imgList}}" wx:key="index">
-  <image wx:if="{{item.src?true:false}}" style="width: 100%;height: 100%;" src="{{item.src}}"></image>
+<view class="image_item" style="position: relative;" bindtap="handleOpenCamera" wx:for="{{imgList}}" wx:key="index">
+  <view wx:if="{{item.src&&set_status!=='is_detail'?true:false}}" style="position: absolute;right: 0;top: 0;" catch:tap="handleDelPic" data-index="{{index}}"><van-icon name="close" color='red' size='30'/></view>
+  <image wx:if="{{item.src?true:false}}" style="width: 100%;height: 100%;" src="{{set_status?item.show_url:item.src}}"></image>
   <image wx:else style="width: 100%;height: 100%;" src="https://zh.qingyaokeji.com/2.jpg"></image>
 </view>
 </view>

+ 6 - 1
app.json

@@ -35,7 +35,11 @@
         "pages/report/LinList/LinList",
         "pages/report/DiaoList/DiaoList",
         "pages/report/ShenList/ShenList",
-        "pages/qrCode/qrCode"
+        "pages/qrCode/qrCode",
+        "Detail/shi/shi",
+        "Detail/pan/pan",
+        "Detail/tui/tui",
+        "Detail/diao/diao"
       ]
     }
   ],
@@ -47,6 +51,7 @@
     "navigationStyle": "custom"
   },
   "usingComponents": {
+    "van-icon": "@vant/weapp/icon/index",
     "van-button": "@vant/weapp/button/index",
       "van-field": "@vant/weapp/field/index",
       "van-notify": "@vant/weapp/notify/index",

+ 2 - 2
project.private.config.json

@@ -1,11 +1,11 @@
 {
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "projectname": "jiufang",
+  "projectname": "miniprogram-92",
   "setting": {
     "compileHotReLoad": true,
     "urlCheck": true
   },
-  "libVersion": "2.33.0",
+  "libVersion": "3.7.3",
   "condition": {
     "miniprogram": {
       "list": [