VisitSummaryAdd.vue 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362
  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,index)" /></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. selectIndex: 0,
  431. chainsData: [],
  432. storesData: [],
  433. chainName: '',
  434. chainCode: '',
  435. jxsList: [],
  436. userSummaryId: null,
  437. qrUuid: null,
  438. };
  439. },
  440. activated() {
  441. this.userSummaryId = null;
  442. this.qrUuid = null;
  443. },
  444. created() {
  445. this.activaFlag = true;
  446. // this.formData.startTime = this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'),2)
  447. this.formData.startTime = this.getThreeDaysAgo();
  448. // this.strtcurrentDate=new Date(this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'),2))
  449. this.strtcurrentDate = new Date(this.getThreeDaysAgo());
  450. this.formData.endTime = this.parseTime(new Date(), '{y}-{m}-{d}') + '';
  451. this.endminDate = new Date(this.GetPreMonthDay(this.parseTime(new Date(), '{y}-{m}-{d}'), 2));
  452. this.powerGrade = localStorage.getItem('powerGrade');
  453. this.title = this.$route.query.title;
  454. this.getReportInfo();
  455. this.regionCode = '';
  456. },
  457. watch: {
  458. $route(to, from) {
  459. if (to.path == '/VisitSummaryAdd') {
  460. this.title = this.$route.query.title;
  461. this.getReportInfo();
  462. this.regionCode = '';
  463. }
  464. },
  465. },
  466. methods: {
  467. showCalendarClick(val) {
  468. this.dateIndex = val;
  469. this.showCalendar = true;
  470. },
  471. formatDate(date) {
  472. var Month = date.getMonth() + 1;
  473. var Day = date.getDate();
  474. if (Month < 10) {
  475. Month = '0' + Month;
  476. }
  477. if (Day < 10) {
  478. Day = '0' + Day;
  479. }
  480. return `${date.getFullYear()}-${Month}-${Day}`;
  481. },
  482. onConfirm(date) {
  483. this.showCalendar = false;
  484. this.collectionItemList[this.dateIndex].answerValue = this.formatDate(date);
  485. },
  486. formatter(value) {
  487. return value.replace(
  488. /[\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,
  489. ''
  490. );
  491. },
  492. numberFn(val, index) {
  493. if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.collectionItemList[index].answerValue)) {
  494. this.collectionItemList[index].answerValue = this.collectionItemList[
  495. index
  496. ].answerValue.replace(
  497. /\.\d{2,}$/,
  498. this.collectionItemList[index].answerValue.substr(
  499. this.collectionItemList[index].answerValue.indexOf('.'),
  500. 3
  501. )
  502. );
  503. }
  504. },
  505. zSelectVal(value) {
  506. var collectionAnswerlisd = this.collectionAnswerlisd;
  507. if (collectionAnswerlisd.length > 0) {
  508. var num = 0;
  509. for (var a = 0; a < collectionAnswerlisd.length; a++) {
  510. if (collectionAnswerlisd[a].id == value.id) {
  511. collectionAnswerlisd[a] = value;
  512. num = 0;
  513. } else {
  514. num = 1;
  515. }
  516. }
  517. if (num > 0) {
  518. collectionAnswerlisd.push(value);
  519. }
  520. } else {
  521. collectionAnswerlisd.push(value);
  522. }
  523. this.collectionAnswerlisd = collectionAnswerlisd;
  524. },
  525. imgClick(val, index) {
  526. this.collectionId = val.collectionId + '';
  527. this.indeximg = index;
  528. this.show = true;
  529. },
  530. newimgarr1() {
  531. this.$forceUpdate();
  532. // if (
  533. // this.collectionItemList[val.index].fileInfoList == null ||
  534. // this.collectionItemList[val.index].fileInfoList == undefined
  535. // ) {
  536. // this.collectionItemList[val.index].fileInfoList = [];
  537. // this.collectionItemList[val.index].fileIdList = [];
  538. // }
  539. // this.collectionItemList[val.index].fileInfoList.push(val);
  540. // this.collectionItemList[val.index].fileIdList.push(val.id);
  541. },
  542. dateFn(val) {
  543. return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);
  544. },
  545. onLoad() {},
  546. // 暂存 不校验答案是否必填
  547. onStorage(callback) {
  548. let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
  549. this.setParams(() => {
  550. temporarilyCustomAnswer({
  551. userSummaryId: this.userSummaryId, // Long 用户总结id,如果为新增则不填,编辑则必填
  552. summaryId: this.$route.query.summaryId, //Long 主管任务id
  553. customItemList: this.collectionItemList, //List<Object> 答案列表
  554. ...ActivityQRCodeData, //任务名称、活动日期、签到时间
  555. getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
  556. qrUuid: this.qrUuid || null,
  557. })
  558. .then((res) => {
  559. if (res.code == 200) {
  560. if (callback) {
  561. this.userSummaryId = res.data.userSummaryId ? res.data.userSummaryId : null;
  562. this.qrUuid = res.data.qrUuid ? res.data.qrUuid : null;
  563. // 回传二维码
  564. callback(res);
  565. } else {
  566. this.$router.go(-1);
  567. }
  568. } else {
  569. this.$toast(res.msg);
  570. }
  571. })
  572. .catch((err) => {
  573. this.$toast(err.msg);
  574. });
  575. });
  576. },
  577. onSubmit() {
  578. if (this.$route.query.qrCodeCheck == '1') {
  579. // 执行 ActivityQRCode from表单验证触发
  580. this.$refs.ActivityQRCode.$refs.tabstoreVal
  581. .validate()
  582. .then(() => {
  583. // 验证通过
  584. let ActivityQRCodeData = this.$refs.ActivityQRCode ? this.$refs.ActivityQRCode.activityForm : {} || {};
  585. this.onSubmitFun(ActivityQRCodeData);
  586. })
  587. .catch((errors) => {
  588. //验证失败
  589. window.scrollTo(0, 0);
  590. return;
  591. });
  592. } else {
  593. this.onSubmitFun();
  594. }
  595. },
  596. onSubmitFun(ActivityQRCodeData = {}) {
  597. this.setParams(() => {
  598. if (this.flagclick) {
  599. this.flagclick = false;
  600. this.timer = null;
  601. this.timer = setTimeout(() => {
  602. this.flagclick = true;
  603. }, 2000);
  604. insertCustomAnswer({
  605. userSummaryId: this.userSummaryId, // Long 用户总结id,如果为新增则不填,编辑则必填
  606. summaryId: this.$route.query.summaryId, //Long 主管任务id
  607. customItemList: this.collectionItemList, //List<Object> 答案列表
  608. ...ActivityQRCodeData,
  609. qrUuid: this.qrUuid || null,
  610. })
  611. .then((res) => {
  612. if (res.code == 200) {
  613. this.$router.go(-1);
  614. } else {
  615. this.$toast(res.msg);
  616. }
  617. })
  618. .catch((err) => {
  619. this.$toast(err.msg);
  620. });
  621. }
  622. });
  623. },
  624. setParams(callback) {
  625. for (var c = 0; c < this.collectionAnswerlisd.length; c++) {
  626. for (var b = 0; b < this.collectionItemList.length; b++) {
  627. if (this.collectionAnswerlisd[c].id == this.collectionItemList[b].customId) {
  628. this.collectionItemList[b].customOptionList = this.collectionAnswerlisd[c].value;
  629. }
  630. }
  631. }
  632. // // 照片
  633. let zpDataList = this.collectionItemList.find((item) => item.answerType == 'zp');
  634. if (zpDataList && zpDataList.fileInfoList) {
  635. let fileIdList = [];
  636. zpDataList.fileInfoList.forEach((item) => {
  637. fileIdList.push(item.id);
  638. });
  639. zpDataList.fileIdList = fileIdList;
  640. }
  641. // 经销商
  642. // let JXSSataList = this.collectionItemList.find((item) => item.answerType == 'jxs');
  643. // if (this.jxsList.length) {
  644. // let fileIdList = [];
  645. // this.jxsList.forEach((item) => {
  646. // fileIdList.push({
  647. // chainCode: item.chainCode,
  648. // chainName: item.chainName,
  649. // });
  650. // });
  651. // JXSSataList.chainList = fileIdList;
  652. // }
  653. callback && callback();
  654. },
  655. getReportInfo() {
  656. let loading1 = this.$toast.loading({
  657. duration: 0,
  658. message: '加载中...',
  659. forbidClick: true,
  660. });
  661. this.collectionItemList = [];
  662. this.collectionAnswerlisd = [];
  663. getSummaryDetailById({ summaryId: this.$route.query.summaryId }).then((res) => {
  664. loading1.clear();
  665. if (res.code == 200) {
  666. var collectionItemLists = res.data;
  667. for (var q = 0; q < collectionItemLists.length; q++) {
  668. collectionItemLists[q].answerName = undefined;
  669. // 公司
  670. if (
  671. (collectionItemLists[q].answerType == 'gs' ||
  672. collectionItemLists[q].answerType == 'dq' ||
  673. collectionItemLists[q].answerType == 'xsb') &&
  674. this.activaFlag
  675. ) {
  676. this.activaFlag = false;
  677. if (collectionItemLists[q].answerType == 'xsb') {
  678. this.getDeptsBy(collectionItemLists[q].answerValue);
  679. this.getDeptInfo(
  680. 'dept',
  681. collectionItemLists[q].answerType,
  682. collectionItemLists[q].answerValue
  683. );
  684. } else {
  685. this.getDeptInfo(
  686. 'dept',
  687. collectionItemLists[q].answerType,
  688. collectionItemLists[q].answerValue
  689. );
  690. }
  691. }
  692. // 单选
  693. if (
  694. collectionItemLists[q].answerType == 'dx' &&
  695. collectionItemLists[q].showHistory == '1'
  696. ) {
  697. let findCustom = collectionItemLists[q].customOptionList.find((item) => item.checked);
  698. if (findCustom) {
  699. collectionItemLists[q].answerValue = findCustom.customOptionId + '';
  700. }
  701. }
  702. // 多选
  703. if (
  704. collectionItemLists[q].answerType == 'duox' &&
  705. collectionItemLists[q].showHistory == '1'
  706. ) {
  707. let findCustom = [];
  708. collectionItemLists[q].customOptionList.forEach((item) => {
  709. if (item.checked) {
  710. findCustom.push(item.customOptionId + '');
  711. }
  712. });
  713. if (findCustom) {
  714. collectionItemLists[q].answerValue = findCustom.join(',');
  715. }
  716. }
  717. // 照片
  718. if (collectionItemLists[q].answerType == 'zp' && collectionItemLists[q].fileInfoList) {
  719. let fileIdList = [];
  720. collectionItemLists[q].fileInfoList.forEach((item) => {
  721. fileIdList.push(item.id);
  722. });
  723. collectionItemLists[q].fileIdList = fileIdList;
  724. }
  725. }
  726. this.collectionItemList = collectionItemLists;
  727. }
  728. });
  729. },
  730. getThreeDaysAgo() {
  731. let myDate = new Date();
  732. let lw = new Date(myDate - 1000 * 60 * 60 * 24 * 14); //最后一个数字30可改,30天的意思
  733. let lastY = lw.getFullYear();
  734. let lastM = lw.getMonth() + 1;
  735. let lastD = lw.getDate();
  736. let startData =
  737. lastY + '-' + (lastM < 10 ? '0' + lastM : lastM) + '-' + (lastD < 10 ? '0' + lastD : lastD); //三十天之前日期
  738. return startData;
  739. },
  740. GetPreMonthDay(date, monthNum, type) {
  741. var dateArr = date.split('-');
  742. var year = dateArr[0]; //获取当前日期的年份
  743. var month = dateArr[1]; //获取当前日期的月份
  744. var day = dateArr[2]; //获取当前日期的日
  745. var days = new Date(year, month, 0);
  746. days = days.getDate(); //获取当前日期中月的天数
  747. var year2 = year;
  748. var month2 = parseInt(month) - monthNum;
  749. if (month2 <= 0) {
  750. var absM = Math.abs(month2);
  751. year2 = parseInt(year2) - Math.ceil(absM / 12 == 0 ? 1 : parseInt(absM) / 12);
  752. month2 = 12 - (absM % 12);
  753. }
  754. var day2 = day;
  755. var days2 = new Date(year2, month2, 0);
  756. days2 = days2.getDate();
  757. if (day2 > days2) {
  758. day2 = days2;
  759. }
  760. if (month2 < 10) {
  761. month2 = '0' + month2;
  762. }
  763. var t2 = '';
  764. if (monthNum > 0) {
  765. t2 = year2 + '-' + month2 + '-01';
  766. } else {
  767. if (type == 'end') {
  768. var Months = new Date().getMonth() + 1;
  769. var days111 = new Date().getDate();
  770. if (Months < 10) {
  771. Months = '0' + Months;
  772. }
  773. if (days111 < 10) {
  774. days111 = '0' + days111;
  775. }
  776. if (parseInt(month2) >= new Date().getMonth() + 1) {
  777. t2 = year2 + '-' + Months + '-' + days111;
  778. } else {
  779. var daysd = this.getMonthDays(year2, month2);
  780. t2 = year2 + '-' + month2 + '-' + daysd;
  781. }
  782. } else {
  783. t2 = year2 + '-' + month2 + '-' + day2;
  784. }
  785. }
  786. return t2;
  787. },
  788. getMonthDays(year, month) {
  789. var stratDate = new Date(year, month - 1, 1),
  790. endData = new Date(year, month, 1);
  791. var days = (endData - stratDate) / (1000 * 60 * 60 * 24);
  792. return days;
  793. },
  794. getDeptInfo(type, grade, answerValue) {
  795. this.deptForm.type = type;
  796. if (grade == 'dq') {
  797. this.deptForm.parentId = this.companyCode;
  798. } else if (grade == 'xsb') {
  799. this.deptForm.parentId = this.regionCode;
  800. } else {
  801. this.deptForm.type = '';
  802. this.deptForm.parentId = '';
  803. }
  804. getSummaryMobileDeptInfo(this.deptForm).then((res) => {
  805. if (grade == 'dq') {
  806. if (res.data.region != null) {
  807. this.regionList = res.data.region;
  808. // for (var k = 0; k < this.collectionItemList.length; k++) {
  809. // if (this.collectionItemList[k].answerType == 'dq') {
  810. // this.collectionItemList[k].answerName = res.data.region[0].deptName;
  811. // this.collectionItemList[k].answerValue = res.data.region[0].deptCode;
  812. // }
  813. // }
  814. if (answerValue) {
  815. let findCompany = this.companyList.find((item) => item.deptCode == answerValue);
  816. this.onSalesRegionConfirm(findCompany);
  817. } else {
  818. this.onSalesRegionConfirm(this.regionList[0]);
  819. }
  820. }
  821. } else if (grade == 'xsb') {
  822. if (res.data.dept != null) {
  823. this.deptList = res.data.dept;
  824. if (answerValue) {
  825. let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
  826. this.onSalesDepartmentConfirm(findCompany);
  827. } else {
  828. this.onSalesDepartmentConfirm(this.deptList[0]);
  829. }
  830. }
  831. } else if (grade == 'gs') {
  832. this.companyList = res.data.company;
  833. if (answerValue) {
  834. let findCompany = this.companyList.find((item) => item.deptCode == answerValue);
  835. this.onregionConfirm(findCompany);
  836. } else {
  837. this.onregionConfirm(this.companyList[0]);
  838. }
  839. if (res.data.dept != null) {
  840. this.deptList = res.data.dept;
  841. }
  842. if (res.data.region != null) {
  843. this.regionList = res.data.region;
  844. }
  845. }
  846. });
  847. },
  848. getDeptsBy(answerValue) {
  849. getDeptsByUser().then((res) => {
  850. if (res.data && res.code == 200) {
  851. let arr = [];
  852. res.data.forEach((val) => {
  853. arr.push({
  854. ancestors: val.ancestors || '',
  855. deptCode: val.deptCode || '',
  856. deptId: val.deptId || '',
  857. deptLevel: val.deptLevel || '',
  858. deptName: val.deptName || '',
  859. parentId: val.parentId || '',
  860. });
  861. });
  862. this.deptList = arr;
  863. if (answerValue) {
  864. let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
  865. this.onSalesDepartmentConfirm(findCompany);
  866. } else {
  867. this.onSalesDepartmentConfirm(this.deptList[0]);
  868. }
  869. }
  870. });
  871. },
  872. dailyFn(row) {
  873. if (row.status != '0') {
  874. if (row.status == -1) {
  875. var dayTime = row.showDate;
  876. var times = new Date(
  877. dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
  878. ).getTime();
  879. var time = new Date('2022-08-25').getTime();
  880. if (times < time) {
  881. this.$dialog.alert({
  882. title: '系统提示',
  883. message: '非常抱歉,8月25日前历史报告数据不存在',
  884. });
  885. } else {
  886. this.$router.push({
  887. path: '/weeklyHistoricalDetils',
  888. query: { reportId: row.id },
  889. });
  890. }
  891. } else {
  892. this.$router.push({
  893. path: '/weeklyHistoricalDetils',
  894. query: { reportId: row.id },
  895. });
  896. }
  897. }
  898. },
  899. onClickLeft() {
  900. this.$router.go(-1);
  901. },
  902. regionClick(val) {
  903. // if(this.powerGrade>4){
  904. this.index = val;
  905. this.RegionShow = true;
  906. // }
  907. },
  908. SalesRegionClick(val) {
  909. this.index = val;
  910. this.SalesRegionShow = true;
  911. },
  912. SalesDepartmentClick(val) {
  913. this.index = val;
  914. this.SalesDepartmentShow = true;
  915. },
  916. StaffClick() {
  917. this.StaffShow = true;
  918. },
  919. StartTimeClick() {
  920. this.StartTimeShow = true;
  921. },
  922. EndTimeClick() {
  923. this.EndTimeShow = true;
  924. },
  925. onSalesRegionConfirm(val) {
  926. this.SalesRegionShow = false;
  927. this.regionCode = val.deptId;
  928. // if (this.index !== '') {
  929. // this.collectionItemList[this.index].answerName = val.deptName;
  930. // this.collectionItemList[this.index].answerValue = val.deptCode;
  931. // for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  932. // if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
  933. // this.getDeptInfo('dept', 'xsb');
  934. // }
  935. // }
  936. // } else {
  937. for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  938. if (this.collectionItemList[k1].answerType == 'xsb') {
  939. this.collectionItemList[k1].answerName = '';
  940. this.collectionItemList[k1].answerValue = '';
  941. }
  942. if (this.collectionItemList[k1].answerType == 'dq') {
  943. this.collectionItemList[k1].answerName = val.deptName;
  944. this.collectionItemList[k1].answerValue = val.deptCode;
  945. }
  946. if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
  947. this.getDeptInfo('dept', 'xsb');
  948. }
  949. }
  950. // }
  951. // if (val.deptId != '') {
  952. // this.getDeptInfo('dept', 'xsb');
  953. // }
  954. },
  955. onregionConfirm(val) {
  956. this.RegionShow = false;
  957. this.companyCode = val.deptId;
  958. // if (this.index !== '') {
  959. // this.collectionItemList[this.index].answerName = val.deptName;
  960. // this.collectionItemList[this.index].answerValue = val.deptCode;
  961. // for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  962. // if (this.collectionItemList[k1].answerType == 'dq') {
  963. // this.getDeptInfo('dept', 'dq');
  964. // }
  965. // }
  966. // } else {
  967. for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  968. if (this.collectionItemList[k1].answerType == 'xsb') {
  969. this.collectionItemList[k1].answerName = '';
  970. this.collectionItemList[k1].answerValue = '';
  971. }
  972. if (this.collectionItemList[k1].answerType == 'xsb') {
  973. this.collectionItemList[k1].answerName = '';
  974. this.collectionItemList[k1].answerValue = '';
  975. }
  976. if (this.collectionItemList[k1].answerType == 'gs') {
  977. this.collectionItemList[k1].answerName = val.deptName;
  978. this.collectionItemList[k1].answerValue = val.deptCode;
  979. }
  980. if (this.collectionItemList[k1].answerType == 'dq') {
  981. this.getDeptInfo('dept', 'dq');
  982. }
  983. }
  984. // }
  985. },
  986. onSalesDepartmentConfirm(val) {
  987. this.SalesDepartmentShow = false;
  988. // if (this.index !== '') {
  989. // this.collectionItemList[this.index].answerName = val.deptName;
  990. // this.collectionItemList[this.index].answerValue = val.deptCode;
  991. // } else {
  992. for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
  993. if (this.collectionItemList[k1].answerType == 'xsb') {
  994. this.collectionItemList[k1].answerName = val.deptName;
  995. this.collectionItemList[k1].answerValue = val.deptCode;
  996. }
  997. }
  998. // }
  999. },
  1000. onStartTimeConfirm(val) {
  1001. this.formData.startTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + '';
  1002. this.StartTimeShow = false;
  1003. this.endminDate = new Date(val);
  1004. this.endmaxDate = new Date(this.GetPreMonthDay(this.formData.startTime, -2, 'end'));
  1005. if (
  1006. new Date(this.formData.startTime).getTime() > new Date(this.formData.endTime).getTime() ||
  1007. new Date(this.endmaxDate).getTime() < new Date(this.formData.endTime).getTime()
  1008. ) {
  1009. this.formData.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + '';
  1010. this.endcurrentDate = this.GetPreMonthDay(this.formData.startTime, -2);
  1011. }
  1012. this.list = [];
  1013. this.formData.pageNum = 1;
  1014. },
  1015. onEndTimeConfirm(val) {
  1016. this.formData.endTime = this.parseTime(new Date(val), '{y}-{m}-{d}');
  1017. this.strtmaxDate = new Date(val);
  1018. if (new Date(this.formData.startTime).getTime() > new Date(this.formData.endTime).getTime()) {
  1019. this.formData.startTime = this.formData.endTime;
  1020. }
  1021. this.list = [];
  1022. this.formData.pageNum = 1;
  1023. this.EndTimeShow = false;
  1024. },
  1025. // 添加经销商或者门店
  1026. addJXSorMD(val,index) {
  1027. this.selectIndex = index;
  1028. let answerType = val.answerType;
  1029. let dataList = [];
  1030. if(answerType == 'jxs'){
  1031. dataList = val.chainList ? val.chainList : [];
  1032. }else if(answerType == 'md'){
  1033. dataList = val.storeList ? val.storeList : [];
  1034. }
  1035. const isExceedLimit = dataList.length >= val.maxValue;
  1036. if (val.maxValue !== null && isExceedLimit) {
  1037. this.$toast('超过最大限制!');
  1038. } else {
  1039. this.agentValue = '';
  1040. if(answerType == 'jxs'){
  1041. this.moreTypeShow = true;
  1042. this.getChainsList();
  1043. }else if(answerType == 'md'){
  1044. this.storeTypeShow = true;
  1045. this.storeType = val.storeType;
  1046. this.getStoresList();
  1047. }
  1048. }
  1049. },
  1050. // 删除经销商或者门店
  1051. closeJXSorMD(item, index) {
  1052. if(item.answerType == 'jxs'){
  1053. item.chainList.splice(index, 1);
  1054. }else if(item.answerType == 'md'){
  1055. item.storeList.splice(index, 1);
  1056. }
  1057. },
  1058. getChainsList(value = '') {
  1059. this.chainsData = [];
  1060. chainsList({
  1061. chainCode: '', // string 经销商编码
  1062. chainName: value, // string 经销商名称
  1063. limit: 100,
  1064. })
  1065. .then((res) => {
  1066. if (res.code == 200 && res.rows) {
  1067. this.chainsData = res.rows;
  1068. } else {
  1069. this.chainsData = [];
  1070. }
  1071. })
  1072. .catch(() => {
  1073. this.chainsData = [];
  1074. });
  1075. },
  1076. getStoresList(value = '') {
  1077. this.storesData = [];
  1078. storesList({
  1079. storeCategoryList: this.storeType ? this.storeType.split(",") : [], // 门店类型数组
  1080. storeName: value, // 门店名称或者编号搜索,模糊搜索
  1081. pageNum: 1, // int 页码
  1082. PageSize: 100 // 每页数
  1083. })
  1084. .then((res) => {
  1085. if (res.code == 200 && res.rows) {
  1086. this.storesData = res.rows;
  1087. } else {
  1088. this.storesData = [];
  1089. }
  1090. })
  1091. .catch(() => {
  1092. this.storesData = [];
  1093. });
  1094. },
  1095. onConfirmChainsList(value) {
  1096. if (value && value.chainName != undefined) {
  1097. let JXSSataList = this.collectionItemList.find((item,index) => item.answerType == 'jxs' && index == this.selectIndex);
  1098. if (!JXSSataList.chainList){
  1099. JXSSataList.chainList = [];
  1100. }
  1101. let isFlag = JXSSataList.chainList.find((val) => val.chainCode == value.chainCode);
  1102. if (!isFlag) {
  1103. JXSSataList.chainList.push({
  1104. chainName: value.chainName,
  1105. chainCode: value.chainCode,
  1106. });
  1107. this.moreTypeShow = false;
  1108. } else {
  1109. this.$toast('当前经销商已添加,不能重复添加!');
  1110. }
  1111. }
  1112. },
  1113. onConfirmStoresList(value) {
  1114. if (value && value.storeName != undefined) {
  1115. let MDSataList = this.collectionItemList.find((item,index) => item.answerType == 'md' && index == this.selectIndex);
  1116. if (!MDSataList.storeList) {
  1117. MDSataList.storeList = [];
  1118. }
  1119. let isFlag = MDSataList.storeList.find((val) => val.storeCode == value.storeCode);
  1120. if (!isFlag) {
  1121. MDSataList.storeList.push({
  1122. storeName: value.storeName,
  1123. storeCode: value.storeCode,
  1124. });
  1125. this.storeTypeShow = false;
  1126. } else {
  1127. this.$toast('当前门店已添加,不能重复添加!');
  1128. }
  1129. }
  1130. },
  1131. },
  1132. };
  1133. </script>
  1134. <style scoped lang="scss">
  1135. .container {
  1136. // background-color: white;
  1137. }
  1138. .van-f-red {
  1139. color: red;
  1140. width: 8px;
  1141. display: inline-block;
  1142. line-height: 26px;
  1143. }
  1144. .formLabel {
  1145. margin: 0 16px;
  1146. border-bottom: 1px solid #f1f1f1;
  1147. }
  1148. .formLabel .van-cell {
  1149. padding: 10px 0;
  1150. }
  1151. .formLabel .van-cell::after {
  1152. border: 0;
  1153. }
  1154. .formLabel .van-field {
  1155. border: 1px solid #f1f1f1;
  1156. padding: 6px;
  1157. width: 100%;
  1158. border-radius: 4px;
  1159. overflow: hidden;
  1160. }
  1161. .formLabel .van-field__control {
  1162. padding: 0 10px;
  1163. }
  1164. .formLabel .formLabeltitle {
  1165. position: absolute;
  1166. top: 8px;
  1167. }
  1168. .lineGrey {
  1169. height: 10px;
  1170. width: 100%;
  1171. background: #f1f1f1;
  1172. }
  1173. .z-checkbox .van-radio {
  1174. padding: 6px 0;
  1175. }
  1176. .z-cell .van-cell__title {
  1177. font-size: 16px;
  1178. }
  1179. .VisitSummaryAdd {
  1180. .tc {
  1181. display: flex;
  1182. justify-content: space-between;
  1183. .submitBtn {
  1184. width: 45%;
  1185. border-radius: 20px;
  1186. }
  1187. }
  1188. .van-form {
  1189. background-color: white;
  1190. }
  1191. }
  1192. </style>
  1193. <style lang="scss">
  1194. .table-headermd {
  1195. font-size: 12px;
  1196. text-align: center;
  1197. position: initial;
  1198. width: 98% !important;
  1199. margin: 0 auto;
  1200. border-right: 0;
  1201. }
  1202. .table-headermd .el-table__header,
  1203. .table-headermd .el-table__body {
  1204. width: 100% !important;
  1205. }
  1206. /*.table-headermd col {width: 6.8rem;}*/
  1207. .table-headermd col:nth-child(4) {
  1208. width: 5.6rem;
  1209. }
  1210. .table-headermd col:nth-child(2),
  1211. .table-headermd col:nth-child(3) {
  1212. width: 4.6rem;
  1213. }
  1214. .table-headermd .van-cell {
  1215. padding: 0 4px;
  1216. height: 100%;
  1217. }
  1218. .table-headermd th.el-table__cell > .cell {
  1219. padding: 0 4px;
  1220. text-align: center;
  1221. }
  1222. .table-headermd th.el-table__cell:first-child > .cell {
  1223. text-align: left;
  1224. }
  1225. .table-headermd th.el-table__cell {
  1226. background-color: #1989fa;
  1227. color: #fff;
  1228. }
  1229. .table-headermd .el-table__cell {
  1230. padding: 4px 0;
  1231. }
  1232. .table-headermd.el-table .cell {
  1233. padding: 0;
  1234. }
  1235. .table-headermd .tipTitle {
  1236. overflow: hidden;
  1237. text-overflow: ellipsis;
  1238. display: -webkit-box;
  1239. -webkit-box-orient: vertical;
  1240. -webkit-line-clamp: 2;
  1241. }
  1242. .table-headermd::before {
  1243. height: 0;
  1244. }
  1245. .xing {
  1246. color: red;
  1247. padding-left: 4px;
  1248. }
  1249. .formLabel .van-radio__label,
  1250. .formLabel .van-checkbox__label {
  1251. font-size: 1.4rem;
  1252. }
  1253. .table-headermd .cell,
  1254. .el-table--border .el-table__cell:first-child .cell {
  1255. padding: 0 4px;
  1256. }
  1257. .van-dialog__confirm,
  1258. .van-dialog__confirm:active {
  1259. color: #1989fa;
  1260. }
  1261. .navBarTOP {
  1262. position: fixed;
  1263. width: 100%;
  1264. z-index: 2;
  1265. top: 0;
  1266. }
  1267. .isTableMust {
  1268. padding: 4px;
  1269. color: #999;
  1270. margin: 0;
  1271. margin-top: -10px;
  1272. }
  1273. .jxsBox {
  1274. .tips {
  1275. text-align: right;
  1276. }
  1277. }
  1278. .VisitSummaryAdd {
  1279. .jxsContent {
  1280. margin-bottom: 10px;
  1281. .item {
  1282. padding: 5px;
  1283. background: #e9e9e9;
  1284. margin: 5px 0;
  1285. .el-popover__reference-wrapper {
  1286. display: flex;
  1287. justify-content: space-between;
  1288. align-items: center;
  1289. }
  1290. .selectItem {
  1291. flex: 1;
  1292. white-space: nowrap;
  1293. overflow: hidden;
  1294. text-overflow: ellipsis;
  1295. font-size: 14px;
  1296. }
  1297. }
  1298. }
  1299. .linep .van-cell__title {
  1300. color: #646566;
  1301. font-weight: 500;
  1302. font-size: 14px;
  1303. }
  1304. }
  1305. .VisitSummaryAdd {
  1306. .van-popup {
  1307. .tips {
  1308. width: 100%;
  1309. height: 40px;
  1310. display: flex;
  1311. align-items: center;
  1312. justify-content: center;
  1313. position: absolute;
  1314. top: 100px;
  1315. z-index: 999999;
  1316. div {
  1317. width: 80%;
  1318. height: 100%;
  1319. display: flex;
  1320. align-items: center;
  1321. justify-content: center;
  1322. text-align: center;
  1323. font-size: 15px;
  1324. background: rgba(225, 236, 250, 0.8);
  1325. border-radius: 6px;
  1326. color: #575656;
  1327. }
  1328. }
  1329. }
  1330. }
  1331. </style>