clothesAddDrawer.vue 48 KB

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