nonProcessTemplate.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <div>
  3. <el-drawer
  4. :title="$t('新建确认单')"
  5. :visible.sync="drawerVisible"
  6. size="85%"
  7. direction="rtl"
  8. append-to-body
  9. @close="onClose">
  10. <div class="drawer__panel" style="margin-bottom: 0px !important;" v-if="dataInfo.workorder">
  11. <el-descriptions :title="$t(`单据信息`)" >
  12. <el-descriptions-item :label="$t(`服务申请单号`)"><span style="color: #666">{{$t(dataInfo.workorder.servicebillno) || '--'}}</span></el-descriptions-item>
  13. <el-descriptions-item :label="$t(`项目名称`)"><span style="color: #666">{{$t(dataInfo.workorder.projectname)}}</span></el-descriptions-item>
  14. <el-descriptions-item :label="$t(`是否有偿服务`)"><span style="color: #666">{{paidServiceAmount > 0 ? $t('是') : $t('否')}}</span></el-descriptions-item>
  15. <el-descriptions-item :label="$t(`是否质保期内`)"><span style="color: #666">{{inqualityguaranteeperiod == 1 ? $t('是') : $t('否')}}</span></el-descriptions-item>
  16. <el-descriptions-item :label="$t(`申请原因`)"><span style="color: #666">{{$t(dataInfo.reason) || '--'}}</span></el-descriptions-item>
  17. </el-descriptions>
  18. <el-descriptions :title="$t(`应用信息`)" style="margin-top: 10px">
  19. <el-descriptions-item :label="$t(`应用系统`)"><span style="color: #666">{{$t(dataInfo.workorder.class1) || '--'}}</span></el-descriptions-item>
  20. <el-descriptions-item :label="$t(`客诉大类`)"><span style="color: #666">{{$t(dataInfo.workorder.class2) || '--'}}</span></el-descriptions-item>
  21. <el-descriptions-item :label="$t(`服务方式`)"><span style="color: #666">{{$t(dataInfo.workorder.type) || '--'}}</span></el-descriptions-item>
  22. </el-descriptions>
  23. <el-descriptions :title="$t(`客户信息`)" style="margin-top: 10px">
  24. <el-descriptions-item :label="$t(`企业名称`)"><span style="color: #666">{{$t(dataInfo.workorder.abbreviation) || '--'}}</span></el-descriptions-item>
  25. <el-descriptions-item :label="$t(`联系方式`)"><span style="color: #666">{{$t(dataInfo.workorder.scenecontactphonenumber) || '--'}}</span></el-descriptions-item>
  26. <el-descriptions-item :label="$t(`服务地址`)"><span style="color: #666">{{$t(dataInfo.workorder.province + dataInfo.workorder.city + dataInfo.workorder.county + dataInfo.workorder.address)}}</span></el-descriptions-item>
  27. </el-descriptions>
  28. </div>
  29. <div style="height: 10px;background: #f5f5f5"></div>
  30. <div style="margin: 10px;font-weight: bold;font-size: 16px">{{$t(`产品`)}}</div>
  31. <div class="drawer__panel" style="margin-bottom: 0 !important;" v-if="dataInfo.trainertitems">
  32. <tableDetailLayout
  33. :layout="tablecols"
  34. :data="dataInfo.trainertitems"
  35. :opwidth="200"
  36. :width="true"
  37. :custom="true">
  38. <template v-slot:customcol="scope">
  39. <div v-if="scope.column.columnname === 'nominalpressure'">
  40. {{tool.nominalPressureSet(scope.column.data[scope.column.columnname])}}
  41. </div>
  42. <div v-else>
  43. {{
  44. $t(scope.column.data[[scope.column.columnname]])
  45. ? $t(scope.column.data[[scope.column.columnname]])
  46. : "--"
  47. }}
  48. </div>
  49. </template>
  50. </tableDetailLayout>
  51. </div>
  52. <div style="height: 10px;background: #f5f5f5"></div>
  53. <div style="margin: 10px;font-weight: bold;font-size: 16px">{{$t(`评价`)}}</div>
  54. <div class="drawer__panel" style="margin-bottom: 0 !important;">
  55. <div style="display: flex;justify-content: space-between">
  56. <div style="display: flex;justify-content: left">
  57. <div style="color: #999;font-size: 14px;margin-right: 10px">{{$t(`反应速度`)}}:</div>
  58. <el-rate v-model="dataInfo.responsescore" @change="changeRate"></el-rate>
  59. </div>
  60. <div style="display: flex;justify-content: left">
  61. <div style="color: #999;font-size: 14px;margin-right: 10px">{{$t(`配合态度`)}}:</div>
  62. <el-rate v-model="dataInfo.attitudescore" @change="changeRate"></el-rate>
  63. </div>
  64. <div style="display: flex;justify-content: left">
  65. <div style="color: #999;font-size: 14px;margin-right: 10px">{{$t(`满意态度`)}}:</div>
  66. <el-rate v-model="dataInfo.satisfaction" @change="changeRate"></el-rate>
  67. </div>
  68. </div>
  69. </div>
  70. <div style="height: 10px;background: #f5f5f5"></div>
  71. <div style="margin: 10px;font-weight: bold;font-size: 16px">{{$t(`客户签字`)}}</div>
  72. <div class="drawer__panel" style="margin-bottom: 20px !important;">
  73. <signature ref="signatureRef" :sa_workorder_confirmationid="sa_workorder_confirmationid"></signature>
  74. </div>
  75. <div style="height: 25px;background: #f5f5f5"></div>
  76. <div class="fixed__btn__panel">
  77. <el-button
  78. size="small"
  79. type="primary"
  80. class="normal-btn-width"
  81. >{{ $t("提交") }}</el-button
  82. >
  83. </div>
  84. </el-drawer>
  85. </div>
  86. </template>
  87. <script>
  88. import signature from '@/HDrpManagement/serveWorkBill/modules/signature/index'
  89. export default {
  90. name: "nonProcessTemplate",//非工序模板,
  91. components:{signature},
  92. data(){
  93. return {
  94. dataInfo:{},
  95. paidServiceAmount:'',
  96. inqualityguaranteeperiod:'',
  97. drawerVisible:false,
  98. tablecols:[],
  99. sa_workorder_confirmationid:''
  100. }
  101. },
  102. methods:{
  103. async queryInfo(id){
  104. this.sa_workorder_confirmationid = id
  105. const res = await this.$api.requested({
  106. "id": "20230211105803",
  107. "content": {
  108. "sa_workorder_confirmationid": id,
  109. nocache: true
  110. }
  111. })
  112. console.log(res.data)
  113. let ishave = false
  114. res.data.confirmationcontent.forEach(item => {
  115. if (item.nextTreatmentTime) {
  116. ishave = true
  117. }
  118. })
  119. if (!ishave) {
  120. let arr = [{
  121. nextTreatmentTime: {
  122. confirm_value: ''
  123. }
  124. }, {
  125. treatment: {
  126. confirm_value: ''
  127. }
  128. }, {
  129. explain: {
  130. confirm_value: ''
  131. }
  132. }, {
  133. repairResult: {
  134. confirm_value: ''
  135. }
  136. }, {
  137. rebackTime: {
  138. confirm_value: ''
  139. }
  140. }, {
  141. nextRebackTime: {
  142. confirm_value: ''
  143. }
  144. }, {
  145. text: {
  146. confirm_value: ''
  147. }
  148. }]
  149. arr.forEach(e => {
  150. res.data.confirmationcontent.push(e)
  151. }, this)
  152. }
  153. this.dataInfo = res.data
  154. this.setInputData()
  155. this.drawerVisible = true
  156. this.$nextTick(()=>{
  157. this.$refs.signatureRef.getField()
  158. })
  159. },
  160. setInputData() {
  161. let that = this
  162. that.dataInfo.confirmationcontent.forEach(e => {
  163. Object.keys(e).map((key, index) => {
  164. that.paidServiceAmount = that.paidServiceAmount + e[key].amount
  165. if (key === 'nextTreatmentTime') {
  166. that.nextTreatmentTime = e[key].confirm_value
  167. }
  168. if (key === 'treatment') {
  169. that.treatment = e[key].confirm_value
  170. }
  171. if (key === 'explain') {
  172. that.explain = e[key].confirm_value
  173. }
  174. if (key === 'nextRebackTime') {
  175. that.nextRebackTime = e[key].confirm_value
  176. }
  177. if (key === 'text') {
  178. that.text = e[key].confirm_value
  179. }
  180. })
  181. })
  182. },
  183. async changeRate(){
  184. console.log(this.dataInfo,'detaInfo')
  185. const res = await this.$api.requested({
  186. "id":"20230211105703",
  187. "content":this.dataInfo
  188. })
  189. },
  190. onClose(){
  191. this.$refs.signatureRef.btnTitle = ''
  192. this.$refs.signatureRef.signatureData = null
  193. this.$refs.signatureRef.signatureStarted = false
  194. this.$emit('onClose')
  195. }
  196. },
  197. mounted() {
  198. this.tablecols = this.tool.tabelCol(this.$route.name).serviceProductBillTable.tablecols
  199. }
  200. }
  201. </script>
  202. <style scoped>
  203. </style>