| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937 |
- <template>
- <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
- <div style="padding: 20px; background-color: #fff;">
- 订单详情
- </div>
- <div class="contentx" v-if="item!=null">
- <div class="desct"></div>
- <div class="order-status" v-if="item!=null" >
- <el-steps :active="item.status==4?item.status:item.status" align-center finish-status="success">
- <el-step title="待支付"></el-step>
- <el-step title="待发货"></el-step>
- <el-step title="待收货"></el-step>
- <el-step title="已完成"></el-step>
- </el-steps>
- </div>
- <el-card shadow="never" style="margin-top: 15px">
- <div class="operate-container" v-if="item!=null">
- <span style="margin-left: 20px" class="color-danger">订单状态:
- <el-tag prop="status" v-for="(ite, index) in orderOptions" v-if="item.status==ite.dictValue">{{ite.dictLabel}}</el-tag>
- </span>
- <!-- <div class="operate-button-container" v-if="item.status==3">-->
- <!-- <el-button size="mini" @click="finishOrder()" v-hasPermi="['his:liveOrder:good']">确认收货</el-button>-->
- <!-- </div>-->
- <div class="operate-button-container" v-if="item.status==2&&item.orderType==1">
- <el-button size="mini" @click="sendVisible=true" v-hasPermi="['his:liveOrder:sendGoods']">发货</el-button>
- </div>
- <div class="operate-button-container" v-if="item.status==2&&item.orderType==2">
- <el-button size="mini" @click="tuiOrder()" v-hasPermi="['his:liveOrder:sendHisGoods']" >推送订单</el-button>
- </div>
- <!-- <div class="operate-button-container" v-if="item.inquiryOrderId!=null&&item.inquiryOrderId!=''" v-hasPermi="['his:liveOrder:inquiry']">-->
- <!-- <el-button size="mini" @click="getInquiryOrder()" >问诊订单</el-button>-->
- <!-- </div>-->
- <!-- <div class="operate-button-container" v-if="item.packageOrderId!=null&&item.packageOrderId!=''" v-hasPermi="['his:liveOrder:package']" >-->
- <!-- <el-button size="mini" @click="getPackageOrder()" >套餐包订单</el-button>-->
- <!-- </div>-->
- <div class="operate-button-container" v-if="item.deliverySn!=null" v-hasPermi="['his:liveOrder:express']">
- <el-button size="mini" @click="showExpress()" >查看物流</el-button>
- </div>
- <div class="operate-button-container" >
- <el-button size="mini" @click="editDelivery()" v-hasPermi="['his:liveOrder:updateDelivery']" >修改物流单号</el-button>
- </div>
- <div class="operate-button-container" >
- <el-button size="mini" @click="editOrder()" v-hasPermi="['his:liveOrder:edit']" >修改订单</el-button>
- </div>
- <!-- <div class="operate-button-container" v-if="item.status ==2 && item.extendOrderId == null && item.deliverySn == null&&item.orderType==1" v-hasPermi="['his:liveOrder:createErpOrder']">-->
- <!-- <el-button size="mini" @click="addErpOrder()" >创建ERP订单信息</el-button>-->
- <!-- </div>-->
- <!-- <div class="operate-button-container" v-if="item.extendOrderId!=null && item.orderType==1" v-hasPermi="['his:liveOrder:getEroOrder']" >-->
- <!-- <el-button size="mini" @click="showErpOrder()" >ERP订单信息</el-button>-->
- <!-- </div>-->
- <!-- <div class="operate-button-container" v-if="item.tuiMoneyStatus==0 && item.status==4" v-hasPermi="['his:liveOrder:editTuiMoney']" >-->
- <!-- <el-button size="mini" @click="editTuiMoney1()" >解冻</el-button>-->
- <!-- </div>-->
- <!-- <div class="operate-button-container" v-if="item.tuiMoneyStatus==1 && item.status==4" v-hasPermi="['his:liveOrder:editTuiMoney']" >-->
- <!-- <el-button size="mini" @click="editTuiMoney2()" >冻结</el-button>-->
- <!-- </div>-->
- <!-- <div class="operate-button-container" v-if="item.followTime!=null&&item.followTime!=''" v-hasPermi="['his:liveOrder:msgList']" >-->
- <!-- <el-button size="mini" @click="followMsg()" >随访记录</el-button>-->
- <!-- </div>-->
- <div class="operate-button-container" v-if="item.status>1">
- <el-button size="mini" @click="refund()" v-hasPermi="['his:liveOrder:refundOrderMoney']">申请退款</el-button>
- </div>
- <!-- <div class="operate-button-container" v-if="item.status== -2" >-->
- <!-- <el-button size="mini" @click="returnCost()" v-hasPermi="['his:liveOrder:returnCost']" >成本退还</el-button>-->
- <!-- </div>-->
- <!-- <div class="operate-button-container" >-->
- <!-- <el-button size="mini" @click="sendFollowMsg()" v-if="item.status>1" v-hasPermi="['his:liveOrder:sendMsg']">发送随访消息</el-button>-->
- <!-- </div>-->
- </div>
- <div class="desct">
- 基本信息
- </div>
- <el-descriptions :column="3" border >
- <el-descriptions-item label="订单编号" ><span v-if="item!=null">{{item.orderCode}}</span></el-descriptions-item>
- <el-descriptions-item label="会员"><span v-if="item.nickName!=null">{{item.nickName}}({{item.phone}})</span></el-descriptions-item>
- <el-descriptions-item label="会员ID" ><span v-if="item!=null">{{item.userId}}</span></el-descriptions-item>
- <el-descriptions-item label="支付方式" ><dict-tag :options="PayOptions" :value="item.payType"/></el-descriptions-item>
- <el-descriptions-item label="订单来源" ><dict-tag :options="sourceOptions" :value="item.source"/></el-descriptions-item>
- <el-descriptions-item label="店铺名称" ><span v-if="item!=null">{{item.storeName}}</span></el-descriptions-item>
- <el-descriptions-item label="收货人" > <span v-if="item!=null">{{item.userName}}</span> </el-descriptions-item>
- <el-descriptions-item label="收货人电话" > <span v-if="item!=null">{{item.userPhone}}</span>
- <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle v-hasPermi="['his:liveOrder:queryPhone']"></el-button>
- </el-descriptions-item>
- <el-descriptions-item label="详细地址" > <span>{{item.userAddress}}</span> </el-descriptions-item>
- <el-descriptions-item label="所属公司"><span v-if="item!=null">{{item.companyName}}</span></el-descriptions-item>
- <el-descriptions-item label="员工"><span v-if="item!=null">{{item.companyUserName}}</span></el-descriptions-item>
- <el-descriptions-item label="推广佣金" ><span v-if="item.tuiMoney!=null">{{item.tuiMoney.toFixed(2)}}</span></el-descriptions-item>
- <el-descriptions-item label="推广佣金状态" ><span v-if="item!=null"><dict-tag :options="tuiOptions" :value="item.tuiMoneyStatus"/> </span></el-descriptions-item>
- <el-descriptions-item label="快递公司编号" > <span v-if="item!=null">{{item.deliveryCode}}</span></el-descriptions-item>
- <el-descriptions-item label="快递名称" ><span v-if="item!=null">{{item.deliveryName}}</span></el-descriptions-item>
- <el-descriptions-item label="快递单号" ><span v-if="item!=null">{{item.deliverySn}}</span></el-descriptions-item>
- <el-descriptions-item label="ERP编号" ><span v-if="item!=null">{{item.extendOrderId}}</span></el-descriptions-item>
- <el-descriptions-item label="物流状态" ><dict-tag :options="deliveryStatusOptions" :value="item.deliveryStatus"/></el-descriptions-item>
- <el-descriptions-item label="物流结算状态" ><dict-tag :options="deliveryPayStatusOptions" :value="item.deliveryPayStatus"/></el-descriptions-item>
- <el-descriptions-item label="物流结算时间" ><span v-if="item!=null">{{item.deliveryPayTime}}</span></el-descriptions-item>
- <el-descriptions-item label="物流结算金额" ><span v-if="item!=null">{{item.deliveryPayMoney}}</span></el-descriptions-item>
- <el-descriptions-item label="物流跟踪状态" ><span v-if="item!=null"><dict-tag :options="deliveryTypeOptions" :value="item.deliveryType"/> </span></el-descriptions-item>
- <el-descriptions-item label="用户备注" ><span v-if="item!=null">{{item.remark}}</span></el-descriptions-item>
- <el-descriptions-item label="档期归属" >
- <el-tag prop="scheduleId" v-for="(schedule, index) in scheduleOptions" v-if="item!=null&&item.scheduleId==schedule.id">{{schedule.name}}
- </el-tag>
- </el-descriptions-item>
- <el-descriptions-item label="订单购买类型" ><span v-if="item!=null"><dict-tag :options="orderBuyTypeOptions" :value="item.orderBuyType"/></span></el-descriptions-item>
- <el-descriptions-item label=" 公众号/渠道" ><span v-if="item!=null">{{item.channel}}</span></el-descriptions-item>
- <el-descriptions-item label=" 渠道" ><span v-if="item!=null"><dict-tag :options="channelOptions" :value="item.orderChannel"/></span></el-descriptions-item>
- <el-descriptions-item label=" 企微主体" ><span v-if="item!=null"><dict-tag :options="qwSubjectOptions" :value="item.qwSubject"/></span></el-descriptions-item>
- </el-descriptions>
- </el-card>
- </div>
- <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">
- <div class="desct">
- 商品信息
- </div>
- <el-tooltip class="item" effect="dark" :content="showList ? '显示全部' : '隐藏'" placement="top" style="float: right;">
- <el-button size="mini" circle icon="el-icon-search" @click="showListD()" />
- </el-tooltip>
- <el-table border v-if="showProd!=null" :data="showProd" size="small" style="width: 100%;margin-top: 20px" >
- <el-table-column label="商品图片" width="150" align="center">
- <template slot-scope="scope">
- <img :src="scope.row.imgUrl" style="height: 80px">
- </template>
- </el-table-column>
- <el-table-column label="商品编码" width="300" align="center">
- <template slot-scope="scope">
- <p>{{scope.row.barCode}}</p>
- </template>
- </el-table-column>
- <el-table-column label="商品名称" width="300" align="center">
- <template slot-scope="scope">
- <p>{{scope.row.productName}}</p>
- </template>
- </el-table-column>
- <el-table-column label="单价" width="240" align="center">
- <template slot-scope="scope">
- <p>¥{{scope.row.price.toFixed(2)}}</p>
- </template>
- </el-table-column>
- <el-table-column label="市场价" width="240" align="center">
- <template slot-scope="scope">
- {{scope.row.otPrice}}
- </template>
- </el-table-column>
- <!-- <el-table-column label="数量" width="180" align="center">-->
- <!-- <template slot-scope="scope">-->
- <!-- {{scope.row.num}}-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column label="小计" align="center">-->
- <!-- <template slot-scope="scope" >-->
- <!-- ¥{{(scope.row.num*scope.row.price).toFixed(2)}}-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
- <div style="float: right;margin: 20px" v-if="item.totalPrice!=null">
- 合计:<span class="color-danger">¥{{item.totalPrice.toFixed(2)}}</span>
- </div>
- </div>
- <el-dialog :title="edit.title" :visible.sync="edit.open" width="600px" append-to-body>
- <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
- <el-form-item label="订单状态" prop="status" >
- <el-select v-model="editForm.status" placeholder="请选择状态" clearable size="small" filterable>
- <el-option
- v-for="dict in orderOptions "
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="物流状态" prop="deliveryStatus" >
- <el-select v-model="editForm.deliveryStatus" placeholder="请选择物流状态" clearable size="small" filterable>
- <el-option
- v-for="dict in deliveryStatusOptions "
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="物流跟踪状态" prop="deliveryType" >
- <el-select v-model="editForm.deliveryType" placeholder="请选择状态" clearable size="small" filterable>
- <el-option
- v-for="dict in deliveryTypeOptions "
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="详情地址" prop="userAddress" >
- <el-input v-model="editForm.userAddress" placeholder="请输入" />
- </el-form-item>
- <el-form-item label="备注" prop="remark" >
- <el-input v-model="editForm.remark" placeholder="请输入备注" />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitEditForm">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="editDy.title" :visible.sync="editDy.open" width="600px" append-to-body>
- <el-form ref="editDyForm" :model="editDyForm" :rules="editDyRules" label-width="100px">
- <div v-hasPermi="['his:liveOrder:updateErpOrder']" style="margin-bottom: 20px;" >
- <el-button size="mini" @click="updateErpOrder" >同步物流单号信息</el-button>
- </div>
- <el-form-item label="物流公司" prop="deliveryCode" >
- <el-select style="width:220px" v-model="editDyForm.deliveryCode" placeholder="请选择" clearable size="small">
- <el-option key="SF" label="顺丰" value="SF" />
- <el-option key="EMS" label="邮政" value="EMS" />
- <el-option key="ZTO" label="中通" value="ZTO" />
- <el-option key="JD" label="京东" value="JD" />
- <el-option key="DBL" label="德邦" value="DBL" />
- <el-option key="YD" label="韵达" value="YD" />
- </el-select>
- </el-form-item>
- <el-form-item label="物流单号" prop="deliverySn" >
- <el-input v-model="editDyForm.deliverySn" placeholder="请输入物流单号" />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitEditDyForm">确 定</el-button>
- <el-button @click="editDy.open = false">取 消</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
- <div v-hasPermi="['his:storeOrder:syncExpress']" >
- <el-button size="mini" @click="syncExpress()" >同步快递鸟物流状态</el-button>
- </div>
- <el-table style="margin-top: 20px;width: 100%"
- ref="orderHistoryTable"
- :data="traces" border>
- <el-table-column label="操作时间" width="160" align="center">
- <template slot-scope="scope">
- {{scope.row.AcceptTime}}
- </template>
- </el-table-column>
- <el-table-column label="位置" align="center">
- <template slot-scope="scope">
- {{scope.row.Location}}
- </template>
- </el-table-column>
- <el-table-column label="描述" align="center">
- <template slot-scope="scope">
- {{scope.row.AcceptStation}}
- </template>
- </el-table-column>
- </el-table>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- getLiveOrder,
- syncExpress,
- updateLiveOrder,
- updateErp,
- getExpress,
- listOrderitem,
- tuiOrder,
- refundOrderMoney,
- editDeliveryId
- } from "@/api/live/liveOrder";
- export default {
- props:["data"],
- data() {
- return {
- expressDialog:{
- title:"物流信息",
- open:false,
- },
- editDy:{
- title:"修改物流单号",
- open:false,
- },
- sourceOptions:[],
- followDialogVisible:false,
- dialogVisible:false,
- total: 0,
- msgForm:{
- pageNum: 1,
- pageSize: 10,
- userId:null,
- followDoctorId:null,
- },
- editDyForm:{
- orderId:null,
- deliveryId:null,
- deliveryCode:null,
- },
- showList:true,
- edit:{
- title:"修改订单",
- open:false,
- },
- erpDialog:{
- title:"ERP订单信息",
- open:false,
- },
- show:{
- title:"问诊详情",
- open:false,
- },
- pack:{
- title:"套餐包",
- open:false,
- },
- followList:[],
- money:null,
- moneyVisible:false,
- rules:{},
- sendVisible:false,
- logs:[],
- pay:[],
- nickName:null,
- storeName:null,
- PayOptions:[],
- orderOptions:[],
- payStatusOptions:[],
- express:null,
- traces:[],
- msg:[],
- sexOptions:[],
- refundOptions:[],
- channelOptions:[],
- qwSubjectOptions:[],
- tuiOptions:[],
- orOptions:[],
- storeOPtions:[],
- deliveryStatusOptions:[],
- deliveryPayStatusOptions:[],
- deliveryTypeOptions:[],
- orderTypeOptions:[],
- orderBuyTypeOptions:[],
- scheduleOptions:[],
- item:null,
- tuiMoneyLogs:[],
- erpOrder:null,
- prod:null,
- showProd:null,
- editForm:{
- orderId:null,
- status:null,
- userAddress:null,
- deliveryStatus:null,
- deliveryType:null,
- remark:"",
- },
- editDyRules:{
- deliverySn: [
- { required: true, message: "物流单号不能为空", trigger: "blur" }
- ],
- deliveryCode: [
- { required: true, message: "物流公司不能为空", trigger: "blur" }
- ],
- },
- editRules:{
- userAddress: [
- { required: true, message: "收货地址不能为空", trigger: "blur" }
- ],
- },
- mrules:{
- },
- form: {
- deliveryCode: null,
- deliveryName:null,
- deliverySn:null,
- orderId:null,
- }
- }
- },
- created() {
- this.getDicts("sys_store_pay_type").then(response => {
- this.PayOptions = response.data;
- });
- this.getDicts("sys_order_status").then(response => {
- this.orderOptions = response.data;
- });
- this.getDicts("sys_order_pay").then(response => {
- this.payStatusOptions = response.data;
- });
- this.getDicts("sys_order_source").then(response => {
- this.sourceOptions = response.data;
- });
- this.getDicts("sys_store_order_type").then(response => {
- this.orderTypeOptions = response.data;
- });
- this.getDicts("sys_store_order_buy_type").then(response => {
- this.orderBuyTypeOptions = response.data;
- });
- this.getDicts("sys_refund_status").then(response => {
- this.refundOptions = response.data;
- });
- this.getDicts("sys_store_channel").then(response => {
- this.channelOptions = response.data;
- });
- this.getDicts("sys_store_qw_subject").then(response => {
- this.qwSubjectOptions = response.data;
- });
- this.getDicts("sys_tui_money_status").then(response => {
- this.tuiOptions = response.data;
- });
- this.getDicts("sys_company_or").then(response => {
- this.orOptions = response.data;
- });
- this.getDicts("sys_patient_sex").then(response => {
- this.sexOptions = response.data;
- });
- this.getDicts("sys_store_delivery_pay_status").then(response => {
- this.deliveryPayStatusOptions = response.data;
- });
- this.getDicts("sys_store_order_delivery_status").then(response => {
- this.deliveryStatusOptions = response.data;
- });
- this.getDicts("sys_delivery_type").then(response => {
- this.deliveryTypeOptions = response.data;
- });
- },
- methods: {
- followMsg(row){
- const userId = this.item.userId;
- const followDoctorId =this.item.followDoctorId;
- const doctorName = this.item.doctorName;
- const patientName = this.item.patientName;
- setTimeout(() => {
- this.$refs.msgDetails.getDetails(userId,followDoctorId,doctorName,patientName);
- }, 500);
- this.dialogVisible = true;
- },
- msgDialogClose(){
- this.dialogVisible = false;
- },
- handlePhone(){
- const orderId = this.item.orderId;
- getOrderUserPhone(orderId).then(response =>{
- this.item.userPhone = response.userPhone;
- })
- },
- editDelivery(){
- this.editDy.open = true;
- this.editDyForm.orderId = this.item.orderId;
- },
- showListD(){
- if(this.showList){
- this.showProd=this.prod
- }else{
- this.showProd=[this.prod[0]]
- }
- this.showList=this.showList?false:true;
- },
- showExpress(){
- this.expressDialog.open=true;
- getExpress({
- orderId: this.item.orderId,
- deliverId: this.item.deliverySn,
- deliverSn: this.item.deliveryCode,
- }).then(response => {
- this.express = response.data;
- if(this.express!=null&&this.express.Traces!=null){
- this.traces=this.express.Traces
- }
- });
- },
- updateErpOrder(){
- var that=this;
- this.$confirm('确定同步物流单号信息吗', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data={orderId:that.item.orderId}
- return updateErp(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item=response.data
- that.getlogList(this.item.orderId);
- that.$parent.$parent.getList();
- });
- this.editDy.open = false
- }).catch(function() {});
- },
- sendFollowMsg(){
- var that=this;
- this.$confirm('是否确认发送消息?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return sendMsg(that.item.orderId);
- }).then(() => {
- this.msgSuccess("操作成功");
- }).catch(function() {});
- },
- handleClose1(){
- this.dialogVisible=false;
- },
- handleClose2(){
- this.followDialogVisible=false;
- },
- follow(row){
- getMsgFollow(row).then(response => {
- if(response.data.formJson!=null&&response.data.formJson!=''&&response.data.writeStatus==1){
- this.messageFollowList=JSON.parse(response.data.formJson );
- this.followDialogVisible=true;
- }else{
- this.$message({
- message: '未填写随访单',
- type: 'info'
- });
- return
- }
- });
- },
- //修改订单状态
- submitEditForm(){
- this.$refs["editForm"].validate(valid => {
- if (valid) {
- updateLiveOrder(this.editForm).then(response => {
- if (response.code === 200) {
- this.msgSuccess("操作成功");
- this.edit.open = false;
- getLiveOrder(this.item.orderId).then(response => {
- this.item=response.data
- that.getlogList(this.item.orderId);
- that.$parent.$parent.getList();
- });
- }
- });
- }
- });
- },
- editOrder(){
- this.edit.open=true;
- this.editForm.orderId=this.item.orderId;
- this.editForm.remark=this.item.remark;
- this.editForm.userAddress = this.item.userAddress == null ? '' : this.item.userAddress.toString();
- this.editForm.status = this.item.status == null ? '' : this.item.status.toString();
- this.editForm.deliveryType = this.item.deliveryType == null ? '' : this.item.deliveryType.toString();
- this.editForm.deliveryStatus = this.item.deliveryStatus == null ? '' : this.item.deliveryStatus.toString();
- },
- updateExpress(){
- var that=this;
- this.$confirm('定同步物流信息吗,同步后将自动发货?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data=that.item.orderId
- return updateExpress(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item=response.data
- that.getlogList(this.item.orderId);
- that.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- addErpOrder(){
- var that=this;
- this.$confirm('是否确认推送管易?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data=that.item.orderId
- return createErpOrder(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item=response.data
- that.getlogList(this.item.orderId);
- that.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- showErpOrder(){
- this.erpDialog.open=true;
- var data=this.item.extendOrderId;
- getEroOrder(data).then(response => {
- this.erp = response.data;
- if(response.data.orders!=null&&response.data.orders.length==1){
- this.erpOrder=response.data.orders[0]
- }
- });
- },
- editTuiMoney1(){
- var that=this;
- this.$confirm('是否解冻此订单推广佣金吗?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data=that.item.orderId;
- return editTuiMoney(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item=response.data
- that.getlogList(this.item.orderId);
- that.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- editTuiMoney2(){
- var that=this;
- this.$confirm('是否冻结此订单推广佣金吗?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data=that.item.orderId;
- return editTuiMoney(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item=response.data
- that.getlogList(this.item.orderId);
- that.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- returnCost(){
- var that=this;
- this.$confirm('是否退还此订单成本吗?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data=that.item.orderId;
- return returnCost(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- this.getDetails(this.item.orderId,null,null)
- }).catch(function() {});
- },
- moneyCancel(){
- this.money=null;
- this.moneyVisible=false;
- },
- refund(){
- var that=this;
- this.$confirm('是否确认申请退款?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data={
- orderId:that.item.orderId
- }
- return refundOrderMoney(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item = response.data;
- // this.getlogList(this.item.orderId);
- this.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- finishOrder(){
- var that=this;
- this.$confirm('是否确认客户已收货?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data={
- orderId:that.item.orderId
- }
- return getGoods(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item = response.data;
- this.getlistOrderitem(this.item.orderId);
- // this.getlogList(this.item.orderId);
- this.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- syncExpress(){
- var that=this;
- this.$confirm('确定同步物流状态吗', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data=that.item.orderId
- return syncExpress(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- this.expressDialog.open=false
- getLiveOrder(this.item.orderId).then(response => {
- this.item=response.data
- that.getlogList(this.item.orderId);
- that.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- getInquiryOrder(){
- this.show.open=true;
- setTimeout(() => {
- this.$refs.Details.getDetails(this.item.inquiryOrderId);
- }, 1);
- },
- getPackageOrder(){
- this.pack.open=true;
- console.log(this.item.packageOrderId)
- setTimeout(() => {
- this.$refs.packDetails.getDetails(this.item.packageOrderId);
- }, 1);
- },
- tuiOrder(){
- var that=this;
- this.$confirm('是否确认推送订单?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- var data={
- orderId:that.item.orderId
- }
- return tuiOrder(data);
- }).then(() => {
- this.msgSuccess("操作成功");
- getLiveOrder(this.item.orderId).then(response => {
- this.item = response.data;
- this.getlogList(this.item.orderId);
- this.$parent.$parent.getList();
- });
- }).catch(function() {});
- },
- getDetails(orderId,nickName,storeName) {
- this.nickName=nickName;
- this.storeName=storeName;
- this.item=null;
- this.tuiMoneyLogs=null;
- getLiveOrder(orderId).then(response => {
- this.item = response.data;
- this.tuiMoneyLogs = response.tuiMoneyLogs;
- // this.getlogList(orderId);
- // this.getPayment(orderId);
- this.msgForm.userId=response.data.userId;
- this.msgForm.followDoctorId=response.data.followDoctorId;
- this.getlistOrderitem(this.item.orderId);
- });
- },
- getOrder(){
- getLiveOrder(this.item.orderId).then(response => {
- this.item = response.data;
- this.getlistOrderitem(this.item.orderId);
- // this.getlogList(this.item.orderId);
- // this.getPayment(this.item.orderId);
- });
- },
- submitEditDyForm(){
- this.$refs["editDyForm"].validate(valid => {
- if (valid) {
- editDeliveryId({orderId: this.editDyForm.orderId,
- deliverSn: this.editDyForm.deliveryCode,
- deliverId: this.editDyForm.deliverySn,type: 1}).then(response => {
- if (response.code === 200) {
- this.msgSuccess("操作成功");
- this.editDy.open = false;
- getLiveOrder(this.item.orderId).then(response => {
- this.item = response.data;
- this.$parent.$parent.getList();
- });
- }
- })
- // updateLiveOrder(this.editDyForm).then(response => {
- // if (response.code === 200) {
- // this.msgSuccess("操作成功");
- // this.editDy.open = false;
- // getLiveOrder(this.item.orderId).then(response => {
- // this.item = response.data;
- // // this.getlogList(this.item.orderId);
- // this.$parent.$parent.getList();
- // });
- // }
- // });
- }
- });
- },
- getlistOrderitem(orderId){
- this.prod = null
- this.showProd=[]
- this.showList = true
- listOrderitem(orderId).then(response => {
- this.prod = response.rows;
- if (this.prod.length > 0) {
- this.showProd=[this.prod[0]];
- }
- });
- },
- // getlogList(orderId){
- // logList(orderId).then(response => {
- // this.logs = response.rows;
- // });
- // },
- // getPayment(orderId){
- // payment(orderId).then(response => {
- // console.log(response)
- // this.pay = response.data;
- // });
- // }
- }
- }
- </script>
- <style scoped>
- .content{
- height: 100%;
- background-color: #fff;
- padding: 0px 20px;
- }
- .contentx{
- height: 100%;
- background-color: #fff;
- padding: 0px 20px 20px;
- margin: 20px;
- }
- .el-descriptions-item__label.is-bordered-label{
- font-weight: normal;
- }
- .el-descriptions-item__content {
- max-width: 150px;
- min-width: 100px;
- }
- .desct{
- padding-top: 20px;
- padding-bottom: 20px;
- color: #524b4a;
- font-weight: bold;
- }
- .order-content{
- margin: 10px;
- }
- .operate-container {
- background: #F2F6FC;
- height: 60px;
- margin: -20px -20px 0;
- line-height: 60px;
- }
- .operate-button-container {
- float: right;
- margin-right: 20px
- }
- </style>
- <style scoped>
- .chat-records {
- overflow-y: auto;
- }
- .timestamp {
- font-size: 12px;
- color: #A9A9A9;
- }
- .chat-record {
- margin: 10px;
- flex-direction: column;
- align-items: flex-start;
- }
- .sent {
- background-color: #fbfdff;
- color: #000839;
- }
- .sent .timestamp {
- float: right;
- }
- .right{
- float: right;
- }
- .received {
- background-color: #fbfdff;
- color: #000000;
- }
- .el-descriptions-item__content {
- max-width: 150px;
- min-width: 100px;
- }
- .order-content{
- margin: 10px;
- }
- .operate-container {
- background: #F2F6FC;
- height: 60px;
- margin: -20px -20px 0;
- line-height: 60px;
- }
- .operate-button-container {
- float: right;
- margin-right: 20px
- }
- </style>
|