index.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535
  1. <template>
  2. <div class="app-container">
  3. <div class="search-bx">
  4. <div class="search">
  5. <el-row :gutter="0">
  6. <el-input
  7. v-model="tableObj.getdataListParm.parammaps.customerName"
  8. placeholder="客户名称"
  9. style="width: 180px"
  10. class="filter-item"
  11. clearable
  12. />
  13. <el-select
  14. v-model="tableObj.getdataListParm.parammaps.groupId"
  15. placeholder="集团"
  16. class="filter-item"
  17. style="width: 120px"
  18. clearable
  19. >
  20. <el-option
  21. v-for="item in groupNameList"
  22. :key="item.id"
  23. :label="item.name"
  24. :value="item.id"
  25. />
  26. </el-select>
  27. <el-input
  28. v-model="tableObj.getdataListParm.parammaps.posterName"
  29. placeholder="寄件人"
  30. class="filter-item"
  31. style="width: 120px"
  32. />
  33. <el-date-picker
  34. v-model="tableObj.getdataListParm.parammaps.inputDatetime"
  35. class="inputDatetime filter-item"
  36. type="daterange"
  37. range-separator="至"
  38. start-placeholder="开始日期"
  39. end-placeholder="结束日期"
  40. style="width: 250px"
  41. />
  42. <el-button class="successBorder" @click="form_search">查询</el-button>
  43. <el-button class="successBorder" @click="form_clear">重置</el-button>
  44. <el-button
  45. v-if="isExpressAdd"
  46. class="success"
  47. icon="el-icon-plus"
  48. @click="form_add"
  49. >新增</el-button
  50. >
  51. <!-- <el-button class="success" icon="el-icon-upload2" @click="form_export">导出</el-button> -->
  52. </el-row>
  53. </div>
  54. <!-- <div class="operation">
  55. <el-row :gutter="0">
  56. <el-col :span="21">
  57. <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="form_add">新增</el-button>
  58. </el-col>
  59. <el-col :span="3">
  60. </el-col>
  61. </el-row>
  62. </div> -->
  63. </div>
  64. <div class="table">
  65. <el-table
  66. :key="tableObj.tableKey"
  67. v-loading="tableObj.listLoading"
  68. element-loading-text="给我一点时间"
  69. :data="tableObj.list"
  70. border
  71. fit
  72. highlight-current-row
  73. style="width: 100%"
  74. :row-style="rowStyle"
  75. :cell-style="cellStyle"
  76. class="elTable table-fixed"
  77. :max-height="myHeight"
  78. >
  79. <!-- <el-table-column type="selection" align="center" width="50" /> -->
  80. <el-table-column label="序号" align="center" type="index" width="50px">
  81. <template slot-scope="scope">
  82. <span>{{
  83. scope.$index + (tableObj.pageNum - 1) * tableObj.pageSize + 1
  84. }}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column
  88. label="客户名称"
  89. min-width="120px"
  90. align="center"
  91. show-overflow-tooltip
  92. >
  93. <template slot-scope="scope">
  94. <span>{{ scope.row.customerName }}</span>
  95. </template>
  96. </el-table-column>
  97. <el-table-column label="集团" min-width="110px" align="center">
  98. <template slot-scope="scope">
  99. <span>{{ scope.row.groupName }}</span>
  100. </template>
  101. </el-table-column>
  102. <el-table-column label="接收日期" min-width="110px" align="center">
  103. <template slot-scope="scope">
  104. <span>{{ scope.row.pdate }}</span>
  105. </template>
  106. </el-table-column>
  107. <el-table-column
  108. label="寄件人"
  109. min-width="110px"
  110. align="center"
  111. show-overflow-tooltip
  112. >
  113. <template slot-scope="scope">
  114. <span>{{ scope.row.posterName }}</span>
  115. </template>
  116. </el-table-column>
  117. <el-table-column label="寄件电话" min-width="110px" align="center">
  118. <template slot-scope="scope">
  119. <span>{{ scope.row.posterTel }}</span>
  120. </template>
  121. </el-table-column>
  122. <el-table-column
  123. label="寄件单号"
  124. min-width="120px"
  125. align="center"
  126. show-overflow-tooltip
  127. >
  128. <template slot-scope="scope">
  129. <span>{{ scope.row.postCode }}</span>
  130. </template>
  131. </el-table-column>
  132. <el-table-column label="快递寄出原因" min-width="120px" align="center">
  133. <template slot-scope="scope">
  134. <span>{{ scope.row.reason }}</span>
  135. </template>
  136. </el-table-column>
  137. <el-table-column
  138. label="处理方式"
  139. min-width="110px"
  140. align="center"
  141. show-overflow-tooltip
  142. >
  143. <template slot-scope="scope">
  144. <span>{{ scope.row.handletypeName }}</span>
  145. </template>
  146. </el-table-column>
  147. <el-table-column
  148. label="备注"
  149. min-width="120px"
  150. align="center"
  151. show-overflow-tooltip
  152. >
  153. <template slot-scope="scope">
  154. <span>{{ scope.row.remark }}</span>
  155. </template>
  156. </el-table-column>
  157. <el-table-column label="录入日期" min-width="110px" align="center">
  158. <template slot-scope="scope">
  159. <span>{{ scope.row.created }}</span>
  160. </template>
  161. </el-table-column>
  162. <el-table-column
  163. label="操作"
  164. align="center"
  165. :width="autoWidth"
  166. v-if="autoWidth !== 0"
  167. class-name="small-padding fixed-width"
  168. fixed="right"
  169. >
  170. <template slot-scope="{ row }">
  171. <!-- <el-button v-if="isRoleEdit" class="miniSuccess" @click="form_edit(row)">编辑</el-button>
  172. <el-button v-if="isRoleEdit" class="miniDanger" @click="form_delete(row)">删除</el-button> -->
  173. <el-button class="miniPrimary" @click="form_see(row)"
  174. >查看</el-button
  175. >
  176. <el-button
  177. v-if="
  178. isExpressAdd &&
  179. row.isModify == '1' &&
  180. row.createrId == employeid
  181. "
  182. class="miniSuccess"
  183. @click="form_edit(row)"
  184. >编辑</el-button
  185. >
  186. <el-button
  187. v-if="
  188. isExpressAdd && row.isDel == '1' && row.createrId == employeid
  189. "
  190. class="miniDanger"
  191. @click="form_delete(row)"
  192. >删除</el-button
  193. >
  194. </template>
  195. </el-table-column>
  196. </el-table>
  197. <pagination
  198. v-show="tableObj.total >= 0"
  199. :total="tableObj.total"
  200. :page.sync="tableObj.getdataListParm.offset"
  201. :limit.sync="tableObj.getdataListParm.pagecount"
  202. @pagination="get_table_data"
  203. />
  204. </div>
  205. <!-- 新增/编辑 -->
  206. <el-dialog
  207. :title="textMap[create.dialogStatus]"
  208. :visible.sync="create.dialogFormVisible"
  209. :close-on-click-modal="false"
  210. width="60%"
  211. >
  212. <div class="app-add">
  213. <el-form
  214. ref="temp"
  215. :rules="create.rules"
  216. :model="create.temp"
  217. label-position="right"
  218. label-width="150px"
  219. style="width: 80%; margin: 0 auto 50px"
  220. >
  221. <el-row>
  222. <el-col :span="12">
  223. <el-form-item label="客户名称:" prop="customerId">
  224. <el-select
  225. v-model="create.temp.customerId"
  226. filterable
  227. placeholder="客户名称"
  228. class="filter-item"
  229. style="width: 100%"
  230. clearable
  231. @change="change_customer"
  232. :disabled="
  233. create.dialogStatus == 'see' ||
  234. create.dialogStatus == 'update'
  235. "
  236. >
  237. <el-option
  238. v-for="item in create.customerNameList"
  239. :key="item.id"
  240. :label="item.name"
  241. :value="item.id"
  242. />
  243. </el-select>
  244. </el-form-item>
  245. <!-- <el-form-item label="所属集团:" prop="groupId">
  246. <el-select v-model="create.temp.groupId" placeholder="所属集团" class="filter-item" style="width: 100%;" filterable @change="change_group" clearable :disabled="create.dialogStatus=='see' || create.dialogStatus=='update' " >
  247. <el-option v-for="item in groupNameList" :key="item.id" :label="item.name" :value="item.id" />
  248. </el-select>
  249. </el-form-item> -->
  250. <!-- <el-form-item label="客户名称:" prop="customerName" >
  251. <el-autocomplete ref="customerName" v-model="create.temp.customerName" :fetch-suggestions="customer_search" placeholder="客户名称" style="width: 100%;margin-right:10px" @select="changeCustomer" :disabled="create.dialogStatus=='see' || create.dialogStatus=='update'" @clear="clear_customer_selectTemp" @blur="customer_search_blurTemp" clearable >
  252. <template slot-scope="{ item }">
  253. <span class="name">{{ item.name }}</span>
  254. </template>
  255. </el-autocomplete>
  256. </el-form-item> -->
  257. </el-col>
  258. <el-col :span="12">
  259. <el-form-item label="集团:" prop="groupName">
  260. <el-input
  261. ref="groupName"
  262. v-model="create.temp.groupName"
  263. class="filter-item"
  264. style="width: 100%"
  265. disabled
  266. />
  267. </el-form-item>
  268. </el-col>
  269. </el-row>
  270. <el-row>
  271. <el-col :span="12">
  272. <el-form-item label="接收日期:" prop="pdate">
  273. <el-date-picker
  274. v-model="create.temp.pdate"
  275. type="date"
  276. placeholder="选择日期"
  277. format="yyyy-MM-dd"
  278. value-format="yyyy-MM-dd"
  279. style="width: 100%"
  280. :clearable="false"
  281. :disabled="create.dialogStatus == 'see'"
  282. />
  283. </el-form-item>
  284. </el-col>
  285. <el-col :span="12">
  286. <el-form-item label="寄件人:" prop="posterId">
  287. <el-select
  288. ref="posterId"
  289. v-model="create.temp.posterId"
  290. filterable
  291. placeholder="请选择寄件人"
  292. class="filter-item"
  293. style="width: 100%"
  294. @change="changeReceiver"
  295. :disabled="create.dialogStatus == 'see'"
  296. >
  297. <el-option
  298. v-for="item in create.posterNameList"
  299. :key="item.id"
  300. :label="item.name"
  301. :value="item.id"
  302. />
  303. </el-select>
  304. </el-form-item>
  305. </el-col>
  306. </el-row>
  307. <el-row>
  308. <el-col :span="12">
  309. <el-form-item label="寄件电话:" prop="posterTel">
  310. <el-input
  311. ref="posterTel"
  312. v-model="create.temp.posterTel"
  313. class="filter-item"
  314. style="width: 100%"
  315. maxlength="11"
  316. placeholder="请输入寄件电话"
  317. :disabled="create.dialogStatus == 'see'"
  318. />
  319. </el-form-item>
  320. </el-col>
  321. <el-col :span="12">
  322. <el-form-item label="寄件单号:" prop="postCode">
  323. <el-input
  324. ref="postCode"
  325. v-model="create.temp.postCode"
  326. class="filter-item"
  327. style="width: 100%"
  328. maxlength="30"
  329. placeholder="请输入寄件单号"
  330. :disabled="create.dialogStatus == 'see'"
  331. />
  332. </el-form-item>
  333. </el-col>
  334. </el-row>
  335. <el-row>
  336. <el-col :span="12">
  337. <el-form-item label="寄件原因:" prop="reason">
  338. <el-input
  339. ref="reason"
  340. v-model="create.temp.reason"
  341. class="filter-item"
  342. style="width: 100%"
  343. maxlength="11"
  344. placeholder="请输入寄件原因"
  345. :disabled="create.dialogStatus == 'see'"
  346. />
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="12">
  350. <el-form-item label="处理方式:" prop="handletypeId">
  351. <el-select
  352. ref="handletypeId"
  353. v-model="create.temp.handletypeId"
  354. filterable
  355. placeholder="请选择处理方式"
  356. class="filter-item"
  357. style="width: 100%"
  358. :disabled="create.dialogStatus == 'see'"
  359. >
  360. <el-option
  361. v-for="item in handletypeList"
  362. :key="item.id"
  363. :label="item.name"
  364. :value="item.id"
  365. />
  366. </el-select>
  367. </el-form-item>
  368. </el-col>
  369. </el-row>
  370. <el-row>
  371. <el-form-item label="备注:" prop="remark">
  372. <el-input
  373. ref="remark"
  374. v-model="create.temp.remark"
  375. type="textarea"
  376. :autosize="{ minRows: 1.3, maxRows: 4 }"
  377. placeholder="请输入备注,最多255个字"
  378. maxlength="255"
  379. class="filter-item"
  380. style="width: 100%"
  381. :disabled="create.dialogStatus == 'see'"
  382. />
  383. </el-form-item>
  384. </el-row>
  385. <el-row>
  386. <el-form-item label="添加收货物品:" prop="visiterId">
  387. <el-select
  388. ref="visiterId"
  389. v-model="create.temp.visiterId"
  390. filterable
  391. placeholder="请选择收货物品"
  392. class="filter-item"
  393. style="width: 100%"
  394. :disabled="create.dialogStatus == 'see'"
  395. @change="change_receProduct"
  396. >
  397. <el-option
  398. v-for="item in receProductNameList"
  399. :key="item.productsId"
  400. :label="
  401. '产品名称:' +
  402. item.productsName +
  403. ' 型号:' +
  404. item.model +
  405. ' 规格:' +
  406. item.Specifications
  407. "
  408. :value="item.productsId"
  409. >
  410. </el-option>
  411. </el-select>
  412. </el-form-item>
  413. </el-row>
  414. <el-row>
  415. <el-table
  416. :key="contact.tableKey"
  417. v-loading="contact.listLoading"
  418. element-loading-text="给我一点时间"
  419. :data="contact.list"
  420. border
  421. fit
  422. highlight-current-row
  423. style="width: 100%"
  424. :row-style="rowStyle"
  425. :cell-style="cellStyle"
  426. class="elTable table-fixed"
  427. >
  428. <el-table-column
  429. label="序号"
  430. align="center"
  431. type="index"
  432. width="50px"
  433. >
  434. <template slot-scope="scope">
  435. <span>{{ scope.$index + 1 }}</span>
  436. </template>
  437. </el-table-column>
  438. <el-table-column
  439. label="产品名称"
  440. min-width="110px"
  441. align="center"
  442. >
  443. <template slot-scope="scope">
  444. <span>{{ scope.row.productsName }}</span>
  445. </template>
  446. </el-table-column>
  447. <el-table-column label="型号" min-width="110px" align="center">
  448. <template slot-scope="scope">
  449. <span>{{ scope.row.model }}</span>
  450. </template>
  451. </el-table-column>
  452. <el-table-column label="规格" min-width="110px" align="center">
  453. <template slot-scope="scope">
  454. <span>{{ scope.row.Specifications }}</span>
  455. </template>
  456. </el-table-column>
  457. <el-table-column label="数量" min-width="110px" align="center">
  458. <template slot-scope="scope">
  459. <span v-if="create.dialogStatus == 'see'">{{
  460. scope.row.nums
  461. }}</span>
  462. <el-input
  463. v-if="
  464. create.dialogStatus == 'update' ||
  465. create.dialogStatus == 'create'
  466. "
  467. v-model="scope.row.nums"
  468. style="width: 95%; padding: 10px 0"
  469. />
  470. </template>
  471. </el-table-column>
  472. <el-table-column label="备注" min-width="280px" align="center">
  473. <template slot-scope="scope">
  474. <span v-if="create.dialogStatus == 'see'">{{
  475. scope.row.remark
  476. }}</span>
  477. <el-input
  478. v-if="
  479. create.dialogStatus == 'update' ||
  480. create.dialogStatus == 'create'
  481. "
  482. v-model="scope.row.remark"
  483. type="textarea"
  484. :autosize="{ minRows: 1.3, maxRows: 4 }"
  485. style="width: 95%; padding: 10px 0"
  486. />
  487. </template>
  488. </el-table-column>
  489. <el-table-column
  490. v-if="
  491. create.dialogStatus == 'update' ||
  492. create.dialogStatus == 'create'
  493. "
  494. label="操作"
  495. align="center"
  496. width="110"
  497. class-name="small-padding fixed-width"
  498. fixed="right"
  499. >
  500. <template slot-scope="{ row }">
  501. <el-button
  502. v-if="
  503. create.dialogStatus == 'update' ||
  504. create.dialogStatus == 'create'
  505. "
  506. class="miniDanger"
  507. @click="form_delete2(row)"
  508. >删除</el-button
  509. >
  510. </template>
  511. </el-table-column>
  512. </el-table>
  513. </el-row>
  514. </el-form>
  515. <div slot="footer" class="dialog-footer">
  516. <el-button
  517. class="cancelClose"
  518. @click="
  519. create.dialogFormVisible = false;
  520. get_table_data();
  521. "
  522. >关闭</el-button
  523. >
  524. <el-button
  525. v-if="
  526. create.dialogStatus === 'create' ||
  527. create.dialogStatus === 'update'
  528. "
  529. class="success"
  530. :disabled="isokDisable"
  531. @click="
  532. create.dialogStatus === 'create'
  533. ? add_dialog_save()
  534. : form_edit_save()
  535. "
  536. >确认</el-button
  537. >
  538. </div>
  539. </div>
  540. </el-dialog>
  541. </div>
  542. </template>
  543. <script>
  544. import {
  545. GetDataByName,
  546. PostDataByName,
  547. failproccess,
  548. ExecDataByConfig,
  549. GetDataByNames,
  550. checkButtons,
  551. calculativeWidth,
  552. } from "@/api/common";
  553. import Cookies from "js-cookie";
  554. import { parseTime, json2excel } from "@/utils/index.js";
  555. import Pagination from "@/components/Pagination";
  556. import { MessageBox } from "element-ui";
  557. export default {
  558. name: "expressReception",
  559. components: { Pagination },
  560. data() {
  561. return {
  562. myHeight: document.documentElement.clientHeight - 85 - 160,
  563. employeid: Cookies.get("employeid"),
  564. isExpressAdd: [],
  565. isRoleEdit: [],
  566. send_select_list: [
  567. { name: "getCustomerSelect", offset: 0, pagecount: 0, parammaps: {} },
  568. {
  569. name: "getDictListSelect1",
  570. offset: 0,
  571. pagecount: 0,
  572. parammaps: { pid: "54" },
  573. },
  574. {
  575. name: "getProductsEnable",
  576. offset: 0,
  577. pagecount: 0,
  578. parammaps: { enable: "1" },
  579. },
  580. {
  581. name: "getDictListSelect3",
  582. offset: 0,
  583. pagecount: 0,
  584. parammaps: { pid: "57" },
  585. },
  586. ],
  587. customerNameList: [], // 客户名称
  588. groupNameList: [], // 集团
  589. //下拉框 - 收件货品
  590. receProductNameList: [
  591. // {"Specifications":"SMA连接线","categoryId":14,"categoryName":"易 损 配 件","model":"根","price":"0.00","productsId":25,"productsName":"同轴电缆","remark":"","sort":1},
  592. // {"Specifications":"SMA转TNC连接线","categoryId":14,"categoryName":"易 损 配 件","model":"根","price":"0.00","productsId":26,"productsName":"同轴电缆","remark":"质保期3个月","sort":2},
  593. // {"Specifications":"/","categoryId":14,"categoryName":"易 损 配 件","model":"个","price":"0.00","productsId":27,"productsName":"蓄电池","remark":"质保期1年","sort":3},{"Specifications":"/","categoryId":14,"categoryName":"易 损 配 件","model":"个","price":"0.00","productsId":28,"productsName":"充电器","remark":"质保期1年","sort":4},
  594. // {"Specifications":"200*125 T","categoryId":14,"categoryName":"易 损 配 件","model":"张","price":"0.00","productsId":29,"productsName":"薄膜开关","remark":"质保期3个月","sort":5},
  595. ],
  596. handletypeList: [], // 处理方式
  597. //表格请求参数~~
  598. tableObj: {
  599. getdataListParm: {
  600. name: "getPostal",
  601. page: 1,
  602. offset: 1,
  603. pagecount: parseInt(Cookies.get("pagecount")),
  604. returntype: "Map",
  605. parammaps: {
  606. roleId: Cookies.get("g_roleId"),
  607. userId: Cookies.get("g_userId"),
  608. customerName: "",
  609. customerId: "",
  610. groupId: "",
  611. posterName: "",
  612. inputDatetime: "",
  613. beginDate: "",
  614. endDate: "",
  615. },
  616. },
  617. tableKey: 0,
  618. list: [],
  619. total: 0,
  620. listLoading: true,
  621. temp: {},
  622. },
  623. download: {
  624. getdataListParm: {
  625. name: "getPostal",
  626. page: 1,
  627. offset: 1,
  628. pagecount: 0,
  629. returntype: "Map",
  630. parammaps: {
  631. roleId: Cookies.get("g_roleId"),
  632. userId: Cookies.get("g_userId"),
  633. customerName: "",
  634. customerId: "",
  635. groupId: "",
  636. posterName: "",
  637. inputDatetime: "",
  638. beginDate: "",
  639. endDate: "",
  640. },
  641. },
  642. tableKey: 0,
  643. list: [],
  644. total: 0,
  645. listLoading: true,
  646. temp: {},
  647. },
  648. // 新增/编辑
  649. create: {
  650. dialogFormVisible: false,
  651. dialogStatus: "",
  652. temp: {
  653. customerId: "",
  654. customerName: "",
  655. groupId: "",
  656. visiterId: "",
  657. groupName: "",
  658. pdate: parseTime(new Date(), "{y}-{m}-{d}"),
  659. posterId: "",
  660. posterName: "",
  661. posterTel: "",
  662. postCode: "",
  663. reason: "",
  664. handletypeId: "",
  665. remark: "",
  666. id: "",
  667. modifyName: "add",
  668. receiverChoose: "true",
  669. },
  670. rules: {
  671. customerId: [{ required: true, message: "必填", trigger: "blur" }],
  672. // groupId: [{ required: true, message: '必填', trigger: 'blur' }],
  673. pdate: [{ required: true, message: "必填", trigger: "blur" }],
  674. posterId: [{ required: true, message: "必填", trigger: "blur" }],
  675. posterTel: [{ required: true, message: "必填", trigger: "blur" }],
  676. postCode: [{ required: true, message: "必填", trigger: "blur" }],
  677. },
  678. // 寄件人
  679. getdataListParm: {
  680. name: "getContacts",
  681. returntype: "Map",
  682. parammaps: { customerId: "" },
  683. },
  684. posterNameList: [], // 寄件人
  685. // 客户名称
  686. getdataListParmCust: {
  687. name: "getCustomerByGroupId",
  688. returntype: "Map",
  689. parammaps: { groupId: "" },
  690. },
  691. customerNameList: [],
  692. // 集团
  693. getdataListParm2: {
  694. name: "getgroupNameById",
  695. page: 1,
  696. offset: 1,
  697. pagecount: 10,
  698. returntype: "Map",
  699. parammaps: { id: "" },
  700. },
  701. // 弹窗里的表格,仅编辑查看时调用
  702. getdataListParm3: {
  703. name: "getPostalGoodsById",
  704. page: 1,
  705. offset: 1,
  706. pagecount: 10,
  707. returntype: "Map",
  708. parammaps: { postalId: "" },
  709. },
  710. // 寄件人电话
  711. getdataListParm4: {
  712. name: "getTelById",
  713. page: 1,
  714. offset: 1,
  715. pagecount: 10,
  716. returntype: "Map",
  717. parammaps: { id: "" },
  718. },
  719. },
  720. textMap: {
  721. create: "新增",
  722. see: "查看",
  723. update: "编辑",
  724. },
  725. // 管理
  726. contact: {
  727. dialogFormVisible: false,
  728. dialogStatus: "",
  729. temp: {
  730. id: "",
  731. contactName: "",
  732. telephone: "",
  733. address: "",
  734. remark: "",
  735. },
  736. rules: {},
  737. getdataListParm: {
  738. name: "getContacts",
  739. page: 1,
  740. offset: 1,
  741. pagecount: 10,
  742. returntype: "Map",
  743. parammaps: { customerId: "" },
  744. },
  745. tableKey: 0,
  746. list: [],
  747. total: 0,
  748. listLoading: false,
  749. },
  750. autoWidth: 130,
  751. requestParam: {},
  752. isokDisable: false,
  753. selectList: [],
  754. rowStyle: { maxHeight: 50 + "px", height: 45 + "px" },
  755. cellStyle: { padding: 0 + "px" },
  756. };
  757. },
  758. created() {
  759. this.get_table_data();
  760. this.get_select_list();
  761. this.get_auto_buttons();
  762. },
  763. methods: {
  764. //获取按钮权限
  765. get_auto_buttons() {
  766. const Edit = "expressReception";
  767. const isRoleEdit = checkButtons(
  768. JSON.parse(sessionStorage.getItem("buttons")),
  769. Edit
  770. );
  771. this.isRoleEdit = isRoleEdit;
  772. const ExpressAdd = "business:express:add";
  773. const isExpressAdd = checkButtons(
  774. this.$store.state.user.buttons,
  775. ExpressAdd
  776. );
  777. this.isExpressAdd = isExpressAdd;
  778. //操作的宽度
  779. // var widthCount = calculativeWidth(isExpressAdd,isExpressAdd) + 90
  780. // this.autoWidth = widthCount
  781. },
  782. //获取所有下拉框的内容
  783. get_select_list() {
  784. GetDataByNames(this.send_select_list).then((response) => {
  785. this.create.customerNameList = response.data.getCustomerSelect.list;
  786. console.log("客户名称下拉框", this.create.customerNameList);
  787. this.groupNameList = response.data.getDictListSelect1.list;
  788. console.log("集团下拉框", this.groupNameList);
  789. // response.data.getProductsEnable.list.map(function (i) {
  790. // return (i.productsId = i.id)
  791. // })
  792. response.data.getProductsEnable.list.map(function (i) {
  793. return (i.customerId = "");
  794. });
  795. response.data.getProductsEnable.list.map(function (i) {
  796. return (i.nums = "");
  797. });
  798. response.data.getProductsEnable.list.map(function (i) {
  799. return (i.remark = "");
  800. });
  801. this.receProductNameList = response.data.getProductsEnable.list;
  802. console.log("收件货品下拉框", this.receProductNameList);
  803. this.handletypeList = response.data.getDictListSelect3.list;
  804. console.log("处理方式下拉框", this.handletypeList);
  805. });
  806. },
  807. //加载表格
  808. get_table_data() {
  809. var me = this;
  810. this.tableObj.listLoading = true;
  811. console.log(
  812. "this.tableObj.getdataListParm======>",
  813. this.tableObj.getdataListParm
  814. );
  815. GetDataByName(this.tableObj.getdataListParm).then((response) => {
  816. console.log("table数据======>", response.data.list);
  817. if (response.data.list !== null) {
  818. this.tableObj.list = response.data.list;
  819. this.tableObj.pageNum = response.data.pageNum;
  820. this.tableObj.pageSize = response.data.pageSize;
  821. this.tableObj.total = response.data.total;
  822. //计算操作栏宽度
  823. var btnNum = 0;
  824. var arrList = response.data.list;
  825. arrList.forEach(function (row) {
  826. var itemBtnNum = 0;
  827. if (
  828. me.isExpressAdd &&
  829. row.isModify == "1" &&
  830. row.createrId == me.employeid
  831. ) {
  832. itemBtnNum = itemBtnNum + 1;
  833. }
  834. if (
  835. me.isExpressAdd &&
  836. row.isDel == "1" &&
  837. row.createrId == me.employeid
  838. ) {
  839. itemBtnNum = itemBtnNum + 1;
  840. }
  841. console.log(itemBtnNum);
  842. if (itemBtnNum > btnNum) {
  843. btnNum = itemBtnNum;
  844. }
  845. });
  846. console.log("btnNum=============", btnNum);
  847. me.autoWidth = btnNum * 90 + 90;
  848. } else {
  849. this.tableObj.list = [];
  850. }
  851. setTimeout(() => {
  852. this.tableObj.listLoading = false;
  853. }, 100);
  854. });
  855. },
  856. form_search() {
  857. console.log("点击了查询");
  858. if (
  859. this.tableObj.getdataListParm.parammaps.inputDatetime !== "" &&
  860. this.tableObj.getdataListParm.parammaps.inputDatetime !== null
  861. ) {
  862. this.tableObj.getdataListParm.parammaps.beginDate = parseTime(
  863. this.tableObj.getdataListParm.parammaps.inputDatetime[0],
  864. "{y}-{m}-{d}"
  865. );
  866. this.tableObj.getdataListParm.parammaps.endDate = parseTime(
  867. this.tableObj.getdataListParm.parammaps.inputDatetime[1],
  868. "{y}-{m}-{d}"
  869. );
  870. } else {
  871. this.tableObj.getdataListParm.parammaps.inputDatetime = "";
  872. this.tableObj.getdataListParm.parammaps.beginDate = "";
  873. this.tableObj.getdataListParm.parammaps.endDate = "";
  874. }
  875. this.tableObj.getdataListParm.offset = 1;
  876. this.get_table_data();
  877. },
  878. form_clear() {
  879. console.log("点击了重置");
  880. this.tableObj.getdataListParm.parammaps.customerName = "";
  881. this.tableObj.getdataListParm.parammaps.customerId = "";
  882. this.tableObj.getdataListParm.parammaps.groupId = "";
  883. this.tableObj.getdataListParm.parammaps.posterName = "";
  884. this.tableObj.getdataListParm.parammaps.beginDate = "";
  885. this.tableObj.getdataListParm.parammaps.endDate = "";
  886. this.tableObj.getdataListParm.parammaps.inputDatetime = "";
  887. this.tableObj.getdataListParm.offset = 1;
  888. this.get_table_data();
  889. },
  890. // 新增
  891. form_reset() {
  892. this.create.temp = {
  893. customerId: "",
  894. customerName: "",
  895. groupId: "",
  896. visiterId: "",
  897. groupName: "",
  898. pdate: parseTime(new Date(), "{y}-{m}-{d}"),
  899. posterId: "",
  900. posterName: "",
  901. posterTel: "",
  902. postCode: "",
  903. reason: "",
  904. handletypeId: "",
  905. remark: "",
  906. id: "",
  907. modifyName: "add",
  908. receiverChoose: "true",
  909. };
  910. this.contact.list = [];
  911. },
  912. //监听 - 集团
  913. change_group(item) {
  914. console.log(item);
  915. console.log(this.create.temp.groupId);
  916. this.create.temp.groupId = item;
  917. this.create.getdataListParmCust.parammaps.groupId = item;
  918. this.create.temp.customerName = "";
  919. this.create.temp.customerId = "";
  920. this.create.customerNameList = [];
  921. this.get_customer_list();
  922. this.$forceUpdate();
  923. },
  924. // 弹窗中的客户
  925. get_customer_list() {
  926. GetDataByName(this.create.getdataListParmCust).then((response) => {
  927. if (response.data.list !== null) {
  928. this.create.customerNameList = response.data.list;
  929. console.log("弹窗中的客户数据", response.data.list);
  930. } else {
  931. this.create.customerNameList = [];
  932. }
  933. });
  934. },
  935. //监听 - 下拉中客户名称
  936. change_customer(item) {
  937. console.log(item);
  938. this.create.temp.customerId = item;
  939. this.get_groupName(item);
  940. this.create.getdataListParm.parammaps.customerId = item;
  941. // this.create.temp.barname = this.houseNameList.find(obj => obj.id === item).bname
  942. this.getPosterNameList();
  943. },
  944. // 获取集团名称
  945. get_groupName(customerId) {
  946. var me = this;
  947. var send_data = {
  948. name: "getgroupNameById",
  949. returntype: "Map",
  950. parammaps: { id: customerId },
  951. };
  952. GetDataByName(send_data).then((response) => {
  953. console.log(response);
  954. if (response.data.list !== null) {
  955. me.create.temp.groupName = response.data.list[0].groupName;
  956. me.create.temp.groupId = response.data.list[0].groupId;
  957. } else {
  958. me.create.temp.groupName = "";
  959. me.create.temp.groupId = "";
  960. }
  961. });
  962. },
  963. //监听 - 下拉中客户名称
  964. changeCustomer(item) {
  965. console.log(item);
  966. this.create.temp.customerId = item.id;
  967. this.create.temp.customerName = item.name;
  968. this.$forceUpdate();
  969. this.create.getdataListParm.parammaps.customerId = item.id;
  970. // this.create.temp.barname = this.houseNameList.find(obj => obj.id === item).bname
  971. this.getPosterNameList();
  972. this.create.getdataListParm2.parammaps.id = item.id;
  973. this.getGroupNameId();
  974. },
  975. clear_customer_selectTemp(item) {
  976. document.activeElement.blur();
  977. this.create.temp.customerId = "";
  978. this.create.temp.customerName = "";
  979. this.create.temp.groupName = "";
  980. this.$forceUpdate();
  981. },
  982. //模糊查询客户
  983. customer_search(queryString, cb) {
  984. console.log("模糊查询输入值", queryString);
  985. GetDataByName({
  986. name: "getCustomerNameFuzzy",
  987. page: 1,
  988. offset: 1,
  989. pagecount: 10,
  990. returntype: "Map",
  991. parammaps: { inputvalue: queryString },
  992. }).then((response) => {
  993. this.customerNameList = response.data.list;
  994. console.log("客户名称下拉框", response);
  995. cb(response.data.list);
  996. });
  997. },
  998. //模糊查询客户选择
  999. change_customer_select(item) {
  1000. console.log("客户名称模糊查询选中值", item);
  1001. this.tableObj.getdataListParm.parammaps.customerId = item.id;
  1002. this.tableObj.getdataListParm.parammaps.customerName = item.name;
  1003. },
  1004. //清空客户选择
  1005. clear_customer_select(item) {
  1006. this.tableObj.getdataListParm.parammaps.customerId = "";
  1007. this.tableObj.getdataListParm.parammaps.customerName = "";
  1008. document.activeElement.blur();
  1009. },
  1010. //客户失去焦点
  1011. customer_search_blur(item) {
  1012. console.log("客户失去焦点");
  1013. this.tableObj.getdataListParm.parammaps.customerId = "";
  1014. this.tableObj.getdataListParm.parammaps.customerName = "";
  1015. this.customerNameList = [];
  1016. },
  1017. customer_search_blurTemp(item) {
  1018. this.create.temp.customerId = "";
  1019. this.create.temp.customerName = "";
  1020. this.create.temp.groupName = "";
  1021. this.customerNameList = [];
  1022. this.$forceUpdate();
  1023. },
  1024. //
  1025. getPosterNameList() {
  1026. GetDataByName(this.create.getdataListParm).then((response) => {
  1027. if (response.data.list !== null) {
  1028. this.create.posterNameList = response.data.list;
  1029. console.log("寄件人数据", response.data.list);
  1030. } else {
  1031. this.create.posterNameList = [];
  1032. }
  1033. });
  1034. },
  1035. //监听 - 下拉中寄件人
  1036. changeReceiver(item) {
  1037. this.create.getdataListParm4.parammaps.id = item;
  1038. this.create.temp.posterName = this.create.posterNameList.find(
  1039. (obj) => obj.id === item
  1040. ).name;
  1041. this.getTelephoneName();
  1042. },
  1043. // 接待人电话
  1044. getTelephoneName() {
  1045. GetDataByName(this.create.getdataListParm4).then((response) => {
  1046. if (response.data.list !== null) {
  1047. this.create.temp.posterTel = response.data.list[0].telephone;
  1048. console.log("接待人电话", response.data.list);
  1049. }
  1050. });
  1051. },
  1052. // 集团名称
  1053. getGroupNameId() {
  1054. GetDataByName(this.create.getdataListParm2).then((response) => {
  1055. if (response.data.list !== null) {
  1056. this.create.temp.groupName = response.data.list[0].groupName;
  1057. this.create.temp.groupId = response.data.list[0].groupId;
  1058. console.log("集团名称", response.data.list);
  1059. }
  1060. });
  1061. },
  1062. //下拉 - 收件货品
  1063. change_receProduct(item) {
  1064. console.log("收件货品ID ", item);
  1065. var index = this.receProductNameList.findIndex(
  1066. (obj) => obj.productsId == item
  1067. );
  1068. console.log("收件货品index ", index);
  1069. var ifHasId = this.contact.list.findIndex(
  1070. (obj) => obj.productsId == item
  1071. );
  1072. console.log("收件货品是否存在列表 ", ifHasId);
  1073. var addRow = Object.assign({}, this.receProductNameList[index]);
  1074. addRow.nums = 1;
  1075. addRow.remark = "";
  1076. if (ifHasId == "-1") {
  1077. this.contact.list.unshift(addRow);
  1078. }
  1079. },
  1080. //小表格中的删除
  1081. form_delete2(row) {
  1082. console.log("小表格中的删除", row);
  1083. var index = this.contact.list.findIndex((obj) => obj.id == row.id);
  1084. this.contact.list.splice(index, 1);
  1085. },
  1086. //新增
  1087. form_add() {
  1088. console.log("点击了新增");
  1089. this.form_reset();
  1090. this.create.dialogStatus = "create";
  1091. this.create.dialogFormVisible = true;
  1092. },
  1093. //新增保存
  1094. add_dialog_save() {
  1095. console.log("点击了新增保存", this.create.temp);
  1096. this.isokDisable = true;
  1097. setTimeout(() => {
  1098. this.isokDisable = false;
  1099. }, 1000);
  1100. this.$refs["temp"].validate((valid) => {
  1101. if (valid) {
  1102. this.isokDisable = true;
  1103. setTimeout(() => {
  1104. this.isokDisable = false;
  1105. }, 1000);
  1106. var customerId = this.create.temp.customerId;
  1107. this.contact.list.map(function (i) {
  1108. return (i.customerId = customerId);
  1109. });
  1110. this.contact.list.map(function (i) {
  1111. return (i.postalId = "");
  1112. });
  1113. if (
  1114. this.create.posterNameList.find(
  1115. (obj) => obj.id == this.create.temp.posterId
  1116. )
  1117. ) {
  1118. console.log("posterNameList下拉直接选的!");
  1119. this.create.temp.receiverChoose = "true";
  1120. } else {
  1121. this.create.temp.posterName = this.create.temp.posterId;
  1122. this.create.temp.receiverChoose = "false";
  1123. console.log("posterNameList下拉自己填的!");
  1124. }
  1125. console.log("点击了新增保存", this.create.temp);
  1126. console.log("点击了新增保存", this.contact.list);
  1127. this.create.temp.receiverId2 = "";
  1128. this.create.temp.createrId = Cookies.get("employeid");
  1129. this.create.temp.posterId2 = "@insertContactsNew.LastInsertId";
  1130. var send_data = {
  1131. common: { returnmap: "0" },
  1132. data: [
  1133. {
  1134. name: "insertContactsNew",
  1135. type: "e",
  1136. parammaps: {
  1137. customerId: this.create.temp.customerId,
  1138. contactName: this.create.temp.posterName,
  1139. telephone: this.create.temp.receiverTel,
  1140. address: "",
  1141. remark: this.create.temp.remark,
  1142. receiverChoose: this.create.temp.receiverChoose,
  1143. },
  1144. },
  1145. {
  1146. name: "insertPostal",
  1147. type: "e",
  1148. parammaps: this.create.temp,
  1149. },
  1150. {
  1151. name: "insertPostalGoods",
  1152. resultmaps: {
  1153. list: this.contact.list,
  1154. },
  1155. children: [
  1156. {
  1157. name: "insertPostalGoods",
  1158. type: "e",
  1159. parammaps: {
  1160. postalId: "@insertPostal.LastInsertId",
  1161. customerId: "@insertPostalGoods.customerId",
  1162. productsId: "@insertPostalGoods.productsId",
  1163. nums: "@insertPostalGoods.nums",
  1164. createrId: "@insertPostalGoods.createrId",
  1165. remark: "@insertPostalGoods.remark",
  1166. },
  1167. },
  1168. ],
  1169. },
  1170. ],
  1171. };
  1172. var isEmpty = this.contact.list.find((i) => i.nums == "");
  1173. console.log(isEmpty);
  1174. if (isEmpty) {
  1175. this.$message({
  1176. type: "error",
  1177. message: "货品数量不可为空",
  1178. duration: 2000,
  1179. });
  1180. } else {
  1181. ExecDataByConfig(send_data).then((response) => {
  1182. console.log("新增保存发送参数", this.requestParam);
  1183. if (response.msg !== "fail") {
  1184. this.$notify({
  1185. title: "成功",
  1186. message: "保存成功",
  1187. type: "success",
  1188. duration: 2000,
  1189. });
  1190. this.create.dialogFormVisible = false;
  1191. this.get_table_data();
  1192. } else {
  1193. this.$notify({
  1194. title: "失败",
  1195. message: "保存失败" + response.data,
  1196. type: "error",
  1197. duration: 2000,
  1198. });
  1199. }
  1200. });
  1201. }
  1202. }
  1203. });
  1204. },
  1205. // 查看
  1206. form_see(row) {
  1207. console.log("点击了查看", row);
  1208. this.create.dialogStatus = "see";
  1209. this.create.dialogFormVisible = true;
  1210. this.$nextTick(() => {
  1211. this.$refs.temp.resetFields();
  1212. this.create.temp = Object.assign({}, row);
  1213. });
  1214. this.create.temp.id = row.id;
  1215. this.create.getdataListParm.parammaps.customerId = row.customerId;
  1216. this.getPosterNameList();
  1217. this.create.getdataListParm3.parammaps.postalId = row.id;
  1218. this.getReceProduct();
  1219. // this.create.getdataListParmCust.parammaps.groupId = row.groupId
  1220. // this.get_customer_list()
  1221. },
  1222. // 编辑
  1223. form_edit(row) {
  1224. console.log("点击了编辑", row);
  1225. this.create.dialogStatus = "update";
  1226. this.create.dialogFormVisible = true;
  1227. this.$nextTick(() => {
  1228. this.$refs.temp.resetFields();
  1229. this.create.temp = Object.assign({}, row);
  1230. });
  1231. this.create.temp.id = row.id;
  1232. // this.create.getdataListParmCust.parammaps.groupId = row.groupId
  1233. // this.get_customer_list()
  1234. this.create.getdataListParm.parammaps.customerId = row.customerId;
  1235. this.getPosterNameList();
  1236. this.create.getdataListParm3.parammaps.postalId = row.id;
  1237. this.getReceProduct();
  1238. },
  1239. // 查看和编辑中的小表格
  1240. getReceProduct() {
  1241. GetDataByName(this.create.getdataListParm3).then((response) => {
  1242. console.log("查看和编辑中的小表格", response.data.list);
  1243. if (response.data.list !== null) {
  1244. this.contact.list = response.data.list;
  1245. }
  1246. });
  1247. },
  1248. // 编辑保存
  1249. form_edit_save() {
  1250. this.isokDisable = true;
  1251. setTimeout(() => {
  1252. this.isokDisable = false;
  1253. }, 1000);
  1254. this.$refs["temp"].validate((valid) => {
  1255. if (valid) {
  1256. this.isokDisable = true;
  1257. setTimeout(() => {
  1258. this.isokDisable = false;
  1259. }, 1000);
  1260. this.create.temp.modifyName = "update";
  1261. var customerId = this.create.temp.customerId;
  1262. var postalId = this.create.temp.id;
  1263. this.contact.list.map(function (i) {
  1264. return (i.customerId = customerId);
  1265. });
  1266. this.contact.list.map(function (i) {
  1267. return (i.postalId = postalId);
  1268. });
  1269. if (
  1270. this.create.posterNameList.find(
  1271. (obj) => obj.id == this.create.temp.posterId
  1272. )
  1273. ) {
  1274. console.log("posterNameList下拉直接选的!");
  1275. this.create.temp.receiverChoose = "true";
  1276. } else {
  1277. this.create.temp.posterName = this.create.temp.posterId;
  1278. this.create.temp.receiverChoose = "false";
  1279. console.log("posterNameList下拉自己填的!");
  1280. }
  1281. this.create.temp.receiverId2 = "";
  1282. this.create.temp.posterId2 = "@insertContactsNew.LastInsertId";
  1283. var send_data = {
  1284. common: { returnmap: "0" },
  1285. data: [
  1286. {
  1287. name: "insertContactsNew",
  1288. type: "e",
  1289. parammaps: {
  1290. customerId: this.create.temp.customerId,
  1291. contactName: this.create.temp.posterName,
  1292. telephone: this.create.temp.receiverTel,
  1293. address: "",
  1294. remark: this.create.temp.remark,
  1295. receiverChoose: this.create.temp.receiverChoose,
  1296. },
  1297. },
  1298. {
  1299. name: "updatePostal",
  1300. type: "e",
  1301. parammaps: this.create.temp,
  1302. },
  1303. {
  1304. name: "delPostalGoods",
  1305. type: "e",
  1306. parammaps: { postalId: this.create.temp.id },
  1307. },
  1308. {
  1309. name: "insertPostalGoods",
  1310. resultmaps: {
  1311. list: this.contact.list,
  1312. },
  1313. children: [
  1314. {
  1315. name: "insertPostalGoods",
  1316. type: "e",
  1317. parammaps: {
  1318. postalId: "@insertPostalGoods.postalId",
  1319. customerId: "@insertPostalGoods.customerId",
  1320. productsId: "@insertPostalGoods.productsId",
  1321. nums: "@insertPostalGoods.nums",
  1322. remark: "@insertPostalGoods.remark",
  1323. },
  1324. },
  1325. ],
  1326. },
  1327. ],
  1328. };
  1329. ExecDataByConfig(send_data).then((response) => {
  1330. console.log("新增保存发送参数", this.requestParam);
  1331. if (response.msg !== "fail") {
  1332. this.$notify({
  1333. title: "成功",
  1334. message: "保存成功",
  1335. type: "success",
  1336. duration: 2000,
  1337. });
  1338. this.create.dialogFormVisible = false;
  1339. this.get_table_data();
  1340. } else {
  1341. this.$notify({
  1342. title: "失败",
  1343. message: "保存失败",
  1344. type: "error",
  1345. duration: 2000,
  1346. });
  1347. }
  1348. });
  1349. }
  1350. });
  1351. },
  1352. // 删除
  1353. form_delete(row) {
  1354. MessageBox.confirm("是否确认删除此信息?", {
  1355. confirmButtonText: "确认",
  1356. cancelButtonText: "取消",
  1357. type: "warning",
  1358. })
  1359. .then(() => {
  1360. this.requestParam.name = "delPostal";
  1361. this.requestParam.parammaps = {};
  1362. this.requestParam.parammaps.id = row.id;
  1363. PostDataByName(this.requestParam).then((response) => {
  1364. if (response.msg === "fail") {
  1365. this.$notify({
  1366. title: "删除失败",
  1367. message: response.data,
  1368. type: "warning",
  1369. duration: 2000,
  1370. });
  1371. } else {
  1372. this.$notify({
  1373. title: "成功",
  1374. message: "删除成功",
  1375. type: "success",
  1376. duration: 2000,
  1377. });
  1378. this.get_table_data();
  1379. }
  1380. });
  1381. })
  1382. .catch(() => {
  1383. this.$message({ type: "info", message: "已取消删除" });
  1384. });
  1385. },
  1386. // 导出
  1387. form_export(item) {
  1388. this.download.getdataListParm.parammaps =
  1389. this.tableObj.getdataListParm.parammaps;
  1390. GetDataByName(this.download.getdataListParm).then((response) => {
  1391. if (response.data.list !== null) {
  1392. this.download.list = response.data.list;
  1393. } else {
  1394. this.download.list = [];
  1395. }
  1396. var excelDatas = [
  1397. {
  1398. tHeader: [
  1399. "序号",
  1400. "客户名称",
  1401. "客户集团",
  1402. "接收日期",
  1403. "寄件人",
  1404. "寄件电话",
  1405. "寄件单号",
  1406. "快递寄出原因",
  1407. "处理方式",
  1408. "备注",
  1409. "录入日期",
  1410. ],
  1411. filterVal: [
  1412. "sort",
  1413. "customerName",
  1414. "groupName",
  1415. "pdate",
  1416. "posterName",
  1417. "posterTel",
  1418. "postCode",
  1419. "reason",
  1420. "handletypeName",
  1421. "remark",
  1422. "created",
  1423. ],
  1424. tableDatas: this.download.list,
  1425. sheetName: "Sheet1",
  1426. },
  1427. ];
  1428. json2excel(excelDatas, "快递接收", true, "xlsx");
  1429. });
  1430. },
  1431. // 导入
  1432. form_inport() {
  1433. console.log("点击了导入");
  1434. },
  1435. },
  1436. };
  1437. </script>
  1438. <style lang="scss" scoped>
  1439. .search {
  1440. padding-top: 10px;
  1441. clear: both;
  1442. }
  1443. .table {
  1444. margin-top: 10px;
  1445. }
  1446. /deep/ .el-input.is-disabled .el-input__inner {
  1447. color: #000000 !important;
  1448. }
  1449. /deep/ .el-textarea.is-disabled .el-textarea__inner {
  1450. color: #000000 !important;
  1451. }
  1452. /deep/ .el-radio__input.is-disabled + span.el-radio__label {
  1453. color: #000000 !important;
  1454. }
  1455. /deep/ .el-checkbox__input.is-disabled + span.el-checkbox__label {
  1456. color: #000000 !important;
  1457. }
  1458. </style>