addSales.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. <template>
  2. <view class="addCustomer-content">
  3. <view class="flex justify_between align_center content-customerName" v-if="itemId">
  4. <text>{{customerData?customerData.customerName:''}}</text>
  5. <u-button size="mini" :hair-line="false" plain type="primary" hover-class="none" @click="goBack" :custom-style="customBtnStyle">重新选择</u-button>
  6. </view>
  7. <view class="content-form">
  8. <u-form :model="form" ref="uForm" label-width="180" :error-type="['toast']">
  9. <u-form-item label="客户地址" required >
  10. <u-input v-model="areaInfo.label" :disabled="true" input-align="right" placeholder="请选择客户地址" @click="openAddress"/>
  11. <u-icon name="arrow-right" color="#C0C4CC" slot="right" @click="openAddress"></u-icon>
  12. </u-form-item>
  13. <u-form-item label="详细地址">
  14. <textarea :auto-height="true" input-align="right" placeholder="请输入详细地址(最多60个字符)" :maxlength="60" v-model="form.shippingAddress" class="receiveAddress" placeholder-style="color:#C0C4CC;font-size:28upx;"/>
  15. </u-form-item>
  16. <u-form-item label="联系人">
  17. <u-input v-model="form.consigneeName" input-align="right" placeholder="请输入联系人(最多30个字符)" :maxlength="11"/>
  18. </u-form-item>
  19. <u-form-item label="联系电话">
  20. <u-input v-model.trim="form.consigneeTel" placeholder="请输入联系电话(最多15个字符)" input-align="right" :maxlength="15"/>
  21. </u-form-item>
  22. <u-form-item label="联系手机"><u-input v-model.trim="form.contactMobile" placeholder="请输入联系手机(最多11位字符)" input-align="right" :maxlength="11"/>
  23. </u-form-item>
  24. <u-form-item label="价格类型" required >
  25. <v-select ref="priceType" :disabled="true" placeholder="请选择价格类型" @itemChange="chooseType" code="PRICE_TYPE" style="width: 100%"></v-select>
  26. <u-icon name="arrow-right" color="#C0C4CC" slot="right"></u-icon>
  27. </u-form-item>
  28. <u-form-item label="收款方式" required prop="settleStyleSn">
  29. <u-input v-model="settleStyleName" input-align="right" :disabled="true" placeholder="请选择收款方式" @click="showSettle=true"/>
  30. <u-icon name="arrow-right" color="#C0C4CC" slot="right"></u-icon>
  31. </u-form-item>
  32. <u-form-item label="铺货出库" required v-if="itemId">
  33. <view style="width: 100%;display:flex;justify-content: flex-end;">
  34. <u-radio-group v-model="form.distributionFlag" @change="radioChange" >
  35. <u-radio
  36. v-for="(item, index) in ckList" :key="index"
  37. :name="item.code"
  38. >
  39. {{item.dispName}}
  40. </u-radio>
  41. </u-radio-group>
  42. </view>
  43. </u-form-item>
  44. <u-form-item label="配送方式" >
  45. <v-select ref="dispatchType" :disabled="true" placeholder="请选择配送方式" @itemChange="choosedispatchType" code="DISPATCH_TYPE" style="width: 100%"></v-select>
  46. <u-icon name="arrow-right" color="#C0C4CC" slot="right" @click="chooseType(0)"></u-icon>
  47. </u-form-item>
  48. <u-form-item label="业务员">
  49. <u-input v-model="userName" input-align="right" :disabled="true" placeholder="请选择业务员" @click="showUser=true"/>
  50. <u-icon name="arrow-right" color="#C0C4CC" slot="right" @click="showUser=true"></u-icon>
  51. </u-form-item>
  52. <u-form-item label="备注">
  53. <textarea :auto-height="true" input-align="right" placeholder="请输入备注(最多100个字符)" :maxlength="100" v-model="form.remarks" class="receiveAddress" placeholder-style="color:#C0C4CC;font-size:28upx;"/>
  54. </u-form-item>
  55. </u-form>
  56. </view>
  57. <view class="form-footer-btn">
  58. <u-button v-if="!itemId" class="handle-btn" size="medium" shape="circle" hover-class="none" @click="customerSubmit" :custom-style="customBtnStyle">保存</u-button>
  59. <u-button v-else class="handle-btn" size="medium" shape="circle" hover-class="none" @click="salesSbmit" :custom-style="customBtnStyle">新增销售单</u-button>
  60. </view>
  61. <!-- 省市区 -->
  62. <Address ref="applyAddress" @onConfirm="areaConfirm"></Address>
  63. <!-- 选择收款方式 -->
  64. <u-picker v-model="showSettle" title="收款方式" @confirm="settleStyleChange" :range="settleTypeList" range-key="name" mode="selector" :default-selector="JSON.parse(JSON.stringify(defaultSettleIndex))"></u-picker>
  65. <!-- 客户类型 -->
  66. <u-picker v-model="showCust" title="客户类型" @confirm="custTypeChange" :range="custTypeList" range-key="name" mode="selector" :default-selector="JSON.parse(JSON.stringify(defaultCustIndex))"></u-picker>
  67. <!-- 业务员 -->
  68. <u-picker v-model="showUser" title="业务员" @confirm="userChange" :range="userList" range-key="name" mode="selector"></u-picker>
  69. </view>
  70. </template>
  71. <script>
  72. import {customerDetail,settleStyleQueryAll,custType,custSave,employeeAllList,salesSave} from '@/api/sales.js'
  73. import { getLookUpDatas } from '@/api/data'
  74. import { getArea } from '@/api/data'
  75. import Address from '@/components/address.vue'
  76. import vSelect from '@/components/select/v-select.vue'
  77. export default{
  78. components:{Address,vSelect},
  79. data(){
  80. return{
  81. title:'',
  82. customerData:null, // 客户信息
  83. priceTypeName:'', //客户类型名称
  84. customBtnStyle: { // 自定义按钮样式
  85. margin:0
  86. },
  87. showDispatch:false,// 配送方式下拉弹窗初始值
  88. dispatchTypeList:[], // 配送方式列表
  89. dispatchTypeName:'', // 配送方式名称
  90. showSettle:false,//结算方式初始值
  91. settleTypeList:[],//收款方式列表
  92. settleStyleName:'',//收款方式名称
  93. custTypeList:[] ,// 客户类型数据
  94. showCust:false, //客户类型下拉弹窗初始值
  95. custTypeName:'', // 客户类型名称
  96. areaInfo: {}, // 省市区
  97. areaIdArr: [], // 省市区id数组
  98. itemId:'',
  99. ckList:[{dispName: "是",code:1,lookupCode: "FLAG"},{dispName: "否",code:0,lookupCode: "FLAG"}],
  100. showUser:false,//业务员下拉框初始默认值
  101. userList:[], //业务员数据
  102. userName:'', //业务员姓名
  103. salesManSn:'', //业务员sn
  104. defaultSettleIndex:[0] ,//选中收款方式的下标
  105. defaultIndex:[0] ,//选中收款方式的下标
  106. defaultCustIndex:[0],//选中客户类型的下标
  107. defaultUserIndex:[0],//选中业务员的下标
  108. //销售单form
  109. form:{
  110. buyerName: '', // 客户名称
  111. buyerSn: undefined, // 客户sn
  112. consigneeTel: '', // 联系电话
  113. contactMobile: '',
  114. consigneeName: '', // 联系人
  115. shippingAddressProvinceSn: undefined, // 省
  116. shippingAddressProvinceName: '',
  117. shippingAddressCitySn: undefined, // 市
  118. shippingAddressCityName: '',
  119. shippingAddressCountySn: undefined, // 区
  120. shippingAddressCountyName: '',
  121. shippingAddress: '', // 详细地址
  122. fax: '', // 客户传真
  123. dispatchType: undefined, // 配送方式
  124. satelliteFlag: 0, // 是否卫星仓客户
  125. priceType: undefined, // 价格类型
  126. settleStyleSn: undefined, // 收款方式
  127. salesManSn: undefined, // 业务员
  128. salesManName: '',
  129. distributionFlag: '0', // 铺货出库
  130. salesTragetType: 'CUSTOMER',
  131. remarks: '' ,// 备注
  132. addrProvinceList:[],
  133. addrDistrictList:[],
  134. addrCityList:[]
  135. }
  136. }
  137. },
  138. // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
  139. onReady() {
  140. this.$refs.uForm.setRules(this.rules);
  141. },
  142. onLoad(option) {
  143. // uni.$on('setFun',this.setFun)
  144. console.log(option.nowId,'option')
  145. // this.form = this.$store.state.vuex_OrderAddress
  146. // this.areaIdArr = this.form.receiveAreas.split(',')
  147. // this.areaInfo.label = this.form.receiveAreasName.replace(/\,/g,'-')
  148. if(option.nowId){
  149. this.itemId=option.nowId
  150. this.getCustomerData(this.itemId)
  151. this.getUserAllList()
  152. // setTimeout(()=>{
  153. // const ind=this.settleTypeList.findIndex((item)=>{
  154. // return item.settleStyleSn==this.customerData.settleStyleSn
  155. // })
  156. // console.log(ind,'ind')
  157. // this.settleStyleName=this.settleTypeList[ind].name
  158. // this.defaultSettleIndex=[ind]
  159. // // if(this.customerData.customerSn){
  160. // // const settleInd=this.custTypeList.findIndex((item)=>{
  161. // // return item.customerSn==this.customerData.customerSn
  162. // // })
  163. // // this.custTypeName=this.custTypeList[settleInd].name
  164. // // this.defaultCustIndex=[settleInd]
  165. // // }
  166. // console.log(ind,'a',JSON.parse(JSON.stringify(this.defaultSettleIndex)) )
  167. // },200)
  168. }
  169. this.getSettleStyle()
  170. this.getCustomerList()
  171. },
  172. onUnload() {
  173. this.$u.vuex("vuex_OrderAddress",{})
  174. // uni.$off('setFun',this.setFun)
  175. },
  176. methods:{
  177. // 新增完客户将客户数据传过来
  178. // setFun(data){
  179. // console.log(data,'========页面传参')
  180. // // if(data){
  181. // // this.form = Object.assign(this.form, {
  182. // // buyerName: data.customerName, // 客户名称
  183. // // buyerSn: data.customerSn, // 客户sn
  184. // // consigneeTel: data.contactTel, // 联系电话
  185. // // contactMobile: data.contactMobile,
  186. // // consigneeName: data.contactName, // 联系人
  187. // // shippingAddressProvinceSn: data.provinceSn, // 省
  188. // // shippingAddressProvinceName: data.provinceName,
  189. // // shippingAddressCitySn: data.citySn, // 市
  190. // // shippingAddressCityName: data.cityName,
  191. // // shippingAddressCountySn: data.countySn, // 区
  192. // // shippingAddressCountyName: data.countyName,
  193. // // shippingAddress: data.customerAddr, // 详细地址
  194. // // fax: data.fax, // 客户传真
  195. // // dispatchType: data.dispatchType, // 配送方式
  196. // // satelliteFlag: data.satelliteFlag, // 是否卫星仓客户
  197. // // priceType: data.priceType, // 价格类型
  198. // // settleStyleSn: data.settleStyleSn // 收款方式
  199. // // })
  200. // // }
  201. // },
  202. getCodeList(code){
  203. getLookUpDatas({type:code}).then(res=>{
  204. if(res.status==200){
  205. this.dispatchTypeList=res.data
  206. this.showDispatch=true
  207. }
  208. })
  209. },
  210. getCustomerData(val){
  211. customerDetail({id:val}).then(res=>{
  212. if(res.status==200){
  213. this.customerData=res.data
  214. if (this.customerData.provinceSn) { this.getArea('city', this.customerData.provinceSn) }
  215. if (this.customerData.citySn) { this.getArea('district', this.customerData.citySn) }
  216. // this.setFun(res.data)
  217. this.form = Object.assign(this.form, {
  218. buyerName: this.customerData.customerName, // 客户名称
  219. buyerSn: this.customerData.customerSn, // 客户sn
  220. consigneeTel: this.customerData.contactTel, // 联系电话
  221. contactMobile: this.customerData.contactMobile,
  222. consigneeName: this.customerData.contactName, // 联系人
  223. shippingAddressProvinceSn: this.customerData.provinceSn, // 省
  224. shippingAddressProvinceName: this.customerData.provinceName,
  225. shippingAddressCitySn: this.customerData.citySn, // 市
  226. shippingAddressCityName: this.customerData.cityName,
  227. shippingAddressCountySn: this.customerData.countySn, // 区
  228. shippingAddressCountyName: this.customerData.countyName,
  229. shippingAddress: this.customerData.customerAddr, // 详细地址
  230. fax: this.customerData.fax, // 客户传真
  231. dispatchType: this.customerData.dispatchType, // 配送方式
  232. satelliteFlag: this.customerData.satelliteFlag, // 是否卫星仓客户
  233. priceType: this.customerData.priceType, // 价格类型
  234. settleStyleSn: this.customerData.settleStyleSn // 收款方式
  235. })
  236. if(this.customerData.priceType || this.customerData.dispatchType){
  237. setTimeout(()=>{
  238. this.$refs.priceType.setVal(this.customerData.priceType)
  239. this.$refs.dispatchType.setVal(this.customerData.dispatchType)
  240. },200)
  241. }
  242. this.form=Object.assign(this.form,res.data)
  243. }else{
  244. this.customerData=null
  245. }
  246. })
  247. },
  248. // 获取城市列表
  249. getCityList (val) {
  250. this.addrCityList = []
  251. this.addrDistrictList = []
  252. this.form.shippingAddressCitySn = undefined
  253. this.form.shippingAddressCityName = ''
  254. this.form.shippingAddressCountySn = undefined
  255. this.form.shippingAddressCountyName = ''
  256. if (val) {
  257. this.getArea('city', val)
  258. this.form.shippingAddressProvinceName = this.addrProvinceList.find(item => item.areaSn == val).name
  259. } else {
  260. this.form.shippingAddressProvinceName = ''
  261. }
  262. },
  263. // 获取区县列表
  264. getAreaList (val) {
  265. this.addrDistrictList = []
  266. this.form.shippingAddressCountySn = undefined
  267. this.form.shippingAddressCountyName = ''
  268. if (val) {
  269. this.getArea('district', val)
  270. this.form.shippingAddressCityName = this.addrCityList.find(item => item.areaSn == val).name
  271. } else {
  272. this.form.shippingAddressCityName = ''
  273. }
  274. },
  275. // 区县变更
  276. areaCharged (val) {
  277. if (val) {
  278. this.form.shippingAddressCountyName = this.addrDistrictList.find(item => item.areaSn == val).name
  279. } else {
  280. this.form.shippingAddressCountyName = ''
  281. }
  282. },
  283. // 省/市/区
  284. getArea (leve, sn) {
  285. let params
  286. if (leve == 'province') {
  287. params = { type: '2' }
  288. } else {
  289. params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
  290. }
  291. getArea(params).then(res => {
  292. if (res.status == 200) {
  293. if (leve == 'province') {
  294. this.addrProvinceList = res.data || []
  295. } else if (leve == 'city') {
  296. this.addrCityList = res.data || []
  297. } else if (leve == 'district') {
  298. this.addrDistrictList = res.data || []
  299. }
  300. } else {
  301. if (leve == 'province') {
  302. this.addrProvinceList = []
  303. } else if (leve == 'city') {
  304. this.addrCityList = []
  305. } else if (leve == 'district') {
  306. this.addrDistrictList = []
  307. }
  308. }
  309. })
  310. },
  311. getCodeByName (dispName) {
  312. return this.dispatchTypeList.find((item) => {
  313. return item.dispName == dispName
  314. })
  315. },
  316. // 重新选择
  317. goBack(){
  318. uni.navigateBack({})
  319. },
  320. radioChange(e) {
  321. console.log(e);
  322. this.form.distributionFlag=e
  323. },
  324. // 选择价格类型
  325. chooseType(val){
  326. console.log(val,'vai')
  327. this.form.priceType=val
  328. },
  329. // 选择配送方式
  330. choosedispatchType(val){
  331. this.form.dispatchType=val
  332. },
  333. // 选择省区市
  334. areaConfirm(e) {
  335. console.log('已选择的省市区', e)
  336. this.areaInfo = e
  337. this.areaIdArr = [ e.provinceCode, e.cityCode, e.areaCode ]
  338. this.form.shippingAddressProvinceSn=e.provinceCode
  339. this.form.shippingAddressCitySn=e.cityCode
  340. this.form.shippingAddressCountySn=e.areaCode
  341. this.form.shippingAddressProvinceName=e.labelArr[0]
  342. this.form.shippingAddressCityName=e.labelArr[1]
  343. this.form.shippingAddressCountyName=e.labelArr[2]
  344. },
  345. openAddress(){
  346. // 省市区 回显 参数为省市区id数组
  347. // console.log(this.areaIdArr,'this.areaIdArr')
  348. this.$refs.applyAddress.open(this.areaIdArr)
  349. },
  350. brandClean(){
  351. this.settleStyleName=''
  352. this.form.settleStyleSn=undefined
  353. },
  354. // 获取业务员列表数据
  355. getUserAllList () {
  356. employeeAllList({}).then(res => {
  357. if (res.status == 200) {
  358. this.userList = res.data || []
  359. } else {
  360. this.userList = []
  361. }
  362. })
  363. },
  364. // 获取客户类型列表
  365. getCustomerList(){
  366. custType({}).then(res=>{
  367. if(res.status==200){
  368. this.custTypeList=res.data
  369. }else{
  370. this.custTypeList=[]
  371. }
  372. })
  373. },
  374. // 获取结算方式列表
  375. getSettleStyle(){
  376. settleStyleQueryAll({}).then(res=>{
  377. if(res.status==200){
  378. this.settleTypeList=res.data
  379. }else{
  380. this.settleTypeList=null
  381. }
  382. })
  383. },
  384. // 收款方式change
  385. settleStyleChange(e){
  386. console.log(e,'data')
  387. this.defaultSettleIndex=[e]
  388. this.settleStyleName=this.settleTypeList[e].name
  389. if(this.itemId){
  390. this.form.settleStyleSn=this.settleTypeList[e].settleStyleSn
  391. }else{
  392. this.form.settleStyleSn=this.settleTypeList[e].settleStyleSn
  393. }
  394. },
  395. custTypeChange(e){
  396. this.defaultCustIndex=[e]
  397. this.custTypeName=this.custTypeList[e].name
  398. this.form.customerTypeSn=this.custTypeList[e].customerTypeSn
  399. },
  400. userChange(e){
  401. this.defaultUserIndex=[e]
  402. this.custTypeName=this.custTypeList[e].name
  403. this.form.customerTypeSn=this.custTypeList[e].customerTypeSn
  404. },
  405. // 保存 (新增客户)
  406. customerSubmit(){
  407. console.log('保存===========')
  408. this.$refs.uForm.validate(valid => {
  409. if (valid) {
  410. console.log('验证通过');
  411. if (this.form.customerName ==='') {
  412. uni.showToast({
  413. title: '请输入客户名称',
  414. icon: 'none'
  415. })
  416. return false
  417. }
  418. // 省市区
  419. if(this.areaIdArr.length == 0){
  420. uni.showToast({icon: 'none',title: '请选择省市区'})
  421. return
  422. }
  423. if (this.form.priceType ==undefined ) {
  424. uni.showToast({
  425. title: '请选择价格类型',
  426. icon: 'none'
  427. })
  428. return false
  429. }
  430. if (this.form.settleStyleSn ==undefined) {
  431. uni.showToast({
  432. title: '请选择收款方式',
  433. icon: 'none'
  434. })
  435. return false
  436. }
  437. const params=Object.assign({},this.form,this.areaIdArr)
  438. console.log(params,'params')
  439. if(this.form.id) {
  440. params.id = this.form.id
  441. }
  442. custSave(params).then(res=>{
  443. if(res.status == 200) {
  444. uni.showToast({
  445. title: res.message,
  446. icon: 'none'
  447. })
  448. setTimeout(()=>{
  449. uni.navigateBack()
  450. },300)
  451. }
  452. })
  453. } else {
  454. console.log('验证失败');
  455. }
  456. })
  457. },
  458. // 保存 (新增销售单)
  459. salesSbmit(){
  460. console.log('保存===========')
  461. this.$refs.uForm.validate(valid => {
  462. if (valid) {
  463. console.log('验证通过');
  464. if (this.form.customerName ==='') {
  465. uni.showToast({
  466. title: '请输入客户名称',
  467. icon: 'none'
  468. })
  469. return false
  470. }
  471. // 省市区
  472. if(this.areaIdArr.length == 0){
  473. uni.showToast({icon: 'none',title: '请选择省市区'})
  474. return
  475. }
  476. if (this.form.priceType ==undefined ||this.form.priceType =='') {
  477. uni.showToast({
  478. title: '请选择价格类型',
  479. icon: 'none'
  480. })
  481. return false
  482. }
  483. if (this.form.settleStyleSn ==undefined) {
  484. uni.showToast({
  485. title: '请选择收款方式',
  486. icon: 'none'
  487. })
  488. return false
  489. }
  490. const params={
  491. buyerName:this.customerData.customerName , // 客户名称
  492. buyerSn: this.customerData.customerSn, // 客户sn
  493. consigneeTel: this.form.consigneeTel?this.form.consigneeTel: this.customerData.contactTel, // 联系电话
  494. contactMobile:this.form.contactMobile?this.form.contactMobile: this.customerData.contactMobile, // 联系手机
  495. consigneeName:this.form.consigneeName?this.form.consigneeName: this.customerData.contactName, // 联系人
  496. shippingAddressProvinceSn:this.form.shippingAddressProvinceSn?this.form.shippingAddressProvinceSn: this.customerData.provinceSn, // 省
  497. shippingAddressProvinceName:this.form.shippingAddressProvinceName?this.form.shippingAddressProvinceName: this.customerData.customerName,
  498. shippingAddressCitySn:this.form.shippingAddressCitySn?this.form.shippingAddressCitySn: this.customerData.citySn, // 市
  499. shippingAddressCityName:this.form.shippingAddressCityName?this.form.shippingAddressCityName: this.customerData.cityName,
  500. shippingAddressCountySn:this.form.shippingAddressCountySn?this.form.shippingAddressCountySn: this.customerData.countySn, // 区
  501. shippingAddressCountyName:this.form.shippingAddressCountyName?this.form.shippingAddressCountyName: this.customerData.countyName,
  502. shippingAddress:this.form.customerAddr?this.form.customerAddr: this.customerData.customerAddr, // 详细地址
  503. fax:this.form.fax?this.form.fax: this.customerData.fax, // 客户传真
  504. dispatchType:this.form.dispatchType?this.form.dispatchType: this.customerData.dispatchType, // 配送方式
  505. satelliteFlag: 0, // 是否卫星仓客户
  506. priceType:this.form.priceType?this.form.priceType: this.customerData.priceType, // 价格类型
  507. settleStyleSn:this.form.settleStyleSn?this.form.settleStyleSn: this.customerData.settleStyleSn, // 收款方式
  508. salesManSn:this.salesManSn ||undefined, // 业务员
  509. salesManName: '',
  510. distributionFlag: '0', // 铺货出库
  511. salesTragetType: 'CUSTOMER',
  512. remarks: this.remarks // 备注
  513. }
  514. console.log(params,'params')
  515. salesSave(params).then(res=>{
  516. if(res.status == 200) {
  517. uni.showToast({
  518. title: res.message,
  519. icon: 'none'
  520. })
  521. setTimeout(()=>{
  522. uni.navigateBack()
  523. },300)
  524. }
  525. })
  526. } else {
  527. console.log('验证失败');
  528. }
  529. })
  530. },
  531. }
  532. }
  533. </script>
  534. <style lang="scss">
  535. .addCustomer-content{
  536. width: 100%;
  537. height: 100vh;
  538. background-color: #fff;
  539. padding:0 40upx;
  540. display: flex;
  541. flex-direction: column;
  542. .content-customerName{
  543. // padding: 10upx;
  544. // border-radius: 10upx;
  545. // border: 1upx solid #e5e5e5;
  546. }
  547. .content-form{
  548. flex: 1;
  549. // box-shadow:0 8upx 24upx rgba(0,0,0,.1);
  550. // border: 1upx solid #e5e5e5;
  551. .receiveAddress{
  552. width: 100%;
  553. line-height: 1.5em;
  554. box-sizing: border-box;
  555. font-style: normal;
  556. text-align: end;
  557. }
  558. }
  559. .content-form:not(:last-child){
  560. border-bottom: none;
  561. }
  562. .form-footer-btn{
  563. background-color: #fff;
  564. position: fixed;
  565. bottom: 0;
  566. left: 0;
  567. width: 100%;
  568. padding: 16upx 20upx 12upx;
  569. z-index: 999;
  570. .handle-btn{
  571. width: 100%;
  572. background-color: rgb(51, 95, 182);
  573. color: #fff;
  574. }
  575. }
  576. }
  577. </style>