pickup_form.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header @back="goBack" :content="listItem ? (flag ? '详情' : '编辑') : '新增'"></el-page-header>
  4. <el-divider></el-divider>
  5. <div>
  6. <el-form
  7. ref="mainForm"
  8. :model="mainForm"
  9. :rules="mainFormRules"
  10. label-width="80px"
  11. size="small"
  12. label-position="left"
  13. >
  14. <el-row :gutter="20">
  15. <el-col :xs="24" :sm="12" :lg="8">
  16. <el-form-item label="选择仓库" prop="warehouse">
  17. <el-select v-model="mainForm.warehouse" placeholder="请选择仓库" style="width: 100%" :disabled="flag">
  18. <el-option
  19. :label="item.name"
  20. :value="item.id"
  21. v-for="(item, index) in warehouseList"
  22. :key="index"
  23. ></el-option>
  24. </el-select>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :xs="24" :sm="12" :lg="8">
  28. <el-button size="small" type="primary" v-if="!flag" @click="getDeliverList">确定</el-button>
  29. </el-col>
  30. </el-row>
  31. <el-row :gutter="20">
  32. <el-col :xs="24" :sm="12" :lg="8" style="height: 51px">
  33. <el-form-item label="预约日期" prop="date">
  34. <el-date-picker
  35. :disabled="flag"
  36. v-model="mainForm.date"
  37. type="date"
  38. value-format="yyyy-MM-dd"
  39. style="width: 100%"
  40. placeholder="选择日期"
  41. >
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :xs="24" :sm="12" :lg="12" style="height: 51px">
  46. <el-form-item label="预约时段" prop="timeSlot">
  47. <el-radio-group v-model="mainForm.timeSlot" :disabled="flag">
  48. <el-radio :label="1">上午</el-radio>
  49. <el-radio :label="2">下午</el-radio>
  50. </el-radio-group>
  51. </el-form-item>
  52. </el-col>
  53. </el-row>
  54. <el-row :gutter="20">
  55. <el-col :xs="24" :sm="12" :lg="8">
  56. <el-form-item label="提货方式" prop="pickupWay">
  57. <el-radio-group v-model="mainForm.pickupWay" :disabled="flag">
  58. <!-- ||(isFront===false && item.dictCode=='2' ) -->
  59. <el-radio :label="item.dictCode" :disabled="(isFront ===true && item.dictCode=='1' ) " v-for="(item, index) in pickupWayList" :key="index">{{
  60. item.dictValue
  61. }}
  62. </el-radio>
  63. </el-radio-group>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :xs="24" :sm="12" :lg="8">
  67. <el-form-item label="提货人" prop="pickupMan" v-if="mainForm.pickupWay == '1'">
  68. <el-select v-model="mainForm.pickupMan" placeholder="全部" :disabled="flag" style="width: 100%">
  69. <el-option
  70. :label="item.takerName"
  71. :value="item.id"
  72. v-for="(item, index) in pickupManList"
  73. :key="index"
  74. ></el-option>
  75. </el-select>
  76. </el-form-item>
  77. </el-col>
  78. <el-col :xs="24" :sm="12" :lg="8" v-if="mainForm.pickupWay == '1'">
  79. <el-form-item label="提货车辆" prop="pickupCar">
  80. <el-select v-model="mainForm.pickupCar" placeholder="全部" style="width: 100%" :disabled="flag">
  81. <el-option
  82. :label="item.carBrand"
  83. :value="item.id"
  84. v-for="(item, index) in pickupCarList"
  85. :key="index"
  86. ></el-option>
  87. </el-select>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :xs="24" :sm="12" :lg="8" v-if="mainForm.pickupWay == '2'">
  91. <el-form-item label="物流公司" prop="company">
  92. <el-select
  93. v-model="mainForm.logisticsId"
  94. @change="getLogisticsId"
  95. placeholder="全部"
  96. style="width: 100%"
  97. :disabled="flag"
  98. >
  99. <el-option
  100. :label="item.logisticsCompany"
  101. :value="item.id"
  102. :disabled="comDisabled(item.id)"
  103. v-for="(item, index) in companyList"
  104. :key="index"
  105. ></el-option>
  106. </el-select>
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. <!-- <el-row :gutter="20">-->
  111. <!-- <template v-if="logisticsNumber === '001'">-->
  112. <!-- <el-col :xs="24" :sm="8" :lg="8">-->
  113. <!-- <el-form-item label="收货客户" :prop="logisticsNumber === '001' ? 'receivingName' : ''">-->
  114. <!-- <el-input v-model="mainForm.receivingName" :disabled="flag" placeholder="请输入收货客户"></el-input>-->
  115. <!-- </el-form-item>-->
  116. <!-- </el-col>-->
  117. <!-- <el-col :xs="24" :sm="8" :lg="8">-->
  118. <!-- <el-form-item label="电话" :prop="logisticsNumber === '001' ? 'phone' : ''">-->
  119. <!-- <el-input v-model="mainForm.phone" :disabled="flag" placeholder="请输入电话"></el-input>-->
  120. <!-- </el-form-item>-->
  121. <!-- </el-col>-->
  122. <!-- <el-col :xs="24" :sm="8" :lg="8">-->
  123. <!-- <el-form-item label="收货地址" :prop="logisticsNumber === '001' ? 'address' : ''">-->
  124. <!-- <el-input v-model="mainForm.address" :disabled="flag" placeholder="请输入收货地址"></el-input>-->
  125. <!-- </el-form-item>-->
  126. <!-- </el-col>-->
  127. <!-- </template>-->
  128. <!-- <el-col :xs="24" :sm="24" :lg="24">-->
  129. <!-- <el-form-item label="备注内容" prop="remark">-->
  130. <!-- <el-input v-model="mainForm.remark" :disabled="flag" placeholder="请输入备注内容"></el-input>-->
  131. <!-- </el-form-item>-->
  132. <!-- </el-col>-->
  133. <!-- </el-row>-->
  134. </el-form>
  135. </div>
  136. <div class="mymain-container">
  137. <div class="table">
  138. <el-table
  139. ref="table"
  140. v-loading="listLoading"
  141. :data="deliverList"
  142. element-loading-text="Loading"
  143. border
  144. fit
  145. highlight-current-row
  146. stripe
  147. @select="handleSelect"
  148. @select-all="handleSelectAll"
  149. >
  150. <el-table-column align="center" type="selection" width="55"></el-table-column>
  151. <template v-if="logisticsNumber === '001' && mainForm.pickupWay == 2">
  152. <el-table-column align="left" label="收货客户" prop="orderTime" min-width="100" show-overflow-tooltip>
  153. <template slot-scope="scope">
  154. <el-input
  155. v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
  156. :disabled="flag"
  157. v-model="scope.row.receivingName"
  158. size="mini"
  159. @input="handleInput($event, scope.row.invoiceId, 1)"
  160. ></el-input>
  161. <template v-else> {{ scope.row.refLinkman }}</template>
  162. </template>
  163. </el-table-column>
  164. <el-table-column align="left" label="电话" prop="orderTime" min-width="150" show-overflow-tooltip>
  165. <template slot-scope="scope">
  166. <el-input
  167. v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
  168. :disabled="flag"
  169. v-model="scope.row.phone"
  170. size="mini"
  171. @input="handleInput($event, scope.row.invoiceId, 2)"
  172. ></el-input>
  173. <template v-else>{{ scope.row.refPhone }}</template>
  174. </template>
  175. </el-table-column>
  176. <el-table-column align="left" label="收货地址" prop="orderTime" min-width="200" show-overflow-tooltip>
  177. <template slot-scope="scope">
  178. <el-input
  179. v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
  180. :disabled="flag"
  181. v-model="scope.row.address"
  182. size="mini"
  183. @input="handleInput($event, scope.row.invoiceId, 3)"
  184. ></el-input>
  185. <template v-else>
  186. {{ scope.row.refInstallAddress }}
  187. </template>
  188. </template>
  189. </el-table-column>
  190. </template>
  191. <el-table-column
  192. align="left"
  193. label="发货申请单"
  194. prop="invoiceId"
  195. min-width="160"
  196. show-overflow-tooltip
  197. ></el-table-column>
  198. <el-table-column align="left" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
  199. <template slot-scope="scope">
  200. {{ scope.row.orderTime | dateToDayFilter }}
  201. </template>
  202. </el-table-column>
  203. <el-table-column align="left" label="销售订单号" prop="mainOrderId" min-width="160" show-overflow-tooltip>
  204. <template slot-scope="scope">
  205. <CopyButton
  206. :copyText="
  207. scope.row.orderType === 'TRADE' ||
  208. scope.row.orderType === 'HOME' ||
  209. scope.row.orderType === 'REQUISITION_TRADE' ||
  210. scope.row.orderType === 'REQUISITION_HOME'
  211. ? scope.row.enginOrderNo
  212. : scope.row.mainOrderId
  213. "
  214. />
  215. <span>{{
  216. scope.row.orderType === 'TRADE' ||
  217. scope.row.orderType === 'HOME' ||
  218. scope.row.orderType === 'REQUISITION_TRADE' ||
  219. scope.row.orderType === 'REQUISITION_HOME'
  220. ? scope.row.enginOrderNo
  221. : scope.row.mainOrderId
  222. }}</span>
  223. </template>
  224. </el-table-column>
  225. <!-- <el-table-column align="left" label="工程编号" prop="enginOrderNo" min-width="140" show-overflow-tooltip></el-table-column> -->
  226. <el-table-column
  227. align="left"
  228. label="销售类型"
  229. prop="saleTypeName"
  230. min-width="160"
  231. show-overflow-tooltip
  232. ></el-table-column>
  233. <el-table-column
  234. align="left"
  235. label="物料编码"
  236. prop="materialCode"
  237. min-width="160"
  238. show-overflow-tooltip
  239. ></el-table-column>
  240. <el-table-column
  241. align="left"
  242. label="产品名称"
  243. prop="materialName"
  244. min-width="160"
  245. show-overflow-tooltip
  246. ></el-table-column>
  247. <el-table-column
  248. align="left"
  249. label="规格型号"
  250. prop="specification"
  251. min-width="160"
  252. show-overflow-tooltip
  253. ></el-table-column>
  254. <el-table-column
  255. align="left"
  256. label="单位"
  257. prop="unit"
  258. min-width="100"
  259. show-overflow-tooltip
  260. ></el-table-column>
  261. <el-table-column
  262. align="right"
  263. label="数量"
  264. prop="refundableQty"
  265. min-width="100"
  266. show-overflow-tooltip
  267. ></el-table-column>
  268. </el-table>
  269. </div>
  270. </div>
  271. <div class="page-footer">
  272. <div class="footer" :class="classObj">
  273. <el-button type="primary" @click="clickSubmitForm" v-if="!flag" :loading="formLoading">{{
  274. formLoading ? '提交中 ...' : '提 交'
  275. }}
  276. </el-button>
  277. <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px" v-if="!listItem">
  278. <el-button slot="reference">重 置</el-button>
  279. </el-popconfirm>
  280. </div>
  281. </div>
  282. </div>
  283. </template>
  284. <script>
  285. import {
  286. getWarehouseList,
  287. getDeliverList,
  288. getPickupManList,
  289. getPickupCarList,
  290. getCompanyList,
  291. addPickupBook,
  292. editPickupBook,
  293. getDetail,
  294. checkStock
  295. } from '@/api/supply/pickup'
  296. import { getDictList } from '@/api/common'
  297. export default {
  298. name: 'PickupForm',
  299. componentName: 'PickupForm',
  300. props: ['listItem', 'flag'],
  301. data() {
  302. return {
  303. deliverList: null, // 列表数据
  304. listLoading: false, // 列表加载loading
  305. mainForm: {
  306. // 筛选表单数据
  307. warehouse: '',
  308. date: '',
  309. timeSlot: '',
  310. pickupWay: '',
  311. pickupMan: '',
  312. pickupCar: '',
  313. company: '',
  314. remark: '',
  315. logisticsId: '',
  316. receivingName: '',
  317. phone: '',
  318. address: ''
  319. },
  320. mainFormRules: {
  321. date: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
  322. timeSlot: [{ required: true, message: '请选择预约时段', trigger: 'change' }],
  323. pickupWay: [{ required: true, message: '请选择提货方式', trigger: 'change' }],
  324. pickupMan: [{ required: true, message: '请选择提货人', trigger: 'change' }]
  325. // receivingName: [{ required: true, message: '请填写收货客户', trigger: 'change' }],
  326. // phone: [{ required: true, message: '请填写电话', trigger: 'change' }]
  327. // address: [{ required: true, message: '请填写收货地址', trigger: 'change' }]
  328. },
  329. formLoading: false,
  330. tableSelection: [],
  331. warehouseList: [],
  332. pickupWayList: [],
  333. pickupManList: [],
  334. pickupCarList: [],
  335. companyList: [],
  336. logisticsNumber: '',
  337. isFront: null
  338. }
  339. },
  340. computed: {
  341. sidebar() {
  342. return this.$store.state.app.sidebar
  343. },
  344. classObj() {
  345. return {
  346. hideSidebar: !this.sidebar.opened,
  347. openSidebar: this.sidebar.opened
  348. }
  349. },
  350. comDisabled(){
  351. return (id)=>{
  352. if (this.isFront ===false && id === '1574563841707114498') {
  353. return true
  354. }
  355. if (this.isFront ===true && id !== '1574563841707114498') {
  356. return true
  357. }
  358. return false
  359. }
  360. }
  361. },
  362. created() {
  363. this.isFront = JSON.parse(localStorage.getItem('supply_user')).isFront
  364. this.getWarehouseList()
  365. this.getPickupWayList()
  366. this.getPickupManList()
  367. this.getPickupCarList()
  368. this.getCompanyList()
  369. if (this.listItem) {
  370. this.getDetail()
  371. }
  372. },
  373. methods: {
  374. // 查询按钮权限
  375. checkBtnRole(value) {
  376. // let btnRole = this.$route.meta.roles;
  377. // if(!btnRole) {return true}
  378. // let index = btnRole.indexOf(value);
  379. // return index >= 0;
  380. return true
  381. },
  382. // 返回列表
  383. goBack() {
  384. this.$emit('backListFormDetail')
  385. },
  386. handleInput(e, id, type) {
  387. console.log(e)
  388. this.deliverList.forEach(k => {
  389. if (k.invoiceId === id) {
  390. switch (type) {
  391. case 1:
  392. k.receivingName = e
  393. break
  394. case 2:
  395. k.phone = e
  396. break
  397. default:
  398. k.address = e
  399. }
  400. }
  401. })
  402. },
  403. // 获取详情
  404. getDetail() {
  405. getDetail({ id: this.listItem.id }).then(res => {
  406. let data = res.data
  407. this.mainForm.warehouse = data.correspondId
  408. this.mainForm.date = data.pickTime.slice(0, 10)
  409. this.mainForm.timeSlot = Number(data.pickStatus)
  410. this.mainForm.pickupWay = String(data.pickType)
  411. this.mainForm.pickupMan = data.takerId
  412. this.mainForm.pickupCar = data.takerCarId
  413. this.mainForm.company = data.pickLogistics
  414. this.mainForm.remark = data.remark
  415. this.mainForm.logisticsId = data.logisticsId
  416. if (this.mainForm.pickupWay == 2) {
  417. const item = this.companyList.find(k => k.id === data.logisticsId)
  418. this.logisticsNumber = item.logisticsNumber
  419. }
  420. this.deliverList = data.invoicePickBeans
  421. })
  422. },
  423. // 获取仓库列表
  424. getWarehouseList() {
  425. getWarehouseList({
  426. pageNum: 1,
  427. pageSize: -1
  428. }).then(res => {
  429. this.warehouseList = res.data.records
  430. })
  431. },
  432. // 获取提货方式列表
  433. getPickupWayList() {
  434. getDictList({ sysDictEnum: 'PICK' }).then(res => {
  435. this.pickupWayList = res.data
  436. if (this.isFront===true) {
  437. this.mainForm.pickupWay = '2'
  438. this.mainForm.logisticsId = '1574563841707114498'
  439. getCompanyList({
  440. pageNum: 1,
  441. pageSize: -1
  442. }).then(res => {
  443. this.companyList = res.data.records
  444. const item = this.companyList.find(k => k.id === this.mainForm.logisticsId)
  445. this.mainForm.company = item.logisticsCompany
  446. this.logisticsNumber = item.logisticsNumber
  447. if (this.logisticsNumber === '001' && this.deliverList && this.deliverList.length) {
  448. if (!this.listItem) {
  449. this.deliverList.forEach(k => {
  450. this.$set(k, 'receivingName', '')
  451. this.$set(k, 'phone', '')
  452. this.$set(k, 'address', '')
  453. })
  454. }
  455. }
  456. })
  457. }else if (this.isFront===false) {
  458. this.mainForm.pickupWay = '1'
  459. }
  460. })
  461. },
  462. // 获取提货人列表
  463. getPickupManList() {
  464. getPickupManList({
  465. pageNum: 1,
  466. pageSize: -1
  467. }).then(res => {
  468. this.pickupManList = res.data.records
  469. })
  470. },
  471. // 获取提货车辆列表
  472. getPickupCarList() {
  473. getPickupCarList({
  474. pageNum: 1,
  475. pageSize: -1
  476. }).then(res => {
  477. this.pickupCarList = res.data.records
  478. })
  479. },
  480. // 获取物流公司列表
  481. getCompanyList() {
  482. getCompanyList({
  483. pageNum: 1,
  484. pageSize: -1
  485. }).then(res => {
  486. this.companyList = res.data.records
  487. console.log(this.companyList)
  488. })
  489. },
  490. getLogisticsId(e) {
  491. console.log(this.companyList)
  492. const item = this.companyList.find(k => k.id === e)
  493. this.mainForm.company = item.logisticsCompany
  494. this.logisticsNumber = item.logisticsNumber
  495. if (this.logisticsNumber === '001' && this.deliverList && this.deliverList.length) {
  496. this.deliverList.forEach(k => {
  497. this.$set(k, 'receivingName', '')
  498. this.$set(k, 'phone', '')
  499. this.$set(k, 'address', '')
  500. })
  501. } else {
  502. if (this.deliverList && !this.deliverList.length) return
  503. this.deliverList.forEach(k => {
  504. delete k.receivingName
  505. delete k.phone
  506. delete k.address
  507. })
  508. }
  509. },
  510. // 查询列表
  511. getDeliverList() {
  512. if (!this.mainForm.warehouse) {
  513. return this.$errorMsg('请选择仓库')
  514. }
  515. this.listLoading = true
  516. getDeliverList({ correspondId: this.mainForm.warehouse }).then(res => {
  517. this.deliverList = res.data
  518. this.listLoading = false
  519. })
  520. },
  521. handleSelect(selection, row) {
  522. this.$refs.table.toggleRowSelection(row)
  523. this.deliverList.forEach(item => {
  524. if (item.invoiceId === row.invoiceId) {
  525. this.$refs.table.toggleRowSelection(item)
  526. }
  527. })
  528. this.tableSelection = this.$refs.table.selection
  529. // this.tableSelection = this.$refs.table.selection;
  530. },
  531. handleSelectAll(selection) {
  532. this.tableSelection = this.$refs.table.selection
  533. },
  534. clickSubmitForm() {
  535. this.$refs.mainForm.validate(valid => {
  536. if (valid) {
  537. if (this.tableSelection.length < 1) {
  538. return this.$errorMsg('请选择发货申请单')
  539. }
  540. let orderList = []
  541. this.tableSelection.forEach(item => {
  542. orderList.push(item.invoiceOrderId)
  543. })
  544. let params = {
  545. correspondId: this.mainForm.warehouse,
  546. pickTime: this.mainForm.date + ' 00:00:00',
  547. invoiceOrderIds: orderList.join(',')
  548. }
  549. checkStock(params).then(res => {
  550. if (res.data) {
  551. this.$confirm(res.data, '提示', {
  552. confirmButtonText: '确定',
  553. cancelButtonText: '取消',
  554. type: 'warning'
  555. })
  556. .then(() => {
  557. this.submitForm()
  558. })
  559. .catch(() => {
  560. })
  561. } else {
  562. this.submitForm()
  563. }
  564. })
  565. }
  566. })
  567. },
  568. submitForm() {
  569. this.formLoading = true
  570. let takerName
  571. if (this.mainForm.pickupWay == '1') {
  572. takerName = this.pickupManList.find(o => o.id == this.mainForm.pickupMan).takerName
  573. }
  574. // let correspondName = this.warehouseList.find(o => o.id == this.mainForm.warehouse).name;
  575. let orderList = []
  576. this.tableSelection.forEach(item => {
  577. orderList.push({
  578. address: item.address,
  579. id: this.listItem ? item.id : '',
  580. invoiceOrderId: item.invoiceOrderId,
  581. materialCode: item.materialCode,
  582. materialId: item.materialId,
  583. materialName: item.materialName,
  584. materialOldNumber: item.materialOldNumber,
  585. phone: item.phone,
  586. pickActualTime: item.pickActualTime,
  587. pickId: item.pickId,
  588. printNum: item.printNum,
  589. printTime: item.printTime,
  590. receivingName: item.receivingName,
  591. status: item.status
  592. })
  593. })
  594. let params = {
  595. correspondId: this.mainForm.warehouse,
  596. // correspondName,
  597. pickTime: this.mainForm.date + ' 00:00:00',
  598. pickStatus: Number(this.mainForm.timeSlot),
  599. pickType: Number(this.mainForm.pickupWay),
  600. takerId: this.mainForm.pickupMan,
  601. takerName: takerName || '',
  602. remark: this.mainForm.remark,
  603. invoiceOrderIds: orderList
  604. }
  605. if (this.mainForm.pickupWay == '1') {
  606. params.takerCarId = this.mainForm.pickupCar
  607. }
  608. if (this.mainForm.pickupWay == '2') {
  609. params.pickLogistics = this.mainForm.company
  610. params.logisticsId = this.mainForm.logisticsId
  611. // params.receivingName = this.mainForm.receivingName
  612. // params.phone = this.mainForm.phone
  613. // params.address = this.mainForm.address
  614. }
  615. if (this.listItem) {
  616. params.id = this.listItem.id
  617. editPickupBook(params)
  618. .then(res => {
  619. this.$successMsg('提交成功')
  620. this.goBack()
  621. this.$parent.getList()
  622. })
  623. .finally(res => {
  624. this.formLoading = false
  625. })
  626. } else {
  627. addPickupBook(params)
  628. .then(res => {
  629. this.$successMsg('提交成功')
  630. this.goBack()
  631. this.$parent.getList()
  632. })
  633. .finally(res => {
  634. this.formLoading = false
  635. })
  636. }
  637. },
  638. resetForm() {
  639. this.$refs.mainForm.resetFields()
  640. this.deliverList = []
  641. }
  642. }
  643. }
  644. </script>
  645. <style lang="scss" scoped></style>