Browse Source

客户详情页面修改

liyuan 3 months ago
parent
commit
2c6aa6dbb8
3 changed files with 855 additions and 754 deletions
  1. 1 1
      http/api.js
  2. 844 743
      pages/views/customerSubmit/customerDetails.vue
  3. 10 10
      pages/views/customerSubmit/index.vue

+ 1 - 1
http/api.js

@@ -47,7 +47,7 @@ http.interceptors.response.use((response) => {
 		return response.data
 	}
 	// 服务端返回的状态码不等于200,则reject()
-	if (response.data.code !== 200) {
+	if (response.data.code !== 200 && response.data.code !== 601) {
 		if (response.data.code) {
 			return Promise.reject(response);
 		} else {

+ 844 - 743
pages/views/customerSubmit/customerDetails.vue

@@ -1,751 +1,852 @@
 <template>
-	<view :class="mask ? 'tl-show': ''">
-		<u-cell-group :border="false">
-			<u-cell :border="false" center title="基础信息"></u-cell>
-		</u-cell-group>
-		<u--form labelPosition="left" :model="form" ref="form" labelWidth="150rpx"
-			style="margin-top: 10rpx;margin-bottom: 150rpx;">
-			<view style="width: calc(96%);margin: 0 auto;background-color: #fff;border-radius: 20rpx;">
-				<view style="padding: 0 10rpx;">
-					<u-form-item label="客户名称" prop="cname" borderBottom>
-						<u-input v-model="form.cname" inputAlign="right" border="none" placeholder="请输入客户名称" />
-					</u-form-item>
-					
-					<u-form-item label="客户分类" borderBottom
-						@click="customerTypeShow = true">
-						<u-input border="corpsTypeName" inputAlign="right" disabled placeholder="请选择客户分类"
-							 v-model="form.corpsTypeName" disabledColor="#ffffff" />
-					</u-form-item>
-					
-					<u-form-item label="电话" prop="tel" borderBottom>
-						<u-input v-model="form.tel" inputAlign="right" border="none" placeholder="请输入电话" />
-					</u-form-item>
-					<u-form-item label="业务员" borderBottom
-						@click="filterAll(['salesmanName','salesmanId'])">
-						<u-input border="none" inputAlign="right" disabled placeholder="请选择业务员"
-							 v-model="form.salesmanName" disabledColor="#ffffff" />
-					</u-form-item>
-					<u-form-item label="账期" prop="cname" borderBottom>
-						<u-input v-model="form.accountPeriod" inputAlign="right" border="none" 
-						placeholder="请输入帐期" />
-					</u-form-item>
-					
-					<u-form-item label="发货仓库" borderBottom 
-					@click="filterAll(['deliveryWarehouseName','deliveryWarehouseId'])">
-						<u-input border="none" inputAlign="right" disabled placeholder="请选择发货仓库"
-							 v-model="form.deliveryWarehouseName" disabledColor="#ffffff" />
-					</u-form-item>
-					
-					<u-form-item label="商城价格" borderBottom
-					@click="filterAll(['priceSystem','priceSystem'])">
-						<u-input border="none" inputAlign="right" disabled placeholder="请选择商城价格"
-							 v-model="form.priceSystem" disabledColor="#ffffff" />
-					</u-form-item>
-					
-					<u-form-item label="信用额度" prop="creditLimit" borderBottom>
-						<u-input v-model="form.creditLimit" inputAlign="right" border="none"
-						 placeholder="请输入帐期" />
-					</u-form-item>
-					<u-form-item label="使用信用额度" prop="useCreditLimit" borderBottom >
-						<u-input v-model="form.useCreditLimit" inputAlign="right"
-						 disabled disabledColor="#fff" border="none" placeholder="请输入帐期" />
-					</u-form-item>
-					<u-form-item label="备注" prop="cname" borderBottom>
-						<u--textarea v-model="form.remarks" border="none" placeholder="请输入备注" ></u--textarea>
-					</u-form-item>
-					
-					<!-- <u-form-item label="送货地址" :borderBottom="false"
-						@click="filterAll(['corpsAddrList','corpsAddrList'])">
-						({{form.corpsAddrList.length}})
-						<u-input border="none" inputAlign="right" suffixIcon="plus-circle" disabled
-							disabledColor="#ffffff" />
-					</u-form-item> -->
-				</view>
-			</view>
-			
-			<u-cell-group :border="false">
-				<u-cell :border="false" center title="客户联系人" :arrow-direction="customerContact==false?'up':'down'"
-					:value="customerContact==false?'展开':'收起'" :isLink="true" @click="customerContact = !customerContact">
-					<view slot="title" class="u-slot-title" style="display: flex; align-items: center;">
-						<text style="color: #244e96;width: 150rpx;">客户联系人</text>
-						<view style="margin-left: 10rpx; background: #fd4b09;color: #fff;border-radius: 10rpx;padding: 5rpx 10px;" 
-						@click.stop="contactsAddfun">
-							新增
-						</view>
-					</view>
-				</u-cell>
-			</u-cell-group>
-			<view style="width: calc(96%);margin: 0 auto;border-radius: 20rpx;"
-			 v-if="customerContact">
-				<view style="padding: 10rpx 20rpx;margin: 20rpx 0;background-color: #fff;box-sizing: border-box;" 
-				v-for="(item,index) in form.corpsAttnList" :key="index">
-				<view style="display: flex;align-items: center;justify-content: space-between;font-size: 32rpx;margin: 10rpx 0;">
-					<view style="color: #fd4b09;">序号{{index + 1}}</view>
-					<view style="margin-left: 10rpx; background: #fd4b09;color: #fff;border-radius: 10rpx;padding: 5rpx 10px;" 
-					@click="contactsDelfun('联系人',index,item.id)" >
-						删除
-					</view>
-				</view>
-					<u-form-item label="联系人" prop="cname" borderBottom>
-						<u-input v-model="item.cname" inputAlign="right" border="none" placeholder="请输入联系人" />
-					</u-form-item>
-					<u-form-item label="电话" prop="cname" borderBottom>
-						<u-input v-model="item.tel" inputAlign="right" border="none" placeholder="请输入电话" />
-					</u-form-item>
-					<u-form-item label="备注" prop="cname" borderBottom>
-						<u--textarea v-model="item.remarks" border="none" placeholder="请输入备注" ></u--textarea>
-					</u-form-item>
-				</view>
-			</view>
-			
-			<u-cell-group :border="false">
-				<u-cell :border="false" center title="地址信息" :arrow-direction="addressInformation==false?'up':'down'"
-					:value="addressInformation==false?'展开':'收起'" :isLink="true" @click="addressInformation = !addressInformation">
-					<view slot="title" class="u-slot-title" style="display: flex; align-items: center;">
-						<text style="color: #244e96;width: 150rpx;">地址信息</text>
-						<view style="margin-left: 10rpx; background: #fd4b09;color: #fff;border-radius: 10rpx;padding: 5rpx 10px;" 
-						@click.stop="corpsAddrfun">
-							新增
-						</view>
-					</view>
-				</u-cell>
-			</u-cell-group>
-			<view style="width: calc(96%);margin: 0 auto;border-radius: 20rpx;"
-			 v-if="addressInformation">
-				<view style="padding: 10rpx 20rpx;margin: 20rpx 0;background-color: #fff;box-sizing: border-box;" 
-				v-for="(item,index) in form.corpsAddrList" :key="index">
-				<view style="display: flex;align-items: center;justify-content: space-between;font-size: 32rpx;margin: 10rpx 0;">
-					<view style="color: #fd4b09;">序号{{index + 1}}</view>
-					<view style="margin-left: 10rpx; background: #fd4b09;color: #fff;border-radius: 10rpx;padding: 5rpx 10px;" 
-					@click="contactsDelfun('地址',index,item.id)" >
-						删除
-					</view>
-				</view>
-					<u-form-item label="联系人" prop="cname" borderBottom>
-						<u-input v-model="item.contacts" inputAlign="right" border="none" placeholder="请输入联系人" />
-					</u-form-item>
-					<u-form-item label="电话" prop="cname" borderBottom>
-						<u-input v-model="item.tel" inputAlign="right" border="none" placeholder="请输入联系人" />
-					</u-form-item>
-					<u-form-item label="地址" prop="cname" borderBottom 
-					@click="belongtoareafun(index)" >
-						<u-input v-model="item.belongtoarea" inputAlign="right" border="none" placeholder="请输入地址" />
-					</u-form-item>
-					<u-form-item label="详细地址" prop="cname" borderBottom>
-						<u--textarea v-model="item.detailedAddress" border="none" placeholder="请输入详细地址" ></u--textarea>
-					</u-form-item>
-					<u-form-item label="备注" prop="cname" borderBottom>
-						<u--textarea v-model="item.remarks" border="none" placeholder="请输入备注" ></u--textarea>
-					</u-form-item>
-				</view>
-			</view>
-			
-			
-			
-			<u-cell-group :border="false">
-				<u-cell :border="false" center title="图片信息" :arrow-direction="enclosure==false?'up':'down'"
-					:value="enclosure==false?'展开':'收起'" :isLink="true" @click="enclosure = !enclosure"></u-cell>
-			</u-cell-group>
-			<view style="width: calc(96%);margin: 0 auto;background-color: #fff;border-radius: 20rpx;" v-if="enclosure">
-				<view style="padding: 10rpx 10rpx;">
-					<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
-						:maxCount="10"></u-upload>
-				</view>
-			</view>
-			
-		</u--form>
-		
-		
-		
-		
-		<view style="width: 100%;position: fixed;bottom: 0;background-color: #fff;">
-			<view style="width: 96%;;margin: 20rpx auto; display: flex;">
-				<u-button @click="corpsDescSubmitfun" type="success" color="#fd4b09" shape="circle" text="确认提交"></u-button>
-			</view>
-		</view>
-		
-		<!-- 客户分类多级选择 -->
-		<u-picker :show="customerTypeShow" ref="customerTypeUPicker" keyName="title"
-			:columns="customerTypeColumns" 
-			@confirm="customerTypeConfirm" @change="customerTypeChange" @cancel="customerTypeShow = false">
-		</u-picker>
-		
-		<!-- 单列的选择框 -->
-		<u-picker :show="pickerShow" :columns="pickerColumns" :keyName="pickerKeyName" 
-		@cancel="pickerShow = false" @confirm="pickerConfirm"></u-picker>
-		
-		<!-- 地址信息多级选择 -->
-		<u-picker :show="belongtoareaShow" ref="belongtoareaUPicker" keyName="name"
-			:columns="regionSelectData" 
-			@confirm="belongtoareaConfirm" @change="belongtoareaChange" @cancel="belongtoareaShow = false">
-		</u-picker>
-		
-		
-		<!-- <u-popup :show="DZpopupShow" @close="DZpopupShow = false,mask = false,formTwo = {}" closeable :closeOnClickOverlay="false"
-			zIndex="10070">
-			<view style="width: 96%;margin: auto auto;margin-top: 20rpx;padding-bottom: 20rpx;">
-				<text>添加地址</text>
-				<u-divider style="margin-top: 0rpx;"></u-divider>
-				<u--form labelPosition="left" :model="formTwo" labelWidth="150rpx">
-					<u-form-item label="详细地址" borderBottom>
-						<u-input v-model="formTwo.detailedAddress" border="none" placeholder="请输入">
-							<template slot="suffix">
-								<u-button @tap="getMap" type="success" size="mini" icon="map" color="#fd4b09"></u-button>
-							</template>
-						</u-input>
-					</u-form-item>
-				</u--form>
-				<view style="display: flex;justify-content: space-between;padding-top: 20rpx;">
-					<view style="width: 96%;margin: 0 auto;background-color: red;">
-						<u-button text="保存" type="primary" @click="confirmSearch" color="#fd4b09"></u-button>
-					</view>
-				</view>
-			</view>
-		</u-popup> -->
-		
-		
-	</view>
+  <view class="customer-form-container">
+    <scroll-view class="form-scroll" scroll-y>
+      <view class="form-content">
+        <view class="form-card">
+          <u--form labelPosition="left" :model="form" ref="form" labelWidth="150rpx" class="optimized-form">
+            <view style="width: calc(96%);margin: 0 auto;background-color: #fff;border-radius: 20rpx;">
+              <view style="padding: 0 10rpx;">
+                <u-form-item label="客户名称" prop="cname" borderBottom required>
+                  <u-input v-model="form.cname" inputAlign="right" border="none" placeholder="请输入客户名称"/>
+                </u-form-item>
+                <u-form-item :label="form.number?'联系人('+form.number+')':'联系人'" prop="attn" borderBottom required>
+                  <u-input v-model="form.attn" inputAlign="right" border="none" placeholder="请输入联系人"/>
+                </u-form-item>
+                <u-form-item label="电话" prop="tel" borderBottom required>
+                  <u-input v-model="form.tel" inputAlign="right" border="none" placeholder="请输入电话"/>
+                </u-form-item>
+
+                <u-form-item label="省市区" prop="limitAmount" borderBottom @click="mapopen">
+                  <u-input v-model="form.addr" readonly inputAlign="right" border="none" placeholder="请输入省市区"
+                           suffixIcon="map-fill" suffixIconStyle="color: #fa3534" @click="mapopen"/>
+                </u-form-item>
+                <u-form-item label="详细地址" prop="limitAmount" borderBottom>
+                  <u-input v-model="form.details" inputAlign="right" border="none" placeholder="请选择详细地址"/>
+                </u-form-item>
+                <u-form-item label="客户分类" borderBottom @click="customerTypeShow = true" required>
+                  <u-input border="corpsTypeName" inputAlign="right" disabled placeholder="请选择客户分类"
+                           v-model="form.corpsTypeName" disabledColor="#ffffff"/>
+                </u-form-item>
+                <u-form-item label="业务员" borderBottom @click="filterAll(['salesmanName','salesmanId'])" required>
+                  <u-input border="none" inputAlign="right" disabled placeholder="请选择业务员"
+                           v-model="form.salesmanName" disabledColor="#ffffff"/>
+                </u-form-item>
+                <!-- <u-form-item label="账期" prop="cname" borderBottom>
+                  <u-input v-model="form.accountPeriod" inputAlign="right" border="none"
+                  placeholder="请输入帐期" />
+                </u-form-item> -->
+                <u-form-item label="品牌" borderBottom @click="inShowBrand">
+                  <u-input border="none" inputAlign="right" disabled placeholder="请选择品牌" v-model="form.brandName"
+                           disabledColor="#ffffff"/>
+                </u-form-item>
+                <u-form-item label="发货仓库" borderBottom
+                             @click="filterAll(['deliveryWarehouseName','deliveryWarehouseId'])" required>
+                  <u-input border="none" inputAlign="right" disabled placeholder="请选择发货仓库"
+                           v-model="form.deliveryWarehouseName" disabledColor="#ffffff"/>
+                </u-form-item>
+
+                <u-form-item label="商城价格" borderBottom @click="filterAll(['priceSystem','priceSystem'])" required>
+                  <u-input border="none" inputAlign="right" disabled placeholder="请选择商城价格"
+                           v-model="form.priceSystem" disabledColor="#ffffff"/>
+                </u-form-item>
+                <!-- <u-form-item label="是否使用额度:" prop="ifLimitAmount" borderBottom>
+                   <u-switch v-model="form.ifLimitAmount" activeValue="1" inactiveValue="0" ></u-switch>
+                </u-form-item> -->
+                <u-form-item label="信用额度" prop="limitAmount" borderBottom>
+                  <u-input v-model="form.limitAmount" readonly inputAlign="right" border="none"
+                           placeholder="请输入帐期"/>
+                </u-form-item>
+                <u-form-item v-show="form.id" label="二维码" borderBottom>
+                  <view style="display: flex;justify-content: flex-end;width: 100%;">
+                    <view style="display: flex;">
+                      <u-button style="margin-right: 10rpx;" v-show="form.id&&form.filePath" type="success"
+                                color="#fd4b09" size="mini" text="查看" @click="showImg=true"></u-button>
+                      <u-button v-show="form.id&&form.filePath" size="mini" text="重新生成" type="success"
+                                @click="geNerateQRcode()"></u-button>
+                      <u-button v-show="form.id&&!form.filePath" size="mini" text="生成" type="success"
+                                @click="geNerateQRcode()"></u-button>
+                    </view>
+                  </view>
+                </u-form-item>
+                <u-form-item label="备注" prop="cname" borderBottom>
+                  <u--textarea v-model="form.remarks" border="none" placeholder="请输入备注"></u--textarea>
+                </u-form-item>
+              </view>
+            </view>
+            <u-popup :show="showImg" mode="center" @close="closeImg">
+              <view style="width: 400px;height: 400px;">
+                <u-image style="margin-top: 50rpx;" width="100%" height="600rpx" :src="form.filePath"
+                         mode="aspectFit"></u-image>
+              </view>
+            </u-popup>
+            <u-popup :show="showBrand" mode="center" @close="closeBrand" @open="openBrand" :round="10">
+              <view style="margin: 10px;">
+                <uni-data-checkbox multiple v-model="checkboxBrand" :localdata="brandList"
+                                   :map="{text:'cname',value:'id'}" @change='brandChage'></uni-data-checkbox>
+                <u-button type="warning" @click="pickBrand" size='mini'>确 认</u-button>
+              </view>
+            </u-popup>
+          </u--form>
+        </view>
+
+      </view>
+    </scroll-view>
+
+
+    <view style="width: 100%;position: fixed;bottom: 0;background-color: #fff;">
+      <view style="width: 96%;;margin: 20rpx auto; display: flex;">
+        <u-button type="success" color="#fd4b09" shape="circle" text="通过" @click="passThrough('通过')"/>
+        <u-button @click="corpsDescSubmitfun" type="success" color="#fd4b09" shape="circle" text="确认提交"/>
+        <u-button type="success" color="#fd4b09" shape="circle" text="驳回" @click="passThrough('驳回')"/>
+      </view>
+    </view>
+
+    <!-- 客户分类多级选择 -->
+    <u-picker :show="customerTypeShow" ref="customerTypeUPicker" keyName="title" :columns="customerTypeColumns"
+              @confirm="customerTypeConfirm" @change="customerTypeChange" @cancel="customerTypeShow = false">
+    </u-picker>
+
+    <!-- 单列的选择框 -->
+    <u-picker :show="pickerShow" :columns="pickerColumns" :keyName="pickerKeyName" @cancel="pickerShow = false"
+              @confirm="pickerConfirm"></u-picker>
+
+    <!-- 地址信息多级选择 -->
+    <u-picker :show="belongtoareaShow" ref="belongtoareaUPicker" keyName="name" :columns="regionSelectData"
+              @confirm="belongtoareaConfirm" @change="belongtoareaChange" @cancel="belongtoareaShow = false">
+    </u-picker>
+
+    <u-picker :show="showWarehouse" ref="uPicker" :defaultIndex="defaultIndex" :loading="loading" :columns="columns"
+              :keyName="keyName" @confirm="confirmWarehouse" @change="changeHandler"
+              @cancel="showWarehouse = false"></u-picker>
+
+  </view>
 </template>
 
 <script>
-	import {
-		customerTypeAllList,
-		clientGetUserByRole,
-		regionSelectList,
-		corpsDescSubmit,
-		corpsAttnUpdate
-	} from "@/api/views/customer/index.js"
-	import { storageDescListAll } from '@/api/OutboundTask/index.js'
-	import {corpsDescDetail } from '@/api/views/sale/index.js'
-	import { queryBrand } from '@/api/views/stock/index.js'
-	
-	import http from '@/http/api.js'
-	import {corpsDescList} from '@/api/views/sale/salesOrderList.js'
-	import {
-		clientId,
-		clientSecret
-	} from '@/common/setting'
-	export default {
-		data() {
-			return {
-				// 数据绑定的对象
-				form: {
-					corpsAttnList:[{}], //客户联系人
-					corpsAddrList:[{}] //地址信息
-				},
-				// 客户分类的数据
-				customerTypeAllData:[],
-				// 客户分类弹窗的开启
-				customerTypeShow:false,
-				// 多列弹窗的左侧展示的数据
-				customerTypeColumns:[],
-				// 多列弹窗的右侧展示的数据
-				customerTypeColumnData:[],
-				
-				// 业务员请求到的数据
-				clientGetUserByData:[],
-				// 发货仓库请求到的数据
-				storageDescData:[],
-				// 商品价格接口数据
-				queryBrandData:[],
-				
-				// 地理位置接口数据
-				regionSelectData:[],
-				// 省市区地理位置弹窗
-				belongtoareaShow:false,
-				
-				// 地址信息当前选择的下标
-				corpsAddrIndex:0,
-				
-				// 单列弹窗的开启和关闭
-				pickerShow:false,
-				// 单列弹窗的数据
-				pickerColumns:[],
-				// 弹窗展示的key值
-				pickerKeyName:'',
-				
-				// 客户联系人的展开和收起
-				customerContact:true,
-				// 地址信息的展开和收起
-				addressInformation:true,
-				// 图片的展开收起
-				enclosure:false,
-				// 地址弹窗
-				DZpopupShow:false,
-				mask:false,
-				// 图片集合
-				fileList1:[]
-				
-			}
-		},
-		onLoad(data) {
-			// 客户分类接口
-			this.customerTypeAllListfun()
-			// 业务员接口
-			this.clientGetUserByRolefun()
-			// 发货仓库接口
-			this.storageDescListAllfun()
-			// 商城价格接口
-			this.queryBrandfun()
-			// 地理位置接口
-			this.regionSelectListfun()
-			
-			if (data.id) {
-				uni.setNavigationBarTitle({
-					title: '客户详情'
-				})
-				// 客户详情
-				this.corpsDescDetailfun(data.id)
-			}
-		},
-		methods: {
-			newCategory(){
-				uni.$u.route('/pages/views/product/customerType',{
-					corpType:'KH'
-				});
-			},
-			// 客户联系人新增
-			contactsAddfun(){
-				this.form.corpsAttnList.push({})
-			},
-			// 客户联系人删除
-			corpsAttnUpdatefun(index,id){
-				if (id) {
-					uni.showLoading({
-						title: '加载中',
-						mask: true
-					});
-					corpsAttnUpdate({id:id}).then(res=>{
-						this.form.corpsAttnList.splice(index, 1)
-						uni.hideLoading();
-					})
-				}else {
-					this.form.corpsAttnList.splice(index, 1)
-				}
-				uni.showToast({
-					title: '删除成功',
-					icon: 'none',
-					mask: true
-				});
-			},
-			// 联系人删除地址删除
-			contactsDelfun(type,index,id){
-				uni.showModal({
-					title: '提示',
-					content: '是否确认删除',
-					success: (rest)=> {
-						if (rest.confirm == true) {
-							if (type == '联系人') {
-								this.corpsAttnUpdatefun(index,id)
-							}else {
-								this.corpsAddrUpdatefun(index,id)
-							}
-						}
-					},
-				})
-			},
-			// 地址信息新增
-			corpsAddrfun(){
-				this.form.corpsAddrList.push({})
-			},
-			// 地址信息删除
-			corpsAddrUpdatefun(index,id){
-				if (id) {
-					uni.showLoading({
-						title: '加载中',
-						mask: true
-					});
-					corpsAddrUpdate().then(res=>{
-						this.form.corpsAddrList.splice(index, 1)
-						uni.hideLoading();
-					})
-				}else {
-					this.form.corpsAddrList.splice(index, 1)
-				}
-				uni.showToast({
-					title: '删除成功',
-					icon: 'none',
-					mask: true
-				});
-			},
-			// 获取客户分类数据
-			customerTypeAllListfun(){
-				customerTypeAllList({corpType:'KH'}).then(res=>{
-					this.customerTypeColumns = [res.data,res.data[0].children || []]
-					for(let item of res.data) {
-						if (item.children) {
-							this.customerTypeColumnData.push(item.children)
-						}else {
-							this.customerTypeColumnData.push([])
-						}
-					}
-				})
-			},
-			// 获取业务员数据
-			clientGetUserByRolefun(){
-				clientGetUserByRole().then(res=>{
-					this.clientGetUserByData = res
-				})
-			},
-			// 获取发货仓库数据
-			storageDescListAllfun(){
-				storageDescListAll().then(res=>{
-					this.storageDescData = res.data
-				})
-			},
-			// 获取商品价格
-			queryBrandfun(){
-				queryBrand({code: 'mall_price'}).then(res=>{
-					this.queryBrandData = res.data
-				})
-			},
-			// 获取地理位置
-			regionSelectListfun(){
-				regionSelectList().then(res=>{
-					this.regionSelectData = res.data
-				})
-			},			
-			// 客户分类弹窗分数据
-			customerTypeChange(e) {
-			    const {
-			        columnIndex,
-			        value,
-			        values, // values为当前变化列的数组内容
-			        index,
-					// 微信小程序无法将picker实例传出来,只能通过ref操作
-			        picker = this.$refs.customerTypeUPicker
-			    } = e
-			    // 当第一列值发生变化时,变化第二列(后一列)对应的选项
-			    if (columnIndex === 0) {
-			        // picker为选择器this实例,变化第二列对应的选项
-			        picker.setColumnValues(1, this.customerTypeColumnData[index])
-			    }
-			},
-			// 客户分类确认按钮事件
-			customerTypeConfirm(e) {
-				if (e.value[1]) {
-					this.form.corpsTypeId = e.value[1].id
-					this.form.corpsTypeName = e.value[1].title
-				}else {
-					this.form.corpsTypeId = e.value[0].id
-					this.form.corpsTypeName = e.value[0].title
-				}
-			    this.customerTypeShow = false
-			},
-			
-			
-			// 省市区地理位置弹窗chenge
-			belongtoareaChange(e) {
-				const {
-					columnIndex,
-					index,
-					value,
-					// 微信小程序无法将picker实例传出来,只能通过ref操作
-					picker = this.$refs.belongtoareaUPicker
-				} = e
-				if (columnIndex !== 2) {
-					regionSelectList({
-						parentCode: value[columnIndex].code
-					}).then(res => {
-						if (columnIndex == 0) {
-							picker.setColumnValues(columnIndex + 1, res.data[0])
-							picker.setColumnValues(columnIndex + 2, res.data[1])
-						} else {
-							picker.setColumnValues(columnIndex + 1, res.data[0])
-						}
-					})
-				}
-			},
-			// 省市区地理位置弹窗确认事件
-			belongtoareaConfirm(e){
-				console.log(e);
-				this.form.corpsAddrList[this.corpsAddrIndex].belongtoarea = `${e.value[0].name},${e.value[1].name},${e.value[2].name}`
-				this.belongtoareaShow = false
-			},
-			belongtoareafun(index){
-				this.corpsAddrIndex = index
-				this.belongtoareaShow = true
-			},
-			
-			// 详情
-			corpsDescDetailfun(id) {
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				});
-				corpsDescDetail({
-					id: id
-				}).then(res => {
-					this.form = res.data
-					this.fileList1 = res.data.corpsFilesList
-					
-					for(let item of this.clientGetUserByData) {
-						if (item.id == this.form.salesmanId) {
-							this.form.salesmanName = item.name
-						}
-					}
-					for(let item of this.storageDescData) {
-						if (item.id == this.form.deliveryWarehouseId) {
-							this.form.deliveryWarehouseName = item.cname
-						}
-					}
-					
-					uni.hideLoading();
-				})
-			},
-			//提交保存
-			corpsDescSubmitfun() {
-				if (!this.form.cname) {
-					return uni.showToast({
-						title: '客户名称不能为空',
-						icon: 'none',
-						mask: true
-					});
-				}
-				if (!this.form.corpsTypeName) {
-					return uni.showToast({
-						title: '客户分类不能为空',
-						icon: 'none',
-						mask: true
-					});
-				}
-				if (!this.form.salesmanId) {
-					return uni.showToast({
-						title: '业务员不能为空',
-						icon: 'none',
-						mask: true
-					});
-				}
-				if (!this.form.deliveryWarehouseId) {
-					return uni.showToast({
-						title: '发货仓库不能为空',
-						icon: 'none',
-						mask: true
-					});
-				}
-				if (!this.form.priceSystem) {
-					return uni.showToast({
-						title: '商品价格不能为空',
-						icon: 'none',
-						mask: true
-					});
-				}
-				for(let index in this.form.corpsAttnList) {
-					if (!this.form.corpsAttnList[index].cname) {
-						return uni.showToast({
-							title: `客户联系人序号${Number(index) + 1}联系人不能为空`,
-							icon: 'none',
-							mask: true
-						});
-					}
-					if (!this.form.corpsAttnList[index].tel) {
-						return uni.showToast({
-							title: `客户联系人序号${Number(index) + 1}电话不能为空`,
-							icon: 'none',
-							mask: true
-						});
-					}
-				}
-				for(let index in this.form.corpsAddrList) {
-					if (!this.form.corpsAddrList[index].contacts) {
-						return uni.showToast({
-							title: `地址信息序号${Number(index) + 1}联系人不能为空`,
-							icon: 'none',
-							mask: true
-						});
-					}
-					if (!this.form.corpsAddrList[index].tel) {
-						return uni.showToast({
-							title: `地址信息序号${Number(index) + 1}电话不能为空`,
-							icon: 'none',
-							mask: true
-						});
-					}
-					if (!this.form.corpsAddrList[index].belongtoarea) {
-						return uni.showToast({
-							title: `地址信息序号${Number(index) + 1}地址不能为空`,
-							icon: 'none',
-							mask: true
-						});
-					}
-					if (!this.form.corpsAddrList[index].detailedAddress) {
-						return uni.showToast({
-							title: `地址信息序号${Number(index) + 1}详细地址不能为空`,
-							icon: 'none',
-							mask: true
-						});
-					}
-				}
-				uni.showModal({
-					title: '提示',
-					content: '是否确认保存',
-					success: (rest)=> {
-						if (rest.confirm == true) {
-							uni.showLoading({
-								title: '加载中',
-								mask: true
-							});
-							if(!this.form.id) {
-							    this.form.checkStatus = '通过'
-							}
-							corpsDescSubmit({
-								...this.form,
-								billType: 1,
-								code: this.form.cname,
-								corpType: "KH",
-								corpsFilesList:this.fileList1
-							}).then(res => {
-								console.log(res,529);
-								uni.showToast({
-									icon: "none",
-									title: '保存成功',
-									mask: true
-								});
-								this.corpsDescDetailfun(res.data.id)
-								uni.hideLoading();
-							})
-						}
-					}
-				})
-			},
-			//集合筛选条件 
-			// 第一项是 绑定id ,第二项是 绑定的name
-			filterAll(screen) {
-				this.screen = screen
-				switch (screen[1]) {
-					case "salesmanId":
-						this.pickerColumns = [this.clientGetUserByData]
-						this.pickerShow = true,
-						this.pickerKeyName = 'name'
-						break;
-					case "deliveryWarehouseId":
-						this.pickerColumns = [this.storageDescData]
-						this.pickerShow = true,
-						this.pickerKeyName = 'cname'
-						break;
-					case "priceSystem":
-						this.pickerColumns = [this.queryBrandData]
-						this.pickerShow = true,
-						this.pickerKeyName = 'dictValue'
-						break;
-				}
-			},
-			// 弹窗复制
-			pickerConfirm(e) {
-				switch (this.screen[1]) {
-					case "salesmanId":
-						this.form.salesmanId = e.value[0].id
-						this.form.salesmanName = e.value[0].name
-						break;
-					case "deliveryWarehouseId":
-						this.form.deliveryWarehouseId = e.value[0].id
-						this.form.deliveryWarehouseName = e.value[0].cname
-						break;
-					case "priceSystem":
-						this.form.priceSystem = e.value[0].dictValue
-						break;
-				}
-				this.pickerShow = false
-			},
-			
-			
-			
-			
-			// 删除图片
-			deletePic(event) {
-				let this_ = this
-				uni.showModal({
-					title: '提示',
-					content: '是否确认删除',
-					success: function(rest) {
-						if (rest.confirm == true) {
-							if (this_[`fileList${event.name}`][event.index].id) {
-								removeFile({
-									ids: this_[`fileList${event.name}`][event.index].id
-								}).then(res => {
-									this_[`fileList${event.name}`].splice(event.index, 1)
-								})
-							} else {
-								this_[`fileList${event.name}`].splice(event.index, 1)
-							}
-						}
-					}
-				})
-			},
-			// 新增图片
-			async afterRead(event) {
-				// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
-				let lists = [].concat(event.file)
-				let fileListLen = this[`fileList${event.name}`].length
-				lists.map((item) => {
-					this[`fileList${event.name}`].push({
-						...item,
-						status: 'uploading',
-						message: '上传中'
-					})
-				})
-				for (let i = 0; i < lists.length; i++) {
-					const result = await this.uploadFilePromise(lists[i].url)
-					let item = this[`fileList${event.name}`][fileListLen]
-					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
-						status: 'success',
-						sort: this.fileList1.length,
-						fileName: JSON.parse(result).data.originalName,
-						url: JSON.parse(result).data.link
-					}))
-					fileListLen++
-				}
-			},
-			uploadFilePromise(url) {
-				return new Promise((resolve, reject) => {
-					let a = uni.uploadFile({
-						url: http.config.baseURL +
-							'/blade-resource/oss/endpoint/put-file', // 仅为示例,非真实的接口地址
-						filePath: url,
-						name: 'file',
-						formData: {
-							user: 'test'
-						},
-						header: {
-							// 客户端认证参数
-							'Authorization': 'Basic ' + Base64.encode(clientId + ':' + clientSecret),
-							'Blade-Auth': 'bearer ' + uni.getStorageSync('accessToken')
-						},
-						success: (res) => {
-							setTimeout(() => {
-								resolve(res.data)
-							}, 1000)
-						}
-					});
-				})
-			},
-		}
-	}
+import {
+  customerTypeAllList,
+  clientGetUserByRole,
+  regionSelectList,
+  corpsAttnUpdate,
+  corpsfilesRemove,
+  corpsDescAppSubmitV1,
+  getQRcode,
+  getBrand,
+  corpsDescSubmit
+} from "@/api/views/customer/index.js"
+import {
+  storageDescListAll
+} from '@/api/OutboundTask/index.js'
+import {
+  corpsDescAppDetailsV1
+} from '@/api/views/sale/index.js'
+import {
+  queryBrand
+} from '@/api/views/stock/index.js'
+
+import http from '@/http/api.js'
+import {
+  clientId,
+  clientSecret
+} from '@/common/setting'
+
+export default {
+  data() {
+    return {
+      showImg: false,
+      // 数据绑定的对象
+      form: {
+        corpsAttnList: [{}], //客户联系人
+        corpsAddrList: [{}], //地址信息
+        details: null,
+        addr: null,
+        dimension: null,
+        longitude: null
+      },
+      // 客户分类的数据
+      customerTypeAllData: [],
+      // 客户分类弹窗的开启
+      customerTypeShow: false,
+      // 多列弹窗的左侧展示的数据
+      customerTypeColumns: [],
+      // 多列弹窗的右侧展示的数据
+      customerTypeColumnData: [],
+
+      // 业务员请求到的数据
+      clientGetUserByData: [],
+      // 发货仓库请求到的数据
+      storageDescData: [],
+      // 商品价格接口数据
+      queryBrandData: [],
+
+      // 地理位置接口数据
+      regionSelectData: [],
+      // 省市区地理位置弹窗
+      belongtoareaShow: false,
+
+      // 地址信息当前选择的下标
+      corpsAddrIndex: 0,
+
+      // 单列弹窗的开启和关闭
+      pickerShow: false,
+      // 单列弹窗的数据
+      pickerColumns: [],
+      // 弹窗展示的key值
+      pickerKeyName: '',
+
+      // 客户联系人的展开和收起
+      customerContact: true,
+      // 地址信息的展开和收起
+      addressInformation: true,
+      // 图片的展开收起
+      enclosure: false,
+      // 地址弹窗
+      DZpopupShow: false,
+      mask: false,
+      // 图片集合
+      fileList1: [],
+      columns: [], // 省市区数据
+      showWarehouse: false, // 省市区弹窗
+      keyName: 'name',
+      loading: false,
+      defaultIndex: [],
+      mapData: {},
+      errData: {},
+      showBrand: false,
+      brandList: [],
+      checkboxBrand: [],
+    }
+  },
+  onLoad(data) {
+    // 客户分类接口
+    this.customerTypeAllListfun()
+    // 业务员接口
+    this.clientGetUserByRolefun()
+    // 发货仓库接口
+    this.storageDescListAllfun()
+    // 商城价格接口
+    this.queryBrandfun()
+    // 地理位置接口
+    this.regionSelectListfun()
+    this.getBrandfun()
+    if (data.id) {
+      uni.setNavigationBarTitle({
+        title: '客户详情'
+      })
+      // 客户详情
+      this.corpsDescDetailfun(data.id)
+    }
+    // this.getLocation()
+
+  },
+  onShow() {
+    uni.$once('commitCheck', (data) => {
+      this.form.details = data.name
+      this.form.addr = data.province + "," + data.city + "," + data.district
+      this.form.dimension = data.location ? data.location.split(',')[0] : null
+      this.form.longitude = data.location ? data.location.split(',')[1] : null
+    });
+  },
+  beforeDestroy() {
+    console.log('移除')
+    uni.$off();
+  },
+  methods: {
+    passThrough(typeName) {
+      var msg = this.verifyData()
+      if (msg) {
+        uni.showToast({
+          title: msg,
+          icon: 'none',
+          mask: true
+        });
+        return false
+      }
+      uni.showModal({
+        title: '提示',
+        content: `是否${typeName}保存`,
+        success: (rest) => {
+          if (rest.confirm == true) {
+            corpsDescSubmit({
+              ...this.form,
+              billType: 1,
+              code: this.form.cname,
+              corpType: "KH",
+              checkStatus: typeName
+            }).then(res => {
+              uni.showToast({
+                icon: "none",
+                title: `${typeName}成功`,
+                mask: true
+              });
+              this.dataList = []
+              this.form.current = 1
+              this.queryListfun()
+            })
+          }
+        }
+      })
+    },
+    getBrandfun() {
+      getBrand().then(res => {
+        this.brandList = res.data
+      })
+    },
+    inShowBrand() {
+      this.showBrand = true
+    },
+    pickBrand() {
+      this.form.brandId = this.checkboxBrand.join(',')
+      this.closeBrand()
+    },
+    brandChage(row) {
+      this.form.brandName = null
+      let brandName = []
+      row.detail.data.forEach(e => {
+        brandName.push(e.cname)
+        // this.form.brandName+=e.cname
+      })
+      this.form.brandName = brandName.join(',')
+    },
+    openBrand() {
+      if (this.form.brandId) {
+        this.checkboxBrand = this.form.brandId.split(',')
+      } else {
+        this.checkboxBrand = []
+      }
+    },
+    closeBrand() {
+      this.showBrand = false
+    },
+    mapopen() {
+      uni.$u.route({
+        url: '/pages/views/customer/map/index',
+        params: {
+          longitude: this.form.longitude,
+          latitude: this.form.dimension
+        }
+      });
+    },
+    getLocation() {
+      console.log('正在获取定位')
+      uni.getLocation({
+        // 默认为 wgs84 返回 gps 坐标,
+        // gcj02 返回国测局坐标,可用于 uni.openLocation 的坐标
+        type: 'gcj02',
+        geocode: true,
+        isHighAccuracy: true,
+        success: (data) => {
+          console.log(data)
+          this.mapData = data
+        },
+        fail: (err) => {
+          console.log(err)
+          this.errData = err
+          uni.showToast({
+            title: err,
+            icon: 'none',
+            mask: true
+          });
+          // this.$api.msg('获取定位失败');
+        }
+      })
+    },
+
+    closeImg() {
+      this.showImg = false
+    },
+    geNerateQRcode() {
+      let obj = {}
+      obj = {
+        corpId: this.form.id,
+        corpName: this.form.cname,
+        tenantId: this.form.tenantId
+      }
+      uni.showLoading({
+        title: '加载中',
+        mask: true
+      });
+      getQRcode(obj).then(res => {
+        uni.hideLoading();
+        this.corpsDescDetailfun(this.form.id, 'open')
+      })
+    },
+    // 省下拉
+    selectAddress() {
+      if (this.columns.length == 0) {
+        regionSelectList().then(res => {
+          this.columns = res.data
+          this.showWarehouse = true
+        })
+      } else {
+        this.showWarehouse = true
+      }
+    },
+    confirmWarehouse(e) {
+      this.form.addr = `${e.value[0].name},${e.value[1].name},${e.value[2].name}`
+      this.showWarehouse = false
+    },
+    changeHandler(e) {
+      console.log(e, 338);
+      const {
+        columnIndex,
+        index,
+        value,
+        // 微信小程序无法将picker实例传出来,只能通过ref操作
+        picker = this.$refs.uPicker
+      } = e
+      if (columnIndex !== 2) {
+        this.loading = true
+        regionSelectList({
+          parentCode: value[columnIndex].code
+        }).then(res => {
+          if (columnIndex == 0) {
+            picker.setColumnValues(columnIndex + 1, res.data[0])
+            picker.setColumnValues(columnIndex + 2, res.data[1])
+          } else {
+            picker.setColumnValues(columnIndex + 1, res.data[0])
+          }
+          this.loading = false
+        })
+      }
+    },
+
+    newCategory() {
+      uni.$u.route('/pages/views/product/customerType', {
+        corpType: 'KH'
+      });
+    },
+    // 客户联系人新增
+    contactsAddfun() {
+      this.form.corpsAttnList.push({})
+    },
+    // 客户联系人删除
+    corpsAttnUpdatefun(index, id) {
+      if (id) {
+        uni.showLoading({
+          title: '加载中',
+          mask: true
+        });
+        corpsAttnUpdate({
+          id: id
+        }).then(res => {
+          this.form.corpsAttnList.splice(index, 1)
+          uni.hideLoading();
+        })
+      } else {
+        this.form.corpsAttnList.splice(index, 1)
+      }
+      uni.showToast({
+        title: '删除成功',
+        icon: 'none',
+        mask: true
+      });
+    },
+    // 联系人删除地址删除
+    contactsDelfun(type, index, id) {
+      uni.showModal({
+        title: '提示',
+        content: '是否确认删除',
+        success: (rest) => {
+          if (rest.confirm == true) {
+            if (type == '联系人') {
+              this.corpsAttnUpdatefun(index, id)
+            } else {
+              this.corpsAddrUpdatefun(index, id)
+            }
+          }
+        },
+      })
+    },
+    // 地址信息新增
+    corpsAddrfun() {
+      this.form.corpsAddrList.push({})
+    },
+    // 地址信息删除
+    corpsAddrUpdatefun(index, id) {
+      if (id) {
+        uni.showLoading({
+          title: '加载中',
+          mask: true
+        });
+        corpsAddrUpdate().then(res => {
+          this.form.corpsAddrList.splice(index, 1)
+          uni.hideLoading();
+        })
+      } else {
+        this.form.corpsAddrList.splice(index, 1)
+      }
+      uni.showToast({
+        title: '删除成功',
+        icon: 'none',
+        mask: true
+      });
+    },
+    // 获取客户分类数据
+    customerTypeAllListfun() {
+      customerTypeAllList({
+        corpType: 'KH'
+      }).then(res => {
+        this.customerTypeColumns = [res.data, res.data[0].children || []]
+        for (let item of res.data) {
+          if (item.children) {
+            this.customerTypeColumnData.push(item.children)
+          } else {
+            this.customerTypeColumnData.push([])
+          }
+        }
+      })
+    },
+    // 获取业务员数据
+    clientGetUserByRolefun() {
+      clientGetUserByRole().then(res => {
+        this.clientGetUserByData = res
+      })
+    },
+    // 获取发货仓库数据
+    storageDescListAllfun() {
+      storageDescListAll().then(res => {
+        this.storageDescData = res.data
+      })
+    },
+    // 获取商品价格
+    queryBrandfun() {
+      queryBrand({
+        code: 'mall_price'
+      }).then(res => {
+        this.queryBrandData = res.data
+      })
+    },
+    // 获取地理位置
+    regionSelectListfun() {
+      regionSelectList().then(res => {
+        this.regionSelectData = res.data
+      })
+    },
+    // 客户分类弹窗分数据
+    customerTypeChange(e) {
+      const {
+        columnIndex,
+        value,
+        values, // values为当前变化列的数组内容
+        index,
+        // 微信小程序无法将picker实例传出来,只能通过ref操作
+        picker = this.$refs.customerTypeUPicker
+      } = e
+      // 当第一列值发生变化时,变化第二列(后一列)对应的选项
+      if (columnIndex === 0) {
+        // picker为选择器this实例,变化第二列对应的选项
+        picker.setColumnValues(1, this.customerTypeColumnData[index])
+      }
+    },
+    // 客户分类确认按钮事件
+    customerTypeConfirm(e) {
+      if (e.value[1]) {
+        this.form.corpsTypeId = e.value[1].id
+        this.form.corpsTypeName = e.value[1].title
+      } else {
+        this.form.corpsTypeId = e.value[0].id
+        this.form.corpsTypeName = e.value[0].title
+      }
+      this.customerTypeShow = false
+    },
+
+
+    // 省市区地理位置弹窗chenge
+    belongtoareaChange(e) {
+      const {
+        columnIndex,
+        index,
+        value,
+        // 微信小程序无法将picker实例传出来,只能通过ref操作
+        picker = this.$refs.belongtoareaUPicker
+      } = e
+      if (columnIndex !== 2) {
+        regionSelectList({
+          parentCode: value[columnIndex].code
+        }).then(res => {
+          if (columnIndex == 0) {
+            picker.setColumnValues(columnIndex + 1, res.data[0])
+            picker.setColumnValues(columnIndex + 2, res.data[1])
+          } else {
+            picker.setColumnValues(columnIndex + 1, res.data[0])
+          }
+        })
+      }
+    },
+    // 省市区地理位置弹窗确认事件
+    belongtoareaConfirm(e) {
+      this.form.corpsAddrList[this.corpsAddrIndex].belongtoarea =
+          `${e.value[0].name},${e.value[1].name},${e.value[2].name}`
+      this.belongtoareaShow = false
+    },
+    belongtoareafun(index) {
+      this.corpsAddrIndex = index
+      this.belongtoareaShow = true
+    },
+
+    // 详情
+    corpsDescDetailfun(id, type) {
+      uni.showLoading({
+        title: '加载中',
+        mask: true
+      });
+      corpsDescAppDetailsV1({
+        id: id
+      }).then(res => {
+        this.form = res.data
+        this.fileList1 = res.data.corpsFilesList
+        for (let item of this.clientGetUserByData) {
+          if (item.id == this.form.salesmanId) {
+            this.form.salesmanName = item.name
+          }
+        }
+        for (let item of this.storageDescData) {
+          if (item.id == this.form.deliveryWarehouseId) {
+            this.form.deliveryWarehouseName = item.cname
+          }
+        }
+        if (type == 'open') {
+          this.showImg = true
+        }
+        uni.hideLoading();
+      })
+    },
+    //提交保存
+    corpsDescSubmitfun() {
+      var msg = this.verifyData()
+      if (msg) {
+        uni.showToast({
+          title: msg,
+          icon: 'none',
+          mask: true
+        });
+        return false
+      }
+
+      uni.showModal({
+        title: '提示',
+        content: '是否确认保存',
+        success: (rest) => {
+          if (rest.confirm == true) {
+            uni.showLoading({
+              title: '加载中',
+              mask: true
+            });
+            if (!this.form.id) {
+              this.form.checkStatus = '通过'
+            }
+            corpsDescAppSubmitV1({
+              ...this.form,
+              billType: 1,
+              code: this.form.cname,
+              corpType: "KH",
+              corpsFilesList: this.fileList1
+            }).then(res => {
+              uni.hideLoading();
+              this.corpsDescDetailfun(res.data.id)
+              setTimeout(() => {
+                uni.showToast({
+                  icon: "none",
+                  title: '保存成功请返回',
+                  mask: true
+                })
+              }, 200)
+
+            })
+          }
+        }
+      })
+    },
+    verifyData(){
+      if (!this.form.cname) {
+        return '客户名称不能为空'
+      }
+      if (!this.form.attn) {
+        return '联系人不能为空'
+      }
+      if (!this.form.corpsTypeName) {
+        return '客户分类不能为空'
+      }
+      if (!this.form.salesmanId) {
+        return '业务员不能为空'
+      }
+      if (!this.form.deliveryWarehouseId) {
+        return '发货仓库不能为空'
+      }
+      if (!this.form.priceSystem) {
+        return '商品价格不能为空'
+      }
+      if (!this.form.addr) {
+        return '省市区不能为空'
+      }
+      if (!this.form.details) {
+        return '详情地址不能为空'
+      }
+      return ''
+    },
+    //集合筛选条件
+    // 第一项是 绑定id ,第二项是 绑定的name
+    filterAll(screen) {
+      this.screen = screen
+      switch (screen[1]) {
+        case "salesmanId":
+          this.pickerColumns = [this.clientGetUserByData]
+          this.pickerShow = true,
+              this.pickerKeyName = 'name'
+          break;
+        case "deliveryWarehouseId":
+          this.pickerColumns = [this.storageDescData]
+          this.pickerShow = true,
+              this.pickerKeyName = 'cname'
+          break;
+        case "priceSystem":
+          this.pickerColumns = [this.queryBrandData]
+          this.pickerShow = true,
+              this.pickerKeyName = 'dictValue'
+          break;
+      }
+    },
+    // 弹窗复制
+    pickerConfirm(e) {
+      switch (this.screen[1]) {
+        case "salesmanId":
+          this.form.salesmanId = e.value[0].id
+          this.form.salesmanName = e.value[0].name
+          break;
+        case "deliveryWarehouseId":
+          this.form.deliveryWarehouseId = e.value[0].id
+          this.form.deliveryWarehouseName = e.value[0].cname
+          break;
+        case "priceSystem":
+          this.form.priceSystem = e.value[0].dictValue
+          break;
+      }
+      this.pickerShow = false
+    },
+
+
+    // 删除图片
+    deletePic(event) {
+      let this_ = this
+      uni.showModal({
+        title: '提示',
+        content: '是否确认删除',
+        success: function (rest) {
+          if (rest.confirm == true) {
+            if (this_[`fileList${event.name}`][event.index].id) {
+              corpsfilesRemove({
+                ids: this_[`fileList${event.name}`][event.index].id
+              }).then(res => {
+                this_[`fileList${event.name}`].splice(event.index, 1)
+              })
+            } else {
+              this_[`fileList${event.name}`].splice(event.index, 1)
+            }
+          }
+        }
+      })
+    },
+    // 新增图片
+    async afterRead(event) {
+      // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
+      let lists = [].concat(event.file)
+      let fileListLen = this[`fileList${event.name}`].length
+      lists.map((item) => {
+        this[`fileList${event.name}`].push({
+          ...item,
+        })
+      })
+      for (let i = 0; i < lists.length; i++) {
+        const result = await this.uploadFilePromise(lists[i].url)
+        let item = this[`fileList${event.name}`][fileListLen]
+        this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+          sort: this.fileList1.length,
+          fileName: JSON.parse(result).data.originalName,
+          url: JSON.parse(result).data.link
+        }))
+        fileListLen++
+      }
+    },
+    uploadFilePromise(url) {
+      return new Promise((resolve, reject) => {
+        let a = uni.uploadFile({
+          url: http.config.baseURL +
+              '/blade-resource/oss/endpoint/put-file', // 仅为示例,非真实的接口地址
+          filePath: url,
+          name: 'file',
+          formData: {
+            user: 'test'
+          },
+          header: {
+            // 客户端认证参数
+            'Authorization': 'Basic ' + Base64.encode(clientId + ':' +
+                clientSecret),
+            'Blade-Auth': 'bearer ' + uni.getStorageSync('accessToken')
+          },
+          success: (res) => {
+            setTimeout(() => {
+              resolve(res.data)
+            }, 1000)
+          }
+        });
+      })
+    },
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-	.tl-show {
-		overflow: hidden;
-		position: fixed;
-		height: 100%;
-		width: 100%;
-	}
-
-	::v-deep .u-cell__body {
-		padding: 0rpx 25rpx;
-		margin: 10rpx 0;
-	}
-
-	::v-deep .u-cell__title-text {
-		color: #244e96;
-	}
-
-	::v-deep .u-form-item__body__left__content__label {
-		color: #fd4b09;
-	}
-
-	.selectedAddress {
-		border-bottom: 1rpx solid #fd4b09;
-		color: #fd4b09;
-	}
+.customer-form-container {
+  min-height: 100vh;
+  background-color: #f5f7fa;
+  display: flex;
+  flex-direction: column;
+}
+
+.form-scroll {
+  flex: 1;
+  padding: 20rpx;
+}
+
+.form-content {
+  max-width: 100%;
+}
+
+.form-card {
+  background: #ffffff;
+  border-radius: 16rpx;
+  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
+  overflow: hidden;
+  margin-bottom: 20rpx;
+}
+
+.optimized-form {
+  padding: 0 30rpx 30rpx;
+}
+
+.tl-show {
+  overflow: hidden;
+  position: fixed;
+  height: 100%;
+  width: 100%;
+}
+
+::v-deep .u-cell__body {
+  padding: 0rpx 25rpx;
+  margin: 10rpx 0;
+}
+
+::v-deep .u-cell__title-text {
+  color: #244e96;
+}
+
+::v-deep .u-form-item__body__left__content__label {
+  color: #fd4b09;
+}
+
+.selectedAddress {
+  border-bottom: 1rpx solid #fd4b09;
+  color: #fd4b09;
+}
 </style>

