acquisitionManagementAdd.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. <!-- <!--收购管理新增-->
  2. <template>
  3. <el-container class="container">
  4. <div class="type">{{type}}</div>
  5. <el-header class="header">
  6. <img class="head-icon" src="../../../public/img/icons/acquisition6.png" alt="">
  7. <div class="head-title">{{baseInfoForm.warehouseName}}</div>
  8. </el-header>
  9. <el-main v-show="isCountShow">
  10. <el-form ref="baseInfoForm" label-position="left" :model="baseInfoForm" label-width="120px">
  11. <el-row class="base-info">
  12. 基本信息
  13. </el-row>
  14. <div class="row1">
  15. <div class="grid-content">
  16. <el-form-item label="货名">
  17. <!-- <el-input v-model="baseInfoForm.goodsName"></el-input> -->
  18. <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange">
  19. <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
  20. :value="item.constValue">
  21. </el-option>
  22. </el-select>
  23. </el-form-item>
  24. </div>
  25. <div class="grid-content">
  26. <el-form-item label="基准水分(%)">
  27. <el-input v-model="baseInfoForm.waterBase" @input="changeBaseWater"></el-input>
  28. </el-form-item>
  29. </div>
  30. <div class="grid-content">
  31. <el-form-item label="扣重比">
  32. <el-input v-model="baseInfoForm.deductWeight"></el-input>
  33. </el-form-item>
  34. </div>
  35. </div>
  36. <div class="row2">
  37. <div class="grid-content">
  38. <el-form-item label="干粮水分">
  39. <el-input v-model="baseInfoForm.waterMin" @input="changeMinWater"></el-input>
  40. </el-form-item>
  41. </div>
  42. <div class="grid-content">
  43. <el-form-item label="水分上限">
  44. <el-input v-model="baseInfoForm.waterMax" @input="changeMaxWater"></el-input>
  45. </el-form-item>
  46. </div>
  47. <div class="grid-content">
  48. <el-form-item label="销售上限(年/吨)">
  49. <el-input v-model="baseInfoForm.saleLimit"></el-input>
  50. </el-form-item>
  51. </div>
  52. </div>
  53. </el-form>
  54. <el-row class="row3">
  55. <div class="top">
  56. <div class="title">粮价设置</div>
  57. <el-button class="btn" @click="newSetPrice">新增</el-button>
  58. </div>
  59. <div class="content" v-for="(item,index) in priceList" :key="index">
  60. <div class="top">
  61. <div class="left">
  62. <div class="text">基准单价(元/公斤)</div>
  63. <el-input v-model="item.basicUnitPrice"></el-input>
  64. </div>
  65. <el-button @click="delSetPrice(item,index)">删除</el-button>
  66. </div>
  67. {{item}}
  68. <div class="level">
  69. <el-checkbox-group v-model="item.checkList" @change="changeLevel($event,index)">
  70. <el-checkbox label="一等"></el-checkbox>
  71. <el-checkbox label="二等"></el-checkbox>
  72. <el-checkbox label="三等"></el-checkbox>
  73. <el-checkbox label="等外"></el-checkbox>
  74. </el-checkbox-group>
  75. </div>
  76. <div class="count">
  77. <div class="left">
  78. <div>水分(%)</div>
  79. <div>降幅(元/0.5%)</div>
  80. </div>
  81. <div class="right">
  82. <div class="line"></div>
  83. <div class="jt-style"></div>
  84. <div v-for="(item1,index) in item.detailList">
  85. <div class="item-style">
  86. <div v-if="item1.type!=4" class="item-style-title">
  87. <span>{{item1.name}}{{item1.index}}</span>
  88. <span class="add" @click="add(item,item1,index)" v-if="item1.type!=3">+</span>
  89. <span class="reduce" @click="reduce(item,item1,index)"
  90. v-show="item1.type!=1&&item1.type!=2&&item1.type!=3">-</span>
  91. </div>
  92. <div v-show="item1.type!=4">
  93. <input v-if='item1.type==1' class="water-price" v-model="baseInfoForm.waterMin"
  94. :disabled="item1.isWrite?false:true"></input>
  95. <input v-if='item1.type==2' class="water-price" v-model="baseInfoForm.waterBase"
  96. :disabled="item1.isWrite?false:true"></input>
  97. <input v-if='item1.type==3' class="water-price" v-model="baseInfoForm.waterMax"
  98. :disabled="item1.isWrite?false:true"></input>
  99. <input v-if='item1.type==5' class="water-price" v-model="item1.water"
  100. :disabled="item1.isWrite?false:true"></input>
  101. </div>
  102. <div class="circle" v-if="item1.type!=4"></div>
  103. </div>
  104. <div class="bottom-price">
  105. <input v-if="item1.type==4" class="water-price" v-model="item1.jfprice"></input>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <el-button class="submit" @click="submit">提交</el-button>
  112. </el-row>
  113. </el-main>
  114. <el-main v-show="!isCountShow">
  115. <div class="page2-content">
  116. <div class="titel">
  117. 玉米价格对照表(按水分)
  118. </div>
  119. <el-table :data="tableData" style="width: 100%" :row-class-name="tableRowClassName">
  120. <el-table-column prop="waterMin" label="水分下限(%)">
  121. </el-table-column>
  122. <el-table-column prop="waterMax" label="水分上限(%)">
  123. </el-table-column>
  124. <el-table-column prop="price1" label="一等单价">
  125. </el-table-column>
  126. <el-table-column prop="price2" label="二等单价">
  127. </el-table-column>
  128. <el-table-column prop="price3" label="三等单价">
  129. </el-table-column>
  130. <el-table-column prop="priceOther" label="等外单价">
  131. </el-table-column>
  132. </el-table>
  133. </div>
  134. <el-button class="submit" @click="closeCount">关闭</el-button>
  135. <el-button class="submit" @click="print">打印</el-button>
  136. </el-main>
  137. </el-container>
  138. </template>
  139. <script>
  140. import {
  141. purchasePriceAdd,
  142. purchasePriceLook
  143. } from '@/model/houseSelfCollect/index'
  144. import {
  145. packList,
  146. } from '@/model/contarct/index'
  147. export default {
  148. components: {
  149. },
  150. watch: {
  151. },
  152. data() {
  153. return {
  154. selectVal: "",
  155. goodnameList: [],
  156. tableData: [{
  157. waterMin: '10',
  158. waterMax: '20',
  159. price1: '30',
  160. price2: '30',
  161. price3: '30',
  162. priceOther: '30',
  163. }, {
  164. waterMin: '11',
  165. waterMax: '20',
  166. price1: '30',
  167. price2: '30',
  168. price3: '30',
  169. priceOther: '30',
  170. }, {
  171. waterMin: '12',
  172. waterMax: '20',
  173. price1: '30',
  174. price2: '30',
  175. price3: '30',
  176. priceOther: '30',
  177. }, {
  178. waterMin: '13',
  179. waterMax: '20',
  180. price1: '30',
  181. price2: '30',
  182. price3: '30',
  183. priceOther: '30',
  184. }],
  185. isCountShow: true,
  186. priceList: [{
  187. unitPrice: '',
  188. index: 0,
  189. checkList: [],
  190. basicUnitPrice: "",
  191. detailList: [{
  192. type: 1,
  193. name: "干粮",
  194. water: "",
  195. isWrite: false
  196. },
  197. {
  198. type: 4,
  199. jfprice: ""
  200. },
  201. {
  202. type: 2,
  203. name: "基准",
  204. water: '',
  205. isWrite: false
  206. },
  207. {
  208. type: 4,
  209. jfprice: ""
  210. },
  211. {
  212. type: 3,
  213. name: "上限",
  214. water: '',
  215. isWrite: false
  216. },
  217. ],
  218. }],
  219. splitPriceList: [],
  220. baseInfoForm: {
  221. warehouseId: '',
  222. warehouseName: '',
  223. compId: '',
  224. goodsNameKey: '',
  225. goodsName: '',
  226. waterBase: '',
  227. deductWeight: '',
  228. waterMin: '',
  229. waterMax: '',
  230. saleLimit: '',
  231. statusFlag: '',
  232. status: '',
  233. workflowId: '',
  234. approveStatus: '',
  235. passDate: '',
  236. details: [],
  237. detailPrints: []
  238. },
  239. index: 0,
  240. type: '',
  241. isEdit: true
  242. }
  243. },
  244. activated() {
  245. debugger
  246. switch (this.$route.query.type) {
  247. case "新增":
  248. let _goodsNameList = []
  249. this.baseInfoForm.warehouseId = this.$route.query.warehouseId
  250. this.baseInfoForm.warehouseName = this.$route.query.warehouseName
  251. this.baseInfoForm.compId = this.$route.query.compId
  252. this.type = this.$route.query.type
  253. console.log(this.baseInfoForm)
  254. _goodsNameList = this.$route.query.goodsNameList
  255. this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
  256. this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
  257. this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
  258. // 货名
  259. packList({
  260. constId: 'CON2'
  261. })
  262. .toPromise()
  263. .then((response) => {
  264. let _list = []
  265. for (let i = 0; i < response.length; i++) {
  266. let _isAll = true
  267. for (let j = 0; j < _goodsNameList.length; j++) {
  268. if (response[i].constValue != _goodsNameList[j]) {
  269. if (j == _goodsNameList.length - 1 && _isAll) {
  270. _list.push(response[i])
  271. }
  272. } else {
  273. _isAll = false
  274. }
  275. }
  276. }
  277. this.goodnameList = _list
  278. this.selectVal = _list[0].constValue
  279. })
  280. break;
  281. case "编辑":
  282. break;
  283. case "查看":
  284. this.baseInfoForm =JSON.parse(this.$route.query.data)
  285. purchasePriceLook({id:this.baseInfoForm.id}).toPromise().then((response) => {
  286. debugger
  287. console.log(response)
  288. // this.tableData = response.records
  289. // this.getList()
  290. })
  291. break;
  292. default:
  293. break
  294. }
  295. },
  296. mounted() {},
  297. methods: {
  298. goodsChange(e) {
  299. console.log(e)
  300. },
  301. changeBaseWater(val) {
  302. console.log('val', val)
  303. for (let i = 0; i < this.priceList.length; i++) {
  304. for (let k = 0; k < this.priceList[i].detailList.length; k++) {
  305. if (this.priceList[i].detailList[k].type == 2) {
  306. this.priceList[i].detailList[k].water = val
  307. }
  308. }
  309. }
  310. },
  311. changeMinWater(val) {
  312. console.log('val', val)
  313. for (let i = 0; i < this.priceList.length; i++) {
  314. for (let k = 0; k < this.priceList[i].detailList.length; k++) {
  315. if (this.priceList[i].detailList[k].type == 1) {
  316. this.priceList[i].detailList[k].water = val
  317. }
  318. }
  319. }
  320. },
  321. changeMaxWater(val) {
  322. console.log('val', val)
  323. for (let i = 0; i < this.priceList.length; i++) {
  324. for (let k = 0; k < this.priceList[i].detailList.length; k++) {
  325. if (this.priceList[i].detailList[k].type == 3) {
  326. this.priceList[i].detailList[k].water = val
  327. }
  328. }
  329. }
  330. },
  331. tableRowClassName({
  332. row,
  333. rowIndex
  334. }) {
  335. if (rowIndex === 1) {
  336. return 'warning-row';
  337. } else if (rowIndex === 3) {
  338. return 'success-row';
  339. }
  340. return '';
  341. },
  342. // 增加分界
  343. add(item, item1, index) {
  344. // let _data = this.detailList;
  345. if (item.index > 2) {
  346. this.$message({
  347. message: '最多插入3个分界值',
  348. type: 'warning'
  349. });
  350. } else {
  351. item.index++
  352. item.detailList.splice(index + 1, 0, {
  353. name: "分界",
  354. water: '',
  355. type: 5,
  356. index: 1,
  357. isWrite: true
  358. });
  359. item.detailList.splice(index + 1, 0, {
  360. jfprice: "",
  361. type: 4
  362. });
  363. this.makeSpliceIndex(item, item1, index)
  364. }
  365. },
  366. // 减少分界
  367. reduce(item, item1, index) {
  368. item.index--
  369. item.detailList.splice(index, 2);
  370. console.log(item, index)
  371. },
  372. // 设置分界索引排序
  373. makeSpliceIndex(item, item1) {
  374. let _index = 0
  375. for (let j = 0; j < item.detailList.length; j++) {
  376. if (item.detailList[j].type == 5) {
  377. _index++
  378. item.detailList[j].index = _index;
  379. }
  380. }
  381. },
  382. // 复选框变化监听
  383. changeLevel(val, index) {
  384. console.log("val", val)
  385. let _data = this.priceList
  386. for (let i = 0; i < _data.length; i++) {
  387. let _childData = _data[i].checkList
  388. for (let k = 0; k < _childData.length; k++) {
  389. for (let j = 0; j < val.length; j++) {
  390. if (val[j] == _childData[k] && i != index) {
  391. _childData.splice(k, 1)
  392. }
  393. }
  394. }
  395. }
  396. },
  397. // 算价格纠正精度不准
  398. accMul(arg1, arg2) {
  399. var m = 0,
  400. s1 = arg1.toString(),
  401. s2 = arg2.toString();
  402. try {
  403. m += s1.split(".")[1].length
  404. } catch (e) {}
  405. try {
  406. m += s2.split(".")[1].length
  407. } catch (e) {}
  408. return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
  409. },
  410. keepTwoDecimal(num) {
  411. var result = parseFloat(num);
  412. if (isNaN(result)) {
  413. console.log('传递参数错误,请检查!');
  414. return false;
  415. }
  416. result = Math.round(result * 100) / 100;
  417. return result;
  418. },
  419. newSetPrice() {
  420. let _newObj = {
  421. unitPrice: '',
  422. index: 0,
  423. checkList: [],
  424. detailList: [{
  425. type: 1,
  426. name: "干粮",
  427. water: this.baseInfoForm.waterMin,
  428. isWrite: false
  429. },
  430. {
  431. type: 4,
  432. jfprice: ""
  433. },
  434. {
  435. type: 2,
  436. name: "基准",
  437. water: this.baseInfoForm.waterBase,
  438. isWrite: false
  439. },
  440. {
  441. type: 4,
  442. jfprice: ""
  443. },
  444. {
  445. type: 3,
  446. name: "上限",
  447. water: this.baseInfoForm.waterMax,
  448. isWrite: false
  449. },
  450. ],
  451. }
  452. this.priceList.push(_newObj)
  453. },
  454. // 删除价格组
  455. delSetPrice(item, index) {
  456. this.$confirm(
  457. '确认删除本组设置?',
  458. '提示', {
  459. confirmButtonText: '确定',
  460. cancelButtonText: '取消',
  461. type: 'warning',
  462. }
  463. )
  464. .then(() => {
  465. this.priceList.splice(index, 1)
  466. })
  467. .catch(() => {
  468. return false
  469. })
  470. },
  471. //构造新增价格数据
  472. makePriceDataList() {
  473. for (let k = 0; k < this.priceList.length; k++) {
  474. // 新增
  475. let _detailsObj = {
  476. compId: this.baseInfoForm.warehouseId,
  477. basePrice: this.priceList[k].basicUnitPrice,
  478. level: '',
  479. point: '',
  480. pointPrice: ''
  481. }
  482. for (let j = 0; j < this.priceList[k].checkList.length; j++) {
  483. if (j == 0) {
  484. _detailsObj.level += this.priceList[k].checkList[j]
  485. } else {
  486. _detailsObj.level += ',' + this.priceList[k].checkList[j]
  487. }
  488. }
  489. let _index = 0
  490. let _index1 = 0
  491. for (let i = 0; i < this.priceList[k].detailList.length; i++) {
  492. if (this.priceList[k].detailList[i].type == 4) {
  493. if (_index == 0) {
  494. _index++
  495. _detailsObj.pointPrice += this.priceList[k].detailList[i].jfprice
  496. } else {
  497. _detailsObj.pointPrice += ',' + this.priceList[k].detailList[i].jfprice
  498. }
  499. } else if (_index1 == 0) {
  500. _index1++
  501. _detailsObj.point += this.priceList[k].detailList[i].water
  502. } else {
  503. _detailsObj.point += ',' + this.priceList[k].detailList[i].water
  504. }
  505. }
  506. this.baseInfoForm.details.push(_detailsObj)
  507. }
  508. },
  509. //打印
  510. print() {
  511. },
  512. // 提交
  513. submit() {
  514. this.isCountShow = false
  515. this.makeTableList()
  516. this.makePriceDataList()
  517. this.baseInfoForm.goodsName = this.selectVal
  518. purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
  519. console.log(response)
  520. // this.tableData = response.records
  521. })
  522. },
  523. closeCount() {
  524. this.isCountShow = true
  525. this.splitPriceList = []
  526. this.$router.push({
  527. name: 'acquisitionManagement',
  528. })
  529. },
  530. //处理表格数据
  531. makeTableList() {
  532. // this.tableData
  533. //水分下限
  534. // this.baseInfoForm.waterMin
  535. // 水分上限
  536. // this.baseInfoForm.waterMax
  537. // price1
  538. // 获取等级对应分界钱数
  539. this.getSplitPrice()
  540. // 分界价钱数据
  541. // this.splitPriceList
  542. let _list = []
  543. let _obj = {}
  544. let _waterMin = parseFloat(this.baseInfoForm.waterMin)
  545. let _waterMax = parseFloat(this.baseInfoForm.waterMax)
  546. let _count = (_waterMax - _waterMin) / 0.5 + 1
  547. for (let i = 0; i < _count; i++) {
  548. if (i == 0) {
  549. let priceList = this.calculatePrice(_waterMin)
  550. _obj = {
  551. waterMin: _waterMin,
  552. waterMax: _waterMin + 0.4,
  553. price1: priceList[0],
  554. price2: priceList[1],
  555. price3: priceList[2],
  556. priceOther: priceList[3],
  557. }
  558. } else {
  559. _waterMin += 0.5
  560. let priceList = this.calculatePrice(_waterMin)
  561. _obj = {
  562. waterMin: _waterMin,
  563. waterMax: _waterMin + 0.4,
  564. price1: priceList[0],
  565. price2: priceList[1],
  566. price3: priceList[2],
  567. priceOther: priceList[3],
  568. }
  569. }
  570. _list.push(_obj)
  571. this.baseInfoForm.detailPrints.push(_obj)
  572. }
  573. this.tableData = _list
  574. },
  575. // 获取分界价格数据
  576. getSplitPrice() {
  577. let _priceList = this.priceList
  578. for (let i = 0; i < _priceList.length; i++) {
  579. for (let k = 0; k < _priceList[i].checkList.length; k++) {
  580. let _obj = {}
  581. _obj.level = _priceList[i].checkList[k]
  582. _obj.basicUnitPrice = parseFloat(_priceList[i].basicUnitPrice)
  583. _obj.priceList = []
  584. _obj.haveSplit = false
  585. for (let j = 0; j < _priceList[i].detailList.length; j++) {
  586. if (_priceList[i].detailList[j].type == 5) {
  587. _obj.haveSplit = true
  588. }
  589. if (_priceList[i].detailList[j].type != 4 && _priceList[i].detailList[j].type != 3) {
  590. _obj.priceList.push({
  591. type: parseFloat(_priceList[i].detailList[j].type),
  592. priceStart: parseFloat(_priceList[i].detailList[j].water),
  593. priceEnd: parseFloat(_priceList[i].detailList[j + 2].water),
  594. betweenPrice: parseFloat(_priceList[i].detailList[j + 1].jfprice),
  595. totalPrice: (parseFloat(_priceList[i].detailList[j + 2].water) - parseFloat(_priceList[i]
  596. .detailList[j].water)) / 0.5 * parseFloat(_priceList[i].detailList[j + 1].jfprice)
  597. })
  598. }
  599. }
  600. console.log(_obj)
  601. this.splitPriceList.push(_obj)
  602. console.log(this.splitPriceList)
  603. }
  604. }
  605. },
  606. getOtherPrice(list) {
  607. },
  608. // 计算价格
  609. calculatePrice(_waterMin) {
  610. console.log(_waterMin)
  611. console.log("this.splitPriceList", this.splitPriceList)
  612. let prcieList = []
  613. let totalPrice = []
  614. let _price = 0
  615. for (let i = 0; i < this.splitPriceList.length; i++) {
  616. let _list = this.splitPriceList[i].priceList
  617. let basePrice = parseFloat(this.splitPriceList[i].basicUnitPrice) * parseFloat(this.baseInfoForm
  618. .waterBase) * 0.01
  619. for (let k = 0; k < _list.length; k++) {
  620. //基准左边
  621. debugger
  622. if (_waterMin < parseFloat(this.baseInfoForm.waterBase)) {
  623. if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd && !this.splitPriceList[i]
  624. .haveSplit) {
  625. console.log(basePrice)
  626. console.log(this.keepTwoDecimal(basePrice))
  627. console.log(this.keepTwoDecimal(((parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5) * _list[k]
  628. .betweenPrice))
  629. _price = basePrice + (parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5 * _list[k]
  630. .betweenPrice;
  631. console.log(_price)
  632. prcieList.push(this.keepTwoDecimal(_price))
  633. } else if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd) {
  634. // 当前段价格+其他段价格
  635. let _otherPice = this.getOtherPrice(_list[k])
  636. let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
  637. // _price+=_list[k].totalPrice
  638. }
  639. }
  640. //基准值
  641. else if (_waterMin == parseFloat(this.baseInfoForm.waterBase)) {
  642. prcieList.push(this.keepTwoDecimal(basePrice))
  643. }
  644. // 基准右边
  645. else {
  646. if (_waterMin > _list[k].priceStart && _waterMin <=_list[k].priceEnd && !this.splitPriceList[i]
  647. .haveSplit) {
  648. _price = basePrice - (parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5 * _list[k]
  649. .betweenPrice;
  650. console.log(_price)
  651. prcieList.push(this.keepTwoDecimal(_price))
  652. } else if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd) {
  653. // 当前段价格+其他段价格
  654. let _otherPice = this.getOtherPrice(_list[k])
  655. let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
  656. // _price+=_list[k].totalPrice
  657. }
  658. }
  659. }
  660. }
  661. return prcieList
  662. }
  663. },
  664. }
  665. </script>
  666. <style lang="scss">
  667. .el-table .warning-row {
  668. background: oldlace;
  669. }
  670. .el-table .success-row {
  671. background: #f0f9eb;
  672. }
  673. .el-checkbox__input.is-checked .el-checkbox__inner,
  674. .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  675. background-color: #5878E8;
  676. border-color: #5878E8;
  677. }
  678. .el-checkbox__input.is-checked+.el-checkbox__label {
  679. color: #5878E8;
  680. }
  681. .el-checkbox.is-bordered.is-checked {
  682. border-color: #5878E8;
  683. }
  684. .el-checkbox__input.is-focus .el-checkbox__inner {
  685. border-color: #5878E8;
  686. }
  687. .basic-container {
  688. overflow: auto;
  689. }
  690. .container {
  691. padding: 20px
  692. }
  693. /deep/.el-header {
  694. padding: 0;
  695. }
  696. .header {
  697. display: flex;
  698. align-items: center;
  699. border-bottom: 1px solid #E9ECF7;
  700. padding-bottom: 10px;
  701. width: 80%;
  702. .head-icon {
  703. width: 19px;
  704. height: 19px;
  705. margin-right: 10px;
  706. }
  707. .head-title {
  708. font-size: 21px;
  709. font-weight: 600;
  710. color: #323233;
  711. }
  712. }
  713. .row1,
  714. .row2 {
  715. // background: red;
  716. display: flex;
  717. // margin-right: 20px;
  718. }
  719. .row3 {
  720. .top {
  721. display: flex;
  722. .btn {
  723. width: 52px;
  724. height: 24px;
  725. background: #5878E8;
  726. color: white;
  727. margin-left: 20px;
  728. display: flex;
  729. align-items: center;
  730. justify-content: center;
  731. // text-align: center;
  732. }
  733. }
  734. .title {
  735. display: flex;
  736. align-items: center;
  737. border-left: 4px solid #5473E8;
  738. font-size: 16px;
  739. font-weight: 600;
  740. color: #323233;
  741. padding-left: 10px;
  742. }
  743. }
  744. .base-info {
  745. border-left: 4px solid #5473E8;
  746. font-size: 16px;
  747. font-weight: 600;
  748. color: #323233;
  749. padding-left: 10px;
  750. margin: 24px 0 10px 0;
  751. }
  752. .grid-content {
  753. margin-right: 20px;
  754. }
  755. .content {
  756. border: 1px solid #D8DCE6;
  757. margin: 20px 0;
  758. padding: 15px;
  759. border-radius: 4px;
  760. .top {
  761. display: flex;
  762. justify-content: space-between;
  763. .left {
  764. display: flex;
  765. align-items: center;
  766. .text {
  767. width: 220px;
  768. font-size: 14px;
  769. font-weight: 400;
  770. color: #8890B1;
  771. }
  772. }
  773. }
  774. .level {
  775. margin: 10px 0;
  776. }
  777. .count {
  778. display: flex;
  779. margin-bottom: 15px;
  780. .left {
  781. width: 10%;
  782. display: flex;
  783. flex-direction: column;
  784. align-items: flex-end;
  785. justify-content: flex-end;
  786. line-height: 24px;
  787. }
  788. .right {
  789. width: 85%;
  790. position: relative;
  791. padding-bottom: 50px;
  792. .water-price {
  793. width: 60px;
  794. height: 30px;
  795. background: #F6F7FB;
  796. border-radius: 4px;
  797. border: 1px solid #D8DCE6;
  798. text-align: center
  799. }
  800. .add,
  801. .reduce {
  802. width: 16px;
  803. height: 16px;
  804. background: #5473E8;
  805. border-radius: 2px;
  806. color: white;
  807. display: inline-block;
  808. text-align: center;
  809. line-height: 16px;
  810. }
  811. .reduce {
  812. background: white;
  813. color: #D5D8DE;
  814. border: 1px solid #D5D8DE;
  815. display: inline-flex;
  816. justify-content: center;
  817. align-items: center;
  818. }
  819. .item-style {
  820. position: relative;
  821. .item-style-title {
  822. margin-bottom: 10px;
  823. text-align: center;
  824. }
  825. }
  826. .line {
  827. position: absolute;
  828. top: 72px;
  829. width: 100%;
  830. height: 5px;
  831. background: linear-gradient(39deg, #E6EEFF 0%, #91B0F5 42%, #5878E8 100%);
  832. border-radius: 3px;
  833. }
  834. .bottom-price {
  835. position: absolute;
  836. bottom: -10px;
  837. }
  838. .jt-style {
  839. position: absolute;
  840. top: 64px;
  841. width: 0px;
  842. height: 0px;
  843. right: -15px;
  844. border-left: 15px solid #5473E8;
  845. border-top: 10px solid transparent;
  846. border-bottom: 10px solid transparent;
  847. }
  848. display: flex;
  849. justify-content: space-between;
  850. .circle {
  851. position: absolute;
  852. z-index: 2;
  853. width: 15px;
  854. height: 15px;
  855. background: #FFFFFF;
  856. border: 3px solid #5473E8;
  857. border-radius: 50%;
  858. right: 40%;
  859. bottom: -22px
  860. }
  861. }
  862. }
  863. }
  864. .submit {
  865. float: right;
  866. width: 74px;
  867. height: 32px;
  868. background: #5473E8;
  869. color: white;
  870. border-radius: 4px;
  871. }
  872. .page2-content {
  873. border: 1px solid #D8DCE6;
  874. margin-top: 20px;
  875. padding: 10px;
  876. box-sizing: border-box;
  877. text-align: center;
  878. border-radius: 4px;
  879. padding-bottom: 20px;
  880. }
  881. .titel {
  882. font-size: 20px;
  883. font-weight: 500;
  884. color: #323233;
  885. margin: 20px;
  886. }
  887. .type {
  888. font-size: 16px;
  889. font-weight: 500;
  890. color: #262626;
  891. }
  892. </style>