合同小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

508 lines
14 KiB

1 year ago
  1. <template>
  2. <view class="containers" >
  3. <view class="header">
  4. <view class="header_info">
  5. <view class="header_info_icon" @click.native.stop.prevent="toBack" style="display: flex; justify-content: center; align-items: center;">
  6. <uni-icons type="left" size="30" color="#c2d4de" > </uni-icons>
  7. </view>
  8. <text class="header_text">信息录入</text>
  9. </view>
  10. </view>
  11. <view class="section" style="margin-top: 5%;">
  12. <view class="form-item">
  13. <text class="label">付款方式</text>
  14. <text>
  15. {{records[0].payType}}
  16. </text>
  17. </view>
  18. <view class="form-item">
  19. <text class="label">客户类型</text>
  20. <text @change="onChange" class="radio-group" >
  21. {{records[0].custType == 0 ? "个人" : "公司"}}
  22. </text>
  23. </view>
  24. </view>
  25. <view class="idCard-box">
  26. <view class="reverse" @tap.prevent="uploadPositive">
  27. <image :src="records[0].certFront" >
  28. </image>
  29. </view>
  30. <view class="reverse" @tap.prevent="uploadReverse">
  31. <image :src="records[0].certBack" >
  32. </image>
  33. </view>
  34. <view class="reverse" @tap.prevent="uploadCarCert">
  35. <image :src="records[0].carPic" >
  36. </image>
  37. </view>
  38. </view>
  39. <!-- 客户基本信息 -->
  40. <view class="section">
  41. <view class="con_size">
  42. <image src="/static/image/矩形 5315.png" class='con_size_img' ></image>
  43. 客户基本信息
  44. </view>
  45. <view class="form-item">
  46. <text class="labels">*</text>
  47. <text class="label">产品名称</text>
  48. <text class="value">{{ records[0].productName }}</text>
  49. </view>
  50. <view class="form-item">
  51. <text class="labels">*</text>
  52. <text class="label">经销商</text>
  53. <text class="value">{{ records[0].storeName }}</text>
  54. </view>
  55. <view class="form-item">
  56. <text class="labels">*</text>
  57. <text class="label">客户姓名</text>
  58. <text class="value">{{ records[0].custName }}</text>
  59. </view>
  60. <view class="form-item">
  61. <text class="labels">*</text>
  62. <text class="label">居住地址</text>
  63. <text class="value">{{ records[0].custAddress }}</text>
  64. </view>
  65. <view class="form-item">
  66. <text class="labels">*</text>
  67. <text class="label">身份证号码</text>
  68. <text class="value">{{ records[0].custCardNo }}</text>
  69. </view>
  70. <view class="form-item">
  71. <text class="labels">*</text>
  72. <text class="label">联系方式</text>
  73. <text class="value">{{ records[0].custPhone }}</text>
  74. </view>
  75. <view class="form-item">
  76. <text class="labels">*</text>
  77. <text class="label">销售端口</text>
  78. <text class="value">{{ records[0].storeName }}</text>
  79. </view>
  80. <view class="form-item">
  81. <text class="labels">*</text>
  82. <text class="label">店端销售顾问</text>
  83. <text class="value">{{ records[0].saleName }}</text>
  84. </view>
  85. </view>
  86. <!-- 车辆信息 -->
  87. <view class="section">
  88. <view class="con_size">
  89. <image src="/static/image/矩形 5315.png" class='con_size_img' ></image>车辆信息</view>
  90. <view class="form-item">
  91. <text class="labels">*</text>
  92. <text class="label">车牌车系</text>
  93. <text class="value">{{cars[0].saleName}}</text>
  94. </view>
  95. <view class="form-item">
  96. <text class="labels">*</text>
  97. <text class="label">车辆型号</text>
  98. <text class="value">{{cars[0].carModel}}</text>
  99. </view>
  100. <view class="form-item">
  101. <text class="labels">*</text>
  102. <text class="label">车架号</text>
  103. <text class="value">{{cars[0].vin}}</text>
  104. </view>
  105. <view class="form-item">
  106. <text class="labels">*</text>
  107. <text class="label">车辆类型</text>
  108. <text class="value">{{cars[0].carType}}</text>
  109. </view>
  110. <view class="form-item">
  111. <text class="labels">*</text>
  112. <text class="label">使用性质</text>
  113. <text class="value">{{cars[0].useType}}</text>
  114. </view>
  115. <view class="form-item">
  116. <text class="labels">*</text>
  117. <text class="label">是否新车</text>
  118. <text class="value">{{cars[0].newCar==0?"否":"是" }}</text>
  119. </view>
  120. <view class="form-item">
  121. <text class="label">车牌号</text>
  122. <text class="value">{{cars[0].carNo}}</text>
  123. </view>
  124. <view class="form-item">
  125. <text class="labels">*</text>
  126. <text class="label">发动机号</text>
  127. <text class="value">{{cars[0].engineNo}}</text>
  128. </view>
  129. <view class="form-item" v-if="productTypeFlag">
  130. <text class="labels">*</text>
  131. <text class="label">里程</text>
  132. <text class="value">{{cars[0].mileage}}</text>
  133. </view>
  134. <view class="form-item" v-if="productTypeFlag">
  135. <text class="labels">*</text>
  136. <text class="label">购车时间</text>
  137. <text class="value">{{cars[0].buyTime}}</text>
  138. </view>
  139. <view class="form-item" v-if="productTypeFlag">
  140. <text class="labels">*</text>
  141. <text class="label">车辆购置价</text>
  142. <text class="value">{{cars[0].buyMoney}}</text>
  143. </view>
  144. <view class="form-item" v-if="productTypeFlag">
  145. <text class="labels">*</text>
  146. <text class="label">购置税</text>
  147. <text class="value">{{cars[0].buyTax}}</text>
  148. </view>
  149. </view>
  150. <!-- 凭证信息 -->
  151. <view class="section">
  152. <view class="con_size">
  153. <image src="/static/image/矩形 5315.png" class='con_size_img' ></image>凭证信息</view>
  154. <view class="form-item" v-if="productTypeFlag">
  155. <text class="labels">*</text>
  156. <text class="label">第一受益人</text>
  157. <text class="value">{{vouchers[0].firstBeneficiary}}</text>
  158. </view>
  159. <view class="form-item" v-if="productTypeFlag">
  160. <text class="labels">*</text>
  161. <text class="label">服务费</text>
  162. <text class="value">{{vouchers[0].serviceMoney}}</text>
  163. </view>
  164. <view class="form-item" v-if="productTypeFlag">
  165. <text class="labels">*</text>
  166. <text class="label">生效时间</text>
  167. <text class="value">{{vouchers[0].effectiveTime}}</text>
  168. </view>
  169. <view class="form-item" v-if="productTypeFlag">
  170. <text class="labels">*</text>
  171. <text class="label">失效时间</text>
  172. <text class="value">{{vouchers[0].endTime}}</text>
  173. </view>
  174. <view class="form-item" v-if="productTypeFlag">
  175. <text class="labels">*</text>
  176. <text class="label">服务年限</text>
  177. <text class="value">{{vouchers[0].serviceYear}}</text>
  178. </view>
  179. <view class="form-item" v-if="productTypeFlag">
  180. <text class="labels">*</text>
  181. <text class="label">付款时间</text>
  182. <text class="value">{{vouchers[0].payTime}}</text>
  183. </view>
  184. <view class="con_size" >
  185. <text class="labels">*</text>
  186. <text class="label">支付凭证</text><image
  187. :src="records[0].payVoucherUrl"
  188. mode="widthFix"
  189. style="width: 100px;height: 150px;"
  190. @click="clickImg"
  191. ></image>
  192. </view>
  193. <view class="con_size">
  194. <text class="labels">*</text>
  195. <text class="label">发票信息</text><image
  196. :src="records[0].invoiceUrl"
  197. mode="widthFix"
  198. style="width: 100px;height: 150px;"
  199. @click="clickImg"
  200. ></image>
  201. </view>
  202. </view>
  203. <view class="section" v-if="productTypeFlag">
  204. <view class="con_size">
  205. <image src="/static/image/矩形 5315.png" class='con_size_img' ></image>金融信息</view>
  206. <view class="form-item">
  207. <text class="label">贷款机构</text>
  208. <text class="value">{{Finances[0].lender||0}}</text>
  209. </view>
  210. <view class="form-item">
  211. <text class="label">贷款金额</text>
  212. <text class="value">{{Finances[0].lenderMoney||0}}</text>
  213. </view>
  214. <view class="form-item">
  215. <text class="label">贷款期限</text>
  216. <text class="value">{{Finances[0].lenderYear||0}}</text>
  217. </view>
  218. </view>
  219. </view>
  220. </template>
  221. <script>
  222. import {isToken,list,queryAppOrderCarByMainId,queryAppOrderFinanceByMainId,queryAppOrderVoucherByMainId} from '@/api.uts'
  223. export default {
  224. data() {
  225. return {
  226. records: [
  227. {
  228. id: "1897277583591075841",
  229. orderNum: "CXSC20250305302395",
  230. productName: "畅行无忧",
  231. productServiceYear: "1",
  232. productMoney: null,
  233. productContractTemp: "https://img.augcl.com/temp/test_car_1741181182533.pdf",
  234. productType: "普通产品",
  235. storeName: "上海测试门店",
  236. custName: "陈朋涛",
  237. custAddress: "山东省滕州市龙阳镇",
  238. custCardNo: "532101198906010015",
  239. custPhone: "13456788765",
  240. salePort: "售前",
  241. createBy: "tanzs",
  242. saleName: "lj",
  243. payType: "全款",
  244. custType: 0,
  245. certFront: "https://img.augcl.com/cert/4uUVhHO3qByFbeb95285d2741f5437d370fea46a67b9_1740859563993.jpg",
  246. certBack: "https://img.augcl.com/cert/J4X2ZFsgotLXdcc88281956f0b3fb63708bb497c1698_1740859570051.jpg",
  247. carPic: "https://img.augcl.com/cert/w2Aoeo53vXfBb3f85e86690e90e240e1111c770e6f26_1740859575127.jpg",
  248. busLicense: null,
  249. createTime: "2025-03-05 21:26:39",
  250. updateBy: null,
  251. updateTime: null,
  252. sysOrgCode: null,
  253. status: 1,
  254. contractUrl: "https://img.augcl.com/contract/CXSC20250305302395_1741181199845.pdf",
  255. payee: "上海测试门店",
  256. payeeTime: null,
  257. payVoucherUrl: "https://img.augcl.com/test/F5n9sMOVIOBs363af867a4affb43fcf1cc64bb01916d_1740859625764.png",
  258. salePort_dictText: "售前",
  259. custType_dictText: "个人",
  260. status_dictText: "已生效"
  261. }
  262. ],
  263. cars:[
  264. {
  265. id: "1897277583754653697",
  266. carSeries: "比亚迪海狮05 EV2025款 低配版",
  267. vin: "LC0CE6DB8S4040471",
  268. carType: "燃油车",
  269. useType: "非营运",
  270. newCar: 1,
  271. carModel: "BYD7008BEVB1",
  272. carNo: "fg6545",
  273. engineNo: "2V4003609",
  274. mileage: "10000",
  275. buyTime: "2025-03-02 04:06:50",
  276. buyMoney: 10000,
  277. buyTax: 885,
  278. orderFkId: "1897277583591075841",
  279. updateBy: null,
  280. createTime: "2025-03-05 21:26:40",
  281. updateTime: null,
  282. sysOrgCode: null,
  283. createBy: "tanzs"}
  284. ],
  285. vouchers:[],
  286. Finances:[],
  287. productTypeFlag:true
  288. }
  289. },
  290. onLoad(options) {
  291. isToken();
  292. list({id:getApp().id}).then((res)=>{
  293. this.records = res.result.records
  294. })
  295. queryAppOrderCarByMainId({id:getApp().id}).then((res)=>{
  296. this.cars = res.result
  297. })
  298. queryAppOrderFinanceByMainId({id:getApp().id}).then((res)=>{
  299. this.Finances = res.result
  300. })
  301. queryAppOrderVoucherByMainId({id:getApp().id}).then((res)=>{
  302. this.vouchers = res.result
  303. })
  304. console.log('111',JSON.parse(this.cars));
  305. this.productTypeFlag = getApp().productTypeFlag;
  306. },
  307. onUpload() {
  308. // 页面销毁时移除监听
  309. uni.offKeyboardHeightChange();
  310. },
  311. methods: {
  312. keyboardheightchange(e){
  313. // this.changeBottomVal = e.detail.height + 'px'
  314. },
  315. clickImg(){
  316. uni.previewImage({
  317. urls: [this.records[0].payVoucherUrl], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  318. current: '', // 当前显示图片的http链接,默认是第一个
  319. success: function(res) {},
  320. fail: function(res) {},
  321. complete: function(res) {},
  322. })
  323. },
  324. toBack(){
  325. // console.log('111')
  326. uni.navigateBack({delta: 1})
  327. }
  328. }
  329. }
  330. </script>
  331. <style scoped lang="scss">
  332. .containers {
  333. height: 100%;
  334. width: 100%;
  335. background-color: #fff;
  336. overflow-y:scroll;
  337. }
  338. .footer {
  339. position: fixed;
  340. bottom: 0;
  341. left: 0;
  342. }
  343. .container::-webkit-scrollbar {
  344. display: none;
  345. }
  346. .section {
  347. // margin-bottom: 30rpx;
  348. border-bottom: 1rpx solid #eee;
  349. margin: 0 1rem 0 1rem;
  350. }
  351. .sections{
  352. margin: 0 1rem 1rem 1rem;
  353. }
  354. .form-item {
  355. display: flex;
  356. flex-direction: row;
  357. justify-content: space-between;
  358. align-items: center;
  359. padding: 0.5rem 0;
  360. border-bottom: 0.1rem solid #f2f2f2;
  361. color: #767676;
  362. }
  363. .labels{
  364. color: red;
  365. display: flex;
  366. justify-content: center;
  367. align-items: center;
  368. }
  369. .label {
  370. font-size: 28rpx;
  371. color: #666;
  372. width: 200rpx;
  373. }
  374. .input {
  375. flex: 1;
  376. text-align: right;
  377. font-size: 28rpx;
  378. color: #737373;
  379. }
  380. .picker {
  381. flex: 1;
  382. }
  383. .picker-text {
  384. text-align: right;
  385. color: #737373;
  386. font-size: 0.8rem;
  387. }
  388. .radio-group {
  389. display: flex;
  390. flex: 1;
  391. justify-content: flex-end;
  392. flex-direction: row;
  393. }
  394. .radio-label {
  395. padding: 0;
  396. margin-left: 10rpx;
  397. display: flex;
  398. flex-direction: row;
  399. font-size: 1rem;
  400. transform: scale(0.7);
  401. }
  402. .value {
  403. flex: 1;
  404. text-align: right;
  405. color: #737373;
  406. font-size: 0.8rem;
  407. }
  408. // .timePiker{
  409. // display: flex;
  410. // justify-content: center;
  411. // align-items: center;
  412. // color: #3f3f3f;
  413. // }
  414. .idCard-box {
  415. margin-top: 10%;
  416. width: 100%;
  417. height: 50%;
  418. display: flex;
  419. flex-direction: row;
  420. /* background-color: red; */
  421. flex-wrap: wrap;
  422. .reverse {
  423. height: 30%;
  424. width: 40%;
  425. display: flex;
  426. align-items: center;
  427. justify-content: center;
  428. // background-color: blue;
  429. margin: 0 5% 0 5%;
  430. image {
  431. width: 100%;
  432. height: 100%;
  433. }
  434. text{
  435. position: absolute;
  436. text-shadow: 1px 1px black, -1px -1px black, 1px -1px black, -1px 1px black;
  437. font-size: 0.8rem;
  438. color:#fff;
  439. }
  440. }
  441. }
  442. /* 表单分区样式 */
  443. .con_size {
  444. font-size: 1rem;
  445. font-weight: bold;
  446. margin: 1rem 0;
  447. color: #000000;
  448. display: flex;
  449. flex-direction: row;
  450. align-items: center;
  451. }
  452. .con_size_img{
  453. height: 100%;
  454. width: 2%;
  455. margin-right: 2%;
  456. }
  457. .form-button{
  458. width: 100%;
  459. height:100%;
  460. // background-color: #000000;
  461. display: flex;
  462. align-items: center;
  463. justify-content: center;
  464. }
  465. .button{
  466. height: 100%;
  467. width: 100%;
  468. background-color: #044f7a;
  469. color: #ffffff;
  470. border-radius: 1rem;
  471. }
  472. </style>