ContractCustomerDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. <template>
  2. <div style="padding-bottom:20px;">
  3. <el-row :gutter="5">
  4. <el-col :span="8" :gutter="20">
  5. <el-card class="box-card">
  6. <div slot="header" class="clearfix">
  7. <el-row :gutter="10" style="font-size:20px;font-weight:bold">
  8. <el-col :span="8">
  9. <span style="float:right">客户名称:</span>
  10. </el-col>
  11. <el-col :span="16">
  12. <span>{{customerCard.customerName}}</span>
  13. </el-col>
  14. </el-row>
  15. </div>
  16. <div>
  17. <el-row :gutter="10" class="cust-card-row">
  18. <el-col :span="8">
  19. <span class="cust-card-tt">所属集团:</span>
  20. </el-col>
  21. <el-col :span="16">
  22. <span class="cust-card-ct">{{customerCard.groupName}}</span>
  23. </el-col>
  24. </el-row>
  25. <el-row :gutter="10" class="cust-card-row">
  26. <el-col :span="8">
  27. <span class="cust-card-tt">合同开始时间:</span>
  28. </el-col>
  29. <el-col :span="16">
  30. <span class="cust-card-ct">{{customerCard.contractBeginDate}}</span>
  31. </el-col>
  32. </el-row>
  33. <el-row :gutter="10" class="cust-card-row">
  34. <el-col :span="8">
  35. <span class="cust-card-tt">合同结束时间:</span>
  36. </el-col>
  37. <el-col :span="16">
  38. <span class="cust-card-ct">{{customerCard.contractEndDate}}</span>
  39. </el-col>
  40. </el-row>
  41. <el-row :gutter="10" class="cust-card-row">
  42. <el-col :span="8">
  43. <span class="cust-card-tt">货物信息:</span>
  44. </el-col>
  45. <el-col :span="16">
  46. <span class="cust-card-ct" style = "color:#409EFF; cursor: pointer;" @click="form_see()">查看</span>
  47. </el-col>
  48. </el-row>
  49. <el-row :gutter="10" class="cust-card-row">
  50. <el-col :span="8">
  51. <span class="cust-card-tt">款项分期:</span>
  52. </el-col>
  53. <el-col :span="16">
  54. <span class="cust-card-ct">{{customerCard.moneyStep }}</span>
  55. </el-col>
  56. </el-row>
  57. <el-row :gutter="10" class="cust-card-row">
  58. <el-col :span="8">
  59. <span class="cust-card-tt">合同金额(元):</span>
  60. </el-col>
  61. <el-col :span="16">
  62. <span class="cust-card-ct">{{customerCard.contractMoney }}</span>
  63. </el-col>
  64. </el-row>
  65. <el-row :gutter="10" class="cust-card-row">
  66. <el-col :span="8">
  67. <span class="cust-card-tt">技术服务费:</span>
  68. </el-col>
  69. <el-col :span="16">
  70. <span class="cust-card-ct">{{customerCard.serviceCost }}</span>
  71. </el-col>
  72. </el-row>
  73. <block v-for="item in cardStagesList" >
  74. <el-row :gutter="10" class="cust-card-row">
  75. <el-col :span="8">
  76. <span class="cust-card-tt">期数:</span>
  77. </el-col>
  78. <el-col :span="16">
  79. <span class="cust-card-ct">{{item.stages }}</span>
  80. </el-col>
  81. </el-row>
  82. <el-row :gutter="10" class="cust-card-row">
  83. <el-col :span="8">
  84. <span class="cust-card-tt">应收金额占比:</span>
  85. </el-col>
  86. <el-col :span="16">
  87. <span class="cust-card-ct">{{item.planCostRate }}</span>
  88. </el-col>
  89. </el-row>
  90. <el-row :gutter="10" class="cust-card-row">
  91. <el-col :span="8">
  92. <span class="cust-card-tt">应收金额(元):</span>
  93. </el-col>
  94. <el-col :span="16">
  95. <span class="cust-card-ct">{{item.planCost}}</span>
  96. </el-col>
  97. </el-row>
  98. <el-row :gutter="10" class="cust-card-row">
  99. <el-col :span="8">
  100. <span class="cust-card-tt">回款金额(元):</span>
  101. </el-col>
  102. <el-col :span="16">
  103. <span class="cust-card-ct">{{item.returnCost}}</span>
  104. </el-col>
  105. </el-row>
  106. <el-row :gutter="10" class="cust-card-row">
  107. <el-col :span="8">
  108. <span class="cust-card-tt">收款时间:</span>
  109. </el-col>
  110. <el-col :span="16">
  111. <span class="cust-card-ct">{{item.getCostDate }}</span>
  112. </el-col>
  113. </el-row>
  114. </block>
  115. <el-row :gutter="10" class="cust-card-row">
  116. <el-col :span="8">
  117. <span class="cust-card-tt">备注:</span>
  118. </el-col>
  119. <el-col :span="16">
  120. <span class="cust-card-ct">{{customerCard.remark }}</span>
  121. </el-col>
  122. </el-row>
  123. </div>
  124. <!-- <div v-for="o in 4" :key="o" class="text item">
  125. {{'列表内容 ' + o }}
  126. </div> -->
  127. </el-card>
  128. </el-col>
  129. <el-col :span="16" :gutter="20">
  130. <div>
  131. <el-divider></el-divider>
  132. <div class="block" style="height:320px;overflow:auto">
  133. <el-timeline>
  134. <el-timeline-item type="success" color="#409EFF" size="large" :timestamp="item.resumeTime" placement="top" v-for="item in customerResumeList" class = "cust-line-bx">
  135. <div style="position: absolute;top:0px;right:0px;">
  136. <span>负责人:</span>
  137. <span>{{item.employeeName}}</span>
  138. </div>
  139. <el-card>
  140. <div class = "cust-ex-item">
  141. <span class = "cust-ex-tt">业务:</span>
  142. <span class = "cust-ex-ct">{{item.typeName}}</span>
  143. </div>
  144. <div class = "cust-ex-item">
  145. <span class = "cust-ex-tt">状态:</span>
  146. <span class = "cust-ex-ct">{{item.statusName}}</span>
  147. </div>
  148. <!-- <div class = "cust-ex-item">
  149. <span class = "cust-ex-tt">详情:</span>
  150. <span class = "cust-ex-ct">{{item.businessName}}</span>
  151. </div> -->
  152. </el-card>
  153. </el-timeline-item>
  154. </el-timeline>
  155. </div>
  156. <el-divider></el-divider>
  157. </div>
  158. </el-col>
  159. </el-row>
  160. <!-- 新增/编辑 -->
  161. <el-dialog title="货物详情" :visible.sync="createSee.dialogFormVisible" append-to-body width="95%">
  162. <div class="table" style="margin-top:140px">
  163. <el-table :key="tableObj.tableKey" v-loading="tableObj.listLoading" element-loading-text="给我一点时间" :data="tableObj.list" border fit highlight-current-row style="width: 100%;" :row-style="rowStyle" :cell-style="cellStyle" class="elTable table-fixed">
  164. <el-table-column label="序号" align="center" type="index" width="50px">
  165. <template slot-scope="scope">
  166. <span>{{ scope.$index + 1 }}</span>
  167. </template>
  168. </el-table-column>
  169. <el-table-column label="货品名称" min-width="110px" align="center">
  170. <template slot-scope="scope">
  171. <span>{{ scope.row.productsName }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column label="型号" min-width="110px" align="center">
  175. <template slot-scope="scope">
  176. <span>{{ scope.row.model }}</span>
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="规格" min-width="110px" align="center">
  180. <template slot-scope="scope">
  181. <span>{{ scope.row.Specifications }}</span>
  182. </template>
  183. </el-table-column>
  184. <el-table-column label="数量" min-width="110px" align="center">
  185. <template slot-scope="scope">
  186. <span>{{ scope.row.nums }}</span>
  187. </template>
  188. </el-table-column>
  189. <el-table-column label="单价(元)" min-width="110px" align="center">
  190. <template slot-scope="scope">
  191. <span>{{ scope.row.price }}</span>
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="总价(元)" min-width="110px" align="center">
  195. <template slot-scope="scope">
  196. <span>{{ scope.row.sumPrice }}</span>
  197. </template>
  198. </el-table-column>
  199. <el-table-column label="备注" min-width="280px" align="center">
  200. <template slot-scope="scope">
  201. <span>{{ scope.row.remark }}</span>
  202. </template>
  203. </el-table-column>
  204. </el-table>
  205. <pagination v-show="tableObj.total>=0" :total="tableObj.total" :page.sync="tableObj.getdataListParm.offset" :limit.sync="tableObj.getdataListParm.pagecount" @pagination="get_table_data" />
  206. </div>
  207. <div slot="footer" class="dialog-footer">
  208. <el-button class="cancelClose" @click="createSee.dialogFormVisible = false">关闭</el-button>
  209. </div>
  210. </el-dialog>
  211. </div>
  212. </template>
  213. <script>
  214. import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons, calculativeWidth } from '@/api/common'
  215. import Cookies from 'js-cookie'
  216. import { parseTime } from '@/utils/index.js'
  217. import Pagination from '@/components/Pagination'
  218. import { MessageBox } from 'element-ui'
  219. import { getToken } from '@/utils/auth'
  220. export default {
  221. name: 'ContractCustomerDetail',
  222. props: {
  223. concustomerData: {
  224. type: Object,
  225. required: true
  226. }
  227. },
  228. data() {
  229. return {
  230. customerCard: {
  231. // "address":"1","createrId":"3072707379235128328","createrName":"管理员","createtime":"2022-05-11","customeLevelName":"2级","customeStatusName":"欠款客户","customerName":"测试12","directorId":24,"directorName":"康亮","enable":1,"groupId":207,"groupName":"星连星牧业","id":1425,"province":"1","rangeName":"西北区域","remark":"","scode":"123456789012345678"
  232. },
  233. //列表请求
  234. tableObj: {
  235. getdataListParm: {
  236. name: 'getContractGoodsByCid2',
  237. page: 1,
  238. offset: 1,
  239. pagecount: 10,
  240. returntype: 'Map',
  241. parammaps: {
  242. id: ''
  243. }
  244. },
  245. tableKey: 0,
  246. list: [],
  247. total: 0,
  248. listLoading: true,
  249. },
  250. customerResumeList:[
  251. // {id:1, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-01"},
  252. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  253. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  254. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  255. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  256. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  257. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  258. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  259. // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
  260. ],
  261. cardStagesList:[],
  262. createSee: {
  263. dialogFormVisible: false,
  264. },
  265. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  266. cellStyle: { padding: 0 + 'px' }
  267. }
  268. },
  269. watch: {
  270. concustomerData: {
  271. deep: true,
  272. handler: function (item) {
  273. console.log("concustomerData父组件:", item)
  274. this.get_card_list()
  275. this.get_card_stages()
  276. this.get_resume_list()
  277. }
  278. },
  279. },
  280. mounted() {
  281. },
  282. created() {
  283. this.get_card_list()
  284. this.get_card_stages()
  285. this.get_resume_list()
  286. },
  287. beforeDestroy() {
  288. },
  289. methods: {
  290. //AJAX事件 - 获取卡片
  291. get_card_list() {
  292. var send_data = {
  293. name: 'getContractApplicationById',
  294. parammaps: {
  295. id:this.concustomerData.id,
  296. }
  297. }
  298. GetDataByName(send_data).then(response => {
  299. console.log('卡片数据', response )
  300. if (response.data.list !== null) {
  301. this.customerCard = response.data.list[0]
  302. } else {
  303. this.customerCard = {}
  304. }
  305. })
  306. },
  307. //AJAX事件 - 获取卡片 - 款项分期
  308. get_card_stages(){
  309. console.log("测试==============")
  310. var send_data2 = {
  311. name: 'getContractCost',
  312. parammaps: {
  313. id:this.concustomerData.id,
  314. }
  315. }
  316. GetDataByName(send_data2).then(response => {
  317. console.log('卡片款项分期数据', response )
  318. if (response.data.list !== null) {
  319. this.cardStagesList = response.data.list
  320. } else {
  321. this.cardStagesList = []
  322. }
  323. })
  324. },
  325. //AJAX事件 - 获取卡片列表
  326. get_resume_list() {
  327. var send_data2 = {
  328. name: 'getContractResume',
  329. parammaps: {
  330. id:this.concustomerData.id,
  331. }
  332. }
  333. GetDataByName(send_data2).then(response => {
  334. console.log('卡片列表数据', response )
  335. if (response.data.list !== null) {
  336. this.customerResumeList = response.data.list
  337. } else {
  338. this.customerResumeList = []
  339. }
  340. })
  341. },
  342. //查看货物信息
  343. form_see() {
  344. this.createSee.dialogFormVisible = true
  345. this.tableObj.getdataListParm.parammaps.id = this.concustomerData.id
  346. this.get_table_data()
  347. },
  348. //加载表格
  349. get_table_data() {
  350. this.tableObj.listLoading = true
  351. console.log("this.tableObj.getdataListParm======>", this.tableObj.getdataListParm)
  352. GetDataByName(this.tableObj.getdataListParm).then(response => {
  353. console.log('table数据======>', response.data.list)
  354. if (response.data.list !== null) {
  355. this.tableObj.list = response.data.list
  356. this.tableObj.pageNum = response.data.pageNum
  357. this.tableObj.pageSize = response.data.pageSize
  358. this.tableObj.total = response.data.total
  359. console.log('table数据======>', this.tableObj.list)
  360. } else {
  361. this.tableObj.list = []
  362. }
  363. setTimeout(() => {
  364. this.tableObj.listLoading = false
  365. }, 100)
  366. })
  367. }
  368. }
  369. }
  370. </script>