KSOutbound.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. <!-- 框/扇出库 -->
  2. <template>
  3. <a-modal
  4. title="框/扇出库"
  5. width="95%"
  6. :visible="visible"
  7. :maskClosable="false"
  8. switchFullscreen
  9. @cancel="handleCancel"
  10. @ok='handleOk'
  11. >
  12. <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%" :loading = 'loading'>
  13. <div >
  14. <a-form-model ref="formRef" :model="form">
  15. <a-table
  16. ref="table"
  17. size="middle"
  18. bordered
  19. id='sonList'
  20. :columns="columns"
  21. rowKey="rowNo"
  22. :dataSource="form.dataSource"
  23. :pagination="false"
  24. :scroll="{ x: 6500, y: 300 }"
  25. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  26. >
  27. <span slot="boxFreightTitle" class="form-table-heard">
  28. 框运费
  29. </span>
  30. <span slot="executeOutFramesNowTitle" class="form-table-heard">
  31. 本次执行框数量
  32. </span>
  33. <span slot="executeOutLeafNowTitle" class="form-table-heard">
  34. 本次执行扇数量
  35. </span>
  36. <template slot="boxFreight" slot-scope="text, record, index">
  37. <a-form-model-item :prop="'dataSource.'+index+'.boxFreight'" class='sonItem' :rules="rules.boxFreight">
  38. <a-input-number placeholder="请输入" v-model="record.boxFreight" style="width: 100%;"></a-input-number>
  39. </a-form-model-item>
  40. </template>
  41. <span slot="fanFreightTitle" class="form-table-heard">
  42. 扇运费
  43. </span>
  44. <template slot="fanFreight" slot-scope="text, record, index">
  45. <a-form-model-item :prop="'dataSource.'+index+'.fanFreight'" class='sonItem' :rules="rules.fanFreight">
  46. <a-input-number placeholder="请输入" v-model="record.fanFreight" style="width: 100%;"></a-input-number>
  47. </a-form-model-item>
  48. </template>
  49. <template slot="executeOutLeafNow" slot-scope="text, record, index">
  50. <a-form-model-item :prop="'dataSource.'+index+'.executeOutLeafNow'" class='sonItem' :rules="rules.executeOutLeafNow">
  51. <a-input-number placeholder="请输入" v-model="record.executeOutLeafNow" style="width: 100%;"></a-input-number>
  52. </a-form-model-item>
  53. </template>
  54. <template slot="executeOutFramesNow" slot-scope="text, record, index">
  55. <a-form-model-item :prop="'dataSource.'+index+'.executeOutFramesNow'" class='sonItem' :rules="rules.executeOutFramesNow">
  56. <a-input-number placeholder="请输入" v-model="record.executeOutFramesNow" style="width: 100%;"></a-input-number>
  57. </a-form-model-item>
  58. </template>
  59. </a-table>
  60. </a-form-model>
  61. </div>
  62. </a-card>
  63. </a-modal>
  64. </template>
  65. <script>
  66. import alertModal from '../../../../plugins/modal'
  67. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  68. import JEllipsis from '@/components/jeecg/JEllipsis'
  69. import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
  70. import moment from 'moment'
  71. export default {
  72. name: 'KSOutbound', // Tabs 详情
  73. mixins: [JeecgListMixin],
  74. components: {
  75. JEllipsis,
  76. moment,
  77. },
  78. data() {
  79. return {
  80. form:{
  81. dataSource:[],
  82. },
  83. loading:false,
  84. columns: [
  85. {
  86. title: '行号',
  87. dataIndex: '',
  88. key: 'rowIndex',
  89. width: 60,
  90. align: "center",
  91. customRender:function (t, r, index) {
  92. return parseInt(index)+1;
  93. }
  94. },
  95. {
  96. title: '开票类型',
  97. align:"center",
  98. dataIndex: 'billingType',
  99. ellipsis: true,
  100. },
  101. {
  102. title: '项目编码',
  103. align:"center",
  104. dataIndex: 'projectCode',
  105. ellipsis: true,
  106. },
  107. {
  108. title: '项目名称',
  109. align:"center",
  110. dataIndex: 'projectName',
  111. ellipsis: true,
  112. },
  113. {
  114. title: '料品编码',
  115. align:"center",
  116. dataIndex: 'inventoryCode',
  117. ellipsis: true,
  118. },
  119. {
  120. title: '料品名称',
  121. align:"center",
  122. dataIndex: 'inventoryName',
  123. ellipsis: true,
  124. },
  125. {
  126. // title: '本次执行扇数量',
  127. align:"center",
  128. dataIndex: 'executeOutLeafNow',
  129. ellipsis: true,
  130. scopedSlots: { customRender: 'executeOutLeafNow' } ,
  131. slots:{title:'executeOutLeafNowTitle'},
  132. },
  133. {
  134. // title: '本次执行框数量',
  135. align:"center",
  136. dataIndex: 'executeOutFramesNow',
  137. ellipsis: true,
  138. scopedSlots: { customRender: 'executeOutFramesNow' } ,
  139. slots:{title:'executeOutFramesNowTitle'},
  140. },
  141. {
  142. // title: '框运费',
  143. align:"center",
  144. dataIndex: 'boxFreight',
  145. ellipsis: true,
  146. scopedSlots: { customRender: 'boxFreight' } ,
  147. slots:{title:'boxFreightTitle'},
  148. },
  149. {
  150. // title: '扇运费',
  151. align:"center",
  152. dataIndex: 'fanFreight',
  153. ellipsis: true,
  154. scopedSlots: { customRender: 'fanFreight' } ,
  155. slots:{title:'fanFreightTitle'},
  156. },
  157. {
  158. title: '批次',
  159. align:"center",
  160. dataIndex: 'batch',
  161. ellipsis: true,
  162. },
  163. {
  164. title: '成品计量单位',
  165. align:"center",
  166. dataIndex: 'unit',
  167. ellipsis: true,
  168. },
  169. {
  170. title: '成品辅计量单位',
  171. align:"center",
  172. dataIndex: 'auxiliaryUnit',
  173. ellipsis: true,
  174. },
  175. {
  176. title: '成品主数量',
  177. align:"center",
  178. dataIndex: 'quantity',
  179. ellipsis: true,
  180. },
  181. {
  182. title: '成品辅数量',
  183. align:"center",
  184. dataIndex: 'unQuantity',
  185. ellipsis: true,
  186. },
  187. {
  188. title: '已入库成品数量',
  189. align:"center",
  190. dataIndex: 'quantityExecuteIn',
  191. ellipsis: true,
  192. },
  193. {
  194. title: '框数量',
  195. align:"center",
  196. dataIndex: 'framesCount',
  197. ellipsis: true,
  198. },
  199. {
  200. title: '扇数量',
  201. align:"center",
  202. dataIndex: 'leafCount',
  203. ellipsis: true,
  204. },
  205. {
  206. title: '已入库框数量',
  207. align:"center",
  208. dataIndex: 'executeInFrames',
  209. ellipsis: true,
  210. },
  211. {
  212. title: '已入库扇数量',
  213. align:"center",
  214. dataIndex: 'executeInLeaf',
  215. ellipsis: true,
  216. },
  217. {
  218. title: '已出库框数量',
  219. align:"center",
  220. dataIndex: 'executeOutFrames',
  221. ellipsis: true,
  222. },
  223. {
  224. title: '已出库扇数量',
  225. align:"center",
  226. dataIndex: 'executeOutLeaf',
  227. ellipsis: true,
  228. },
  229. {
  230. title: '规格',
  231. align:"center",
  232. dataIndex: 'specs',
  233. ellipsis: true,
  234. },
  235. {
  236. title: '型号',
  237. align:"center",
  238. dataIndex: 'model',
  239. ellipsis: true,
  240. },
  241. {
  242. title: '颜色',
  243. align:"center",
  244. dataIndex: 'color',
  245. ellipsis: true,
  246. },
  247. {
  248. title: '支数',
  249. align:"center",
  250. dataIndex: 'fixedNum',
  251. ellipsis: true,
  252. },
  253. {
  254. title: '定尺',
  255. align:"center",
  256. dataIndex: 'fixedLength',
  257. ellipsis: true,
  258. },
  259. {
  260. title: '宽/高',
  261. align:"center",
  262. dataIndex: 'widthHeight',
  263. ellipsis: true,
  264. },
  265. {
  266. title: '片数',
  267. align:"center",
  268. dataIndex: 'pieces',
  269. ellipsis: true,
  270. },
  271. {
  272. title: '备注',
  273. align:"center",
  274. dataIndex: 'remarks',
  275. ellipsis: true,
  276. },
  277. {
  278. title: '米重',
  279. align:"center",
  280. dataIndex: 'meterWeight',
  281. ellipsis: true,
  282. },
  283. {
  284. title: '装饰面周长',
  285. align:"center",
  286. dataIndex: 'decorationLength',
  287. ellipsis: true,
  288. },
  289. {
  290. title: '窗号',
  291. align:"center",
  292. dataIndex: 'windowNo',
  293. ellipsis: true,
  294. },
  295. {
  296. title: '专用区',
  297. align:"center",
  298. dataIndex: 'exclusiveZone',
  299. ellipsis: true,
  300. },
  301. {
  302. title: '宽度/长度',
  303. align:"center",
  304. dataIndex: 'widthLength',
  305. ellipsis: true,
  306. },
  307. {
  308. title: '高度',
  309. align:"center",
  310. dataIndex: 'height',
  311. ellipsis: true,
  312. },
  313. {
  314. title: '楼层楼号',
  315. align:"center",
  316. dataIndex: 'buildingNumber',
  317. ellipsis: true,
  318. },
  319. {
  320. title: '樘数(数量)',
  321. align:"center",
  322. dataIndex: 'framesTang',
  323. ellipsis: true,
  324. },
  325. {
  326. title: '半成品分类',
  327. align:"center",
  328. dataIndex: 'semiClass',
  329. ellipsis: true,
  330. },
  331. {
  332. title: '面积',
  333. align:"center",
  334. dataIndex: 'area',
  335. ellipsis: true,
  336. },
  337. {
  338. title: '切割长度',
  339. align:"center",
  340. dataIndex: 'cuttingLength',
  341. ellipsis: true,
  342. },
  343. {
  344. title: '切割角度左下',
  345. align:"center",
  346. dataIndex: 'cuttingLeftDown',
  347. ellipsis: true,
  348. },
  349. {
  350. title: '切割角度右上',
  351. align:"center",
  352. dataIndex: 'cuttingRightTop',
  353. ellipsis: true,
  354. },
  355. {
  356. title: '系列',
  357. align:"center",
  358. dataIndex: 'series',
  359. ellipsis: true,
  360. },
  361. {
  362. title: '玻璃编号',
  363. align:"center",
  364. dataIndex: 'glassNumber',
  365. ellipsis: true,
  366. },
  367. ],
  368. visible:false,
  369. selectedRowKeys:[],
  370. selectedRows:[],
  371. disableMixinCreated:'1',
  372. rules:{
  373. // boxFreight:{required:true,message:"不可为空"},
  374. // fanFreight:{required:true,message:"不可为空"},
  375. // executeOutLeafNow:{required:true,message:"不可为空"},
  376. // executeOutFramesNowTitle:{required:true,message:"不可为空"},
  377. },
  378. }
  379. },
  380. props: {
  381. },
  382. created() {},
  383. methods: {
  384. onSelectChange(selectedRowKeys, selectionRows) {
  385. this.selectedRowKeys = selectedRowKeys;
  386. this.selectedRows = selectionRows;
  387. },
  388. handleOk(){
  389. var mandatoryField = '1'
  390. this.selectedRows.map(item=>{
  391. if(!item.boxFreight||!item.fanFreight||!item.executeOutLeafNow||!item.executeOutFramesNow){
  392. mandatoryField = '0'
  393. }
  394. })
  395. if(this.selectedRows.length==0){
  396. this.$message.warning('请勾选数据')
  397. }else if(mandatoryField=='0'){
  398. this.$message.warning('请输入框运费、扇运费、本次执行扇数量、本次执行框数量')
  399. }else{
  400. this.loading =true
  401. alertModal.loading("执行中,请稍后!")
  402. postAction('/productionOrder/madeProductionOrders/outMadeProductionOrdersOutList', {madeProductionOrdersInList:this.selectedRows}).then((res) => {
  403. alertModal.closeLoading();
  404. if (res.success) {
  405. this.$emit('ok')
  406. this.$message.success('执行成功');
  407. } else {
  408. this.$message.error(res.message);
  409. this.handleCancel()
  410. }
  411. }).finally(() => {
  412. this.loading = false
  413. })
  414. }
  415. },
  416. handleCancel(){
  417. this.visible = false
  418. this.selectedRowKeys = []
  419. this.selectedRows = []
  420. }
  421. },
  422. computed: {
  423. // 合计数据
  424. // sumInfoSource() {}
  425. }
  426. }
  427. </script>
  428. <style lang="less" scoped>
  429. /* @import '~@assets/less/common.less' */
  430. /deep/.ant-input{
  431. height:29px;
  432. }
  433. /deep/.ant-select-selection--single {
  434. height: 29px;
  435. }
  436. /deep/.ant-select{
  437. font-size: 12px;
  438. }
  439. /deep/.ant-form label{
  440. font-size: 12px;
  441. }
  442. /deep/.table-page-search-wrapper .ant-form-inline .ant-form-item{
  443. margin-bottom:9px
  444. }
  445. /deep/.moddle>.ant-card-body{
  446. padding-bottom:0px;
  447. padding-top: 12px;
  448. }
  449. /deep/.top>.ant-card-body{
  450. padding-bottom:0px;
  451. padding-top: 12px;
  452. }
  453. /deep/.ant-btn{
  454. height:28px
  455. }
  456. /deep/.ant-modal-body{
  457. padding-bottom: 0px;
  458. padding-top: 0px;
  459. }
  460. // /deep/.ant-modal-body{
  461. // background: #f0f2f5;
  462. // }
  463. /deep/.ant-modal-content{
  464. background: #f0f2f5;
  465. }
  466. /deep/.ant-card-body .table-operator {
  467. margin-bottom: 0px;
  468. }
  469. /deep/.three>.ant-card-body{
  470. padding-bottom:12px;
  471. padding-top: 12px;
  472. }
  473. /deep/.bottom>.ant-card-body{
  474. padding-bottom:0px;
  475. padding-top: 12px;
  476. }
  477. /deep/.ant-calendar-picker{
  478. min-width: 0px !important;
  479. }
  480. /deep/.sonItem {
  481. margin-bottom:0px !important
  482. }
  483. /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
  484. padding: 0px 8px !important;
  485. }
  486. .form-table-heard:before {
  487. content:'*';
  488. color:red
  489. }
  490. /deep/.ant-form-explain, .ant-form-split {
  491. display: none;
  492. }
  493. </style>