materialProcurementDetail.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. <template>
  2. <a-modal
  3. title="详情"
  4. width="95%"
  5. :visible="visible"
  6. :maskClosable="false"
  7. switchFullscreen
  8. @cancel="handleCancel"
  9. >
  10. <template slot="footer">
  11. <a-button @click="handleCancel">关闭</a-button>
  12. </template>
  13. <a-card :bordered="false" class="top" style="margin-bottom:1%;margin-top:1%" :loading = 'loading'>
  14. <div class="table-page-search-wrapper">
  15. <a-form layout="inline" @keyup.enter.native="searchQuery">
  16. <a-row :gutter="24">
  17. <a-col :md="4" :sm="24">
  18. <a-form-item label="计划组织">
  19. <a-input-search placeholder="请输入" v-model="form.planOrg" disabled></a-input-search>
  20. </a-form-item>
  21. </a-col>
  22. <a-col :md="4" :sm="24">
  23. <a-form-item label="单据号">
  24. <a-input placeholder="请输入" v-model="form.orderCode" disabled></a-input>
  25. </a-form-item>
  26. </a-col>
  27. <a-col :md="4" :sm="24">
  28. <a-form-item label="单据日期">
  29. <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form.orderDate" style="width:100%" disabled/>
  30. </a-form-item>
  31. </a-col>
  32. <a-col :md="4" :sm="24">
  33. <a-form-item label="单据状态">
  34. <a-select v-model="form.state" style='width:100%' disabled>
  35. <a-select-option value='自由'> 自由</a-select-option>
  36. <a-select-option value='已批准'> 已批准</a-select-option>
  37. <a-select-option value='已运算'> 已运算</a-select-option>
  38. <a-select-option value='已请购'> 已请购</a-select-option>
  39. <a-select-option value='已关闭'> 已关闭</a-select-option>
  40. </a-select>
  41. </a-form-item>
  42. </a-col>
  43. <a-col :md="4" :sm="24">
  44. <a-form-item label="项目编码">
  45. <a-input placeholder="请输入" v-model="form.projectCode" disabled></a-input>
  46. </a-form-item>
  47. </a-col>
  48. <a-col :md="4" :sm="24">
  49. <a-form-item label="项目">
  50. <a-input-search placeholder="请输入" v-model="form.project" disabled></a-input-search>
  51. </a-form-item>
  52. </a-col>
  53. <a-col :md="4" :sm="24">
  54. <a-form-item label="计划部门">
  55. <a-input-search placeholder="请输入" v-model="form.planDept" disabled></a-input-search>
  56. </a-form-item>
  57. </a-col>
  58. <a-col :md="4" :sm="24">
  59. <a-form-item label="业务员">
  60. <a-input-search placeholder="请输入" v-model="form.salesperson" disabled></a-input-search>
  61. </a-form-item>
  62. </a-col>
  63. <a-col :md="4" :sm="24">
  64. <a-form-item label="业务类型">
  65. <a-select v-model="form.type" style='width:100%' disabled>
  66. <a-select-option value='1'> 1</a-select-option>
  67. </a-select>
  68. </a-form-item>
  69. </a-col>
  70. <a-col :md="4" :sm="24">
  71. <a-form-item label="加工单号">
  72. <a-input placeholder="请输入" v-model="form.workNo" disabled></a-input>
  73. </a-form-item>
  74. </a-col>
  75. <a-col :md="4" :sm="24">
  76. <a-form-item label="改单版本">
  77. <a-input placeholder="请输入" v-model="form.version" disabled></a-input>
  78. </a-form-item>
  79. </a-col>
  80. <a-col :md="4" :sm="24">
  81. <a-form-item label="来源">
  82. <a-input placeholder="请输入" v-model="form.sourceInfo" disabled></a-input>
  83. </a-form-item>
  84. </a-col>
  85. <a-col :md="4" :sm="24">
  86. <a-form-item label="备注" :labelCol="{span: 3, offset: 2}">
  87. <a-input placeholder="请输入" v-model="form.remarks" disabled></a-input>
  88. </a-form-item>
  89. </a-col>
  90. </a-row>
  91. </a-form>
  92. </div>
  93. </a-card>
  94. <a-card :bordered="false" class="three" style="margin-bottom:1%" :loading = 'loading'>
  95. <a-form-model ref="formRef">
  96. <a-table
  97. ref="table"
  98. size="middle"
  99. bordered
  100. id='sonList'
  101. :columns="columns"
  102. rowKey="rowNo"
  103. :dataSource="dataSource"
  104. :pagination="false"
  105. :scroll="{ x: 4500, y: 300 }"
  106. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  107. @change="handleTableChange"
  108. >
  109. </a-table>
  110. </a-form-model">
  111. </a-card>
  112. <a-card :bordered="false" class="bottom" style="margin-bottom:1%">
  113. <div class="table-page-search-wrapper">
  114. <a-form layout="inline" @keyup.enter.native="searchQuery">
  115. <a-row :gutter="24">
  116. <a-col :md="4" :sm="24">
  117. <a-form-item label="制单人">
  118. <a-input placeholder="请输入" v-model="form1.createBy" disabled></a-input>
  119. </a-form-item>
  120. </a-col>
  121. <a-col :md="4" :sm="24">
  122. <a-form-item label="制单日期">
  123. <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form1.createTime" disabled/>
  124. </a-form-item>
  125. </a-col>
  126. <a-col :md="4" :sm="24">
  127. <a-form-item label="审批人">
  128. <a-input placeholder="请输入" v-model="form1.reviewer" disabled></a-input>
  129. </a-form-item>
  130. </a-col>
  131. <a-col :md="4" :sm="24">
  132. <a-form-item label="审批日期">
  133. <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form1.reviewerTime" disabled/>
  134. </a-form-item>
  135. </a-col>
  136. <a-col :md="4" :sm="24">
  137. <a-form-item label="最后修改人">
  138. <a-input placeholder="请输入" v-model="form1.updateBy" disabled></a-input>
  139. </a-form-item>
  140. </a-col>
  141. <a-col :md="4" :sm="24">
  142. <a-form-item label="最后修改时间">
  143. <a-date-picker showTime valueFormat="YYYY-MM-DD" format = "YYYY-MM-DD" v-model="form1.updateTime" disabled/>
  144. </a-form-item>
  145. </a-col>
  146. </a-row>
  147. </a-form>
  148. </div>
  149. </a-card>
  150. </a-modal>
  151. </template>
  152. <script>
  153. import { FormTypes } from '@/utils/JEditableTableUtil'
  154. import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
  155. import moment from "moment"
  156. import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
  157. export default {
  158. name: 'materialProcurementDetail',
  159. mixins: [JEditableTableModelMixin],
  160. components: {
  161. },
  162. data() {
  163. return {
  164. visible:false,
  165. form:{},
  166. form1:{},
  167. defaultMethod:'add',
  168. dataSource:[],
  169. loading:false,
  170. // ipagination:{},
  171. selectedRowKeys:[],
  172. selectedRows:[],
  173. columns: [
  174. {
  175. title: '#',
  176. dataIndex: '',
  177. key: 'rowIndex',
  178. width: 60,
  179. align: "center",
  180. customRender:function (t, r, index) {
  181. return parseInt(index)+1;
  182. }
  183. },
  184. {
  185. title: '批次',
  186. align:"center",
  187. dataIndex: 'batch',
  188. ellipsis: true,
  189. },
  190. {
  191. title: '项目编码',
  192. align:"center",
  193. dataIndex: 'projectCode',
  194. ellipsis: true,
  195. },
  196. {
  197. title: '项目名称',
  198. align:"center",
  199. dataIndex: 'projectName',
  200. ellipsis: true,
  201. },
  202. {
  203. title: '存货名称',
  204. align:"center",
  205. dataIndex: 'inventoryName',
  206. ellipsis: true,
  207. },
  208. {
  209. title: '存货编码',
  210. align:"center",
  211. dataIndex: 'inventoryCode',
  212. ellipsis: true,
  213. },
  214. {
  215. title: '计量单位',
  216. align:"center",
  217. dataIndex: 'unit',
  218. ellipsis: true,
  219. },
  220. {
  221. title: '主数量',
  222. align:"center",
  223. dataIndex: 'quantity',
  224. ellipsis: true,
  225. },
  226. {
  227. title: '换算率',
  228. align:"center",
  229. dataIndex: 'rate',
  230. ellipsis: true,
  231. },
  232. {
  233. title: '辅计量单位',
  234. align:"center",
  235. dataIndex: 'auxiliaryUnit',
  236. ellipsis: true,
  237. },
  238. {
  239. title: '辅数量',
  240. align:"center",
  241. dataIndex: 'unQuantity',
  242. ellipsis: true,
  243. },
  244. {
  245. title: '规格',
  246. align:"center",
  247. dataIndex: 'specs',
  248. ellipsis: true,
  249. },
  250. {
  251. title: '型号',
  252. align:"center",
  253. dataIndex: 'model',
  254. ellipsis: true,
  255. },
  256. {
  257. title: '颜色',
  258. align:"center",
  259. dataIndex: 'color',
  260. ellipsis: true,
  261. },
  262. {
  263. title: '定尺',
  264. align:"center",
  265. dataIndex: 'fixedLength',
  266. ellipsis: true,
  267. },
  268. {
  269. title: '合金',
  270. align:"center",
  271. dataIndex: 'alloy',
  272. ellipsis: true,
  273. },
  274. {
  275. title: '标准',
  276. align:"center",
  277. dataIndex: 'standard',
  278. ellipsis: true,
  279. },
  280. {
  281. title: '窗号',
  282. align:"center",
  283. dataIndex: 'windowNo',
  284. ellipsis: true,
  285. },
  286. {
  287. title: '米重',
  288. align:"center",
  289. dataIndex: 'meterWeight',
  290. ellipsis: true,
  291. },
  292. {
  293. title: '装饰面周长',
  294. align:"center",
  295. dataIndex: 'decorationLength',
  296. ellipsis: true,
  297. },
  298. {
  299. title: '专用区',
  300. align:"center",
  301. dataIndex: 'exclusiveZone',
  302. ellipsis: true,
  303. },
  304. {
  305. title: '配置',
  306. align:"center",
  307. dataIndex: 'configuration',
  308. ellipsis: true,
  309. },
  310. {
  311. title: '宽度/长度',
  312. align:"center",
  313. dataIndex: 'widthLength',
  314. ellipsis: true,
  315. },
  316. {
  317. title: '高度',
  318. align:"center",
  319. dataIndex: 'height',
  320. ellipsis: true,
  321. },
  322. {
  323. title: '楼号楼层',
  324. align:"center",
  325. dataIndex: 'buildingNumber',
  326. ellipsis: true,
  327. },
  328. {
  329. title: '樘数',
  330. align:"center",
  331. dataIndex: 'framesTang',
  332. ellipsis: true,
  333. },
  334. {
  335. title: '框统计',
  336. align:"center",
  337. dataIndex: 'framesCount',
  338. ellipsis: true,
  339. },
  340. {
  341. title: '扇统计',
  342. align:"center",
  343. dataIndex: 'leafCount',
  344. ellipsis: true,
  345. },
  346. {
  347. title: '半成品分类',
  348. align:"center",
  349. dataIndex: 'semiClass',
  350. ellipsis: true,
  351. },
  352. {
  353. title: '面积',
  354. align:"center",
  355. dataIndex: 'area',
  356. ellipsis: true,
  357. },
  358. {
  359. title: '切割长度',
  360. align:"center",
  361. dataIndex: 'cuttingLength',
  362. ellipsis: true,
  363. },
  364. {
  365. title: '切割角度左下',
  366. align:"center",
  367. dataIndex: 'cuttingLeftDown',
  368. ellipsis: true,
  369. },
  370. {
  371. title: '切割角度右上',
  372. align:"center",
  373. dataIndex: 'cuttingRightTop',
  374. ellipsis: true,
  375. },
  376. {
  377. title: '备注',
  378. align:"center",
  379. dataIndex: 'remarks',
  380. ellipsis: true,
  381. },
  382. {
  383. title: '系列',
  384. align:"center",
  385. dataIndex: 'series',
  386. ellipsis: true,
  387. },
  388. {
  389. title: '玻璃编号',
  390. align:"center",
  391. dataIndex: 'glassNumber',
  392. ellipsis: true,
  393. },
  394. ],
  395. }
  396. },
  397. created() {
  398. },
  399. methods: {
  400. handleCancel(){
  401. this.visible=false
  402. this.dataSource = []
  403. this.form={}
  404. this.form1={}
  405. },
  406. onSelectChange(selectedRowKeys, selectionRows) {
  407. this.selectedRowKeys = selectedRowKeys;
  408. this.selectedRows = selectionRows;
  409. },
  410. //获取主表信息
  411. getMainData(id){
  412. getAction('/materialRequisition/madeMaterialRequisition/queryById',{id:id}).then(res=>{
  413. if(res.success){
  414. this.form=res.result
  415. this.form1=res.result
  416. this.getSonData(this.form.id)
  417. }else{
  418. this.$message.error(res.message);
  419. }
  420. })
  421. },
  422. //获取子表信息
  423. getSonData(id){
  424. getAction('/materialRequisition/madeMaterialRequisition/querymadeMaterialRequisitionDetailByMainId',{id:id}).then(res=>{
  425. if(res.success){
  426. this.dataSource =res.result
  427. this.dataSource.map((item,index)=>{
  428. item.rowNo =index+1
  429. })
  430. }else{
  431. this.$message.error(res.message);
  432. }
  433. })
  434. },
  435. }
  436. }
  437. </script>
  438. <style scoped lang="less">
  439. /* @import '~@assets/less/common.less' */
  440. /deep/.ant-input{
  441. height:29px;
  442. }
  443. /deep/.ant-select-selection--single {
  444. height: 29px;
  445. }
  446. /deep/.ant-select{
  447. font-size: 12px;
  448. }
  449. /deep/.ant-form label{
  450. font-size: 12px;
  451. }
  452. /deep/.table-page-search-wrapper .ant-form-inline .ant-form-item{
  453. margin-bottom:9px
  454. }
  455. /deep/.moddle>.ant-card-body{
  456. padding-bottom:0px;
  457. padding-top: 12px;
  458. }
  459. /deep/.top>.ant-card-body{
  460. padding-bottom:0px;
  461. padding-top: 12px;
  462. }
  463. /deep/.ant-btn{
  464. height:28px
  465. }
  466. /deep/.ant-modal-body{
  467. padding-bottom: 0px;
  468. padding-top: 0px;
  469. }
  470. // /deep/.ant-modal-body{
  471. // background: #f0f2f5;
  472. // }
  473. /deep/.ant-modal-content{
  474. background: #f0f2f5;
  475. }
  476. /deep/.ant-card-body .table-operator {
  477. margin-bottom: 0px;
  478. }
  479. /deep/.three>.ant-card-body{
  480. padding-bottom:12px;
  481. padding-top: 12px;
  482. }
  483. /deep/.bottom>.ant-card-body{
  484. padding-bottom:0px;
  485. padding-top: 12px;
  486. }
  487. /deep/.ant-calendar-picker{
  488. min-width: 0px !important;
  489. }
  490. /deep/.sonItem {
  491. margin-bottom:0px !important
  492. }
  493. // /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 {
  494. // padding: 0px 8px !important;
  495. // }
  496. </style>