retail_form.vue 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header :content="listItem ? '编辑' : '新增'" @back="goBack" />
  4. <div class="main-title">
  5. <div class="title">订单信息</div>
  6. </div>
  7. <el-form
  8. ref="mainForm"
  9. :model="mainForm"
  10. label-width="120px"
  11. size="small"
  12. label-position="right"
  13. >
  14. <el-row :gutter="20">
  15. <el-col :xs="24" :sm="12" :lg="12">
  16. <el-form-item label="销售政策编号" prop="policyCode">
  17. <div style="display: flex">
  18. <el-input
  19. v-model="policyId"
  20. placeholder="销售政策编号"
  21. disabled
  22. />
  23. <el-button
  24. style="margin-left: 10px"
  25. size="small"
  26. @click="handleShow"
  27. >引用</el-button
  28. >
  29. </div>
  30. </el-form-item>
  31. </el-col>
  32. <!-- <el-col :xs="24" :sm="12" :lg="8" v-else>
  33. <el-form-item label="销售政策编号" prop="policyCode">
  34. <el-input
  35. disabled
  36. v-model="mainForm.policyId"
  37. placeholder="销售政策编号"
  38. ></el-input>
  39. </el-form-item>
  40. </el-col> -->
  41. <el-col :xs="24" :sm="12" :lg="12" style="height: 51px">
  42. <el-form-item label="单据日期" prop="date">
  43. <el-date-picker
  44. v-model="mainForm.date"
  45. type="datetime"
  46. disabled
  47. style="width: 100%"
  48. placeholder="选择日期"
  49. />
  50. </el-form-item>
  51. </el-col>
  52. <el-col :xs="24" :sm="12" :lg="12">
  53. <el-form-item label="表头备注" prop="remark">
  54. <el-input v-model="mainForm.remark" placeholder="请输入表头备注" />
  55. </el-form-item>
  56. </el-col>
  57. <el-col :xs="24" :sm="12" :lg="12">
  58. <el-form-item label="文件编号" prop="fileNum">
  59. <el-input
  60. v-model="mainForm.fileNum"
  61. placeholder="请输入文件编号"
  62. ></el-input>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :xs="24" :sm="12" :lg="12">
  66. <el-form-item label="业务员" prop="k3ServiceName">
  67. <el-select
  68. v-model="mainForm.k3ServiceName"
  69. placeholder="选择业务员"
  70. style="width: 100%"
  71. filterable
  72. @change="handleUser"
  73. >
  74. <el-option
  75. v-for="item in userList"
  76. :key="item.adminUserId"
  77. :label="item.nickName"
  78. :value="item.adminUserId"
  79. />
  80. </el-select>
  81. </el-form-item>
  82. </el-col>
  83. </el-row>
  84. </el-form>
  85. <div class="main-title">
  86. <div class="title">货品信息</div>
  87. <div>
  88. <el-select
  89. v-model="warehouseValue"
  90. placeholder="请选择发货仓库"
  91. size="small"
  92. style="margin-right: 10px"
  93. >
  94. <el-option
  95. v-for="(item, index) in warehouseList"
  96. :key="index"
  97. :label="item.name"
  98. :value="item.id"
  99. />
  100. </el-select>
  101. <el-button
  102. type="primary"
  103. size="small"
  104. icon="el-icon-search"
  105. @click="checkStock"
  106. >检查库存</el-button
  107. >
  108. <el-divider direction="vertical" />
  109. </div>
  110. </div>
  111. <div class="table">
  112. <el-table
  113. :data="goodsList"
  114. element-loading-text="Loading"
  115. border
  116. fit
  117. show-summary
  118. :summary-method="$getSummaries"
  119. highlight-current-row
  120. stripe
  121. max-height="400"
  122. >
  123. <el-table-column align="left" label="序号" type="index" width="50" />
  124. <el-table-column
  125. align="left"
  126. label="销售类型"
  127. prop="saleTypeName"
  128. min-width="100"
  129. show-overflow-tooltip
  130. />
  131. <el-table-column
  132. align="left"
  133. label="物料编码"
  134. prop="materialNumber"
  135. min-width="200"
  136. show-overflow-tooltip
  137. >
  138. <template slot-scope="scope">
  139. <CopyButton
  140. :copyText="
  141. scope.row.materialNumber
  142. ? scope.row.materialNumber
  143. : scope.row.materialCode
  144. "
  145. />
  146. <span>
  147. {{
  148. scope.row.materialNumber
  149. ? scope.row.materialNumber
  150. : scope.row.materialCode
  151. }}</span
  152. >
  153. </template>
  154. </el-table-column>
  155. <el-table-column
  156. align="left"
  157. label="产品名称"
  158. prop="materialName"
  159. min-width="200"
  160. show-overflow-tooltip
  161. >
  162. <template slot-scope="scope">
  163. <CopyButton :copyText="scope.row.materialName" />
  164. <span> {{ scope.row.materialName }}</span>
  165. </template>
  166. </el-table-column>
  167. <el-table-column
  168. align="left"
  169. label="规格型号"
  170. prop="specification"
  171. min-width="200"
  172. show-overflow-tooltip
  173. >
  174. <template slot-scope="scope">
  175. <CopyButton :copyText="scope.row.specification" />
  176. <span> {{ scope.row.specification }}</span>
  177. </template>
  178. </el-table-column>
  179. <el-table-column
  180. align="left"
  181. label="单位"
  182. prop="unit"
  183. min-width="100"
  184. show-overflow-tooltip
  185. />
  186. <el-table-column
  187. align="right"
  188. label="单价"
  189. prop="price"
  190. min-width="100"
  191. show-overflow-tooltip
  192. />
  193. <el-table-column
  194. align="right"
  195. label="总数量"
  196. prop="qty"
  197. min-width="100"
  198. show-overflow-tooltip
  199. >
  200. <template slot-scope="scope">
  201. <el-input class="yinput" v-model="scope.row.qty" size="small" />
  202. </template>
  203. </el-table-column>
  204. <el-table-column
  205. align="right"
  206. label="订单金额"
  207. min-width="100"
  208. prop="compute_amount"
  209. show-overflow-tooltip
  210. >
  211. <template slot-scope="scope">
  212. {{ (scope.row.price * scope.row.qty) | numToFixed }}
  213. </template>
  214. </el-table-column>
  215. <el-table-column
  216. align="left"
  217. label="返利钱包"
  218. prop="customerWalletId2"
  219. min-width="160"
  220. show-overflow-tooltip
  221. >
  222. <template slot-scope="scope">
  223. <el-select
  224. v-model="scope.row.customerWalletId2"
  225. placeholder="选择返利钱包"
  226. clearable
  227. size="small"
  228. @remove-tag="clearWallet($event, scope.row)"
  229. @change="changeWallet($event, scope.row)"
  230. >
  231. <el-option
  232. v-for="item in scope.row.rebateWallets"
  233. :key="item.customerWalletId"
  234. :label="item.name"
  235. :value="item.customerWalletId"
  236. />
  237. </el-select>
  238. </template>
  239. </el-table-column>
  240. <el-table-column
  241. align="right"
  242. label="返利金额"
  243. min-width="100"
  244. prop="compute_flAmount"
  245. show-overflow-tooltip
  246. >
  247. <template slot-scope="scope">
  248. {{
  249. ((scope.row.price - scope.row.discAmount) *
  250. scope.row.qty *
  251. ((scope.row.rebateRate || 0) * 100)) /
  252. 100
  253. }}
  254. </template>
  255. </el-table-column>
  256. <el-table-column
  257. align="right"
  258. label="格力折扣"
  259. min-width="100"
  260. prop="compute_zkAmount"
  261. show-overflow-tooltip
  262. >
  263. <template slot-scope="scope">
  264. {{ (scope.row.qty * scope.row.discAmount) | numToFixed }}
  265. </template>
  266. </el-table-column>
  267. <el-table-column
  268. align="left"
  269. label="现金钱包"
  270. prop="customerWalletId"
  271. min-width="160"
  272. show-overflow-tooltip
  273. >
  274. <template slot-scope="scope">
  275. <el-select
  276. v-model="scope.row.customerWalletId"
  277. placeholder="选择现金钱包"
  278. clearable
  279. size="small"
  280. @change="handleWallets($event, scope.row, scope.$index)"
  281. >
  282. <el-option
  283. v-for="item in scope.row.wallets"
  284. :key="item.customerWalletId"
  285. :label="item.name"
  286. :value="item.customerWalletId"
  287. />
  288. </el-select>
  289. </template>
  290. </el-table-column>
  291. <!-- <el-table-column-->
  292. <!-- align="left"-->
  293. <!-- label="业务员"-->
  294. <!-- prop="retiredQty"-->
  295. <!-- min-width="160"-->
  296. <!-- show-overflow-tooltip-->
  297. <!-- >-->
  298. <!-- <template slot-scope="scope">-->
  299. <!-- <el-select-->
  300. <!-- v-model="scope.row.serviceName"-->
  301. <!-- size="small"-->
  302. <!-- disabled-->
  303. <!-- placeholder="选择业务员"-->
  304. <!-- style="width: 100%"-->
  305. <!-- @change="handleUser2($event,scope.row)"-->
  306. <!-- >-->
  307. <!-- <el-option-->
  308. <!-- v-for="item in scope.row.userList"-->
  309. <!-- :key="item.adminUserId"-->
  310. <!-- :label="item.nickName"-->
  311. <!-- :value="item.adminUserId"-->
  312. <!-- />-->
  313. <!-- </el-select>-->
  314. <!-- </template>-->
  315. <!-- </el-table-column>-->
  316. <el-table-column
  317. align="right"
  318. label="可用返利"
  319. prop="rebateAmount"
  320. min-width="100"
  321. show-overflow-tooltip
  322. >
  323. <template slot-scope="scope">
  324. <div>{{ scope.row.rebateAmount | numToFixed }}</div>
  325. </template>
  326. </el-table-column>
  327. <el-table-column
  328. align="right"
  329. label="使用返利金额"
  330. prop="compute_flAmount"
  331. min-width="120"
  332. show-overflow-tooltip
  333. >
  334. <template slot-scope="scope">
  335. {{
  336. (((scope.row.price - scope.row.discAmount) *
  337. scope.row.qty *
  338. (scope.row.rebateRate * 100)) /
  339. 100)
  340. | numToFixed
  341. }}
  342. </template>
  343. </el-table-column>
  344. <el-table-column
  345. align="right"
  346. label="实付金额"
  347. min-width="100"
  348. prop="compute_sfAmount"
  349. show-overflow-tooltip
  350. >
  351. <template slot-scope="scope">
  352. {{ comTatol(scope.row) | numToFixed }}
  353. <!-- {{(scope.row.price - (scope.row.qty * scope.row.discAmount) -(((scope.row.price - scope.row.discAmount) * scope.row.qty * ((scope.row.rebateRate || 0) * 100)) / 100))*scope.row.qty | numToFixed }} -->
  354. <!-- {{ (((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100) | numToFixed }} -->
  355. </template>
  356. </el-table-column>
  357. <el-table-column
  358. align="left"
  359. label="是否直调"
  360. prop="isDirectTransfer"
  361. min-width="100"
  362. >
  363. <template slot-scope="scope">
  364. <el-checkbox v-model="scope.row.isDirectTransfer" />
  365. </template>
  366. </el-table-column>
  367. <!-- <el-table-column
  368. align="left"
  369. label="直调数量"
  370. prop="directTransferQty"
  371. min-width="100"
  372. >
  373. <template slot-scope="scope">
  374. <el-input
  375. v-model="scope.row.directTransferQty"
  376. size="small"
  377. ></el-input>
  378. </template>
  379. </el-table-column> -->
  380. <el-table-column
  381. align="left"
  382. label="表体备注"
  383. prop="remark"
  384. min-width="160"
  385. >
  386. <template slot-scope="scope">
  387. <el-input v-model="scope.row.remark" size="small" />
  388. </template>
  389. </el-table-column>
  390. <el-table-column
  391. align="right"
  392. label="税率"
  393. prop="tax"
  394. min-width="100"
  395. show-overflow-tooltip
  396. />
  397. <!-- <el-table-column-->
  398. <!-- v-if="!listItem"-->
  399. <!-- align="left"-->
  400. <!-- label="总仓库"-->
  401. <!-- prop="status1"-->
  402. <!-- min-width="100"-->
  403. <!-- show-overflow-tooltip-->
  404. <!-- >-->
  405. <!-- <template slot-scope="scope">-->
  406. <!-- <div>{{ scope.row.status1 | status1Filter }}</div>-->
  407. <!-- </template>-->
  408. <!-- </el-table-column>-->
  409. <el-table-column
  410. v-if="!listItem"
  411. align="left"
  412. label="仓库状态"
  413. prop="status2"
  414. min-width="100"
  415. show-overflow-tooltip
  416. >
  417. <template slot-scope="scope">
  418. <div>{{ status2Filter(scope.row) }}</div>
  419. </template>
  420. </el-table-column>
  421. <el-table-column align="left" label="操作" width="100" fixed="right">
  422. <template slot-scope="scope">
  423. <!-- <el-button
  424. type="text"
  425. @click="(dialogVisible = true), (cid = scope.row.id)"
  426. >修改</el-button
  427. > -->
  428. <el-button
  429. type="text"
  430. @click="deleteItem(scope.$index, scope.row.id)"
  431. >删除</el-button
  432. >
  433. </template>
  434. </el-table-column>
  435. </el-table>
  436. </div>
  437. <div class="page-footer">
  438. <div class="footer" :class="classObj">
  439. <el-button type="primary" @click="clickSubmitForm">保 存</el-button>
  440. <el-popconfirm
  441. title="确定关闭吗?"
  442. style="margin-left: 10px"
  443. @onConfirm="goBack"
  444. >
  445. <el-button slot="reference">返回列表</el-button>
  446. </el-popconfirm>
  447. </div>
  448. </div>
  449. <el-dialog
  450. :visible.sync="isShowDialog"
  451. width="80%"
  452. :close-on-click-modal="false"
  453. title="引用销售政策"
  454. @close="handleClose"
  455. >
  456. <template>
  457. <el-form
  458. ref="screenForm"
  459. :model="screenForm"
  460. label-width="120px"
  461. label-position="left"
  462. size="small"
  463. >
  464. <el-row
  465. v-if="factor.length && !dataList.length"
  466. style="margin: 0 0 20px 0; font-size: 20px"
  467. >
  468. 引用销售政策表头备注:{{
  469. !remark ? factor[0].name : remark
  470. }}
  471. 配提比例:{{ pop }}
  472. </el-row>
  473. <el-row
  474. v-if="factor.length && !dataList.length && factor[0].remark"
  475. style="margin: 0 0 20px 0; font-size: 20px"
  476. >
  477. 备注:{{ factor[0].remark }}
  478. </el-row>
  479. <el-row :gutter="20">
  480. <el-col :xs="24" :sm="8" :lg="11">
  481. <el-form-item label="规格型号">
  482. <div style="display:flex">
  483. <el-input
  484. v-model="screenForm.specification"
  485. placeholder="请输入型号规格型号"
  486. />
  487. <el-button type="primary" size="mini" @click="handleGetPolicyList">查询</el-button>
  488. </div>
  489. </el-form-item>
  490. </el-col>
  491. <el-col :xs="24" :sm="12" :lg="11">
  492. <el-form-item label="销售政策" class="myselect">
  493. <el-select
  494. v-model="screenForm.policyId"
  495. placeholder="选择销售政策"
  496. filterable
  497. :disabled="disabled"
  498. style="width: 100%"
  499. @change="handlePolicy"
  500. >
  501. <el-option
  502. v-for="item in policyList"
  503. :key="item.code"
  504. :label="item.title"
  505. :value="item.code"
  506. >
  507. <span>{{ item.title }}</span>
  508. <span
  509. v-if="item.policyRemark"
  510. style="margin-left: 15px; color: #f00; font-size: 12px"
  511. >( {{ item.policyRemark }} )</span
  512. >
  513. </el-option>
  514. </el-select>
  515. </el-form-item>
  516. </el-col>
  517. <el-col :xs="24" :sm="12" :lg="11">
  518. <el-form-item label="销售类型">
  519. <el-select
  520. v-model="screenForm.saleTypeCode"
  521. filterable
  522. placeholder="选择销售类型"
  523. style="width: 100%"
  524. clearable
  525. >
  526. <el-option
  527. v-for="item in ztypeList"
  528. :key="item.id"
  529. :label="item.saleName"
  530. :value="item.saleCode"
  531. />
  532. </el-select>
  533. </el-form-item>
  534. </el-col>
  535. <el-col :xs="24" :sm="12" :lg="11" class="tr">
  536. <!-- <el-button
  537. type="primary"
  538. size="small"
  539. @click="handlePolicyTypeList"
  540. >查询</el-button> -->
  541. <el-button
  542. type="primary"
  543. size="small"
  544. @click="handlePolicyTypeList"
  545. >查询</el-button
  546. >
  547. </el-col>
  548. </el-row>
  549. </el-form>
  550. <template v-if="!dataList.length">
  551. <div v-for="(item, index) in popDataArr" :key="index">
  552. <div style="padding: 20px 0">
  553. <div v-if="index == 0">限定机型</div>
  554. <div v-else>配提机型{{ index }}</div>
  555. </div>
  556. <el-table
  557. ref="singleTable"
  558. v-loading="listLoading"
  559. class="table"
  560. :data="item"
  561. element-loading-text="Loading"
  562. max-height="500"
  563. border
  564. fit
  565. highlight-current-row
  566. stripe
  567. @select-all="handleSelectionChange($event, 1, index)"
  568. @selection-change="handleSelectionChange($event, 1, index)"
  569. >
  570. <el-table-column
  571. align="left"
  572. type="selection"
  573. :selectable="selectable"
  574. width="55"
  575. />
  576. <template v-for="col in columns">
  577. <el-table-column
  578. v-if="col.num"
  579. :align="col.align"
  580. :label="col.lable"
  581. :prop="col.prop"
  582. :min-width="col.widht"
  583. show-overflow-tooltip
  584. >
  585. <template slot-scope="scope">
  586. <el-input
  587. v-model.lazy="scope.row.qty"
  588. type="number" @mousewheel.native.prevent
  589. size="small"
  590. class="yinput"
  591. @blur="blurQty(scope.row.qty, scope.row)"
  592. @input="funQty(scope.row.qty, scope.row, index)"
  593. />
  594. </template>
  595. </el-table-column>
  596. <el-table-column
  597. v-else-if="col.jie"
  598. :align="col.align"
  599. :label="col.lable"
  600. :prop="col.prop"
  601. :min-width="col.widht"
  602. show-overflow-tooltip
  603. >
  604. <template slot-scope="scope">
  605. {{ scope.row.qty * scope.row.price || 0 | numToFixed }}
  606. </template>
  607. </el-table-column>
  608. <el-table-column
  609. v-else
  610. :align="col.align"
  611. :label="col.lable"
  612. :prop="col.prop"
  613. :min-width="col.widht"
  614. show-overflow-tooltip
  615. >
  616. <template slot-scope="scope">
  617. <template
  618. v-if="col.lable == '产品名称' || col.lable == '规格型号'"
  619. >
  620. <CopyButton :copyText="scope.row[col.prop]" />
  621. <span> {{ scope.row[col.prop] }}</span>
  622. </template>
  623. <template v-else>
  624. {{ scope.row[col.prop] || 0 | numToFixed }}
  625. </template>
  626. </template>
  627. </el-table-column>
  628. </template>
  629. <template #append>
  630. <div class="mybox">
  631. <el-row class="mybox-row" type="flex">
  632. <el-col style="width: 55px">合计</el-col>
  633. <el-col />
  634. <el-col />
  635. <el-col />
  636. <el-col>{{ totalArr[index].totalQty }}</el-col>
  637. <el-col>{{
  638. totalArr[index].totalPrice | numToFixed
  639. }}</el-col>
  640. <el-col>{{
  641. totalArr[index].totalAmount | numToFixed
  642. }}</el-col>
  643. </el-row>
  644. </div>
  645. </template>
  646. </el-table>
  647. <!-- <div style="margin: 10px 0">
  648. 分页
  649. <el-pagination
  650. @size-change="
  651. popfun['handleSizeChange' + (index + 1)]($event, index + 1)
  652. "
  653. @current-change="
  654. popfun['handleCurrentChange' + (index + 1)]($event, index + 1)
  655. "
  656. :current-page="popcun['cun' + (index + 1)]"
  657. :page-sizes="[10]"
  658. :page-size="10"
  659. layout="total, sizes, prev, pager, next, jumper"
  660. :total="poptotal['total' + (index + 1)]"
  661. >
  662. </el-pagination>
  663. </div> -->
  664. </div>
  665. <!-- <div v-if="factor.length">-->
  666. <!-- 引用销售政策说明:{{ factor.length ? factor[0].name : "" }} 配提比列:{{pop}}-->
  667. <!-- </div>-->
  668. <span slot="footer" class="dialog-footer">
  669. <el-button type="primary" @click="hanlePopData">完成</el-button>
  670. </span>
  671. </template>
  672. <template v-else>
  673. <el-table
  674. ref="singleTable"
  675. v-loading="listLoading2"
  676. class="table"
  677. :data="dataList"
  678. element-loading-text="Loading"
  679. border
  680. fit
  681. max-height="500"
  682. highlight-current-row
  683. stripe
  684. @select-all="handleSelectionChange"
  685. @selection-change="handleSelectionChange"
  686. >
  687. <el-table-column
  688. align="left"
  689. type="selection"
  690. :selectable="selectable2"
  691. width="55"
  692. />
  693. <template v-for="col in columns">
  694. <el-table-column
  695. v-if="col.num"
  696. :align="col.align"
  697. :label="col.lable"
  698. :prop="col.prop"
  699. :min-width="col.widht"
  700. show-overflow-tooltip
  701. >
  702. <template slot-scope="scope">
  703. <el-input
  704. v-model.lazy="scope.row.qty"
  705. type="number" @mousewheel.native.prevent
  706. class="yinput"
  707. size="small"
  708. @blur="blurQty(scope.row.qty, scope.row)"
  709. @input="funQty(scope.row.qty, scope.row)"
  710. />
  711. </template>
  712. </el-table-column>
  713. <el-table-column
  714. v-else-if="col.jie"
  715. :align="col.align"
  716. :label="col.lable"
  717. :prop="col.prop"
  718. :min-width="col.widht"
  719. show-overflow-tooltip
  720. >
  721. <template slot-scope="scope">
  722. {{ scope.row.qty * scope.row.price || 0 | numToFixed }}
  723. </template>
  724. </el-table-column>
  725. <el-table-column
  726. v-else
  727. :align="col.align"
  728. :label="col.lable"
  729. :prop="col.prop"
  730. :min-width="col.widht"
  731. show-overflow-tooltip
  732. >
  733. <template slot-scope="scope">
  734. <template
  735. v-if="col.lable == '产品名称' || col.lable == '规格型号'"
  736. >
  737. <CopyButton :copyText="scope.row[col.prop]" />
  738. <span> {{ scope.row[col.prop] }}</span>
  739. </template>
  740. <template v-else>
  741. {{ scope.row[col.prop] || 0 | numToFixed }}
  742. </template>
  743. </template>
  744. </el-table-column>
  745. </template>
  746. <template #append>
  747. <div class="mybox">
  748. <el-row class="mybox-row" type="flex">
  749. <el-col style="width: 55px">合计</el-col>
  750. <el-col />
  751. <el-col />
  752. <el-col />
  753. <el-col>{{ totalQty }}</el-col>
  754. <el-col>{{ totalPrice | numToFixed }}</el-col>
  755. <el-col>{{ totalAmount | numToFixed }}</el-col>
  756. </el-row>
  757. </div>
  758. </template>
  759. </el-table>
  760. <!-- <div style="margin: 10px 0">
  761. <el-pagination
  762. @size-change="handleSizeChange"
  763. @current-change="handleCurrentChange"
  764. :current-page="currentPage"
  765. :page-sizes="[10]"
  766. :page-size="10"
  767. layout="total, sizes, prev, pager, next, jumper"
  768. :total="total"
  769. >
  770. </el-pagination>
  771. </div> -->
  772. <span slot="footer" class="dialog-footer">
  773. <el-button type="primary" @click="hanlePopData">完成</el-button>
  774. </span>
  775. </template>
  776. </template>
  777. </el-dialog>
  778. </div>
  779. </template>
  780. <script>
  781. import {
  782. addData,
  783. checkStock,
  784. editData,
  785. getConditionList,
  786. getDetail,
  787. getGoodsList,
  788. getMaterialTypeList,
  789. getPolicyConditionList,
  790. getpolicyList,
  791. getpolicyTypeList,
  792. getSalesTypeList,
  793. getUserList,
  794. getWalletList,
  795. getWarehouseList,
  796. policyList,
  797. typeList,
  798. } from "@/api/supply/policy";
  799. import { getDictList } from "@/api/common";
  800. export default {
  801. name: "RetailForm",
  802. componentName: "RetailForm",
  803. filters: {
  804. status1Filter(val) {
  805. if (val === "" || val === null || val === undefined) return "未检查";
  806. else if (val === 0) return "无货";
  807. else if (val > 0 && val <= 30) return val;
  808. else if (val > 30 && val <= 1000) return "有货";
  809. else if (val > 1000) return "充足";
  810. },
  811. },
  812. props: ["listItem"],
  813. data() {
  814. return {
  815. tableData: [],
  816. currentPage: 1, // 当前页码
  817. pageSize: 10, // 每页数量
  818. listTotal: 0, // 列表总数
  819. cusIndex: 0,
  820. total: 0,
  821. radio: "",
  822. pop: "",
  823. dialogVisible: false,
  824. factor: [],
  825. popArr: [],
  826. mainForm: {
  827. id: "",
  828. date: "",
  829. type: "",
  830. ztype: "",
  831. remark: "",
  832. fileNum: "",
  833. policyCode: "",
  834. policyRemark: "",
  835. policyId: "",
  836. k3ServiceId: "",
  837. k3ServiceName: "",
  838. },
  839. // mainFormRules: {
  840. // type: [{ required: true, message: "请选择品类", trigger: "change" }],
  841. // },
  842. goodsList: [],
  843. warehouseList: [],
  844. warehouseValue: "",
  845. isShowDialog: false,
  846. screenForm: {
  847. policyId: "",
  848. saleTypeCode: "",
  849. factorId: "",
  850. specification: "",
  851. },
  852. currentPage: 1,
  853. listTotal: 0,
  854. salesTypeList: [],
  855. typeList: [],
  856. ztypeList: [],
  857. leftGoodsList: [],
  858. rightGoodsList: [],
  859. leftSelection: [],
  860. rightSelection: [],
  861. policyList: [],
  862. xjWalletList: [],
  863. flWalletList: [],
  864. dataList: [],
  865. columns: [
  866. {
  867. prop: "saleTypeName",
  868. lable: "销售类型",
  869. widht: 200,
  870. align: "left",
  871. },
  872. {
  873. prop: "materialName",
  874. lable: "产品名称",
  875. widht: 200,
  876. align: "left",
  877. },
  878. {
  879. prop: "specification",
  880. lable: "规格型号",
  881. widht: 350,
  882. align: "left",
  883. },
  884. {
  885. prop: "qty",
  886. lable: "数量",
  887. widht: 200,
  888. num: true,
  889. align: "right",
  890. },
  891. {
  892. prop: "price",
  893. lable: "单价",
  894. widht: 200,
  895. align: "right",
  896. },
  897. {
  898. prop: "zong",
  899. widht: 200,
  900. lable: "金额",
  901. jie: true,
  902. align: "right",
  903. },
  904. ],
  905. listLoading: false,
  906. listLoading2: false,
  907. popDataArr: [],
  908. radioObj: {},
  909. step: 0,
  910. policyId: "",
  911. policyConditionId: "",
  912. multipleSelection: [],
  913. multipleSelections: [],
  914. multipleData: [],
  915. disabled: false,
  916. cid: "",
  917. newDataList: [],
  918. userList: [],
  919. fang: false,
  920. popfun: {},
  921. poptotal: {},
  922. popcun: {},
  923. totalQty: 0,
  924. totalPrice: 0,
  925. totalAmount: 0,
  926. totalArr: [],
  927. type: 1,
  928. newMultipleSelections: [],
  929. remark: "",
  930. };
  931. },
  932. computed: {
  933. sidebar() {
  934. // console.log(11145454);
  935. return this.$store.state.app.sidebar;
  936. },
  937. classObj() {
  938. return {
  939. hideSidebar: !this.sidebar.opened,
  940. openSidebar: this.sidebar.opened,
  941. };
  942. },
  943. comxjWalletList() {
  944. return (c) => {
  945. // // consloe(c, "现金钱包");
  946. const walle = [];
  947. const ovalVall = c == undefined || !c.length ? [] : c;
  948. for (let i = 0; i < this.xjWalletList.length; i++) {
  949. for (let j = 0; j < ovalVall.length; j++) {
  950. if (this.xjWalletList[i].walletRebateId == ovalVall[j].walletId) {
  951. walle.push(this.xjWalletList[i]);
  952. }
  953. }
  954. }
  955. return walle;
  956. };
  957. },
  958. comText() {
  959. return (val) => {
  960. if (this.cusIndex - 1 == 0) {
  961. const params = this.radio.split("&");
  962. return this.dataList.filter((k) => {
  963. return k.id == params[0];
  964. })[0][val];
  965. } else {
  966. const params =
  967. this.radioObj["radio" + (this.cusIndex - 1)].split("&");
  968. return this.popDataArr[this.cusIndex - 2].filter((k) => {
  969. return k.id == params[0];
  970. })[0][val];
  971. }
  972. };
  973. },
  974. // pickerOptions({ $props }) {
  975. // return {
  976. // disabledDate: (time) => {
  977. // return time.getTime() < Date.now() - 1 * 24 * 60 * 60 * 1000;
  978. // },
  979. // };
  980. // },
  981. comTatol() {
  982. return (row) => {
  983. return (
  984. row.price * row.qty -
  985. row.qty * row.discAmount -
  986. ((row.price - row.discAmount) *
  987. row.qty *
  988. ((row.rebateRate || 0) * 100)) /
  989. 100
  990. );
  991. };
  992. },
  993. },
  994. watch: {
  995. goodsList: {
  996. handler(newValue, oldValue) {
  997. if (newValue && newValue.length) {
  998. newValue.forEach((item, index) => {
  999. this.goodsList[index].compute_amount = item.price * item.qty;
  1000. this.goodsList[index].compute_flAmount =
  1001. ((item.price - item.discAmount) *
  1002. item.qty *
  1003. (item.rebateRate * 100)) /
  1004. 100;
  1005. this.goodsList[index].compute_zkAmount = item.qty * item.discAmount;
  1006. this.goodsList[index].compute_sfAmount =
  1007. item.price * item.qty -
  1008. item.qty * item.discAmount -
  1009. ((item.price - item.discAmount) *
  1010. item.qty *
  1011. ((item.rebateRate || 0) * 100)) /
  1012. 100;
  1013. });
  1014. }
  1015. this.goodsList = newValue;
  1016. },
  1017. immediate: true,
  1018. deep: true,
  1019. },
  1020. },
  1021. created() {
  1022. this.getDictList();
  1023. this.getWalletList();
  1024. this.getWarehouseList();
  1025. this.getTypeList();
  1026. this.getUserList();
  1027. if (this.listItem) {
  1028. this.getDetail();
  1029. }
  1030. },
  1031. methods: {
  1032. blurQty(e, row) {
  1033. if (!e) {
  1034. this.$set(row, "qty", 1);
  1035. }
  1036. },
  1037. funQty(qty, row, index) {
  1038. if (row.fang) {
  1039. if (this.type == 1) {
  1040. this.$set(this.totalArr, index, {
  1041. totalQty: 0,
  1042. totalPrice: 0,
  1043. totalAmount: 0,
  1044. });
  1045. let sum = 0;
  1046. for (let j = 0; j < this.multipleSelections[index].length; j++) {
  1047. this.multipleSelections[index][j].fang = true;
  1048. sum += +this.multipleSelections[index][j].qty;
  1049. this.totalArr[index].totalPrice +=
  1050. +this.multipleSelections[index][j].price;
  1051. this.totalArr[index].totalAmount +=
  1052. +this.multipleSelections[index][j].price * +qty;
  1053. }
  1054. this.totalArr[index].totalQty = sum;
  1055. } else {
  1056. let sum = 0;
  1057. this.totalQty = this.totalPrice = this.totalAmount = 0;
  1058. for (let i = 0; i < this.multipleSelection.length; i++) {
  1059. sum += +this.multipleSelection[i].qty;
  1060. this.totalPrice += +this.multipleSelection[i].price;
  1061. this.totalAmount += +this.multipleSelection[i].price * +qty;
  1062. }
  1063. this.totalQty += sum;
  1064. }
  1065. }
  1066. },
  1067. getUserList() {
  1068. getUserList({
  1069. pageNum: 1,
  1070. pageSize: -1,
  1071. adminWebsitId: "",
  1072. isCustomer: 0,
  1073. roleId: "",
  1074. status: true,
  1075. userName: "",
  1076. }).then((res) => {
  1077. this.userList = res.data.records;
  1078. // // consloe(this.userList,'122');
  1079. });
  1080. },
  1081. handleUser(e) {
  1082. const user = this.userList.filter((k) => {
  1083. return k.adminUserId == e;
  1084. })[0];
  1085. this.mainForm.k3ServiceId = user.adminUserId;
  1086. this.mainForm.k3ServiceName = user.nickName;
  1087. },
  1088. handleUser2(e, row) {
  1089. const user = this.userList.filter((k) => {
  1090. return k.adminUserId == e;
  1091. })[0];
  1092. this.$set(row, "serviceId", user.adminUserId);
  1093. this.$set(row, "serviceName", user.nickName);
  1094. this.$set(this.mainForm, "k3ServiceId", user.adminUserId);
  1095. this.$set(this.mainForm, "k3ServiceName", user.nickName);
  1096. },
  1097. // 返回列表
  1098. goBack() {
  1099. this.$emit("backListFormDetail");
  1100. },
  1101. handleWallets(e, row, index) {
  1102. if (e) {
  1103. const service = row.wallets.filter((k) => {
  1104. return e == k.customerWalletId;
  1105. })[0];
  1106. if (index == 0 && !this.mainForm.k3ServiceId) {
  1107. this.$set(this.mainForm, "k3ServiceId", service.serviceId);
  1108. this.$set(this.mainForm, "k3ServiceName", service.serviceName);
  1109. }
  1110. this.$set(row, "serviceId", service.serviceId);
  1111. this.$set(row, "serviceName", service.serviceName);
  1112. // this.$set(row,'amount',service.amount || 0)
  1113. } else {
  1114. console.log(index);
  1115. if (index === 0) {
  1116. this.$set(this.mainForm, "k3ServiceId", "");
  1117. this.$set(this.mainForm, "k3ServiceName", "");
  1118. }
  1119. this.$set(row, "serviceId", "");
  1120. this.$set(row, "serviceName", "");
  1121. // this.$set(row,'amount',0 )
  1122. }
  1123. },
  1124. // 选择销售政策获取政策条件列表
  1125. async handlePolicy(e) {
  1126. console.log(e);
  1127. this.totalArr = [];
  1128. this.multipleSelections = [];
  1129. this.dataList = [];
  1130. this.popDataArr = [];
  1131. this.screenForm.saleTypeCode = "";
  1132. const type = this.policyList.filter((k) => {
  1133. return k.code === e;
  1134. })[0].type;
  1135. if (type == "PROVISION") {
  1136. // PROVISION 配提
  1137. // 选择销售政策PolidcyId改变获取条件列表
  1138. const { data } = await getPolicyConditionList({ policyId: e });
  1139. this.factor = data;
  1140. this.pop = data[0].pop;
  1141. this.remark = data[0].remark || "";
  1142. this.popArr = data[0].pop.split(":");
  1143. if (this.policyId) {
  1144. this.screenForm.policyId = this.policyId;
  1145. if (this.listItem) {
  1146. this.policyConditionId = data[0].id;
  1147. }
  1148. } else {
  1149. this.screenForm.policyId = data[0].policyId;
  1150. this.policyConditionId = data[0].id;
  1151. }
  1152. for (let i = 0; i < this.popArr.length; i++) {
  1153. await this.getConditionList(this.policyConditionId, i + 1);
  1154. }
  1155. } else {
  1156. // LIMIT 限量
  1157. this.getMaterialTypeList("sProvision");
  1158. }
  1159. },
  1160. hendleEdit(val, index) {
  1161. this.dialogVisible = false;
  1162. // let params = {
  1163. // id: this.cid,
  1164. // theTime: this.mainForm.date,
  1165. // mainId: this.mainForm.type,
  1166. // mainName: this.mainForm.mainName,
  1167. // remark: this.mainForm.remark,
  1168. // type: 2,
  1169. // retailOrderItemList: this.goodsList,
  1170. // policyId: this.policyId,
  1171. // };
  1172. // editData(params).then((res) => {
  1173. // this.$successMsg("编辑成功");
  1174. // this.getDetail();
  1175. // });
  1176. },
  1177. // 获取条件相对应的比列
  1178. handleFactor(e) {
  1179. const data = this.factor.filter((k) => {
  1180. return k.id == e;
  1181. })[0];
  1182. // // consloe(data, "kkkk");
  1183. this.pop = data.pop;
  1184. this.popArr = data.pop.split(":");
  1185. this.screenForm.policyId = data.policyId;
  1186. this.policyConditionId = data.id;
  1187. },
  1188. async handleGetPolicyList(){
  1189. const {data} = await policyList({
  1190. pageNum: 1,
  1191. pageSize: -1,
  1192. customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
  1193. specification: this.screenForm.specification,
  1194. })
  1195. this.policyList = data.records
  1196. if (data.records.length) {
  1197. this.handlePolicy(data.records[0].id);
  1198. }
  1199. },
  1200. // 引用销售政策搜索
  1201. async handlePolicyTypeList() {
  1202. if (!this.screenForm.policyId) {
  1203. this.$errorMsg("请选择销售政策");
  1204. return;
  1205. }
  1206. if (this.popArr.length) {
  1207. this.popDataArr = [];
  1208. this.dataList = [];
  1209. for (let i = 0; i < this.popArr.length; i++) {
  1210. await this.getConditionList(this.policyConditionId, i + 1, false);
  1211. }
  1212. } else {
  1213. // sProvision = true
  1214. this.getMaterialTypeList("sProvision");
  1215. }
  1216. },
  1217. // 获取某一个比例下的数据 ,查询popType 当前 this.cusIndex+1
  1218. async getConditionList(policyConditionId, popType, fang) {
  1219. this.listLoading = true;
  1220. const { data } = await getConditionList({
  1221. pageNum: this.currentPage,
  1222. pageSize: -1,
  1223. policyConditionId,
  1224. popType,
  1225. // specification: this.screenForm.specification,
  1226. saleTypeCode: this.screenForm.saleTypeCode,
  1227. customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
  1228. });
  1229. if (!fang) {
  1230. this.poptotal["total" + popType] = data.total;
  1231. this.popcun["cun" + popType] = 1;
  1232. this.popfun["handleSizeChange" + popType] = (val, index) => {
  1233. this.popcun["cun" + index] = val;
  1234. this.currentPage = 1;
  1235. this.getConditionList(this.policyConditionId, index, true);
  1236. };
  1237. this.popfun["handleCurrentChange" + popType] = (val, index) => {
  1238. this.popcun["cun" + index] = val;
  1239. this.getConditionList(this.policyConditionId, index, true);
  1240. };
  1241. }
  1242. const datas = data.records;
  1243. if (this.listItem) {
  1244. for (let i = 0; i < this.goodsList.length; i++) {
  1245. for (let j = 0; j < datas.length; j++) {
  1246. if (datas[j].id == this.goodsList[i].policyMaterialId) {
  1247. this.$set(datas[j], "disabled", true);
  1248. }
  1249. }
  1250. }
  1251. }
  1252. // this.total = data.total;
  1253. // console.log(this.goodsList,'4555');
  1254. if (this.goodsList.length) {
  1255. for (let p = 0; p < this.goodsList.length; p++) {
  1256. for (let q = 0; q < datas.length; q++) {
  1257. if (this.goodsList[p].id == datas[q].id) {
  1258. this.$set(datas[q], "disabled", true);
  1259. }
  1260. }
  1261. }
  1262. }
  1263. for (let i = 0; i < data.records.length; i++) {
  1264. data.records[i].qty = 1;
  1265. data.records[i].policyMaterialId = data.records[i].id;
  1266. this.$set(
  1267. data.records[i],
  1268. "zong",
  1269. data.records[i].qty * data.records[i].price
  1270. );
  1271. data.records[i].sums1 = ["price", "qty", "zong"];
  1272. // this.$set(data.records[i],'userList',this.userList)
  1273. }
  1274. if (fang) {
  1275. this.popDataArr[popType] = datas;
  1276. } else {
  1277. this.popDataArr.push(datas);
  1278. }
  1279. this.totalArr.push({
  1280. totalQty: 0,
  1281. totalPrice: 0,
  1282. totalAmount: 0,
  1283. });
  1284. // this.$set(this.totalArr,[...this.totalArr])
  1285. this.listLoading = false;
  1286. // consloe(this.popDataArr);
  1287. },
  1288. // 获取政策列表
  1289. getMaterialTypeList(val) {
  1290. this.listLoading2 = true;
  1291. getMaterialTypeList({
  1292. pageNum: 1,
  1293. pageSize: -1,
  1294. policyId: this.screenForm.policyId,
  1295. saleTypeCode: this.screenForm.saleTypeCode,
  1296. // specification: this.screenForm.specification,
  1297. customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
  1298. [val]: true,
  1299. }).then((res) => {
  1300. this.dataList = res.data.records;
  1301. if (this.listItem) {
  1302. for (let i = 0; i < this.goodsList.length; i++) {
  1303. for (let j = 0; j < this.dataList.length; j++) {
  1304. if (this.dataList[j].id == this.goodsList[i].policyMaterialId) {
  1305. this.$set(this.dataList[i], "disabled", true);
  1306. }
  1307. }
  1308. }
  1309. }
  1310. for (let i = 0; i < res.data.records.length; i++) {
  1311. this.$set(res.data.records[i], "qty", 1);
  1312. res.data.records[i].sums1 = ["price", "qty", "zong"];
  1313. res.data.records[i].userList = this.userList;
  1314. res.data.records[i].policyMaterialId = res.data.records[i].id;
  1315. for (let j = 0; j < this.goodsList.length; j++) {
  1316. if (this.goodsList[j].id == res.data.records[i].id) {
  1317. res.data.records[i].disabled = false;
  1318. }
  1319. }
  1320. }
  1321. this.dataList = res.data.records;
  1322. this.total = res.data.total;
  1323. this.listLoading2 = false;
  1324. this.popDataArr = [];
  1325. this.popArr = [];
  1326. // // consloe(this.dataList, "kkkk");
  1327. });
  1328. },
  1329. // 下一步获取某个政策条件比例数据
  1330. handleCondition() {
  1331. if (this.multipleSelection.length) {
  1332. this.cusIndex += 1;
  1333. this.disabled = true;
  1334. this.multipleData.push(this.multipleSelection);
  1335. this.getConditionList(this.policyConditionId, this.cusIndex + 1);
  1336. } else {
  1337. this.$errorMsg("请选择");
  1338. }
  1339. // // consloe(this.cusIndex,'下');
  1340. },
  1341. // 上一步
  1342. handleShang() {
  1343. this.cusIndex == 0 ? (this.disabled = false) : "";
  1344. this.multipleData.splice(this.cusIndex, 1);
  1345. this.popDataArr.splice(this.cusIndex, 1);
  1346. this.cusIndex -= 1;
  1347. // // consloe(this.cusIndex,'上');
  1348. },
  1349. /**
  1350. * 根据条件禁用行复选框
  1351. * 函数返回值为false则禁用选择(反之亦然)
  1352. * @param {Object} row - 行数据
  1353. * @param {String} index - 索引值
  1354. * @return Boolean
  1355. */
  1356. selectable: function (row, index) {
  1357. // row.disabled == undefined 才能被选中
  1358. if (row.disabled == undefined) {
  1359. return true;
  1360. }
  1361. // 函数必须有返回值且是布尔值
  1362. // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
  1363. // 如果没有返回值则默认返回false(全部无法选中)
  1364. },
  1365. /**
  1366. * 根据条件禁用行复选框
  1367. * 函数返回值为false则禁用选择(反之亦然)
  1368. * @param {Object} row - 行数据
  1369. * @param {String} index - 索引值
  1370. * @return Boolean
  1371. */
  1372. selectable2: function (row, index) {
  1373. // row.disabled == undefined 才能被选中
  1374. if (row.disabled == undefined) {
  1375. return true;
  1376. }
  1377. // 函数必须有返回值且是布尔值
  1378. // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
  1379. // 如果没有返回值则默认返回false(全部无法选中)
  1380. },
  1381. // 条件数据多选
  1382. handleSelectionChange(val, type, index) {
  1383. if (type === 1) {
  1384. this.type = 1;
  1385. if (!this.multipleSelections.length) {
  1386. this.multipleSelections = new Array(index).fill([]);
  1387. } else {
  1388. for (let i = 0; i < this.multipleSelections.length; i++) {
  1389. if (
  1390. !this.multipleSelections[i] ||
  1391. !this.multipleSelections[i].length
  1392. ) {
  1393. this.multipleSelections[i] = [];
  1394. }
  1395. }
  1396. }
  1397. this.$set(this.multipleSelections, index, val);
  1398. this.$set(this.totalArr, index, {
  1399. totalQty: 0,
  1400. totalPrice: 0,
  1401. totalAmount: 0,
  1402. });
  1403. for (let j = 0; j < this.multipleSelections[index].length; j++) {
  1404. this.multipleSelections[index][j].fang = true;
  1405. this.totalArr[index].totalQty +=
  1406. +this.multipleSelections[index][j].qty;
  1407. this.totalArr[index].totalPrice +=
  1408. +this.multipleSelections[index][j].price;
  1409. this.totalArr[index].totalAmount +=
  1410. +this.multipleSelections[index][j].price *
  1411. +this.multipleSelections[index][j].qty;
  1412. }
  1413. // consloe(this.multipleSelections);
  1414. } else {
  1415. this.type = 2;
  1416. this.multipleSelection = val;
  1417. console.log(this.multipleSelection);
  1418. this.totalQty = this.totalPrice = this.totalAmount = 0;
  1419. for (let i = 0; i < this.multipleSelection.length; i++) {
  1420. this.multipleSelection[i].fang = true;
  1421. this.totalQty += +this.multipleSelection[i].qty;
  1422. this.totalPrice += +this.multipleSelection[i].price;
  1423. this.totalAmount +=
  1424. +this.multipleSelection[i].price * +this.multipleSelection[i].qty;
  1425. }
  1426. }
  1427. },
  1428. hanlePopData() {
  1429. console.log(this.multipleSelections);
  1430. this.multipleData.push(this.multipleSelection);
  1431. if (this.multipleData.length && this.multipleSelection.length) {
  1432. let arrData = [];
  1433. for (let i = 0; i < this.multipleData.length; i++) {
  1434. if (
  1435. this.multipleData[i].wallets &&
  1436. this.multipleData[i].wallets.length
  1437. ) {
  1438. this.multipleData[i].id = null;
  1439. this.$set(
  1440. this.multipleData[i],
  1441. "customerWalletId",
  1442. this.multipleData[i].wallets[0].customerWalletId
  1443. );
  1444. this.$set(
  1445. this.multipleData[i],
  1446. "serviceName",
  1447. this.multipleData[i].wallets[0].serviceName
  1448. );
  1449. this.$set(
  1450. this.multipleData[i],
  1451. "serviceId",
  1452. this.multipleData[i].wallets[0].serviceId
  1453. );
  1454. this.$set(this.multipleData[i], "amount", 0);
  1455. }
  1456. arrData = [...arrData, ...this.multipleData[i]];
  1457. }
  1458. if (this.goodsList.length) {
  1459. this.goodsList = [...this.goodsList, ...arrData];
  1460. } else {
  1461. this.goodsList = arrData;
  1462. }
  1463. if (this.dataList.length) {
  1464. for (let u = 0; u < this.goodsList.length; u++) {
  1465. this.goodsList[u].disabled = true;
  1466. }
  1467. this.newDataList = this.multipleSelection;
  1468. this.disabled = true;
  1469. }
  1470. this.goodsList.forEach((item) => {
  1471. item.sums1 = ["qty", "directTransferQty"];
  1472. item.sums2 = [
  1473. "price",
  1474. "rebateAmount",
  1475. "compute_amount",
  1476. "compute_flAmount",
  1477. "compute_zkAmount",
  1478. "compute_sfAmount",
  1479. ];
  1480. this.$set(item, "status1", "");
  1481. this.$set(item, "status2", "");
  1482. this.$set(item, "userList", this.userList);
  1483. });
  1484. if (this.goodsList.length && this.goodsList[0].wallets.length) {
  1485. console.log(555555);
  1486. this.mainForm.k3ServiceName =
  1487. this.goodsList[0].wallets[0].serviceName || "";
  1488. this.mainForm.k3ServiceId =
  1489. this.goodsList[0].wallets[0].serviceId || "";
  1490. }
  1491. // if (this.goodsList.length>4) {
  1492. // this.newGoodsList = this.goodsList
  1493. // this.newGoodsList.length = 4
  1494. // }
  1495. this.cusIndex = 0;
  1496. this.total = 0;
  1497. this.popDataArr = [];
  1498. this.multipleData = [];
  1499. this.multipleSelection = [];
  1500. this.policyId = this.screenForm.policyId;
  1501. this.totalQty = this.totalPrice = this.totalAmount = 0;
  1502. this.isShowDialog = false;
  1503. this.$refs.singleTable.clearSelection();
  1504. // consloe(this.goodsList, "kkkk");
  1505. } else if (this.multipleSelections.length) {
  1506. let arrData = [];
  1507. this.newMultipleSelections = this.multipleSelections;
  1508. for (let i = 0; i < this.multipleSelections.length; i++) {
  1509. for (let j = 0; j < this.multipleSelections[i].length; j++) {
  1510. this.multipleSelections[i][j].disabled = true;
  1511. this.multipleSelections[i][j].id = null;
  1512. if (this.multipleSelections[i][j].wallets.length) {
  1513. this.$set(
  1514. this.multipleSelections[i][j],
  1515. "customerWalletId",
  1516. this.multipleSelections[i][j].wallets[0].customerWalletId
  1517. );
  1518. this.$set(
  1519. this.multipleSelections[i][j],
  1520. "serviceName",
  1521. this.multipleSelections[i][j].wallets[0].serviceName
  1522. );
  1523. this.$set(
  1524. this.multipleSelections[i][j],
  1525. "serviceId",
  1526. this.multipleSelections[i][j].wallets[0].serviceId
  1527. );
  1528. this.$set(this.multipleSelections[i][j], "amount", 0);
  1529. }
  1530. arrData = [...arrData, this.multipleSelections[i][j]];
  1531. }
  1532. }
  1533. if (this.goodsList.length) {
  1534. this.goodsList = [...this.goodsList, ...arrData];
  1535. } else {
  1536. this.goodsList = arrData;
  1537. }
  1538. if (this.goodsList.length && this.goodsList[0].wallets.length) {
  1539. this.mainForm.k3ServiceName =
  1540. this.goodsList[0].wallets[0].serviceName || "";
  1541. this.mainForm.k3ServiceId =
  1542. this.goodsList[0].wallets[0].serviceId || "";
  1543. }
  1544. this.goodsList.forEach((item) => {
  1545. this.$set(item, "status1", "");
  1546. this.$set(item, "status2", "");
  1547. this.$set(item, "userList", this.userList);
  1548. item.sums1 = ["qty", "directTransferQty"];
  1549. item.sums2 = [
  1550. "price",
  1551. "rebateAmount",
  1552. "compute_amount",
  1553. "compute_flAmount",
  1554. "compute_zkAmount",
  1555. "compute_sfAmount",
  1556. ];
  1557. });
  1558. this.disabled = true;
  1559. // this.popDataArr = [];
  1560. this.multipleData = [];
  1561. this.multipleSelection = [];
  1562. this.policyId = this.screenForm.policyId;
  1563. this.totalQty = this.totalPrice = this.totalAmount = 0;
  1564. this.isShowDialog = false;
  1565. this.$refs.singleTable.forEach((k) => {
  1566. k.clearSelection();
  1567. });
  1568. // this.$refs.singleTable.clearSelection();
  1569. } else {
  1570. this.$errorMsg("请选择");
  1571. }
  1572. },
  1573. // 获取详情
  1574. getDetail() {
  1575. getUserList({
  1576. pageNum: 1,
  1577. pageSize: -1,
  1578. adminWebsitId: "",
  1579. isCustomer: 0,
  1580. roleId: "",
  1581. status: true,
  1582. userName: "",
  1583. }).then((res) => {
  1584. this.userList = res.data.records;
  1585. getDetail({ id: this.listItem.id }).then((res) => {
  1586. const data = res.data;
  1587. this.mainForm.date = data.theTime;
  1588. this.mainForm.type = data.mainId;
  1589. this.mainForm.remark = data.remark;
  1590. this.mainForm.policyId = data.policyId;
  1591. this.policyId = data.policyId;
  1592. this.mainForm.k3ServiceName = data.k3ServiceName;
  1593. (this.mainForm.k3ServiceId = data.k3ServiceId),
  1594. (this.mainForm.fileNum = data.fileNum);
  1595. // this.mainForm.k3ServiceName = data.retailOrderItemList[0].wallets[0].serviceName
  1596. // this.mainForm.k3ServiceId = data.retailOrderItemList[0].wallets[0].serviceId
  1597. data.retailOrderItemList.forEach((item) => {
  1598. item.status1 = "";
  1599. item.status2 = "";
  1600. item.sums1 = ["qty", "directTransferQty"];
  1601. item.sums2 = [
  1602. "price",
  1603. "rebateAmount",
  1604. "compute_amount",
  1605. "compute_flAmount",
  1606. "compute_zkAmount",
  1607. "compute_sfAmount",
  1608. ];
  1609. this.$set(item, "userList", this.userList);
  1610. item.rebateWallets.forEach((j) => {
  1611. if (j.customerWalletId2 === data.customerWalletId2) {
  1612. this.$set(item, "amount", j.amount || 0);
  1613. }
  1614. });
  1615. item.wallets.forEach((k) => {
  1616. if (k.customerWalletId === data.customerWalletId) {
  1617. this.$set(item, "serviceId", k.serviceId);
  1618. this.$set(item, "serviceName", k.serviceName);
  1619. }
  1620. });
  1621. });
  1622. this.goodsList = data.retailOrderItemList;
  1623. });
  1624. });
  1625. },
  1626. // 获取销售政策
  1627. getPolicyList() {
  1628. policyList({
  1629. pageNum: 1,
  1630. pageSize: -1,
  1631. customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
  1632. status: true,
  1633. }).then((res) => {
  1634. if (this.policyId) {
  1635. this.screenForm.policyId = this.policyId;
  1636. this.disabled = true;
  1637. } else {
  1638. this.screenForm.policyId = res.data.records[0].code;
  1639. }
  1640. this.policyList = res.data.records;
  1641. if (this.policyList.length) {
  1642. this.handlePolicy(this.screenForm.policyId);
  1643. }
  1644. });
  1645. },
  1646. // 获取销售类型
  1647. getTypeList() {
  1648. const params = {
  1649. pageNum: 1,
  1650. pageSize: -1,
  1651. saleCode: "",
  1652. saleName: "",
  1653. status: "",
  1654. };
  1655. typeList(params).then((res) => {
  1656. this.ztypeList = res.data.records;
  1657. // // consloe(this.ztypeList, "type1111");
  1658. });
  1659. },
  1660. // 获取仓库列表
  1661. getWarehouseList() {
  1662. getWarehouseList({
  1663. pageNum: 1,
  1664. pageSize: -1,
  1665. }).then((res) => {
  1666. this.warehouseList = res.data.records;
  1667. });
  1668. },
  1669. // 获取限定机型
  1670. getpolicyTypeList() {
  1671. getpolicyTypeList({
  1672. pageNum: 1,
  1673. pageSize: 10,
  1674. policyId: this.screenForm.policyId,
  1675. saleTypeCode: this.screenForm.saleTypeCode,
  1676. }).then((res) => {
  1677. for (let i = 0; i < res.data.records.length; i++) {
  1678. this.$set(res.data.records[i], "qty", 1);
  1679. res.data.records[i].sums2 = ["price", "qty", "zong"];
  1680. res.data.records[i].userList = this.userList;
  1681. }
  1682. this.dataList = res.data.records;
  1683. this.total = res.data.total;
  1684. });
  1685. },
  1686. // 打开引用
  1687. handleShow() {
  1688. this.isShowDialog = true;
  1689. this.getPolicyList();
  1690. },
  1691. // 获取钱包列表
  1692. getWalletList() {
  1693. getWalletList({
  1694. customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
  1695. type: "COMMONLY",
  1696. }).then((res) => {
  1697. this.xjWalletList = res.data;
  1698. });
  1699. getWalletList({
  1700. customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
  1701. type: "REBATE",
  1702. }).then((res) => {
  1703. this.flWalletList = res.data;
  1704. });
  1705. },
  1706. // 获取销售类型列表
  1707. getSalesTypeList() {
  1708. getSalesTypeList({
  1709. pageNum: 1,
  1710. pageSize: -1,
  1711. }).then((res) => {
  1712. this.salesTypeList = res.data.records;
  1713. });
  1714. },
  1715. getDictList() {
  1716. getDictList({ sysDictEnum: "PRODUCT_TYPE" }).then((res) => {
  1717. this.typeList = res.data;
  1718. });
  1719. },
  1720. // 获取商品列表
  1721. getGoodsList() {
  1722. getGoodsList({
  1723. pageNum: this.currentPage,
  1724. pageSize: 10,
  1725. mainId: this.screenForm.type,
  1726. saleId: this.screenForm.salesType,
  1727. materialCode: this.screenForm.proNum,
  1728. materialName: this.screenForm.proName,
  1729. specification: this.screenForm.proModel,
  1730. price1: this.screenForm.price1,
  1731. price2: this.screenForm.price2,
  1732. }).then((res) => {
  1733. const oldGoodsList = this.goodsList;
  1734. const newGoodsList = res.data.records;
  1735. for (let i = 0; i < oldGoodsList.length; i++) {
  1736. const oldItem = oldGoodsList[i];
  1737. for (let j = 0; j < newGoodsList.length; j++) {
  1738. const newItem = newGoodsList[j];
  1739. if (newItem.materialId === oldItem.materialId) {
  1740. newGoodsList[j].selected = true;
  1741. break;
  1742. }
  1743. }
  1744. }
  1745. res.data.records.forEach((item) => {
  1746. item.materialName = item.name;
  1747. item.materialCode = item.number;
  1748. item.saleTypeName = item.saleName;
  1749. item.unit = item.baseUnit;
  1750. item.price = item.batchPrice;
  1751. item.tax = item.taxRate;
  1752. item.isDirectTransfer = false;
  1753. item.directTransferQty = "";
  1754. item.status1 = "";
  1755. item.status2 = "";
  1756. item.rebateAmount = "";
  1757. item.rebateRate = "";
  1758. item.productPriceId = item.id;
  1759. });
  1760. this.leftGoodsList = res.data.records;
  1761. this.listTotal = res.data.total;
  1762. });
  1763. },
  1764. // 查询重复值并禁选
  1765. checkboxSelect(row, rowIndex) {
  1766. if (row.selected) {
  1767. return false; // 禁用
  1768. } else {
  1769. return true; // 不禁用
  1770. }
  1771. },
  1772. // 点击 选择商品
  1773. openDialog() {
  1774. this.getSalesTypeList();
  1775. this.getGoodsList();
  1776. this.isShowDialog = true;
  1777. },
  1778. // 提交筛选表单
  1779. submitScreenForm() {
  1780. this.currentPage = 1;
  1781. this.getGoodsList();
  1782. },
  1783. // 重置筛选表单
  1784. resetScreenForm() {
  1785. this.$refs.screenForm.resetFields();
  1786. this.currentPage = 1;
  1787. this.getGoodsList();
  1788. },
  1789. // 关闭 弹窗
  1790. closeDialog() {
  1791. this.isShowDialog = false;
  1792. this.popDataArr = [];
  1793. },
  1794. // 删除
  1795. deleteGoods() {
  1796. const rightGoodsList = this.rightGoodsList;
  1797. const rightSelection = this.rightSelection;
  1798. for (let i = 0; i < rightGoodsList.length; i++) {
  1799. for (let j = 0; j < rightSelection.length; j++) {
  1800. if (rightSelection[j].materialId == rightGoodsList[i].materialId) {
  1801. this.rightGoodsList.splice(i, 1);
  1802. }
  1803. }
  1804. }
  1805. },
  1806. // 确定 添加产品
  1807. submitAddGoods() {
  1808. if (this.radio) {
  1809. const params = this.radio.split("&");
  1810. this.screenForm.policyId = params[1];
  1811. this.mainForm.policyId = params[1];
  1812. this.cusIndex += 1;
  1813. getpolicyList({
  1814. materialId: params[2],
  1815. policyId: params[1],
  1816. }).then((res) => {
  1817. this.pop = res.data.pop;
  1818. this.popArr = res.data.pop.split(":");
  1819. this.popArr.splice(0, 1);
  1820. for (let i = 0; i < this.popArr.length; i++) {
  1821. this.$set(this.radioObj, "radio" + (i + 1), "");
  1822. }
  1823. this.step = this.cusIndex + 1;
  1824. this.getConditionList(params[3], this.step);
  1825. });
  1826. } else {
  1827. this.$errorMsg("请选择");
  1828. }
  1829. },
  1830. // 更改每页数量
  1831. handleSizeChange(val) {
  1832. this.pageSize = val;
  1833. this.currentPage = 1;
  1834. this.getConditionList(this.policyConditionId, this.cusIndex + 1);
  1835. },
  1836. // 更改当前页
  1837. handleCurrentChange(val) {
  1838. this.currentPage = val;
  1839. this.getConditionList(this.policyConditionId, this.cusIndex + 1);
  1840. },
  1841. // 更改列表当前页
  1842. handleTableCurrentChange(val) {
  1843. this.currentPage = val;
  1844. this.getConditionList(this.policyConditionId, this.cusIndex + 1);
  1845. },
  1846. handleClose() {
  1847. this.totalQty = this.totalPrice = this.totalAmount = 0;
  1848. // this.dataList = [];
  1849. // this.popDataArr = [];
  1850. // this.screenForm.policyId = "";
  1851. // this.screenForm.saleTypeCode = "";
  1852. },
  1853. // 删除产品
  1854. deleteItem(index, id) {
  1855. this.goodsList.splice(index, 1);
  1856. // this.dataList
  1857. this.newDataList.splice(index, 1);
  1858. if (!this.goodsList.length) {
  1859. this.disabled = false;
  1860. this.policyId = "";
  1861. this.mainForm.policyId = "";
  1862. }
  1863. // this.popDataArr.splice(index,1)
  1864. },
  1865. // 修改返利钱包
  1866. changeWallet(e, row) {
  1867. if (e) {
  1868. const obj = row.rebateWallets.filter((k) => {
  1869. return e === k.customerWalletId;
  1870. })[0];
  1871. this.$set(row, "rebateRate", obj.rebateRate || 0);
  1872. this.$set(row, "amount", obj.amount || 0);
  1873. } else {
  1874. this.$set(row, "rebateRate", 0);
  1875. this.$set(row, "amount", 0);
  1876. }
  1877. },
  1878. clearWallet(e) {
  1879. console.log(e);
  1880. // const obj = row.rebateWallets.filter(k => {
  1881. // return e === k.customerWalletId
  1882. // })[0]
  1883. this.$set(row, "rebateRate", 0);
  1884. },
  1885. // 检查库存
  1886. checkStock() {
  1887. if (!this.warehouseValue) {
  1888. return this.$errorMsg("请选择仓库");
  1889. }
  1890. if (!this.goodsList) {
  1891. return this.$errorMsg("请添加货品");
  1892. }
  1893. const ids = [];
  1894. this.goodsList.forEach((item) => {
  1895. ids.push(item.materialId);
  1896. });
  1897. checkStock({
  1898. correspondId: this.warehouseValue,
  1899. materialId: ids.join(","),
  1900. }).then((res) => {
  1901. if (res.data) {
  1902. this.goodsList.forEach((item, index) => {
  1903. item.status1 = res.data[index].allStockNum;
  1904. item.status2 = res.data[index].stockNum;
  1905. // // consloe(item.status1, item.status2);
  1906. });
  1907. }
  1908. });
  1909. },
  1910. status2Filter(item) {
  1911. if (
  1912. item.status2 === "" ||
  1913. item.status2 === null ||
  1914. item.status2 === undefined
  1915. )
  1916. return "未检查";
  1917. if (item.status2 <= 0) {
  1918. return "无货";
  1919. } else if (item.status2 >= 1 && item.status2 <= 30) {
  1920. return item.status2;
  1921. } else if (item.status2 >= 31 && item.status2 <= 1000) {
  1922. return "有货";
  1923. } else {
  1924. return "充足";
  1925. }
  1926. // else if (item.status2 >= item.qty) return '可用'
  1927. // else return '短缺'
  1928. },
  1929. // 保存
  1930. clickSubmitForm() {
  1931. this.$refs.mainForm.validate((valid) => {
  1932. if (valid) {
  1933. // let mainName =
  1934. // this.typeList[
  1935. // findElem(this.typeList, "dictCode", this.mainForm.type)
  1936. // ].dictValue;
  1937. this.goodsList.userList = [];
  1938. this.goodsList.forEach((k) => {
  1939. delete k.userList;
  1940. });
  1941. const params = {
  1942. theTime: this.mainForm.date,
  1943. k3ServiceId: this.mainForm.k3ServiceId,
  1944. k3ServiceName: this.mainForm.k3ServiceName,
  1945. remark: this.mainForm.remark,
  1946. type: 2, // 1:普通零售单,2:政策零售单
  1947. retailOrderItemList: this.goodsList,
  1948. policyId: this.policyId,
  1949. fileNo: this.mainForm.fileNum,
  1950. };
  1951. console.log(params);
  1952. if (this.listItem) {
  1953. console.log(params.listItem);
  1954. params.id = this.listItem.id;
  1955. editData(params).then((res) => {
  1956. this.$successMsg("编辑成功");
  1957. this.goBack();
  1958. this.$parent.getList();
  1959. });
  1960. } else {
  1961. params.retailOrderItemList.forEach((k) => {
  1962. k.id = null;
  1963. });
  1964. addData(params).then((res) => {
  1965. this.$successMsg("添加成功");
  1966. this.goBack();
  1967. this.$parent.getList();
  1968. });
  1969. }
  1970. }
  1971. });
  1972. },
  1973. },
  1974. };
  1975. </script>
  1976. <style scoped lang="scss">
  1977. .yinput {
  1978. ::v-deep .el-input__inner {
  1979. text-align: right;
  1980. }
  1981. }
  1982. .fr {
  1983. margin: 10px;
  1984. overflow: hidden;
  1985. }
  1986. .detail-container {
  1987. width: 100%;
  1988. height: 100%;
  1989. margin-bottom: 80px;
  1990. ::v-deep .el-table__append-wrapper {
  1991. overflow: initial;
  1992. }
  1993. }
  1994. .table {
  1995. margin-top: 20px 0 0 0;
  1996. background-color: rgb(237 237 237);
  1997. }
  1998. .page-footer .footer.hideSidebar {
  1999. margin-left: 0;
  2000. width: 100%;
  2001. }
  2002. .mybox {
  2003. padding: 20px 0;
  2004. text-align: right;
  2005. div:first-child {
  2006. flex: 0 0 55px;
  2007. }
  2008. div {
  2009. flex: 1 0 200px;
  2010. padding-right: 10px;
  2011. text-align: right;
  2012. }
  2013. }
  2014. .myselect {
  2015. ::v-deep .el-select-dropdown__item {
  2016. max-width: 500px;
  2017. }
  2018. }
  2019. .main-title {
  2020. display: flex;
  2021. justify-content: space-between;
  2022. align-items: center;
  2023. margin-top: 20px;
  2024. height: 60px;
  2025. border-bottom: 1px solid #dcdfe6;
  2026. margin-bottom: 20px;
  2027. .title {
  2028. font-size: 16px;
  2029. font-weight: 600;
  2030. padding-left: 10px;
  2031. }
  2032. }
  2033. .tables {
  2034. display: flex;
  2035. margin-top: 10px;
  2036. .table {
  2037. width: 45%;
  2038. }
  2039. .buttons {
  2040. display: flex;
  2041. flex-direction: column;
  2042. justify-content: center;
  2043. align-items: center;
  2044. padding: 0 10px;
  2045. button {
  2046. margin: 0;
  2047. margin-top: 10px;
  2048. }
  2049. }
  2050. }
  2051. .ellipsis {
  2052. overflow: hidden;
  2053. text-overflow: ellipsis;
  2054. white-space: nowrap;
  2055. }
  2056. </style>