retail_form.vue 65 KB

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