productWarehousModel.vue 14 KB

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