ContractDetailList.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. <template>
  2. <a-card :bordered="false" class="u-dialog-card">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. </a-row>
  8. </a-form>
  9. </div>
  10. <!-- 查询区域-END -->
  11. <!-- 操作按钮区域 -->
  12. <div class="table-operator" style="padding: -24px !important;">
  13. <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
  14. <a-button type="primary" icon="download" @click="handleExportXls(taskno+'合同额明细')">导出</a-button>
  15. <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  16. <a-button type="primary" icon="import">导入</a-button>
  17. </a-upload> -->
  18. <!-- 高级查询区域 -->
  19. <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  20. <a-dropdown v-if="selectedRowKeys.length > 0">
  21. <a-menu slot="overlay">
  22. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  23. </a-menu>
  24. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  25. </a-dropdown> -->
  26. </div>
  27. <!-- table区域-begin -->
  28. <div>
  29. <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  30. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  31. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  32. </div> -->
  33. <a-table
  34. ref="table"
  35. size="middle"
  36. :scroll="{x:true}"
  37. bordered
  38. rowKey="id"
  39. :columns="columns"
  40. :dataSource="dataSource"
  41. :pagination="ipagination"
  42. :loading="loading"
  43. class="j-table-force-nowrap"
  44. @change="handleTableChange">
  45. <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
  46. <template slot="htmlSlot" slot-scope="text">
  47. <div v-html="text"></div>
  48. </template>
  49. <template slot="imgSlot" slot-scope="text,record">
  50. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  51. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  52. </template>
  53. <template slot="fileSlot" slot-scope="text">
  54. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  55. <a-button
  56. v-else
  57. :ghost="true"
  58. type="primary"
  59. icon="download"
  60. size="small"
  61. @click="downloadFile(text)">
  62. 下载
  63. </a-button>
  64. </template>
  65. <!-- <span slot="action" slot-scope="text, record">
  66. <a @click="handleEdit(record)">编辑</a>
  67. <a-divider type="vertical" />
  68. <a-dropdown>
  69. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  70. <a-menu slot="overlay">
  71. <a-menu-item>
  72. <a @click="handleDetail(record)">详情</a>
  73. </a-menu-item>
  74. <a-menu-item>
  75. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  76. <a>删除</a>
  77. </a-popconfirm>
  78. </a-menu-item>
  79. </a-menu>
  80. </a-dropdown>
  81. </span> -->
  82. </a-table>
  83. </div>
  84. </a-card>
  85. </template>
  86. <script>
  87. import '@/assets/less/TableExpand.less'
  88. import { mixinDevice } from '@/utils/mixin'
  89. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  90. import { getAction } from '@/api/manage'
  91. export default {
  92. name: 'ContractDetailList',
  93. mixins:[JeecgListMixin, mixinDevice],
  94. props: {
  95. taskno: {
  96. type: String,
  97. default: ''
  98. }
  99. },
  100. data () {
  101. return {
  102. description: '合同信息存储表管理页面',
  103. // 表头
  104. columns: [
  105. {
  106. title: '序号',
  107. dataIndex: '',
  108. key:'rowIndex',
  109. width:60,
  110. align:"center",
  111. customRender:function (t,r,index) {
  112. return parseInt(index)+1;
  113. },
  114. fixed: 'left',
  115. },
  116. // {
  117. // title:'序号',
  118. // align:"center",
  119. // dataIndex: 'xh',
  120. // fixed: 'left',
  121. // },
  122. {
  123. title:'任务编号',
  124. align:"center",
  125. dataIndex: 'rwbh',
  126. width: 120,
  127. fixed: 'left',
  128. },
  129. {
  130. title:'任务名称',
  131. align:"center",
  132. dataIndex: 'rwmc',
  133. width: 120,
  134. fixed: 'left',
  135. },
  136. {
  137. title:'所属型号',
  138. align:"center",
  139. dataIndex: 'ssxh'
  140. },
  141. {
  142. title:'产品型号',
  143. align:"center",
  144. dataIndex: 'cpxh'
  145. },
  146. {
  147. title:'阶段',
  148. align:"center",
  149. dataIndex: 'jd'
  150. },
  151. {
  152. title:'研制部门',
  153. align:"center",
  154. dataIndex: 'yzbm'
  155. },
  156. {
  157. title:'主管设计师',
  158. align:"center",
  159. dataIndex: 'zgsjs'
  160. },
  161. {
  162. title:'已收款(元)',
  163. align:"center",
  164. dataIndex: 'ysk'
  165. },
  166. {
  167. title:'合同编号',
  168. align:"center",
  169. dataIndex: 'htbh'
  170. },
  171. {
  172. title:'合同名称',
  173. align:"center",
  174. dataIndex: 'htmc'
  175. },
  176. {
  177. title:'合同状态',
  178. align:"center",
  179. dataIndex: 'htzt'
  180. },
  181. {
  182. title:'合同类型',
  183. align:"center",
  184. dataIndex: 'htlx'
  185. },
  186. // 签署日期
  187. {
  188. title:'合同密级',
  189. align:"center",
  190. dataIndex: 'htmj'
  191. },
  192. {
  193. title:'项目密级',
  194. align:"center",
  195. dataIndex: 'xmmj'
  196. },
  197. {
  198. title:'合同数量',
  199. align:"center",
  200. dataIndex: 'htsl'
  201. },
  202. {
  203. title:'合同页数',
  204. align:"center",
  205. dataIndex: 'htys'
  206. },
  207. {
  208. title:'归档编号',
  209. align:"center",
  210. dataIndex: 'gdbh'
  211. },
  212. {
  213. title:'归档日期',
  214. align:"center",
  215. dataIndex: 'gdrq',
  216. customRender:function (text) {
  217. return !text?"":(text.length>10?text.substr(0,10):text)
  218. }
  219. },
  220. {
  221. title:'合同款状态',
  222. align:"center",
  223. dataIndex: 'htkzt'
  224. },
  225. {
  226. title:'甲方(付款方)',
  227. align:"center",
  228. dataIndex: 'jf'
  229. },
  230. {
  231. title:'甲方简称',
  232. align:"center",
  233. dataIndex: 'jfyhjc'
  234. },
  235. {
  236. title:'乙方(收款方)',
  237. align:"center",
  238. dataIndex: 'yf'
  239. },
  240. {
  241. title:'金额(元)', // 、收款总金额、开票金额
  242. align:"center",
  243. dataIndex: 'jeskzkp'
  244. },
  245. {
  246. title:'自筹(元)',
  247. align:"center",
  248. dataIndex: 'zc'
  249. },
  250. {
  251. title:'到款(元)',
  252. align:"center",
  253. dataIndex: 'dk'
  254. },
  255. {
  256. title:'待付款(元)',
  257. align:"center",
  258. dataIndex: 'dfk'
  259. },
  260. {
  261. title:'开票状态',
  262. align:"center",
  263. dataIndex: 'kpzt'
  264. },
  265. {
  266. title:'已开票(元)',
  267. align:"center",
  268. dataIndex: 'ykp'
  269. },
  270. {
  271. title:'待开票(元)',
  272. align:"center",
  273. dataIndex: 'dkp'
  274. },
  275. {
  276. title:'联系人(对方)',
  277. align:"center",
  278. dataIndex: 'lxr'
  279. },
  280. {
  281. title:'电话',
  282. align:"center",
  283. dataIndex: 'dh'
  284. },
  285. {
  286. title:'合同起草人',
  287. align:"center",
  288. dataIndex: 'htqcr'
  289. },
  290. {
  291. title:'起草日期', // 、录入日期、申请日期
  292. align:"center",
  293. dataIndex: 'qclrsqrq',
  294. customRender:function (text) {
  295. return !text?"":(text.length>10?text.substr(0,10):text)
  296. }
  297. },
  298. {
  299. title:'合同主管部门',
  300. align:"center",
  301. dataIndex: 'htzgbm'
  302. },
  303. {
  304. title:'业务员',
  305. align:"center",
  306. dataIndex: 'ywy'
  307. },
  308. {
  309. title:'抓总部门',
  310. align:"center",
  311. dataIndex: 'zzbm'
  312. },
  313. {
  314. title:'合同履行情况',
  315. align:"center",
  316. dataIndex: 'htlxqk'
  317. },
  318. {
  319. title:'合同状态说明',
  320. align:"center",
  321. dataIndex: 'htztsm'
  322. },
  323. {
  324. title:'合同分配额(元)',
  325. align:"center",
  326. dataIndex: 'htfpe',
  327. width: 120,
  328. fixed: 'right',
  329. },
  330. // {
  331. // title:'id',
  332. // align:"center",
  333. // dataIndex: 'id'
  334. // },
  335. // {
  336. // title:'开票时间',
  337. // align:"center",
  338. // dataIndex: 'kpsj',
  339. // customRender:function (text) {
  340. // return !text?"":(text.length>10?text.substr(0,10):text)
  341. // }
  342. // },
  343. // {
  344. // title:'客户id',
  345. // align:"center",
  346. // dataIndex: 'khid'
  347. // },
  348. // {
  349. // title:'数据来源:10:合同管理,20:合同任务,30:任务合同,40:合同付款,50:合同发票,60:外协合同',
  350. // align:"center",
  351. // dataIndex: 'sjly'
  352. // },
  353. // {
  354. // title:'用户id',
  355. // align:"center",
  356. // dataIndex: 'yhid'
  357. // },
  358. // {
  359. // title:'类型(无用)',
  360. // align:"center",
  361. // dataIndex: 'pici'
  362. // },
  363. ],
  364. url: {
  365. list: "/xmcbDetail/comContractInfoExchange/getCrmHteDetail",
  366. // delete: "/xmcbDetail/comContractInfoExchange/delete",
  367. // deleteBatch: "/xmcbDetail/comContractInfoExchange/deleteBatch",
  368. exportXlsUrl: "/xmcbDetail/comContractInfoExchange/exportHteDetail",
  369. // importExcelUrl: "xmcbDetail/comContractInfoExchange/importExcel",
  370. },
  371. dictOptions:{},
  372. superFieldList:[],
  373. queryParam: {
  374. taskno: this.taskno
  375. }
  376. }
  377. },
  378. created() {
  379. this.getSuperFieldList();
  380. this.loadData()
  381. },
  382. computed: {
  383. // importExcelUrl: function(){
  384. // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  385. // },
  386. },
  387. methods: {
  388. loadData() {
  389. this.loading = true;
  390. getAction(this.url.list, {taskno: this.taskno}).then((res) => {
  391. console.log(res)
  392. this.dataSource = res
  393. }).finally(() => {
  394. this.loading = false
  395. })
  396. },
  397. initDictConfig(){
  398. },
  399. getSuperFieldList(){
  400. let fieldList=[];
  401. fieldList.push({type:'string',value:'cpxh',text:'产品型号.',dictCode:''})
  402. fieldList.push({type:'BigDecimal',value:'dfk',text:'待付款(元).',dictCode:''})
  403. fieldList.push({type:'BigDecimal',value:'dkp',text:'待开票(元).',dictCode:''})
  404. fieldList.push({type:'BigDecimal',value:'dk',text:'到款(元).',dictCode:''})
  405. fieldList.push({type:'string',value:'dh',text:'电话.',dictCode:''})
  406. fieldList.push({type:'string',value:'gdbh',text:'归档编号.',dictCode:''})
  407. fieldList.push({type:'date',value:'gdrq',text:'归档日期.'})
  408. fieldList.push({type:'string',value:'htbh',text:'合同编号.',dictCode:''})
  409. fieldList.push({type:'BigDecimal',value:'htfpe',text:'合同分配额.',dictCode:''})
  410. fieldList.push({type:'string',value:'htkzt',text:'合同款状态.',dictCode:''})
  411. fieldList.push({type:'string',value:'htlx',text:'合同类型.',dictCode:''})
  412. fieldList.push({type:'string',value:'htlxqk',text:'合同履行情况.',dictCode:''})
  413. fieldList.push({type:'string',value:'htmj',text:'合同密级.',dictCode:''})
  414. fieldList.push({type:'string',value:'htmc',text:'合同名称.',dictCode:''})
  415. fieldList.push({type:'string',value:'htqcr',text:'合同起草人.',dictCode:''})
  416. fieldList.push({type:'int',value:'htsl',text:'合同数量.',dictCode:''})
  417. fieldList.push({type:'int',value:'htys',text:'合同页数.',dictCode:''})
  418. fieldList.push({type:'string',value:'htzgbm',text:'合同主管部门.',dictCode:''})
  419. fieldList.push({type:'string',value:'htzt',text:'合同状态.',dictCode:''})
  420. fieldList.push({type:'string',value:'htztsm',text:'合同状态说明.',dictCode:''})
  421. fieldList.push({type:'string',value:'jf',text:'甲方(付款方).',dictCode:''})
  422. fieldList.push({type:'string',value:'jfyhjc',text:'甲方简称、用户简称.',dictCode:''})
  423. fieldList.push({type:'string',value:'jd',text:'阶段.',dictCode:''})
  424. fieldList.push({type:'BigDecimal',value:'jeskzkp',text:'金额(元)、收款总金额、开票金额.',dictCode:''})
  425. fieldList.push({type:'date',value:'kpsj',text:'开票时间.'})
  426. fieldList.push({type:'string',value:'kpzt',text:'开票状态.',dictCode:''})
  427. fieldList.push({type:'string',value:'khid',text:'客户id.',dictCode:''})
  428. fieldList.push({type:'string',value:'lxr',text:'联系人(对方).',dictCode:''})
  429. fieldList.push({type:'date',value:'qclrsqrq',text:'起草日期、录入日期、申请日期.'})
  430. fieldList.push({type:'string',value:'rwbh',text:'任务编号.',dictCode:''})
  431. fieldList.push({type:'string',value:'rwmc',text:'任务名称.',dictCode:''})
  432. fieldList.push({type:'int',value:'sjly',text:'数据来源:10:合同管理,20:合同任务,30:任务合同,40:合同付款,50:合同发票,60:外协合同.',dictCode:''})
  433. fieldList.push({type:'string',value:'ssxh',text:'所属型号.',dictCode:''})
  434. fieldList.push({type:'string',value:'xmmj',text:'项目密级.',dictCode:''})
  435. fieldList.push({type:'string',value:'xh',text:'序号.',dictCode:''})
  436. fieldList.push({type:'string',value:'yzbm',text:'研制部门.',dictCode:''})
  437. fieldList.push({type:'string',value:'ywy',text:'业务员.',dictCode:''})
  438. fieldList.push({type:'string',value:'yf',text:'乙方(收款方).',dictCode:''})
  439. fieldList.push({type:'BigDecimal',value:'ykp',text:'已开票(元).',dictCode:''})
  440. fieldList.push({type:'BigDecimal',value:'ysk',text:'已收款.',dictCode:''})
  441. fieldList.push({type:'string',value:'yhid',text:'用户id.',dictCode:''})
  442. fieldList.push({type:'string',value:'zgsjs',text:'主管设计师.',dictCode:''})
  443. fieldList.push({type:'string',value:'zzbm',text:'抓总部门.',dictCode:''})
  444. fieldList.push({type:'BigDecimal',value:'zc',text:'自筹(元).',dictCode:''})
  445. fieldList.push({type:'string',value:'pici',text:'类型(无用).',dictCode:''})
  446. this.superFieldList = fieldList
  447. }
  448. }
  449. }
  450. </script>
  451. <style scoped>
  452. @import '~@assets/less/common.less';
  453. </style>
  454. <style lang="less" scoped>
  455. .u-dialog-card{
  456. /deep/.ant-card-body{
  457. padding: 0 !important;
  458. }
  459. }
  460. </style>