inventoryTable.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. <template>
  2. <el-form ref="form" :model="form" :rules="rules">
  3. <ele-pro-table
  4. ref="table"
  5. :needPage="false"
  6. :columns="columns"
  7. @columns-change="handleColumnChange"
  8. :cache-key="cacheKeyUrl"
  9. :datasource="form.datasource"
  10. :selection.sync="selection"
  11. class="time-form"
  12. :maxHeight="350"
  13. >
  14. <!-- 表头工具栏 -->
  15. <template v-slot:toolbar>
  16. <div class="headbox" v-if="!contractId && isShowAdd">
  17. <el-button
  18. size="small"
  19. type="primary"
  20. icon="el-icon-plus"
  21. class="ele-btn-icon"
  22. @click="handlAdd('', -1)"
  23. >
  24. 新增
  25. </el-button>
  26. <warehouseAll
  27. @success="warehouseAllChange"
  28. :disabled="!selection.length"
  29. ></warehouseAll>
  30. </div>
  31. </template>
  32. <template v-slot:technicalDrawings="{ row, $index }">
  33. <el-form-item
  34. style="margin-bottom: 20px"
  35. :prop="'datasource.' + $index + '.technicalDrawings'"
  36. >
  37. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  38. </el-form-item>
  39. </template>
  40. <template v-slot:industryArtFiles="{ row, $index }">
  41. <el-form-item
  42. style="margin-bottom: 20px"
  43. :prop="'datasource.' + $index + '.industryArtFiles'"
  44. >
  45. <fileMain v-model="row.industryArtFiles" type="view"></fileMain>
  46. </el-form-item>
  47. </template>
  48. <template v-slot:otherFiles="{ row, $index }">
  49. <el-form-item
  50. style="margin-bottom: 20px"
  51. :prop="'datasource.' + $index + '.otherFiles'"
  52. >
  53. <fileMain v-model="row.otherFiles" type="view"></fileMain>
  54. </el-form-item>
  55. </template>
  56. <template v-slot:customerReqFiles="{ row, $index }">
  57. <el-form-item
  58. style="margin-bottom: 20px"
  59. :prop="'datasource.' + $index + '.customerReqFiles'"
  60. >
  61. <fileMain v-model="row.customerReqFiles" type="view"></fileMain>
  62. </el-form-item>
  63. </template>
  64. <template v-slot:remark="{ row, $index }">
  65. <el-form-item
  66. style="margin-bottom: 20px"
  67. :prop="'datasource.' + $index + '.remark'"
  68. >
  69. <el-input
  70. clearable
  71. v-model="row.remark"
  72. type="textarea"
  73. placeholder="请输入"
  74. />
  75. </el-form-item>
  76. </template>
  77. <template v-slot:totalCount="scope">
  78. <el-form-item
  79. style="margin-bottom: 20px"
  80. :prop="'datasource.' + scope.$index + '.totalCount'"
  81. :rules="[
  82. { required: true, message: '请输入本次收货数量', trigger: 'blur' }
  83. ]"
  84. >
  85. <el-input
  86. v-model="scope.row.totalCount"
  87. type="number"
  88. @input="(val) => changeNum(val, scope.row, scope.$index)"
  89. ></el-input>
  90. </el-form-item>
  91. </template>
  92. <template v-slot:singlePrice="scope">
  93. <el-form-item
  94. style="margin-bottom: 20px"
  95. :prop="'datasource.' + scope.$index + '.singlePrice'"
  96. :rules="[{ required: true, message: '请输入单价', trigger: 'blur' }]"
  97. >
  98. <el-input
  99. v-model="scope.row.singlePrice"
  100. type="number"
  101. @input="(val) => changeNum(val, scope.row, scope.$index)"
  102. ></el-input>
  103. </el-form-item>
  104. </template>
  105. <template v-slot:warehouseId="scope">
  106. <el-form-item
  107. style="margin-bottom: 20px"
  108. :prop="'datasource.' + scope.$index + '.warehouseId'"
  109. :rules="[{ required: true, message: '请选择仓库', trigger: 'blur' }]"
  110. >
  111. <el-select v-model="scope.row.warehouseId" placeholder="请选择">
  112. <el-option
  113. v-for="item in warehouseList"
  114. :key="item.id"
  115. :label="item.name"
  116. :value="item.id"
  117. @click.native="warehouseChange(scope.$index, scope.row, item)"
  118. >
  119. </el-option>
  120. </el-select>
  121. </el-form-item>
  122. </template>
  123. <template v-slot:produceDeliveryDeadline="scope">
  124. <el-form-item
  125. :prop="'datasource.' + scope.$index + '.produceDeliveryDeadline'"
  126. >
  127. <el-date-picker
  128. style="width: 140px"
  129. v-model="scope.row.produceDeliveryDeadline"
  130. type="date"
  131. placeholder="选择日期"
  132. >
  133. </el-date-picker>
  134. </el-form-item>
  135. </template>
  136. <template v-slot:customerExpectDeliveryDeadline="scope">
  137. <el-form-item
  138. :prop="
  139. 'datasource.' + scope.$index + '.customerExpectDeliveryDeadline'
  140. "
  141. >
  142. <el-date-picker
  143. style="width: 140px"
  144. v-model="scope.row.customerExpectDeliveryDeadline"
  145. type="date"
  146. placeholder="选择日期"
  147. >
  148. </el-date-picker>
  149. </el-form-item>
  150. </template>
  151. <template v-slot:warehouseNum="scope">
  152. <el-form-item style="margin-bottom: 20px">
  153. {{ scope.row.warehouseNum }}
  154. </el-form-item>
  155. </template>
  156. <template v-slot:headerTotalCount="{ column }">
  157. <span class="is-required">{{ column.label }}</span>
  158. </template>
  159. <template v-slot:headerWarehouseId="{ column }">
  160. <span class="is-required">{{ column.label }}</span>
  161. </template>
  162. <!-- 操作列 -->
  163. <template v-slot:action="scope">
  164. <el-popconfirm
  165. class="ele-action"
  166. title="确定要删除吗?"
  167. @confirm="remove(scope.$index)"
  168. >
  169. <template v-slot:reference>
  170. <el-link type="danger" :underline="false" icon="el-icon-delete">
  171. 删除
  172. </el-link>
  173. </template>
  174. </el-popconfirm>
  175. </template>
  176. </ele-pro-table>
  177. <product-list
  178. ref="productListRef"
  179. classType="1"
  180. @changeParent="changeParent"
  181. ></product-list>
  182. </el-form>
  183. </template>
  184. <script>
  185. import { numberReg } from 'ele-admin';
  186. import dictMixins from '@/mixins/dictMixins';
  187. import productList from '@/BIZComponents/product-list.vue';
  188. import {
  189. getWarehouseList,
  190. getWarehouseOutStock
  191. } from '@/api/saleManage/saleorder';
  192. import warehouseAll from '@/BIZComponents/warehouseAll.vue';
  193. import tabMixins from '@/mixins/tableColumnsMixin';
  194. export default {
  195. mixins: [dictMixins, tabMixins],
  196. props: {
  197. orderId: String,
  198. isShowAdd: {
  199. type: Boolean,
  200. default: true
  201. },
  202. pricingWay: [Number, String]
  203. },
  204. components: {
  205. warehouseAll,
  206. productList
  207. },
  208. data() {
  209. const defaultForm = {
  210. key: null,
  211. endTime: '',
  212. isFirst: 0,
  213. name: '',
  214. startTime: '',
  215. workHour: '',
  216. technicalDrawings: []
  217. // warehouseCode:"",
  218. // warehouseId:'',
  219. // warehouseName:'',
  220. };
  221. return {
  222. discountTotalPrice: 0.0,
  223. allPrice: 0.0,
  224. numberReg,
  225. defaultForm,
  226. cacheKeyUrl: 'eos-saleManage-entrustedReceive-inventoryTable',
  227. warehouseList: [],
  228. form: {
  229. datasource: []
  230. },
  231. rules: {},
  232. columns: [
  233. {
  234. width: 45,
  235. type: 'index',
  236. columnKey: 'index',
  237. align: 'center',
  238. fixed: 'left'
  239. },
  240. {
  241. minWidth: 200,
  242. prop: 'productName',
  243. label: '名称',
  244. slot: 'productName',
  245. align: 'center'
  246. },
  247. {
  248. minWidth: 120,
  249. prop: 'productCode',
  250. label: '编码',
  251. slot: 'productCode',
  252. align: 'center'
  253. },
  254. {
  255. minWidth: 150,
  256. prop: 'productCategoryName',
  257. label: '类型',
  258. slot: 'productCategoryName',
  259. align: 'center'
  260. },
  261. {
  262. prop: 'batchNo',
  263. label: '批次号',
  264. align: 'center',
  265. showOverflowTooltip: true,
  266. minWidth: 100
  267. },
  268. {
  269. minWidth: 100,
  270. prop: 'productBrand',
  271. label: '牌号',
  272. slot: 'productBrand',
  273. align: 'center'
  274. },
  275. {
  276. minWidth: 120,
  277. prop: 'modelType',
  278. label: '型号',
  279. slot: 'modelType',
  280. align: 'center'
  281. },
  282. {
  283. minWidth: 120,
  284. prop: 'specification',
  285. label: '规格',
  286. slot: 'specification',
  287. align: 'center'
  288. },
  289. {
  290. minWidth: 150,
  291. prop: 'customerMark',
  292. label: '客户代号',
  293. slot: 'customerMark',
  294. align: 'center'
  295. },
  296. {
  297. minWidth: 200,
  298. prop: 'warehouseId',
  299. label: '仓库名称',
  300. slot: 'warehouseId',
  301. headerSlot: 'headerWarehouseId',
  302. align: 'center'
  303. },
  304. // {
  305. // minWidth: 80,
  306. // prop: 'warehouseNum',
  307. // label: '库存',
  308. // slot: 'warehouseNum',
  309. // align: 'center'
  310. // },
  311. {
  312. width: 110,
  313. prop: 'orderTotalCount',
  314. label: '订单总数量',
  315. slot: 'orderTotalCount',
  316. align: 'center'
  317. },
  318. {
  319. width: 150,
  320. prop: 'totalCount',
  321. label: '本次收货数量',
  322. slot: 'totalCount',
  323. headerSlot: 'headerTotalCount',
  324. align: 'center'
  325. },
  326. {
  327. width: 100,
  328. prop: 'receiveTotalCount',
  329. label: '已收货总数',
  330. slot: 'receiveTotalCount',
  331. align: 'center'
  332. },
  333. {
  334. minWidth: 100,
  335. prop: 'measuringUnit',
  336. label: '计量单位',
  337. slot: 'measuringUnit',
  338. align: 'center'
  339. },
  340. {
  341. width: 120,
  342. prop: 'singleWeight',
  343. label: '单重',
  344. slot: 'singleWeight',
  345. align: 'center'
  346. },
  347. {
  348. width: 100,
  349. prop: 'receiveTotalWeight',
  350. label: '收货总重',
  351. slot: 'receiveTotalWeight',
  352. align: 'center'
  353. },
  354. {
  355. width: 100,
  356. prop: 'weightUnit',
  357. label: '重量单位',
  358. slot: 'weightUnit',
  359. align: 'center'
  360. },
  361. {
  362. width: 150,
  363. prop: 'singlePrice',
  364. label: '单价',
  365. slot: 'singlePrice',
  366. align: 'center'
  367. },
  368. {
  369. width: 100,
  370. prop: 'taxRate',
  371. label: '税率',
  372. formatter: (_row, _column, cellValue) => {
  373. return _row.taxRate ? _row.taxRate + '%' : '';
  374. },
  375. align: 'center'
  376. },
  377. {
  378. width: 100,
  379. prop: 'discountSinglePrice',
  380. label: '折让单价',
  381. slot: 'discountSinglePrice',
  382. align: 'center',
  383. formatter: (_row, _column, cellValue) => {
  384. return _row.discountSinglePrice
  385. ? Number(_row.discountSinglePrice).toFixed(2)
  386. : '';
  387. }
  388. },
  389. {
  390. width: 80,
  391. prop: 'totalPrice',
  392. label: '合计',
  393. slot: 'totalPrice',
  394. align: 'center'
  395. },
  396. {
  397. width: 100,
  398. prop: 'discountTotalPrice',
  399. label: '折让合计',
  400. slot: 'discountTotalPrice',
  401. align: 'center',
  402. formatter: (_row, _column, cellValue) => {
  403. return _row.discountTotalPrice
  404. ? Number(_row.discountTotalPrice).toFixed(2)
  405. : '';
  406. }
  407. },
  408. // {
  409. // width: 80,
  410. // prop: 'deliveryDays',
  411. // label: '交期(天)',
  412. // slot: 'deliveryDays'
  413. // },
  414. // {
  415. // width: 160,
  416. // prop: 'deliveryDeadline',
  417. // label: '交期截止日期',
  418. // slot: 'deliveryDeadline',
  419. // show: this.isDeliveryDeadline
  420. // },
  421. {
  422. minWidth: 170,
  423. prop: 'customerExpectDeliveryDeadline',
  424. label: '客户期望交期',
  425. slot: 'customerExpectDeliveryDeadline',
  426. headerSlot: 'headerCustomerExpectDeliveryDeadline',
  427. align: 'center'
  428. },
  429. {
  430. minWidth: 170,
  431. prop: 'produceDeliveryDeadline',
  432. label: '生产交付交期',
  433. slot: 'produceDeliveryDeadline',
  434. align: 'center'
  435. },
  436. {
  437. width: 100,
  438. prop: 'guaranteePeriod',
  439. label: '有效期',
  440. slot: 'guaranteePeriod',
  441. formatter: (_row, _column, cellValue) => {
  442. return (
  443. _row.guaranteePeriod &&
  444. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  445. );
  446. },
  447. align: 'center'
  448. },
  449. {
  450. minWidth: 120,
  451. prop: 'guaranteePeriodDeadline',
  452. label: '有效期截止日期',
  453. align: 'center'
  454. },
  455. {
  456. minWidth: 200,
  457. prop: 'customerReqFiles',
  458. label: '客户需求',
  459. slot: 'customerReqFiles',
  460. align: 'center'
  461. },
  462. {
  463. width: 130,
  464. prop: 'technicalAnswerName',
  465. label: '技术答疑人',
  466. slot: 'technicalAnswerName',
  467. align: 'center'
  468. },
  469. {
  470. width: 220,
  471. prop: 'technicalParams',
  472. label: '技术参数',
  473. slot: 'technicalParams',
  474. align: 'center'
  475. },
  476. {
  477. width: 240,
  478. prop: 'technicalDrawings',
  479. label: '技术图纸',
  480. slot: 'technicalDrawings',
  481. align: 'center'
  482. },
  483. {
  484. width: 240,
  485. prop: 'industryArtFiles',
  486. label: '工艺附件',
  487. slot: 'industryArtFiles',
  488. align: 'center'
  489. },
  490. {
  491. width: 240,
  492. prop: 'otherFiles',
  493. label: '其他附件',
  494. slot: 'otherFiles',
  495. align: 'center'
  496. },
  497. {
  498. width: 220,
  499. prop: 'remark',
  500. label: '备注',
  501. slot: 'remark',
  502. align: 'center'
  503. },
  504. {
  505. columnKey: 'action',
  506. label: '操作',
  507. width: 120,
  508. align: 'center',
  509. resizable: false,
  510. slot: 'action',
  511. fixed: 'right',
  512. showOverflowTooltip: true
  513. }
  514. ]
  515. };
  516. },
  517. created() {
  518. getWarehouseList().then((res) => {
  519. this.warehouseList = res;
  520. });
  521. },
  522. computed: {
  523. canHandl() {
  524. return this.form.datasource.length;
  525. },
  526. contractId() {
  527. return this.$store.state.order.contractId;
  528. }
  529. },
  530. methods: {
  531. async warehouseChange(index, row) {
  532. let data = null;
  533. if (row.warehouseId) {
  534. data = this.warehouseList.find((item) => item.id == row.warehouseId);
  535. } else {
  536. data = this.warehouseList.find(
  537. (item) => item.inventoryType == row.categoryRootLevelId
  538. );
  539. }
  540. if (data) {
  541. this.$set(this.form.datasource[index], 'warehouseName', data.name);
  542. this.$set(this.form.datasource[index], 'warehouseCode', data.code);
  543. this.$set(this.form.datasource[index], 'warehouseId', data.id);
  544. // const warehouseOutStock = await getWarehouseOutStock({
  545. // warehouseId: data.id,
  546. // code: row.productCode
  547. // });
  548. // this.$set(
  549. // this.form.datasource[index],
  550. // 'warehouseNum',
  551. // warehouseOutStock
  552. // );
  553. }
  554. },
  555. warehouseAllChange(data) {
  556. let keyS = this.selection.map((item) => item.key - 1);
  557. keyS.forEach((key) => {
  558. this.$set(this.form.datasource[key], 'warehouseName', data.name);
  559. this.$set(this.form.datasource[key], 'warehouseCode', data.code);
  560. this.$set(this.form.datasource[key], 'warehouseId', data.id);
  561. });
  562. },
  563. //修改数量更新合计
  564. changeNum(val, row, index) {
  565. this.$set(
  566. this.form.datasource[index],
  567. 'receiveTotalWeight',
  568. val ? val * row.singleWeight : ''
  569. );
  570. this.$set(
  571. this.form.datasource[index],
  572. 'totalPrice',
  573. this.getTotalPrice(row).toFixed(2)
  574. );
  575. this.$set(
  576. this.form.datasource[index],
  577. 'discountTotalPrice',
  578. this.getDiscountTotalPrice(row).toFixed(2)
  579. );
  580. this.$refs.table.reload();
  581. },
  582. getTotalPrice(row) {
  583. let num = 0;
  584. if (row.singlePrice && row.totalCount) {
  585. num = Number(row.singlePrice) * Number(row.totalCount);
  586. }
  587. return num;
  588. },
  589. getDiscountTotalPrice(row) {
  590. let num = 0;
  591. if (row.discountSinglePrice && row.totalCount) {
  592. num = Number(row.discountSinglePrice) * Number(row.totalCount);
  593. }
  594. return num;
  595. },
  596. validateTotalCount(row) {
  597. return (rule, value, callback) => {
  598. callback();
  599. if (isNaN(value) || Number(value) <= 0) {
  600. callback(new Error('请输入大于0的数字'));
  601. } else if (
  602. Number(value) + Number(row.receiveTotalCount) >
  603. row.orderTotalCount
  604. ) {
  605. callback(new Error('输入的数字不能大于最大发货值'));
  606. } else {
  607. callback();
  608. }
  609. };
  610. },
  611. // 返回列表数据
  612. getTableValue() {
  613. let comitDatasource = this.form.datasource;
  614. if (comitDatasource.length === 0) return [];
  615. comitDatasource.forEach(async (v) => {
  616. v.totalCount = Number(v.totalCount);
  617. // item['pricingWay'] = item.pricingWay || this.pricingWay;
  618. v.technicalDrawings = Array.isArray(v.technicalDrawings)
  619. ? v.technicalDrawings
  620. : [];
  621. v.customerReqFiles = Array.isArray(v.customerReqFiles)
  622. ? v.customerReqFiles
  623. : [];
  624. v.industryArtFiles = v.industryArtFiles || [];
  625. v.otherFiles = v.otherFiles || [];
  626. // v.ownerId = this.warehouseList.find(item => v.warehouseId == item.id)?.ownerId 获取仓库人员id
  627. });
  628. return comitDatasource;
  629. },
  630. getPrice() {
  631. return [this.allPrice];
  632. },
  633. //修改回显
  634. putTableValue(data) {
  635. if (data) {
  636. this.form.datasource = data;
  637. data.forEach(async (item, index) => {
  638. if (!item.warehouseId) {
  639. this.warehouseChange(index, item);
  640. }
  641. //发货数量因已发货数量被修改需要重新计算金额,总重
  642. this.changeNum(item.totalCount, item, index);
  643. });
  644. }
  645. },
  646. remove(i) {
  647. this.form.datasource.splice(i, 1);
  648. this.setSort();
  649. },
  650. // 重新排序
  651. setSort() {
  652. this.form.datasource.forEach((n, index) => {
  653. n.key = index + 1;
  654. });
  655. },
  656. // 添加
  657. handlAdd() {
  658. if (!this.orderId) return this.$message.error('请先选择订单');
  659. this.$refs.productListRef.open('', -1);
  660. },
  661. //选择产品回调
  662. changeParent(obj, idx) {
  663. obj.forEach((item, index) => {
  664. let i = idx == -1 ? index : idx;
  665. let row = JSON.parse(JSON.stringify(this.defaultForm));
  666. row.key = this.form.datasource.length + 1;
  667. let parasm = idx == -1 ? row : this.form.datasource[i];
  668. this.$set(parasm, 'productId', item.id);
  669. this.$set(parasm, 'categoryName', item.name);
  670. this.$set(parasm, 'productCategoryId', item.categoryLevelId);
  671. this.$set(parasm, 'productBrand', item.brandNum);
  672. this.$set(parasm, 'productCategoryName', item.categoryLevelPath);
  673. this.$set(parasm, 'productCode', item.code);
  674. this.$set(parasm, 'productName', item.name);
  675. this.$set(parasm, 'modelType', item.modelType);
  676. this.$set(parasm, 'availableCountBase', item.availableCountBase);
  677. this.$set(parasm, 'measuringUnit', item.measuringUnit);
  678. this.$set(parasm, 'specification', item.specification);
  679. this.$set(parasm, 'weightUnit', item.weightUnit);
  680. this.$set(parasm, 'singleWeight', item.netWeight);
  681. this.$set(parasm, 'pricingWay', 1);
  682. this.$set(parasm, 'goodsLevel', item.level);
  683. this.$set(parasm, 'discountSinglePrice', 0);
  684. this.$set(parasm, 'singlePrice', 0);
  685. this.$set(parasm, 'imgCode', item.imgCode);
  686. this.$set(parasm, 'produceType', item.componentAttribute);
  687. this.$set(
  688. parasm,
  689. 'categoryRootLevelId',
  690. item.categoryLevelPathIdParent
  691. );
  692. this.$set(parasm, 'approvalNumber', item.extField?.approvalNumber);
  693. this.$set(
  694. parasm,
  695. 'packingSpecification',
  696. item.extField.packingSpecification
  697. );
  698. this.$set(parasm, 'provenance', item.purchaseOrigins || []);
  699. if (idx == -1) {
  700. this.form.datasource.push(row);
  701. }
  702. });
  703. this.form.datasource.forEach((item, index) => {
  704. if (!item.warehouseId) {
  705. this.warehouseChange(index, item);
  706. }
  707. });
  708. },
  709. validateForm(callback) {
  710. //开始表单校验
  711. this.$refs.form.validate((valid, obj) => {
  712. if (obj) {
  713. let messages = Object.keys(obj).map((key) => obj[key][0]);
  714. if (messages.length > 0) {
  715. this.$message.warning(messages[0].message);
  716. }
  717. }
  718. callback(valid);
  719. });
  720. }
  721. }
  722. };
  723. </script>
  724. <style lang="scss" scoped>
  725. .headbox {
  726. display: flex;
  727. justify-content: space-between;
  728. align-items: center;
  729. .amount {
  730. font-size: 14px;
  731. font-weight: bold;
  732. padding-right: 30px;
  733. }
  734. }
  735. .time-form .el-form-item {
  736. margin-bottom: 0 !important;
  737. }
  738. ::v-deep .period {
  739. display: flex;
  740. .borderleftnone {
  741. .el-input--medium .el-input__inner {
  742. border-top-right-radius: 0;
  743. border-bottom-right-radius: 0;
  744. }
  745. }
  746. .borderrightnone {
  747. .el-input--medium .el-input__inner {
  748. border-top-left-radius: 0;
  749. border-bottom-left-radius: 0;
  750. }
  751. }
  752. }
  753. ::v-deep .time-form tbody > tr:hover > td {
  754. background-color: transparent !important;
  755. }
  756. ::v-deep .time-form .el-table tr {
  757. background-color: #ffffff;
  758. }
  759. .pricebox {
  760. display: flex;
  761. justify-content: flex-start;
  762. align-items: center;
  763. font-weight: bold;
  764. }
  765. </style>