clothesAddDrawer.vue 45 KB

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