storeOrderDetails.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. <template>
  2. <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
  3. <div style="padding: 20px; background-color: #fff;">
  4. 订单详情
  5. </div>
  6. <div class="contentx" v-if="item!=null">
  7. <div class="desct"></div>
  8. <div class="order-status" v-if="item!=null" >
  9. <el-steps :active="item.status==4?item.status:item.status-1" align-center finish-status="success">
  10. <el-step title="待支付"></el-step>
  11. <el-step title="待发货"></el-step>
  12. <el-step title="待收货"></el-step>
  13. <el-step title="已完成"></el-step>
  14. </el-steps>
  15. </div>
  16. <el-card shadow="never" style="margin-top: 15px">
  17. <div class="operate-container" v-if="item!=null">
  18. <span style="margin-left: 20px" class="color-danger">订单状态:
  19. <el-tag prop="status" v-for="(ite, index) in orderOptions" v-if="item.status==ite.dictValue">{{ite.dictLabel}}</el-tag>
  20. </span>
  21. <div class="operate-button-container" v-if="item.status==3">
  22. <el-button size="mini" @click="finishOrder()" v-hasPermi="['his:storeOrder:good']">确认收货</el-button>
  23. </div>
  24. <div class="operate-button-container" v-if="item.status==2&&item.orderType==1">
  25. <el-button size="mini" @click="sendVisible=true" v-hasPermi="['his:storeOrder:sendGoods']">发货</el-button>
  26. </div>
  27. <div class="operate-button-container" v-if="item.status==2&&item.orderType==2">
  28. <el-button size="mini" @click="tuiOrder()" v-hasPermi="['his:storeOrder:sendHisGoods']" >推送订单</el-button>
  29. </div>
  30. <div class="operate-button-container" v-if="item.inquiryOrderId!=null&&item.inquiryOrderId!=''" v-hasPermi="['his:storeOrder:inquiry']">
  31. <el-button size="mini" @click="getInquiryOrder()" >问诊订单</el-button>
  32. </div>
  33. <div class="operate-button-container" v-if="item.packageOrderId!=null&&item.packageOrderId!=''" v-hasPermi="['his:storeOrder:package']" >
  34. <el-button size="mini" @click="getPackageOrder()" >套餐包订单</el-button>
  35. </div>
  36. <div class="operate-button-container" v-if="item.deliverySn!=null" v-hasPermi="['his:storeOrder:express']">
  37. <el-button size="mini" @click="showExpress()" >查看物流</el-button>
  38. </div>
  39. <div class="operate-button-container" >
  40. <el-button size="mini" @click="editDelivery()" v-hasPermi="['his:storeOrder:updateDelivery']" >修改物流单号</el-button>
  41. </div>
  42. <div class="operate-button-container" >
  43. <el-button size="mini" @click="editOrder()" v-hasPermi="['his:storeOrder:edit']" >修改订单</el-button>
  44. </div>
  45. <div class="operate-button-container" v-if="item.status ==2 && item.extendOrderId == null && item.deliverySn == null&&item.orderType==1" v-hasPermi="['his:storeOrder:createErpOrder']">
  46. <el-button size="mini" @click="addErpOrder()" >创建ERP订单信息</el-button>
  47. </div>
  48. <div class="operate-button-container" v-if="item.extendOrderId!=null && item.orderType==1" v-hasPermi="['his:storeOrder:getEroOrder']" >
  49. <el-button size="mini" @click="showErpOrder()" >ERP订单信息</el-button>
  50. </div>
  51. <div class="operate-button-container" v-if="item.tuiMoneyStatus==0 && item.status==4" v-hasPermi="['his:storeOrder:editTuiMoney']" >
  52. <el-button size="mini" @click="editTuiMoney1()" >解冻</el-button>
  53. </div>
  54. <div class="operate-button-container" v-if="item.tuiMoneyStatus==1 && item.status==4" v-hasPermi="['his:storeOrder:editTuiMoney']" >
  55. <el-button size="mini" @click="editTuiMoney2()" >冻结</el-button>
  56. </div>
  57. <div class="operate-button-container" v-if="item.followTime!=null&&item.followTime!=''" v-hasPermi="['his:storeOrder:msgList']" >
  58. <el-button size="mini" @click="followMsg()" >随访记录</el-button>
  59. </div>
  60. <div class="operate-button-container" v-if="item.status>1">
  61. <el-button size="mini" @click="refund()" v-hasPermi="['his:storeOrder:afterSales']">申请退款</el-button>
  62. </div>
  63. <div class="operate-button-container" v-if="item.prescribeId!=null&&item.prescribeId!=''" >
  64. <el-button size="mini" @click="getPrescribeOrder()" >处方单</el-button>
  65. </div>
  66. <div class="operate-button-container" v-if="item.status== -2" >
  67. <el-button size="mini" @click="returnCost()" v-hasPermi="['his:storeOrder:returnCost']" >成本退还</el-button>
  68. </div>
  69. <div class="operate-button-container" >
  70. <el-button size="mini" @click="sendFollowMsg()" v-if="item.status>1" v-hasPermi="['his:storeOrder:sendMsg']">发送随访消息</el-button>
  71. </div>
  72. </div>
  73. <div class="desct">
  74. 基本信息
  75. </div>
  76. <el-descriptions :column="3" border >
  77. <el-descriptions-item label="订单编号" ><span v-if="item!=null">{{item.orderCode}}</span></el-descriptions-item>
  78. <el-descriptions-item label="会员"><span v-if="item.nickName!=null">{{item.nickName}}({{item.phone}})</span></el-descriptions-item>
  79. <el-descriptions-item label="会员ID" ><span v-if="item!=null">{{item.userId}}</span></el-descriptions-item>
  80. <el-descriptions-item label="支付方式" ><dict-tag :options="PayOptions" :value="item.payType"/></el-descriptions-item>
  81. <el-descriptions-item label="药品类型" ><dict-tag :options="orderTypeOptions" :value="item.orderType"/></el-descriptions-item>
  82. <el-descriptions-item label="订单来源" ><dict-tag :options="sourceOptions" :value="item.source"/></el-descriptions-item>
  83. <el-descriptions-item label="医生名称" ><span v-if="item!=null">{{item.doctorName}}</span></el-descriptions-item>
  84. <el-descriptions-item label="店铺名称" ><span v-if="item!=null">{{item.storeName}}</span></el-descriptions-item>
  85. <el-descriptions-item label="患者姓名" > <span v-if="item!=null">{{item.patientName}}</span></el-descriptions-item>
  86. <el-descriptions-item label="患者年龄" ><span v-if="item!=null">{{item.patientAge}}</span></el-descriptions-item>
  87. <el-descriptions-item label="患者性别" > <dict-tag :options="sexOptions" :value="item.patientGender"/> </el-descriptions-item>
  88. <el-descriptions-item label="与本人关系" ><span v-if="item!=null">{{item.relation}}</span> </el-descriptions-item>
  89. <el-descriptions-item label="收货人" > <span v-if="item!=null">{{item.userName}}</span> </el-descriptions-item>
  90. <el-descriptions-item label="收货人电话" > <span v-if="item!=null">{{item.userPhone}}</span>
  91. <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle v-hasPermi="['his:storeOrder:queryPhone']"></el-button>
  92. </el-descriptions-item>
  93. <el-descriptions-item label="详细地址" > <span>{{item.userAddress}}</span> </el-descriptions-item>
  94. <el-descriptions-item label="所属公司"><span v-if="item!=null">{{item.companyName}}</span></el-descriptions-item>
  95. <el-descriptions-item label="员工"><span v-if="item!=null">{{item.companyUserName}}</span></el-descriptions-item>
  96. <el-descriptions-item label="推广佣金" ><span v-if="item.tuiMoney!=null">{{item.tuiMoney.toFixed(2)}}</span></el-descriptions-item>
  97. <el-descriptions-item label="推广佣金状态" ><span v-if="item!=null"><dict-tag :options="tuiOptions" :value="item.tuiMoneyStatus"/> </span></el-descriptions-item>
  98. <el-descriptions-item label="快递公司编号" > <span v-if="item!=null">{{item.deliveryCode}}</span></el-descriptions-item>
  99. <el-descriptions-item label="快递名称" ><span v-if="item!=null">{{item.deliveryName}}</span></el-descriptions-item>
  100. <el-descriptions-item label="快递单号" ><span v-if="item!=null">{{item.deliverySn}}</span></el-descriptions-item>
  101. <el-descriptions-item label="ERP编号" ><span v-if="item!=null">{{item.extendOrderId}}</span></el-descriptions-item>
  102. <el-descriptions-item label="物流状态" ><dict-tag :options="deliveryStatusOptions" :value="item.deliveryStatus"/></el-descriptions-item>
  103. <el-descriptions-item label="物流结算状态" ><dict-tag :options="deliveryPayStatusOptions" :value="item.deliveryPayStatus"/></el-descriptions-item>
  104. <el-descriptions-item label="物流结算时间" ><span v-if="item!=null">{{item.deliveryPayTime}}</span></el-descriptions-item>
  105. <el-descriptions-item label="物流结算金额" ><span v-if="item!=null">{{item.deliveryPayMoney}}</span></el-descriptions-item>
  106. <el-descriptions-item label="物流跟踪状态" ><span v-if="item!=null"><dict-tag :options="deliveryTypeOptions" :value="item.deliveryType"/> </span></el-descriptions-item>
  107. <el-descriptions-item label="用户备注" ><span v-if="item!=null">{{item.remark}}</span></el-descriptions-item>
  108. <el-descriptions-item label="档期归属" >
  109. <el-tag prop="scheduleId" v-for="(schedule, index) in scheduleOptions" v-if="item!=null&&item.scheduleId==schedule.id">{{schedule.name}}
  110. </el-tag>
  111. </el-descriptions-item>
  112. <el-descriptions-item label="订单购买类型" ><span v-if="item!=null"><dict-tag :options="orderBuyTypeOptions" :value="item.orderBuyType"/></span></el-descriptions-item>
  113. <el-descriptions-item label=" 公众号/渠道" ><span v-if="item!=null">{{item.channel}}</span></el-descriptions-item>
  114. <el-descriptions-item label=" 渠道" ><span v-if="item!=null"><dict-tag :options="channelOptions" :value="item.orderChannel"/></span></el-descriptions-item>
  115. <el-descriptions-item label=" 企微主体" ><span v-if="item!=null"><dict-tag :options="qwSubjectOptions" :value="item.qwSubject"/></span></el-descriptions-item>
  116. </el-descriptions>
  117. </el-card>
  118. </div>
  119. <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">
  120. <div class="desct">
  121. 商品信息
  122. </div>
  123. <el-tooltip class="item" effect="dark" :content="showList ? '显示全部' : '隐藏'" placement="top" style="float: right;">
  124. <el-button size="mini" circle icon="el-icon-search" @click="showListD()" />
  125. </el-tooltip>
  126. <el-table border v-if="showProd!=null" :data="showProd" size="small" style="width: 100%;margin-top: 20px" >
  127. <el-table-column label="商品图片" width="150" align="center">
  128. <template slot-scope="scope">
  129. <img :src="JSON.parse(scope.row.jsonInfo).image" style="height: 80px">
  130. </template>
  131. </el-table-column>
  132. <el-table-column label="商品编码" width="300" align="center">
  133. <template slot-scope="scope">
  134. <p>{{JSON.parse(scope.row.jsonInfo).barCode}}</p>
  135. </template>
  136. </el-table-column>
  137. <el-table-column label="商品名称" width="300" align="center">
  138. <template slot-scope="scope">
  139. <p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
  140. </template>
  141. </el-table-column>
  142. <el-table-column label="单价" width="240" align="center">
  143. <template slot-scope="scope">
  144. <p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
  145. </template>
  146. </el-table-column>
  147. <el-table-column label="规格" width="240" align="center">
  148. <template slot-scope="scope">
  149. {{JSON.parse(scope.row.jsonInfo).sku}}
  150. </template>
  151. </el-table-column>
  152. <el-table-column label="数量" width="180" align="center">
  153. <template slot-scope="scope">
  154. {{scope.row.num}}
  155. </template>
  156. </el-table-column>
  157. <el-table-column label="处方药" width="240" align="center">
  158. <template slot-scope="scope">
  159. {{scope.row.isPrescribe!=null&&scope.row.isPrescribe==1?'是':'否'}}
  160. </template>
  161. </el-table-column>
  162. <el-table-column label="小计" align="center">
  163. <template slot-scope="scope" >
  164. ¥{{(scope.row.num*JSON.parse(scope.row.jsonInfo).price).toFixed(2)}}
  165. </template>
  166. </el-table-column>
  167. </el-table>
  168. <div style="float: right;margin: 20px" v-if="item.totalPrice!=null">
  169. 合计:<span class="color-danger">¥{{item.totalPrice.toFixed(2)}}</span>
  170. </div>
  171. <div style="float: right;margin: 20px" v-if="item.orderType==2">
  172. 剂数:<span class="color-danger">{{counts}}</span>
  173. </div>
  174. <div style="float: right;margin: 20px" v-if="item.orderType==2">
  175. 制作类型:<span class="color-danger">{{ recipeType === 0 ? '颗粒剂' : recipeType === 1 ? '膏方' : '饮片'}}</span>
  176. </div>
  177. </div>
  178. <div class="contentx" v-if="item!=null">
  179. <div class="desct">
  180. 费用信息
  181. </div>
  182. <el-descriptions :column="3" border >
  183. <el-descriptions-item label="商品合计" ><span v-if="item.totalPrice!=null">¥{{item.totalPrice.toFixed(2)}} </span></el-descriptions-item>
  184. <el-descriptions-item label="处方定价" ><span v-if="item.prescribePrice!=null"> ¥{{item.prescribePrice.toFixed(2)}}</span></el-descriptions-item>
  185. <el-descriptions-item label="处方应付金额" ><span v-if="item.payPrice!=null"> ¥{{item.payPrice.toFixed(2)}}</span></el-descriptions-item>
  186. <el-descriptions-item label="运费" ><span v-if="item.payDelivery!=null">¥{{item.payDelivery.toFixed(2)}}</span></el-descriptions-item>
  187. <el-descriptions-item label="优惠劵" ><span v-if="item.discountMoney!=null">¥{{item.discountMoney.toFixed(2)}}</span></el-descriptions-item>
  188. <el-descriptions-item label="实付金额" ><span v-if="item.payMoney!=null">¥{{item.payMoney.toFixed(2)}}</span></el-descriptions-item>
  189. <el-descriptions-item label="代收金额" ><span v-if="item.payRemain!=null">¥{{item.payRemain.toFixed(2)}}</span></el-descriptions-item>
  190. </el-descriptions>
  191. </div>
  192. <div class="contentx" v-if="item!=null">
  193. <div class="desct">
  194. 支付信息
  195. </div>
  196. <el-table
  197. border
  198. :data="pay"
  199. size="small"
  200. style="width: 100%;margin-top: 20px" >
  201. <el-table-column label="支付单号" align="center" prop="payCode" width="120px" />
  202. <el-table-column label="支付金额" align="center" prop="payMoney" />
  203. <el-table-column label="类型" align="center" prop="payTypeCode" />
  204. <el-table-column label="外部订单号 " align="center" prop="tradeNo" />
  205. <el-table-column label="创建时间" align="center" prop="createTime" />
  206. <el-table-column label="支付时间" align="center" prop="payTime" />
  207. </el-table>
  208. </div>
  209. <div class="contentx" v-if="item!=null">
  210. <div class="desct">
  211. 操作信息
  212. </div>
  213. <el-table style="margin-top: 20px;width: 100%"
  214. ref="orderHistoryTable"
  215. :data="logs" border>
  216. <el-table-column label="操作时间" width="160" align="center">
  217. <template slot-scope="scope">
  218. {{scope.row.changeTime}}
  219. </template>
  220. </el-table-column>
  221. <el-table-column label="备注" align="center">
  222. <template slot-scope="scope">
  223. {{scope.row.changeMessage}}
  224. </template>
  225. </el-table-column>
  226. </el-table>
  227. </div>
  228. <div class="contentx" v-if="item!=null">
  229. <div class="desct">
  230. 分佣信息
  231. </div>
  232. <el-table
  233. border
  234. :data="tuiMoneyLogs"
  235. size="small"
  236. style="width: 100%;margin-top: 20px" >
  237. <el-table-column label="公司名称" align="center" prop="companyName" width="120px" />
  238. <el-table-column label="金额" align="center" prop="money" />
  239. <el-table-column label="余额" align="center" prop="balance" />
  240. <el-table-column label="创建时间" align="center" prop="createTime" />
  241. <el-table-column label="备注" align="center" prop="remark" />
  242. </el-table>
  243. </div>
  244. <el-dialog
  245. width="50%"
  246. title="发货"
  247. :visible.sync="sendVisible"
  248. append-to-body @close="sendCancel">
  249. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  250. <el-form-item label="快递公司编号" prop="deliveryCode">
  251. <el-input v-model="form.deliveryCode" placeholder="请输入快递公司编号" />
  252. </el-form-item>
  253. <el-form-item label="快递名称" prop="deliveryName">
  254. <el-input v-model="form.deliveryName" placeholder="请输入快递名称" />
  255. </el-form-item>
  256. <el-form-item label="快递单号" prop="deliverySn">
  257. <el-input v-model="form.deliverySn" placeholder="请输入快递单号" />
  258. </el-form-item>
  259. </el-form>
  260. <div slot="footer" class="dialog-footer">
  261. <el-button type="primary" @click="sendGoods">确 定</el-button>
  262. <el-button @click="sendCancel">取 消</el-button>
  263. </div>
  264. </el-dialog>
  265. <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
  266. <div v-hasPermi="['his:storeOrder:syncExpress']" >
  267. <el-button size="mini" @click="syncExpress()" >同步快递鸟物流状态</el-button>
  268. </div>
  269. <el-table style="margin-top: 20px;width: 100%"
  270. ref="orderHistoryTable"
  271. :data="traces" border>
  272. <el-table-column label="操作时间" width="160" align="center">
  273. <template slot-scope="scope">
  274. {{scope.row.AcceptTime}}
  275. </template>
  276. </el-table-column>
  277. <el-table-column label="位置" align="center">
  278. <template slot-scope="scope">
  279. {{scope.row.Location}}
  280. </template>
  281. </el-table-column>
  282. <el-table-column label="描述" align="center">
  283. <template slot-scope="scope">
  284. {{scope.row.AcceptStation}}
  285. </template>
  286. </el-table-column>
  287. </el-table>
  288. </el-dialog>
  289. <el-dialog :title="editDy.title" :visible.sync="editDy.open" width="600px" append-to-body>
  290. <el-form ref="editDyForm" :model="editDyForm" :rules="editDyRules" label-width="100px">
  291. <div v-hasPermi="['his:storeOrder:updateErpOrder']" style="margin-bottom: 20px;" >
  292. <el-button size="mini" @click="updateErpOrder" >同步物流单号信息</el-button>
  293. </div>
  294. <el-form-item label="物流公司" prop="deliveryCode" >
  295. <el-select style="width:220px" v-model="editDyForm.deliveryCode" placeholder="请选择" clearable size="small">
  296. <el-option key="SF" label="顺丰" value="SF" />
  297. <el-option key="EMS" label="邮政" value="EMS" />
  298. <el-option key="ZTO" label="中通" value="ZTO" />
  299. <el-option key="STO" label="申通" value="STO" />
  300. <el-option key="JD" label="京东" value="JD" />
  301. <el-option key="DBL" label="德邦" value="DBL" />
  302. <el-option key="YD" label="韵达" value="YD" />
  303. </el-select>
  304. </el-form-item>
  305. <el-form-item label="物流单号" prop="deliverySn" >
  306. <el-input v-model="editDyForm.deliverySn" placeholder="请输入物流单号" />
  307. </el-form-item>
  308. </el-form>
  309. <div slot="footer" class="dialog-footer">
  310. <el-button type="primary" @click="submitEditDyForm">确 定</el-button>
  311. <el-button @click="editDy.open = false">取 消</el-button>
  312. </div>
  313. </el-dialog>
  314. <el-dialog :title="erpDialog.title" :visible.sync="erpDialog.open" width="800px" append-to-body>
  315. <div v-if="item!=null&&item.extendOrderId!=null&&item.status==2" style="position: absolute; top: 50px;right: 20px;">
  316. <el-button size="mini" @click="updateExpress()" v-hasPermi="['his:storeOrder:updateExpress']" >同步物流发货</el-button>
  317. </div>
  318. <div class="table-layout" v-if="erpOrder!=null" >
  319. <el-descriptions direction="vertical" :column="3" border >
  320. <el-descriptions-item label="订单编号" > <span v-if="item!=null"> {{erpOrder.code}}</span></el-descriptions-item>
  321. <el-descriptions-item label="是否代收" ><span v-if="item!=null">{{erpOrder.cod?'是':'否'}}</span></el-descriptions-item>
  322. <el-descriptions-item label="快递编号" ><span v-if="item!=null">{{erpOrder.express_code}}</span></el-descriptions-item>
  323. <el-descriptions-item label="快递名称" ><span v-if="item!=null"> {{erpOrder.express_name}}</span></el-descriptions-item>
  324. <el-descriptions-item label="收货人" ><span v-if="item!=null">{{erpOrder.receiver_name}}</span></el-descriptions-item>
  325. <el-descriptions-item label="电话" ><span v-if="item!=null"> {{erpOrder.receiver_mobile}}</span></el-descriptions-item>
  326. <el-descriptions-item label="地址" ><span v-if="item!=null"> {{erpOrder.receiver_address}}</span></el-descriptions-item>
  327. <el-descriptions-item label="运单号" ><span v-if="item!=null"> {{erpOrder.deliverys!=null&&erpOrder.deliverys.length>0?erpOrder.deliverys[0].mail_no:''}}</span></el-descriptions-item>
  328. </el-descriptions>
  329. </div>
  330. </el-dialog>
  331. <el-dialog :title="edit.title" :visible.sync="edit.open" width="600px" append-to-body>
  332. <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
  333. <el-form-item label="订单状态" prop="status" >
  334. <el-select v-model="editForm.status" placeholder="请选择状态" clearable size="small" filterable>
  335. <el-option
  336. v-for="dict in orderOptions "
  337. :key="dict.dictValue"
  338. :label="dict.dictLabel"
  339. :value="dict.dictValue"
  340. :disabled="dict.dictLabel == '待推送'"
  341. />
  342. </el-select>
  343. </el-form-item>
  344. <el-form-item label="物流状态" prop="deliveryStatus" >
  345. <el-select v-model="editForm.deliveryStatus" placeholder="请选择物流状态" clearable size="small" filterable>
  346. <el-option
  347. v-for="dict in deliveryStatusOptions "
  348. :key="dict.dictValue"
  349. :label="dict.dictLabel"
  350. :value="dict.dictValue"
  351. />
  352. </el-select>
  353. </el-form-item>
  354. <el-form-item label="物流跟踪状态" prop="deliveryType" >
  355. <el-select v-model="editForm.deliveryType" placeholder="请选择状态" clearable size="small" filterable>
  356. <el-option
  357. v-for="dict in deliveryTypeOptions "
  358. :key="dict.dictValue"
  359. :label="dict.dictLabel"
  360. :value="dict.dictValue"
  361. />
  362. </el-select>
  363. </el-form-item>
  364. <el-form-item label="详情地址" prop="userAddress" >
  365. <el-cascader
  366. ref="citySelect"
  367. v-model="cityIds"
  368. :options="citys"
  369. @change="handleCityChange"
  370. clearable>
  371. </el-cascader>
  372. <el-input v-model="editForm.userAddress" placeholder="请输入详细地址(不含省/市/区)" />
  373. </el-form-item>
  374. <el-form-item label="收货人电话" prop="userPhone" >
  375. <el-input v-model="editForm.userPhone" placeholder="请输入" />
  376. </el-form-item>
  377. <el-form-item label="备注" prop="remark" >
  378. <el-input v-model="editForm.remark" placeholder="请输入备注" />
  379. </el-form-item>
  380. </el-form>
  381. <div slot="footer" class="dialog-footer">
  382. <el-button type="primary" @click="submitEditForm">确 定</el-button>
  383. </div>
  384. </el-dialog>
  385. <el-drawer
  386. :with-header="false"
  387. :append-to-body="true"
  388. size="75%"
  389. :title="show.title" :visible.sync="show.open">
  390. <inquiryOrderDetails ref="Details" />
  391. </el-drawer>
  392. <el-drawer
  393. :with-header="false"
  394. :append-to-body="true"
  395. size="75%"
  396. :title="pack.title" :visible.sync="pack.open">
  397. <packageOrderDetails ref="packDetails" />
  398. </el-drawer>
  399. <el-dialog
  400. title="聊天记录"
  401. :visible.sync="dialogVisible"
  402. width="80%"
  403. :before-close="msgDialogClose" append-to-body >
  404. <msgDetails ref="msgDetails" :msgDialogClose="msgDialogClose" /><strong></strong>
  405. <span slot="footer" class="dialog-footer">
  406. <el-button @click="msgDialogClose">取 消</el-button>
  407. <el-button type="primary" @click="msgDialogClose">确 定</el-button>
  408. </span>
  409. </el-dialog>
  410. <el-drawer
  411. :with-header="false"
  412. :append-to-body="true"
  413. size="75%"
  414. :title="prescribeDialog.title" :visible.sync="prescribeDialog.open">
  415. <prescribeDetails ref="prescribeDetails" />
  416. </el-drawer>
  417. </div>
  418. </template>
  419. <script>
  420. import {getMsgFollow,sendMsg,msgList,updateMoney,getGoods,getEroOrder,editTuiMoney,updateDelivery,createErpOrder,updateExpress,updateErp, afterSales,sendgoods,logList,listOrder,getExpress,syncExpress, listOrderitem,getOrder, delOrder, addOrder, updateStoreOrder, exportOrder,payment,tuiOrder ,getPrescribe,getOrderUserPhone,returnCost} from "@/api/his/storeOrder";
  421. import inquiryOrderDetails from '../his/inquiryOrderDetails.vue';
  422. import packageOrderDetails from '../his/packageOrderDetails2.vue';
  423. import prescribeDetails from '../his/prescribeDetails.vue';
  424. import msgDetails from '../../components/his/followMsgDetails.vue';
  425. import { getTcmScheduleList } from "@/api/company/schedule";
  426. import {getCitys} from "@/api/store/city";
  427. export default {
  428. name: "orderDe",
  429. props:["data"],
  430. components: { inquiryOrderDetails,packageOrderDetails,prescribeDetails ,msgDetails},
  431. data() {
  432. return {
  433. expressDialog:{
  434. title:"物流信息",
  435. open:false,
  436. },
  437. editDy:{
  438. title:"修改物流单号",
  439. open:false,
  440. },
  441. sourceOptions:[],
  442. prescribeDialog:{
  443. title:"处方单",
  444. open:false,
  445. },
  446. followDialogVisible:false,
  447. dialogVisible:false,
  448. total: 0,
  449. msgForm:{
  450. pageNum: 1,
  451. pageSize: 10,
  452. userId:null,
  453. followDoctorId:null,
  454. },
  455. editDyForm:{
  456. orderId:null,
  457. deliveryId:null,
  458. deliveryCode:null,
  459. deliverySn: null
  460. },
  461. showList:true,
  462. edit:{
  463. title:"修改订单",
  464. open:false,
  465. },
  466. erpDialog:{
  467. title:"ERP订单信息",
  468. open:false,
  469. },
  470. show:{
  471. title:"问诊详情",
  472. open:false,
  473. },
  474. pack:{
  475. title:"套餐包",
  476. open:false,
  477. },
  478. followList:[],
  479. counts:null,
  480. recipeType:null,
  481. money:null,
  482. moneyVisible:false,
  483. rules:{},
  484. sendVisible:false,
  485. logs:[],
  486. pay:[],
  487. nickName:null,
  488. storeName:null,
  489. PayOptions:[],
  490. orderOptions:[],
  491. payStatusOptions:[],
  492. express:null,
  493. traces:[],
  494. msg:[],
  495. sexOptions:[],
  496. refundOptions:[],
  497. channelOptions:[],
  498. qwSubjectOptions:[],
  499. tuiOptions:[],
  500. orOptions:[],
  501. storeOPtions:[],
  502. deliveryStatusOptions:[],
  503. deliveryPayStatusOptions:[],
  504. deliveryTypeOptions:[],
  505. orderTypeOptions:[],
  506. orderBuyTypeOptions:[],
  507. scheduleOptions:[],
  508. item:null,
  509. tuiMoneyLogs:[],
  510. erpOrder:null,
  511. prod:null,
  512. showProd:null,
  513. editForm:{
  514. orderId:null,
  515. status:null,
  516. userAddress:null,
  517. deliveryStatus:null,
  518. deliveryType:null,
  519. userPhone:null,
  520. remark:"",
  521. },
  522. editDyRules:{
  523. deliverySn: [
  524. { required: true, message: "物流单号不能为空", trigger: "blur" }
  525. ],
  526. deliveryCode: [
  527. { required: true, message: "物流公司不能为空", trigger: "blur" }
  528. ],
  529. },
  530. editRules:{
  531. userAddress: [
  532. { required: true, message: "收货地址不能为空", trigger: "blur" }
  533. ],
  534. },
  535. mrules:{
  536. },
  537. form: {
  538. deliveryCode: null,
  539. deliveryName:null,
  540. deliverySn:null,
  541. orderId:null,
  542. },
  543. cityIds:[],
  544. citys:[],
  545. userAddress:null,
  546. }
  547. },
  548. created() {
  549. getTcmScheduleList().then(response => {
  550. this.scheduleOptions = response.data;
  551. });
  552. this.getDicts("sys_store_pay_type").then(response => {
  553. this.PayOptions = response.data;
  554. });
  555. this.getDicts("sys_order_status").then(response => {
  556. this.orderOptions = response.data;
  557. });
  558. this.getDicts("sys_order_pay").then(response => {
  559. this.payStatusOptions = response.data;
  560. });
  561. this.getDicts("sys_order_source").then(response => {
  562. this.sourceOptions = response.data;
  563. });
  564. this.getDicts("sys_store_order_type").then(response => {
  565. this.orderTypeOptions = response.data;
  566. });
  567. this.getDicts("sys_store_order_buy_type").then(response => {
  568. this.orderBuyTypeOptions = response.data;
  569. });
  570. this.getDicts("sys_refund_status").then(response => {
  571. this.refundOptions = response.data;
  572. });
  573. this.getDicts("sys_store_channel").then(response => {
  574. this.channelOptions = response.data;
  575. });
  576. this.getDicts("sys_store_qw_subject").then(response => {
  577. this.qwSubjectOptions = response.data;
  578. });
  579. this.getDicts("sys_tui_money_status").then(response => {
  580. this.tuiOptions = response.data;
  581. });
  582. this.getDicts("sys_company_or").then(response => {
  583. this.orOptions = response.data;
  584. });
  585. this.getDicts("sys_patient_sex").then(response => {
  586. this.sexOptions = response.data;
  587. });
  588. this.getDicts("sys_store_delivery_pay_status").then(response => {
  589. this.deliveryPayStatusOptions = response.data;
  590. });
  591. this.getDicts("sys_store_order_delivery_status").then(response => {
  592. this.deliveryStatusOptions = response.data;
  593. });
  594. this.getDicts("sys_delivery_type").then(response => {
  595. this.deliveryTypeOptions = response.data;
  596. });
  597. },
  598. methods: {
  599. getCitys() {
  600. return getCitys().then(res => {
  601. this.citys = res.data || [];
  602. return this.citys;
  603. });
  604. },
  605. // 新增:切换省市区
  606. handleCityChange(val) {
  607. this.cityIds = Array.isArray(val) ? val : [];
  608. },
  609. // 新增:根据已选的 cityIds 从 citys 中获取对应的 label 数组 [省, 市, 区]
  610. getCityLabelsByIds() {
  611. if (!this.cityIds || this.cityIds.length === 0) return [];
  612. const [pVal, cVal, aVal] = this.cityIds;
  613. const p = this.citys.find(p => p.value === pVal);
  614. const c = p?.children?.find(c => c.value === cVal);
  615. const a = c?.children?.find(a => a.value === aVal);
  616. return [p?.label, c?.label, a?.label].filter(Boolean);
  617. },
  618. // 新增:拼装完整地址 = 省 市 区 + 详细地址
  619. buildFullAddress() {
  620. const region = this.getCityLabelsByIds().join(' ');
  621. const detail = (this.editForm.userAddress || '').trim();
  622. console.log(region)
  623. console.log(detail)
  624. return region && detail ? `${region} ${detail}` : (region || detail || '');
  625. },
  626. followMsg(row){
  627. const userId = this.item.userId;
  628. const followDoctorId =this.item.followDoctorId;
  629. const doctorName = this.item.doctorName;
  630. const patientName = this.item.patientName;
  631. setTimeout(() => {
  632. this.$refs.msgDetails.getDetails(userId,followDoctorId,doctorName,patientName);
  633. }, 500);
  634. this.dialogVisible = true;
  635. },
  636. msgDialogClose(){
  637. this.dialogVisible = false;
  638. },
  639. getPrescribeOrder(){
  640. this.prescribeDialog.open=true;
  641. setTimeout(() => {
  642. this.$refs.prescribeDetails.getDetails(this.item.prescribeId);
  643. }, 1);
  644. },
  645. handlePhone(){
  646. const orderId = this.item.orderId;
  647. getOrderUserPhone(orderId).then(response =>{
  648. this.item.userPhone = response.userPhone;
  649. })
  650. },
  651. editDelivery(){
  652. this.editDy.open = true;
  653. console.log(this.item)
  654. this.editDyForm.orderId = this.item.orderId;
  655. this.editDyForm.deliveryId = this.item.deliveryId;
  656. this.editDyForm.deliveryCode = this.item.deliveryCode;
  657. this.editDyForm.deliverySn = this.item.deliverySn;
  658. },
  659. showListD(){
  660. if(this.showList){
  661. this.showProd=this.prod
  662. }else{
  663. this.showProd=[this.prod[0]]
  664. }
  665. this.showList=this.showList?false:true;
  666. },
  667. showExpress(){
  668. this.expressDialog.open=true;
  669. getExpress(this.item.orderId).then(response => {
  670. this.express = response.data;
  671. if(this.express!=null&&this.express.Traces!=null){
  672. this.traces=this.express.Traces
  673. } else {
  674. this.traces = []
  675. }
  676. });
  677. },
  678. updateErpOrder(){
  679. var that=this;
  680. this.$confirm('确定同步物流单号信息吗', "警告", {
  681. confirmButtonText: "确定",
  682. cancelButtonText: "取消",
  683. type: "warning"
  684. }).then(function() {
  685. var data={orderId:that.item.orderId}
  686. return updateErp(data);
  687. }).then(() => {
  688. this.msgSuccess("操作成功");
  689. getOrder(this.item.orderId).then(response => {
  690. this.item=response.data
  691. that.getlogList(this.item.orderId);
  692. that.$parent.$parent.getList();
  693. });
  694. this.editDy.open = false
  695. }).catch(function() {});
  696. },
  697. sendFollowMsg(){
  698. var that=this;
  699. this.$confirm('是否确认发送消息?', "警告", {
  700. confirmButtonText: "确定",
  701. cancelButtonText: "取消",
  702. type: "warning"
  703. }).then(function() {
  704. return sendMsg(that.item.orderId);
  705. }).then(() => {
  706. this.msgSuccess("操作成功");
  707. }).catch(function() {});
  708. },
  709. handleClose1(){
  710. this.dialogVisible=false;
  711. },
  712. handleClose2(){
  713. this.followDialogVisible=false;
  714. },
  715. follow(row){
  716. getMsgFollow(row).then(response => {
  717. if(response.data.formJson!=null&&response.data.formJson!=''&&response.data.writeStatus==1){
  718. this.messageFollowList=JSON.parse(response.data.formJson );
  719. this.followDialogVisible=true;
  720. }else{
  721. this.$message({
  722. message: '未填写随访单',
  723. type: 'info'
  724. });
  725. return
  726. }
  727. });
  728. },
  729. // 修改订单状态
  730. submitEditForm() {
  731. this.$refs["editForm"].validate(valid => {
  732. if (!valid) return;
  733. // 提交前拼接完整地址
  734. const payload = {
  735. ...this.editForm,
  736. userAddress: this.buildFullAddress(),
  737. };
  738. updateStoreOrder(payload).then(response => {
  739. if (response.code === 200) {
  740. this.msgSuccess("操作成功");
  741. this.edit.open = false;
  742. getOrder(this.item.orderId).then(response => {
  743. this.item = response.data;
  744. this.getlogList(this.item.orderId);
  745. this.$parent.$parent.getList();
  746. });
  747. }
  748. }).finally(()=>{
  749. this.editDyForm.deliveryCode = null;
  750. this.editDyForm.orderId = null;
  751. this.editDyForm.deliveryId = null;
  752. });
  753. });
  754. },
  755. editOrder() {
  756. this.edit.open = true;
  757. this.editForm.orderId = this.item.orderId;
  758. this.editForm.remark = this.item.remark;
  759. // 先设置其他同步的字段
  760. this.editForm.userPhone = this.item.userPhone != null ? this.item.userPhone.toString() : "";
  761. this.editForm.status = this.item.status != null ? this.item.status.toString() : "";
  762. this.editForm.deliveryType = this.item.deliveryType;
  763. this.editForm.deliveryStatus = this.item.deliveryStatus;
  764. // 等城市数据加载后再解析地址
  765. const currentAddress = (this.item.userAddress || "").toString().trim();
  766. this.getCitys().then(() => {
  767. if (!currentAddress) {
  768. this.cityIds = [];
  769. this.editForm.userAddress = "";
  770. return;
  771. }
  772. // 假设格式为:省 市 区 详细地址(空格分隔)
  773. const parts = currentAddress.split(/\s+/);
  774. const detail = parts.pop() || ""; // 最后一段作为详细地址
  775. const provLabel = parts[0];
  776. const cityLabel = parts[1];
  777. const areaLabel = parts[2];
  778. const province = this.citys.find(p => p.label === provLabel);
  779. const city = province?.children?.find(c => c.label === cityLabel);
  780. const area = city?.children?.find(a => a.label === areaLabel);
  781. if (province && city && area) {
  782. this.cityIds = [province.value, city.value, area.value];
  783. } else {
  784. console.warn("未匹配到完整省市区:", { provLabel, cityLabel, areaLabel });
  785. this.cityIds = [];
  786. }
  787. // 把详细地址写回到输入框(只保留详细地址,不含省市区)
  788. this.editForm.userAddress = detail;
  789. });
  790. },
  791. updateExpress(){
  792. var that=this;
  793. this.$confirm('定同步物流信息吗,同步后将自动发货?', "警告", {
  794. confirmButtonText: "确定",
  795. cancelButtonText: "取消",
  796. type: "warning"
  797. }).then(function() {
  798. var data=that.item.orderId
  799. return updateExpress(data);
  800. }).then(() => {
  801. this.msgSuccess("操作成功");
  802. getOrder(this.item.orderId).then(response => {
  803. this.item=response.data
  804. that.getlogList(this.item.orderId);
  805. that.$parent.$parent.getList();
  806. });
  807. }).catch(function() {});
  808. },
  809. addErpOrder(){
  810. var that=this;
  811. this.$confirm('是否确认推送管易?', "警告", {
  812. confirmButtonText: "确定",
  813. cancelButtonText: "取消",
  814. type: "warning"
  815. }).then(function() {
  816. var data=that.item.orderId
  817. return createErpOrder(data);
  818. }).then(() => {
  819. this.msgSuccess("操作成功");
  820. getOrder(this.item.orderId).then(response => {
  821. this.item=response.data
  822. that.getlogList(this.item.orderId);
  823. that.$parent.$parent.getList();
  824. });
  825. }).catch(function() {});
  826. },
  827. showErpOrder(){
  828. this.erpDialog.open=true;
  829. var data=this.item.extendOrderId;
  830. getEroOrder(data).then(response => {
  831. this.erp = response.data;
  832. if(response.data.orders!=null&&response.data.orders.length==1){
  833. this.erpOrder=response.data.orders[0]
  834. }
  835. });
  836. },
  837. editTuiMoney1(){
  838. var that=this;
  839. this.$confirm('是否解冻此订单推广佣金吗?', "警告", {
  840. confirmButtonText: "确定",
  841. cancelButtonText: "取消",
  842. type: "warning"
  843. }).then(function() {
  844. var data=that.item.orderId;
  845. return editTuiMoney(data);
  846. }).then(() => {
  847. this.msgSuccess("操作成功");
  848. getOrder(this.item.orderId).then(response => {
  849. this.item=response.data
  850. that.getlogList(this.item.orderId);
  851. that.$parent.$parent.getList();
  852. });
  853. }).catch(function() {});
  854. },
  855. editTuiMoney2(){
  856. var that=this;
  857. this.$confirm('是否冻结此订单推广佣金吗?', "警告", {
  858. confirmButtonText: "确定",
  859. cancelButtonText: "取消",
  860. type: "warning"
  861. }).then(function() {
  862. var data=that.item.orderId;
  863. return editTuiMoney(data);
  864. }).then(() => {
  865. this.msgSuccess("操作成功");
  866. getOrder(this.item.orderId).then(response => {
  867. this.item=response.data
  868. that.getlogList(this.item.orderId);
  869. that.$parent.$parent.getList();
  870. });
  871. }).catch(function() {});
  872. },
  873. returnCost(){
  874. var that=this;
  875. this.$confirm('是否退还此订单成本吗?', "警告", {
  876. confirmButtonText: "确定",
  877. cancelButtonText: "取消",
  878. type: "warning"
  879. }).then(function() {
  880. var data=that.item.orderId;
  881. return returnCost(data);
  882. }).then(() => {
  883. this.msgSuccess("操作成功");
  884. this.getDetails(this.item.orderId,null,null)
  885. }).catch(function() {});
  886. },
  887. moneyCancel(){
  888. this.money=null;
  889. this.moneyVisible=false;
  890. },
  891. refund(){
  892. var that=this;
  893. this.$confirm('是否确认申请退款?', "警告", {
  894. confirmButtonText: "确定",
  895. cancelButtonText: "取消",
  896. type: "warning"
  897. }).then(function() {
  898. var data={
  899. orderId:that.item.orderId
  900. }
  901. return afterSales(data);
  902. }).then(() => {
  903. this.msgSuccess("操作成功");
  904. getOrder(this.item.orderId).then(response => {
  905. this.item = response.data;
  906. this.getlogList(this.item.orderId);
  907. this.$parent.$parent.getList();
  908. });
  909. }).catch(function() {});
  910. },
  911. finishOrder(){
  912. var that=this;
  913. this.$confirm('是否确认客户已收货?', "警告", {
  914. confirmButtonText: "确定",
  915. cancelButtonText: "取消",
  916. type: "warning"
  917. }).then(function() {
  918. var data={
  919. orderId:that.item.orderId
  920. }
  921. return getGoods(data);
  922. }).then(() => {
  923. this.msgSuccess("操作成功");
  924. getOrder(this.item.orderId).then(response => {
  925. this.item = response.data;
  926. this.getlistOrderitem(this.item.orderId);
  927. this.getlogList(this.item.orderId);
  928. this.$parent.$parent.getList();
  929. });
  930. }).catch(function() {});
  931. },
  932. syncExpress(){
  933. var that=this;
  934. this.$confirm('确定同步物流状态吗', "警告", {
  935. confirmButtonText: "确定",
  936. cancelButtonText: "取消",
  937. type: "warning"
  938. }).then(function() {
  939. var data=that.item.orderId
  940. return syncExpress(data);
  941. }).then(() => {
  942. this.msgSuccess("操作成功");
  943. this.expressDialog.open=false
  944. getOrder(this.item.orderId).then(response => {
  945. this.item=response.data
  946. that.getlogList(this.item.orderId);
  947. that.$parent.$parent.getList();
  948. });
  949. }).catch(function() {});
  950. },
  951. getInquiryOrder(){
  952. this.show.open=true;
  953. setTimeout(() => {
  954. this.$refs.Details.getDetails(this.item.inquiryOrderId);
  955. }, 1);
  956. },
  957. getPackageOrder(){
  958. this.pack.open=true;
  959. console.log(this.item.packageOrderId)
  960. setTimeout(() => {
  961. this.$refs.packDetails.getDetails(this.item.packageOrderId);
  962. }, 1);
  963. },
  964. tuiOrder(){
  965. var that=this;
  966. this.$confirm('是否确认推送到智慧药房?', "警告", {
  967. confirmButtonText: "确定",
  968. cancelButtonText: "取消",
  969. type: "warning"
  970. }).then(function() {
  971. var data={
  972. orderId:that.item.orderId
  973. }
  974. return tuiOrder(data);
  975. }).then(() => {
  976. this.msgSuccess("操作成功");
  977. getOrder(this.item.orderId).then(response => {
  978. this.item = response.data;
  979. this.getlogList(this.item.orderId);
  980. this.$parent.$parent.getList();
  981. });
  982. }).catch(function() {});
  983. },
  984. sendCancel(){
  985. this.sendVisible = false;
  986. this.form={
  987. deliveryCode: null,
  988. deliveryName:null,
  989. deliverySn:null,
  990. orderId:null,
  991. }
  992. },
  993. sendGoods(){
  994. this.form.orderId=this.item.orderId;
  995. sendgoods(this.form).then(response => {
  996. this.msgSuccess("修改成功");
  997. this.sendVisible = false;
  998. getOrder(this.item.orderId).then(response => {
  999. this.item = response.data;
  1000. this.getlogList(this.item.orderId);
  1001. this.$parent.$parent.getList();
  1002. });
  1003. this.form={
  1004. deliveryCode: null,
  1005. deliveryName:null,
  1006. deliverySn:null,
  1007. orderId:null,
  1008. }
  1009. });
  1010. },
  1011. getDetails(orderId,nickName,storeName) {
  1012. this.nickName=nickName;
  1013. this.storeName=storeName;
  1014. this.item=null;
  1015. this.tuiMoneyLogs=null;
  1016. getOrder(orderId).then(response => {
  1017. this.item = response.data;
  1018. this.tuiMoneyLogs = response.tuiMoneyLogs;
  1019. this.getlistOrderitem(orderId);
  1020. this.getlogList(orderId);
  1021. this.getPayment(orderId);
  1022. this.msgForm.userId=response.data.userId;
  1023. this.msgForm.followDoctorId=response.data.followDoctorId;
  1024. if(this.item.orderType==2){
  1025. this.getCount(this.item.prescribeId);
  1026. }
  1027. });
  1028. },
  1029. getCount(id){
  1030. getPrescribe(id).then(response => {
  1031. this.recipeType = response.data.recipeType;
  1032. this.counts = JSON.parse(response.data.usageJson).counts
  1033. });
  1034. },
  1035. getOrder(){
  1036. getOrder(this.item.orderId).then(response => {
  1037. this.item = response.data;
  1038. this.getlistOrderitem(this.item.orderId);
  1039. this.getlogList(this.item.orderId);
  1040. this.getPayment(this.item.orderId);
  1041. if(this.item.orderType==2){
  1042. this.getCount(this.item.prescribeId);
  1043. }
  1044. });
  1045. },
  1046. submitEditDyForm(){
  1047. this.$refs["editDyForm"].validate(valid => {
  1048. if (valid) {
  1049. console.log(this.editDyForm)
  1050. updateDelivery(this.editDyForm).then(response => {
  1051. if (response.code === 200) {
  1052. this.msgSuccess("操作成功");
  1053. this.editDy.open = false;
  1054. getOrder(this.item.orderId).then(response => {
  1055. this.item = response.data;
  1056. this.getlogList(this.item.orderId);
  1057. this.$parent.$parent.getList();
  1058. });
  1059. }
  1060. }).finally(()=>{
  1061. this.editDyForm.deliveryCode = null;
  1062. this.editDyForm.orderId = null;
  1063. this.editDyForm.deliveryId = null;
  1064. this.editDyForm.deliverySn = null;
  1065. })
  1066. }
  1067. });
  1068. },
  1069. getlistOrderitem(orderId){
  1070. listOrderitem(orderId).then(response => {
  1071. this.prod = response.rows;
  1072. this.showProd=[this.prod[0]]
  1073. });
  1074. },
  1075. getlogList(orderId){
  1076. logList(orderId).then(response => {
  1077. this.logs = response.rows;
  1078. });
  1079. },
  1080. getPayment(orderId){
  1081. payment(orderId).then(response => {
  1082. console.log(response)
  1083. this.pay = response.data;
  1084. });
  1085. }
  1086. }
  1087. }
  1088. </script>
  1089. <style>
  1090. .content{
  1091. height: 100%;
  1092. background-color: #fff;
  1093. padding: 0px 20px;
  1094. }
  1095. </style>
  1096. <style>
  1097. .contentx{
  1098. height: 100%;
  1099. background-color: #fff;
  1100. padding: 0px 20px 20px;
  1101. margin: 20px;
  1102. }
  1103. .el-descriptions-item__label.is-bordered-label{
  1104. font-weight: normal;
  1105. }
  1106. .el-descriptions-item__content {
  1107. max-width: 150px;
  1108. min-width: 100px;
  1109. }
  1110. .desct{
  1111. padding-top: 20px;
  1112. padding-bottom: 20px;
  1113. color: #524b4a;
  1114. font-weight: bold;
  1115. }
  1116. </style>
  1117. <style scoped>
  1118. .order-content{
  1119. margin: 10px;
  1120. }
  1121. .operate-container {
  1122. background: #F2F6FC;
  1123. height: 60px;
  1124. margin: -20px -20px 0;
  1125. line-height: 60px;
  1126. }
  1127. .operate-button-container {
  1128. float: right;
  1129. margin-right: 20px
  1130. }
  1131. </style>
  1132. <style scoped>
  1133. .chat-records {
  1134. overflow-y: auto;
  1135. }
  1136. .timestamp {
  1137. font-size: 12px;
  1138. color: #A9A9A9;
  1139. }
  1140. .chat-record {
  1141. margin: 10px;
  1142. flex-direction: column;
  1143. align-items: flex-start;
  1144. }
  1145. .sent {
  1146. background-color: #fbfdff;
  1147. color: #000839;
  1148. }
  1149. .sent .timestamp {
  1150. float: right;
  1151. }
  1152. .right{
  1153. float: right;
  1154. }
  1155. .received {
  1156. background-color: #fbfdff;
  1157. color: #000000;
  1158. }
  1159. .el-descriptions-item__content {
  1160. max-width: 150px;
  1161. min-width: 100px;
  1162. }
  1163. .order-content{
  1164. margin: 10px;
  1165. }
  1166. .operate-container {
  1167. background: #F2F6FC;
  1168. height: 60px;
  1169. margin: -20px -20px 0;
  1170. line-height: 60px;
  1171. }
  1172. .operate-button-container {
  1173. float: right;
  1174. margin-right: 20px
  1175. }
  1176. </style>