clothesAddDrawer.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261
  1. <template>
  2. <!-- 新增成衣 -->
  3. <div id="clothesAddDrawer">
  4. <a-drawer
  5. :title="(editDecide == 'add')?'新增成衣':'编辑成衣'"
  6. width="89%"
  7. placement="right"
  8. :closable="true"
  9. :visible="visible"
  10. @close="handleCancel">
  11. <!-- 主表信息 填写-->
  12. <a-card :bordered="true">
  13. <div class="table-page-search-wrapper">
  14. <a-form-model layout="inline" ref="formModel" :model="clothesAdd" :rules="validatorRules">
  15. <a-row :gutter="24">
  16. <a-col :md="6" :sm="8">
  17. <a-form-model-item label="订单号" prop="orderNum">
  18. {{clothesAdd.orderNum}}
  19. <!-- <a-input placeholder="请输入订单号" v-model="clothesAdd.orderNum" readOnly></a-input> -->
  20. </a-form-model-item>
  21. </a-col>
  22. <a-col :md="6" :sm="8">
  23. <a-form-model-item label="款号" prop="styleNum">
  24. {{clothesAdd.styleNum}}
  25. <!-- <a-input placeholder="请输入款号" v-model="clothesAdd.styleNum" readOnly></a-input> -->
  26. </a-form-model-item>
  27. </a-col>
  28. <a-col :md="6" :sm="8">
  29. <a-form-model-item label="中文品名" prop="name">
  30. {{clothesAdd.name}}
  31. <!-- <a-input placeholder="请输入中文品名" v-model="clothesAdd.name"></a-input> -->
  32. </a-form-model-item>
  33. </a-col>
  34. <a-col :md="6" :sm="8">
  35. <a-form-model-item label="英文品名" prop="englishProductName">
  36. {{clothesAdd.englishProductName}}
  37. <!-- <a-input placeholder="请输入英文品名" v-model="clothesAdd.englishProductName"></a-input> -->
  38. </a-form-model-item>
  39. </a-col>
  40. <a-col :md="6" :sm="8">
  41. <a-form-model-item label="尺码范围" prop="sizeRange">
  42. {{clothesAdd.sizeRange}}
  43. <!-- <a-input placeholder="请输入尺码范围" v-model="clothesAdd.sizeRange" readOnly></a-input> -->
  44. <!-- <a-select placeholder="请选择尺码范围">
  45. <a-select-option value="">请选择</a-select-option>
  46. <a-select-option value="0">客户1</a-select-option>
  47. <a-select-option value="1">客户2</a-select-option>
  48. <a-select-option value="2">客户3</a-select-option>
  49. </a-select> -->
  50. </a-form-model-item>
  51. </a-col>
  52. <a-col :md="6" :sm="8">
  53. <a-form-model-item label="客户" prop="customer" :title="clothesAdd.customer">
  54. {{clothesAdd.customer | ellipsis}}
  55. <!-- <a-input placeholder="请输入客户" v-model="clothesAdd.customer" ></a-input> -->
  56. </a-form-model-item>
  57. </a-col>
  58. <a-col :md="6" :sm="8">
  59. <a-form-model-item label="集装箱代号" prop="containerCode">
  60. {{clothesAdd.containerCode}}
  61. <!-- <a-input placeholder="请输入集装箱代号" v-model="clothesAdd.containerCode" readOnly></a-input> -->
  62. </a-form-model-item>
  63. </a-col>
  64. <a-col :md="6" :sm="8">
  65. <a-form-model-item label="集装箱号" prop="containerNo">
  66. {{clothesAdd.containerNo}}
  67. <!-- <a-input placeholder="请输入集装箱号" v-model="clothesAdd.containerNo" readOnly></a-input> -->
  68. </a-form-model-item>
  69. </a-col>
  70. <a-col :md="6" :sm="8">
  71. <a-form-model-item label="备注" prop="note">
  72. <a-input placeholder="请输入备注" v-model="clothesAdd.note"></a-input>
  73. </a-form-model-item>
  74. </a-col>
  75. <!-- <a-col :md="6" :sm="8">
  76. <a-form-model-item label="成衣工厂" prop="clothesFactory">
  77. <a-input placeholder="请输入成衣工厂" v-model="clothesAdd.clothesFactory"></a-input>
  78. </a-form-model-item>
  79. </a-col> -->
  80. <a-col :md="6" :sm="8">
  81. <a-form-model-item label="外销发票号" prop="exportInvoiceNo">
  82. {{clothesAdd.exportInvoiceNo}}
  83. <!-- <a-input placeholder="请输入外销发票号" v-model="clothesAdd.exportInvoiceNo"></a-input> -->
  84. </a-form-model-item>
  85. </a-col>
  86. <a-col :md="6" :sm="8">
  87. <a-form-model-item label="托书号" prop="bookNum">
  88. {{clothesAdd.shippingOrderNumber}}
  89. <!-- <a-input placeholder="请输入托书号" v-model="clothesAdd.bookNum" readOnly></a-input> -->
  90. </a-form-model-item>
  91. </a-col>
  92. <a-col :md="6" :sm="8">
  93. <a-form-model-item label="总箱数" prop="totalBoxes">
  94. {{clothesAdd.totalBoxes}}
  95. <!-- <a-input placeholder="请输入总箱数" v-model="clothesAdd.totalBoxes" readOnly></a-input> -->
  96. </a-form-model-item>
  97. </a-col>
  98. <a-col :md="6" :sm="8">
  99. <a-form-model-item label="总毛重" prop="totalGrossWeight">
  100. {{clothesAdd.totalGrossWeight}}
  101. <!-- <a-input placeholder="请输入总毛重" v-model="clothesAdd.totalGrossWeight" readOnly></a-input> -->
  102. </a-form-model-item>
  103. </a-col>
  104. <a-col :md="6" :sm="8">
  105. <a-form-model-item label="总净重" prop="totalNetWeight">
  106. {{clothesAdd.totalNetWeight}}
  107. <!-- <a-input placeholder="请输入总净重" v-model="clothesAdd.totalNetWeight" readOnly></a-input> -->
  108. </a-form-model-item>
  109. </a-col>
  110. <a-col :md="6" :sm="8">
  111. <a-form-model-item label="总体积" prop="totalVolume">
  112. {{clothesAdd.totalVolume}}
  113. <!-- <a-input placeholder="请输入总体积" v-model="clothesAdd.totalVolume" readOnly></a-input> -->
  114. </a-form-model-item>
  115. </a-col>
  116. <!-- <a-col :md="6" :sm="8">
  117. <a-form-model-item label="总价" prop="totalPrice">
  118. <a-input placeholder="请输入总价" v-model="clothesAdd.totalPrice"></a-input>
  119. </a-form-model-item>
  120. </a-col> -->
  121. <a-col :md="6" :sm="8">
  122. <a-form-model-item label="总件数" prop="total">
  123. {{clothesAdd.total}}
  124. <!-- <a-input placeholder="请输入总件数" v-model="clothesAdd.total" readOnly></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="referadvancePackingList" icon="ordered-list">参照预装箱单</a-button>
  135. </div> -->
  136. <!-- 子表 :pagination="ipagination" -->
  137. <a-spin :spinning="confirmLoading">
  138. <a-form-model ref="formRef">
  139. <a-table
  140. bordered
  141. :row-dataIndex ="record => record.id"
  142. :columns="clothesAddColumns"
  143. :data-source="clothesAddData"
  144. :loading="loading"
  145. :pagination="ipagination"
  146. :scroll="{ x: 1500,y: 350 }"
  147. @change="handleTableChange"
  148. >
  149. <!-- 自定义表头 -->
  150. <span slot="startingBoxNumberTitle" class="form-table-heard">
  151. 起始箱号
  152. </span>
  153. <span slot="endCaseNumberTitle" class="form-table-heard">
  154. 结束箱号
  155. </span>
  156. <span slot="netWeightTitle" class="form-table-heard">
  157. 净重/箱
  158. </span>
  159. <span slot="grossWeightTitle" class="form-table-heard">
  160. 毛重/箱
  161. </span>
  162. <span slot="outerBoxLengthTitle" class="form-table-heard">
  163. 外箱长度
  164. </span>
  165. <span slot="outerBoxWidthTitle" class="form-table-heard">
  166. 外箱宽度
  167. </span>
  168. <span slot="outerBoxHeightTitle" class="form-table-heard">
  169. 外箱高度
  170. </span>
  171. <span slot="boxNumberTitle" class="form-table-heard">
  172. 箱数
  173. </span>
  174. <!-- <span slot="netWeightTooTitle" class="form-table-heard">
  175. 净净重
  176. </span> -->
  177. <!-- prepackSku -->
  178. <template slot="prepackSku" slot-scope="text, record, index">
  179. <a-form-model-item prop="prepackSku" :rules="rules.prepackSku">
  180. <a-input style="width:100%" type="text" v-model="record.prepackSku" />
  181. </a-form-model-item>
  182. </template>
  183. <!-- 起始箱号 -->
  184. <template slot="startingBoxNumber" slot-scope="text, record, index">
  185. <a-form-model-item prop="startingBoxNumber" :rules="rules.startingBoxNumber">
  186. <a-input style="width:100%" type="text" v-model="record.startingBoxNumber" @change="handleValueChange(record)"/>
  187. </a-form-model-item>
  188. </template>
  189. <!-- 结束箱号 -->
  190. <template slot="endCaseNumber" slot-scope="text, record, index">
  191. <a-form-model-item prop="endCaseNumber" :rules="rules.endCaseNumber">
  192. <a-input style="width:100%" type="text" v-model="record.endCaseNumber" @change="handleValueChange(record)"/>
  193. </a-form-model-item>
  194. </template>
  195. <!-- 净重 -->
  196. <template slot="netWeight" slot-scope="text, record, index">
  197. <a-form-model-item prop="netWeight" :rules="rules.netWeight">
  198. <a-input style="width:100%" type="text" v-model="record.netWeight" @change="handleValueChange(record)"/>
  199. </a-form-model-item>
  200. </template>
  201. <!-- 毛重 -->
  202. <template slot="grossWeight" slot-scope="text, record, index">
  203. <a-form-model-item prop="grossWeight" :rules="rules.grossWeight">
  204. <a-input style="width:100%" type="text" v-model="record.grossWeight" @change="handleValueChange(record)"/>
  205. </a-form-model-item>
  206. </template>
  207. <!-- 外箱长度 -->
  208. <template slot="outerBoxLength" slot-scope="text, record, index">
  209. <a-form-model-item prop="outerBoxLength" :rules="rules.outerBoxLength">
  210. <a-input style="width:100%" type="text" v-model="record.outerBoxLength" @change="handleValueChange(record)"/>
  211. </a-form-model-item>
  212. </template>
  213. <!-- 外箱宽度 -->
  214. <template slot="outerBoxWidth" slot-scope="text, record, index">
  215. <a-form-model-item prop="outerBoxWidth" :rules="rules.outerBoxWidth">
  216. <a-input style="width:100%" type="text" v-model="record.outerBoxWidth" @change="handleValueChange(record)" />
  217. </a-form-model-item>
  218. </template>
  219. <!-- 外箱高度 -->
  220. <template slot="outerBoxHeight" slot-scope="text, record, index">
  221. <a-form-model-item prop="outerBoxHeight" :rules="rules.outerBoxHeight">
  222. <a-input style="width:100%" type="text" v-model="record.outerBoxHeight" @change="handleValueChange(record)" />
  223. </a-form-model-item>
  224. </template>
  225. <!-- 净净重 -->
  226. <template slot="netWeightToo" slot-scope="text, record, index">
  227. <a-form-model-item prop="netWeightToo" :rules="rules.netWeightToo">
  228. <a-input style="width:100%" type="text" v-model="record.netWeightToo" @change="handleValueChange(record)"/>
  229. </a-form-model-item>
  230. </template>
  231. <!-- 尺码字段 -->
  232. <template v-for="i in inputName" :slot="i" slot-scope="text, record, index">
  233. <a-form-model-item prop="i" :rules="rules.i" :key="i">
  234. <a-input style="width:100%" type="text" v-model="record[i]" @change="handleValueChange(record)"/>
  235. </a-form-model-item>
  236. </template>
  237. <!-- 操作 -->
  238. <span slot="operation" slot-scope="text, record,index">
  239. <a @click="copy(record)">复制</a>
  240. <a-divider type="vertical"/>
  241. <a-popconfirm title="确定删除吗?" @confirm="handleDelete(record)">
  242. <a>删除</a>
  243. </a-popconfirm>
  244. </span>
  245. </a-table>
  246. <!-- <j-vxe-table
  247. ref="vTable"
  248. toolbar
  249. row-number
  250. row-selection
  251. drag-sort
  252. keep-source
  253. :height="350"
  254. :loading="loading"
  255. :dataSource="clothesAddData"
  256. :columns="clothesAddColumns"
  257. :alwaysEdit=true
  258. :bordered=true
  259. :scroll="{ x: 1500,y: 350 }"
  260. style="margin-top: 5px;"
  261. :toolbarConfig="toolbarConfig"
  262. @valueChange="handleValueChange"
  263. > -->
  264. <!-- 起始箱号 -->
  265. <!-- <template v-slot:startingBoxNumber="record" >
  266. <a-input v-model="record.row.startingBoxNumber" style="border-color: red;"></a-input>
  267. </template> -->
  268. <!-- 结束箱号 -->
  269. <!-- <template v-slot:endCaseNumber="record" >
  270. <a-input v-model="record.row.endCaseNumber" style="border-color: red;"></a-input>
  271. </template> -->
  272. <!-- 净重/箱 -->
  273. <!-- <template v-slot:netWeight="record" >
  274. <a-input v-model="record.row.netWeight" style="border-color: red;"></a-input>
  275. </template> -->
  276. <!-- 毛重/箱 -->
  277. <!-- <template v-slot:grossWeight="record" >
  278. <a-input v-model="record.row.grossWeight" style="border-color: red;"></a-input>
  279. </template> -->
  280. <!-- 外箱长度 -->
  281. <!-- <template v-slot:outerBoxLength="record" >
  282. <a-input v-model="record.row.outerBoxLength" style="border-color: red;"></a-input>
  283. </template> -->
  284. <!-- 外箱高度 -->
  285. <!-- <template v-slot:outerBoxHeight="record" >
  286. <a-input v-model="record.row.outerBoxHeight" style="border-color: red;"></a-input>
  287. </template> -->
  288. <!-- 外箱宽度 -->
  289. <!-- <template v-slot:outerBoxWidth="record" >
  290. <a-input v-model="record.row.outerBoxWidth" style="border-color: red;"></a-input>
  291. </template> -->
  292. <!-- 箱数 -->
  293. <!-- <template v-slot:boxNumber="record" >
  294. <a-input v-model="record.row.boxNumber" style="border-color: red;"></a-input>
  295. </template> -->
  296. <!-- 净净重 -->
  297. <!-- <template v-slot:netWeightToo="record" >
  298. <a-input v-model="record.row.netWeightToo" style="border-color: red;"></a-input>
  299. </template>
  300. <template v-slot:action="props">
  301. <a @click="copy(props)">复制</a>
  302. <a-divider type="vertical"/>
  303. <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
  304. <a>删除</a>
  305. </a-popconfirm>
  306. </template>
  307. <template v-slot:toolbarSuffix>
  308. <a-button type="primary" @click="referadvancePackingList" icon="ordered-list">参照预装箱单</a-button>
  309. </template>
  310. </j-vxe-table> -->
  311. </a-form-model>
  312. </a-spin>
  313. </a-card>
  314. <!-- 页面底部提交取消 -->
  315. <div
  316. :style="{
  317. position: 'absolute',
  318. right: 0,
  319. bottom: 0,
  320. width: '100%',
  321. borderTop: '1px solid #e9e9e9',
  322. padding: '10px 16px',
  323. background: '#fff',
  324. textAlign: 'right',
  325. zIndex: 999
  326. }"
  327. >
  328. <a-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
  329. <a-button :style="{ marginRight: '8px' }">取消</a-button>
  330. </a-popconfirm>
  331. <a-button type="primary" @click="submitAdd" v-preventReClick="2000">
  332. 保存
  333. </a-button>
  334. </div>
  335. </a-drawer>
  336. <!-- 参照预装箱单 -->
  337. <reference-pre-packlist ref="ReferencePrePacklist" @callback='referCallback' :father="aa" @ok="modalFormOk"></reference-pre-packlist>
  338. </div>
  339. </template>
  340. <script>
  341. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  342. import { JVXETypes } from '@/components/jeecg/JVxeTable'
  343. import JEllipsis from '@/components/jeecg/JEllipsis'
  344. import ReferencePrePacklist from '@views/packing-list/packinglist-clothes/referencePrePacklist'
  345. import { orderSpltListId,addSpltList,editSpltList } from '@api/document/packing-list/packinglist-clothes.js'
  346. export default {
  347. name: 'ClothesAddDrawer', // 新增-装箱单 -成衣
  348. mixins: [JeecgListMixin],
  349. computed: {},
  350. components: { ReferencePrePacklist, JEllipsis }, // 参照预装箱单 弹框
  351. data() {
  352. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  353. return {
  354. toolbarConfig: {
  355. // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮
  356. btn: []
  357. },
  358. inputName:[],
  359. // 表头
  360. clothesAddColumns: [
  361. {
  362. title: '账套',
  363. dataIndex: 'acSetNo',
  364. width: 100,
  365. // fixed: 'left',
  366. className: 'replacecolor',
  367. ellipsis: true,
  368. },
  369. {
  370. title: '成衣工厂',
  371. dataIndex: 'garmentFactory',
  372. width: 120,
  373. // fixed: 'left',
  374. className: 'replacecolor',
  375. ellipsis: true,
  376. },
  377. {
  378. title: 'HOD',
  379. dataIndex: 'hod',
  380. width: 120,
  381. className: 'replacecolor',
  382. ellipsis: true,
  383. },
  384. {
  385. title: 'STYLE NO.',
  386. dataIndex: 'styleNo',
  387. width: 120,
  388. className: 'replacecolor',
  389. ellipsis: true,
  390. },
  391. {
  392. title: 'PO NO.',
  393. dataIndex: 'poNo',
  394. width: 90,
  395. className: 'replacecolor',
  396. ellipsis: true,
  397. },
  398. {
  399. title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
  400. dataIndex: 'itemCode',
  401. width: 340,
  402. className: 'replacecolor',
  403. ellipsis: true,
  404. },
  405. {
  406. title: 'PREPACK SKU',
  407. dataIndex: 'prepackSku',
  408. width: 200,
  409. className: 'replacecolor',
  410. scopedSlots: { customRender: 'prepackSku' },
  411. ellipsis: true,
  412. },
  413. {
  414. title: '分销点/DC/LABEL',
  415. dataIndex: 'distributionPoint',
  416. width: 200,
  417. className: 'replacecolor',
  418. insertAfter:true,
  419. ellipsis: true,
  420. },
  421. {
  422. // title: '起始箱号',
  423. dataIndex: 'startingBoxNumber',
  424. className: 'replacecolor',
  425. scopedSlots: { customRender: 'startingBoxNumber' } ,
  426. slots:{title:'startingBoxNumberTitle'} ,
  427. width: 120,
  428. ellipsis: true,
  429. },
  430. {
  431. // title: '结束箱号',
  432. dataIndex: 'endCaseNumber',
  433. width: 120,
  434. className: 'replacecolor',
  435. scopedSlots: { customRender: 'endCaseNumber' } ,
  436. slots:{title:'endCaseNumberTitle'},
  437. ellipsis: true,
  438. },
  439. {
  440. title: '颜色(中英文)',
  441. dataIndex: 'colour',
  442. width: 140,
  443. className: 'replacecolor',
  444. ellipsis: true,
  445. },
  446. {
  447. title: '配码',
  448. dataIndex: 'withCode',
  449. width: 120,
  450. className: 'replacecolor',
  451. ellipsis: true,
  452. },
  453. {
  454. title: '件数/箱',
  455. dataIndex: 'piecesBox',
  456. width: 100,
  457. // type: JVXETypes.normal
  458. },
  459. {
  460. // title: '箱数',
  461. dataIndex: 'boxNumber',
  462. width: 120,
  463. className: 'replacecolor',
  464. scopedSlots: { customRender: 'boxNumber' } ,
  465. slots:{title:'boxNumberTitle'}
  466. },
  467. {
  468. title: '计划尺码数量',
  469. dataIndex: 'planSize',
  470. width: 180,
  471. className: 'replacecolor',
  472. customRender: t => ellipsis(t),
  473. },
  474. {
  475. title: '计划装箱数量',
  476. dataIndex: 'planQuantity',
  477. width: 180,
  478. className: 'replacecolor'
  479. },
  480. {
  481. title: '总件数',
  482. dataIndex: 'total',
  483. width: 90,
  484. className: 'replacecolor'
  485. },
  486. {
  487. // title: '净重/箱',
  488. dataIndex: 'netWeight',
  489. width: 120,
  490. className: 'replacecolor',
  491. scopedSlots: { customRender: 'netWeight' } ,
  492. slots:{title:'netWeightTitle'}
  493. },
  494. {
  495. title: '总净重',
  496. dataIndex: 'totalNetWeight',
  497. width: 90,
  498. className: 'replacecolor'
  499. },
  500. {
  501. // title: '毛重/箱',
  502. dataIndex: 'grossWeight',
  503. width: 120,
  504. className: 'replacecolor',
  505. scopedSlots: { customRender: 'grossWeight' } ,
  506. slots:{title:'grossWeightTitle'}
  507. },
  508. {
  509. title: '总毛重',
  510. dataIndex: 'totalGrossWeight',
  511. width: 90,
  512. className: 'replacecolor'
  513. },
  514. {
  515. // title: '外箱长度',
  516. dataIndex: 'outerBoxLength',
  517. width: 120,
  518. className: 'replacecolor',
  519. scopedSlots: { customRender: 'outerBoxLength' } ,
  520. slots:{title:'outerBoxWidthTitle'}
  521. },
  522. {
  523. // title: '外箱宽度',
  524. dataIndex: 'outerBoxWidth',
  525. width: 120,
  526. className: 'replacecolor',
  527. scopedSlots: { customRender: 'outerBoxWidth' } ,
  528. slots:{title:'outerBoxWidthTitle'}
  529. },
  530. {
  531. // title: '外箱高度',
  532. dataIndex: 'outerBoxHeight',
  533. width: 120,
  534. className: 'replacecolor',
  535. scopedSlots: { customRender: 'outerBoxHeight' } ,
  536. slots:{title:'outerBoxWidthTitle'}
  537. },
  538. {
  539. title: '总体积',
  540. dataIndex: 'totalVolume',
  541. width: 100,
  542. className: 'replacecolor'
  543. },
  544. {
  545. title: '净净重',
  546. dataIndex: 'netWeightToo',
  547. width: 120,
  548. className: 'replacecolor',
  549. scopedSlots: { customRender: 'netWeightToo' } ,
  550. },
  551. // {
  552. // title: '单价',
  553. // dataIndex: 'unitPrice',
  554. // width: 120,
  555. // className: 'replacecolor'
  556. // },
  557. // {
  558. // title: '总价',
  559. // dataIndex: 'totalPrice',
  560. // width: 120,
  561. // className: 'replacecolor'
  562. // },
  563. {
  564. title: '备注',
  565. dataIndex: 'remarks',
  566. width: 140,
  567. // fixed: 'right',
  568. className: 'replacecolor',
  569. scopedSlots: { customRender: 'remarks' } ,
  570. ellipsis: true,
  571. },
  572. {
  573. title: '操作',
  574. dataIndex: 'operation',
  575. className: 'replacecolor',
  576. width: 160,
  577. fixed: 'right',
  578. align: 'center',
  579. scopedSlots: { customRender: 'operation' } ,
  580. }
  581. ],
  582. clothesAddData: [],
  583. judge:0,
  584. loading: false, // 表格加载
  585. clothesAdd: {},
  586. pagination: {
  587. // total: '',
  588. // current: 0,
  589. // pageSize: 0
  590. },
  591. editDecide:'add',
  592. visible: false,
  593. sizeFields:[], // 尺码字段
  594. confirmLoading: false,
  595. validatorRules: {
  596. // orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
  597. // styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
  598. // name: [{ required: true, message: '中文品名不能为空', trigger: 'blur' }],
  599. // // englishProductName: [{ required: true, message: '英文品名不能为空', trigger: 'blur' }],
  600. // // sizeRange: [{ required: true, message: '品名不能为空', trigger: 'blur' }],
  601. // // sizeRange
  602. // // 待确定还有哪些必填信息
  603. }
  604. // dateFormat: 'YYYY-MM-DD'
  605. }
  606. },
  607. // 接收父组件查询方法
  608. props: {
  609. fatherList: {
  610. type: Function,
  611. default: null
  612. }
  613. },
  614. created() {},
  615. mounted() {},
  616. methods: {
  617. // 参照回调
  618. referCallback(idArr){
  619. this.clothesAdd = {}
  620. this.clothesAddData = []
  621. this.sizeFields = []
  622. var preId = idArr[0]
  623. orderSpltListId({id:preId}).then(res => {
  624. var data = res.result
  625. if (res.success) {
  626. this.clothesAdd = {
  627. documentNo:data.documentNo,
  628. orderNum: data.orderNumber,
  629. styleNum: data.itemNumber,
  630. name: data.productName,
  631. englishProductName:data.englishProductName,
  632. sizeRange: data.sizeRange,
  633. customer: data.customer,
  634. containerCode: data.containerCode,
  635. containerNo: data.containerNumber,
  636. note: data.u8Remarks,
  637. // clothesFactory: data.garmentFactory,
  638. exportInvoiceNo: data.exportInvoiceNo,
  639. bookNum: data.shippingOrderNumber,
  640. syPreAssembledPackingListId:data.syPreAssembledPackingListId,
  641. elementsId:data.elementsId,
  642. business_Type_Value:data.business_Type_Value,
  643. salesman:data.salesman,
  644. salesDepartment:data.salesDepartment,
  645. ompoId:data.ompoId,
  646. purchase:data.purchase,
  647. customerAbbreviation:data.customerAbbreviation,
  648. depositaryReceiptNo:data.depositaryReceiptNo
  649. }
  650. this.setHeadCalField(data.syPackingListTailoringItemList)
  651. this.dynamicColumns(data.sizeTables)
  652. this.clothesAddData = data.syPackingListTailoringItemList
  653. this.clothesAddData.map(item =>{
  654. var str =item.hod
  655. var n=str.split(" ");
  656. item.hod = n[0]
  657. var row = item;
  658. var sizeTables = row.sizeTables;
  659. for (var j=0; j<sizeTables.length;j++){
  660. row['size-'+sizeTables[j].size] = sizeTables[j].proportion;
  661. }
  662. })
  663. }else {
  664. this.$message.error(res.message);
  665. }
  666. })
  667. },
  668. dynamicColumns(sizeTables){
  669. this.initializationColumns()
  670. var newColumns = this.clothesAddColumns
  671. this.sizeFields = [];
  672. if (sizeTables != null){
  673. var i = 0
  674. for(;i < newColumns.length ; i++){
  675. if(newColumns[i].insertAfter){
  676. break;
  677. }
  678. }
  679. // 插入数据
  680. for (var j=0;j<sizeTables.length;j++){
  681. this.sizeFields.push('size-'+sizeTables[j].size);
  682. var field = {
  683. title: sizeTables[j].size,
  684. dataIndex: 'size-'+sizeTables[j].size,
  685. type: JVXETypes.inputNumber ,
  686. width: 80,
  687. isSize:true,
  688. scopedSlots: { customRender: 'size-'+sizeTables[j].size },
  689. };
  690. this.inputName.push('size-'+sizeTables[j].size)
  691. newColumns.splice(i+1+j,0,field);
  692. }
  693. this.clothesAddColumns = newColumns
  694. }
  695. },
  696. //计算主表中所需计算的值
  697. setHeadCalField(data){
  698. var totalBoxes = 0;
  699. var totalNetWeight = 0;
  700. var totalGrossWeight = 0;
  701. var totalVolume = 0;
  702. var totalPrice = 0;
  703. var total = 0
  704. for(var i =0;i<data.length;i++){
  705. var rowData = data[i];
  706. totalBoxes += rowData.boxNumber;
  707. if (rowData.totalNetWeight != undefined && rowData.totalNetWeight != ""){
  708. totalNetWeight += rowData.totalNetWeight*1;
  709. }
  710. if (rowData.totalGrossWeight != undefined && rowData.totalGrossWeight != ""){
  711. totalGrossWeight += rowData.totalGrossWeight*1;
  712. }
  713. if (rowData.totalVolume != undefined && rowData.totalVolume != ""){
  714. totalVolume += rowData.totalVolume*1;
  715. }
  716. if (rowData.totalPrice != undefined && rowData.totalPrice != ""){
  717. totalPrice += rowData.totalPrice*1;
  718. }
  719. if (rowData.total != undefined && rowData.total != ""){
  720. total += rowData.total*1;
  721. }
  722. }
  723. this.clothesAdd.totalBoxes = totalBoxes
  724. this.clothesAdd.totalGrossWeight = totalGrossWeight
  725. this.clothesAdd.totalNetWeight = totalNetWeight
  726. this.clothesAdd.totalVolume = totalVolume
  727. this.clothesAdd.totalPrice = totalPrice
  728. this.clothesAdd.total = total
  729. this.$forceUpdate()
  730. },
  731. // 参照预装箱单
  732. referadvancePackingList() {
  733. console.log('打开参照订单数据')
  734. // 打开订单数据弹框
  735. this.$refs.ReferencePrePacklist.referencePrePacklist = true
  736. this.$refs.ReferencePrePacklist.queryParam = {}
  737. this.$refs.ReferencePrePacklist.searchQuery()
  738. },
  739. // -------------------------------------
  740. // 操作 删除
  741. handleDelete(ind) {
  742. var delectId = ind.rowIndex
  743. this.clothesAddData.splice(delectId, 1);
  744. console.log(this.clothesAddData)
  745. this.setHeadCalField(this.clothesAddData)
  746. },
  747. handleValueChange(record) {
  748. var dataRow = record
  749. if (dataRow.startingBoxNumber != undefined && dataRow.startingBoxNumber != "" &&
  750. dataRow.endCaseNumber != undefined && dataRow.endCaseNumber != ""){
  751. dataRow.boxNumber = dataRow.endCaseNumber*1-dataRow.startingBoxNumber*1+1;
  752. }
  753. var allSizeSum = this.getAllSizeSum(dataRow);
  754. dataRow.piecesBox = allSizeSum
  755. dataRow.total = dataRow.piecesBox*dataRow.boxNumber
  756. if (dataRow.netWeight != "" && dataRow.netWeight != undefined){
  757. dataRow.totalNetWeight = dataRow.netWeight * dataRow.boxNumber;
  758. }
  759. if (dataRow.grossWeight != "" && dataRow.grossWeight != undefined){
  760. dataRow.totalGrossWeight = dataRow.grossWeight * dataRow.boxNumber;
  761. }
  762. if (dataRow.outerBoxLength != "" && dataRow.outerBoxLength != undefined &&
  763. dataRow.outerBoxWidth != "" && dataRow.outerBoxWidth != undefined &&
  764. dataRow.outerBoxHeight != "" && dataRow.outerBoxHeight != undefined){
  765. dataRow.totalVolume = (dataRow.outerBoxLength * dataRow.outerBoxWidth * dataRow.outerBoxHeight * dataRow.boxNumber/1000000).toFixed(3)
  766. }
  767. if (dataRow.unitPrice != undefined && dataRow.unitPrice != ""){
  768. dataRow.totalPrice = (dataRow.unitPrice*dataRow.total).toFixed(2)
  769. }
  770. this.setHeadCalField(this.clothesAddData)
  771. },
  772. // 操作按钮 复制
  773. copy(record) {
  774. var newRow = JSON.parse(JSON.stringify(record));
  775. newRow.isAdd = 1
  776. this.clothesAddData.push(newRow);
  777. this.setHeadCalField(this.clothesAddData)
  778. },
  779. // -------------------------------------
  780. // 抽屉 取消
  781. handleCancel() {
  782. console.log('点击抽屉取消')
  783. this.close()
  784. },
  785. // 抽屉 提交
  786. submitAdd() {
  787. const that = this;
  788. // 触发表单验证
  789. that.$refs.formModel.validate(async valid => {
  790. if (valid) {
  791. if (this.sizeFields.length == 0){
  792. this.$message.error('当前记录没有尺码字段,无法保存');
  793. return;
  794. }
  795. // that.confirmLoading = true
  796. var newObj = {}
  797. newObj.itemNumber = this.clothesAdd.styleNum
  798. newObj.orderNumber = this.clothesAdd.orderNum
  799. newObj.productName = this.clothesAdd.name
  800. newObj.sizeRange = this.clothesAdd.sizeRange
  801. newObj.customer = this.clothesAdd.customer
  802. newObj.containerCode = this.clothesAdd.containerCode
  803. newObj.containerNumber = this.clothesAdd.containerNo
  804. newObj.u8Remarks = this.clothesAdd.note
  805. // newObj.garmentFactory = this.clothesAdd.clothesFactory
  806. newObj.exportInvoiceNo = this.clothesAdd.exportInvoiceNo
  807. newObj.shippingOrderNumber = this.clothesAdd.bookNum
  808. newObj.id = this.clothesAdd.id
  809. newObj.totalBoxes = this.clothesAdd.totalBoxes
  810. newObj.totalGrossWeight = this.clothesAdd.totalGrossWeight
  811. newObj.totalNetWeight = this.clothesAdd.totalNetWeight
  812. newObj.totalVolume = this.clothesAdd.totalVolume
  813. newObj.totalPrice = this.clothesAdd.totalPrice
  814. newObj.total = this.clothesAdd.total
  815. newObj.syPackingListTailoringItemList = this.clothesAddData
  816. newObj.syPreAssembledPackingListId=this.clothesAdd.syPreAssembledPackingListId,
  817. newObj.elementsId=this.clothesAdd.elementsId,
  818. newObj.business_Type_Value=this.clothesAdd.business_Type_Value,
  819. newObj.salesman=this.clothesAdd.salesman,
  820. newObj.salesDepartment=this.clothesAdd.salesDepartment,
  821. newObj.ompoId=this.clothesAdd.ompoId,
  822. newObj.purchase=this.clothesAdd.purchase,
  823. newObj.customerAbbreviation=this.clothesAdd.customerAbbreviation,
  824. newObj.depositaryReceiptNo = this.clothesAdd.depositaryReceiptNo
  825. await this.JudgeVluabled()
  826. if(this.judge == 0){
  827. if(this.editDecide === 'edit'){
  828. editSpltList(newObj).then(res => {
  829. if (res.success) {
  830. this.$message.success('编辑成功')
  831. this.close()
  832. //清空信息
  833. newObj = {};
  834. that.fatherList() // 调用父组件 查询方法
  835. }else{
  836. this.$message.error(res.message)
  837. }
  838. })
  839. }else {
  840. addSpltList(newObj).then(res => {
  841. if (res.success) {
  842. this.$message.success('新增成功')
  843. this.close()
  844. //清空信息
  845. newObj = {};
  846. that.fatherList() // 调用父组件 查询方法
  847. }else{
  848. this.$message.error(res.message)
  849. }
  850. })
  851. }
  852. }
  853. }
  854. })
  855. },
  856. JudgeVluabled(){
  857. var sort = 0
  858. this.judge = 0
  859. for (var i=0; i<this.clothesAddData.length;i++){
  860. var tableRow = this.clothesAddData[i];
  861. var allSizeSum = this.getAllSizeSum(tableRow);
  862. if (allSizeSum == 0){
  863. this.$message.error('第'+(i+1)+'行所有尺码数量为0,无法保存');
  864. this.judge+=1
  865. return;
  866. }
  867. //是否未填
  868. var Valuable=[
  869. {key:'startingBoxNumber',value:'起始箱号'},
  870. {key:'endCaseNumber',value:'结束箱号'},
  871. {key:'netWeight',value:'净重/箱'},
  872. {key:'grossWeight',value:'毛重/箱'},
  873. {key:'outerBoxLength',value:'外箱长度'},
  874. {key:'outerBoxWidth',value:'外箱宽度'},
  875. {key:'outerBoxHeight',value:'外箱高度'},
  876. // {key:'netWeightToo',value:'净净重'},
  877. {key:'boxNumber',value:'箱数'},
  878. ]
  879. for(var j=0 ; j<Valuable.length;j++){
  880. if(tableRow[Valuable[j].key] == null || tableRow[Valuable[j].key] == "" || tableRow[Valuable[j].key] == undefined){
  881. this.$message.error('第'+(i+1)+'行'+Valuable[j].value+'无值,无法保存');
  882. this.judge+=1
  883. return
  884. }
  885. }
  886. //是否为整
  887. var integer = [
  888. {key:'startingBoxNumber',value:'起始箱号'},
  889. {key:'piecesBox',value:'件数/箱'},
  890. {key:'endCaseNumber',value:'结束箱号'},
  891. {key:'boxNumber',value:'箱数'},
  892. ]
  893. for(var v=0 ; v<integer.length;v++){
  894. if(!Number.isInteger(Number(tableRow[integer[v].key]))){
  895. this.$message.error('第'+(i+1)+'行'+integer[v].value+'不为整数,无法保存');
  896. this.judge+=1
  897. return
  898. }
  899. }
  900. // //判断小数位数
  901. var Several = [
  902. {key:'netWeight',value:'净重/箱'},
  903. {key:'grossWeight',value:'毛重/箱'},
  904. ]
  905. for(var s=0 ; s<Several.length;s++){
  906. var position = tableRow[Several[s].key].toString().indexOf('.') + 1; //小数点的位置
  907. var digit = tableRow[Several[s].key].toString().length - position; //小数的位值
  908. if(digit > 2 && position!==0){
  909. this.$message.error('第'+(i+1)+'行'+Several[s].value+'小数超过两位,无法保存');
  910. this.judge+=1
  911. return
  912. }
  913. }
  914. if(Number(tableRow.startingBoxNumber) > Number(tableRow.endCaseNumber)) {
  915. this.$message.error('第'+(i+1)+'行起始箱号大于结束箱号,无法保存');
  916. this.judge+=1
  917. return;
  918. }
  919. if (tableRow.boxNumber == "" || tableRow.boxNumber == 0){
  920. this.$message.error('第'+(i+1)+'行箱数,无法保存');
  921. this.judge+=1
  922. return;
  923. }
  924. //尺码赋值
  925. for (var j=0; j<tableRow.sizeTables.length; j++){
  926. var sizeTable = tableRow.sizeTables[j];
  927. var field = 'size-'+sizeTable.size;
  928. tableRow.sizeTables[j].proportion = tableRow[field];
  929. }
  930. tableRow.sort = ++sort;
  931. }
  932. },
  933. // 获取不同尺码数量之和
  934. getAllSizeSum(record){
  935. var ret = 0;
  936. for (var i=0; i<this.sizeFields.length; i++){
  937. if (record[this.sizeFields[i]] != undefined && record[this.sizeFields[i]] != ""){
  938. ret += record[this.sizeFields[i]]*1;
  939. }
  940. }
  941. return ret;
  942. },
  943. // -------------------------------------
  944. close() {
  945. this.$emit('close')
  946. this.visible = false
  947. this.clothesAdd = {}
  948. this.clothesAddData = []
  949. this.sizeFields = []
  950. this.initializationColumns()
  951. this.editDecide = 'add'
  952. // this.$refs.form.resetFields()
  953. },
  954. //初始化表头
  955. initializationColumns(){
  956. this.clothesAddColumns= [
  957. {
  958. title: '账套',
  959. dataIndex : 'acSetNo',
  960. width: 100,
  961. // fixed: 'left',
  962. className: 'replacecolor',
  963. ellipsis: true,
  964. },
  965. {
  966. title: '成衣工厂',
  967. dataIndex : 'garmentFactory',
  968. width: 120,
  969. // fixed: 'left',
  970. className: 'replacecolor',
  971. ellipsis: true,
  972. },
  973. {
  974. title: 'HOD',
  975. dataIndex : 'hod',
  976. width: 120,
  977. className: 'replacecolor',
  978. ellipsis: true,
  979. },
  980. {
  981. title: 'STYLE NO.',
  982. dataIndex : 'styleNo',
  983. width: 120,
  984. className: 'replacecolor',
  985. ellipsis: true,
  986. },
  987. {
  988. title: 'PO NO.',
  989. dataIndex : 'poNo',
  990. width: 90,
  991. className: 'replacecolor',
  992. ellipsis: true,
  993. },
  994. {
  995. title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
  996. dataIndex : 'itemCode',
  997. width: 340,
  998. className: 'replacecolor',
  999. ellipsis: true,
  1000. },
  1001. {
  1002. title: 'PREPACK SKU',
  1003. dataIndex : 'prepackSku',
  1004. width: 200,
  1005. className: 'replacecolor',
  1006. scopedSlots: { customRender: 'prepackSku' } ,
  1007. },
  1008. {
  1009. title: '分销点/DC/LABEL',
  1010. dataIndex : 'distributionPoint',
  1011. width: 200,
  1012. className: 'replacecolor',
  1013. insertAfter:true,
  1014. ellipsis: true,
  1015. },
  1016. {
  1017. // title: '起始箱号',
  1018. dataIndex : 'startingBoxNumber',
  1019. className: 'replacecolor',
  1020. width: 120,
  1021. scopedSlots: { customRender: 'startingBoxNumber' } ,
  1022. slots:{title:'startingBoxNumberTitle'}
  1023. },
  1024. {
  1025. // title: '结束箱号',
  1026. dataIndex : 'endCaseNumber',
  1027. width: 120,
  1028. className: 'replacecolor',
  1029. scopedSlots: { customRender: 'endCaseNumber' } ,
  1030. slots:{title:'endCaseNumberTitle'}
  1031. },
  1032. {
  1033. title: '颜色(中英文)',
  1034. dataIndex : 'colour',
  1035. width: 140,
  1036. className: 'replacecolor',
  1037. ellipsis: true,
  1038. },
  1039. {
  1040. title: '配码',
  1041. dataIndex : 'withCode',
  1042. width: 120,
  1043. className: 'replacecolor',
  1044. ellipsis: true,
  1045. },
  1046. {
  1047. title: '件数/箱',
  1048. dataIndex : 'piecesBox',
  1049. width: 100,
  1050. // type: JVXETypes.normal
  1051. ellipsis: true,
  1052. },
  1053. {
  1054. title: '箱数',
  1055. dataIndex : 'boxNumber',
  1056. width: 120,
  1057. className: 'replacecolor',
  1058. scopedSlots: { customRender: 'replacecolor' } ,
  1059. slots:{title:'boxNumberTitle'}
  1060. },
  1061. {
  1062. title: '计划尺码数量',
  1063. dataIndex : 'planSize',
  1064. width: 180,
  1065. className: 'replacecolor',
  1066. ellipsis: true,
  1067. },
  1068. {
  1069. title: '计划装箱数量',
  1070. dataIndex : 'planQuantity',
  1071. width: 140,
  1072. className: 'replacecolor',
  1073. ellipsis: true,
  1074. },
  1075. {
  1076. title: '总件数',
  1077. dataIndex : 'total',
  1078. width: 90,
  1079. className: 'replacecolor',
  1080. ellipsis: true,
  1081. },
  1082. {
  1083. // title: '净重/箱',
  1084. dataIndex : 'netWeight',
  1085. width: 120,
  1086. className: 'replacecolor',
  1087. scopedSlots: { customRender: 'netWeight' } ,
  1088. slots:{title:'netWeightTitle'}
  1089. },
  1090. {
  1091. title: '总净重',
  1092. dataIndex : 'totalNetWeight',
  1093. width: 90,
  1094. className: 'replacecolor',
  1095. ellipsis: true,
  1096. },
  1097. {
  1098. // title: '毛重/箱',
  1099. dataIndex : 'grossWeight',
  1100. width: 120,
  1101. className: 'replacecolor',
  1102. scopedSlots: { customRender: 'grossWeight' } ,
  1103. slots:{title:'grossWeightTitle'}
  1104. },
  1105. {
  1106. title: '总毛重',
  1107. dataIndex : 'totalGrossWeight',
  1108. width: 90,
  1109. className: 'replacecolor',
  1110. ellipsis: true,
  1111. },
  1112. {
  1113. // title: '外箱长度',
  1114. dataIndex : 'outerBoxLength',
  1115. width: 120,
  1116. className: 'replacecolor',
  1117. scopedSlots: { customRender: 'outerBoxLength' } ,
  1118. slots:{title:'outerBoxLengthTitle'}
  1119. },
  1120. {
  1121. // title: '外箱宽度',
  1122. dataIndex : 'outerBoxWidth',
  1123. width: 120,
  1124. className: 'replacecolor',
  1125. scopedSlots: { customRender: 'outerBoxWidth' } ,
  1126. slots:{title:'outerBoxWidthTitle'}
  1127. },
  1128. {
  1129. // title: '外箱高度',
  1130. dataIndex : 'outerBoxHeight',
  1131. width: 120,
  1132. className: 'replacecolor',
  1133. scopedSlots: { customRender: 'outerBoxHeight' } ,
  1134. slots:{title:'outerBoxHeightTitle'}
  1135. },
  1136. {
  1137. title: '总体积',
  1138. dataIndex : 'totalVolume',
  1139. width: 100,
  1140. className: 'replacecolor',
  1141. ellipsis: true,
  1142. },
  1143. {
  1144. title: '净净重',
  1145. dataIndex : 'netWeightToo',
  1146. width: 120,
  1147. className: 'replacecolor',
  1148. scopedSlots: { customRender: 'netWeightToo' } ,
  1149. },
  1150. {
  1151. title: '备注',
  1152. dataIndex : 'remarks',
  1153. width: 140,
  1154. // fixed: 'right',
  1155. className: 'replacecolor',
  1156. scopedSlots: { customRender: 'remarks' } ,
  1157. },
  1158. {
  1159. title: '操作',
  1160. dataIndex : 'operation',
  1161. className: 'replacecolor',
  1162. width: 160,
  1163. fixed: 'right',
  1164. align: 'center',
  1165. scopedSlots: { customRender: 'operation' } ,
  1166. }
  1167. ]
  1168. },
  1169. // - father------------------------------------
  1170. aa() {},
  1171. modalFormOk() {},
  1172. // 分页、排序、筛选变化时触发
  1173. handleTableChange(pagination, filters, sorter) {
  1174. this.queryParam.pageNo = pagination.current
  1175. this.referCallback()
  1176. }
  1177. }
  1178. }
  1179. </script>
  1180. <style lang="less" scoped>
  1181. @import '~@assets/less/common.less';
  1182. @import '~@assets/less/overwriter.less';
  1183. /deep/ .ant-table-thead > tr > th {
  1184. text-align: center;
  1185. // font-weight: 700;
  1186. }
  1187. /deep/ .ant-table-tbody {
  1188. text-align: center;
  1189. }
  1190. // /deep/ th.replacecolor {
  1191. // background-color: #ccc;
  1192. // }
  1193. // 抽屉里的card样式
  1194. /deep/ .ant-drawer-content {
  1195. background-color: #f0f2f5;
  1196. }
  1197. /deep/ .ant-drawer-body {
  1198. padding: 10px;
  1199. }
  1200. /deep/.ant-table-row-cell-break-word >.ant-form-item{
  1201. margin-bottom: 0px !important;
  1202. }
  1203. /deep/.ant-table-tbody .ant-table-row td{
  1204. padding-top: 8px !important;
  1205. padding-bottom: 8px !important;
  1206. }
  1207. </style>