storeOrderDetails.vue 47 KB

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