#
whycq
2023-11-21 662445047bd24967041b74cd6be53b7493ff312d
pages/business/saleManage/saleManage.vue
@@ -17,13 +17,16 @@
       </uni-nav-bar>
      <!-- 搜索框 -->
      <view class="search-bg">
         <uni-search-bar placeholder="客户代号/名称" bgColor="#f4f4f4"  @confirm="search" />
         <u-search placeholder="输入" v-model="keyword" :clearabled="true" @custom="search()" @search="search()"></u-search>
      </view>
      <view>
         <!-- 客户列表 -->
         <view class="c-list" @click="getDetails(item.id)" v-for="(item,index) in csmtrList" :key="index">
            <view class="titles">
               <y-title :title="item.name"></y-title>
         <view class="c-list" v-for="(item,index) in csmtrList" :key="index">
            <view class="titles" @click="getDetails(item.id)">
               <view style="flex: 1;">
                  <y-title :title="item.name"></y-title>
               </view>
               <uni-icons class="opt-icon" type="right" size="20" color="#b9b9b9"></uni-icons>
            </view>
            <view class="cstmrs">
               <view class="cstmrs-item">
@@ -36,7 +39,7 @@
                  <view class="list-item1">项目代号</view><view class="list-item2">{{item.uuid}}</view>
               </view>
               <view class="cstmrs-item">
                  <view class="list-item1">甲方单位</view><view class="list-item2">{{item.cstmrId$ ? item.cstmrId$ : '--'}}</view>
                  <view class="list-item1">甲方单位</view><view class="list-item2 color-main" @click="goDetls(item.cstmrId)">{{item.cstmrId$ ? item.cstmrId$ : '--'}}</view>
               </view>
               <view class="cstmrs-item">
                  <view class="list-item1">所属区域</view><view class="list-item2">{{item.pcd$ ? item.pcd$ : '--'}}</view>
@@ -68,29 +71,12 @@
               <view class="cstmrs-item">
                  <view class="list-item1">状态</view><view class="list-item2">{{item.status$ ? item.status$ : '--'}}</view>
               </view>
            </view>
         </view>
      </view>
      <!-- <uni-load-more :status="status" :icon-size="16" :content-text="contentText" /> -->
      <u-empty v-if="true" icon="../../../static/image/emptyList.png" v-show="csmtrList.length <= 0" />
      <view style="height: 10rpx;"></view>
      <view class="fxbtn">
         <uni-icons type="plusempty" color="#fff" @click="add()" ></uni-icons>
      </view>
@@ -102,10 +88,11 @@
   export default { 
      data() {
         return {
            keyword: '',
            user: {
               username: '',
               id: 0,
               type: ''
               type: 'user_id'
            },
            falg: true,
            csmtrList: [],
@@ -161,10 +148,19 @@
         getCsmtr1(e) {
            let that = this
            that.csmtrList = []
            uni.showLoading({})
            let param = {curr:1,limit:4,dept_id: 0,user_id: 67}
            if (this.user.type == 'user_id') {
               param = {curr:1,limit:4,user_id: that.user.id}
            } else if(this.user.type == 'dept_id') {
               param = {curr:1,limit:4,dept_id: that.user.id}
            } else {
               param = {curr:1,limit:4}
            }
            uni.request({
               url: that.baseUrl + '/order/page/auth',
               header: {'token' : uni.getStorageSync('token'),},
               data: {curr:1,limit:4},
               data: param,
               method:'GET',
               success(result) {
                  if (result.statusCode ===  404) {
@@ -197,14 +193,26 @@
                     });
                  }, 1000);
               },
               complete() {
                  uni.hideLoading()
               }
            })
         },
         getCsmtr() {
            let that = this
            uni.showLoading({})
            let param = {curr:that.curr,limit:4,dept_id: 0,user_id: 67}
            if (this.user.type == 'user_id') {
               param = {curr:that.curr,limit:4,user_id: that.user.id}
            } else if(this.user.type == 'dept_id') {
               param = {curr:that.curr,limit:4,dept_id: that.user.id}
            } else {
               param = {curr:that.curr,limit:4}
            }
            uni.request({
               url: that.baseUrl + '/order/page/auth',
               header: {'token' : uni.getStorageSync('token'),},
               data: {curr:that.curr,limit:4},
               data: param,
               method:'GET',
               success(result) {
                  if (result.statusCode ===  404) {
@@ -238,11 +246,19 @@
                     });
                  }, 1000);
               },
               complete() {
                  uni.hideLoading()
               }
            })
         },
         getDetails(id) {
            uni.navigateTo({
               url: '/pages/business/saleManage/saleManageDetails?id=' + id
            })
         },
         goDetls(id) {
            uni.navigateTo({
               url: '/pages/business/saleManage/cstmrDetls?id=' + id
            })
         },
         // ---
@@ -294,6 +310,7 @@
      padding-left: 10rpx;
      text-indent: 5rpx;
      margin-top: 10rpx;
      display: flex;
   }
   .cstmrs {
      display: flex;
@@ -303,6 +320,9 @@
   .cstmrs-item {
      display: flex;
   }
   .color-main {
      color: #55aaff
   }
   /* .title {
      height: 60rpx;
      line-height: 70rpx;