VisitSummaryAdd.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360
  1. <template>
  2. <div class="bgcolor VisitSummaryAdd">
  3. <div class="navBarTOP">
  4. <van-nav-bar class="navBar" left-arrow :title="title" @click-left="onClickLeft" />
  5. </div>
  6. <div class="lineGrey"></div>
  7. <div class="lineGrey"></div>
  8. <div class="lineGrey"></div>
  9. <div class="lineGrey"></div>
  10. <div class="lineGrey"></div>
  11. <div class="lineGrey" style="height: 6px"></div>
  12. <div class="container" style="width: 94%; margin: 0px auto; border-radius: 6px">
  13. <!-- 活动扫码 -->
  14. <ActivityQRCode
  15. v-if="$route.query.qrCodeCheck == '1'"
  16. @onSubmit="onStorage"
  17. ref="ActivityQRCode"></ActivityQRCode>
  18. <van-form ref="tabstoreVal">
  19. <div v-for="(item, index) in collectionItemList" :key="index">
  20. <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
  21. <van-cell>
  22. <template #title>
  23. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  24. {{ 1 + index + '.' }}
  25. {{ item.customName }}
  26. </template>
  27. </van-cell>
  28. <van-field
  29. v-model="item.answerValue"
  30. :placeholder="item.remark"
  31. type="number"
  32. @input="numberFn(item, index)"></van-field>
  33. <!-- <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
  34. {{ item.remark }}
  35. </p> -->
  36. </div>
  37. <div v-if="item.answerType == 'rq'" class="formLabel z-cell">
  38. <van-cell>
  39. <template #title>
  40. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  41. {{ 1 + index + '.' }}
  42. {{ item.customName }}
  43. </template>
  44. </van-cell>
  45. <van-field
  46. v-model="item.answerValue"
  47. clickable
  48. name="calendar"
  49. placeholder="点击选择日期"
  50. readonly
  51. @click="showCalendarClick(index)" />
  52. <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
  53. {{ item.remark }}
  54. </p>
  55. </div>
  56. <div v-if="item.answerType == 'zp'" class="formLabel z-cell">
  57. <van-cell>
  58. <template #title>
  59. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  60. {{ 1 + index + '.' }}
  61. {{ item.customName }}
  62. </template>
  63. </van-cell>
  64. <van-row gutter="10" style="margin-bottom: 10px">
  65. <p style="margin-top: 0">
  66. <span style="font-size: 12px; color: #888">{{ item.remark }}</span>
  67. </p>
  68. <delete-upload-img :imgs="item.fileInfoList" :isDelete="false"></delete-upload-img>
  69. <upload-img
  70. :uploadid="uploadid2"
  71. @newimgarr="newimgarr1"
  72. imgText="上传照片"
  73. :indexImg="index"
  74. :customId="item.customId"
  75. :summaryId="item.summaryId"
  76. :item="item"
  77. @click="imgClick(item, index)"></upload-img>
  78. </van-row>
  79. </div>
  80. <div v-if="item.answerType == 'wb'" class="formLabel z-cell">
  81. <van-cell>
  82. <template #title>
  83. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  84. {{ 1 + index + '.' }}
  85. {{ item.customName }}
  86. </template>
  87. </van-cell>
  88. <van-field
  89. v-model="item.answerValue"
  90. :formatter="formatter"
  91. autosize
  92. type="textarea"
  93. :placeholder="item.remark"></van-field>
  94. <!-- <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
  95. {{ item.remark }}
  96. </p> -->
  97. </div>
  98. <div v-if="item.answerType == 'gs'" class="formLabel z-cell" @click="regionClick(index)">
  99. <van-cell>
  100. <template #title>
  101. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  102. {{ 1 + index + '.' }}
  103. {{ item.customName }}
  104. </template>
  105. </van-cell>
  106. <van-field
  107. readonly
  108. v-model="item.answerName"
  109. :formatter="formatter"
  110. :placeholder="item.customName"></van-field>
  111. <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
  112. {{ item.remark }}
  113. </p>
  114. </div>
  115. <div
  116. v-if="item.answerType == 'dq'"
  117. class="formLabel z-cell"
  118. @click="SalesRegionClick(index)">
  119. <van-cell>
  120. <template #title>
  121. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  122. {{ 1 + index + '.' }}
  123. {{ item.customName }}
  124. </template>
  125. </van-cell>
  126. <van-field
  127. readonly
  128. v-model="item.answerName"
  129. :formatter="formatter"
  130. :placeholder="item.customName"></van-field>
  131. <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
  132. {{ item.remark }}
  133. </p>
  134. </div>
  135. <div
  136. v-if="item.answerType == 'xsb'"
  137. class="formLabel z-cell"
  138. @click="SalesDepartmentClick(index)">
  139. <van-cell>
  140. <template #title>
  141. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  142. {{ 1 + index + '.' }}
  143. {{ item.customName }}
  144. </template>
  145. </van-cell>
  146. <van-field
  147. readonly
  148. v-model="item.answerName"
  149. :formatter="formatter"
  150. :placeholder="item.customName"></van-field>
  151. <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
  152. {{ item.remark }}
  153. </p>
  154. </div>
  155. <div v-if="item.answerType == 'duox'" class="formLabel z-cell">
  156. <van-cell>
  157. <template #title>
  158. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  159. {{ 1 + index + '.' }}
  160. {{ item.customName }}
  161. </template>
  162. </van-cell>
  163. <z-checkbox
  164. :answerType="item.answerType"
  165. :checkboxval="item.answerValue"
  166. :collectionType="item.customOptionList"
  167. :textc="item.customId"
  168. :zCheckboxcolumns="item.customOptionList"
  169. @zSelectVal="zSelectVal"></z-checkbox>
  170. </div>
  171. <div v-if="item.answerType == 'dx'" class="formLabel z-cell">
  172. <van-cell>
  173. <template #title>
  174. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  175. {{ 1 + index + '.' }}
  176. {{ item.customName }}
  177. </template>
  178. </van-cell>
  179. <z-radio
  180. :answerType="item.answerType"
  181. :collectionType="item.collectionType"
  182. :radio="item.answerValue"
  183. :textc="item.customId"
  184. :zRadiocolumns="item.customOptionList"
  185. @zSelectVal="zSelectVal"></z-radio>
  186. </div>
  187. <div v-if="item.answerType == 'jxs' || item.answerType == 'md'" class="formLabel z-cell">
  188. <van-cell>
  189. <template #title>
  190. <span v-if="item.isMust == 0" class="van-f-red">*</span>
  191. {{ 1 + index + '.' }}
  192. {{ item.customName }}
  193. </template>
  194. </van-cell>
  195. <div class="jxsBox">
  196. <div class="jxsContent" v-if="item.answerType == 'jxs'">
  197. <div class="item" v-for="(val, index) in item.chainList" :key="index">
  198. <el-popover
  199. placement="bottom"
  200. trigger="click"
  201. :content="val.chainName + '(' + val.chainCode + ')'">
  202. <template slot="reference">
  203. <div class="selectItem">{{ val.chainName }} &nbsp; ({{ val.chainCode }})</div>
  204. <van-icon name="clear" size="16" @click="closeJXSorMD(item, index)" />
  205. </template>
  206. </el-popover>
  207. </div>
  208. </div>
  209. <div class="jxsContent" v-if="item.answerType == 'md'">
  210. <div class="item" v-for="(val, index) in item.storeList" :key="index">
  211. <el-popover
  212. placement="bottom"
  213. trigger="click"
  214. :content="val.storeName + '(' + val.storeCode + ')'">
  215. <template slot="reference">
  216. <div class="selectItem">{{ val.storeName }} &nbsp; ({{ val.storeCode }})</div>
  217. <van-icon name="clear" size="16" @click="closeJXSorMD(item, index)" />
  218. </template>
  219. </el-popover>
  220. </div>
  221. </div>
  222. <div class="addJXS"><van-icon name="add-o" size="24" @click="addJXSorMD(item)" /></div>
  223. <div class="tips">{{ item.remark }}</div>
  224. </div>
  225. </div>
  226. <br />
  227. </div>
  228. </van-form>
  229. </div>
  230. <br />
  231. <div class="tc" style="padding: 0 16px">
  232. <van-button class="submitBtn" block type="primary" @click="onStorage(null)">
  233. 暂存
  234. </van-button>
  235. <van-button class="submitBtn" block type="info" color="#0057ba" @click="onSubmit">
  236. 提交汇报
  237. </van-button>
  238. </div>
  239. <br />
  240. <van-calendar
  241. v-model="showCalendar"
  242. @confirm="onConfirm"
  243. color="#0057ba"
  244. :min-date="minDate"
  245. :max-date="maxDate"
  246. :show-confirm="false" />
  247. <van-popup v-model="RegionShow" capture position="bottom">
  248. <van-picker
  249. :columns="companyList"
  250. show-toolbar
  251. value-key="deptName"
  252. @cancel="RegionShow = false"
  253. @confirm="onregionConfirm" />
  254. </van-popup>
  255. <van-popup v-model="SalesRegionShow" capture position="bottom">
  256. <van-picker
  257. :columns="regionList"
  258. show-toolbar
  259. value-key="deptName"
  260. @cancel="SalesRegionShow = false"
  261. @confirm="onSalesRegionConfirm" />
  262. </van-popup>
  263. <van-popup v-model="SalesDepartmentShow" capture position="bottom">
  264. <van-picker
  265. :columns="deptList"
  266. show-toolbar
  267. value-key="deptName"
  268. @cancel="SalesDepartmentShow = false"
  269. @confirm="onSalesDepartmentConfirm" />
  270. </van-popup>
  271. <van-popup v-model="StartTimeShow" capture position="bottom">
  272. <van-datetime-picker
  273. v-model="strtcurrentDate"
  274. :max-date="strtmaxDate"
  275. :min-date="strtminDate"
  276. title="选择查找开始时间"
  277. type="date"
  278. @cancel="StartTimeShow = false"
  279. @confirm="onStartTimeConfirm" />
  280. </van-popup>
  281. <van-popup v-model="EndTimeShow" capture position="bottom">
  282. <van-datetime-picker
  283. v-model="endcurrentDate"
  284. :max-date="endmaxDate"
  285. :min-date="endminDate"
  286. title="选择查找结束时间"
  287. type="date"
  288. @cancel="EndTimeShow = false"
  289. @confirm="onEndTimeConfirm" />
  290. </van-popup>
  291. <!-- 经销商 -->
  292. <van-popup v-model="moreTypeShow" position="bottom">
  293. <van-row style="background-color: #f5f5f5">
  294. <van-col span="20">
  295. <van-field
  296. left-icon="search"
  297. style="margin-top: 2px; border-radius: 6px; overflow: hidden"
  298. v-model="agentValue"
  299. label=""
  300. placeholder="请输入关键词"
  301. clearable />
  302. </van-col>
  303. <van-col
  304. span="4"
  305. style="text-align: center; line-height: 48px"
  306. @click="getChainsList(agentValue)">
  307. <div style="background-color: #0057ba; color: #fff">搜索</div>
  308. </van-col>
  309. </van-row>
  310. <div class="tips">
  311. <div><van-icon name="warning-o" />默认显示前100条,请输入关键词查询</div>
  312. </div>
  313. <van-picker
  314. show-toolbar
  315. :columns="chainsData"
  316. value-key="chainName"
  317. @confirm="onConfirmChainsList"
  318. @cancel="moreTypeShow = false" />
  319. </van-popup>
  320. <!-- 门店 -->
  321. <van-popup v-model="storeTypeShow" position="bottom">
  322. <van-row style="background-color: #f5f5f5">
  323. <van-col span="20">
  324. <van-field
  325. left-icon="search"
  326. style="margin-top: 2px; border-radius: 6px; overflow: hidden"
  327. v-model="agentValue"
  328. label=""
  329. placeholder="请输入关键词"
  330. clearable />
  331. </van-col>
  332. <van-col
  333. span="4"
  334. style="text-align: center; line-height: 48px"
  335. @click="getStoresList(agentValue)">
  336. <div style="background-color: #0057ba; color: #fff">搜索</div>
  337. </van-col>
  338. </van-row>
  339. <div class="tips">
  340. <div><van-icon name="warning-o" />默认显示前100条,请输入关键词查询</div>
  341. </div>
  342. <van-picker
  343. show-toolbar
  344. :columns="storesData"
  345. value-key="storeName"
  346. @confirm="onConfirmStoresList"
  347. @cancel="storeTypeShow = false" />
  348. </van-popup>
  349. </div>
  350. </template>
  351. <script>
  352. import timeico from '@/assets/Icon/datatims.png';
  353. import {
  354. insertCustomAnswer,
  355. getSummaryDetailById,
  356. getSummaryMobileDeptInfo,
  357. getDeptsByUser,
  358. chainsList,
  359. storesList,
  360. temporarilyCustomAnswer,
  361. } from '@/api/index';
  362. import zRadio from '@/components/zRadio2';
  363. import zCheckbox from '@/components/zCheckbox2';
  364. // import uploadImg from "@/components/uo";
  365. import uploadImg from '@/components/uploadVTask';
  366. import deleteUploadImg from '@/components/deleteUploadImg2';
  367. import ActivityQRCode from './ActivityQRCode';
  368. export default {
  369. name: 'MyHistoricalWeekly',
  370. components: { zRadio, zCheckbox, uploadImg, deleteUploadImg, ActivityQRCode },
  371. data() {
  372. return {
  373. timeico: timeico,
  374. RegionShow: false,
  375. SalesRegionShow: false,
  376. SalesDepartmentShow: false,
  377. StaffShow: false,
  378. StartTimeShow: false,
  379. dateIndex: '',
  380. EndTimeShow: false,
  381. uploadid2: 'uploadid2',
  382. PhotoTypeList: [{ text: '009', value: '09' }],
  383. strtminDate: new Date(2022, 0, 1),
  384. endminDate: new Date(2022, 0, 1),
  385. minDate: new Date(2020, 0, 1),
  386. maxDate: new Date(2090, 0, 31),
  387. strtmaxDate: new Date(),
  388. endmaxDate: new Date(),
  389. strtcurrentDate: new Date(),
  390. endcurrentDate: new Date(),
  391. companyName: '全部公司',
  392. deptName: '全部销售部',
  393. regionName: '全部大区',
  394. userName: '全部',
  395. companyCode: '',
  396. deptCode: '',
  397. regionCode: '',
  398. userCode: '',
  399. companyList: [],
  400. title: '',
  401. deptList: [],
  402. regionList: [],
  403. userList: [],
  404. deptForm: { type: '', parentId: '' },
  405. list: [],
  406. loading: false,
  407. finished: true,
  408. showCalendar: false,
  409. formData: {
  410. type: '2', // 汇报类型或入口 1-下属业务员日报 2-下属销售部主管周报 3-下属大区主管半月报
  411. companyId: '', // 公司id,必传 Long类型
  412. regionId: '', // 大区id,必传 Long类型
  413. deptId: '', // 部门id,如果为周报或日报为必传 Long类型
  414. userId: '', // 业务员id,如果为日报为必传 Long类型
  415. startTime: '', // 开始时间,必传 格式:yyyy-MM-dd String类型
  416. endTime: '', // 结束时间,必传 格式:yyyy-MM-dd String类型
  417. pageNum: 1, // 当前页码 int类型
  418. pageSize: 10, // 当前每页条数 int类型
  419. },
  420. tableList: [],
  421. collectionItemList: [],
  422. collectionAnswerlisd: [],
  423. flagclick: true,
  424. index: '',
  425. activaFlag: true,
  426. moreTypeShow: false,
  427. storeTypeShow: false,
  428. storeType: null,
  429. agentValue: '',
  430. chainsData: [],
  431. storesData: [],
  432. chainName: '',
  433. chainCode: '',
  434. jxsList: [],
  435. userSummaryId: null,
  436. qrUuid: null,
  437. };
  438. },
  439. activated() {
  440. this.userSummaryId = null;
  441. this.qrUuid = null;
  442. },
  443. created() {
  444. this.activaFlag = true;
  445. // this.formData.startTime = this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'),2)
  446. this.formData.startTime = this.getThreeDaysAgo();
  447. // this.strtcurrentDate=new Date(this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'),2))
  448. this.strtcurrentDate = new Date(this.getThreeDaysAgo());
  449. this.formData.endTime = this.parseTime(new Date(), '{y}-{m}-{d}') + '';
  450. this.endminDate = new Date(this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'), 2));
  451. this.powerGrade = localStorage.getItem('powerGrade');
  452. this.title = this.$route.query.title;
  453. this.getReportInfo();
  454. this.regionCode = '';
  455. },
  456. watch: {
  457. $route(to, from) {
  458. if (to.path == '/VisitSummaryAdd') {
  459. this.title = this.$route.query.title;
  460. this.getReportInfo();
  461. this.regionCode = '';
  462. }
  463. },
  464. },
  465. methods: {
  466. showCalendarClick(val) {
  467. this.dateIndex = val;
  468. this.showCalendar = true;
  469. },
  470. formatDate(date) {
  471. var Month = date.getMonth() + 1;
  472. var Day = date.getDate();
  473. if (Month < 10) {
  474. Month = '0' + Month;
  475. }
  476. if (Day < 10) {
  477. Day = '0' + Day;
  478. }
  479. return `${date.getFullYear()}-${Month}-${Day}`;
  480. },
  481. onConfirm(date) {
  482. this.showCalendar = false;
  483. this.collectionItemList[this.dateIndex].answerValue = this.formatDate(date);
  484. },
  485. formatter(value) {
  486. return value.replace(
  487. /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
  488. ''
  489. );
  490. },
  491. numberFn(val, index) {
  492. if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.collectionItemList[index].answerValue)) {
  493. this.collectionItemList[index].answerValue = this.collectionItemList[
  494. index
  495. ].answerValue.replace(
  496. /\.\d{2,}$/,
  497. this.collectionItemList[index].answerValue.substr(
  498. this.collectionItemList[index].answerValue.indexOf('.'),
  499. 3
  500. )
  501. );
  502. }
  503. },
  504. zSelectVal(value) {
  505. var collectionAnswerlisd = this.collectionAnswerlisd;
  506. if (collectionAnswerlisd.length > 0) {
  507. var num = 0;
  508. for (var a = 0; a < collectionAnswerlisd.length; a++) {
  509. if (collectionAnswerlisd[a].id == value.id) {
  510. collectionAnswerlisd[a] = value;
  511. num = 0;
  512. } else {
  513. num = 1;
  514. }
  515. }
  516. if (num > 0) {
  517. collectionAnswerlisd.push(value);
  518. }
  519. } else {
  520. collectionAnswerlisd.push(value);
  521. }
  522. this.collectionAnswerlisd = collectionAnswerlisd;
  523. },
  524. imgClick(val, index) {
  525. this.collectionId = val.collectionId + '';
  526. this.indeximg = index;
  527. this.show = true;
  528. },
  529. newimgarr1() {
  530. this.$forceUpdate();
  531. // if (
  532. // this.collectionItemList[val.index].fileInfoList == null ||
  533. // this.collectionItemList[val.index].fileInfoList == undefined
  534. // ) {
  535. // this.collectionItemList[val.index].fileInfoList = [];
  536. // this.collectionItemList[val.index].fileIdList = [];
  537. // }
  538. // this.collectionItemList[val.index].fileInfoList.push(val);
  539. // this.collectionItemList[val.index].fileIdList.push(val.id);
  540. },
  541. dateFn(val) {
  542. return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);
  543. },
  544. onLoad() {},
  545. // 暂存 不校验答案是否必填
  546. onStorage(callback) {
  547. let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
  548. this.setParams(() => {
  549. temporarilyCustomAnswer({
  550. userSummaryId: this.userSummaryId, // Long 用户总结id,如果为新增则不填,编辑则必填
  551. summaryId: this.$route.query.summaryId, //Long 主管任务id
  552. customItemList: this.collectionItemList, //List<Object> 答案列表
  553. ...ActivityQRCodeData, //任务名称、活动日期、签到时间
  554. getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
  555. qrUuid: this.qrUuid || null,
  556. })
  557. .then((res) => {
  558. if (res.code == 200) {
  559. if (callback) {
  560. this.userSummaryId = res.data.userSummaryId ? res.data.userSummaryId : null;
  561. this.qrUuid = res.data.qrUuid ? res.data.qrUuid : null;
  562. // 回传二维码
  563. callback(res);
  564. } else {
  565. this.$router.go(-1);
  566. }
  567. } else {
  568. this.$toast(res.msg);
  569. }
  570. })
  571. .catch((err) => {
  572. this.$toast(err.msg);
  573. });
  574. });
  575. },
  576. onSubmit() {
  577. if (this.$route.query.qrCodeCheck == '1') {
  578. // 执行 ActivityQRCode from表单验证触发
  579. this.$refs.ActivityQRCode.$refs.tabstoreVal
  580. .validate()
  581. .then(() => {
  582. // 验证通过
  583. let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
  584. this.onSubmitFun(ActivityQRCodeData);
  585. })
  586. .catch((errors) => {
  587. //验证失败
  588. window.scrollTo(0, 0);
  589. return;
  590. });
  591. } else {
  592. this.onSubmitFun();
  593. }
  594. },
  595. onSubmitFun(ActivityQRCodeData = {}) {
  596. this.setParams(() => {
  597. if (this.flagclick) {
  598. this.flagclick = false;
  599. this.timer = null;
  600. this.timer = setTimeout(() => {
  601. this.flagclick = true;
  602. }, 2000);
  603. insertCustomAnswer({
  604. userSummaryId: this.userSummaryId, // Long 用户总结id,如果为新增则不填,编辑则必填
  605. summaryId: this.$route.query.summaryId, //Long 主管任务id
  606. customItemList: this.collectionItemList, //List<Object> 答案列表
  607. ...ActivityQRCodeData,
  608. qrUuid: this.qrUuid || null,
  609. })
  610. .then((res) => {
  611. if (res.code == 200) {
  612. this.$router.go(-1);
  613. } else {
  614. this.$toast(res.msg);
  615. }
  616. })
  617. .catch((err) => {
  618. this.$toast(err.msg);
  619. });
  620. }
  621. });
  622. },
  623. setParams(callback) {
  624. for (var c = 0; c < this.collectionAnswerlisd.length; c++) {
  625. for (var b = 0; b < this.collectionItemList.length; b++) {
  626. if (this.collectionAnswerlisd[c].id == this.collectionItemList[b].customId) {
  627. this.collectionItemList[b].customOptionList = this.collectionAnswerlisd[c].value;
  628. }
  629. }
  630. }
  631. // // 照片
  632. let zpDataList = this.collectionItemList.find((item) => item.answerType == 'zp');
  633. if (zpDataList && zpDataList.fileInfoList) {
  634. let fileIdList = [];
  635. zpDataList.fileInfoList.forEach((item) => {
  636. fileIdList.push(item.id);
  637. });
  638. zpDataList.fileIdList = fileIdList;
  639. }
  640. // 经销商
  641. // let JXSSataList = this.collectionItemList.find((item) => item.answerType == 'jxs');
  642. // if (this.jxsList.length) {
  643. // let fileIdList = [];
  644. // this.jxsList.forEach((item) => {
  645. // fileIdList.push({
  646. // chainCode: item.chainCode,
  647. // chainName: item.chainName,
  648. // });
  649. // });
  650. // JXSSataList.chainList = fileIdList;
  651. // }
  652. callback && callback();
  653. },
  654. getReportInfo() {
  655. let loading1 = this.$toast.loading({
  656. duration: 0,
  657. message: '加载中...',
  658. forbidClick: true,
  659. });
  660. this.collectionItemList = [];
  661. this.collectionAnswerlisd = [];
  662. getSummaryDetailById({ summaryId: this.$route.query.summaryId }).then((res) => {
  663. loading1.clear();
  664. if (res.code == 200) {
  665. var collectionItemLists = res.data;
  666. for (var q = 0; q < collectionItemLists.length; q++) {
  667. collectionItemLists[q].answerName = undefined;
  668. // 公司
  669. if (
  670. (collectionItemLists[q].answerType == 'gs' ||
  671. collectionItemLists[q].answerType == 'dq' ||
  672. collectionItemLists[q].answerType == 'xsb') &&
  673. this.activaFlag
  674. ) {
  675. this.activaFlag = false;
  676. if (collectionItemLists[q].answerType == 'xsb') {
  677. this.getDeptsBy(collectionItemLists[q].answerValue);
  678. this.getDeptInfo(
  679. 'dept',
  680. collectionItemLists[q].answerType,
  681. collectionItemLists[q].answerValue
  682. );
  683. } else {
  684. this.getDeptInfo(
  685. 'dept',
  686. collectionItemLists[q].answerType,
  687. collectionItemLists[q].answerValue
  688. );
  689. }
  690. }
  691. // 单选
  692. if (
  693. collectionItemLists[q].answerType == 'dx' &&
  694. collectionItemLists[q].showHistory == '1'
  695. ) {
  696. let findCustom = collectionItemLists[q].customOptionList.find((item) => item.checked);
  697. if (findCustom) {
  698. collectionItemLists[q].answerValue = findCustom.customOptionId + '';
  699. }
  700. }
  701. // 多选
  702. if (
  703. collectionItemLists[q].answerType == 'duox' &&
  704. collectionItemLists[q].showHistory == '1'
  705. ) {
  706. let findCustom = [];
  707. collectionItemLists[q].customOptionList.forEach((item) => {
  708. if (item.checked) {
  709. findCustom.push(item.customOptionId + '');
  710. }
  711. });
  712. if (findCustom) {
  713. collectionItemLists[q].answerValue = findCustom.join(',');
  714. }
  715. }
  716. // 照片
  717. if (collectionItemLists[q].answerType == 'zp' && collectionItemLists[q].fileInfoList) {
  718. let fileIdList = [];
  719. collectionItemLists[q].fileInfoList.forEach((item) => {
  720. fileIdList.push(item.id);
  721. });
  722. collectionItemLists[q].fileIdList = fileIdList;
  723. }
  724. }
  725. this.collectionItemList = collectionItemLists;
  726. }
  727. });
  728. },
  729. getThreeDaysAgo() {
  730. let myDate = new Date();
  731. let lw = new Date(myDate - 1000 * 60 * 60 * 24 * 14); //最后一个数字30可改,30天的意思
  732. let lastY = lw.getFullYear();
  733. let lastM = lw.getMonth() + 1;
  734. let lastD = lw.getDate();
  735. let startData =
  736. lastY + '-' + (lastM < 10 ? '0' + lastM : lastM) + '-' + (lastD < 10 ? '0' + lastD : lastD); //三十天之前日期
  737. return startData;
  738. },
  739. GetPreMonthDay(date, monthNum, type) {
  740. var dateArr = date.split('-');
  741. var year = dateArr[0]; //获取当前日期的年份
  742. var month = dateArr[1]; //获取当前日期的月份
  743. var day = dateArr[2]; //获取当前日期的日
  744. var days = new Date(year, month, 0);
  745. days = days.getDate(); //获取当前日期中月的天数
  746. var year2 = year;
  747. var month2 = parseInt(month) - monthNum;
  748. if (month2 <= 0) {
  749. var absM = Math.abs(month2);
  750. year2 = parseInt(year2) - Math.ceil(absM / 12 == 0 ? 1 : parseInt(absM) / 12);
  751. month2 = 12 - (absM % 12);
  752. }
  753. var day2 = day;
  754. var days2 = new Date(year2, month2, 0);
  755. days2 = days2.getDate();
  756. if (day2 > days2) {
  757. day2 = days2;
  758. }
  759. if (month2 < 10) {
  760. month2 = '0' + month2;
  761. }
  762. var t2 = '';
  763. if (monthNum > 0) {
  764. t2 = year2 + '-' + month2 + '-01';
  765. } else {
  766. if (type == 'end') {
  767. var Months = new Date().getMonth() + 1;
  768. var days111 = new Date().getDate();
  769. if (Months < 10) {
  770. Months = '0' + Months;
  771. }
  772. if (days111 < 10) {
  773. days111 = '0' + days111;
  774. }
  775. if (parseInt(month2) >= new Date().getMonth() + 1) {
  776. t2 = year2 + '-' + Months + '-' + days111;
  777. } else {
  778. var daysd = this.getMonthDays(year2, month2);
  779. t2 = year2 + '-' + month2 + '-' + daysd;
  780. }
  781. } else {
  782. t2 = year2 + '-' + month2 + '-' + day2;
  783. }
  784. }
  785. return t2;
  786. },
  787. getMonthDays(year, month) {
  788. var stratDate = new Date(year, month - 1, 1),
  789. endData = new Date(year, month, 1);
  790. var days = (endData - stratDate) / (1000 * 60 * 60 * 24);
  791. return days;
  792. },
  793. getDeptInfo(type, grade, answerValue) {
  794. this.deptForm.type = type;
  795. if (grade == 'dq') {
  796. this.deptForm.parentId = this.companyCode;
  797. } else if (grade == 'xsb') {
  798. this.deptForm.parentId = this.regionCode;
  799. } else {
  800. this.deptForm.type = '';
  801. this.deptForm.parentId = '';
  802. }
  803. getSummaryMobileDeptInfo(this.deptForm).then((res) => {
  804. if (grade == 'dq') {
  805. if (res.data.region != null) {
  806. this.regionList = res.data.region;
  807. // for (var k = 0; k < this.collectionItemList.length; k++) {
  808. // if (this.collectionItemList[k].answerType == 'dq') {
  809. // this.collectionItemList[k].answerName = res.data.region[0].deptName;
  810. // this.collectionItemList[k].answerValue = res.data.region[0].deptCode;
  811. // }
  812. // }
  813. if (answerValue) {
  814. let findCompany = this.companyList.find((item) => item.deptCode == answerValue);
  815. this.onSalesRegionConfirm(findCompany);
  816. } else {
  817. this.onSalesRegionConfirm(this.regionList[0]);
  818. }
  819. }
  820. } else if (grade == 'xsb') {
  821. if (res.data.dept != null) {
  822. this.deptList = res.data.dept;
  823. if (answerValue) {
  824. let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
  825. this.onSalesDepartmentConfirm(findCompany);
  826. } else {
  827. this.onSalesDepartmentConfirm(this.deptList[0]);
  828. }
  829. }
  830. } else if (grade == 'gs') {
  831. this.companyList = res.data.company;
  832. if (answerValue) {
  833. let findCompany = this.companyList.find((item) => item.deptCode == answerValue);
  834. this.onregionConfirm(findCompany);
  835. } else {
  836. this.onregionConfirm(this.companyList[0]);
  837. }
  838. if (res.data.dept != null) {
  839. this.deptList = res.data.dept;
  840. }
  841. if (res.data.region != null) {
  842. this.regionList = res.data.region;
  843. }
  844. }
  845. });
  846. },
  847. getDeptsBy(answerValue) {
  848. getDeptsByUser().then((res) => {
  849. if (res.data && res.code == 200) {
  850. let arr = [];
  851. res.data.forEach((val) => {
  852. arr.push({
  853. ancestors: val.ancestors || '',
  854. deptCode: val.deptCode || '',
  855. deptId: val.deptId || '',
  856. deptLevel: val.deptLevel || '',
  857. deptName: val.deptName || '',
  858. parentId: val.parentId || '',
  859. });
  860. });
  861. this.deptList = arr;
  862. if (answerValue) {
  863. let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
  864. this.onSalesDepartmentConfirm(findCompany);
  865. } else {
  866. this.onSalesDepartmentConfirm(this.deptList[0]);
  867. }
  868. }
  869. });
  870. },
  871. dailyFn(row) {
  872. if (row.status != '0') {
  873. if (row.status == -1) {
  874. var dayTime = row.showDate;
  875. var times = new Date(
  876. dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
  877. ).getTime();
  878. var time = new Date('2022-08-25').getTime();
  879. if (times < time) {
  880. this.$dialog.alert({
  881. title: '系统提示',
  882. message: '非常抱歉,8月25日前历史报告数据不存在',
  883. });
  884. } else {
  885. this.$router.push({
  886. path: '/weeklyHistoricalDetils',
  887. query: { reportId: row.id },
  888. });
  889. }
  890. } else {
  891. this.$router.push({
  892. path: '/weeklyHistoricalDetils',
  893. query: { reportId: row.id },
  894. });
  895. }
  896. }
  897. },
  898. onClickLeft() {
  899. this.$router.go(-1);
  900. },
  901. regionClick(val) {
  902. // if(this.powerGrade>4){
  903. this.index = val;
  904. this.RegionShow = true;
  905. // }
  906. },
  907. SalesRegionClick(val) {
  908. this.index = val;
  909. this.SalesRegionShow = true;
  910. },
  911. SalesDepartmentClick(val) {
  912. this.index = val;
  913. this.SalesDepartmentShow = true;
  914. },
  915. StaffClick() {
  916. this.StaffShow = true;
  917. },
  918. StartTimeClick() {
  919. this.StartTimeShow = true;
  920. },
  921. EndTimeClick() {
  922. this.EndTimeShow = true;
  923. },
  924. onSalesRegionConfirm(val) {
  925. this.SalesRegionShow = false;
  926. this.regionCode = val.deptId;
  927. // if (this.index !== '') {
  928. // this.collectionItemList[this.index].answerName = val.deptName;
  929. // this.collectionItemList[this.index].answerValue = val.deptCode;
  930. // for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  931. // if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
  932. // this.getDeptInfo('dept', 'xsb');
  933. // }
  934. // }
  935. // } else {
  936. for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  937. if (this.collectionItemList[k1].answerType == 'xsb') {
  938. this.collectionItemList[k1].answerName = '';
  939. this.collectionItemList[k1].answerValue = '';
  940. }
  941. if (this.collectionItemList[k1].answerType == 'dq') {
  942. this.collectionItemList[k1].answerName = val.deptName;
  943. this.collectionItemList[k1].answerValue = val.deptCode;
  944. }
  945. if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
  946. this.getDeptInfo('dept', 'xsb');
  947. }
  948. }
  949. // }
  950. // if (val.deptId != '') {
  951. // this.getDeptInfo('dept', 'xsb');
  952. // }
  953. },
  954. onregionConfirm(val) {
  955. this.RegionShow = false;
  956. this.companyCode = val.deptId;
  957. // if (this.index !== '') {
  958. // this.collectionItemList[this.index].answerName = val.deptName;
  959. // this.collectionItemList[this.index].answerValue = val.deptCode;
  960. // for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  961. // if (this.collectionItemList[k1].answerType == 'dq') {
  962. // this.getDeptInfo('dept', 'dq');
  963. // }
  964. // }
  965. // } else {
  966. for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  967. if (this.collectionItemList[k1].answerType == 'xsb') {
  968. this.collectionItemList[k1].answerName = '';
  969. this.collectionItemList[k1].answerValue = '';
  970. }
  971. if (this.collectionItemList[k1].answerType == 'xsb') {
  972. this.collectionItemList[k1].answerName = '';
  973. this.collectionItemList[k1].answerValue = '';
  974. }
  975. if (this.collectionItemList[k1].answerType == 'gs') {
  976. this.collectionItemList[k1].answerName = val.deptName;
  977. this.collectionItemList[k1].answerValue = val.deptCode;
  978. }
  979. if (this.collectionItemList[k1].answerType == 'dq') {
  980. this.getDeptInfo('dept', 'dq');
  981. }
  982. }
  983. // }
  984. },
  985. onSalesDepartmentConfirm(val) {
  986. this.SalesDepartmentShow = false;
  987. // if (this.index !== '') {
  988. // this.collectionItemList[this.index].answerName = val.deptName;
  989. // this.collectionItemList[this.index].answerValue = val.deptCode;
  990. // } else {
  991. for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  992. if (this.collectionItemList[k1].answerType == 'xsb') {
  993. this.collectionItemList[k1].answerName = val.deptName;
  994. this.collectionItemList[k1].answerValue = val.deptCode;
  995. }
  996. }
  997. // }
  998. },
  999. onStartTimeConfirm(val) {
  1000. this.formData.startTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + '';
  1001. this.StartTimeShow = false;
  1002. this.endminDate = new Date(val);
  1003. this.endmaxDate = new Date(this.GetPreMonthDay(this.formData.startTime, -2, 'end'));
  1004. if (
  1005. new Date(this.formData.startTime).getTime() > new Date(this.formData.endTime).getTime() ||
  1006. new Date(this.endmaxDate).getTime() < new Date(this.formData.endTime).getTime()
  1007. ) {
  1008. this.formData.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + '';
  1009. this.endcurrentDate = this.GetPreMonthDay(this.formData.startTime, -2);
  1010. }
  1011. this.list = [];
  1012. this.formData.pageNum = 1;
  1013. },
  1014. onEndTimeConfirm(val) {
  1015. this.formData.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}');
  1016. this.strtmaxDate = new Date(val);
  1017. if (new Date(this.formData.startTime).getTime() > new Date(this.formData.endTime).getTime()) {
  1018. this.formData.startTime = this.formData.endTime;
  1019. }
  1020. this.list = [];
  1021. this.formData.pageNum = 1;
  1022. this.EndTimeShow = false;
  1023. },
  1024. // 添加经销商或者门店
  1025. addJXSorMD(val) {
  1026. let answerType = val.answerType;
  1027. let dataList = [];
  1028. if(answerType == 'jxs'){
  1029. dataList = val.chainList ? val.chainList : [];
  1030. }else if(answerType == 'md'){
  1031. dataList = val.storeList ? val.storeList : [];
  1032. }
  1033. const isExceedLimit = dataList.length >= val.maxValue;
  1034. if (val.maxValue !== null && isExceedLimit) {
  1035. this.$toast('超过最大限制!');
  1036. } else {
  1037. this.agentValue = '';
  1038. if(answerType == 'jxs'){
  1039. this.moreTypeShow = true;
  1040. this.getChainsList();
  1041. }else if(answerType == 'md'){
  1042. this.storeTypeShow = true;
  1043. this.storeType = val.storeType;
  1044. this.getStoresList();
  1045. }
  1046. }
  1047. },
  1048. // 删除经销商或者门店
  1049. closeJXSorMD(item, index) {
  1050. if(item.answerType == 'jxs'){
  1051. item.chainList.splice(index, 1);
  1052. }else if(item.answerType == 'md'){
  1053. item.storeList.splice(index, 1);
  1054. }
  1055. },
  1056. getChainsList(value = '') {
  1057. this.chainsData = [];
  1058. chainsList({
  1059. chainCode: '', // string 经销商编码
  1060. chainName: value, // string 经销商名称
  1061. limit: 100,
  1062. })
  1063. .then((res) => {
  1064. if (res.code == 200 && res.rows) {
  1065. this.chainsData = res.rows;
  1066. } else {
  1067. this.chainsData = [];
  1068. }
  1069. })
  1070. .catch(() => {
  1071. this.chainsData = [];
  1072. });
  1073. },
  1074. getStoresList(value = '') {
  1075. this.storesData = [];
  1076. storesList({
  1077. storeCategoryList: this.storeType ? this.storeType.split(",") : [], // 门店类型数组
  1078. storeName: value, // 门店名称或者编号搜索,模糊搜索
  1079. pageNum: 1, // int 页码
  1080. PageSize: 100 // 每页数
  1081. })
  1082. .then((res) => {
  1083. if (res.code == 200 && res.rows) {
  1084. this.storesData = res.rows;
  1085. } else {
  1086. this.storesData = [];
  1087. }
  1088. })
  1089. .catch(() => {
  1090. this.storesData = [];
  1091. });
  1092. },
  1093. onConfirmChainsList(value) {
  1094. if (value && value.chainName != undefined) {
  1095. let JXSSataList = this.collectionItemList.find((item) => item.answerType == 'jxs');
  1096. if (!JXSSataList.chainList){
  1097. JXSSataList.chainList = [];
  1098. }
  1099. let isFlag = JXSSataList.chainList.find((val) => val.chainCode == value.chainCode);
  1100. if (!isFlag) {
  1101. JXSSataList.chainList.push({
  1102. chainName: value.chainName,
  1103. chainCode: value.chainCode,
  1104. });
  1105. this.moreTypeShow = false;
  1106. } else {
  1107. this.$toast('当前经销商已添加,不能重复添加!');
  1108. }
  1109. }
  1110. },
  1111. onConfirmStoresList(value) {
  1112. if (value && value.storeName != undefined) {
  1113. let MDSataList = this.collectionItemList.find((item) => item.answerType == 'md');
  1114. if (!MDSataList.storeList) {
  1115. MDSataList.storeList = [];
  1116. }
  1117. let isFlag = MDSataList.storeList.find((val) => val.storeCode == value.storeCode);
  1118. if (!isFlag) {
  1119. MDSataList.storeList.push({
  1120. storeName: value.storeName,
  1121. storeCode: value.storeCode,
  1122. });
  1123. this.storeTypeShow = false;
  1124. } else {
  1125. this.$toast('当前门店已添加,不能重复添加!');
  1126. }
  1127. }
  1128. },
  1129. },
  1130. };
  1131. </script>
  1132. <style scoped lang="scss">
  1133. .container {
  1134. // background-color: white;
  1135. }
  1136. .van-f-red {
  1137. color: red;
  1138. width: 8px;
  1139. display: inline-block;
  1140. line-height: 26px;
  1141. }
  1142. .formLabel {
  1143. margin: 0 16px;
  1144. border-bottom: 1px solid #f1f1f1;
  1145. }
  1146. .formLabel .van-cell {
  1147. padding: 10px 0;
  1148. }
  1149. .formLabel .van-cell::after {
  1150. border: 0;
  1151. }
  1152. .formLabel .van-field {
  1153. border: 1px solid #f1f1f1;
  1154. padding: 6px;
  1155. width: 100%;
  1156. border-radius: 4px;
  1157. overflow: hidden;
  1158. }
  1159. .formLabel .van-field__control {
  1160. padding: 0 10px;
  1161. }
  1162. .formLabel .formLabeltitle {
  1163. position: absolute;
  1164. top: 8px;
  1165. }
  1166. .lineGrey {
  1167. height: 10px;
  1168. width: 100%;
  1169. background: #f1f1f1;
  1170. }
  1171. .z-checkbox .van-radio {
  1172. padding: 6px 0;
  1173. }
  1174. .z-cell .van-cell__title {
  1175. font-size: 16px;
  1176. }
  1177. .VisitSummaryAdd {
  1178. .tc {
  1179. display: flex;
  1180. justify-content: space-between;
  1181. .submitBtn {
  1182. width: 45%;
  1183. border-radius: 20px;
  1184. }
  1185. }
  1186. .van-form {
  1187. background-color: white;
  1188. }
  1189. }
  1190. </style>
  1191. <style lang="scss">
  1192. .table-headermd {
  1193. font-size: 12px;
  1194. text-align: center;
  1195. position: initial;
  1196. width: 98% !important;
  1197. margin: 0 auto;
  1198. border-right: 0;
  1199. }
  1200. .table-headermd .el-table__header,
  1201. .table-headermd .el-table__body {
  1202. width: 100% !important;
  1203. }
  1204. /*.table-headermd col {width: 6.8rem;}*/
  1205. .table-headermd col:nth-child(4) {
  1206. width: 5.6rem;
  1207. }
  1208. .table-headermd col:nth-child(2),
  1209. .table-headermd col:nth-child(3) {
  1210. width: 4.6rem;
  1211. }
  1212. .table-headermd .van-cell {
  1213. padding: 0 4px;
  1214. height: 100%;
  1215. }
  1216. .table-headermd th.el-table__cell > .cell {
  1217. padding: 0 4px;
  1218. text-align: center;
  1219. }
  1220. .table-headermd th.el-table__cell:first-child > .cell {
  1221. text-align: left;
  1222. }
  1223. .table-headermd th.el-table__cell {
  1224. background-color: #1989fa;
  1225. color: #fff;
  1226. }
  1227. .table-headermd .el-table__cell {
  1228. padding: 4px 0;
  1229. }
  1230. .table-headermd.el-table .cell {
  1231. padding: 0;
  1232. }
  1233. .table-headermd .tipTitle {
  1234. overflow: hidden;
  1235. text-overflow: ellipsis;
  1236. display: -webkit-box;
  1237. -webkit-box-orient: vertical;
  1238. -webkit-line-clamp: 2;
  1239. }
  1240. .table-headermd::before {
  1241. height: 0;
  1242. }
  1243. .xing {
  1244. color: red;
  1245. padding-left: 4px;
  1246. }
  1247. .formLabel .van-radio__label,
  1248. .formLabel .van-checkbox__label {
  1249. font-size: 1.4rem;
  1250. }
  1251. .table-headermd .cell,
  1252. .el-table--border .el-table__cell:first-child .cell {
  1253. padding: 0 4px;
  1254. }
  1255. .van-dialog__confirm,
  1256. .van-dialog__confirm:active {
  1257. color: #1989fa;
  1258. }
  1259. .navBarTOP {
  1260. position: fixed;
  1261. width: 100%;
  1262. z-index: 2;
  1263. top: 0;
  1264. }
  1265. .isTableMust {
  1266. padding: 4px;
  1267. color: #999;
  1268. margin: 0;
  1269. margin-top: -10px;
  1270. }
  1271. .jxsBox {
  1272. .tips {
  1273. text-align: right;
  1274. }
  1275. }
  1276. .VisitSummaryAdd {
  1277. .jxsContent {
  1278. margin-bottom: 10px;
  1279. .item {
  1280. padding: 5px;
  1281. background: #e9e9e9;
  1282. margin: 5px 0;
  1283. .el-popover__reference-wrapper {
  1284. display: flex;
  1285. justify-content: space-between;
  1286. align-items: center;
  1287. }
  1288. .selectItem {
  1289. flex: 1;
  1290. white-space: nowrap;
  1291. overflow: hidden;
  1292. text-overflow: ellipsis;
  1293. font-size: 14px;
  1294. }
  1295. }
  1296. }
  1297. .linep .van-cell__title {
  1298. color: #646566;
  1299. font-weight: 500;
  1300. font-size: 14px;
  1301. }
  1302. }
  1303. .VisitSummaryAdd {
  1304. .van-popup {
  1305. .tips {
  1306. width: 100%;
  1307. height: 40px;
  1308. display: flex;
  1309. align-items: center;
  1310. justify-content: center;
  1311. position: absolute;
  1312. top: 100px;
  1313. z-index: 999999;
  1314. div {
  1315. width: 80%;
  1316. height: 100%;
  1317. display: flex;
  1318. align-items: center;
  1319. justify-content: center;
  1320. text-align: center;
  1321. font-size: 15px;
  1322. background: rgba(225, 236, 250, 0.8);
  1323. border-radius: 6px;
  1324. color: #575656;
  1325. }
  1326. }
  1327. }
  1328. }
  1329. </style>