materialProcurementDetail.vue 18 KB

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