addAdpackingDrawer.vue 44 KB

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