produceList.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. <template>
  2. <view class="mainBox">
  3. <view v-for="(item, index) in tableList" :key="index" style="position: relative;">
  4. <myCard :item="item" :btnList="btnList" :index="index+1" :columns="columns" @del="del(index)">
  5. <view class="slot-box" slot="productName">
  6. <u-row>
  7. <u-col span="10">
  8. <u--input placeholder="请输入" border="surround" disabled v-model="item.productName"></u--input>
  9. </u-col>
  10. <u-col span="2">
  11. <u-button type="primary" size="mini" @click="selectProduct(item, index)" text="选择"></u-button>
  12. </u-col>
  13. </u-row>
  14. </view>
  15. <view slot="purchaseCount">
  16. <view v-if="isDrawer">
  17. {{ item.purchaseCount + ' ' + (item.purchaseUnit || '') }}
  18. </view>
  19. <view v-else>
  20. <u-row>
  21. <u-col span="6">
  22. <u--input placeholder="请输入" type="number" border="surround" v-model="item.purchaseCount"></u--input @input="changeCount(item, index)">
  23. </u-col>
  24. <u-col span="6">
  25. <uni-data-picker v-model="item.purchaseUnit" placeholder="请选择" :localdata="item.packageDispositionList" @change="changeCount(item, index)"></uni-data-picker>
  26. </u-col>
  27. </u-row>
  28. </view>
  29. </view>
  30. <view slot="goodsLevel">
  31. <view v-if="isDrawer">
  32. {{ item.goodsLevel }}
  33. </view>
  34. <view v-else>
  35. <uni-data-picker v-model="item.goodsLevel" placeholder="请选择" :localdata="levelList"></uni-data-picker>
  36. </view>
  37. </view>
  38. <view slot="arrivalWay">
  39. <view v-if="isDrawer">{{ item.arrivalWay }}</view>
  40. <view v-else>
  41. <uni-data-picker v-model="item.arrivalWay" placeholder="请选择" :localdata="arrivalWayList"></uni-data-picker>
  42. </view>
  43. </view>
  44. <view slot="expectReceiveDate">
  45. <view v-if="isDrawer">{{ item.expectReceiveDate }}</view>
  46. <view v-else>
  47. <view v-if="item.arrivalWay == 1">
  48. <uni-datetime-picker type="date" v-model="item.expectReceiveDate"></uni-datetime-picker>
  49. </view>
  50. <view v-else>
  51. <span @click="settingDate(item, index)" style="color: #409eff;">设置分批时间</span>
  52. </view>
  53. </view>
  54. </view>
  55. <view slot="taskName">
  56. <view v-if="isDrawer">{{ item.taskName }}</view>
  57. <view v-else>
  58. <u-row>
  59. <u-col span="10">
  60. <u--input placeholder="" disabled border="surround" v-model="item.taskName"></u--input @input="changeCount(item, index)">
  61. </u-col>
  62. <u-col span="2">
  63. <u-button type="primary" size="mini" @click="selectTaskName(item, index)" text="选择"></u-button>
  64. </u-col>
  65. </u-row>
  66. </view>
  67. </view>
  68. <view slot="supplierName">
  69. <view v-if="isDrawer">{{ item.supplierName }}</view>
  70. <view v-else>
  71. <uni-data-picker v-model="item.supplierName" placeholder="请选择" :localdata="arrivalWayList"></uni-data-picker>
  72. </view>
  73. </view>
  74. <view slot="provenance">
  75. <view v-if="isDrawer">{{ item.provenance }}</view>
  76. <view v-else>
  77. <uni-data-picker v-model="item.provenance" placeholder="请选择" :localdata="purchase_origin"></uni-data-picker>
  78. </view>
  79. </view>
  80. <view slot="brand">
  81. <view v-if="isDrawer">{{ item.brand }}</view>
  82. <view v-else>
  83. <u--input placeholder="请输入" border="surround" disabled v-model="item.productName"></u--input>
  84. </view>
  85. </view>
  86. <view slot="modelKey">
  87. <view v-if="isDrawer">{{ item.modelKey }}</view>
  88. <view v-else>
  89. <!-- <u--input placeholder="请输入" border="surround" disabled v-model="item.modelKey"></u--input> -->
  90. <uni-data-select
  91. multiple
  92. :localdata="product_model_key"
  93. v-model="item.modelKey"
  94. ></uni-data-select>
  95. </view>
  96. </view>
  97. <view slot="colorKey">
  98. <view v-if="isDrawer">{{ item.colorKey }}</view>
  99. <view v-else>
  100. <!-- <u--input placeholder="请输入" border="surround" disabled v-model="item.colorKey"></u--input> -->
  101. <uni-data-select
  102. multiple
  103. :localdata="product_color_key"
  104. v-model="item.colorKey"
  105. ></uni-data-select>
  106. </view>
  107. </view>
  108. <view slot="remark">
  109. <view v-if="isDrawer">{{ item.colorKey }}</view>
  110. <view v-else>
  111. <u--input placeholder="请输入" border="surround" v-model="item.remark"></u--input>
  112. </view>
  113. </view>
  114. <fileMain slot="technicalDrawings" :type="isDrawer ? 'view' : ''" v-model="item.technicalDrawings"></fileMain>
  115. <fileMain slot="files" :type="isDrawer ? 'view' : ''" v-model="item.files"></fileMain>
  116. <u--input :disabled="!!contractId" slot="singleWeight" @input="singleWeightChange(item,index)"
  117. type="number" placeholder="请输入" border="surround" v-model="item.singleWeight"></u--input>
  118. <u--input :disabled="!!contractId" slot="singlePrice" style="flex:none;width: 50%;"
  119. @input="getTotalPrice()" type="number" placeholder="请输入" border="surround"
  120. v-model="item.singlePrice">
  121. <template slot="suffix">元</template>
  122. </u--input>
  123. <uni-datetime-picker :disabled="!!contractId" type="date" slot="customerExpectDeliveryDeadline"
  124. v-model="item.customerExpectDeliveryDeadline">
  125. </uni-datetime-picker>
  126. <u--input :disabled="!!contractId" slot="guaranteePeriod" placeholder="请输入" border="surround"
  127. v-model="item.guaranteePeriod"></u--input>
  128. <uni-data-picker :readonly="!!contractId" slot="guaranteePeriodUnitCode"
  129. v-model="item.guaranteePeriodUnitCode" placeholder="请选择" :localdata="date_unit">
  130. </uni-data-picker>
  131. <u--input slot="customerMark" placeholder="请输入" border="surround" v-model="item.customerMark">
  132. </u--input>
  133. <u--input slot="productBrand" placeholder="请输入" border="surround" :disabled="item.productCode"
  134. v-model="item.productBrand">
  135. </u--input>
  136. <u--input slot="specification" placeholder="请输入" border="surround" :disabled="item.productCode"
  137. v-model="item.specification">
  138. </u--input>
  139. <!-- <u--input slot="goodsLevel" placeholder="请输入" border="surround" :disabled="item.productCode"
  140. v-model="item.goodsLevel">
  141. </u--input> -->
  142. <u--input slot="modelType" placeholder="请输入" border="surround" :disabled="item.productCode"
  143. v-model="item.modelType">
  144. </u--input>
  145. <!-- <u--input slot="productName" placeholder="请输入" border="surround" :disabled="item.productCode"
  146. v-model="item.productName">
  147. </u--input> -->
  148. </myCard>
  149. </view>
  150. <view style="height: 84rpx;" v-if="!isDrawer"></view>
  151. <!-- <view class="footerButton" v-if="!isDrawer">
  152. <u-button type="primary" @click="save" text="保存"></u-button>
  153. </view> -->
  154. <view class="add" @click="add" v-if="!isDrawer">
  155. <u-icon name="plus" color="#fff"></u-icon>
  156. </view>
  157. <u-action-sheet :actions="addList" :show="show" :closeOnClickOverlay="true" :closeOnClickAction="true"
  158. @close="show=false" @select='select'> </u-action-sheet>
  159. <timePopup ref="timePopupRef" @confirm="handleTimeConfirm"></timePopup>
  160. </view>
  161. </template>
  162. <!-- 名称,数量,单位,到货方式,到货日期 -->
  163. <script>
  164. import {
  165. getByCode
  166. } from '@/api/pda/common.js'
  167. import myCard from './myCard.vue'
  168. import { mapActions, mapGetters } from 'vuex'
  169. import { levelList, lbjtList } from '@/enum/dict'
  170. import fileMain from "@/pages/doc/index.vue"
  171. import { changeCount } from '@/utils/setProduct.js';
  172. import timePopup from './timePopup.vue'
  173. export default {
  174. data() {
  175. return {
  176. tableList: [],
  177. addList: [
  178. { name: '选择物品清单', },
  179. { name: '新增临时产品', }
  180. ],
  181. arrivalWayList: [
  182. { text: '一次性到货', value: 1 },
  183. { text: '分批到货', value: 2 }
  184. ],
  185. show: false,
  186. purchaseUnitShow: false,
  187. current: {},
  188. currentIndex: -1,
  189. date_unit: [],
  190. product_color_key: [],
  191. product_model_key: [],
  192. purchase_origin: [],
  193. allPrice: '',
  194. btnList: [{
  195. name: '删除',
  196. apiName: 'del',
  197. btnType: 'error ',
  198. type: '2',
  199. pageUrl: '',
  200. }],
  201. defaultForm: {
  202. key: null,
  203. endTime: '',
  204. isFirst: 0,
  205. name: '',
  206. startTime: '',
  207. workHour: '',
  208. guaranteePeriodUnitCode: '',
  209. technicalDrawings: [],
  210. arrivalWay: 1
  211. },
  212. levelList
  213. }
  214. },
  215. props: {
  216. isDrawer: {
  217. default: false
  218. },
  219. pricingWay: {
  220. default: 1
  221. },
  222. isTemporary: {
  223. //临时
  224. type: Boolean,
  225. default: false
  226. },
  227. contractId: '',
  228. },
  229. components: {
  230. myCard,
  231. fileMain,
  232. timePopup
  233. },
  234. computed: {
  235. ...mapGetters(['dict', 'getDict', 'getDictValue']),
  236. columns() {
  237. return [
  238. [{
  239. label: '名称:',
  240. prop: 'productName',
  241. slot: 'productName',
  242. type: 'title',
  243. className: 'perce100',
  244. }],
  245. [{
  246. label: '编码:',
  247. prop: 'productCode'
  248. }, {
  249. label: '分类:',
  250. prop: 'productCategoryName',
  251. }],
  252. [{
  253. label: '数量:',
  254. prop: 'purchaseCount',
  255. slot: 'purchaseCount',
  256. className: 'perce100',
  257. // formatter: (item) => {
  258. // if (item.purchaseCount) {
  259. // return item.purchaseCount + ' ' + (item.purchaseUnit || '');
  260. // }
  261. // }
  262. }],
  263. [
  264. {
  265. label: '计量数量:',
  266. prop: 'totalCount',
  267. formatter: (item) => {
  268. if (item.totalCount) {
  269. return item.totalCount + ' ' + (item.measuringUnit || '');
  270. }
  271. }
  272. },
  273. {
  274. label: '包装规格:',
  275. prop: 'packingSpecification',
  276. }
  277. ],
  278. [{
  279. label: '物品级别:',
  280. prop: 'goodsLevel',
  281. slot: 'goodsLevel',
  282. // formatter: (item) => {
  283. // return levelList.find((i) => i.value == item.goodsLevel)
  284. // ?.label;
  285. // },
  286. },
  287. {
  288. label: '库存数量:',
  289. prop: 'availableCountBase',
  290. }],
  291. [{
  292. label: '已采数量:',
  293. prop: 'doneTotalCount',
  294. formatter: (item) => {
  295. if (item.doneTotalCount) {
  296. return item.doneTotalCount + ' ' + (item.measuringUnit || '');
  297. }
  298. }
  299. }, {
  300. label: '待采数量:',
  301. prop: 'waitTotalCount',
  302. formatter: (item) => {
  303. if (item.waitTotalCount) {
  304. return item.waitTotalCount + ' ' + (item.measuringUnit || '');
  305. }
  306. }
  307. }],
  308. [{
  309. label: '工序:',
  310. prop: 'taskName',
  311. slot: 'taskName',
  312. className: 'perce100',
  313. }],
  314. [{
  315. label: '批次号:',
  316. prop: 'batchNo',
  317. }],
  318. [{
  319. label: '供应商:',
  320. prop: 'supplierName',
  321. slot: 'supplierName'
  322. }, {
  323. label: '产地:',
  324. prop: 'provenance',
  325. slot: 'provenance',
  326. // formatter: (item) => {
  327. // // return item.provenance
  328. // return item.provenance && item.provenance.length
  329. // ? item.provenance
  330. // .map((item) => this.getDictValue('产地', item))
  331. // .join(',')
  332. // : '';
  333. // }
  334. }],
  335. [{
  336. label: '型号:',
  337. prop: 'modelType',
  338. className: 'perce100',
  339. }],
  340. [{
  341. label: '规格:',
  342. prop: 'specification',
  343. }, {
  344. label: '品牌:',
  345. prop: 'brand',
  346. slot: 'brand'
  347. }],
  348. [{
  349. label: '机型:',
  350. prop: 'modelKey',
  351. slot: 'modelKey'
  352. }, {
  353. label: '颜色:',
  354. prop: 'colorKey',
  355. slot: 'colorKey'
  356. }],
  357. [{
  358. label: '到货方式:',
  359. prop: 'arrivalWay',
  360. slot: 'arrivalWay',
  361. // formatter: (item) => {
  362. // return item.arrivalWay == 1 ? '一次性到货' : '分批到货';
  363. // },
  364. }],
  365. [{
  366. label: '到货日期:',
  367. prop: 'expectReceiveDate',
  368. slot: 'expectReceiveDate',
  369. }, {
  370. label: '属性类型:',
  371. prop: 'produceType',
  372. formatter: (item) => {
  373. if (item.produceType) {
  374. return item.produceType
  375. .map((i) => {
  376. return lbjtList[i];
  377. })
  378. .toString();
  379. }
  380. }
  381. }],
  382. [{
  383. label: '图纸附件:',
  384. prop: 'technicalDrawings',
  385. slot: 'technicalDrawings',
  386. }, {
  387. label: '附件:',
  388. prop: 'files',
  389. slot: 'files',
  390. }],
  391. [{
  392. label: '备注:',
  393. prop: 'remark',
  394. className: 'perce100',
  395. }],
  396. [{
  397. label: '操作:',
  398. prop: 'action',
  399. type: 'action',
  400. className: 'perce100',
  401. }],
  402. ]
  403. },
  404. },
  405. created() {
  406. this.getByCode()
  407. // this.requestDict('产地')
  408. uni.$off('setProduceList')
  409. uni.$on('setProduceList', (data) => {
  410. console.log('setProduceList~~', data)
  411. data.forEach(item => {
  412. item['productId'] = item.id
  413. item['categoryName'] = item.name
  414. item['productCategoryId'] = item.categoryLevelId
  415. item['productBrand'] = item.brandNum
  416. item['productCategoryName'] = item.categoryLevelPath
  417. item['productCode'] = item.code
  418. item['productName'] = item.name
  419. item['approvalNumber'] = item.extField.approvalNumber
  420. item['packingSpecification'] = item.extField.packingSpecification
  421. item['packageDispositionList'] = item.packageDispositionList.map(i => {
  422. return {
  423. ...i,
  424. text: i.conversionUnit,
  425. value: i.id
  426. }
  427. })
  428. if (item.packageDispositionList?.length) {
  429. item['purchaseUnitId'] = item.packageDispositionList[0].id
  430. item['purchaseUnit'] = item.packageDispositionList[0].conversionUnit
  431. }
  432. })
  433. console.log(this.currentIndex, this.current)
  434. if(this.currentIndex > -1) {
  435. console.log(111)
  436. // 使用this.$set更新数组项
  437. if (data && data.length > 0) {
  438. this.$set(this.tableList, this.currentIndex, data[0]);
  439. }
  440. this.currentIndex = -1;
  441. this.current = {};
  442. } else {
  443. console.log(222)
  444. this.tableList.push(...data)
  445. }
  446. })
  447. uni.$off('setTaskName')
  448. uni.$on('setTaskName', (data) => {
  449. console.log('setTaskName~~', data)
  450. console.log(this.currentIndex, this.current)
  451. if(this.currentIndex > -1) {
  452. console.log(111)
  453. // 使用this.$set更新数组项
  454. if (data && data.length > 0) {
  455. this.$set(this.tableList[this.currentIndex], 'taskId', data[0].id);
  456. this.$set(this.tableList[this.currentIndex], 'taskName', data[0].name);
  457. this.$set(
  458. this.tableList[this.currentIndex],
  459. 'routingId',
  460. data[0].produceRoutingId
  461. );
  462. }
  463. this.currentIndex = -1;
  464. this.current = {};
  465. }
  466. })
  467. },
  468. watch: {
  469. contractId(val) {
  470. if (val) {
  471. this.btnList = []
  472. }
  473. }
  474. },
  475. methods: {
  476. ...mapActions('dict', ['requestDict']),
  477. settingDate(item, index) {
  478. console.log(item, index)
  479. this.current = item;
  480. this.currentIndex = index;
  481. this.$refs.timePopupRef.open(item, index)
  482. },
  483. handleTimeConfirm(data) {
  484. this.$set(this.tableList[this.currentIndex], 'arrivalBatch', data)
  485. },
  486. add() {
  487. if (this.isTemporary) {
  488. this.show = true
  489. } else {
  490. uni.navigateTo({
  491. url: '/pages/saleManage/components/selectProduce?isAll=' + 1
  492. })
  493. }
  494. },
  495. select({
  496. name
  497. }) {
  498. if (name == '选择物品清单') {
  499. uni.navigateTo({
  500. url: '/pages/saleManage/components/selectProduce?isAll=' + 1
  501. })
  502. } else {
  503. this.handlAdd()
  504. }
  505. },
  506. selectProduct(item, index) {
  507. this.current = item;
  508. this.currentIndex = index;
  509. uni.navigateTo({
  510. url: '/pages/saleManage/components/selectProduce?isAll=' + 2
  511. })
  512. },
  513. selectTaskName(item, index) {
  514. console.log(item, index)
  515. this.current = item;
  516. this.currentIndex = index;
  517. uni.navigateTo({
  518. url: '/pages/purchasingManage/components/selectTaskName?isAll=' + 2
  519. })
  520. },
  521. // 添加
  522. handlAdd() {
  523. let item = JSON.parse(JSON.stringify(this.defaultForm));
  524. item.key = this.tableList.length + 1;
  525. this.tableList.push(item);
  526. },
  527. init(list) {
  528. if (list) {
  529. this.tableList = JSON.parse(JSON.stringify(list))
  530. this.getTotalPrice(list)
  531. }
  532. },
  533. getValue() {
  534. return this.tableList
  535. },
  536. del(index) {
  537. this.tableList.splice(index, 1);
  538. },
  539. getByCode() {
  540. const codeS = ['product_model_key', 'product_color_key', 'purchase_origin']
  541. codeS.forEach(async (code) => {
  542. const codeValue = await getByCode(code);
  543. this[code] = codeValue.map(item => {
  544. const key = Object.keys(item)[0]
  545. return {
  546. value: key,
  547. text: item[key]
  548. }
  549. })
  550. console.log(code, this[code])
  551. })
  552. console.log('1111~~~~~~~~~', this.purchase_origin)
  553. },
  554. save() {
  555. uni.$emit('setBusinessOpportunity')
  556. },
  557. //改变数量
  558. changeCount(row, index) {
  559. // this.singleWeightChange(row, index);
  560. // this.getTotalPrice();
  561. this.$set(
  562. this.tableList,
  563. index,
  564. changeCount(row, {
  565. countKey: 'purchaseCount',
  566. unitKey: 'purchaseUnit',
  567. unitIdKey: 'purchaseUnitId'
  568. })
  569. );
  570. this.$forceUpdate();
  571. },
  572. //计算总金额
  573. getTotalPrice(row) {
  574. if (this.tableList.length) {
  575. let sum = 0;
  576. sum = this.getNumTotalPrice();
  577. let allsum = sum.toFixed(2);
  578. this.allPrice = allsum;
  579. if (!row) {
  580. uni.$emit('allsum', allsum)
  581. }
  582. return allsum;
  583. } else {
  584. this.allPrice = 0.0;
  585. if (!row) {
  586. uni.$emit('allsum', allsum)
  587. }
  588. return 0.0;
  589. }
  590. //回显总金额
  591. },
  592. //计算总金额
  593. getNumTotalPrice(sum = 0) {
  594. this.tableList.forEach((r, index) => {
  595. this.$set(
  596. r,
  597. 'discountSinglePrice',
  598. r.singlePrice ? Number(r.singlePrice) : ''
  599. );
  600. if (r.singlePrice && r.totalCount) {
  601. r.totalPrice = this.getAllPrice(r);
  602. r.discountTotalPrice = this.getDiscountTotalPrice(r);
  603. this.$set(this.tableList[index], 'totalPrice', Number(r.totalPrice));
  604. this.$set(
  605. this.tableList[index],
  606. 'discountTotalPrice',
  607. Number(r.discountTotalPrice)
  608. );
  609. sum += Number(r.totalPrice);
  610. } else {
  611. this.$set(r, 'totalPrice', '');
  612. this.$set(r, 'discountTotalPrice', '');
  613. }
  614. });
  615. return isNaN(sum) ? 0 : sum;
  616. },
  617. //计算单重
  618. singleWeightChange(row, index) {
  619. if (row.weightUnit == row.measuringUnit) {
  620. this.$set(this.tableList[index], 'totalWeight', row.totalCount);
  621. } else if (row.totalCount && row.singleWeight) {
  622. this.$set(this.tableList[index], 'totalWeight', (row.singleWeight * row.totalCount).toFixed(2) || 0);
  623. } else {
  624. this.$set(this.tableList[index], 'totalWeight', 0);
  625. }
  626. },
  627. //获取合计
  628. getAllPrice(row) {
  629. let num = Number(row.singlePrice) * Number(row.totalCount);
  630. return isNaN(num) ? '' : num.toFixed(2);
  631. },
  632. //设置优惠后总金额修改产品单价
  633. discountInputByOrder(val) {
  634. //获取优惠金额和总计的差价
  635. this.tableList.forEach((item) => {
  636. if (val === 0) {
  637. item.discountTotalPrice = 0;
  638. item.discountSinglePrice = 0;
  639. return;
  640. }
  641. if (!val) {
  642. item.discountTotalPrice = item.totalPrice;
  643. item.discountSinglePrice = item.singlePrice;
  644. return;
  645. }
  646. //获取折让单价
  647. item.discountSinglePrice = this.getDiscountSinglePrice(item, val);
  648. item.discountTotalPrice = this.getDiscountTotalPrice(item, val);
  649. });
  650. this.$forceUpdate()
  651. },
  652. //获取折让单价
  653. getDiscountSinglePrice(row, val) {
  654. let num =
  655. (Number(val) / Number(this.allPrice)) *
  656. Number(row.singlePrice);
  657. return isNaN(num) ? '' : num;
  658. },
  659. //获取折让合计
  660. getDiscountTotalPrice(row, val) {
  661. let num = Number(row.discountSinglePrice) * Number(row.totalCount);
  662. return isNaN(num) ? '' : num.toFixed(2);
  663. },
  664. //设置客户代号
  665. setCustomerMark(val) {
  666. this.tableList.forEach((item, index) => {
  667. this.$set(this.tableList[index], 'customerMark', val)
  668. })
  669. },
  670. }
  671. }
  672. </script>
  673. <style lang="scss" scoped>
  674. .add {
  675. width: 96rpx;
  676. height: 96rpx;
  677. border-radius: 48rpx;
  678. background: #3c9cff;
  679. position: fixed;
  680. bottom: 100rpx;
  681. right: 24rpx;
  682. display: flex;
  683. align-items: center;
  684. justify-content: center;
  685. z-index: 99;
  686. }
  687. .slot-box {
  688. display: flex;
  689. }
  690. .footerButton {
  691. width: 100%;
  692. height: 84rpx;
  693. display: flex;
  694. position: fixed;
  695. bottom: 0;
  696. z-index: 10;
  697. /deep/.u-button {
  698. height: 100%;
  699. }
  700. >view {
  701. flex: 1;
  702. }
  703. }
  704. /deep/.u-swipe-action-item__right__button__wrapper {
  705. background-color: #f56c6c !important;
  706. }
  707. </style>