addPreBookDrawer.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <template>
  2. <!-- 新增预托书 -->
  3. <div id="addPreBookDrawer">
  4. <a-drawer
  5. :title="(defultMethod == 'add')?'新增预托书':'编辑预托书'"
  6. width="89%"
  7. placement="right"
  8. :closable="true"
  9. :visible="visible"
  10. @close="handleCancel"
  11. >
  12. <!-- 主表信息 -->
  13. <a-card :bordered="true">
  14. <div class="table-page-search-wrapper">
  15. <!-- :rules="validatorRules" -->
  16. <a-form-model layout="inline" ref="form" :model="addPreBook" :rules="validatorRules">
  17. <a-row :gutter="24">
  18. <a-col :md="6" :sm="8">
  19. <a-form-model-item label="预托书号" prop="depositaryReceiptNo">
  20. <a-input placeholder="请填写预托书号" v-model="addPreBook.depositaryReceiptNo"></a-input>
  21. </a-form-model-item>
  22. </a-col>
  23. <a-col :md="6" :sm="8">
  24. <a-form-model-item label="托书日期" prop="shippingOrderDate">
  25. <a-date-picker
  26. placeholder="请选择托书日期"
  27. style="width:100%;"
  28. :format="dateFormat"
  29. v-model="addPreBook.shippingOrderDate"
  30. />
  31. </a-form-model-item>
  32. </a-col>
  33. <!-- <a-col :md="12" :sm="16">
  34. <a-form-model-item label="外销发票号码" prop="exportInvoiceNo">
  35. <a-input placeholder="请输入外销发票号码" v-model="addPreBook.exportInvoiceNo"></a-input>
  36. </a-form-model-item>
  37. </a-col> -->
  38. <a-col :md="6" :sm="8">
  39. <a-form-model-item label="经营单位" prop="unitInOperation">
  40. <a-input placeholder="请输入经营单位" v-model="addPreBook.unitInOperation"></a-input>
  41. </a-form-model-item>
  42. </a-col>
  43. <a-col :md="6" :sm="8">
  44. <a-form-model-item label="经营单位地址" prop="unitInOperationAddress">
  45. <a-input placeholder="请输入经营单位地址" v-model="addPreBook.unitInOperationAddress"></a-input>
  46. </a-form-model-item>
  47. </a-col>
  48. <a-col :md="6" :sm="8">
  49. <a-form-model-item label="进仓/装柜日期" prop="latestDateOfShipment">
  50. <a-date-picker
  51. placeholder="请选择进仓/装柜日期"
  52. style="width:100%;"
  53. :format="dateFormat"
  54. v-model="addPreBook.latestDateOfShipment"
  55. />
  56. </a-form-model-item>
  57. </a-col>
  58. <a-col :md="6" :sm="8">
  59. <a-form-model-item label="最终船期" prop="theFinalShippingDate">
  60. <a-date-picker placeholder="请输入最终船期" style="width:100%;" v-model="addPreBook.theFinalShippingDate"/>
  61. </a-form-model-item>
  62. </a-col>
  63. <a-col :md="6" :sm="8">
  64. <a-form-model-item label="贸易国别" prop="tradeCountry">
  65. <j-search-select-tag
  66. placeholder="请选择贸易国别"
  67. v-model="addPreBook.tradeCountry"
  68. dict="trade_country">
  69. </j-search-select-tag>
  70. <!-- <a-input placeholder="请输入贸易国别" v-model="addPreBook.tradeCountry"></a-input> -->
  71. </a-form-model-item>
  72. </a-col>
  73. <a-col :md="6" :sm="8">
  74. <a-form-model-item label="运抵国别" prop="arriveInCountry">
  75. <j-search-select-tag
  76. placeholder="请选择运抵国别"
  77. v-model="addPreBook.arriveInCountry"
  78. dict="country_of_arrival">
  79. </j-search-select-tag>
  80. <!-- <a-input placeholder="请输入运抵国别" v-model="addPreBook.arriveInCountry"></a-input> -->
  81. </a-form-model-item>
  82. </a-col>
  83. <a-col :md="6" :sm="8">
  84. <a-form-model-item label="收货人" prop="consignee">
  85. <!-- <j-dict-select-tag
  86. style="width:100%;margin-bottom: 10px;" v-model="addPreBook.consigneeAll"
  87. dictCode="sys_dict_item,item_text,description,dict_id in(select id from sys_dict where dict_code='receiving_goods_info')"
  88. @change="consigneeSelectChange"/> -->
  89. <j-search-select-tag
  90. placeholder="请选择收货人"
  91. v-model="addPreBook.consignee"
  92. @change="consigneeSelectChange"
  93. dict="receiving_goods_info">
  94. </j-search-select-tag>
  95. </a-form-model-item>
  96. </a-col>
  97. <a-col :md="6" :sm="8">
  98. <a-form-model-item label="收货人地址" prop="consigneeAddress">
  99. <a-input placeholder="根据收货人自动带出" v-model="addPreBook.consigneeAddress" ></a-input>
  100. </a-form-model-item>
  101. </a-col>
  102. <a-col :md="6" :sm="8">
  103. <a-form-model-item label="通知方" prop="notifyParty">
  104. <a-input placeholder="根据收货人自动带出" v-model="addPreBook.notifyParty" ></a-input>
  105. </a-form-model-item>
  106. </a-col>
  107. <a-col :md="6" :sm="8">
  108. <a-form-model-item label="通知方地址" prop="notifyPartyAddress">
  109. <a-input placeholder="根据收货人自动带出" v-model="addPreBook.notifyPartyAddress" ></a-input>
  110. </a-form-model-item>
  111. </a-col>
  112. <a-col :md="6" :sm="8">
  113. <a-form-model-item label="出口口岸" prop="exportPort">
  114. <j-search-select-tag
  115. placeholder="请选择出口口岸"
  116. v-model="addPreBook.exportPort"
  117. dict="export_port">
  118. </j-search-select-tag>
  119. <!-- <a-input placeholder="请输入出口口岸" v-model="addPreBook.exportPort"></a-input> -->
  120. </a-form-model-item>
  121. </a-col>
  122. <a-col :md="6" :sm="8">
  123. <a-form-model-item label="目的港" prop="destinationPort">
  124. <j-search-select-tag
  125. placeholder="请选择目的港"
  126. v-model="addPreBook.destinationPort"
  127. dict="port_of_destination">
  128. </j-search-select-tag>
  129. <!-- <a-input placeholder="请输入目的港" v-model="addPreBook.destinationPort"></a-input> -->
  130. </a-form-model-item>
  131. </a-col>
  132. <a-col :md="6" :sm="8">
  133. <a-form-model-item label="收汇方式" prop="exchangeEarningsValue">
  134. <j-search-select-tag
  135. placeholder="请选择收汇方式"
  136. v-model="addPreBook.exchangeEarningsValue"
  137. dict="collection_method">
  138. </j-search-select-tag>
  139. <!-- <a-input placeholder="请输入收汇方式" v-model="addPreBook.exchangeEarningsValue"></a-input> -->
  140. </a-form-model-item>
  141. </a-col>
  142. <a-col :md="6" :sm="8">
  143. <a-form-model-item label="成交方式" prop="termsOfDeliveryvalue">
  144. <j-search-select-tag
  145. placeholder="请选择成交方式"
  146. v-model="addPreBook.termsOfDeliveryvalue"
  147. dict="transaction_method"
  148. change>
  149. </j-search-select-tag>
  150. <!-- <a-input placeholder="请输入成交方式" v-model="addPreBook.termsOfDeliveryvalue"></a-input> -->
  151. </a-form-model-item>
  152. </a-col>
  153. <a-col :md="6" :sm="8">
  154. <a-form-model-item label="金额" prop="money">
  155. <a-input placeholder="请输入金额" v-model="addPreBook.money"></a-input>
  156. </a-form-model-item>
  157. </a-col>
  158. </a-row>
  159. </a-form-model>
  160. </div>
  161. </a-card>
  162. <!--操作按钮区域 参照预装箱单 増行-->
  163. <a-card :bordered="true" style="marginTop:10px;">
  164. <!-- table-->
  165. <a-spin :spinning="confirmLoading">
  166. <!-- :rules="validatorRules" -->
  167. <j-vxe-table
  168. ref="vTable"
  169. toolbar
  170. row-number
  171. row-selection
  172. drag-sort
  173. keep-source
  174. :height="400"
  175. :loading="loading"
  176. :dataSource="addPreBook.syLetterDepositItemList"
  177. :columns="addPerBookColumns"
  178. :alwaysEdit=true
  179. :bordered=true
  180. :toolbarConfig="toolbarConfig"
  181. @valueChange="handleValueChange"
  182. >
  183. <template v-slot:toolbarSuffix>
  184. <a-button @click="referadvancePackingList" type="primary" icon="ordered-list">参照预装箱单</a-button>
  185. </template>
  186. <template v-slot:action="props">
  187. <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
  188. <a>删除</a>
  189. </a-popconfirm>
  190. </template>
  191. </j-vxe-table>
  192. </a-spin>
  193. </a-card>
  194. <!-- 页面底部保存取消 -->
  195. <div
  196. :style="{
  197. position: 'absolute',
  198. right: 0,
  199. bottom: 0,
  200. width: '100%',
  201. borderTop: '1px solid #e9e9e9',
  202. padding: '10px 16px',
  203. background: '#fff',
  204. textAlign: 'right',
  205. zIndex: 1
  206. }"
  207. >
  208. <a-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
  209. <a-button :style="{ marginRight: '8px' }">取消</a-button>
  210. </a-popconfirm>
  211. <a-button type="primary" @click="myHandSave">
  212. 保存
  213. </a-button>
  214. <!-- <a-button type="primary" @click="myHandSubmit" style="margin-left: 8px">
  215. 保存并提交
  216. </a-button> -->
  217. </div>
  218. </a-drawer>
  219. <!-- 参照预装箱单 -->
  220. <advancePackingList-modal ref="advancePackingListModal" :father="aa" @callback="referCallback" @ok="modalFormOk"></advancePackingList-modal>
  221. </div>
  222. </template>
  223. <script>
  224. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  225. import JEllipsis from '@/components/jeecg/JEllipsis'
  226. import moment from 'moment'
  227. import AdvancePackingListModal from '@views/pre-book/advancePackingListModal.vue'
  228. import { JVXETypes } from '@/components/jeecg/JVxeTable'
  229. import { addPreBook, editById } from '@api/document/pre-book.js'
  230. export default {
  231. name: 'AddPreBookDrawer', // 新增预托书
  232. computed: {},
  233. mixins: [JeecgListMixin],
  234. components: { AdvancePackingListModal, JEllipsis, moment }, // 参照预装箱单 弹框
  235. data() {
  236. return {
  237. // 表头
  238. addPerBookColumns: [
  239. // {
  240. // title: '英文名称',
  241. // key: 'englishName',
  242. // width: 120,
  243. // fixed: 'left',
  244. // className: 'replacecolor'
  245. // },
  246. {
  247. title: '款号',
  248. key: 'itemNumber',
  249. width: 120,
  250. fixed: 'left',
  251. className: 'replacecolor'
  252. },
  253. {
  254. title: '小po',
  255. key: 'smallPo',
  256. width: 120,
  257. className: 'replacecolor'
  258. },
  259. {
  260. title: '数量',
  261. key: 'total',
  262. width: 120,
  263. className: 'replacecolor'
  264. },
  265. {
  266. title: '箱数',
  267. key: 'boxNumber',
  268. width: 90,
  269. className: 'replacecolor'
  270. },
  271. {
  272. title: '毛重',
  273. key: 'totalGrossWeight',
  274. width: 120,
  275. className: 'replacecolor'
  276. },
  277. {
  278. title: '净重',
  279. key: 'totalNetWeight',
  280. width: 120,
  281. className: 'replacecolor'
  282. },
  283. {
  284. title: '体积',
  285. key: 'totalVolume',
  286. width: 160,
  287. className: 'replacecolor'
  288. },
  289. {
  290. title: '分销点',
  291. key: 'distributionPoint',
  292. width: 120,
  293. className: 'replacecolor'
  294. },
  295. {
  296. title: '集装箱代号',
  297. key: 'containerCode',
  298. width: 120,
  299. type:JVXETypes.inputNumber,
  300. className: 'replacecolor',
  301. },
  302. {
  303. title: '集装箱号',
  304. key: 'containerNumber',
  305. width: 120,
  306. type:JVXETypes.input,
  307. className: 'replacecolor',
  308. },
  309. {
  310. title: '单价',
  311. key: 'unitPrice',
  312. width: 120,
  313. className: 'replacecolor'
  314. },
  315. {
  316. title: '金额',
  317. key: 'totalPrice',
  318. width: 120,
  319. className: 'replacecolor'
  320. },
  321. // {
  322. // title: '创建时间',
  323. // dataIndex: 'createTime',
  324. // align: 'center',
  325. // sorter: true,
  326. // customRender: text => {
  327. // return moment(text).format('YYYY-MM-DD')
  328. // }
  329. // },
  330. {
  331. title: '预发货日期',
  332. key: 'preDeliveryDate',
  333. width: 120,
  334. className: 'replacecolor'
  335. },
  336. {
  337. title: '业务员',
  338. key: 'salesman',
  339. width: 120,
  340. className: 'replacecolor'
  341. },
  342. {
  343. title: '业务部门',
  344. key: 'salesDepartment',
  345. width: 120,
  346. className: 'replacecolor'
  347. },
  348. {
  349. title: '采购/委外订单号',
  350. key: 'spurOrSubOrder',
  351. width: 160,
  352. className: 'replacecolor'
  353. },
  354. {
  355. title: '采购/委外工厂',
  356. key: 'supplier',
  357. width: 160,
  358. className: 'replacecolor'
  359. },
  360. {
  361. title: '操作',
  362. key: 'action',
  363. type: JVXETypes.slot,
  364. width: 100,
  365. align: 'center',
  366. fixed: 'right',
  367. slotName: 'action',
  368. }
  369. ],
  370. addPerBookData: [],
  371. msgFormSon: 'test', // 子组件传来数据的变量
  372. loading: false, // 表格加载
  373. addPreBook: {}, //主表信息
  374. confirmLoading: false,
  375. visible: false,
  376. defultMethod:'add',
  377. dateFormat: 'YYYY-MM-DD',
  378. toolbarConfig: {
  379. btn: []
  380. },
  381. validatorRules:{
  382. shippingOrderDate:[{required: true, message: '托书日期不能为空!'}],
  383. consignee:[{required: true, message: '收货人不能为空!'}],
  384. depositaryReceiptNo:[{required: true, message: '预托书号不能为空!'}],
  385. unitInOperation:[{required: true, message: '经营单位不能为空!'}],
  386. unitInOperationAddress:[{required: true, message: '经营单位地址不能为空!'}],
  387. tradeCountry:[{required: true, message: '贸易国别不能为空!'}],
  388. arriveInCountry:[{required: true, message: '运抵国别不能为空!'}],
  389. exportPort:[{required: true, message: '出口口岸不能为空!'}],
  390. destinationPort:[{required: true, message: '目的港不能为空!'}],
  391. },
  392. }
  393. },
  394. created() {},
  395. methods: {
  396. moment,
  397. // 参照预装箱单
  398. referadvancePackingList() {
  399. //子表中有数据时,传值给参照数据组件
  400. if(this.addPreBook.syLetterDepositItemList.length !== 0){
  401. this.$refs.advancePackingListModal.fatherData = this.addPreBook.syLetterDepositItemList
  402. }
  403. this.$refs.advancePackingListModal.advancePackingListModVis = true;
  404. this.$refs.advancePackingListModal.queryParam = {};
  405. this.$refs.advancePackingListModal.searchQuery();
  406. },
  407. // 増行
  408. handleAddColumn() {
  409. console.log('増行')
  410. const addrow = {
  411. id:"",
  412. syLetterDepositId:"",
  413. preDeliveryDate:"",
  414. clientAbbreviation:"",
  415. syPreAssembledPackingListId:"",
  416. syPreAssembledPackingListItemId:"",
  417. acSetNo:"",
  418. garmentFactory:"",
  419. // hod:"",
  420. styleNo:"",
  421. smallPo:"",
  422. itemCode:"",
  423. distributionPoint:"",
  424. size:"",
  425. startingBoxNumber:"",
  426. endCaseNumber:"",
  427. colour:"",
  428. piecesBox:"",
  429. boxNumber:"",
  430. total:"",
  431. netWeight:"",
  432. totalNetWeight:"",
  433. grossWeight:"",
  434. totalGrossWeight:"",
  435. outerBoxLength:0,
  436. outerBoxWidth:0,
  437. outerBoxHeight:0,
  438. totalVolume:"",
  439. netWeightToo:0,
  440. unitPrice:"",
  441. totalPrice:"",
  442. containerCode:"",
  443. containerNumber:"",
  444. custor:"",
  445. itemNumber:"",
  446. preAssembledPackingNo:"",
  447. salesman:"",
  448. salesDepartment:"",
  449. spurOrSubOrder:""
  450. }
  451. this.addPerBookData.push(addrow)
  452. },
  453. // ------------------------------------------
  454. // 操作 删除
  455. handleDelete(index) {
  456. var ret = this.addPreBook.syLetterDepositItemList.splice(index, 1);
  457. this.setHeadCalField();
  458. return ret;
  459. },
  460. // 抽屉 取消
  461. handleCancel() {
  462. this.close()
  463. },
  464. myHandSave(){
  465. this.addPreBook.theDocumentsState=0;
  466. this.saveAdd();
  467. },
  468. myHandSubmit(){
  469. this.addPreBook.theDocumentsState=1;
  470. this.saveAdd();
  471. },
  472. // 抽屉 提交
  473. saveAdd() {
  474. const that = this;
  475. var newObj = this.addPreBook;
  476. if (newObj.syLetterDepositItemList.length == 0){
  477. this.$message.error('当前记录没有子表记录,无法保存');
  478. return;
  479. }
  480. // 触发表单验证
  481. this.$refs.form.validate(valid => {
  482. if (valid) {
  483. // for(var i =0;i<newObj.syLetterDepositItemList.length;i++){
  484. // var row = newObj.syLetterDepositItemList[i]
  485. // if(row.containerCode === '' || !row.containerCode){
  486. // this.$message.error('第'+(i+1)+'行集装箱代号未填,无法保存!');
  487. // return
  488. // }
  489. // if(row.containerNumber === '' || !row.containerNumber){
  490. // this.$message.error('第'+(i+1)+'行集装箱号未填,无法保存!');
  491. // return
  492. // }
  493. // }
  494. that.confirmLoading = true;
  495. if (newObj.id == undefined || newObj.id == "" || newObj.id == null){
  496. addPreBook(newObj).then(res => {
  497. that.confirmLoading = false;
  498. if (res.success) {
  499. this.$message.success('新增成功')
  500. this.close()
  501. //清空信息
  502. this.fatherList(); // 调用父组件 查询方法
  503. // this.msgFormSon = {} 清空子表信息
  504. }else{
  505. this.$message.error(res.message)
  506. }
  507. })
  508. }else{
  509. newObj.syLetterDepositItemList.map(item =>{
  510. item.hod = item.preDeliveryDate
  511. delete item.preDeliveryDate
  512. })
  513. editById(newObj).then(res => {
  514. that.confirmLoading = false;
  515. if (res.success) {
  516. this.$message.success('修改成功')
  517. this.close();
  518. this.fatherList() // 调用父组件 查询方法
  519. // this.msgFormSon = {} 清空子表信息
  520. }else{
  521. this.$message.error(res.message)
  522. }
  523. })
  524. }
  525. }
  526. })
  527. // this.getShipmentList() // 刷新发运明细列表
  528. },
  529. close() {
  530. this.$emit('close')
  531. this.visible = false
  532. this.defultMethod = 'add'
  533. this.$refs.form.resetFields()
  534. },
  535. // ------------------------------------------
  536. modalFormOk() {},
  537. aa() {},
  538. // 参照回调
  539. referCallback(dataList){
  540. var subList = this.convertReferToSub(dataList);
  541. var filterList = subList.filter(newItem=>{
  542. return this.addPreBook.syLetterDepositItemList.filter(item=>{
  543. return item.syPreAssembledPackingListItemId === newItem.syPreAssembledPackingListItemId;
  544. }).length == 0;
  545. });
  546. this.addPreBook.syLetterDepositItemList = this.addPreBook.syLetterDepositItemList.concat(filterList);
  547. this.addPreBook.termsOfDeliveryvalue = 'T/T'
  548. this.addPreBook.exchangeEarningsValue = 'FOB'
  549. this.addPreBook.exportPort='宁波'
  550. var dd = moment(new Date()).format('YYYY-MM-DD')
  551. this.$set( this.addPreBook,'shippingOrderDate',dd)
  552. // this.addPreBook.shippingOrderDate = moment(new Date()).format('YYYY-MM-DD')
  553. this.setHeadCalField();
  554. },
  555. // 参照数据转换成子表
  556. convertReferToSub(dataList){
  557. var ret = [];
  558. for (var i=0; i<dataList.length; i++){
  559. var data = dataList[i];
  560. var sub = {
  561. id:"",
  562. syLetterDepositId:"",
  563. preDeliveryDate:data.preDeliveryDate,
  564. clientAbbreviation:data.customerAbbreviation,
  565. syPreAssembledPackingListId:data.id,
  566. syPreAssembledPackingListItemId:data.itemId,
  567. acSetNo:data.acSetNo,
  568. garmentFactory:"",
  569. // hod:"",
  570. styleNo:"",
  571. smallPo:data.smallPo,
  572. itemCode:"",
  573. distributionPoint:data.distributionPoint,
  574. size:data.size,
  575. startingBoxNumber:"",
  576. endCaseNumber:"",
  577. colour:data.colour,
  578. piecesBox:data.piecesBox,
  579. boxNumber:data.boxNumber,
  580. total:data.piecesBox*data.boxNumber,
  581. netWeight:data.totalNetWeight/data.boxNumber,
  582. totalNetWeight:data.totalNetWeight,
  583. grossWeight:data.totalGrossWeight/data.boxNumber,
  584. totalGrossWeight:data.totalGrossWeight,
  585. outerBoxLength:0,
  586. outerBoxWidth:0,
  587. outerBoxHeight:0,
  588. totalVolume:data.totalVolume,
  589. netWeightToo:0,
  590. unitPrice:data.unitPrice,
  591. totalPrice:data.totalPrice,
  592. containerCode:data.containerCode,
  593. containerNumber:data.containerNumber,
  594. custor:data.customer,
  595. itemNumber:data.itemNumber,
  596. preAssembledPackingNo:data.documentNo,
  597. salesman:data.salesman,
  598. salesDepartment:data.salesDepartment,
  599. spurOrSubOrder:data.spurOrSubOrder,
  600. supplier:data.supplier
  601. };
  602. ret.push(sub);
  603. }
  604. return ret;
  605. },
  606. handleValueChange(event) {
  607. },
  608. // 收货人下拉框
  609. consigneeSelectChange(value){
  610. if(value !=null && value !='' &&value != 'undefined'){
  611. var arr = value.split("+");
  612. this.addPreBook.consignee = arr[0]
  613. if(arr.length == 4){
  614. this.addPreBook.consigneeAddress = arr[1]
  615. this.addPreBook.notifyParty = arr[2]
  616. this.addPreBook.notifyPartyAddress = arr[3]
  617. }else{
  618. this.$message.error('收货信息维护有问题,请检查!')
  619. }
  620. }else{
  621. this.addPreBook.consigneeAddress = '';
  622. this.addPreBook.notifyParty = '';
  623. this.addPreBook.notifyPartyAddress = '';
  624. }
  625. },
  626. // 设置表头计算字段
  627. setHeadCalField(){
  628. var money = 0
  629. for (var i=0; i<this.addPreBook.syLetterDepositItemList.length; i++){
  630. money += this.addPreBook.syLetterDepositItemList[i].totalPrice;
  631. }
  632. this.addPreBook.money = money.toFixed(2);
  633. }
  634. },
  635. mounted() {},
  636. // 接收父组件查询方法
  637. props: {
  638. fatherList: {
  639. type: Function,
  640. default: null
  641. }
  642. },
  643. }
  644. </script>
  645. <style lang="less" scoped>
  646. @import '~@assets/less/common.less';
  647. @import '~@assets/less/overwriter.less';
  648. /deep/ .ant-table-thead > tr > th {
  649. text-align: center;
  650. // font-weight: 700;
  651. }
  652. /deep/ .ant-table-tbody {
  653. text-align: center;
  654. }
  655. // /deep/ th.replacecolor {
  656. // background-color: #ccc;
  657. // }
  658. // 抽屉里的card样式
  659. /deep/ .ant-drawer-content {
  660. background-color: #f0f2f5;
  661. }
  662. /deep/ .ant-drawer-body {
  663. padding: 10px;
  664. }
  665. </style>