index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. <template>
  2. <page-meta root-font-size="system" />
  3. <view class="process_container">
  4. <!-- 主表单 -->
  5. <uni-card spacing="0">
  6. <view class="main_container">
  7. <uni-forms ref="$mainForm" :modelValue="mainFormValue" :rules="$mainFormRules" label-position="left"
  8. :label-width="125" :border="true">
  9. <view v-for="(elem, index) in formElements" :key="index">
  10. <uni-forms-item v-if="'0' != elem.canEdit && '8' != elem.type" :name="elem.elementId" :label="elem.elementName">
  11. <!-- 关联变量输入框 -->
  12. <uni-easyinput v-if="undefined != elem.bindTimeRange" placeholder="" :value="calculateTimeDifference(elem, formElements)"></uni-easyinput>
  13. <!-- 金额转大写 -->
  14. <uni-easyinput v-else-if="elem.elementName.endsWith('大写')" placeholder="" :value="computedNumberToChineseCurrency(elem, formElements)"></uni-easyinput>
  15. <!-- 输入框 -->
  16. <uni-easyinput v-else-if="'0' == elem.type" :disabled="'0' == elem.canEdit" :type="fieldTypeDict[elem.fieldType] || 'text'"
  17. :placeholder="'0' == elem.canEdit ? '' : '请输入内容'"
  18. v-model="elem.defaultValue"></uni-easyinput>
  19. <!-- 富文本输入框 -->
  20. <uni-easyinput v-else-if="'1' == elem.type" :disabled="'0' == elem.canEdit" :placeholder="'0' == elem.canEdit ? '' : '请输入内容'" v-model="elem.defaultValue"
  21. type="textarea"></uni-easyinput>
  22. <!-- 下拉框 -->
  23. <picker class="picker_container" v-else-if="'2' == elem.type"
  24. @change="bindPickerChange($event, elem)" :value="elem.defaultValue" :range="formatDict(elem.typeDetail.enum)">
  25. <view class="uni-input input_text">
  26. <!-- 设置默认值为第一个选项 -->
  27. {{ elem.defaultValue ? elem.defaultValue : elem.defaultValue = elem.typeDetail.enum[0].enumVname }}
  28. </view>
  29. </picker>
  30. <!-- 开始时间选择器 -->
  31. <uni-datetime-picker :end="formElements[elem.endElemIndex].defaultValue" @change="setTimeRange(elem)"
  32. v-else-if="'9' == elem.type && undefined != elem.endElemIndex" v-model="elem.defaultValue" :clear-icon="false" type="datetime" />
  33. <!-- 结束时间选择器 -->
  34. <uni-datetime-picker :start="formElements[elem.startElemIndex].defaultValue" @change="setTimeRange(elem)"
  35. v-else-if="'9' == elem.type && undefined != elem.startElemIndex" v-model="elem.defaultValue" :clear-icon="false" type="datetime" />
  36. <!-- 其他时间选择器 -->
  37. <!-- 年月日 时分秒 -->
  38. <uni-datetime-picker v-else-if="'9' == elem.type" v-model="elem.defaultValue" type="datetime" />
  39. <!-- 年月日 -->
  40. <uni-datetime-picker v-else-if="'3' == elem.type" v-model="elem.defaultValue" type="date" />
  41. </uni-forms-item>
  42. </view>
  43. </uni-forms>
  44. </view>
  45. </uni-card>
  46. <!-- 重复表单 -->
  47. <view v-if="repeatingForm.elementItem.length > 0" class="repeating_table">
  48. <uni-card v-for="(table, tableIndex) in repeatingForm.elements" spacing="0" :key="tableIndex">
  49. <uni-forms :ref="(el) => $repeatingForms[tableIndex] = el" :modelValue="repeatingFormsValue[tableIndex]"
  50. :rules="$repFormRules" label-position="left" :label-width="125" :border="true">
  51. <uni-forms-item :name="elem.tableField" v-for="(elem, itemIndex) in table"
  52. :label="repeatingForm.elementItem[itemIndex].elementName.slice(3)" :key="itemIndex">
  53. <!-- 自定义关联变量 -->
  54. <uni-easyinput v-if="repeatingForm.elementItem[itemIndex].bddzText" :placeholder="''" :value="calculateRepeatingFormExpression(elem, table)"></uni-easyinput>
  55. <uni-easyinput v-else placeholder="请输入内容" v-model="elem.defaultValue"
  56. :type="fieldTypeDict[repeatingForm.elementItem[itemIndex].fieldType.value] || 'text'"></uni-easyinput>
  57. </uni-forms-item>
  58. </uni-forms>
  59. <view class="repeating_table_button_container">
  60. <uni-row>
  61. <uni-col :span="10" :offset="1">
  62. <button @click="addRepeatingFormItem(tableIndex)" type="primary">新增</button>
  63. </uni-col>
  64. <uni-col :span="10" :offset="2">
  65. <button @click="delRepeatingFormItem(tableIndex)"
  66. :disabled="repeatingForm.elements.length <= 1" type="warn">删除</button>
  67. </uni-col>
  68. </uni-row>
  69. </view>
  70. </uni-card>
  71. </view>
  72. <!-- 上传附件 -->
  73. <view class="file_picker_container">
  74. <uni-card title="上传附件" :extra="`${fileList.length}/15`" spacing="0">
  75. <uni-file-picker ref="filePicker" v-model="fileList" :auto-upload="true" mode="list" limit="10"
  76. file-mediatype="all" @select="handleFileSelect" @progress="handleFileProgress"
  77. @success="handleFileSuccess" @fail="handleFileFail" @delete="handleFileDelete" />
  78. </uni-card>
  79. </view>
  80. <view class="submit_button_container">
  81. <uni-card spacing="0" padding="0">
  82. <button :disabled="!button_state" :loading="!button_state" type="primary" class="submit_button"
  83. @click="submitProcess">提交</button>
  84. </uni-card>
  85. </view>
  86. </view>
  87. <view style="height: 5px; margin-top: 10px;"></view>
  88. </template>
  89. <script setup lang="ts">
  90. import { onMounted, reactive, ref, computed } from 'vue'
  91. import { onLoad } from '@dcloudio/uni-app'
  92. import { useUserStore } from '@/store/user.js'
  93. import $modal from '@/plugins/modal.js'
  94. import $tab from '@/plugins/tab.js'
  95. import { convertToChineseCurrency } from '@/utils/ygoa.js'
  96. import { calCommonExp } from '@/utils/rpn.js'
  97. import { getProcessInfo, getProcessForm, submitProcessForm, uploadFile } from '@/api/work.js'
  98. const fieldTypeDict = {
  99. '0': 'text',
  100. '1': 'number'
  101. }
  102. let processInfo = reactive({
  103. modelName: '流程申请',
  104. reqOffice: 0,
  105. control: '',
  106. formId: '',
  107. modelId: '',
  108. tmodelId: '',
  109. isMoreIns: '',
  110. pathJudgeType: '',
  111. form: []
  112. })
  113. const userStore = useUserStore()
  114. const title = ref('')
  115. onLoad((options) => {
  116. const { modelName, modelId, control } = options
  117. processInfo.modelName = modelName
  118. processInfo.modelId = modelId
  119. processInfo.control = control
  120. title.value = userStore.user.name + '的' + processInfo.modelName
  121. // 设置导航栏标题
  122. uni.setNavigationBarTitle({
  123. title: title.value
  124. });
  125. })
  126. onMounted(() => {
  127. initProcessInfo().then(() => {
  128. initProcessForm()
  129. })
  130. })
  131. function initProcessInfo() {
  132. return new Promise<void>((resolve, reject) => {
  133. getProcessInfo(processInfo)
  134. .then(({ returnParams }) => {
  135. const { formId, tmodelId, isMoreIns, pathJudgeType, reqOffice } = returnParams.flow[0]
  136. processInfo.formId = formId
  137. processInfo.tmodelId = tmodelId
  138. processInfo.isMoreIns = isMoreIns
  139. processInfo.pathJudgeType = pathJudgeType
  140. processInfo.reqOffice = reqOffice
  141. resolve()
  142. })
  143. })
  144. }
  145. const formElements = ref([])
  146. const repeatingForm = ref({
  147. elementItem: [],
  148. elements: []
  149. })
  150. function initProcessForm() {
  151. getProcessForm(userStore.user, processInfo).then(({ returnParams }) => {
  152. formElements.value = returnParams.formElements
  153. repeatingForm.value = returnParams.repeatingForm
  154. getValidateRules()
  155. // 生成第一个重复表数据
  156. if (repeatingForm.value) {
  157. addRepeatingFormItem(0)
  158. }
  159. bindTimeRangeData()
  160. })
  161. }
  162. const timeRangeItems = ref([
  163. ['开始时间', '结束时间', '多少小时'],
  164. ['出发时间', '预计返回时间'],
  165. ['出差时间', '返回时间'],
  166. ['出门时间', '预计返回时间'],
  167. ['开始时间', '结束时间', '合计小时'],
  168. ])
  169. // 关联时间变量
  170. function bindTimeRangeData() {
  171. return new Promise<void>((resolve) => {
  172. timeRangeItems.value.forEach((range) => {
  173. const [startName, endName, bindName] = range;
  174. // 找到 startName 和 endName 的索引
  175. const startIndex = formElements.value.findIndex((item) => item.elementName === startName);
  176. const endIndex = formElements.value.findIndex((item) => item.elementName === endName);
  177. // 只有找到 startName 和 endName 后,才检查 bindName
  178. if (startIndex !== -1 && endIndex !== -1) {
  179. if (bindName) {
  180. const bindIndex = formElements.value.findIndex((item) => item.elementName === bindName);
  181. if (bindIndex !== -1) {
  182. // 所有匹配项都存在,保存索引
  183. formElements.value[startIndex].endElemIndex = endIndex;
  184. formElements.value[endIndex].startElemIndex = startIndex;
  185. formElements.value[bindIndex].bindTimeRange = {
  186. startIndex,
  187. endIndex
  188. };
  189. }
  190. } else {
  191. // 没有 bindName,仅保存 start 和 end 的索引
  192. formElements.value[startIndex].endElemIndex = endIndex;
  193. formElements.value[endIndex].startElemIndex = startIndex;
  194. }
  195. // TODO 加班开始时间默认当天下班时间 请假时间默认当天上班时间
  196. }
  197. });
  198. resolve(); // 返回一个 resolved 状态的 Promise
  199. });
  200. }
  201. // 计算时间差
  202. function calculateTimeDifference(item, table) {
  203. // 获取 开始时间 和 结束时间
  204. const { startIndex, endIndex } = item.bindTimeRange;
  205. const startTime = new Date(table[startIndex].defaultValue);
  206. const endTime = new Date(table[endIndex].defaultValue);
  207. // 检查时间是否合法
  208. if (isNaN(startTime.getTime()) || isNaN(endTime.getTime())) {
  209. return item.defaultValue = 0
  210. }
  211. // 计算时间差
  212. const timeDifferenceInMs = endTime - startTime;
  213. let timeDifferenceInHours = (timeDifferenceInMs / (1000 * 60 * 60)).toFixed(1);
  214. // let timeDifferenceInHours = (timeDifferenceInMs / (1000 * 60 * 60))
  215. // // 计算小数部分
  216. // const decimalPart = timeDifferenceInHours - Math.floor(timeDifferenceInHours)
  217. // if (decimalPart >= 0.5) {
  218. // // 如果小数部分大于等于 0.5,向上取整到 0.5 的倍数
  219. // timeDifferenceInHours = Math.floor(timeDifferenceInHours) + 0.5;
  220. // } else {
  221. // // 如果小数部分小于 0.5,向下取整到 0.5 的倍数
  222. // timeDifferenceInHours = Math.floor(timeDifferenceInHours);
  223. // }
  224. // 保存到 defaultValue
  225. return item.defaultValue = timeDifferenceInHours;
  226. }
  227. function setTimeRange(e) {
  228. // console.log('setTimeRange', e)
  229. }
  230. // 生成人民币大写
  231. function computedNumberToChineseCurrency(item, table) {
  232. const elem = table.find(elem => elem.elementName == item.BddzText.slice(3))
  233. return item.defaultValue = convertToChineseCurrency(elem.defaultValue)
  234. }
  235. // 下拉框
  236. function bindPickerChange(e, item) {
  237. const index = e.detail.value;
  238. item.defaultValue = item.typeDetail.enum[index].enumVname
  239. }
  240. function formatDict(dict) {
  241. return dict.map(({ enumVname }) => enumVname)
  242. }
  243. // 新增重复表表单
  244. function addRepeatingFormItem(index) {
  245. const table = repeatingForm.value.elementItem.map(({ tableField, bddzText }) => {
  246. const item = {
  247. name: tableField,
  248. defaultValue: '',
  249. bddzText
  250. }
  251. return item
  252. })
  253. repeatingForm.value.elements.splice(index + 1, 0, table)
  254. }
  255. // 删除重复表表单
  256. function delRepeatingFormItem(index) {
  257. $modal.confirm('', '确认删除该重复表数据')
  258. .then(() => {
  259. repeatingForm.value.elements.splice(index, 1)
  260. $repeatingForms.value.splice(index, 1)
  261. })
  262. .catch(() => { })
  263. }
  264. // 计算重复表关联变量表达式结果值
  265. function calculateRepeatingFormExpression(item, table) {
  266. // 提取表达式中的变量名
  267. const variablePattern = /my:[\u4e00-\u9fa5]+/g;
  268. let match;
  269. let expression = item.bddzText
  270. // 替换表达式中的变量
  271. while ((match = variablePattern.exec(item.bddzText)) !== null) {
  272. const variableName = match[0]; // 完整变量名
  273. // 找到 重复表 中对应的索引
  274. const index = repeatingForm.value.elementItem.findIndex(item => item.elementName === variableName);
  275. if (index !== -1) {
  276. const value = table[index]?.defaultValue || 0;
  277. expression = expression.replace(match[0], value);
  278. } else {
  279. // 未匹配到的变量替换为 0
  280. expression = expression.replace(match[0], 0);
  281. }
  282. }
  283. if (/[^0-9\+\-\*\/\(\)\.]/.test(expression)) {
  284. console.error('错误的表达式:', expression);
  285. return expression;
  286. }
  287. return item.defaultValue = calCommonExp(expression); // 返回填充后的表达式
  288. }
  289. const fileList = ref([]) // 文件列表
  290. const fileSeqs = ref([])
  291. async function handleFileSelect(files) { // 新增文件
  292. // console.log('handleFileSelect', files.tempFiles)
  293. files.tempFiles.forEach(file => {
  294. const data = {
  295. name: file.name,
  296. filePath: file.path,
  297. }
  298. uploadFile(data)
  299. .then(res => {
  300. file.seq = res.returnParams
  301. fileSeqs.value.push({ 'seq': res.returnParams, 'path': file.path })
  302. fileList.value.push(file)
  303. // console.log('handleFileSelect fileList: ',fileList);
  304. // file.seq = res.returnParams
  305. })
  306. .catch(err => {
  307. $modal.msgError('文件' + data.name + '上传失败,请删除重新上传')
  308. switch (err) {
  309. case -201:
  310. console.log('文件上传失败 未找到该文件');
  311. break;
  312. case -20201:
  313. console.log('文件上传失败 返回值不是JSON字符串');
  314. break;
  315. }
  316. })
  317. })
  318. // console.log('UploadFiles', files.tempFiles);
  319. }
  320. function handleFileProgress(file, progress) {
  321. // console.log('handleFileProgress', file, progress);
  322. }
  323. function handleFileSuccess(file, res) {
  324. // console.log('handleFileSuccess', file, res);
  325. }
  326. function handleFileFail(file, err) {
  327. // console.log('handleFileFail', file, err);
  328. }
  329. function handleFileDelete(file) { // 移除文件
  330. // console.log('handleDelete', file)
  331. fileSeqs.value.splice(fileSeqs.value.findIndex(({ path }) => path == file.tempFilePath))
  332. }
  333. //表单校验
  334. const $mainForm = ref(null)
  335. const mainFormValue = ref({})
  336. const $repeatingForms = ref([])
  337. const repeatingFormsValue = ref([])
  338. const formatTypeDict = {
  339. '0': 'string',
  340. '1': 'number'
  341. }
  342. // 校验重复表
  343. function validateRepeatingForm() {
  344. // 设置重复表校验数据
  345. repeatingFormsValue.value = repeatingForm.value.elements.map((item, index) => {
  346. return computed(() => {
  347. const obj = {};
  348. item.forEach(({ name, defaultValue }) => {
  349. obj[name] = defaultValue;
  350. });
  351. return obj;
  352. }).value
  353. })
  354. // console.log('$repeatingForms: ',$repeatingForms.value);
  355. // console.log('repeatingFormsValue: ',repeatingFormsValue.value);
  356. // 重复表数据校验
  357. // BUG validate()校验无效
  358. $repeatingForms.value.forEach((form) => {
  359. // console.log('form: ',form);
  360. form.validate().then(res => {
  361. console.log('验证成功:', res);
  362. }).catch(err => {
  363. console.log('验证失败:', err);
  364. });
  365. })
  366. }
  367. function validateRepeatingForm2() {
  368. // 设置重复表校验数据
  369. repeatingFormsValue.value = repeatingForm.value.elements.map((item, index) => {
  370. return computed(() => {
  371. const obj = {};
  372. item.forEach(({ name, defaultValue }) => {
  373. obj[name] = defaultValue;
  374. });
  375. return obj;
  376. }).value
  377. })
  378. let flag = false
  379. repeatingFormsValue.value.forEach((item, index) => {
  380. for (const elem in item) {
  381. if (item[elem] == '') {
  382. $modal.msgError(`重复表 ${index + 1} 数据填写错误`)
  383. flag = false
  384. return
  385. }
  386. }
  387. flag = true
  388. })
  389. return flag
  390. }
  391. // 设置表单校验规则
  392. const $mainFormRules = ref({})
  393. const $repFormRules = ref({})
  394. function getValidateRules() {
  395. $repFormRules.value = computed(() => {
  396. const obj = {};
  397. repeatingForm.value.elementItem.forEach(elem => {
  398. obj[elem.tableField] = {
  399. rules: [
  400. {
  401. required: true,
  402. },
  403. {
  404. formatTypeDict: formatTypeDict[elem.fieldType.value] || 'string',
  405. }
  406. ],
  407. label: elem.elementName.slice(3)
  408. };
  409. });
  410. return obj;
  411. }).value
  412. $mainFormRules.value = computed(() => {
  413. const obj = {};
  414. formElements.value.forEach(elem => {
  415. if (!('0' != elem.canEdit && '8' != elem.type)) return
  416. obj[elem.elementId] = {
  417. rules: [
  418. {
  419. required: '1' == elem.noNull,
  420. },
  421. {
  422. format: formatTypeDict[elem.fieldType] || 'string',
  423. }
  424. ],
  425. label: elem.elementName
  426. };
  427. });
  428. return obj;
  429. }).value
  430. }
  431. const button_state = ref(true)
  432. function submitProcess() { // 提交表单
  433. // 禁用提交按钮
  434. button_state.value = false
  435. // validateMainForm()
  436. // 设置主表校验数据
  437. mainFormValue.value = computed(() => {
  438. const obj = {};
  439. formElements.value.forEach(elem => {
  440. if (!('0' != elem.canEdit && '8' != elem.type)) return
  441. obj[elem.elementId] = elem.defaultValue;
  442. });
  443. return obj;
  444. }).value
  445. // 主表数据校验
  446. $mainForm.value.validate().then(res => {
  447. // 重复表数据校验
  448. // validateRepeatingForm()
  449. if (!validateRepeatingForm2()) {
  450. button_state.value = true
  451. return
  452. }
  453. // 保存表单数据
  454. processInfo.form = formElements.value.map(({ tableField, defaultValue }) => {
  455. return { name: tableField, value: defaultValue }
  456. })
  457. repeatingForm.value.elements.forEach((item, index) => {
  458. const newItem = item.map(({ name, defaultValue }) => {
  459. return {
  460. name: name + '_' + (index + 1),
  461. value: defaultValue
  462. }
  463. })
  464. processInfo.form.push(...newItem)
  465. })
  466. // 保存附件ID
  467. const seqs = fileSeqs.value.map(({ seq }) => seq)
  468. if (processInfo.reqOffice == 1 && seqs.length == 0) {
  469. button_state.value = true
  470. $modal.msgError('请上传附件')
  471. return
  472. }
  473. submitProcessForm(userStore.user, processInfo, seqs).then(res => {
  474. if (res.returnMsg.includes('提交失败')) {
  475. // 启用提交按钮
  476. button_state.value = true
  477. $modal.msgError(res.returnMsg)
  478. } else {
  479. $modal.msgSuccess(res.returnMsg)
  480. // 通知列表刷新数据
  481. uni.$emit('ReloadProcessData');
  482. setTimeout(() => {
  483. // 返回上一页
  484. $tab.navigateBack();
  485. }, 1000)
  486. }
  487. })
  488. }).catch(err => {
  489. button_state.value = true
  490. $modal.msgError('表单填写错误')
  491. });
  492. }
  493. </script>
  494. <style lang="scss" scoped>
  495. .process_container {
  496. position: relative;
  497. ::v-deep .uni-forms {
  498. .uni-forms-item__label {
  499. font-size: calc(1rem + 0px) !important;
  500. line-height: calc(1rem + 0px) !important;
  501. font-weight: 600;
  502. }
  503. .uni-forms-item__content {
  504. .uni-easyinput__content-textarea {
  505. font-size: calc(14px + .5*(1rem - 16px)) !important;
  506. }
  507. .uni-easyinput__content-input {
  508. font-size: calc(14px + .5*(1rem - 16px)) !important;
  509. color: #333;
  510. }
  511. .uni-date {
  512. .uni-icons {
  513. font-size: calc(22px + .5*(1rem - 16px)) !important;
  514. }
  515. .uni-date__x-input {
  516. font-size: calc(14px + .5*(1rem - 16px)) !important;
  517. }
  518. }
  519. }
  520. }
  521. ::v-deep button {
  522. font-size: calc(18px + .5*(1rem - 16px));
  523. }
  524. .main_container {
  525. min-height: 30vh;
  526. }
  527. .picker_container {
  528. border: 1px solid #e5e5e5;
  529. background-color: #fff;
  530. border-radius: 4px;
  531. // box-sizing: border-box;
  532. .input_text {
  533. color: #333;
  534. font-size: calc(14px + .5*(1rem - 16px));
  535. line-height: 35px;
  536. height: 35px;
  537. padding: 0 0 0 10px;
  538. }
  539. }
  540. .repeating_table {
  541. ::v-deep .uni-forms-item--border {
  542. padding: 5px 0 !important;
  543. }
  544. .repeating_table_button_container {
  545. margin-top: 5px;
  546. button {
  547. height: 36px;
  548. line-height: 36px;
  549. color: #fff;
  550. }
  551. .add {
  552. background-color: #1ca035;
  553. }
  554. .del {
  555. background-color: #e64340;
  556. }
  557. }
  558. }
  559. .file_picker_container {
  560. ::v-deep .uni-card {
  561. .uni-card__header-content-title {
  562. font-size: calc(15px + .5*(1rem - 16px));
  563. }
  564. .uni-card__header-extra-text {
  565. font-size: calc(15px + .5*(1rem - 16px));
  566. }
  567. }
  568. }
  569. .is-disabled {
  570. color: #666 !important;
  571. }
  572. .submit_button_container {
  573. position: sticky;
  574. z-index: 10;
  575. width: 100%;
  576. bottom: 10px;
  577. .submit_button {
  578. background-color: #007aff !important;
  579. color: #fff !important;
  580. }
  581. .submit_button::after {
  582. border: 1px solid rgba(0, 0, 0, .2);
  583. border-radius: 10px;
  584. box-sizing: border-box;
  585. content: " ";
  586. height: 200%;
  587. left: 0;
  588. position: absolute;
  589. top: 0;
  590. -webkit-transform: scale(.5);
  591. transform: scale(.5);
  592. -webkit-transform-origin: 0 0;
  593. transform-origin: 0 0;
  594. width: 200%;
  595. border-top-width: 1px;
  596. border-right-width: 1px;
  597. border-bottom-width: 1px;
  598. border-left-width: 1px;
  599. border-top-style: solid;
  600. border-right-style: solid;
  601. border-bottom-style: solid;
  602. border-left-style: solid;
  603. border-top-color: rgba(0, 0, 0, 0.2);
  604. border-right-color: rgba(0, 0, 0, 0.2);
  605. border-bottom-color: rgba(0, 0, 0, 0.2);
  606. border-left-color: rgba(0, 0, 0, 0.2);
  607. border-image-source: initial;
  608. border-image-slice: initial;
  609. border-image-width: initial;
  610. border-image-outset: initial;
  611. border-image-repeat: initial;
  612. border-top-left-radius: 10px;
  613. border-top-right-radius: 10px;
  614. border-bottom-right-radius: 10px;
  615. border-bottom-left-radius: 10px;
  616. }
  617. }
  618. }
  619. </style>