index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. <template>
  2. <el-card class="box-card">
  3. <byTable
  4. :source="sourceList.data"
  5. :pagination="sourceList.pagination"
  6. :config="config"
  7. :loading="loading"
  8. :searchConfig="searchConfig"
  9. highlight-current-row
  10. :defaultExpandAll="true"
  11. :table-events="{
  12. select: selectRow,
  13. 'select-all': selectRow,
  14. }"
  15. :action-list="[
  16. {
  17. text: '拆分包裹',
  18. action: () => clickUnpack(),
  19. },
  20. {
  21. text: '合并订单',
  22. action: () => clickMerge(),
  23. },
  24. {
  25. text: '取消合并',
  26. action: () => clickUnMerge(),
  27. },
  28. {
  29. text: '修改收件信息',
  30. action: () => clickModifyInformation(),
  31. },
  32. {
  33. text: '修改快递',
  34. action: () => clickModifiedExpress(),
  35. },
  36. {
  37. text: '打印快递单',
  38. action: () => clickPrint(),
  39. type: 'warning',
  40. },
  41. {
  42. text: '填写线下快递单号',
  43. action: () => clickFillInExpressCode(),
  44. },
  45. ]"
  46. @get-list="getList"
  47. @clickReset="clickReset">
  48. <template #typeExpand="{ item }">
  49. <div class="remark" v-html="item.remark"></div>
  50. </template>
  51. <template #code="{ item }">
  52. <div>
  53. <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
  54. </div>
  55. </template>
  56. <template #groupOrderCodeList="{ item }">
  57. <div>
  58. <div v-if="item.groupOrderCodeList && item.groupOrderCodeList.length > 0">{{ item.groupOrderCodeList.join(",") }}</div>
  59. </div>
  60. </template>
  61. <template #total="{ item }">
  62. <div>
  63. <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickTotal(item)">{{ item.total }}</a>
  64. </div>
  65. </template>
  66. <template #address="{ item }">
  67. <div>{{ item.province }},{{ item.city }},{{ item.county }},{{ item.detailedAddress }}</div>
  68. </template>
  69. </byTable>
  70. <el-dialog title="包裹规格数据" v-if="openTotal" v-model="openTotal" width="90%">
  71. <PackTotal :rowData="rowData" @clickCancel="clickCancel"></PackTotal>
  72. </el-dialog>
  73. <el-dialog title="包裹图片" v-if="openPackagePicture" v-model="openPackagePicture" width="70%">
  74. <div v-loading="loadingPackagePicture">
  75. <el-upload
  76. v-model:file-list="fileList"
  77. action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
  78. list-type="picture-card"
  79. multiple
  80. :data="uploadData"
  81. :before-upload="beforeUpload"
  82. :on-preview="onPreview">
  83. <el-icon><Plus /></el-icon>
  84. </el-upload>
  85. </div>
  86. <template #footer>
  87. <el-button @click="openPackagePicture = false" size="large">取 消</el-button>
  88. <el-button type="primary" @click="submitPicture()" size="large" v-preReClick>提 交</el-button>
  89. </template>
  90. </el-dialog>
  91. <el-dialog title="合并订单" v-if="openMerge" v-model="openMerge" width="500">
  92. <el-form :model="formMerge.data" :rules="rulesMerge" label-width="100px" ref="refMerge">
  93. <el-form-item label="主订单号" prop="id">
  94. <el-select v-model="formMerge.data.id" placeholder="请选择" style="width: 100%">
  95. <el-option v-for="item in selectData" :key="item.id" :label="item.code" :value="item.id"> </el-option>
  96. </el-select>
  97. </el-form-item>
  98. <el-form-item label="合并订单号" prop="mergeIdList">
  99. <el-select v-model="formMerge.data.mergeIdList" placeholder="请选择" style="width: 100%" multiple :disabled="!formMerge.data.id">
  100. <el-option v-for="item in selectData.filter((item) => item.id !== formMerge.data.id)" :key="item.id" :label="item.code" :value="item.id" />
  101. </el-select>
  102. </el-form-item>
  103. </el-form>
  104. <template #footer>
  105. <el-button @click="openMerge = false" size="large">取 消</el-button>
  106. <el-button type="primary" @click="submitMerge()" size="large" v-preReClick>提 交</el-button>
  107. </template>
  108. </el-dialog>
  109. <el-dialog title="修改收件信息" v-if="openInformation" v-model="openInformation" width="600">
  110. <el-form :model="formInformation.data" :rules="rulesInformation" label-width="120px" ref="refInformation">
  111. <el-form-item label="省" prop="province">
  112. <el-input v-model="formInformation.data.province" placeholder="请输入省" />
  113. </el-form-item>
  114. <el-form-item label="市" prop="city">
  115. <el-input v-model="formInformation.data.city" placeholder="请输入市" />
  116. </el-form-item>
  117. <el-form-item label="区/县" prop="county">
  118. <el-input v-model="formInformation.data.county" placeholder="请输入区/县" />
  119. </el-form-item>
  120. <el-form-item label="详细地址" prop="detailedAddress">
  121. <el-input v-model="formInformation.data.detailedAddress" placeholder="请输入详细地址" />
  122. </el-form-item>
  123. <el-form-item label="收货人" prop="consignee">
  124. <el-input v-model="formInformation.data.consignee" placeholder="请输入收货人" />
  125. </el-form-item>
  126. <el-form-item label="收货人电话" prop="consigneeNumber">
  127. <el-input v-model="formInformation.data.consigneeNumber" placeholder="请输入收货人电话" />
  128. </el-form-item>
  129. </el-form>
  130. <template #footer>
  131. <el-button @click="openInformation = false" size="large">取 消</el-button>
  132. <el-button type="primary" @click="submitInformation()" size="large" v-preReClick>保 存</el-button>
  133. </template>
  134. </el-dialog>
  135. <el-dialog title="修改快递" v-if="openExpress" v-model="openExpress" width="500">
  136. <el-form :model="formExpress.data" :rules="rulesExpress" label-width="100px" ref="refExpress">
  137. <el-form-item label="快递" prop="expressDeliveryId">
  138. <el-select v-model="formExpress.data.expressDeliveryId" placeholder="请选择快递" style="width: 100%">
  139. <el-option v-for="item in expressDeliveryList.value" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
  140. </el-select>
  141. </el-form-item>
  142. </el-form>
  143. <template #footer>
  144. <el-button @click="openExpress = false" size="large">取 消</el-button>
  145. <el-button type="primary" @click="submitExpress()" size="large" v-preReClick>保 存</el-button>
  146. </template>
  147. </el-dialog>
  148. <el-dialog title="修改快递" v-if="openExpressCode" v-model="openExpressCode" width="500">
  149. <el-form :model="formExpressCode.data" :rules="rulesExpressCode" label-width="100px" ref="refExpressCode">
  150. <el-form-item label="快递单号" prop="expressDeliveryCode">
  151. <el-input v-model="formExpressCode.data.expressDeliveryCode" placeholder="请输入快递单号" />
  152. </el-form-item>
  153. </el-form>
  154. <template #footer>
  155. <el-button @click="openExpressCode = false" size="large">取 消</el-button>
  156. <el-button type="primary" @click="submitExpressCode()" size="large" v-preReClick>保 存</el-button>
  157. </template>
  158. </el-dialog>
  159. </el-card>
  160. </template>
  161. <script setup>
  162. import byTable from "/src/components/byTable/index";
  163. import { ElMessage } from "element-plus";
  164. import PackTotal from "/src/views/production/shipment/print-order/packTotal.vue";
  165. const { proxy } = getCurrentInstance();
  166. const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
  167. const expressDeliveryList = ref([]);
  168. const sourceList = ref({
  169. data: [],
  170. pagination: {
  171. total: 0,
  172. pageNum: 1,
  173. pageSize: 10,
  174. code: "",
  175. departmentId: "",
  176. expressDeliveryCode: "",
  177. printStatus: "",
  178. beginTime: "",
  179. endTime: "",
  180. },
  181. });
  182. const loading = ref(false);
  183. const searchConfig = computed(() => {
  184. return [
  185. {
  186. type: "input",
  187. prop: "code",
  188. label: "订单号",
  189. },
  190. {
  191. type: "select",
  192. prop: "departmentId",
  193. data: departmentList.value,
  194. label: "事业部",
  195. },
  196. {
  197. type: "input",
  198. prop: "expressDeliveryCode",
  199. label: "快递单号",
  200. },
  201. {
  202. type: "select",
  203. prop: "printStatus",
  204. data: [
  205. {
  206. dictKey: "1",
  207. dictValue: "是",
  208. },
  209. {
  210. dictKey: "0",
  211. dictValue: "否",
  212. },
  213. ],
  214. label: "打印状态",
  215. },
  216. {
  217. type: "date",
  218. propList: ["beginTime", "endTime"],
  219. label: "交期",
  220. },
  221. ];
  222. });
  223. const config = computed(() => {
  224. return [
  225. {
  226. type: "expand",
  227. attrs: {
  228. label: " ",
  229. slot: "typeExpand",
  230. width: 50,
  231. },
  232. },
  233. {
  234. type: "selection",
  235. attrs: {
  236. checkAtt: "isCheck",
  237. },
  238. },
  239. // {
  240. // attrs: {
  241. // label: "日期",
  242. // slot: "backupDateStr",
  243. // width: 220,
  244. // align: "center",
  245. // },
  246. // },
  247. {
  248. attrs: {
  249. label: "主订单号",
  250. slot: "code",
  251. width: 160,
  252. },
  253. },
  254. {
  255. attrs: {
  256. label: "合并订单号",
  257. slot: "groupOrderCodeList",
  258. width: 160,
  259. },
  260. },
  261. {
  262. attrs: {
  263. label: "总包裹数",
  264. slot: "total",
  265. width: 90,
  266. },
  267. },
  268. {
  269. attrs: {
  270. label: "事业部",
  271. prop: "departmentName",
  272. width: 130,
  273. },
  274. },
  275. {
  276. attrs: {
  277. label: "快递",
  278. prop: "expressDeliveryName",
  279. width: 130,
  280. },
  281. },
  282. {
  283. attrs: {
  284. label: "快递单号",
  285. prop: "expressDeliveryCode",
  286. width: 130,
  287. },
  288. },
  289. {
  290. attrs: {
  291. label: "店铺来源",
  292. prop: "sourcePlatform",
  293. width: 120,
  294. },
  295. },
  296. {
  297. attrs: {
  298. label: "店铺名称",
  299. prop: "shopName",
  300. width: 140,
  301. },
  302. },
  303. {
  304. attrs: {
  305. label: "下单时间",
  306. prop: "createTime",
  307. width: 160,
  308. align: "center",
  309. },
  310. },
  311. {
  312. attrs: {
  313. label: "交期",
  314. prop: "deliveryTime",
  315. width: 160,
  316. align: "center",
  317. },
  318. },
  319. {
  320. attrs: {
  321. label: "收货人",
  322. prop: "consignee",
  323. width: 120,
  324. },
  325. },
  326. {
  327. attrs: {
  328. label: "收货人电话",
  329. prop: "consigneeNumber",
  330. width: 160,
  331. },
  332. },
  333. {
  334. attrs: {
  335. label: "收货地址",
  336. slot: "address",
  337. width: 300,
  338. },
  339. },
  340. {
  341. attrs: {
  342. label: "总净重(kg)",
  343. prop: "totalNetWeight",
  344. width: 120,
  345. fixed: "right",
  346. },
  347. },
  348. {
  349. attrs: {
  350. label: "总体积(m³)",
  351. prop: "totalVolume",
  352. width: 120,
  353. fixed: "right",
  354. },
  355. },
  356. {
  357. attrs: {
  358. label: "操作",
  359. width: 100,
  360. align: "center",
  361. fixed: "right",
  362. },
  363. renderHTML(row) {
  364. return [
  365. {
  366. attrs: {
  367. label: "包裹图片",
  368. type: "primary",
  369. text: true,
  370. },
  371. el: "button",
  372. click() {
  373. clickPackagePicture(row);
  374. },
  375. },
  376. ];
  377. },
  378. },
  379. ];
  380. });
  381. const getDemandData = () => {
  382. proxy.post("/department/page", { pageNum: 1, pageSize: 999 }).then((res) => {
  383. if (res.rows && res.rows.length > 0) {
  384. departmentList.value = departmentList.value.concat(
  385. res.rows.map((item) => {
  386. return {
  387. dictKey: item.id,
  388. dictValue: item.name,
  389. };
  390. })
  391. );
  392. }
  393. });
  394. proxy.post("/expressDelivery/page", { pageNum: 1, pageSize: 999 }).then((res) => {
  395. if (res.rows && res.rows.length > 0) {
  396. expressDeliveryList.value = res.rows.map((item) => {
  397. return {
  398. dictKey: item.id,
  399. dictValue: item.expressage,
  400. };
  401. });
  402. }
  403. });
  404. };
  405. getDemandData();
  406. const getList = async (req, status) => {
  407. if (status) {
  408. sourceList.value.pagination = {
  409. pageNum: sourceList.value.pagination.pageNum,
  410. pageSize: sourceList.value.pagination.pageSize,
  411. };
  412. } else {
  413. sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
  414. }
  415. loading.value = true;
  416. proxy.post("/issueBill/page", sourceList.value.pagination).then((res) => {
  417. if (res.rows && res.rows.length > 0) {
  418. sourceList.value.data = res.rows.map((item) => {
  419. return {
  420. ...item,
  421. isCheck: true,
  422. };
  423. });
  424. } else {
  425. sourceList.value.data = [];
  426. }
  427. sourceList.value.pagination.total = res.total;
  428. setTimeout(() => {
  429. loading.value = false;
  430. }, 200);
  431. });
  432. };
  433. getList();
  434. const clickReset = () => {
  435. getList("", true);
  436. };
  437. const selectData = ref([]);
  438. const selectRow = (data) => {
  439. selectData.value = data;
  440. };
  441. const clickCode = (row) => {
  442. proxy.$router.replace({
  443. path: "/order-detail",
  444. query: {
  445. detailId: row.id,
  446. text: "订单详情",
  447. random: proxy.random(),
  448. },
  449. });
  450. };
  451. const openTotal = ref(false);
  452. const rowData = ref({});
  453. const clickTotal = (item) => {
  454. rowData.value = item;
  455. openTotal.value = true;
  456. };
  457. const clickCancel = () => {
  458. openTotal.value = false;
  459. };
  460. const openPackagePicture = ref(false);
  461. const loadingPackagePicture = ref(false);
  462. const fileList = ref([]);
  463. const clickPackagePicture = (item) => {
  464. fileList.value = [];
  465. rowData.value = item;
  466. openPackagePicture.value = true;
  467. loadingPackagePicture.value = true;
  468. proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then(
  469. (fileObj) => {
  470. if (fileObj[item.id] && fileObj[item.id].length > 0) {
  471. let file = fileObj[item.id].filter((item) => item.businessType == "2");
  472. if (file && file.length > 0) {
  473. fileList.value = file.map((item) => {
  474. return {
  475. raw: item,
  476. name: item.fileName,
  477. url: item.fileUrl,
  478. };
  479. });
  480. } else {
  481. fileList.value = [];
  482. }
  483. }
  484. loadingPackagePicture.value = false;
  485. },
  486. (err) => {
  487. console.log(err);
  488. loadingPackagePicture.value = false;
  489. }
  490. );
  491. };
  492. const uploadData = ref({});
  493. const beforeUpload = async (file) => {
  494. const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
  495. uploadData.value = res.uploadBody;
  496. file.id = res.id;
  497. file.fileName = res.fileName;
  498. file.fileUrl = res.fileUrl;
  499. return true;
  500. };
  501. const onPreview = (file) => {
  502. window.open(file.raw.fileUrl, "_blank");
  503. };
  504. const submitPicture = () => {
  505. let packagePictureList = [];
  506. if (fileList.value && fileList.value.length > 0) {
  507. packagePictureList = fileList.value.map((item) => {
  508. return {
  509. id: item.raw.id,
  510. fileName: item.raw.fileName,
  511. fileUrl: item.raw.fileUrl,
  512. };
  513. });
  514. }
  515. loadingPackagePicture.value = true;
  516. proxy.post("/issueBill/editPackagePicture", { id: rowData.value.id, packagePictureList: packagePictureList }).then(
  517. () => {
  518. openPackagePicture.value = false;
  519. loadingPackagePicture.value = false;
  520. ElMessage({ message: "提交成功", type: "success" });
  521. },
  522. (err) => {
  523. console.log(err);
  524. loadingPackagePicture.value = false;
  525. }
  526. );
  527. };
  528. const clickUnpack = () => {
  529. if (selectData.value && selectData.value.length > 0) {
  530. if (selectData.value.length > 1) {
  531. return ElMessage("每次只能选一个");
  532. }
  533. proxy.$router.replace({
  534. path: "/production/shipment/unpack",
  535. query: {
  536. id: selectData.value[0].id,
  537. },
  538. });
  539. } else {
  540. return ElMessage("请先选择需要拆分包裹的订单");
  541. }
  542. };
  543. const openMerge = ref(false);
  544. const formMerge = reactive({
  545. data: {
  546. id: "",
  547. mergeIdList: [],
  548. },
  549. });
  550. const rulesMerge = ref({
  551. id: [{ required: true, message: "请选择主订单", trigger: "change" }],
  552. mergeIdList: [{ required: true, message: "请选择合并订单", trigger: "change" }],
  553. });
  554. const clickMerge = () => {
  555. if (selectData.value && selectData.value.length > 1) {
  556. for (let i = 0; i < selectData.value.length; i++) {
  557. if (selectData.value[i].groupOrderCodeList && selectData.value[i].groupOrderCodeList.length > 0) {
  558. return ElMessage("请选择未合并订单进行合并");
  559. }
  560. }
  561. formMerge.data = {
  562. id: "",
  563. mergeIdList: [],
  564. };
  565. openMerge.value = true;
  566. } else {
  567. return ElMessage("请选择需要合并的订单");
  568. }
  569. };
  570. const submitMerge = () => {
  571. proxy.$refs.refMerge.validate((valid) => {
  572. if (valid) {
  573. proxy.post("/issueBill/merge", formMerge.data).then(() => {
  574. openMerge.value = false;
  575. ElMessage({ message: "提交成功", type: "success" });
  576. getList();
  577. });
  578. }
  579. });
  580. };
  581. const clickUnMerge = () => {
  582. if (selectData.value && selectData.value.length > 0) {
  583. if (selectData.value.length > 1) {
  584. return ElMessage("每次只能选一个");
  585. }
  586. if (!(selectData.value[0].groupOrderCodeList && selectData.value[0].groupOrderCodeList.length > 0)) {
  587. return ElMessage("该订单没有合并");
  588. }
  589. proxy.post("/issueBill/unmerge", { id: selectData.value[0].id }).then(() => {
  590. ElMessage({ message: "取消合并成功", type: "success" });
  591. getList();
  592. });
  593. } else {
  594. return ElMessage("请先选择需要取消合并的订单");
  595. }
  596. };
  597. const openInformation = ref(false);
  598. const formInformation = reactive({
  599. data: {
  600. id: "",
  601. province: "",
  602. city: "",
  603. county: "",
  604. detailedAddress: "",
  605. consignee: "",
  606. consigneeNumber: "",
  607. },
  608. });
  609. const rulesInformation = ref({
  610. province: [{ required: true, message: "请输入省", trigger: "blur" }],
  611. city: [{ required: true, message: "请输入市", trigger: "blur" }],
  612. county: [{ required: true, message: "请输入县", trigger: "blur" }],
  613. detailedAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
  614. consignee: [{ required: true, message: "请输入收货人", trigger: "blur" }],
  615. consigneeNumber: [{ required: true, message: "请输入收货人电话", trigger: "blur" }],
  616. });
  617. const clickModifyInformation = () => {
  618. if (selectData.value && selectData.value.length > 0) {
  619. if (selectData.value.length > 1) {
  620. return ElMessage("每次只能选一个");
  621. }
  622. formInformation.data = {
  623. id: selectData.value[0].id,
  624. province: selectData.value[0].province,
  625. city: selectData.value[0].city,
  626. county: selectData.value[0].county,
  627. detailedAddress: selectData.value[0].detailedAddress,
  628. consignee: selectData.value[0].consignee,
  629. consigneeNumber: selectData.value[0].consigneeNumber,
  630. };
  631. openInformation.value = true;
  632. } else {
  633. return ElMessage("请先选择需要修改收件信息的订单");
  634. }
  635. };
  636. const submitInformation = () => {
  637. proxy.$refs.refInformation.validate((valid) => {
  638. if (valid) {
  639. proxy.post("/issueBill/editAddress", formInformation.data).then(() => {
  640. openInformation.value = false;
  641. ElMessage({ message: "保存成功", type: "success" });
  642. getList();
  643. });
  644. }
  645. });
  646. };
  647. const openExpress = ref(false);
  648. const formExpress = reactive({
  649. data: {
  650. id: "",
  651. expressDeliveryId: "",
  652. },
  653. });
  654. const rulesExpress = ref({
  655. expressDeliveryId: [{ required: true, message: "请选择快递", trigger: "change" }],
  656. });
  657. const clickModifiedExpress = () => {
  658. if (selectData.value && selectData.value.length > 0) {
  659. if (selectData.value.length > 1) {
  660. return ElMessage("每次只能选一个");
  661. }
  662. formExpress.data = {
  663. id: selectData.value[0].id,
  664. expressDeliveryId: selectData.value[0].expressDeliveryId,
  665. };
  666. openExpress.value = true;
  667. } else {
  668. return ElMessage("请先选择需要修改快递的订单");
  669. }
  670. };
  671. const submitExpress = () => {
  672. proxy.$refs.refExpress.validate((valid) => {
  673. if (valid) {
  674. proxy.post("/issueBill/editExpressDeliveryId", formExpress.data).then(() => {
  675. openExpress.value = false;
  676. ElMessage({ message: "保存成功", type: "success" });
  677. getList();
  678. });
  679. }
  680. });
  681. };
  682. const clickPrint = () => {
  683. console.log("打印快递单");
  684. };
  685. const openExpressCode = ref(false);
  686. const formExpressCode = reactive({
  687. data: {
  688. id: "",
  689. expressDeliveryCode: "",
  690. },
  691. });
  692. const rulesExpressCode = ref({
  693. expressDeliveryCode: [{ required: true, message: "请输入快递单号", trigger: "blur" }],
  694. });
  695. const clickFillInExpressCode = () => {
  696. if (selectData.value && selectData.value.length > 0) {
  697. if (selectData.value.length > 1) {
  698. return ElMessage("每次只能选一个");
  699. }
  700. formExpressCode.data = {
  701. id: selectData.value[0].id,
  702. expressDeliveryCode: selectData.value[0].expressDeliveryCode,
  703. };
  704. openExpressCode.value = true;
  705. } else {
  706. return ElMessage("请先选择需要填写快递单号的订单");
  707. }
  708. };
  709. const submitExpressCode = () => {
  710. proxy.$refs.refExpressCode.validate((valid) => {
  711. if (valid) {
  712. proxy.post("/issueBill/editExpressDeliveryCode", formExpressCode.data).then(() => {
  713. openExpressCode.value = false;
  714. ElMessage({ message: "保存成功", type: "success" });
  715. getList();
  716. });
  717. }
  718. });
  719. };
  720. </script>
  721. <style lang="scss" scoped>
  722. ::v-deep(.remark) {
  723. margin: 0 16px;
  724. p {
  725. margin-block-start: 0 !important;
  726. margin-block-end: 0 !important;
  727. }
  728. }
  729. :deep(.el-dialog) {
  730. margin-top: 10px !important;
  731. margin-bottom: 10px !important;
  732. }
  733. </style>