opiniondetails.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view style="width: 100%;height: 100%;background-color: #F6F6F6;">
  3. <!-- 表单弹窗 -->
  4. <u-popup v-model="formshow" mode="center" border-radius="14" :closeable="false">
  5. <view style="width: 75vw;height: 60vh">
  6. <view class="flex justify-center align-center" style="height: 20%;font-size: 34rpx;font-weight: bold;">补充意见</view>
  7. <view style="height: 60%;padding: 0 40rpx;">
  8. <!-- 病症 -->
  9. <view class="flex align-center" style="padding-bottom: 20rpx;margin-bottom: 20rpx;border-bottom: 1rpx solid #999999;">
  10. <text style="margin-right: 20rpx;font-weight: 500;font-size: 28rpx;">原因:</text>
  11. <input placeholder="请填写补充原因" @input="yyblur" style="" />
  12. </view>
  13. <!-- <view class="flex align-center" style="padding-bottom: 20rpx;margin-bottom: 20rpx;border-bottom: 1rpx solid #999999;">
  14. <text style="margin-right: 20rpx;font-weight: 500;font-size: 28rpx;">病症:</text>
  15. <input placeholder="请填写病症名称" @input="bzblur"/>
  16. </view> -->
  17. <!-- 结论 -->
  18. <view>
  19. <view style="margin-bottom: 20rpx;font-weight: 500;font-size: 28rpx;">结论:</view>
  20. <!-- <view style="margin-bottom: 20rpx;">结论:</view> -->
  21. <view style="padding: 10rpx;">
  22. <u-input v-model="jl" type="textarea" :auto-height="true" placeholder="请补充内容"
  23. :clearable="false" height='220' :border="true" borderColor="#C0C0C0"/>
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 两个按钮 -->
  28. <view style="height: 20%;display: flex;justify-content: center;align-items: center">
  29. <view style="display:flex;justify-content: center;align-items: center;width: 50%;">
  30. <u-button shape="shape" size="medium" @click="formshow = false">取消</u-button>
  31. </view>
  32. <view style="display:flex;justify-content: center;align-items: center ;width: 50%;">
  33. <u-button shape="shape" size="medium" type="primary" @click="qr">确认</u-button>
  34. </view>
  35. </view>
  36. </view>
  37. </u-popup>
  38. <u-gap height="30" bg-color="#f6f6f6"></u-gap>
  39. <view style="padding: 20rpx 28rpx;background-color: #FFFFFF;">
  40. <!-- 头部 -->
  41. <view class="flex align-center" style="font-weight: bold;font-size: 30rpx;margin:30rpx 0;">
  42. <view style="width: 25%;">订单号:</view>
  43. <view style="width: 50%;">{{orderID}}</view>
  44. <view style="width: 25%;" class="flex justify-center">
  45. <view class="but">意见单</view>
  46. </view>
  47. </view>
  48. <!-- 线 -->
  49. <u-line color="#dadada" />
  50. <!-- 中部内容 -->
  51. <view style="font-size: 26rpx;background-color: #FFFFFF;">
  52. <view class="nr">
  53. <view class="left">病症:</view>
  54. <view class="right">{{bz}}</view>
  55. </view>
  56. <view class="nr">
  57. <view class="left">病因:</view>
  58. <view class="right">{{by}}</view>
  59. </view>
  60. <view class="nr">
  61. <view class="left">身份证号:</view>
  62. <view class="right">{{ID}}</view>
  63. </view>
  64. <view class="nr">
  65. <view class="left">结论建议:</view>
  66. <view class="right">{{jielun}}</view>
  67. </view>
  68. </view>
  69. </view>
  70. <u-gap height="30" bg-color="#f6f6f6"></u-gap>
  71. <!-- 客户资料 -->
  72. <view class="" style="background-color: #FFFFFF;padding: 10rpx 28rpx;">
  73. <view class="nr">
  74. <view class="left">下单客户:</view>
  75. <view class="right">{{xiadankh}}</view>
  76. </view>
  77. <view class="nr">
  78. <view class="left">填写时间:</view>
  79. <view class="right">{{time}}</view>
  80. </view>
  81. </view>
  82. <u-gap height="30" bg-color="#f6f6f6"></u-gap>
  83. <!-- 补充 -->
  84. <view style="background-color: #FFFFFF;padding: 10rpx 28rpx;">
  85. <view class="nr">
  86. <view class="left" style="font-size: 30rpx;font-weight: bold;color: #000000;">补充意见</view>
  87. <view class="right" style="display: flex;flex-direction: row-reverse;">
  88. <view class="but" @click="addyj">补充意见</view>
  89. </view>
  90. </view>
  91. <view v-for="(item,index) in byList" :key='index'>
  92. <view class="">
  93. <view class="nr">
  94. <view class="left">补充原因:</view>
  95. <view class="right">{{item.supplement_reason}}</view>
  96. </view>
  97. <view class="nr">
  98. <view class="left">补充内容:</view>
  99. <view class="right">{{item.supplement_content}}</view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. export default {
  108. onLoad(options) {
  109. let id = options.id
  110. if(options.type==1){
  111. if(id!='' && typeof id!=undefined){
  112. this.getDetaile(id);
  113. }
  114. this.sugg_id = options.id;
  115. }else{
  116. if(id!='' && typeof id!=undefined){
  117. this.getDetaile(id,2);
  118. }
  119. }
  120. // console.log(options)
  121. },
  122. mounted() {
  123. },
  124. data() {
  125. return {
  126. sugg_id:'',
  127. name: '',
  128. xiadankh: '',
  129. age: '',
  130. orderID: '',
  131. time: '',
  132. bz: '',
  133. by: '',
  134. ID: '',
  135. jielun: '',
  136. byList:[],
  137. formshow:false,//提交表单弹窗
  138. yy:'',//原因
  139. jl:''//结论
  140. }
  141. },
  142. methods: {
  143. // 补充意见
  144. addyj(e) {
  145. this.formshow = true
  146. },
  147. getDetaile:async function(id,type=1){
  148. let obj = {'suggest_id':id,'type':type}
  149. let res = await this.$request.post('suggest/getSuggestDetail',obj);
  150. if(res.status==0 && res.data!=''){
  151. let data = res.data;
  152. this.sugg_id = data.id;
  153. this.name=data.patient_name;
  154. this.xiadankh=data.username;
  155. this.age=data.birthday;
  156. this.orderID=data.order_sn;
  157. this.time=data.created_at;
  158. this.bz=data.symptoms;
  159. this.by=data.pathogen;
  160. this.ID=data.patient_card_number;
  161. this.jielun=data.suggest;
  162. this.byList=data.details;
  163. // this.bcneirong=data;
  164. }
  165. console.log('我是返回来的值',res);
  166. },
  167. //提交
  168. yyblur(e){
  169. this.yy = e.detail.value
  170. },
  171. jlblur(e){
  172. this.jl = e.detail.value
  173. },
  174. qr:async function(e){
  175. if(this.yy!=''){
  176. if(this.jl!=''){
  177. let res = await this.$request.post("suggest/addSuggestDetail",{'suggest_id':this.sugg_id,'supplement_reason':this.yy,'supplement_content':this.jl});
  178. if(res.status==0){
  179. uni.showToast({
  180. title:'补充成功',
  181. icon:'none'
  182. })
  183. this.formshow = false
  184. this.getDetaile(this.sugg_id);
  185. }else{
  186. uni.showToast({
  187. title:res.message,
  188. icon:'none'
  189. })
  190. }
  191. }else{
  192. uni.showToast({
  193. title:'请填写补充内容',
  194. icon:'none'
  195. })
  196. }
  197. }else{
  198. uni.showToast({
  199. title:'请填写原因',
  200. icon:'none'
  201. })
  202. }
  203. },
  204. }
  205. };
  206. </script>
  207. <style lang="scss">
  208. .but {
  209. padding: 16rpx 30rpx;
  210. border-radius: 20rpx;
  211. background-color: #eaeaea;
  212. height: 50rpx;
  213. color: b1b1b1;
  214. display: flex;
  215. justify-content: center;
  216. align-items: center;
  217. font-weight: 400;
  218. font-size: 28rpx;
  219. }
  220. .nr {
  221. margin: 28rpx 0;
  222. display: flex;
  223. .left {
  224. width: 25%;
  225. color: #666666;
  226. }
  227. .right {
  228. width: 75%;
  229. }
  230. }
  231. </style>