editShipDetDrawer.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. <template>
  2. <!-- 编辑发运明细 -->
  3. <div id="editShipDetDrawer">
  4. <a-drawer title="编辑" width="89%" placement="right" :closable="true" :visible="visible" @close="handleCancel">
  5. <!-- 主表信息 编辑 :rules="validatorRules"-->
  6. <a-card :bordered="true">
  7. <div class="table-page-search-wrapper">
  8. <a-form-model layout="inline" ref="form" :model="editShipDet">
  9. <!-- 主表信息 填写-->
  10. <a-row :gutter="24">
  11. <a-col :md="6" :sm="8">
  12. <!-- required必填项 disabled 禁用 -->
  13. <a-form-model-item label="单据号" prop="documentNo">
  14. <a-input placeholder="请输入单据号" v-model="editShipDet.documentNo"></a-input>
  15. </a-form-model-item>
  16. </a-col>
  17. <a-col :md="6" :sm="8">
  18. <a-form-model-item label="单据日期" prop="documentDate">
  19. <a-date-picker
  20. placeholder="请选择单据日期"
  21. :format="dateFormat"
  22. style="width:100%;"
  23. v-model="editShipDet.documentDate"
  24. />
  25. </a-form-model-item>
  26. </a-col>
  27. <a-col :md="6" :sm="8">
  28. <a-form-model-item label="客户" prop="customer">
  29. <a-input placeholder="请输入客户" v-model="editShipDet.customer"></a-input>
  30. </a-form-model-item>
  31. </a-col>
  32. <a-col :md="6" :sm="8">
  33. <a-form-model-item label="预发货日期" prop="preDeliveryDate">
  34. <a-date-picker
  35. placeholder="请选择预发货时间"
  36. :format="dateFormat"
  37. style="width:100%;"
  38. v-model="editShipDet.preDeliveryDate"
  39. />
  40. </a-form-model-item>
  41. </a-col>
  42. <a-col :md="6" :sm="8">
  43. <a-form-model-item label="预完工日期" prop="preCompletionDate">
  44. <a-date-picker
  45. placeholder="请选择预完工日期"
  46. :format="dateFormat"
  47. style="width:100%;"
  48. v-model="editShipDet.preCompletionDate"
  49. />
  50. </a-form-model-item>
  51. </a-col>
  52. <!-- <a-col :md="6" :sm="8">
  53. <a-form-model-item label="pack id" prop="packId">
  54. <a-input placeholder="请输入pack id" v-model="editShipDet.packId"></a-input>
  55. </a-form-model-item>
  56. </a-col> -->
  57. <!-- <a-col :md="6" :sm="8">
  58. <a-form-model-item label="分销点" prop="distributionPoint">
  59. <a-input placeholder="请输入分销点" v-model="editShipDet.distributionPoint"></a-input>
  60. </a-form-model-item>
  61. </a-col> -->
  62. <!-- <a-col :md="6" :sm="8">
  63. <a-form-model-item label="数量" prop="todo">
  64. <a-input placeholder="合计" v-model="editShipDet.todo"></a-input>
  65. </a-form-model-item>
  66. </a-col> -->
  67. <!-- <a-col :md="6" :sm="8">
  68. <a-form-model-item label="单价" prop="salesUnitPrice">
  69. <a-input placeholder="销售" v-model="editShipDet.salesUnitPrice"></a-input>
  70. </a-form-model-item>
  71. </a-col> -->
  72. <!-- <a-col :md="6" :sm="8">
  73. <a-form-model-item label="采购/委外订单号" prop="purOrSubOrder">
  74. <a-input placeholder="请输入采购/委外订单号" v-model="editShipDet.purOrSubOrder"></a-input>
  75. </a-form-model-item>
  76. </a-col> -->
  77. <a-col :md="6" :sm="8">
  78. <a-form-model-item label="订单类型" prop="orderType">
  79. <a-input placeholder="请输入订单类型" v-model="editShipDet.orderType"></a-input>
  80. </a-form-model-item>
  81. </a-col>
  82. <!-- <a-col :md="6" :sm="8">
  83. <a-form-model-item label="工厂单价" prop="factoryUnitPrice">
  84. <a-input placeholder="采购/委外单价" v-model="editShipDet.factoryUnitPrice"></a-input>
  85. </a-form-model-item>
  86. </a-col> -->
  87. <a-col :md="6" :sm="8">
  88. <a-form-model-item label="HScode" prop="hsCode">
  89. <a-input placeholder="HScode" v-model="editShipDet.hsCode"></a-input>
  90. </a-form-model-item>
  91. </a-col>
  92. <!-- <a-col :md="6" :sm="8">
  93. <a-form-model-item label="套装件数" prop="numberOfSets">
  94. <a-input placeholder="存货自定义项" v-model="editShipDet.numberOfSets"></a-input>
  95. </a-form-model-item>
  96. </a-col> -->
  97. <a-col :md="6" :sm="8">
  98. <a-form-model-item label="中文品名" prop="chineseName">
  99. <a-input placeholder="请输入中文品名" v-model="editShipDet.chineseName"></a-input>
  100. </a-form-model-item>
  101. </a-col>
  102. <a-col :md="6" :sm="8">
  103. <a-form-model-item label="英文品名" prop="englishProductName">
  104. <a-input placeholder="请输入英文品名" v-model="editShipDet.englishProductName"></a-input>
  105. </a-form-model-item>
  106. </a-col>
  107. <a-col :md="6" :sm="8">
  108. <a-form-model-item label="报关品名" prop="declarationName">
  109. <a-input placeholder="请输入报关品名" v-model="editShipDet.declarationName"></a-input>
  110. </a-form-model-item>
  111. </a-col>
  112. <a-col :md="6" :sm="8">
  113. <a-form-model-item label="成衣工厂" prop="garmentFactory">
  114. <a-input placeholder="请输入成衣工厂" v-model="editShipDet.garmentFactory"></a-input>
  115. </a-form-model-item>
  116. </a-col>
  117. <a-col :md="6" :sm="8">
  118. <a-form-model-item label="整单合计" prop="wholeOrderTotal">
  119. <a-input placeholder="请输入整单合计" v-model="editShipDet.wholeOrderTotal"></a-input>
  120. </a-form-model-item>
  121. </a-col>
  122. <a-col :md="18" :sm="18">
  123. <a-form-model-item label="备注" prop="memo">
  124. <a-input placeholder="请输入备注" v-model="editShipDet.memo"></a-input>
  125. </a-form-model-item>
  126. </a-col>
  127. </a-row>
  128. </a-form-model>
  129. </div>
  130. </a-card>
  131. <!-- 参照订单数据 増行-->
  132. <a-card :bordered="true" style="margin:10px 0 60px 0">
  133. <div class="table-operator">
  134. <a-button type="primary" @click="referOrderDataOpen" icon="ordered-list">参照订单数据</a-button>
  135. <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
  136. </div>
  137. <!-- 子表 :model="form" :rules="validatorRules"-->
  138. <a-spin :spinning="confirmLoading">
  139. <a-form-model ref="formRef">
  140. <a-table
  141. v-if="syShippingDetailsItemList"
  142. bordered
  143. rowKey="id"
  144. :columns="columns"
  145. :data-source="syShippingDetailsItemList"
  146. :loading="loading"
  147. :pagination="ipagination"
  148. :scroll="{ x: 1500 }"
  149. @change="handleTableChange"
  150. >
  151. <!-- 款号 输入框 :rules="rules.itemNumber" -->
  152. <template slot="itemNumber" slot-scope="text, record, index">
  153. <a-form-model-item prop="itemNumber">
  154. <a-input style="width:100%" type="text" v-model="record.itemNumber" />
  155. </a-form-model-item>
  156. </template>
  157. <!-- 发货数量 :rules="rules.shipQuantity"-->
  158. <template slot="shipmentQuantity" slot-scope="text, record, index">
  159. <a-form-model-item prop="shipmentQuantity">
  160. <a-input style="width:100%" type="text" v-model="record.shipmentQuantity" />
  161. </a-form-model-item>
  162. </template>
  163. <!-- 是否TC功能 :rules="rules.isTC"-->
  164. <!-- isTc ' 是否 tc 功能 0 否 1 是', -->
  165. <template slot="isTC" slot-scope="text, record, index">
  166. <a-form-model-item prop="isTc">
  167. <a-select v-model="record.isTc">
  168. <a-select-option value="">请选择</a-select-option>
  169. <a-select-option :value="1">是</a-select-option>
  170. <a-select-option :value="0">否</a-select-option>
  171. </a-select>
  172. </a-form-model-item>
  173. </template>
  174. <!-- 物料成分 :rules="rules.materialComposition"-->
  175. <template slot="materialComposition" slot-scope="text, record, index">
  176. <a-form-model-item prop="materialComposition">
  177. <a-input style="width:100%" type="text" v-model="record.materialComposition" />
  178. </a-form-model-item>
  179. </template>
  180. <!-- 采购/委外订单号 :rules="rules.purOrSubOrder"-->
  181. <template slot="purOrSubOrder" slot-scope="text, record, index">
  182. <a-form-model-item prop="purOrSubOrder">
  183. <a-input style="width:100%" type="text" v-model="record.purOrSubOrder" />
  184. </a-form-model-item>
  185. </template>
  186. <!-- 报关单价 :rules="rules.customsDeclarationUnitPrice"-->
  187. <template slot="customsDeclarationUnitPrice" slot-scope="text, record, index">
  188. <a-form-model-item prop="customsDeclarationUnitPrice">
  189. <a-input style="width:100%" type="text" v-model="record.customsDeclarationUnitPrice" />
  190. </a-form-model-item>
  191. </template>
  192. <!-- 套装件数 :rules="rules.numberOfSets"-->
  193. <template slot="numberOfSets" slot-scope="text, record, index">
  194. <a-form-model-item prop="numberOfSets">
  195. <a-input style="width:100%" type="text" v-model="record.numberOfSets" />
  196. </a-form-model-item>
  197. </template>
  198. <!-- 工厂单价 :rules="rules.factoryUnitPrice"-->
  199. <template slot="factoryUnitPrice" slot-scope="text, record, index">
  200. <a-form-model-item prop="factoryUnitPrice">
  201. <a-input style="width:100%" type="text" v-model="record.factoryUnitPrice" />
  202. </a-form-model-item>
  203. </template>
  204. <!-- 申报要素 :rules="rules.declarationElements"-->
  205. <template slot="declarationElements" slot-scope="text, record, index">
  206. <a-form-model-item prop="declarationElements">
  207. <a-input style="width:100%" type="text" v-model="record.declarationElements" />
  208. </a-form-model-item>
  209. </template>
  210. <!--处理方式 -->
  211. <template slot="treatmentMethod" slot-scope="text, record, index">
  212. <a-form-model-item prop="treatmentMethod">
  213. <a-input style="width:100%" type="text" v-model="record.treatmentMethod" />
  214. </a-form-model-item>
  215. </template>
  216. <!--是否手册纱 -->
  217. <template slot="manualYarnFlag" slot-scope="text, record, index">
  218. <a-form-model-item prop="manualYarnFlag">
  219. <a-select v-model="record.manualYarnFlag">
  220. <a-select-option value="">请选择</a-select-option>
  221. <a-select-option :value="1">是</a-select-option>
  222. <a-select-option :value="0">否</a-select-option>
  223. </a-select>
  224. </a-form-model-item>
  225. </template>
  226. <!--手册纱单价 -->
  227. <template slot="manualYarnUnitPrice" slot-scope="text, record, index">
  228. <a-form-model-item prop="manualYarnUnitPrice">
  229. <a-input style="width:100%" type="text" v-model="record.manualYarnUnitPrice" />
  230. </a-form-model-item>
  231. </template>
  232. <!--手册纱占比 -->
  233. <template slot="manualYarnProportion" slot-scope="text, record, index">
  234. <a-form-model-item prop="manualYarnProportion">
  235. <a-input style="width:100%" type="text" v-model="record.manualYarnProportion" />
  236. </a-form-model-item>
  237. </template>
  238. <!-- 操作 -->
  239. <span slot="operationSlot" slot-scope="text, record">
  240. <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
  241. <a href="javascript:void(0);" style="color:red;">删除</a>
  242. </a-popconfirm>
  243. <a-divider type="vertical" />
  244. <a @click="copy(record)">复制</a>
  245. </span>
  246. </a-table>
  247. </a-form-model>
  248. </a-spin>
  249. </a-card>
  250. <!-- 页面底部保存取消 -->
  251. <div
  252. :style="{
  253. position: 'absolute',
  254. right: 0,
  255. bottom: 0,
  256. width: '100%',
  257. borderTop: '1px solid #e9e9e9',
  258. padding: '10px 16px',
  259. background: '#fff',
  260. textAlign: 'right',
  261. zIndex: 1
  262. }"
  263. >
  264. <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
  265. <a-button :style="{ marginRight: '8px' }">取消</a-button>
  266. </a-popconfirm>
  267. <a-button type="primary" @click="editSave">
  268. 保存
  269. </a-button>
  270. </div>
  271. </a-drawer>
  272. <!-- 参照订单数据弹框 -->
  273. <referOrderData-modal ref="referOrderDataModal" @bao="getSon" @ok="referOrderDataOk"></referOrderData-modal>
  274. </div>
  275. </template>
  276. <script>
  277. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  278. import JEllipsis from '@/components/jeecg/JEllipsis'
  279. import moment from 'moment'
  280. import ReferOrderDataModal from '@views/shipment-details/referOrderDataModal.vue'
  281. import { editById } from '@api/document/shipmentList'
  282. export default {
  283. name: 'EditShipDetDrawer', // 编辑 发运明细 抽屉
  284. mixins: [JeecgListMixin], //
  285. components: { JEllipsis, ReferOrderDataModal, moment }, // 参照订单数据 弹框
  286. data() {
  287. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  288. return {
  289. id: '',
  290. // 表头
  291. columns: [
  292. {
  293. title: '账套',
  294. dataIndex: 'account',
  295. width: 80,
  296. fixed: 'left',
  297. className: 'replacecolor'
  298. },
  299. {
  300. title: '订单号',
  301. dataIndex: 'orderNumber',
  302. width: 120,
  303. fixed: 'left',
  304. className: 'replacecolor'
  305. },
  306. {
  307. title: '款号',
  308. dataIndex: 'itemNumber',
  309. scopedSlots: { customRender: 'itemNumber' },
  310. fixed: 'left',
  311. width: 180,
  312. className: 'replacecolor'
  313. },
  314. // {
  315. // title: '创建时间',
  316. // dataIndex: 'createTime',
  317. // align: 'center',
  318. // sorter: true,
  319. // customRender: text => {
  320. // return moment(text).format('YYYY-MM-DD')
  321. // }
  322. // },
  323. {
  324. title: '订单日期',
  325. dataIndex: 'orderDate',
  326. width: 120,
  327. className: 'replacecolor'
  328. },
  329. {
  330. title: '业务类型',
  331. dataIndex: 'businessTypeText',
  332. width: 120,
  333. className: 'replacecolor'
  334. },
  335. {
  336. title: '客户订单',
  337. dataIndex: 'customerOrder',
  338. width: 120,
  339. className: 'replacecolor'
  340. },
  341. {
  342. title: '小po',
  343. dataIndex: 'smallPo',
  344. width: 120,
  345. className: 'replacecolor'
  346. },
  347. {
  348. title: 'Pack Id',
  349. dataIndex: 'packId',
  350. width: 120,
  351. className: 'replacecolor'
  352. },
  353. {
  354. title: '分销点',
  355. dataIndex: 'distributionPoint',
  356. width: 120,
  357. className: 'replacecolor'
  358. },
  359. {
  360. title: '采购/委外订单号',
  361. dataIndex: 'purOrSubOrder',
  362. scopedSlots: { customRender: 'purOrSubOrder' },
  363. // fixed: 'left',
  364. width: 180,
  365. className: 'replacecolor'
  366. },
  367. {
  368. title: ' 报关单价',
  369. dataIndex: 'customsDeclarationUnitPrice',
  370. scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
  371. // fixed: 'left',
  372. width: 180,
  373. className: 'replacecolor'
  374. },
  375. {
  376. title: '订单数量',
  377. dataIndex: 'orderQuantity',
  378. width: 120,
  379. className: 'replacecolor'
  380. },
  381. {
  382. title: '订单剩余数量',
  383. dataIndex: 'orderRemainingQuantity',
  384. width: 120,
  385. className: 'replacecolor'
  386. },
  387. {
  388. title: '发货数量',
  389. dataIndex: 'shipmentQuantity',
  390. scopedSlots: { customRender: 'shipmentQuantity' },
  391. width: 120,
  392. className: 'replacecolor'
  393. },
  394. {
  395. title: '套装件数',
  396. dataIndex: 'numberOfSets',
  397. scopedSlots: { customRender: 'numberOfSets' },
  398. width: 120,
  399. className: 'replacecolor'
  400. },
  401. {
  402. title: '是否TC功能',
  403. dataIndex: 'isTC',
  404. width: 90,
  405. scopedSlots: { customRender: 'isTC' },
  406. className: 'replacecolor'
  407. },
  408. {
  409. title: '物料成分',
  410. dataIndex: 'materialComposition',
  411. scopedSlots: { customRender: 'materialComposition' },
  412. width: 140,
  413. className: 'replacecolor'
  414. },
  415. {
  416. title: '销售类型',
  417. dataIndex: 'salesTypeText',
  418. width: 120,
  419. className: 'replacecolor'
  420. },
  421. {
  422. title: '客户简称',
  423. dataIndex: 'customerAbbreviation',
  424. width: 120,
  425. className: 'replacecolor'
  426. },
  427. {
  428. title: '客户名称',
  429. dataIndex: 'customerName',
  430. width: 120,
  431. className: 'replacecolor'
  432. },
  433. {
  434. title: '汇率',
  435. dataIndex: 'exchangeRate',
  436. width: 120,
  437. className: 'replacecolor'
  438. },
  439. // {
  440. // title: '整单(合计)',
  441. // dataIndex: 'wholeOrderTotal',
  442. // width: 120,
  443. // className: 'replacecolor'
  444. // },
  445. {
  446. title: '销售部门',
  447. dataIndex: 'salesDepartment',
  448. width: 120,
  449. className: 'replacecolor'
  450. },
  451. {
  452. title: '业务员',
  453. dataIndex: 'salesman',
  454. width: 120,
  455. className: 'replacecolor'
  456. },
  457. {
  458. title: '币种',
  459. dataIndex: 'currencyText',
  460. width: 120,
  461. className: 'replacecolor'
  462. },
  463. {
  464. title: '品牌方',
  465. dataIndex: 'brandSide',
  466. width: 120,
  467. className: 'replacecolor'
  468. },
  469. {
  470. title: '第三方',
  471. dataIndex: 'thirdParty',
  472. width: 120,
  473. className: 'replacecolor'
  474. },
  475. {
  476. title: '定金比例(%)',
  477. dataIndex: 'depositRatio',
  478. width: 120,
  479. className: 'replacecolor'
  480. },
  481. {
  482. title: '定金',
  483. dataIndex: 'deposit',
  484. width: 120,
  485. className: 'replacecolor'
  486. },
  487. {
  488. title: '协同路线',
  489. dataIndex: 'collaborativeRoute',
  490. width: 120,
  491. className: 'replacecolor'
  492. },
  493. {
  494. title: '单价(销售)',
  495. dataIndex: 'salesUnitPrice',
  496. width: 120,
  497. className: 'replacecolor'
  498. },
  499. {
  500. title: '工厂单价',
  501. dataIndex: 'factoryUnitPrice',
  502. width: 120,
  503. scopedSlots: { customRender: 'factoryUnitPrice' },
  504. className: 'replacecolor'
  505. },
  506. {
  507. title: '付款条件',
  508. dataIndex: 'termOfPayment',
  509. width: 160,
  510. customRender: t => ellipsis(t),
  511. className: 'replacecolor'
  512. },
  513. {
  514. title: '最终客户',
  515. dataIndex: 'endCustomer',
  516. width: 120,
  517. className: 'replacecolor'
  518. },
  519. {
  520. title: '订单备注',
  521. dataIndex: 'orderRemarks',
  522. width: 160,
  523. customRender: t => ellipsis(t),
  524. className: 'replacecolor'
  525. },
  526. {
  527. title: '申报要素',
  528. dataIndex: 'declarationElements',
  529. width: 160,
  530. scopedSlots: { customRender: 'declarationElements' },
  531. className: 'replacecolor'
  532. },
  533. {
  534. title: '价格备注',
  535. dataIndex: 'priceRemarks',
  536. width: 160,
  537. customRender: t => ellipsis(t),
  538. className: 'replacecolor'
  539. },
  540. {
  541. title: '订单变更说明',
  542. dataIndex: 'orderChangeDescription',
  543. width: 160,
  544. customRender: t => ellipsis(t),
  545. className: 'replacecolor'
  546. },
  547. {
  548. title: '订单子表ID',
  549. dataIndex: 'syOrderDataItemId',
  550. width: 160,
  551. className: 'replacecolor'
  552. },
  553. {
  554. title: '处理方式',
  555. dataIndex: 'treatmentMethod',
  556. width: 160,
  557. scopedSlots: { customRender: 'treatmentMethod' },
  558. className: 'replacecolor'
  559. },
  560. {
  561. title: '是否手册纱',
  562. dataIndex: 'manualYarnFlag',
  563. width: 100,
  564. scopedSlots: { customRender: 'manualYarnFlag' },
  565. className: 'replacecolor'
  566. },
  567. {
  568. title: '手册纱单价',
  569. dataIndex: 'manualYarnUnitPrice',
  570. width: 160,
  571. scopedSlots: { customRender: 'manualYarnUnitPrice' },
  572. className: 'replacecolor'
  573. },
  574. {
  575. title: '手册纱占比',
  576. dataIndex: 'manualYarnProportion',
  577. width: 120,
  578. scopedSlots: { customRender: 'manualYarnProportion' },
  579. className: 'replacecolor'
  580. },
  581. {
  582. title: '操作',
  583. dataIndex: 'operation',
  584. scopedSlots: { customRender: 'operationSlot' },
  585. width: 220,
  586. fixed: 'right',
  587. className: 'replacecolor'
  588. }
  589. ],
  590. msgFormSon: 'test', // 子组件传来数据的变量
  591. syShippingDetailsItemList: [], // 子表信息
  592. editShipDet: {}, // 编辑发运明细
  593. visible: false,
  594. confirmLoading: false,
  595. dateFormat: 'YYYY-MM-DD'
  596. }
  597. },
  598. // 接收父组件查询方法
  599. props: {
  600. fatherList: {
  601. type: Function,
  602. default: null
  603. }
  604. },
  605. created() {},
  606. methods: {
  607. getSon(val) {
  608. console.log('val', val)
  609. this.msgFormSon = val
  610. this.syShippingDetailsItemList = this.msgFormSon
  611. console.log('编辑页 子表信息', this.syShippingDetailsItemList)
  612. },
  613. // 编辑 保存
  614. editSave() {
  615. console.log('提交编辑、刷新发运明细列表')
  616. editById(this.editShipDet).then(res => {
  617. if (res.success) {
  618. this.$message.success('编辑成功')
  619. this.close()
  620. this.fatherList() // 调用父组件的查询方法
  621. }
  622. })
  623. },
  624. // 参照订单数据
  625. referOrderDataOpen() {
  626. console.log('打开参照订单数据')
  627. this.$refs.referOrderDataModal.referOrderDataModVis = true
  628. },
  629. // 増行
  630. handleAddColumn() {
  631. console.log('増行')
  632. const addrow = {
  633. acSetNo: '',
  634. orderNumber: '',
  635. itemNumber: '',
  636. orderDate: '',
  637. businessType: '',
  638. customerOrder: '',
  639. smallPo: '',
  640. packId: '',
  641. orderData: '',
  642. orderRemaQuantity: '',
  643. shipQuantity: '',
  644. isTC: '',
  645. materialComposition: '',
  646. saleType: '',
  647. customerShortName: '',
  648. customerName: '',
  649. exchangeRate: '',
  650. wholeSingleCombined: '',
  651. salesDepartment: '',
  652. salesman: '',
  653. currency: '',
  654. brand: '',
  655. thirdParty: '',
  656. depositRate: '',
  657. deposit: '',
  658. collaborativeRoute: '',
  659. paymentClause: '',
  660. finalCustomer: '',
  661. orderNote: '',
  662. priceNote: '',
  663. orderChangeDesc: '',
  664. operation: ''
  665. }
  666. this.syShippingDetailsItemList.push(addrow)
  667. },
  668. // --------------------------------------
  669. // 操作 删除
  670. handleDelete(index) {
  671. console.log('index', index)
  672. console.log('删除该项订单数据', index)
  673. return this.syShippingDetailsItemList.splice(index, 1)
  674. },
  675. // 操作 复制
  676. copy(record) {},
  677. // --------------------------------------
  678. // 抽屉 取消
  679. handleCancel() {
  680. console.log('点击抽屉取消')
  681. this.close()
  682. },
  683. close() {
  684. this.$emit('close')
  685. this.visible = false
  686. this.$refs.form.resetFields()
  687. },
  688. // --------------------------------------
  689. // 分页、排序、筛选变化时触发
  690. // handleTableChange(pagination, filters, sorter) {
  691. // // console.log('当前页信息>>>>',pagination)
  692. // this.queryParam.pageNo = pagination.current
  693. // // this.getAnnList()
  694. // },
  695. // 参照订单数据弹框 ok-------------------------------------
  696. referOrderDataOk() {
  697. console.log('参照订单数据弹框确定')
  698. this.$refs.referOrderDataModal.referOrderDataModVis = false
  699. },
  700. // father
  701. aa() {}
  702. },
  703. computed: {},
  704. mounted() {}
  705. }
  706. </script>
  707. <style lang="less" scoped>
  708. @import '~@assets/less/common.less';
  709. /deep/ .ant-table-thead > tr > th {
  710. text-align: center;
  711. // font-weight: 700;
  712. }
  713. /deep/ .ant-table-tbody {
  714. text-align: center;
  715. }
  716. // /deep/ th.replacecolor {
  717. // background-color: #ccc;
  718. // }
  719. // 抽屉里的card样式
  720. /deep/ .ant-drawer-content {
  721. background-color: #f0f2f5;
  722. }
  723. /deep/ .ant-drawer-body {
  724. padding: 10px;
  725. }
  726. </style>