RepairPayDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. <template>
  2. <div style="padding-bottom:20px;">
  3. <el-row :gutter="15">
  4. <el-col :span="8">
  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.repairCode }}</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.statusName}}</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.customerName}}</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.groupName}}</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">{{customerCard.typeName }}</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.receiverName}}</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.serviceBeginDate }}</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.serviceSuccessDate }}</span>
  71. </el-col>
  72. </el-row>
  73. <el-row :gutter="10" class="cust-card-row">
  74. <el-col :span="8">
  75. <span class="cust-card-tt">服务人员:</span>
  76. </el-col>
  77. <el-col :span="16">
  78. <span class="cust-card-ct">{{customerCard.employeeName }}</span>
  79. </el-col>
  80. </el-row>
  81. <el-row :gutter="10" class="cust-card-row">
  82. <el-col :span="8">
  83. <span class="cust-card-tt">沟通结果:</span>
  84. </el-col>
  85. <el-col :span="16">
  86. <span class="cust-card-ct">{{customerCard.talkResult }}</span>
  87. </el-col>
  88. </el-row>
  89. <el-row :gutter="10" class="cust-card-row">
  90. <el-col :span="8">
  91. <span class="cust-card-tt">问题详情:</span>
  92. </el-col>
  93. <el-col :span="16">
  94. <span class="cust-card-ct">{{customerCard.problem }}</span>
  95. </el-col>
  96. </el-row>
  97. <el-row :gutter="10" class="cust-card-row">
  98. <el-col :span="8">
  99. <span class="cust-card-tt">备注:</span>
  100. </el-col>
  101. <el-col :span="16">
  102. <span class="cust-card-ct">{{customerCard.remark }}</span>
  103. </el-col>
  104. </el-row>
  105. <el-divider></el-divider>
  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">{{customerCard.repairResult }}</span>
  112. </el-col>
  113. </el-row>
  114. <el-row :gutter="10" class="cust-card-row">
  115. <el-col :span="8">
  116. <span class="cust-card-tt">快递单号:</span>
  117. </el-col>
  118. <el-col :span="16">
  119. <span class="cust-card-ct">{{customerCard.postCode }}</span>
  120. </el-col>
  121. </el-row>
  122. <el-row :gutter="10" class="cust-card-row">
  123. <el-col :span="8">
  124. <span class="cust-card-tt">款项状态:</span>
  125. </el-col>
  126. <el-col :span="16">
  127. <span class="cust-card-ct">{{customerCard.costStatus }}</span>
  128. </el-col>
  129. </el-row>
  130. <el-row :gutter="10" class="cust-card-row">
  131. <el-col :span="8">
  132. <span class="cust-card-tt">服务费用:</span>
  133. </el-col>
  134. <el-col :span="16">
  135. <span class="cust-card-ct">{{customerCard.serviceCost }}</span>
  136. </el-col>
  137. </el-row>
  138. <el-row :gutter="10" class="cust-card-row">
  139. <el-col :span="8">
  140. <span class="cust-card-tt">支付时间:</span>
  141. </el-col>
  142. <el-col :span="16">
  143. <span class="cust-card-ct">{{customerCard.payDate }}</span>
  144. </el-col>
  145. </el-row>
  146. <el-row :gutter="10" class="cust-card-row">
  147. <el-col :span="8">
  148. <span class="cust-card-tt">收款时间:</span>
  149. </el-col>
  150. <el-col :span="16">
  151. <span class="cust-card-ct">{{customerCard.collectDate }}</span>
  152. </el-col>
  153. </el-row>
  154. <el-row :gutter="10" class="cust-card-row">
  155. <el-col :span="8">
  156. <span class="cust-card-tt">服务总结:</span>
  157. </el-col>
  158. <el-col :span="16">
  159. <span class="cust-card-ct">{{customerCard.serviceSummary }}</span>
  160. </el-col>
  161. </el-row>
  162. </div>
  163. <!-- <div v-for="o in 4" :key="o" class="text item">
  164. {{'列表内容 ' + o }}
  165. </div> -->
  166. </el-card>
  167. </el-col>
  168. <el-col :span="16">
  169. <h3>备货单信息</h3>
  170. <el-form ref="temp" :model="stockCard" label-position="right" label-width="150px" style="width: 95%;margin:0 auto 50px">
  171. <el-row>
  172. <el-col :span="12">
  173. <el-form-item label="备货单号:" prop="orderDate">
  174. <el-input v-model="stockCard.stockupCode" placeholder="" style="width:100%" disabled></el-input>
  175. </el-form-item>
  176. </el-col>
  177. <el-col :span="12">
  178. <el-form-item label="订单来源:" prop="orderDate">
  179. <el-input v-model="stockCard.sourceName" placeholder="" style="width:100%" disabled></el-input>
  180. </el-form-item>
  181. </el-col>
  182. </el-row>
  183. <el-row>
  184. <el-col :span="12">
  185. <el-form-item label="下单日期:" prop="orderDate">
  186. <el-input v-model="stockCard.orderDate" placeholder="" style="width:100%" disabled></el-input>
  187. </el-form-item>
  188. </el-col>
  189. <el-col :span="12">
  190. <el-form-item label="关联接收快递:" prop="orderDate">
  191. <el-input v-model="stockCard.postalName" placeholder="" style="width:100%" disabled></el-input>
  192. </el-form-item>
  193. </el-col>
  194. </el-row>
  195. <el-row>
  196. <el-col :span="12">
  197. <el-form-item label="备货原因:" prop="orderDate">
  198. <el-input v-model="stockCard.reasonName" placeholder="" style="width:100%" disabled></el-input>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="12">
  202. <el-form-item label="预定发货时间:" prop="orderDate">
  203. <el-input v-model="stockCard.planSendDate" placeholder="" style="width:100%" disabled></el-input>
  204. </el-form-item>
  205. </el-col>
  206. </el-row>
  207. <el-row>
  208. <el-col :span="24">
  209. <el-form-item label="备注:" prop="orderDate">
  210. <el-input v-model="stockCard.remark" placeholder="" style="width:100%" disabled></el-input>
  211. </el-form-item>
  212. </el-col>
  213. </el-row>
  214. </el-form>
  215. <h3>备货清单</h3>
  216. <el-row>
  217. <el-table :data="tableStockList" border fit highlight-current-row style="width: 100%;" :row-style="rowStyle" :cell-style="cellStyle" class="elTable table-fixed">
  218. <el-table-column label="序号" align="center" type="index" width="50px">
  219. <template slot-scope="scope">
  220. <span>{{ scope.$index + 1 }}</span>
  221. </template>
  222. </el-table-column>
  223. <el-table-column label="类别" min-width="110px" align="center">
  224. <template slot-scope="scope">
  225. <span>{{ scope.row.categoryName }}</span>
  226. </template>
  227. </el-table-column>
  228. <el-table-column label="型号" min-width="110px" align="center">
  229. <template slot-scope="scope">
  230. <span>{{ scope.row.model }}</span>
  231. </template>
  232. </el-table-column>
  233. <el-table-column label="规格" min-width="110px" align="center">
  234. <template slot-scope="scope">
  235. <span>{{ scope.row.Specifications }}</span>
  236. </template>
  237. </el-table-column>
  238. <el-table-column label="名称" min-width="110px" align="center">
  239. <template slot-scope="scope">
  240. <span>{{ scope.row.productsName }}</span>
  241. </template>
  242. </el-table-column>
  243. <el-table-column label="数量" min-width="110px" align="center">
  244. <template slot-scope="scope">
  245. <span>{{ scope.row.nums }}</span>
  246. </template>
  247. </el-table-column>
  248. <el-table-column label="单价(元)" min-width="110px" align="center">
  249. <template slot-scope="scope">
  250. <span>{{ scope.row.price }}</span>
  251. </template>
  252. </el-table-column>
  253. <el-table-column label="总价(元)" min-width="110px" align="center">
  254. <template slot-scope="scope">
  255. <span>{{ scope.row.sumPrice }}</span>
  256. </template>
  257. </el-table-column>
  258. <el-table-column label="备注" min-width="280px" align="center">
  259. <template slot-scope="scope">
  260. <span>{{ scope.row.remark }}</span>
  261. </template>
  262. </el-table-column>
  263. </el-table>
  264. </el-row>
  265. <el-row type="flex" justify="end">
  266. <el-col style="color:#FF4949" :span="6" :offset="18">列表货物总价:{{stockSumPrice}}</el-col>
  267. </el-row>
  268. <el-divider></el-divider>
  269. <h3>反馈记录</h3>
  270. <el-row >
  271. <div v-for="(item) in feedRecordList" >
  272. <div>
  273. <span> {{item.sort }} . </span>
  274. <span>{{item.remark }}</span>
  275. </div>
  276. <el-row type="flex" justify="end">
  277. <el-col :span="6">
  278. {{item.createDate }}
  279. </el-col>
  280. <el-col :span="6">
  281. 反馈人:{{item.employeeName}}
  282. </el-col>
  283. </el-row>
  284. <el-divider></el-divider>
  285. </div>
  286. </el-row>
  287. </el-col>
  288. </el-row>
  289. </div>
  290. </template>
  291. <script>
  292. import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons, calculativeWidth } from '@/api/common'
  293. import Cookies from 'js-cookie'
  294. import { parseTime } from '@/utils/index.js'
  295. import Pagination from '@/components/Pagination'
  296. import { MessageBox } from 'element-ui'
  297. import { getToken } from '@/utils/auth'
  298. export default {
  299. name: 'RepairPayDetail',
  300. props: {
  301. repairData: {
  302. type: Object,
  303. required: true
  304. }
  305. },
  306. data() {
  307. return {
  308. customerCard: {
  309. // "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"
  310. },
  311. stockCard: {
  312. // "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"
  313. },
  314. //备货表格
  315. tableStockList:[],
  316. //反馈记录
  317. feedRecordList:[
  318. // {id:1, num: 1, txt: '主板缺失零件,疫情关系,无法采购,延期1天', director:'epans', date:"2022-12-01"},
  319. // {id:1, num: 1, txt: '主板缺失零件,疫情关系,无法采购,延期1天', director:'epans', date:"2022-12-01"},
  320. // {id:1, num: 1, txt: '主板缺失零件,疫情关系,无法采购,延期1天', director:'epans', date:"2022-12-01"},
  321. ],
  322. stockSumPrice:0,
  323. requestParam: {},
  324. isokDisable: false,
  325. selectList: [],
  326. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  327. cellStyle: { padding: 0 + 'px' }
  328. }
  329. },
  330. watch: {
  331. repairData: {
  332. deep: true,
  333. handler: function (item) {
  334. console.log("父组件:", item)
  335. this.get_card_list()
  336. this.get_feedRecord()
  337. }
  338. },
  339. tableStockList: {
  340. deep: true,
  341. handler: function (item) {
  342. //计算总价格
  343. var sum = 0
  344. this.tableStockList.forEach(function(i){
  345. sum = parseInt(i.nums) * parseFloat(i.price) + sum
  346. })
  347. this.stockSumPrice = sum
  348. }
  349. },
  350. },
  351. mounted() {
  352. },
  353. created() {
  354. this.get_card_list()
  355. this.get_feedRecord()
  356. },
  357. beforeDestroy() {
  358. },
  359. methods: {
  360. //AJAX事件 - 获取服务款项详情
  361. get_card_list() {
  362. var send_data = {
  363. name: 'getRepairCostById',
  364. parammaps: {
  365. id:this.repairData.id,
  366. }
  367. }
  368. GetDataByName(send_data).then(response => {
  369. console.log('卡片服务款项详情数据', response )
  370. if (response.data.list !== null) {
  371. this.customerCard = response.data.list[0]
  372. this.get_stock_card()
  373. this.get_tableStock()
  374. } else {
  375. this.customerCard = {}
  376. }
  377. })
  378. },
  379. // 备货表格
  380. get_tableStock() {
  381. var send_data4 = {
  382. name: 'getStockGoodsBySid',
  383. parammaps: {
  384. id:this.customerCard.stockupId,
  385. }
  386. }
  387. GetDataByName(send_data4).then(response => {
  388. console.log("备货", response.data.list)
  389. if (response.data.list !== null) {
  390. this.tableStockList = response.data.list
  391. }else{
  392. this.tableStockList = []
  393. }
  394. })
  395. },
  396. // 备货表格
  397. get_stock_card() {
  398. var send_data5 = {
  399. name: 'getStockupById',
  400. parammaps: {
  401. id:this.customerCard.stockupId,
  402. }
  403. }
  404. GetDataByName(send_data5).then(response => {
  405. console.log('详情数据', response )
  406. if (response.data.list !== null) {
  407. this.stockCard = response.data.list[0]
  408. } else {
  409. this.stockCard = {}
  410. }
  411. })
  412. },
  413. // 查看中的反馈记录
  414. get_feedRecord() {
  415. var send_data3 = {
  416. name: 'getRepairFeedbackById',
  417. parammaps: {
  418. id:this.repairData.id,
  419. }
  420. }
  421. GetDataByName(send_data3).then(response => {
  422. console.log("查看中的反馈记录", response.data.list)
  423. if (response.data.list !== null) {
  424. this.feedRecordList = response.data.list
  425. } else {
  426. this.feedRecordList = []
  427. }
  428. })
  429. }
  430. }
  431. }
  432. </script>