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.

add-work-supplement.vue 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <view class="bg">
  3. <view class="title_wrap"><text class="title">基本信息</text><text class="common-word">待补充</text></view>
  4. <car-number-input @numberInputResult="carNumber" :defaultStr="state.form.vehiclePlate"></car-number-input>
  5. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle'>
  6. <u-form-item label="车牌颜色" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  7. borderBottom>
  8. <u-input v-model="state.form.vehiclePlateColorStr" type="select" @click="show1 = true" input-align='right'/>
  9. </u-form-item>
  10. <u-form-item label="姓名" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  11. borderBottom>
  12. <u-input placeholder='请输入姓名' type="idcard" v-model="state.form.name" maxlength="18"
  13. inputAlign="right" />
  14. </u-form-item>
  15. <u-form-item label="联系方式" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  16. borderBottom>
  17. <u-input placeholder='请输入手机号码' type="number" v-model="state.form.mobile" maxlength="11"
  18. inputAlign="right" />
  19. </u-form-item>
  20. </u-form>
  21. </view>
  22. <view class="bg">
  23. <view class="title">工单信息</view>
  24. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle' borderBottom>
  25. <u-form-item label="工单号码" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  26. borderBottom>
  27. <u-input placeholder='请输入工单号码' type="idcard" v-model="state.form.name" inputAlign="right" />
  28. </u-form-item>
  29. <u-form-item label="工单类型" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  30. borderBottom>
  31. <u-input v-model="state.form.vehiclePlateColorStr" type="select" @click="show1 = true" input-align='right'/>
  32. </u-form-item>
  33. <u-form-item label="是否ETC用户" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  34. borderBottom>
  35. <u-input v-model="state.form.vehiclePlateColorStr" type="select" @click="show1 = true" input-align='right'/>
  36. </u-form-item>
  37. <u-form-item label="事件发生日期" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  38. borderBottom>
  39. <picker mode="date" value="{{state.date}}" bindchange="bindDateChange">
  40. <view class="picker" v-if="!state.date">
  41. 请选择日期
  42. </view>
  43. <view>
  44. {{state.date}}
  45. </view>
  46. </picker>
  47. </u-form-item>
  48. <u-form-item label="申请日期" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  49. borderBottom>
  50. <picker mode="date" value="{{state.date}}" bindchange="bindDateChange">
  51. <view class="picker" v-if="!state.date">
  52. 请选择日期
  53. </view>
  54. <view>
  55. {{state.date}}
  56. </view>
  57. </picker>
  58. </u-form-item>
  59. <u-form-item label="客户投诉" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  60. borderBottom>
  61. </u-form-item>
  62. <textarea style="border: 1rpx dashed rgb(192, 196, 204);min-height: 200rpx; width: 100%;border-radius: 18rpx;padding: 20rpx;box-sizing: border-box;" placeholder="请输入述求" auto-height adjust-position></textarea>
  63. <u-form-item label="以佐证资料" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  64. borderBottom>
  65. </u-form-item>
  66. <view class="picture-wrapper" @click="cardFileImageUpdate()">
  67. <view class="bg">
  68. <view class="">
  69. <view class="name"> 佐证资料一 </view>
  70. <view class="value"> 上传佐证资料一 </view>
  71. <view class="tip">
  72. <view class="tip-value"> 拍摄规范 </view>
  73. </view>
  74. </view>
  75. <image v-if="!state.form.proxyUrl" class="icon" :src="`${$imgUrl}issuance/weituo.png`"
  76. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  77. </image>
  78. <image v-else class="icon" :src="strReplace(state.form.proxyUrl)"
  79. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  80. </view>
  81. </view>
  82. <u-form-item label="文件" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  83. borderBottom>
  84. </u-form-item>
  85. <view class="down-wrap">
  86. <text>XXXXX文件.pdf</text>
  87. <text class="down">下载</text>
  88. </view>
  89. <view class="down-wrap">
  90. <text>XXXXX文件.pdf</text>
  91. <text class="down">下载</text>
  92. </view>
  93. </u-form>
  94. </view>
  95. <view class="bg">
  96. <view class="title_wrap" style="margin-bottom: 0;"><text class="title">请补充如下的资料</text></view>
  97. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle' borderBottom>
  98. <u-form-item label="补充描述" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  99. borderBottom>
  100. </u-form-item>
  101. <textarea style="border: 1rpx dashed rgb(192, 196, 204);min-height: 200rpx; width: 100%;border-radius: 18rpx;padding: 20rpx;box-sizing: border-box;" placeholder="请根据自身情况进行补充。" auto-height adjust-position></textarea>
  102. <u-form-item label="其他佐证材料" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'
  103. borderBottom>
  104. <text class="common-word">(不限于图片、文件、不超过5个。)</text>
  105. </u-form-item>
  106. <button type="default" class="ui-btn-another" @click="addFile()">
  107. +添加附件
  108. </button>
  109. </u-form>
  110. </view>
  111. <view class="action">
  112. <button type="default" class="ui-btn" @click="savaHandle()">
  113. 提交
  114. </button>
  115. </view>
  116. <!-- 选择车牌颜色 -->
  117. <u-select v-model="show1" :list="state.colorRange" @confirm="changeColor"></u-select>
  118. </template>
  119. <script setup lang="ts">
  120. import { navTo,uploadFile,strReplace} from "@/utils/utils";
  121. import { reactive,ref } from "vue";
  122. import carNumberInput from "@/components/car-number-input/car-number-input.vue";
  123. import { onLoad } from "@dcloudio/uni-app";
  124. import { getItem } from "@/utils/storage.ts"
  125. const labelStyle = {
  126. color: "#004576",
  127. fontSize: "28rpx",
  128. }
  129. const leftIcon = {
  130. height: '100%',
  131. width: '8rpx',
  132. display: 'flex',
  133. 'align-items': 'center',
  134. 'margin-right': '4rpx',
  135. }
  136. const show1 = ref(false)
  137. const state = reactive({
  138. form: {
  139. name: "",
  140. mobile: "",
  141. vehiclePlate: "",
  142. vehiclePlateColor: "",
  143. vehiclePlateColorStr:"",//车牌颜色中文
  144. proxyUrl:"",
  145. },
  146. colorRange: [],
  147. date: '',//2016-09-01
  148. })
  149. onLoad((option : any) => {
  150. let getColor = getItem('key')['VEHICLE_COLOR_TYPE'];
  151. for (var k = 0; k < getColor.length; k++) {
  152. let obj = {};
  153. obj['value'] = getColor[k]['code']
  154. obj['label'] = getColor[k]['name']
  155. state.colorRange.push(obj)
  156. }
  157. console.log("state.colorRange",state.colorRange)
  158. });
  159. //车牌号输入
  160. const carNumber = (val : any) => {
  161. state.form.vehiclePlate = val.trim();
  162. };
  163. const changeColor = (item) => {
  164. state.form.vehiclePlateColor = item[0].value
  165. state.form.vehiclePlateColorStr = item[0].label
  166. console.log(item)
  167. }
  168. const bindDateChange=(e) =>{
  169. console.log('picker发送选择改变,携带值为', e.detail.value)
  170. state.date= e.detail.value
  171. }
  172. const savaHandle = () => {
  173. navTo(`/subpackage/after-sale/rescind-carId/rescind-carId-select`)
  174. }
  175. const addFile=()=>{
  176. }
  177. const cardFileImageUpdate = () => {
  178. uni.chooseImage({
  179. count: 1, //只能选取一张照片
  180. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  181. sourceType: ["camera", "album"], //从相册选择
  182. success: function (res) {
  183. uploadFile(res.tempFilePaths[0], "", "").then((data) => {
  184. state.form.proxyUrl = data;
  185. })
  186. },
  187. });
  188. };
  189. </script>
  190. <style lang="scss" scoped>
  191. .bg {
  192. background-color: white;
  193. width: 88%;
  194. margin: 0 auto;
  195. margin-top: 20rpx;
  196. border-radius: 12px;
  197. border: 1px solid #FFFFFF;
  198. padding: 20rpx;
  199. overflow: hidden;
  200. .title_wrap {
  201. display: flex;
  202. font-weight: 400;
  203. margin-bottom: 40rpx;
  204. justify-content: space-between;
  205. .title {
  206. font-size: 30rpx;
  207. color: #01243A;
  208. }
  209. }
  210. .des {
  211. font-weight: 400;
  212. font-size: 28rpx;
  213. color: #01243A;
  214. line-height: 56rpx;
  215. margin-top: 10rpx;
  216. text-indent: 1rem;
  217. }
  218. }
  219. .action {
  220. position: absolute;
  221. left: 0;
  222. height: 188rpx;
  223. background-color: #fff;
  224. border-radius: 30rpx 30rpx 0 0;
  225. width: 100vw;
  226. display: flex;
  227. align-items: center;
  228. justify-content: center;
  229. flex-direction: column;
  230. margin-top: 20rpx;
  231. }
  232. .picker{
  233. text-align: right;
  234. color: rgb(192, 196, 204);
  235. }
  236. .five{
  237. color: rgb(195,188,157);
  238. }
  239. .picture-wrapper {
  240. margin-top: 30rpx;
  241. .bg {
  242. background: #F5F9FB;
  243. border-radius: 10rpx;
  244. padding: 40rpx 30rpx;
  245. display: flex;
  246. justify-content: space-between;
  247. .name {
  248. padding-top: 30rpx;
  249. font-size: 32rpx;
  250. font-family: SourceHanSansSC, SourceHanSansSC;
  251. font-weight: 500;
  252. color: #111;
  253. line-height: 34rpx;
  254. }
  255. .value {
  256. margin-top: 20rpx;
  257. font-size: 22rpx;
  258. font-family: SourceHanSansSC, SourceHanSansSC;
  259. font-weight: 400;
  260. color: #999999;
  261. line-height: 24rpx;
  262. }
  263. .tip {
  264. margin-top: 20rpx;
  265. text-align: center;
  266. width: 100rpx;
  267. height: 30rpx;
  268. border-radius: 6rpx;
  269. border: 1rpx solid #CCB375;
  270. .tip-value {
  271. font-size: 20rpx;
  272. font-family: Microsoft YaHei;
  273. font-weight: 400;
  274. color: #CCB375;
  275. line-height: 30rpx;
  276. opacity: 1;
  277. }
  278. }
  279. }
  280. .icon {
  281. width: 304rpx;
  282. height: 190rpx;
  283. background-image: var(--bgimg);
  284. background-size: 100% 100%;
  285. background-repeat: no-repeat;
  286. }
  287. }
  288. .down-wrap{
  289. display: flex;
  290. justify-content: space-between;
  291. margin-bottom: 30rpx;
  292. .down{
  293. width: 100rpx;
  294. height: 40rpx;
  295. border-radius: 20rpx;
  296. background:linear-gradient(90deg, #CCB375 0%, #E7D398 100%);
  297. font-weight: 400;
  298. font-size: 24rpx;
  299. color: #FFFFFF;
  300. text-align: center;
  301. line-height: 40rpx;
  302. }
  303. }
  304. </style>