list.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610
  1. <template>
  2. <div>
  3. <FullPage
  4. title="家装订单列表"
  5. :list="set_list"
  6. @init="init"
  7. :loading="loading"
  8. @searchData="init"
  9. @changePage="changePage"
  10. @changeSize="changeSize"
  11. @selectTable="selectTable"
  12. :tableColums="computedTable"
  13. :tableData="tableData"
  14. :max-height="500"
  15. :page_index="page_index"
  16. :showPage="false"
  17. :total="total"
  18. >
  19. <div slot="titleButton" style="display: flex">
  20. <!-- v-if="persimissionData['批量导出'] || persimissionData.all" -->
  21. <Button
  22. @click="handleForceDele"
  23. type="primary"
  24. ghost
  25. style="margin-right: 10px"
  26. >强制删除</Button
  27. >
  28. <Button @click="PrintRow" type="primary" ghost style="margin-right: 10px">批量打印</Button>
  29. <Upload
  30. name="your_file"
  31. :show-upload-list="false"
  32. :headers="headers"
  33. :on-error="uploadError"
  34. :on-success="uploadSuccess"
  35. :action="$store.state.ip + '/api/orders_import'"
  36. >
  37. <Button
  38. v-if="persimissionData['批量导入'] || persimissionData.all"
  39. type="success"
  40. ghost
  41. icon="md-exit"
  42. style="margin-right: 10px"
  43. >批量导入</Button
  44. >
  45. </Upload>
  46. <Button
  47. v-if="persimissionData['批量导出'] || persimissionData.all"
  48. @click="exportData"
  49. type="warning"
  50. ghost
  51. style="margin-right: 10px"
  52. icon="md-return-left"
  53. >批量导出</Button
  54. >
  55. <Button
  56. v-if="persimissionData['批量下测量'] || persimissionData.all"
  57. type="primary"
  58. style="margin-right: 10px"
  59. @click="openLower(selectIds, '测量', '/api/orders_set_measure')"
  60. ghost
  61. >批量下测量</Button
  62. >
  63. <Button
  64. v-if="persimissionData['批量下生产'] || persimissionData.all"
  65. type="primary"
  66. @click="openLower(selectIds, '生产', '/api/order_oa_people')"
  67. ghost
  68. >批量下生产</Button
  69. >
  70. </div>
  71. <div slot="navButton" style="display: flex">
  72. <!-- v-if="persimissionData['排序设置'] || persimissionData.all" -->
  73. <Button
  74. @click="handleSortSet"
  75. type="primary"
  76. style="margin-right: 10px"
  77. ghost
  78. icon="ios-cog"
  79. >排序设置</Button
  80. >
  81. <Button
  82. v-if="persimissionData['表头设置'] || persimissionData.all"
  83. @click="setupTableHeader"
  84. type="primary"
  85. style="margin-right: 10px"
  86. ghost
  87. icon="ios-cog"
  88. >设置</Button
  89. >
  90. <Button
  91. v-if="persimissionData['新增订单'] || persimissionData.all"
  92. @click="addOrder(1)"
  93. type="primary"
  94. ghost
  95. icon="ios-add"
  96. >新增订单</Button
  97. >
  98. </div>
  99. <template slot="basicTypeSet" slot-scope="{ row }">
  100. <div>
  101. <span
  102. v-for="item in warningList"
  103. :key="item.id"
  104. :style="{ color: item.color }"
  105. v-show="item.id == row.warning_state"
  106. >{{ item.title }}</span
  107. >
  108. </div>
  109. </template>
  110. <template slot="set" slot-scope="{ row }">
  111. <div>
  112. <!-- v-if="persimissionData['收款'] || persimissionData.all" -->
  113. <a @click="handleOrderCopy(row)" style="margin: 0 5px">拷贝</a>
  114. <a
  115. v-if="persimissionData['收款'] || persimissionData.all"
  116. @click="handleOpenCharge(row, '收款', '/api/orders_set_measure')"
  117. style="margin: 0 5px"
  118. >收款</a
  119. >
  120. <a
  121. v-if="persimissionData['下生产'] || persimissionData.all"
  122. v-show="row.state < 4"
  123. @click="openLower(row, '生产', '/api/order_oa_people')"
  124. style="margin: 0 5px"
  125. >下生产</a
  126. >
  127. <a
  128. v-if="
  129. (persimissionData['编辑'] || persimissionData.all) &&
  130. row.state == 0
  131. "
  132. style="margin: 0 5px"
  133. @click="addOrder(2, row)"
  134. >编辑</a
  135. >
  136. <a
  137. v-if="persimissionData['详情'] || persimissionData.all"
  138. style="margin: 0 5px"
  139. @click="addOrder(3, row)"
  140. >详情</a
  141. >
  142. <a
  143. v-if="
  144. (persimissionData['删除'] || persimissionData.all) &&
  145. row.state == 0
  146. "
  147. style="margin: 0 5px"
  148. @click="delItems(row)"
  149. >删除</a
  150. >
  151. </div>
  152. </template>
  153. <template slot="pageSlot">
  154. <div class="pageSlotStyle">
  155. <Page
  156. :page-size-opts="[10, 20, 30, 40, 100, 1000]"
  157. @on-page-size-change="changeSize"
  158. @on-change="changePage"
  159. :current="page_index"
  160. show-total
  161. :total="total"
  162. show-sizer
  163. :page-size="page_size"
  164. />
  165. </div>
  166. </template>
  167. </FullPage>
  168. <Modal
  169. v-model="chargeModal"
  170. title="收款"
  171. @on-ok="handleChargeModalOk"
  172. @on-cancel="chargeModal = false"
  173. >
  174. <div>
  175. <Form :model="chargeModalForm" :label-width="80">
  176. <FormItem label="收款项目:">
  177. <Input
  178. type="text"
  179. v-model="chargeModalForm.title"
  180. placeholder="请输入收款项目"
  181. />
  182. </FormItem>
  183. <FormItem label="收款金额:">
  184. <Input
  185. type="text"
  186. v-model="chargeModalForm.price"
  187. placeholder="请输入收款金额"
  188. />
  189. </FormItem>
  190. <FormItem label="备注:">
  191. <Input
  192. type="text"
  193. v-model="chargeModalForm.remark"
  194. placeholder="请输入备注"
  195. />
  196. </FormItem>
  197. </Form>
  198. <Table
  199. :columns="modalChargeTablecolumns"
  200. border
  201. :data="modalChargeTableData"
  202. ></Table>
  203. </div>
  204. </Modal>
  205. <Modal
  206. v-model="showModal"
  207. title="设置"
  208. @on-ok="handleModalOk"
  209. @on-cancel="showModal = false"
  210. >
  211. <div class="modal_content">
  212. <Tabs
  213. value="name1"
  214. style="max-height: 700px; overflow: hidden; overflow-y: auto"
  215. >
  216. <TabPane label="表单设置" name="name1">
  217. <Table
  218. :columns="formModalColumns"
  219. border
  220. draggable
  221. @on-drag-drop="(a, b) => onDragDrop(a, b, formModalTableData, 1)"
  222. :data="formModalTableData"
  223. ></Table>
  224. </TabPane>
  225. <TabPane label="表头设置" name="name2">
  226. <Table
  227. :columns="tableModalColumns"
  228. border
  229. draggable
  230. @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData, 2)"
  231. :data="tableModalTableData"
  232. ></Table>
  233. </TabPane>
  234. </Tabs>
  235. </div>
  236. </Modal>
  237. <!-- 排序设置弹窗 -->
  238. <Modal v-model="showSortModal" title="排序设置" width="650">
  239. <div>
  240. <Form
  241. :label-width="80"
  242. inline
  243. v-for="(_item, _index) in sortList"
  244. :key="_index"
  245. >
  246. <FormItem :label="'关键字' + (_index + 1)">
  247. <Select filterable clearable transfer v-model="_item.value">
  248. <Option
  249. v-for="item of headerList"
  250. :key="item.key"
  251. :label="item.title"
  252. :disabled="
  253. item.title == '操作' ||
  254. item.title == '已收款' ||
  255. item.title == '未收款'
  256. "
  257. :value="item.key"
  258. ></Option>
  259. </Select>
  260. </FormItem>
  261. <FormItem label="排序方式">
  262. <Select
  263. style="width:150px"
  264. filterable
  265. clearable
  266. transfer
  267. v-model="_item.sort"
  268. >
  269. <Option label="升序" :value="1"></Option>
  270. <Option label="降序" :value="2"></Option>
  271. </Select>
  272. </FormItem>
  273. <FormItem :label-width="10">
  274. <Icon
  275. @click="
  276. handleSortListChange(sortList, 0, _index, {
  277. sort: null,
  278. level: sortList.length + 1,
  279. value: '',
  280. })
  281. "
  282. style="'margin:0 10px"
  283. size="20"
  284. type="ios-add"
  285. />
  286. <Icon
  287. @click="handleSortListChange(sortList, 1, _index, null)"
  288. v-show="sortList.length > 1"
  289. style="'margin:0 10px"
  290. size="20"
  291. type="ios-remove"
  292. />
  293. </FormItem>
  294. </Form>
  295. </div>
  296. <div slot="footer">
  297. <Button
  298. @click="showSortModal = false"
  299. type="primary"
  300. style="margin-right: 10px"
  301. >取消</Button
  302. >
  303. <Button
  304. @click="handleConfirmSort"
  305. type="primary"
  306. style="margin-right: 10px"
  307. >确定</Button
  308. >
  309. </div>
  310. </Modal>
  311. <Modal v-model="showPrint" title="确认打印" width="300" @on-ok="printOk">
  312. <div style="text-align:center">是否打印?</div>
  313. </Modal>
  314. <div class="print-table" ref="print" style="position: absolute;top:900px;left:100px;background-color:red">
  315. <table cellspacing="0" cellpadding="0" v-for="(item,index) in newArr" :key="index" class="print-cell">
  316. <thead>
  317. <tr>
  318. <td colspan="23" style="border: 0;">
  319. <div class="table-header">
  320. <img class="left-img" :src='$store.state.ip + showTable.logo' alt="" v-show="showTable.logo?true:false">
  321. <h1 class="table-title">{{showTable.title}}</h1><img class="right-img1" :src='$store.state.ip + showTable.right_logo1' alt="" v-show="showTable.right_logo1?true:false"><img class="right-img2" :src='$store.state.ip + showTable.right_logo2' alt="" v-show="showTable.right_logo2?true:false">
  322. </div>
  323. </td>
  324. </tr>
  325. <tr>
  326. <td colspan="23">
  327. <p style="text-align: left;padding-left: 20px;"><span class="part_content"
  328. style="font-size:16px;margin-right:40px">{{showTable.part_content}}</span><span class="custom">{{showTable.custom}}</span></p>
  329. </td>
  330. </tr>
  331. <tr class="header">
  332. <td rowspan="2">
  333. <p>序号</p>
  334. </td>
  335. <td rowspan="2">
  336. <p style="width:80px ;">位置</p>
  337. </td>
  338. <td rowspan="2">
  339. <p style="width:80px ;">材质</p>
  340. </td>
  341. <td rowspan="2">
  342. <p style="width:80px ;">型号</p>
  343. </td>
  344. <td rowspan="2">
  345. <p style="width:80px ;">工艺</p>
  346. </td>
  347. <td rowspan="2">
  348. <p style="width:80px ;">木皮/颜色</p>
  349. </td>
  350. <td>
  351. <p>门洞尺寸(MM)</p>
  352. </td>
  353. <td>
  354. <p>门扇尺寸(MM)</p>
  355. </td>
  356. <td>
  357. <p>门套尺寸 (MM)</p>
  358. </td>
  359. <td rowspan="2">
  360. <p>数量</p>
  361. </td>
  362. <td rowspan="2">
  363. <p>单位</p>
  364. </td>
  365. <td>
  366. <p>平方</p>
  367. </td>
  368. <td rowspan="2">
  369. <p>单价</p>
  370. </td>
  371. <td rowspan="2">
  372. <p>附加</p>
  373. </td>
  374. <td rowspan="2">
  375. <p>金额</p>
  376. </td>
  377. <td rowspan="2">
  378. <p>备注</p>
  379. </td>
  380. </tr>
  381. <tr class="header">
  382. <td>
  383. <p>高*宽*厚度</p>
  384. </td>
  385. <td>
  386. <p>高*宽*厚度</p>
  387. </td>
  388. <td>
  389. <p>高*宽*厚度</p>
  390. </td>
  391. <td>
  392. <p>米</p>
  393. </td>
  394. </tr>
  395. </thead>
  396. <tbody class="content" >
  397. <tr v-for="(_item,_index) in item" :key="_index">
  398. <td>
  399. <p>{{_item.sort}}</p>
  400. </td>
  401. <td>
  402. <p>{{_item.postion}}</p>
  403. </td>
  404. <td>
  405. <p>{{_item.process}}</p>
  406. </td>
  407. <td>
  408. <p>{{_item.model}}</p>
  409. </td>
  410. <td>
  411. <p>{{_item.workmanship}}</p>
  412. </td>
  413. <td>
  414. <p>{{_item.color}}</p>
  415. </td>
  416. <td>
  417. <p>{{_item.measure1}}</p>
  418. </td>
  419. <td>
  420. <p>{{_item.measure2}}</p>
  421. </td>
  422. <td>
  423. <p>{{_item.measure3}}</p>
  424. </td>
  425. <td>
  426. <p>{{_item.num}}</p>
  427. </td>
  428. <td>
  429. <p>{{_item.unit}}</p>
  430. </td>
  431. <td>
  432. <p>{{_item.square}}</p>
  433. </td>
  434. <td>
  435. <p>{{_item.unit_price}}</p>
  436. </td>
  437. <td>
  438. <p>{{_item.ext}}</p>
  439. </td>
  440. <td>
  441. <p>{{_item.price}}</p>
  442. </td>
  443. <td>
  444. <p>{{_item.remark}}</p>
  445. </td>
  446. </tr>
  447. </tbody>
  448. <tfoot>
  449. <tr>
  450. <td class="amount-index" align="center">{{showTable.list.length + 1}}</td>
  451. <td colspan="11"></td>
  452. <td colspan="2">合计:</td>
  453. <td class="xt_total">{{showTable.foot.xt_total}}</td>
  454. <td></td>
  455. </tr>
  456. <tr>
  457. <td colspan="12" class="remark" style="padding-left: 20px;">{{showTable.foot.remark}}</td>
  458. <td colspan="2">返点:</td>
  459. <td class="return">{{showTable.foot.return}}</td>
  460. <td></td>
  461. </tr>
  462. <tr>
  463. <td colspan="12" class="remark1" style="padding-left: 20px;">{{showTable.foot.remark1}}</td>
  464. <td colspan="2">尾款:</td>
  465. <td class="end_price">{{showTable.foot.end_price}}</td>
  466. <td></td>
  467. </tr>
  468. <tr>
  469. <td colspan="16" style="padding-left: 20px;">
  470. <span class="amount_detail" style="height: 24px;">{{showTable.foot.amount_detail}}</span>
  471. </td>
  472. </tr>
  473. <tr>
  474. <td colspan="16" class="order_info" style="padding-left: 20px;">
  475. <!-- 客户备注:<span
  476. class="customer_remark">{{showTable.foot.customer_remark}}</span> -->
  477. 订货日期:<span class="crt_time">{{showTable.foot.crt_time}}</span>交货日期:<span
  478. class="end_time">{{showTable.foot.end_time}}</span>业务经理:<span class="saleman">{{showTable.foot.saleman}}</span>制单人:<span
  479. class="crt_id">{{showTable.foot.crt_id}}</span>审核:<span class="oa">{{showTable.foot.oa}}</span>客户确认:<span class="is_confirm">{{showTable.foot.is_confirm}}</span></td>
  480. </tr>
  481. </tfoot>
  482. </table>
  483. </div>
  484. </div>
  485. </template>
  486. <script>
  487. import { mapState } from "vuex";
  488. export default {
  489. data() {
  490. return {
  491. showTableContentStr:[],
  492. showTable:{
  493. list:[],
  494. foot:{}
  495. },
  496. newArr:'',
  497. printData:[],
  498. showPrint:false,
  499. tableColums: [
  500. {
  501. type: "selection",
  502. align: "center",
  503. key: "selection",
  504. minWidth: 100,
  505. fixed: "left",
  506. title: "全选",
  507. },
  508. { title: "订单编号", align: "center", key: "order_no", minWidth: 200 },
  509. {
  510. title: "项目名称",
  511. align: "center",
  512. key: "residential_name",
  513. minWidth: 200,
  514. },
  515. { title: "业务员", align: "center", key: "nickname", minWidth: 150 },
  516. {
  517. title: "负责人",
  518. align: "center",
  519. key: "leading_name",
  520. minWidth: 150,
  521. },
  522. {
  523. title: "客户姓名",
  524. align: "center",
  525. key: "client_name",
  526. minWidth: 150,
  527. },
  528. { title: "客户地址", align: "center", key: "address", minWidth: 200 },
  529. {
  530. title: "紧急程度",
  531. align: "center",
  532. key: "warning_state",
  533. minWidth: 100,
  534. slot: "basicTypeSet",
  535. },
  536. {
  537. title: "产品总价",
  538. align: "center",
  539. key: "predict_price",
  540. minWidth: 120,
  541. },
  542. { title: "折扣金额", align: "center", key: "fax_price", minWidth: 120 },
  543. {
  544. title: "订单金额",
  545. align: "center",
  546. key: "price",
  547. minWidth: 120,
  548. render(h, params) {
  549. return h(
  550. "span",
  551. {},
  552. (params.row.predict_price - params.row.fax_price).toFixed(2)
  553. );
  554. },
  555. },
  556. { title: "已收款", align: "center", key: "get_money", minWidth: 120 },
  557. {
  558. title: "未收款",
  559. align: "center",
  560. key: "unget_money",
  561. minWidth: 120,
  562. render(h, params) {
  563. return h(
  564. "span",
  565. {},
  566. (
  567. params.row.predict_price -
  568. params.row.fax_price -
  569. params.row.get_money
  570. ).toFixed(2)
  571. );
  572. },
  573. },
  574. {
  575. title: "备注",
  576. align: "center",
  577. key: "remark",
  578. minWidth: 100,
  579. tooltip: true,
  580. },
  581. {
  582. title: "订单开始日期",
  583. align: "center",
  584. minWidth: 180,
  585. key: "start_time",
  586. render: (h, params) =>
  587. h("span", {}, this.func.replaceDate(params.row.start_time, 1)),
  588. },
  589. {
  590. title: "订单交付日期",
  591. align: "center",
  592. minWidth: 180,
  593. key: "end_time",
  594. render: (h, params) =>
  595. h("span", {}, this.func.replaceDate(params.row.end_time, 1)),
  596. },
  597. {
  598. title: "生产进度",
  599. align: "center",
  600. key: "complete_rate",
  601. minWidth: 180,
  602. render(h, params) {
  603. return h(
  604. "span",
  605. {},
  606. parseInt(params.row.complete_rate * 100) + "%"
  607. );
  608. },
  609. },
  610. {
  611. title: "订单状态",
  612. align: "center",
  613. key: "state",
  614. minWidth: 150,
  615. render: (h, params) =>
  616. h(
  617. "span",
  618. {},
  619. params.row.state == 0
  620. ? "订单未审核"
  621. : params.row.state == 1
  622. ? "测量未审核"
  623. : params.row.state == 2
  624. ? "测量审核中"
  625. : params.row.state == 3
  626. ? "测量通过"
  627. : params.row.state == 4
  628. ? "生产中"
  629. : params.row.state == 5
  630. ? "生产审核中"
  631. : params.row.state == 6
  632. ? "生产通过"
  633. : params.row.state == 7
  634. ? "到生产计划"
  635. : params.row.state == 8
  636. ? "派工"
  637. : params.row.state == 9
  638. ? "包装"
  639. : params.row.state == 10
  640. ? "发货"
  641. : "安装"
  642. ),
  643. },
  644. {
  645. title: "制单人",
  646. align: "center",
  647. minWidth: 180,
  648. key: "crt_name",
  649. // render: (h, params) => {
  650. // const { row } = params;
  651. // let text = "";
  652. // this.users.map(
  653. // (item) => item.id == row.crt_id && (text = item.nickname)
  654. // );
  655. // return h("span", {}, text);
  656. // },
  657. },
  658. {
  659. title: "订单创建时间",
  660. align: "center",
  661. minWidth: 180,
  662. key: "crt_time",
  663. render: (h, params) =>
  664. h("span", {}, this.func.replaceDate(params.row.crt_time)),
  665. },
  666. // {
  667. // title: '预估交付日期', align: 'center', minWidth: 200, key: 'predict_time',
  668. // render: (h, params) => h('span', {}, this.func.replaceDate(params.row.predict_time, 1))
  669. // },
  670. {
  671. title: "操作",
  672. align: "center",
  673. key: "set",
  674. slot: "set",
  675. fixed: "right",
  676. minWidth: 220,
  677. },
  678. ],
  679. modalChargeTablecolumns: [
  680. { title: "收款项目", align: "center", key: "title" },
  681. { title: "收款金额", align: "center", key: "price" },
  682. {
  683. title: "收款时间",
  684. align: "center",
  685. key: "crt_time",
  686. render: (h, params) =>
  687. h("span", {}, this.func.replaceDate(params.row.crt_time)),
  688. },
  689. { title: "收款备注", align: "center", key: "remark" },
  690. ],
  691. modalChargeTableData: [],
  692. client_name_list:[],
  693. address_list:[],
  694. tableData: [],
  695. page_index: 1,
  696. page_size: 10,
  697. total: 0,
  698. show_lower: false,
  699. postInfo: {
  700. //下测量数据
  701. order_no: "",
  702. start_time: "",
  703. end_time: "",
  704. user_id: null,
  705. },
  706. users: [],
  707. selectIds: null,
  708. loading: false,
  709. proxyObj: {},
  710. headers: { Authorization: localStorage.getItem("token") },
  711. showModal: false,
  712. formModalColumns: [
  713. {
  714. title: "是否展示",
  715. align: "center",
  716. key: "is_show",
  717. minWidth: 60,
  718. render: (h, params) => {
  719. const { index } = params;
  720. const currentRow = JSON.parse(
  721. JSON.stringify(this.formModalTableData[index])
  722. );
  723. return h("Checkbox", {
  724. props: {
  725. value: currentRow.is_show,
  726. },
  727. on: {
  728. "on-change": (e) => {
  729. currentRow.is_show = e;
  730. this.formModalTableData.splice(index, 1, currentRow);
  731. },
  732. },
  733. });
  734. },
  735. },
  736. {
  737. title: "字段名",
  738. align: "center",
  739. key: "value",
  740. minWidth: 100,
  741. },
  742. {
  743. title: "展示名称",
  744. align: "center",
  745. key: "title",
  746. minWidth: 100,
  747. render: (h, params) => {
  748. const { index } = params;
  749. const currentRow = JSON.parse(
  750. JSON.stringify(this.formModalTableData[index])
  751. );
  752. return h("Input", {
  753. props: {
  754. value: currentRow.title,
  755. type: "text",
  756. },
  757. on: {
  758. "on-change": (e) => {
  759. currentRow.title = e.target.value;
  760. this.formModalTableData.splice(index, 1, currentRow);
  761. },
  762. },
  763. });
  764. },
  765. },
  766. ],
  767. formModalTableData: [
  768. {
  769. is_show: true,
  770. key: "order_no",
  771. value: "订单编号",
  772. title: "订单编号",
  773. },
  774. {
  775. is_show: true,
  776. key: "residential_name",
  777. value: "项目名称",
  778. title: "项目名称",
  779. },
  780. {
  781. is_show: true,
  782. key: "client_name",
  783. value: "客户姓名",
  784. title: "客户姓名",
  785. },
  786. { is_show: true, key: "address", value: "客户地址", title: "客户地址" },
  787. { is_show: true, key: "salesman", value: "业务员", title: "业务员" },
  788. { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
  789. { is_show: true, key: "crt_id", value: "制单人", title: "制单人" },
  790. {
  791. is_show: true,
  792. key: "leading_name",
  793. value: "负责人",
  794. title: "负责人",
  795. },
  796. {
  797. is_show: true,
  798. key: "warning_state",
  799. value: "紧急程度",
  800. title: "紧急程度",
  801. },
  802. {
  803. is_show: true,
  804. key: "",
  805. value: "订单创建时间",
  806. title: "订单创建时间",
  807. },
  808. ],
  809. formSet: [],
  810. tableModalColumns: [
  811. {
  812. title: "是否展示",
  813. align: "center",
  814. key: "is_show",
  815. minWidth: 60,
  816. render: (h, params) => {
  817. const { index } = params;
  818. const currentRow = JSON.parse(
  819. JSON.stringify(this.tableModalTableData[index])
  820. );
  821. return h("Checkbox", {
  822. props: {
  823. value: currentRow.is_show,
  824. },
  825. on: {
  826. "on-change": (e) => {
  827. currentRow.is_show = e;
  828. this.tableModalTableData.splice(index, 1, currentRow);
  829. },
  830. },
  831. });
  832. },
  833. },
  834. {
  835. title: "字段名",
  836. align: "center",
  837. key: "value",
  838. minWidth: 100,
  839. },
  840. {
  841. title: "展示名称",
  842. align: "center",
  843. key: "title",
  844. minWidth: 100,
  845. render: (h, params) => {
  846. const { index } = params;
  847. const currentRow = JSON.parse(
  848. JSON.stringify(this.tableModalTableData[index])
  849. );
  850. return h("Input", {
  851. props: {
  852. value: currentRow.title,
  853. type: "text",
  854. disabled: currentRow.title == "全选" ? true : false,
  855. },
  856. on: {
  857. "on-change": (e) => {
  858. currentRow.title = e.target.value;
  859. this.tableModalTableData.splice(index, 1, currentRow);
  860. },
  861. },
  862. });
  863. },
  864. },
  865. ],
  866. sub_formModalTableData: [],
  867. tableModalTableData: [
  868. { is_show: true, key: "selection", value: "全选", title: "全选" },
  869. {
  870. is_show: true,
  871. key: "order_no",
  872. value: "订单编号",
  873. title: "订单编号",
  874. },
  875. {
  876. is_show: true,
  877. key: "residential_name",
  878. value: "项目名称",
  879. title: "项目名称",
  880. },
  881. { is_show: true, key: "nickname", value: "业务员", title: "业务员" },
  882. {
  883. is_show: true,
  884. key: "client_name",
  885. value: "客户姓名",
  886. title: "客户姓名",
  887. },
  888. { is_show: true, key: "address", value: "客户地址", title: "客户地址" },
  889. {
  890. is_show: true,
  891. key: "leading_name",
  892. value: "负责人",
  893. title: "负责人",
  894. },
  895. {
  896. is_show: true,
  897. key: "warning_state",
  898. value: "紧急程度",
  899. title: "紧急程度",
  900. },
  901. {
  902. is_show: true,
  903. key: "predict_price",
  904. value: "产品总价",
  905. title: "产品总价",
  906. },
  907. {
  908. is_show: true,
  909. key: "fax_price",
  910. value: "折扣金额",
  911. title: "折扣金额",
  912. },
  913. { is_show: true, key: "price", value: "订单金额", title: "订单金额" },
  914. { is_show: true, key: "get_money", value: "已收款", title: "已收款" },
  915. { is_show: true, key: "unget_money", value: "未收款", title: "未收款" },
  916. { is_show: true, key: "remark", value: "备注", title: "备注" },
  917. {
  918. is_show: true,
  919. key: "start_time",
  920. value: "订单开始日期",
  921. title: "订单开始日期",
  922. },
  923. {
  924. is_show: true,
  925. key: "end_time",
  926. value: "订单交付日期",
  927. title: "订单交付日期",
  928. },
  929. {
  930. is_show: true,
  931. key: "complete_rate",
  932. value: "生产进度",
  933. title: "生产进度",
  934. },
  935. { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
  936. { is_show: true, key: "crt_name", value: "制单人", title: "制单人" },
  937. {
  938. is_show: true,
  939. key: "crt_time",
  940. value: "订单创建时间",
  941. title: "订单创建时间",
  942. },
  943. { is_show: true, key: "set", value: "操作", title: "操作" },
  944. ],
  945. sub_tableModalTableData: [],
  946. tableSet: [],
  947. currencyPageId: null,
  948. chargeModal: false,
  949. chargeModalForm: {
  950. order_no: null,
  951. title: null,
  952. price: null,
  953. remark: null,
  954. },
  955. warningList: [],
  956. showSortModal: false,
  957. sortList: [{ sort: null, level: 1, value: "" }],
  958. headerList: [],
  959. leadingList: [],
  960. };
  961. },
  962. computed: {
  963. ...mapState(["persimissionData"]),
  964. set_list() {
  965. if (this.sub_formModalTableData.length < 1) {
  966. this.list;
  967. }
  968. return this.func.computedForm(this.sub_formModalTableData, this.list);
  969. },
  970. list() {
  971. return [
  972. {
  973. title: "订单编号",
  974. name: "Input",
  975. placeholder: "请输入订单编号",
  976. value: "",
  977. serverName: "order_no",
  978. },
  979. {
  980. title: "项目名称",
  981. name: "Input",
  982. placeholder: "请输入项目名称",
  983. value: "",
  984. serverName: "residential_name",
  985. },
  986. {
  987. title: "客户姓名",
  988. name: "Select",
  989. placeholder: "请输入客户姓名",
  990. filterable: true,
  991. value: "",
  992. serverName: "client_name",
  993. optionName: "client_name",
  994. optionValue: "client_name",
  995. option: this.client_name_list,
  996. },
  997. {
  998. title: "客户地址",
  999. name: "Select",
  1000. placeholder: "请输入客户地址",
  1001. filterable: true,
  1002. value: "",
  1003. serverName: "address",
  1004. optionName: "address",
  1005. optionValue: "address",
  1006. option: this.address_list,
  1007. },
  1008. {
  1009. title: "业务员",
  1010. name: "Select",
  1011. placeholder: "请输入业务员",
  1012. filterable: true,
  1013. value: "",
  1014. serverName: "salesman",
  1015. optionName: "nickname",
  1016. optionValue: "nickname",
  1017. option: this.users,
  1018. },
  1019. {
  1020. title: "订单状态",
  1021. name: "Select",
  1022. placeholder: "请选择订单状态",
  1023. serverName: "state",
  1024. value: "",
  1025. option: [
  1026. { label: "全部", value: 0 },
  1027. { label: "测量未审核", value: 1 },
  1028. { label: "测量审核中", value: 2 },
  1029. { label: "测量通过", value: 3 },
  1030. { label: "生产中", value: 4 },
  1031. { label: "生产审核中", value: 5 },
  1032. { label: "生产通过", value: 6 },
  1033. { label: "到生产计划", value: 7 },
  1034. { label: "派工", value: 8 },
  1035. { label: "包装", value: 9 },
  1036. { label: "发货", value: 10 },
  1037. { label: "安装", value: 11 },
  1038. ],
  1039. },
  1040. {
  1041. title: "紧急程度",
  1042. name: "Select",
  1043. placeholder: "请选择紧急程度",
  1044. optionName: "title",
  1045. optionValue: "id",
  1046. serverName: "warning_state",
  1047. value: "",
  1048. option: this.warningList,
  1049. },
  1050. {
  1051. title: "制单人",
  1052. name: "Select",
  1053. placeholder: "请选择制单人",
  1054. filterable: true,
  1055. value: "",
  1056. serverName: "crt_id",
  1057. optionName: "nickname",
  1058. optionValue: "id",
  1059. option: this.users,
  1060. },
  1061. {
  1062. title: "负责人",
  1063. name: "Select",
  1064. placeholder: "请选择负责人",
  1065. filterable: true,
  1066. value: "",
  1067. serverName: "leading_name",
  1068. optionName: "leading_name",
  1069. optionValue: "leading_name",
  1070. option: this.leadingList,
  1071. },
  1072. {
  1073. title: "订单创建时间",
  1074. start_server: "start_time",
  1075. end_server: "end_time",
  1076. name: "Input",
  1077. start_value: "",
  1078. end_value: "",
  1079. isDate: true,
  1080. start_placeholder: "开始日期",
  1081. end_placeholder: "结束日期",
  1082. },
  1083. ];
  1084. },
  1085. computedTable() {
  1086. if (this.sub_tableModalTableData.length < 1) {
  1087. return this.tableColums;
  1088. }
  1089. return this.func.computedHeader(
  1090. this.sub_tableModalTableData,
  1091. this.tableColums
  1092. );
  1093. },
  1094. },
  1095. watch: {
  1096. computedTable() {
  1097. if (this.computedTable[0].title == "全选") {
  1098. this.headerList = JSON.parse(JSON.stringify(this.computedTable));
  1099. this.headerList.splice(0, 1);
  1100. } else {
  1101. this.headerList = this.computedTable;
  1102. }
  1103. },
  1104. },
  1105. created() {
  1106. // 获取紧急程度
  1107. this.axios.get("/api/warning_list").then((res) => {
  1108. this.warningList = res.data.data;
  1109. });
  1110. // 获取负责人
  1111. this.axios.get("/api/custom__detail_list").then((res) => {
  1112. this.leadingList = res.data;
  1113. });
  1114. this.axios("/api/user", { params: { type: 1 } }).then(
  1115. (res) => (this.users = res.data.data)
  1116. );
  1117. // this.$store.state.navgationData[0].sub[0].sub[0]
  1118. this.currencyPageId = this.$store.state.navgationData[0].sub[0].sub[0].id;
  1119. },
  1120. beforeRouteLeave(to, from, next) {
  1121. if (to.path != "/cms/ordermannage/businessorderlist/edit") {
  1122. this.$route.meta.keepAlive = false;
  1123. } else {
  1124. this.$route.meta.keepAlive = true;
  1125. }
  1126. next();
  1127. },
  1128. beforeRouteEnter(to, from, next) {
  1129. next((vm) => {
  1130. vm.getData(vm.proxyObj);
  1131. });
  1132. },
  1133. methods: {
  1134. chunk(array, size) {
  1135. //获取数组的长度,如果你传入的不是数组,那么获取到的就是undefined
  1136. const length = array.length
  1137. //判断不是数组,或者size没有设置,size小于1,就返回空数组
  1138. if (!length || !size || size < 1) {
  1139. return []
  1140. }
  1141. //核心部分
  1142. let index = 0 //用来表示切割元素的范围start
  1143. let resIndex = 0 //用来递增表示输出数组的下标
  1144. //根据length和size算出输出数组的长度,并且创建它。
  1145. let result = new Array(Math.ceil(length / size))
  1146. //进行循环
  1147. while (index < length) {
  1148. //循环过程中设置result[0]和result[1]的值。该值根据array.slice切割得到。
  1149. result[resIndex++] = array.slice(index, (index += size))
  1150. }
  1151. //输出新数组
  1152. return result
  1153. },
  1154. PrintRow(){
  1155. this.printData.forEach(v=>{
  1156. this.axios({
  1157. method:'get',
  1158. url:'/api/printe_order_detail',
  1159. params:{
  1160. ...v
  1161. }
  1162. }).then(res=>{
  1163. console.log(res)
  1164. this.showTableContentStr = res.msg.list
  1165. this.showTable = res.msg
  1166. this.newArr = this.chunk(this.showTableContentStr,15)
  1167. });
  1168. })
  1169. this.showPrint = true;
  1170. },
  1171. printOk(){
  1172. },
  1173. init(row) {
  1174. this.page_index = 1;
  1175. row.page_index = this.page_index;
  1176. row.page_size = this.page_size;
  1177. this.proxyObj = row;
  1178. this.getData(row);
  1179. },
  1180. getData(row) {
  1181. this.loading = true;
  1182. this.axios("/api/order_list_new", {
  1183. params: { ...row },
  1184. }).then((res) => {
  1185. if (res.code == 200) {
  1186. this.loading = false;
  1187. if (!res.data.data) {
  1188. return this.$Message.error("列表数据返回格式不正确");
  1189. }
  1190. this.tableData = res.data.data;
  1191. this.total = res.data.total;
  1192. this.handleSetHeader(res);
  1193. for(let i = 0;i<res.data.address.length;i++){
  1194. this.address_list.push({address:res.data.address[i]})
  1195. }
  1196. for(let i = 0;i<res.data.client_name.length;i++){
  1197. this.client_name_list.push({client_name:res.data.client_name[i]})
  1198. }
  1199. }
  1200. });
  1201. },
  1202. handleSetHeader(res) {
  1203. this.tableModalTableData =
  1204. res.data.tableSet.tableSet.length < 1
  1205. ? this.tableModalTableData
  1206. : res.data.tableSet.tableSet;
  1207. this.formModalTableData =
  1208. res.data.tableSet.formSet.length < 1
  1209. ? this.formModalTableData
  1210. : res.data.tableSet.formSet;
  1211. this.sub_formModalTableData = JSON.parse(
  1212. JSON.stringify(this.formModalTableData)
  1213. );
  1214. this.sub_tableModalTableData = JSON.parse(
  1215. JSON.stringify(this.tableModalTableData)
  1216. );
  1217. },
  1218. changePage(e) {
  1219. this.page_index = e;
  1220. this.proxyObj.page_index = this.page_index;
  1221. const sortList = this.sortList.filter((item) => item.sort);
  1222. this.proxyObj.sortList = sortList;
  1223. this.getData(this.proxyObj);
  1224. },
  1225. changeSize(e) {
  1226. this.page_size = e;
  1227. this.proxyObj.page_size = this.page_size;
  1228. const sortList = this.sortList.filter((item) => item.sort);
  1229. this.proxyObj.sortList = sortList;
  1230. this.getData(this.proxyObj);
  1231. },
  1232. addOrder(n, row) {
  1233. let order_no = row ? row.order_no : "";
  1234. this.$router.push({
  1235. path:
  1236. this.$store.state.userInfo.is_agent == 1
  1237. ? "/cms/ordermannage/businessorderlist/agentorder"
  1238. : "/cms/ordermannage/businessorderlist/edit",
  1239. query: {
  1240. type: n,
  1241. order_no,
  1242. },
  1243. });
  1244. },
  1245. handleChargeModalOk() {
  1246. this.axios
  1247. .post("/api/order_price_add", { ...this.chargeModalForm })
  1248. .then((res) => {
  1249. if (res.code == 200) {
  1250. this.$Message.success(res.msg);
  1251. this.chargeModal = false;
  1252. }
  1253. });
  1254. },
  1255. handleOrderCopy(row) {
  1256. this.axios
  1257. .post("/api/support_order_copy", { order_no: row.order_no })
  1258. .then((res) => {
  1259. if (res.code == 200) {
  1260. this.init(this.proxyObj);
  1261. }
  1262. });
  1263. },
  1264. handleOpenCharge(row) {
  1265. this.chargeModalForm.order_no = row.order_no;
  1266. this.chargeModalForm.title = "";
  1267. this.chargeModalForm.price = "";
  1268. this.chargeModalForm.remark = "";
  1269. this.axios
  1270. .get("/api/order_price", { params: { order_no: row.order_no } })
  1271. .then((res) => {
  1272. this.modalChargeTableData = res.data;
  1273. this.chargeModal = true;
  1274. this.init(this.proxyObj);
  1275. });
  1276. },
  1277. openLower(row, title, url) {
  1278. console.log("row :>> ", row);
  1279. if (!row) {
  1280. return this.$Message.warning("请至少选择一项");
  1281. }
  1282. this.postInfo.order_no = Array.isArray(row)
  1283. ? row.join(",")
  1284. : row.order_no;
  1285. if(title==="测量"){ this.$Modal.confirm({
  1286. title: "批量下测量",
  1287. content: "确定下测量?",
  1288. onOk: () => {
  1289. this.axios({
  1290. method: "post",
  1291. url,
  1292. data: {
  1293. order_no: this.postInfo.order_no,
  1294. },
  1295. }).then((res) => {
  1296. if (res.code == 200) {
  1297. this.$Message.success(res.msg);
  1298. this.getData(this.proxyObj);
  1299. }
  1300. });
  1301. },
  1302. onCancel: () => {},
  1303. });}
  1304. else{
  1305. this.$Modal.confirm({
  1306. title: "批量下生产",
  1307. content: "确定下生产?",
  1308. onOk: () => {
  1309. this.axios({
  1310. method: "post",
  1311. url,
  1312. data: {
  1313. order_no: this.postInfo.order_no,
  1314. },
  1315. }).then((res) => {
  1316. if (res.code == 200) {
  1317. this.$Message.success(res.msg);
  1318. this.getData(this.proxyObj);
  1319. }
  1320. });
  1321. },
  1322. onCancel: () => {},
  1323. });}
  1324. // this.dowmMeasurement({
  1325. // url,
  1326. // title,
  1327. // params: this.postInfo,
  1328. // then: () => {
  1329. // this.selectIds = [];
  1330. // this.postInfo = {};
  1331. // this.getData(this.proxyObj);
  1332. // },
  1333. // cancel: () => {
  1334. // this.postInfo = {};
  1335. // },
  1336. // });
  1337. },
  1338. selectTable(e) {
  1339. let result = [];
  1340. let printData=[];
  1341. e.map(item=>{
  1342. printData.push({order_no:item.order_no,box_id:item.box_id})
  1343. })
  1344. e.map((v) => result.push(v.order_no));
  1345. this.selectIds = result;
  1346. this.printData = printData;
  1347. console.log(this.printData);
  1348. },
  1349. delItems(row) {
  1350. this.confirmDelete({
  1351. content: "确认删除么?",
  1352. then: () => {
  1353. this.axios
  1354. .post("/api/order_del", { order_no: row.order_no, state: 0 })
  1355. .then((res) => {
  1356. if (res.code == 200) {
  1357. this.$Message.success(res.msg);
  1358. this.getData(this.proxyObj);
  1359. }
  1360. });
  1361. },
  1362. });
  1363. },
  1364. handleForceDele() {
  1365. if (this.selectIds && this.selectIds.length > 0) {
  1366. const p_list = this.selectIds.map((item) => {
  1367. return this.axios.post("/api/support_order_del", { order_no: item });
  1368. });
  1369. Promise.all(p_list).then((list) => {
  1370. this.init(this.proxyObj);
  1371. });
  1372. } else {
  1373. this.$Message.warning("请选择数据");
  1374. }
  1375. },
  1376. async exportData() {
  1377. const res = await this.axios("/api/orders_export", {
  1378. params: { ...this.proxyObj },
  1379. });
  1380. if (res.code == 200) {
  1381. let url = `${this.$store.state.ip}/api/storage/${res.data.file}`;
  1382. location.href = url;
  1383. }
  1384. },
  1385. uploadSuccess(res) {
  1386. if (res.code == 200) {
  1387. this.$Message.success(res.msg || "上传成功");
  1388. } else {
  1389. this.$Message.warning(res.msg || "上传失败");
  1390. }
  1391. this.getData(this.proxyObj);
  1392. },
  1393. uploadError(err) {
  1394. this.$Message.error(err.msg || "上传失败");
  1395. },
  1396. setupTableHeader() {
  1397. this.showModal = true;
  1398. return;
  1399. },
  1400. handleSortSet() {
  1401. this.showSortModal = true;
  1402. },
  1403. handleSortListChange(arr, type, index, obj) {
  1404. if (obj) {
  1405. arr.splice(index + 1, type, obj);
  1406. } else {
  1407. arr.splice(index, type);
  1408. }
  1409. },
  1410. handleConfirmSort() {
  1411. if (
  1412. this.sortList.length > 1 ||
  1413. (this.sortList.length == 1 && this.sortList[0].sort)
  1414. ) {
  1415. this.loading = true;
  1416. this.axios("/api/order_list_new", {
  1417. params: { ...this.proxyObj, sortList: this.sortList },
  1418. }).then((res) => {
  1419. if (res.code == 200) {
  1420. this.loading = false;
  1421. if (!res.data.data) {
  1422. return this.$Message.error("列表数据返回格式不正确");
  1423. }
  1424. this.tableData = res.data.data;
  1425. this.total = res.data.total;
  1426. this.showSortModal = false;
  1427. // this.tableModalTableData =
  1428. // res.data.tableSet.tableSet.length < 1
  1429. // ? this.tableModalTableData
  1430. // : res.data.tableSet.tableSet;
  1431. // this.formModalTableData =
  1432. // res.data.tableSet.formSet.length < 1
  1433. // ? this.formModalTableData
  1434. // : res.data.tableSet.formSet;
  1435. // this.sub_formModalTableData = JSON.parse(
  1436. // JSON.stringify(this.formModalTableData)
  1437. // );
  1438. // this.sub_tableModalTableData = JSON.parse(
  1439. // JSON.stringify(this.tableModalTableData)
  1440. // );
  1441. }
  1442. });
  1443. } else {
  1444. this.showSortModal = false;
  1445. }
  1446. },
  1447. onDragDrop(a, b, table, type) {
  1448. if (type == 2 && (a == 0 || b == 0)) {
  1449. return this.$Message.warning("全选位置不可变");
  1450. }
  1451. table.splice(b, 0, ...table.splice(a, 1));
  1452. },
  1453. handleModalOk() {
  1454. this.formModalTableData.forEach((element, index) => {
  1455. element.sort = index;
  1456. });
  1457. this.tableModalTableData.forEach((element, index) => {
  1458. element.sort = index;
  1459. });
  1460. this.axios({
  1461. method: "post",
  1462. url: "/api/update/table",
  1463. data: {
  1464. id: this.currencyPageId,
  1465. result: {
  1466. formSet: this.formModalTableData,
  1467. tableSet: this.tableModalTableData,
  1468. },
  1469. },
  1470. }).then((res) => {
  1471. this.$Message.success(res.msg);
  1472. this.init(this.proxyObj);
  1473. });
  1474. },
  1475. },
  1476. };
  1477. </script>
  1478. <style lang="scss" scoped>
  1479. .pageSlotStyle {
  1480. display: flex;
  1481. justify-content: center;
  1482. margin-top: 20px;
  1483. }
  1484. .modal_content {
  1485. display: flex;
  1486. justify-content: center;
  1487. // width: 500px;
  1488. }
  1489. /deep/.ivu-tabs-nav-scroll {
  1490. display: flex;
  1491. justify-content: center;
  1492. }
  1493. .printcontent{
  1494. overflow-y: auto;
  1495. overflow-x: auto;
  1496. }
  1497. h1 {
  1498. text-align: center;
  1499. font-size: 18px;
  1500. margin-bottom: 10px;
  1501. margin-top: 20px;
  1502. }
  1503. p {
  1504. text-align: center;
  1505. }
  1506. table {
  1507. width: 100%;
  1508. border-collapse: collapse;
  1509. }
  1510. td {
  1511. border: 1px solid #000;
  1512. }
  1513. .right-img1 {
  1514. position: absolute;
  1515. right: 0;
  1516. width: 150px;
  1517. margin-bottom: 10px;
  1518. height: 60px;
  1519. top: 0;
  1520. }
  1521. .right-img2 {
  1522. position: absolute;
  1523. width: 150px;
  1524. right: 180px;
  1525. margin-bottom: 10px;
  1526. height: 60px;
  1527. top: 0;
  1528. }
  1529. .table-header {
  1530. position: relative;
  1531. height: 76px;
  1532. line-height: 76px;
  1533. }
  1534. .left-img {
  1535. position: absolute;
  1536. left: 0;
  1537. width: 150px;
  1538. height: 60px;
  1539. top: 0;
  1540. }
  1541. .table-box {
  1542. padding: 0;
  1543. width: 1000px;
  1544. margin: 0 auto;
  1545. margin-top: 40px;
  1546. }
  1547. .order_info span {
  1548. margin-right: 28px;
  1549. }
  1550. .pageSeparator {
  1551. visibility: hidden;
  1552. page-break-after: always;
  1553. overflow: hidden;
  1554. height: 0px;
  1555. }
  1556. #show-table {
  1557. padding: 15px;
  1558. }
  1559. .print-table{
  1560. display: none;
  1561. }
  1562. @media print {
  1563. button {
  1564. display: none;
  1565. }
  1566. .print-table{
  1567. display: block;
  1568. width: 100%;
  1569. }
  1570. .print-cell{
  1571. color: black;
  1572. margin:16mm 8mm;
  1573. width: 262mm;
  1574. height: auto;
  1575. }
  1576. #show-table{
  1577. display: none;
  1578. }
  1579. @page {
  1580. }
  1581. }
  1582. </style>