storeOrderDetails.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225
  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. getUserPhone(orderId).then(response =>{
  693. this.item.userPhone = response.userPhone;
  694. })
  695. },
  696. handleAddress(){
  697. const orderId = this.item.orderId;
  698. 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.edit.open = true;
  768. this.editForm.orderId = this.item.orderId;
  769. this.editForm.remark = this.item.remark;
  770. this.editForm.userPhone = this.item.userPhone != null ? this.item.userPhone.toString() : "";
  771. if (this.item.orderBuyType != null) {
  772. this.editForm.orderBuyType = this.item.orderBuyType.toString();
  773. }
  774. this.editForm.orderChannel = this.item.orderChannel;
  775. this.editForm.qwSubject = this.item.qwSubject;
  776. this.editForm.scheduleId = this.item.scheduleId;
  777. const currentAddress = (this.item.userAddress || "").toString().trim();
  778. // 记录原始完整地址
  779. this.originalAddress = currentAddress;
  780. this.getCitys().then(() => {
  781. if (!currentAddress) {
  782. this.cityIds = [];
  783. this.editForm.userAddress = "";
  784. this.originalDetail = "";
  785. return;
  786. }
  787. // 按“省 市 区 详细地址(空格分隔)”进行拆分。若无区或无市也不报错。
  788. const parts = currentAddress.split(/\s+/);
  789. const detail = parts.pop() || ""; // 末尾作为详细地址
  790. const provLabel = parts[0];
  791. const cityLabel = parts[1];
  792. const areaLabel = parts[2];
  793. const province = this.citys.find(p => p.label === provLabel);
  794. if (province) {
  795. // 只回显省,不预选市/区
  796. this.cityIds = [province.value];
  797. } else {
  798. console.warn("未匹配到省:", { provLabel });
  799. this.cityIds = [];
  800. }
  801. // 输入框只放“详细地址(不含省市区)”
  802. this.editForm.userAddress = detail;
  803. // 记录原始详细地址(用于判断有无修改)
  804. this.originalDetail = detail;
  805. });
  806. },
  807. updateExpress(){
  808. var that=this;
  809. this.$confirm('定同步物流信息吗,同步后将自动发货?', "警告", {
  810. confirmButtonText: "确定",
  811. cancelButtonText: "取消",
  812. type: "warning"
  813. }).then(function() {
  814. var data=that.item.orderId
  815. return updateExpress(data);
  816. }).then(() => {
  817. this.msgSuccess("操作成功");
  818. getOrder(this.item.orderId).then(response => {
  819. this.item=response.data
  820. that.getlogList(this.item.orderId);
  821. that.$parent.$parent.getList();
  822. });
  823. }).catch(function() {});
  824. },
  825. addErpOrder(){
  826. var that=this;
  827. this.$confirm('是否确认推送管易?', "警告", {
  828. confirmButtonText: "确定",
  829. cancelButtonText: "取消",
  830. type: "warning"
  831. }).then(function() {
  832. var data=that.item.orderId
  833. return createErpOrder(data);
  834. }).then(() => {
  835. this.msgSuccess("操作成功");
  836. getOrder(this.item.orderId).then(response => {
  837. this.item=response.data
  838. that.getlogList(this.item.orderId);
  839. that.$parent.$parent.getList();
  840. });
  841. }).catch(function() {});
  842. },
  843. showErpOrder(){
  844. this.erpDialog.open=true;
  845. var data=this.item.extendOrderId;
  846. getEroOrder(data).then(response => {
  847. this.erp = response.data;
  848. if(response.data.orders!=null&&response.data.orders.length==1){
  849. this.erpOrder=response.data.orders[0]
  850. }
  851. });
  852. },
  853. editTuiMoney1(){
  854. var that=this;
  855. this.$confirm('是否冻结此订单推广佣金吗?', "警告", {
  856. confirmButtonText: "确定",
  857. cancelButtonText: "取消",
  858. type: "warning"
  859. }).then(function() {
  860. var data=that.item.orderId;
  861. return editTuiMoney(data);
  862. }).then(() => {
  863. this.msgSuccess("操作成功");
  864. getOrder(this.item.orderId).then(response => {
  865. this.item=response.data
  866. that.getlogList(this.item.orderId);
  867. that.$parent.$parent.getList();
  868. });
  869. }).catch(function() {});
  870. },
  871. editTuiMoney2(){
  872. var that=this;
  873. this.$confirm('是否解冻此订单推广佣金吗?', "警告", {
  874. confirmButtonText: "确定",
  875. cancelButtonText: "取消",
  876. type: "warning"
  877. }).then(function() {
  878. var data=that.item.orderId;
  879. return editTuiMoney(data);
  880. }).then(() => {
  881. this.msgSuccess("操作成功");
  882. getOrder(this.item.orderId).then(response => {
  883. this.item=response.data
  884. that.getlogList(this.item.orderId);
  885. that.$parent.$parent.getList();
  886. });
  887. }).catch(function() {});
  888. },
  889. moneyCancel(){
  890. this.money=null;
  891. this.moneyVisible=false;
  892. },
  893. refund(){
  894. var that=this;
  895. this.$confirm('是否确认申请退款?', "警告", {
  896. confirmButtonText: "确定",
  897. cancelButtonText: "取消",
  898. type: "warning"
  899. }).then(function() {
  900. var data={
  901. orderId:that.item.orderId
  902. }
  903. return afterSales(data);
  904. }).then(() => {
  905. this.msgSuccess("操作成功");
  906. getOrder(this.item.orderId).then(response => {
  907. this.item = response.data;
  908. this.getlogList(this.item.orderId);
  909. this.$parent.$parent.getList();
  910. });
  911. }).catch(function() {});
  912. },
  913. finishOrder(){
  914. var that=this;
  915. this.$confirm('是否确认客户已收货?', "警告", {
  916. confirmButtonText: "确定",
  917. cancelButtonText: "取消",
  918. type: "warning"
  919. }).then(function() {
  920. var data={
  921. orderId:that.item.orderId
  922. }
  923. return getGoods(data);
  924. }).then(() => {
  925. this.msgSuccess("操作成功");
  926. getOrder(this.item.orderId).then(response => {
  927. this.item = response.data;
  928. this.getlistOrderitem(this.item.orderId);
  929. this.getlogList(this.item.orderId);
  930. this.$parent.$parent.getList();
  931. });
  932. }).catch(function() {});
  933. },
  934. syncExpress(){
  935. var that=this;
  936. this.$confirm('确定同步物流状态吗', "警告", {
  937. confirmButtonText: "确定",
  938. cancelButtonText: "取消",
  939. type: "warning"
  940. }).then(function() {
  941. var data=that.item.orderId
  942. return syncExpress(data);
  943. }).then(() => {
  944. this.msgSuccess("操作成功");
  945. this.expressDialog.open=false
  946. getOrder(this.item.orderId).then(response => {
  947. this.item=response.data
  948. that.getlogList(this.item.orderId);
  949. that.$parent.$parent.getList();
  950. });
  951. }).catch(function() {});
  952. },
  953. getInquiryOrder(){
  954. this.show.open=true;
  955. setTimeout(() => {
  956. this.$refs.Details.getDetails(this.item.inquiryOrderId);
  957. }, 1);
  958. },
  959. getPackageOrder(){
  960. this.pack.open=true;
  961. console.log(this.item.packageOrderId)
  962. setTimeout(() => {
  963. this.$refs.packDetails.getDetails(this.item.packageOrderId);
  964. }, 1);
  965. },
  966. tuiOrder(){
  967. var that=this;
  968. this.$confirm('是否确认推送到智慧药房?', "警告", {
  969. confirmButtonText: "确定",
  970. cancelButtonText: "取消",
  971. type: "warning"
  972. }).then(function() {
  973. var data={
  974. orderId:that.item.orderId
  975. }
  976. return tuiOrder(data);
  977. }).then(() => {
  978. this.msgSuccess("操作成功");
  979. getOrder(this.item.orderId).then(response => {
  980. this.item = response.data;
  981. this.getlogList(this.item.orderId);
  982. this.$parent.$parent.getList();
  983. });
  984. }).catch(function() {});
  985. },
  986. sendCancel(){
  987. this.sendVisible = false;
  988. this.form={
  989. deliveryCode: null,
  990. deliveryName:null,
  991. deliverySn:null,
  992. orderId:null,
  993. }
  994. },
  995. sendGoods(){
  996. this.form.orderId=this.item.orderId;
  997. sendgoods(this.form).then(response => {
  998. this.msgSuccess("修改成功");
  999. this.sendVisible = false;
  1000. getOrder(this.item.orderId).then(response => {
  1001. this.item = response.data;
  1002. this.getlogList(this.item.orderId);
  1003. this.$parent.$parent.getList();
  1004. });
  1005. this.form={
  1006. deliveryCode: null,
  1007. deliveryName:null,
  1008. deliverySn:null,
  1009. orderId:null,
  1010. }
  1011. });
  1012. },
  1013. getDetails(orderId,nickName,storeName) {
  1014. this.nickName=nickName;
  1015. this.storeName=storeName;
  1016. this.item=null;
  1017. getOrder(orderId).then(response => {
  1018. this.item = response.data;
  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.counts = JSON.parse(response.data.usageJson).counts
  1032. });
  1033. },
  1034. getOrder(){
  1035. getOrder(this.item.orderId).then(response => {
  1036. this.item = response.data;
  1037. this.getlistOrderitem(this.item.orderId);
  1038. this.getlogList(this.item.orderId);
  1039. this.getPayment(this.item.orderId);
  1040. if(this.item.orderType==2){
  1041. this.getCount(this.item.prescribeId);
  1042. }
  1043. });
  1044. },
  1045. submitEditDyForm(){
  1046. this.$refs["editDyForm"].validate(valid => {
  1047. if (valid) {
  1048. console.log(this.editDyForm)
  1049. updateDelivery(this.editDyForm).then(response => {
  1050. if (response.code === 200) {
  1051. this.msgSuccess("操作成功");
  1052. this.editDy.open = false;
  1053. getOrder(this.item.orderId).then(response => {
  1054. this.item = response.data;
  1055. this.getlogList(this.item.orderId);
  1056. this.$parent.$parent.getList();
  1057. });
  1058. }
  1059. });
  1060. }
  1061. });
  1062. },
  1063. getlistOrderitem(orderId){
  1064. listOrderitem(orderId).then(response => {
  1065. this.prod = response.rows;
  1066. this.showProd=[this.prod[0]]
  1067. });
  1068. },
  1069. getlogList(orderId){
  1070. logList(orderId).then(response => {
  1071. this.logs = response.rows;
  1072. });
  1073. },
  1074. getPayment(orderId){
  1075. payment(orderId).then(response => {
  1076. console.log(response)
  1077. this.pay = response.data;
  1078. });
  1079. }
  1080. }
  1081. }
  1082. </script>
  1083. <style>
  1084. .content{
  1085. height: 100%;
  1086. background-color: #fff;
  1087. padding: 0px 20px;
  1088. }
  1089. </style>
  1090. <style>
  1091. .contentx{
  1092. height: 100%;
  1093. background-color: #fff;
  1094. padding: 0px 20px 20px;
  1095. margin: 20px;
  1096. }
  1097. .el-descriptions-item__label.is-bordered-label{
  1098. font-weight: normal;
  1099. }
  1100. .el-descriptions-item__content {
  1101. max-width: 150px;
  1102. min-width: 100px;
  1103. }
  1104. .desct{
  1105. padding-top: 20px;
  1106. padding-bottom: 20px;
  1107. color: #524b4a;
  1108. font-weight: bold;
  1109. }
  1110. </style>
  1111. <style scoped>
  1112. .order-content{
  1113. margin: 10px;
  1114. }
  1115. .operate-container {
  1116. background: #F2F6FC;
  1117. height: 60px;
  1118. margin: -20px -20px 0;
  1119. line-height: 60px;
  1120. }
  1121. .operate-button-container {
  1122. float: right;
  1123. margin-right: 20px
  1124. }
  1125. </style>
  1126. <style scoped>
  1127. .chat-records {
  1128. overflow-y: auto;
  1129. }
  1130. .timestamp {
  1131. font-size: 12px;
  1132. color: #A9A9A9;
  1133. }
  1134. .chat-record {
  1135. margin: 10px;
  1136. flex-direction: column;
  1137. align-items: flex-start;
  1138. }
  1139. .sent {
  1140. background-color: #fbfdff;
  1141. color: #000839;
  1142. }
  1143. .sent .timestamp {
  1144. float: right;
  1145. }
  1146. .right{
  1147. float: right;
  1148. }
  1149. .received {
  1150. background-color: #fbfdff;
  1151. color: #000000;
  1152. }
  1153. .el-descriptions-item__content {
  1154. max-width: 150px;
  1155. min-width: 100px;
  1156. }
  1157. .order-content{
  1158. margin: 10px;
  1159. }
  1160. .operate-container {
  1161. background: #F2F6FC;
  1162. height: 60px;
  1163. margin: -20px -20px 0;
  1164. line-height: 60px;
  1165. }
  1166. .operate-button-container {
  1167. float: right;
  1168. margin-right: 20px
  1169. }
  1170. </style>