+ 10 - 10
pages/views/customerSubmit/index.vue

@@ -32,11 +32,11 @@
 			</view>
 		</view>
 		<view class="content" style="margin-top: 100px;">
-			<view class="contentBox" v-for="(item,index) in dataList" :key="index">
+			<view class="contentBox" v-for="(item,index) in dataList" :key="index" @click="choice(item,index)">
 				<view style="width: 100%;margin: 0 auto;">
 					<view class="textBox" @click="choice(item,index)">
 						<view style="font-size: 36rpx;">{{item.cname}}</view>
-						<view>编辑信息</view>
+<!--						<view>编辑信息</view>-->
 					</view>
 					<view class="textBox">
 						<view>
@@ -48,12 +48,12 @@
 						<view>商城价格:{{item.priceSystem}}</view>
 					</view>
 				</view>
-				
-				<view class="flex-box">
+
+<!--				<view class="flex-box">
 					<view class="buttom-box" @click.stop="passThrough(item,'通过')">通过</view>
 					<view class="buttom-box" @click.stop="passThrough(item,'驳回')">驳回</view>
-				</view>
-				
+				</view>-->
+
 			</view>
 		</view>
 		<u-empty v-if="total == 0" style="position: absolute;top: 45%;left: 50%;transform:translate(-50%,-50%)"
@@ -146,7 +146,7 @@
 								this.queryListfun()
 							})
 						}
-						
+
 					}
 				})
 			},
@@ -192,12 +192,12 @@
 				})
 			},
 			choice(item1, index1) {
-				uni.$u.route('/pages/views/customer/customerDetails', {
+				uni.$u.route('/pages/views/customerSubmit/customerDetails', {
 					id: item1.id
 				});
 			},
 			jumpCommodities() {
-				uni.$u.route('/pages/views/customer/customerDetails');
+				uni.$u.route('/pages/views/customerSubmit/customerDetails');
 			},
 			//查询
 			queryListfun() {
@@ -221,7 +221,7 @@
 			},
 			tabsClick(item) {
 				this.current = item.index
-				this.form.current = 1 
+				this.form.current = 1
 				this.form.corpsTypeId = item.id
 				// this.form = {
 				// 	current: 1,