edit.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. <template>
  2. <div class="salesNewEdit-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
  5. <!-- 自定义的二级文字标题 -->
  6. <template slot="subTitle">
  7. <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
  8. <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.salesBillNo }}</span>
  9. <span v-if="detailData&&detailData.salesBillNoSource">(原:{{ detailData&&detailData.salesBillNoSource || '--' }})</span>
  10. <a-button type="link" class="button-default" @click="showDetail=!showDetail">
  11. <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
  12. </a-button>
  13. </template>
  14. </a-page-header>
  15. <!-- 单据详情 -->
  16. <a-card size="small" :bordered="false" class="salesEdit-cont" v-show="showDetail">
  17. <div style="padding: 10px;">
  18. <a-descriptions size="small" :column="3">
  19. <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
  20. <a-descriptions-item label="收货地址" :span="2">{{ shippingAddress||'--' }}</a-descriptions-item>
  21. <a-descriptions-item label="收货人">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
  22. <a-descriptions-item label="收货电话">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
  23. <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
  24. <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
  25. <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
  26. <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
  27. <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
  28. </a-descriptions>
  29. </div>
  30. </a-card>
  31. <!-- 正常产品 -->
  32. <a-card size="small" :bordered="false" class="salesEdit-cont" v-if="salesBillSn">
  33. <div style="padding: 10px;">
  34. <productNormalList
  35. ref="productNormalList"
  36. @insterOk="insterActiveOk"
  37. @openCpModal="openProductModal"
  38. :showTotal="showTotal"
  39. :detailData="detailData"
  40. :warehouseSn="warehouseSn"
  41. :salesBillSn="salesBillSn"></productNormalList>
  42. </div>
  43. </a-card>
  44. <!-- 活动产品 -->
  45. <a-card
  46. size="small"
  47. :bordered="false"
  48. class="salesEdit-cont"
  49. v-for="item in activeList"
  50. :key="item.promoRuleSn"
  51. v-if="activeList.length"
  52. >
  53. <div slot="title" style="display: inline-block;width:100%;">
  54. <strong style="margin-right:10px;font-size:14px;">{{item.promotion.description}}</strong> ({{item.promotionRule.description}})
  55. <span style="margin-left:20px;color:#00aaff;cursor: pointer;" @click="(event) => {showDesc(event, item)}">
  56. <a-icon :type="item.showDesc ? 'eye-invisible' : 'eye'"/> 活动详情
  57. </span>
  58. <span :style="{margin:'0 20px',color:item.disabled?'#14b900':'#ff0800',cursor: 'pointer'}" @click="(event) => {disenablePromp(event, item)}">
  59. <a-icon title="禁用规则" :type="item.disabled?'link':'disconnect'"/> {{item.disabled ? '启用规则' : '禁用规则'}}
  60. </span>
  61. </div>
  62. <div slot="extra" @click="tooglePanel(item)" style="cursor: pointer;">{{ item.isActive ? '收起' : '展开' }} <a-icon type="caret-right" :rotate="item.isActive ? 90 : 0"/> </div>
  63. <div v-show="item.isActive" style="padding: 10px;">
  64. <productList
  65. :ref="'productList-'+item.promoRuleSn"
  66. :id="item.promoRuleSn"
  67. @openCpModal="openProductModal"
  68. @insterOk="insterActiveOk"
  69. @showDesc="v => showDescOk(v,item)"
  70. @upActive="upActive"
  71. :promo="item"
  72. :detailData="detailData"
  73. :warehouseSn="warehouseSn"
  74. :salesBillSn="salesBillSn"></productList>
  75. </div>
  76. </a-card>
  77. </a-spin>
  78. <div class="affix-cont">
  79. <div class="footer-price">
  80. <div></div>
  81. <div v-if="detailData">
  82. <div class="totalPrice">总售价:¥<span>{{ toThousands(detailData.totalAmount) }}</span></div>
  83. <div>
  84. 产品总款数:<strong style="margin-right: 10px;"> {{ detailData.totalCategory }} </strong>
  85. 总数量:<strong> {{ detailData.totalQty }} </strong>
  86. <span style="margin:0 10px;" v-if="detailData.totalDiscountAmount">优惠金额:¥-<strong>{{ toThousands(detailData.totalDiscountAmount) }}</strong></span>
  87. <a-popover title="优惠明细" @visibleChange="(visible)=>{visible&&getPromYhDetail()}">
  88. <a-button shape="round" size="small" v-if="detailData.totalDiscountAmount">优惠明细</a-button>
  89. <div slot="content">
  90. <div v-if="yhDetail">
  91. <div
  92. class="yhdetail"
  93. style="min-width:300px;margin-bottom: 5px;"
  94. v-for="(item,index) in yhDetail.promoMapList"
  95. :key="index">
  96. <div class="yhdetail-h" style="font-weight: bold;font-size:14px;">{{ item.title }}</div>
  97. <div style="padding-left:10px;"
  98. v-for="(sitem,sindex) in item.promoRuleMapList"
  99. :key="sindex"
  100. v-if="sitem.lossAmount"
  101. >
  102. <div style="display: flex;justify-content: space-between;">
  103. <span>{{sitem.promotionRuleTypeDictValue}}:</span>
  104. <strong>¥{{ toThousands(sitem.lossAmount) }}</strong>
  105. </div>
  106. <div class="yhdetail-d" style="color:#999;">{{ sitem.description }}</div>
  107. </div>
  108. </div>
  109. <div class="yhdetail" style="display: flex;justify-content: space-between;">
  110. <span style="font-weight: bold;font-size:14px;">优惠金额:</span>
  111. <span style="font-weight: bold;font-size:18px;">¥{{ toThousands(yhDetail.totalLossAmount) }}</span>
  112. </div>
  113. </div>
  114. <div style="text-align: center;padding: 20px;" v-else>
  115. 正在加载...
  116. </div>
  117. </div>
  118. </a-popover>
  119. </div>
  120. </div>
  121. </div>
  122. <div>
  123. <a-button
  124. size="large"
  125. style="padding: 0 60px;"
  126. :disabled="spinning"
  127. type="primary"
  128. class="button-primary"
  129. @click="handleSubmit()"
  130. id="productInfoList-handleSubmit">提交</a-button>
  131. </div>
  132. </div>
  133. <!-- 添加产品 -->
  134. <chooseProduct
  135. ref="chooseProduct"
  136. :openModal="showCpModal"
  137. @close="closeProductModal"
  138. @addProduct="insterProduct"></chooseProduct>
  139. <!-- 价格更新弹窗 -->
  140. <setPriceModal
  141. :show="priceUpdateModal"
  142. :totalRealAmount="updataData.totalRealAmount"
  143. :totalAmount="updataData.totalAmount"
  144. @ok="updatePrice"
  145. @cancel="priceUpdateModal=false"></setPriceModal>
  146. <!-- 新活动窗口 -->
  147. <newPromoModal
  148. :show="showNewActiveModal"
  149. :salesBillSn="salesBillSn"
  150. :newActiveList="newActiveList"
  151. @ok="showNewActiveOk"
  152. ></newPromoModal>
  153. </div>
  154. </template>
  155. <script>
  156. import { commonMixin } from '@/utils/mixin'
  157. import productList from './comps/productList.vue'
  158. import productNormalList from './comps/productNormalList.vue'
  159. import chooseProduct from './comps/chooseProduct.vue'
  160. import setPriceModal from './setPriceModal.vue'
  161. import newPromoModal from './newPromoModal.vue'
  162. import { salesDisablePromo,salesEnablePromoPromo, salesChangePromo } from '@/api/salesDetailNew'
  163. import { salesDetailBySn,salesPromoQueryCount, salesWriteSubmit, submitCheck, updateBatch, salesPromoQueryList, salesQueryUnPartPromo,salesPromoValidaSubmit } from '@/api/salesNew'
  164. export default {
  165. name: 'SalesNewEdit',
  166. mixins: [commonMixin],
  167. components:{
  168. setPriceModal,
  169. productList,
  170. chooseProduct,
  171. productNormalList,
  172. newPromoModal
  173. },
  174. data () {
  175. return {
  176. spinning: false,
  177. activeList:[], // 活动列表
  178. newActiveList: [], // 新活动列表
  179. activeDesKey: {},
  180. salesBillSn: null, // 销售单sn
  181. detailData: { discountAmount: 0, id: null, salesBillSn: '' }, // 订单基础数据
  182. warehouseSn: undefined,
  183. updataData: {
  184. totalRealAmount: '',
  185. totalAmount: ''
  186. },
  187. priceUpdateModal: false, // 价格更新弹窗
  188. showDetail: false,
  189. showCpModal: false,
  190. cpCurRefId: '',
  191. disabledActiveOption: null,
  192. yhDetail: null,
  193. showNewActiveModal: false
  194. }
  195. },
  196. computed: {
  197. showTotal(){
  198. return this.activeList.length > 0
  199. },
  200. shippingAddress () {
  201. const shippingAddrProvinceName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrProvinceName ? this.detailData.salesBillExtEntity.shippingAddrProvinceName : ''
  202. const shippingAddrCityName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrCityName ? this.detailData.salesBillExtEntity.shippingAddrCityName : ''
  203. const shippingAddrCountyName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrCountyName ? this.detailData.salesBillExtEntity.shippingAddrCountyName : ''
  204. const shippingAddr = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddr ? this.detailData.salesBillExtEntity.shippingAddr : ''
  205. if (!shippingAddrProvinceName && !shippingAddrCityName && !shippingAddrCountyName && !shippingAddr) {
  206. return '--'
  207. } else {
  208. return shippingAddrProvinceName + shippingAddrCityName + shippingAddrCountyName + shippingAddr
  209. }
  210. }
  211. },
  212. methods: {
  213. // 返回
  214. handleBack () {
  215. this.$router.push({ name: 'salesQueryNewList', query: { closeLastOldTab: true } })
  216. },
  217. tooglePanel(item){
  218. item.isActive=!item.isActive
  219. this.activeList.splice()
  220. },
  221. // 销售单详情
  222. getOrderDetail (flag) {
  223. salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
  224. if (res.status == 200) {
  225. this.detailData = res.data
  226. this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount||0) - Number(this.detailData.totalAmount||0)
  227. }
  228. if(flag){
  229. this.getActiveList()
  230. }
  231. })
  232. },
  233. // 优惠明细查看
  234. getPromYhDetail(){
  235. salesPromoQueryCount({salesBillSn: this.$route.params.sn }).then(res => {
  236. if (res.status == 200) {
  237. this.yhDetail = res.data
  238. }
  239. })
  240. },
  241. // 获取销售单参与的活动列表
  242. async getActiveList(){
  243. // 已参与活动列表
  244. this.activeList = await salesPromoQueryList({ salesBillSn: this.$route.params.sn }).then(res => res.data || [])
  245. this.activeList.map(item => {
  246. item.isActive = item.enabledFlag == 1
  247. item.showDesc = false
  248. item.disabled = item.enabledFlag == 0
  249. this.activeDesKey['search-'+item.promoRuleSn] = false
  250. })
  251. // 加载正常产品列表
  252. setTimeout(()=> {
  253. this.$refs.productNormalList.resetSearchForm()
  254. }, 500)
  255. },
  256. // 获取是否有新活动
  257. async getNewActive(){
  258. const hasNewActive = await salesQueryUnPartPromo({ salesBillSn: this.$route.params.sn, enabledFlag: "1" }).then(res => res.data)
  259. if(hasNewActive.length){
  260. this.newActiveList = hasNewActive
  261. this.showNewActiveModal=true
  262. }
  263. },
  264. showNewActiveOk(){
  265. this.showNewActiveModal = false
  266. this.getOrderDetail(true)
  267. },
  268. // 添加产品,包括正常和活动的产品
  269. closeProductModal(){
  270. this.cpCurRefId = ''
  271. this.showCpModal = false
  272. },
  273. // 打开选择产品弹框
  274. openProductModal(type, refId){
  275. console.log(type, refId)
  276. const promo = this.activeList.find(item => item.promoRuleSn == refId)
  277. this.$refs.chooseProduct.pageInit(this.detailData, promo, type)
  278. this.cpCurRefId = 'productList-' + refId
  279. this.showCpModal = true
  280. },
  281. // 添加活动产品成功的回调
  282. insterActiveOk(type){
  283. if(type == 'promo'){
  284. // 刷新正常产品列表
  285. this.$refs.productNormalList.resetSearchForm()
  286. }
  287. if(type == 'normal'){
  288. // 刷新活动产品列表
  289. this.activeList.map(item => {
  290. this.$refs['productList-' + item.promoRuleSn][0].resetSearchForm()
  291. })
  292. }
  293. this.getOrderDetail()
  294. },
  295. // 新增产品
  296. insterProduct(row, promotionFlag, type){
  297. // 正常产品
  298. if(type == 0){
  299. this.$refs.productNormalList.insterProduct(row, promotionFlag)
  300. }else{
  301. // 活动产品
  302. this.$refs[this.cpCurRefId][0].insterProduct(row, promotionFlag, type)
  303. }
  304. },
  305. // 更换活动
  306. upActive(oldPromo,data,params){
  307. const promo = data.split('-')
  308. const newSn = this.activeList.find(item => item.promoRuleSn == promo[1])
  309. const newSalesPromoSn = newSn && newSn.salesPromoSn || ''
  310. salesChangePromo({
  311. salesPromoSn: data != 0 ? newSalesPromoSn : '',
  312. promoRuleSn: promo[1],
  313. promotionFlag: promo[2]||'',
  314. ...params
  315. }).then(res => {
  316. if(res.status == 200){
  317. // 刷新新参与活动
  318. if(data != 0){
  319. this.$refs['productList-'+promo[1]][0].resetSearchForm()
  320. }
  321. // 刷新正常活动
  322. this.$refs.productNormalList.resetSearchForm()
  323. // 刷新当前活动
  324. this.$refs['productList-'+oldPromo.promoRuleSn][0].upAcitveSuccess()
  325. }
  326. })
  327. },
  328. // 选择价格类型 并更新
  329. updatePrice (type) {
  330. const _this = this
  331. if (type == 0) {
  332. const ajax_data = {
  333. salesBillSn: _this.salesBillSn,
  334. productPriceChangeFlag: type
  335. }
  336. _this.submitResult(ajax_data)
  337. } else {
  338. updateBatch(_this.updataData.detailList).then(res => {
  339. if (res.status == 200) {
  340. const ajax_data = {
  341. salesBillSn: _this.salesBillSn,
  342. productPriceChangeFlag: type
  343. }
  344. _this.submitResult(ajax_data)
  345. }
  346. })
  347. }
  348. },
  349. // 提交销售单
  350. handleSubmit () {
  351. // 先不提交,先判断是否有价格更新 (下级创建时判断)
  352. if (this.detailData && this.detailData.salesBillSource && this.detailData.salesBillSource == 'PURCHASE') {
  353. submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
  354. if (res.status == 200) {
  355. if (res.data.detailList.length > 0) {
  356. this.updataData = res.data
  357. const _this = this
  358. this.$nextTick(() => {
  359. _this.priceUpdateModal = true
  360. })
  361. } else {
  362. this.submitResult({ salesBillSn: this.salesBillSn })
  363. }
  364. }
  365. })
  366. } else {
  367. this.submitResult({ salesBillSn: this.salesBillSn })
  368. }
  369. },
  370. // 提交销售单
  371. async submitResult (data) {
  372. const _this = this
  373. // 校验活动规则
  374. const vaildActive = await salesPromoValidaSubmit({salesBillSn: this.salesBillSn}).then(res => res.data)
  375. // console.log(vaildActive)
  376. const a = vaildActive.filter(item => item.type == 1) // 不可提交
  377. const b = vaildActive.filter(item => item.type == 0) // 可跳过继续提交
  378. // 弹出不符合规则弹框,不可提交
  379. if(a.length){
  380. this.$info({
  381. title: '提示',
  382. centered: true,
  383. class:'confirm-center',
  384. okText:'关闭',
  385. width: 600,
  386. content: <div style="padding-top:15px;">
  387. <ol>
  388. {a.map(item => (
  389. <li style="padding:3px 0;">{item.message}</li>
  390. ))}
  391. </ol>
  392. <div style="padding:10px 0;text-align:center"><strong>请按照以上提示修改后再提交</strong></div>
  393. </div>
  394. });
  395. }else{
  396. // 弹出确认提示信息,可跳过继续提交
  397. if(b.length){
  398. this.$confirm({
  399. title: '提示',
  400. centered: true,
  401. class:'confirm-center',
  402. okText:'提交',
  403. width: 600,
  404. content: <div style="padding-top:15px;">
  405. <ol>
  406. {b.map(item => (
  407. <li style="padding:3px 0;">{item.message}</li>
  408. ))}
  409. </ol>
  410. </div>,
  411. onOk() {
  412. _this.submitOrder(data)
  413. }
  414. });
  415. }else{
  416. _this.submitOrder(data)
  417. }
  418. }
  419. },
  420. async submitOrder(data){
  421. this.spinning = true
  422. const res = await salesWriteSubmit(data)
  423. if (res.status == 200) {
  424. this.handleBack()
  425. this.$message.success(res.message)
  426. }
  427. this.spinning = false
  428. },
  429. // 展开收缩活动详情
  430. showDesc(e,item){
  431. e.stopPropagation()
  432. item.isActive = true
  433. const row = this.$refs['productList-'+item.promoRuleSn][0]
  434. row&&row.showDesc(item.promotionRule)
  435. },
  436. showDescOk(v,item){
  437. item.showDesc = v
  438. this.activeList.splice()
  439. },
  440. // 启用规则
  441. enabledActive(e,item){
  442. const _this = this
  443. salesEnablePromoPromo({
  444. salesBillSn: _this.salesBillSn,
  445. salesPromoSn: item.salesPromoSn
  446. }).then(res => {
  447. if(res.status == 200){
  448. _this.$refs['productList-'+item.promoRuleSn][0].disableActive(false)
  449. item.disabled = false
  450. item.isActive = true
  451. _this.activeList.splice()
  452. // 刷新正常活动
  453. _this.$refs.productNormalList.resetSearchForm()
  454. _this.$message.success("操作成功,请添加产品")
  455. }
  456. })
  457. },
  458. // 禁用规则
  459. disabledActive(e,item){
  460. const _this = this
  461. salesDisablePromo({
  462. salesBillSn: _this.salesBillSn,
  463. salesPromoSn: item.salesPromoSn,
  464. promoRuleSn: item.promoRuleSn,
  465. salesDisableType: _this.disabledActiveOption
  466. }).then(res => {
  467. if(res.status == 200){
  468. _this.$refs['productList-'+item.promoRuleSn][0].disableActive(true)
  469. // 刷新所有表格
  470. _this.$refs.productNormalList.resetSearchForm()
  471. _this.insterActiveOk('normal')
  472. _this.disabledActiveOption = null
  473. item.disabled = true
  474. item.isActive = false
  475. _this.activeList.splice()
  476. _this.$message.success("操作成功")
  477. }
  478. })
  479. },
  480. // 禁用启用活动规则
  481. disenablePromp(e,item){
  482. const _this = this
  483. const table = _this.$refs['productList-'+item.promoRuleSn][0]
  484. // 是否启用规则
  485. if(item.disabled){
  486. this.enabledActive(e,item)
  487. return
  488. }
  489. // 如果没有活动产品,直接禁用无需弹框提示
  490. if(table.countData&&!table.countData.totalQty){
  491. _this.disabledActiveOption = 'DELETE'
  492. _this.disabledActive(e,item)
  493. return
  494. }
  495. // 弹框提示禁用方式
  496. this.$confirm({
  497. title: '确定禁用规则?',
  498. centered: true,
  499. class:'confirm-center',
  500. content: <div>
  501. <div style="padding:10px 0;text-align:center;">禁用规则后,将无法享受该活动规则优惠</div>
  502. <div style="padding:0 0 10px 0;text-align:center;">
  503. <aRadioGroup onChange={_this.changeDaOpt}>
  504. <aRadio style="display:block;height: '30px';lineHeight: '30px';padding:5px 0;" value="DELETE">
  505. 删除规则中相关产品
  506. </aRadio>
  507. <aRadio style="display:block;height: '30px';lineHeight: '30px';padding:5px 0;" value="REMOVE">
  508. 移出规则中相关产品
  509. </aRadio>
  510. </aRadioGroup>
  511. </div>
  512. </div>,
  513. onOk() {
  514. if(_this.disabledActiveOption){
  515. _this.disabledActive(e,item)
  516. }else{
  517. _this.$message.info("请选择禁用方式!")
  518. return true
  519. }
  520. },
  521. onCancel() {
  522. _this.disabledActiveOption = null
  523. },
  524. });
  525. },
  526. changeDaOpt(e){
  527. this.disabledActiveOption = e.target.value
  528. },
  529. pageInit () {
  530. this.salesBillSn = this.$route.params.sn
  531. this.warehouseSn = this.$route.params.sn ? this.$route.params.wSn : ''
  532. this.getOrderDetail(true)
  533. this.getNewActive()
  534. }
  535. },
  536. mounted () {
  537. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  538. this.pageInit()
  539. }
  540. },
  541. activated () {
  542. // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
  543. if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
  544. this.pageInit()
  545. }
  546. },
  547. beforeRouteEnter (to, from, next) {
  548. next(vm => {})
  549. }
  550. }
  551. </script>
  552. <style lang="less">
  553. .salesNewEdit-wrap{
  554. position: relative;
  555. height: 100%;
  556. padding-bottom: 75px;
  557. box-sizing: border-box;
  558. >.ant-spin-nested-loading{
  559. overflow-y: auto;
  560. height: 100%;
  561. }
  562. .salesEdit-cont{
  563. margin: 10px 0;
  564. }
  565. .redStyle{
  566. font-weight: bold;
  567. color: red;
  568. }
  569. .ellipsisCon{
  570. display: flex;
  571. justify-content: space-between;
  572. align-items: center;
  573. .ellipsisText{
  574. width: 100%;
  575. overflow: hidden;
  576. text-overflow: ellipsis;
  577. display: box;
  578. display: -webkit-box;
  579. -webkit-line-clamp: 1;
  580. -webkit-box-orient: vertical;
  581. }
  582. }
  583. .ant-card-small > .ant-card-body {
  584. padding: 0!important;
  585. }
  586. .affix-cont{
  587. padding: 10px 15px;
  588. text-align: right;
  589. display: flex;
  590. justify-content: space-between;
  591. align-items: center;
  592. .footer-price{
  593. flex-grow:1;
  594. display: flex;
  595. justify-content: flex-end;
  596. align-items: center;
  597. > div{
  598. padding: 0 15px;
  599. }
  600. .totalPrice{
  601. span{
  602. font-weight: bold;
  603. color: red;
  604. font-size: 20px;
  605. }
  606. }
  607. }
  608. }
  609. }
  610. </style>