123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953 |
- <template>
- <div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- class="clearFix"
- >
- <el-form-item label="订单编号" prop="orderSn">
- <el-input
- v-model="queryParams.orderSn"
- placeholder="请输入订单编号"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <!-- <el-form-item label="物品名称" prop="productName">
- <el-input
- v-model="queryParams.productName"
- placeholder="请输入物品名称"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item> -->
- <!-- <el-form-item label="优惠券ID" prop="couponId">
- <el-input
- v-model="queryParams.couponId"
- placeholder="请输入优惠券ID"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item> -->
- <!-- <el-form-item label="登录人" prop="memberName">
- <el-input
- v-model="queryParams.memberName"
- placeholder="请输入登录人"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="登录人联系电话" prop="memberMobile">
- <el-input
- v-model="queryParams.memberMobile"
- placeholder="请输入登录人联系电话"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item> -->
- <!-- <el-form-item label="发件联系人" prop="sendContactName">
- <el-input
- v-model="queryParams.sendContactName"
- placeholder="请输入发件联系人"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="发件人联系电话" prop="sendPhone">
- <el-input
- v-model="queryParams.sendPhone"
- placeholder="请输入发件人联系电话"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="收件联系人" prop="receiptContactName">
- <el-input
- v-model="queryParams.receiptContactName"
- placeholder="请输入收件联系人"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="收件人联系电话" prop="receiptPhone">
- <el-input
- v-model="queryParams.receiptPhone"
- placeholder="请输入收件人联系电话"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item> -->
- <!-- <el-form-item label="订单状态" prop="deliveryStatus">
- <el-select v-model="queryParams.deliveryStatus" placeholder="订单状态" clearable >
- <el-option v-for="item in deliveryStatusOption" :key="item.value" :label="item.label" :value="item.value"/>
- </el-select>
- </el-form-item> -->
- <!-- <el-form-item label="接单时间" prop="deliveryTime">
- <el-date-picker v-model="deliveryDate" type="datetimerange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"
- :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss">
- </el-date-picker>
- </el-form-item> -->
- <el-form-item label="下单时间" prop="createTime">
- <el-date-picker
- v-model="createDate"
- type="datetimerange"
- range-separator="至"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- :default-time="['00:00:00', '23:59:59']"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="完成时间" prop="completeTime">
- <el-date-picker
- v-model="completeDate"
- type="datetimerange"
- range-separator="至"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- :default-time="['00:00:00', '23:59:59']"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" @click="handleQuery"
- >搜索</el-button
- >
- <!-- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> -->
- <el-button @click="show2 = !show2">
- <span v-if="show2 == true">隐藏</span>
- <span v-else>显示</span>
- </el-button>
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- @click="handleExport" v-hasPermi="['module:order:export']"
- >导出</el-button>
- </el-form-item>
- <!-- <el-form-item label="商家名称" prop="merchantId" v-if="user.type == 2">
- <el-select v-model="queryParams.merchantId" placeholder="商家名称" clearable>
- <el-option v-for="item in merchantOption" :key="item.id" :label="item.merchantName" :value="item.id"></el-option>
- </el-select>
- </el-form-item> -->
- <!-- <el-form-item label="商家名称" prop="merchantName">
- <el-input
- v-model="queryParams.merchantName"
- placeholder="请输入商家名称"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item> -->
- <!-- <el-form-item label="代理商名称" prop="aId">
- <el-select v-model="queryParams.aId" filterable clearable placeholder="请选择 / 输入代理商">
- <el-option
- v-for="item in agentList"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="配送平台名称" prop="deliveryId">
- <el-select v-model="queryParams.deliveryId" placeholder="配送平台名称" clearable>
- <el-option v-for="item in dspDeliveryOption" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- </el-form-item> -->
- <!-- <el-form-item label="收件地区">
- <OldReceipt :areaProp="areaProp" @changeArea="changeArea" ref="area"/>
- </el-form-item> -->
- <transition name="el-zoom-in-top">
- <div v-show="show2" class="clearFix">
- <el-form-item label="发件地区">
- <OldSend
- :sendAreaProp="sendAreaProp"
- @changeArea="changeSendArea"
- ref="sendArea"
- />
- </el-form-item>
- <el-form-item label="代理商名称" prop="aId">
- <el-select
- v-model="queryParams.aId"
- filterable
- clearable
- placeholder="请选择 / 输入代理商"
- >
- <el-option
- v-for="item in agentList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="配送平台名称" prop="deliveryId">
- <el-select
- v-model="queryParams.deliveryId"
- placeholder="配送平台名称"
- clearable
- >
- <el-option
- v-for="item in dspDeliveryOption"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="发件联系人" prop="sendContactName">
- <el-input
- v-model="queryParams.sendContactName"
- placeholder="请输入发件联系人"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="发件人联系电话" prop="sendPhone">
- <el-input
- v-model="queryParams.sendPhone"
- placeholder="请输入发件人联系电话"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="收件联系人" prop="receiptContactName">
- <el-input
- v-model="queryParams.receiptContactName"
- placeholder="请输入收件联系人"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="收件人联系电话" prop="receiptPhone">
- <el-input
- v-model="queryParams.receiptPhone"
- placeholder="请输入收件人联系电话"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="商家名称" prop="merchantName">
- <el-input
- v-model="queryParams.merchantName"
- placeholder="请输入商家名称"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="门店名称" prop="shopName">
- <el-input
- v-model="queryParams.shopName"
- placeholder="请输入门店名称"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="下单人" prop="memberName">
- <el-input
- v-model="queryParams.memberName"
- placeholder="请输入下单人"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="下单人联系电话" prop="memberMobile">
- <el-input
- v-model="queryParams.memberMobile"
- placeholder="请输入下单人联系电话"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="外卖平台" prop="waimaiOrderType">
- <el-select v-model="queryParams.waimaiOrderType" placeholder="请选择外卖平台" clearable>
- <el-option v-for="item in waimaiOrderTypeOption" :key="item.value" :label="item.label" :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="员工名称" prop="personnelName">
- <el-input
- v-model="queryParams.personnelName"
- placeholder="请输入员工名称"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item> -->
- <el-form-item label="员工名称" prop="personnelId">
- <el-select v-model="queryParams.personnelId" filterable clearable placeholder="请选择 / 输入员工">
- <el-option
- v-for="item in personnelList"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="支付类型" prop="paymentType">
- <el-select v-model="queryParams.paymentType" placeholder="支付类型" clearable >
- <el-option v-for="item in paymentTypeOption" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </el-form-item>
- <el-form-item label="发件人联系电话" prop="sendPhone">
- <el-input
- v-model="queryParams.sendPhone"
- placeholder="请输入发件人联系电话"
- clearable
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- </div>
- </transition>
- </el-form>
- <el-tabs v-model="activeName" @tab-click="handleClick" type="card">
- <el-tab-pane :label="lableZero" name="1"></el-tab-pane>
- <el-tab-pane :label="lableOne" name="2"></el-tab-pane>
- <el-tab-pane :label="lableTwo" name="3"></el-tab-pane>
- <el-tab-pane :label="lableThree" name="4"></el-tab-pane>
- <el-tab-pane label="已取消" name="-1"></el-tab-pane>
- <el-tab-pane :label="lableFive" name="-2"></el-tab-pane>
- <el-tab-pane :label="lableSix" name="0"></el-tab-pane>
- <el-tab-pane label="其它平台完成" name="100"></el-tab-pane>
- <el-tab-pane label="全部订单" name="all"></el-tab-pane>
- <el-tab-pane v-if="type != 2" label="撤回订单" name="6"></el-tab-pane>
- </el-tabs>
- <Pagination
- uri="/module/order/list"
- :request-params="queryParams"
- ref="pagination"
- :showIndex="false"
- class="update-css"
- >
- <el-table-column>
- <template slot-scope="scope">
- <div style="margin-bottom: 10px; padding: 3px">
- <el-row>
- <el-col :span="11">
- <el-tag type="success">
- <span
- v-if="
- (scope.row.waimaiOrderId != null &&
- scope.row.waimaiOrderId != '') ||
- (scope.row.platformType != null &&
- scope.row.platformType != 0)
- "
- >
- {{ scope.row.dspWaimaiName }}
- </span>
- <span v-else> 猎豹 </span>
- </el-tag>
- <el-tag type="warning" style="margin-left: 20px">
- <span
- v-if="
- scope.row.merchantId != null && scope.row.merchantId != ''
- "
- >
- 商戶
- </span>
- <span v-else> 个人 </span>
- </el-tag>
- <el-tag type="info" style="margin-left: 20px">
- <span v-if="scope.row.takeType == 0"> 普通 </span>
- <span v-if="scope.row.takeType == 1 || scope.row.takeType == 2"> 预约 </span>
- </el-tag>
- <span style="margin-left: 20px">订单号:
- <div class="serial">
- <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 0">猎豹 </span>
- <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 1">美团 </span>
- <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 2">饿了么 </span>
- <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 3">饿百零售 </span>
- <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 5">美团闪购 </span>
- <span class="serial_text" v-if="scope.row.daySeq != null">{{scope.row.daySeq}} #</span>
- </div>
- <el-button style="user-select: unset" type="text" @click="deliveryInfo(scope.row.orderSn)" v-if="type != 2">
- {{ scope.row.orderSn }}
- </el-button>
- <span v-if="type == 2">{{ scope.row.orderSn }}</span>
- </span
- >
- <div style="margin-top:10px">
- <el-button style="user-select: unset;background-color:#F08080;height:27px"
- size="mini" type="danger" round icon="el-icon-close" @click="cancelOrder(scope.row.id)"
- v-if="type != 2 && scope.row.deliveryStatus == 3 && (scope.row.wmstatus != 4 || scope.row.wmstatus == null)">
- 取消
- </el-button>
- <el-button style="user-select: unset;background-color:#90EE90;height:27px"
- size="mini" type="success" round icon="el-icon-check" @click="finishOrder(scope.row.id)"
- v-if="type != 2 && scope.row.deliveryStatus == 3 && (scope.row.wmstatus != 4 || scope.row.wmstatus == null)">
- 手动完成
- </el-button>
- </div>
- </el-col>
- <el-col :span="4">
- <div style="margin-bottom: 10px; text-align: center">
- <span v-if="scope.row.deleted == 1">
- 现订单号:
- <span v-if="scope.row.originalOrderSn != null">{{ scope.row.originalOrderSn }}</span>
- <span v-else> -- </span>
- </span>
- <div v-if="(scope.row.takeType == 1 || scope.row.takeType == 2)&& (scope.row.waimaiOrderId == null || scope.row.waimaiOrderId == '')">
- 预计取件时间:{{ scope.row.takeTime }}
- </div>
- <div v-if="scope.row.waimaiOrderId != null && scope.row.waimaiOrderId != '' && scope.row.deleted == 0">
- <span v-if="scope.row.waimaiDeliveryTime == 0">预计送达时间:立即送达</span>
- <span v-if="scope.row.waimaiDeliveryTime != 0">预计送达时间:{{ scope.row.waimaiDeliveryDate }}</span>
- </div>
- </div>
- </el-col>
- <el-col :span="7">
- <div style="margin-bottom: 10px; text-align: left" v-if="
- scope.row.waimaiOrderId != null &&
- scope.row.waimaiOrderId != ''
- ">
- <span>外卖下单时间:{{ scope.row.orderTime }}</span>
- <span style="margin-left:39px"
- v-if="scope.row.deleted == 0 && !(scope.row.wmstatus == 4 && scope.row.deliveryStatus != 4) &&
- !(scope.row.deliveryStatus == 0 && scope.row.waimaiOrderId != null &&
- (scope.row.wmstatus == null || scope.row.wmstatus == 0))">
- 配送下单时间:{{ scope.row.createTime }}</span>
- </div>
- <div style="margin-bottom: 10px; text-align: left" v-else>
- <span
- v-if="scope.row.deleted == 0 && !(scope.row.wmstatus == 4 && scope.row.deliveryStatus != 4) &&
- !(scope.row.deliveryStatus == 0 && scope.row.waimaiOrderId != null &&
- (scope.row.wmstatus == null || scope.row.wmstatus == 0))">
- 配送下单时间:{{ scope.row.createTime }}</span>
- </div>
- </el-col>
- <el-col :span="2">
- <div style="margin-bottom: 10px; text-align: right" v-if="scope.row.deleted == 0">
- <div
- v-if="
- scope.row.deliveryStatus == -1 &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)
- "
- >
- 已取消
- </div>
- <div
- v-if="
- scope.row.deliveryStatus == -2 &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)
- "
- >
- 异常
- </div>
- <div
- v-if="
- scope.row.deliveryStatus == 0 &&
- (scope.row.wmstatus == null || scope.row.wmstatus != 4)
- "
- >
- 待发单
- </div>
- <div
- v-if="
- scope.row.deliveryStatus == 1 &&
- scope.row.status == 1 &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)
- "
- >
- 待接单
- </div>
- <div
- v-if="
- scope.row.deliveryStatus == 1 &&
- scope.row.status == 0 &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)
- "
- >
- 待支付
- </div>
- <div
- v-if="
- scope.row.deliveryStatus == 2 &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)
- "
- >
- 待配送
- </div>
- <div
- v-if="
- scope.row.deliveryStatus == 3 &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)
- "
- >
- 配送中
- </div>
- <div
- v-if="
- scope.row.wmstatus == 4 && scope.row.deliveryStatus != 4
- "
- >
- 其它平台完成
- </div>
- <div v-if="scope.row.deliveryStatus == 4">本平台完成</div>
- <div v-if="type != 2 && scope.row.deliveryStatus == 4 && scope.row.paymentType != 5 && scope.row.refundMoney == 0">
- <el-button style="user-select: unset;background-color:#F08080;height:27px"
- size="mini" type="info" round @click="refundDia(scope.row.id)">
- 退款
- </el-button>
- </div>
- </div>
- <div style="margin-bottom: 10px; text-align: right" v-if="scope.row.deleted == 1">
- <div>撤回</div>
- </div>
- </el-col>
- </el-row>
- </div>
- <el-row class="border-line">
- <el-col :span="9">
- <div style="margin-top: 10px">
- <!-- 发 -->
- <div style="display: flex">
- <!-- <img :src="item.thumb" style="width: 20px; height: 20px" /> -->
- <div><i class="sendLogo"></i></div>
- <div style="margin-left: 10px">
- <span
- >{{ scope.row.sendContactName }}
- {{ scope.row.sendPhone }}</span
- ><span
- v-if="
- scope.row.sendExtension != null &&
- scope.row.sendExtension != ''
- "
- >#{{ scope.row.sendExtension }}</span
- ><br />
- <span
- >{{ scope.row.sendProvinceName
- }}{{ scope.row.sendCityName
- }}{{ scope.row.sendDistrictName }}</span
- ><br />
- <span>{{ scope.row.sendAddress }}</span>
- </div>
- </div>
- <!-- 收 -->
- <div style="margin-top: 10px; display: flex">
- <!-- <img :src="item.thumb" style="width: 20px; height: 20px" /> -->
- <div><i class="receiptLogo"></i></div>
- <div style="margin-left: 10px">
- <span
- >{{ scope.row.receiptContactName }}
- {{ scope.row.receiptPhone }}</span
- >
- <span
- v-if="
- scope.row.receiptExtension != null &&
- scope.row.receiptExtension != ''
- "
- >#{{ scope.row.receiptExtension }}</span
- ><br />
- <span
- >{{ scope.row.receiptProvinceName
- }}{{ scope.row.receiptCityName
- }}{{ scope.row.receiptDistrictName }}</span
- ><br />
- <span>{{ scope.row.receiptAddress }}</span>
- </div>
- </div>
- </div>
- </el-col>
- <el-col :span="5">
- <div style="margin-top: 10px">
- <span>
- 支付金额:¥{{ scope.row.payAmount }}
- <i
- class="el-icon-info"
- @click="amountInfoOpen(scope.row)"
- ></i> </span
- ><br />
- <span v-if="type != 2 && scope.row.bindFee > 0">
- 三方服务费: ¥{{ scope.row.bindFee }}<br />
- </span
- >
- <span>
- 支付类型:
- <el-tag v-if="scope.row.paymentType == 1 && scope.row.status != 0">支付宝</el-tag>
- <el-tag type="success" v-if="scope.row.paymentType == 2 && scope.row.status != 0">微信</el-tag>
- <el-tag type="warning" v-if="scope.row.paymentType == 3 && scope.row.status != 0">银联</el-tag>
- <el-tag type="danger" v-if="scope.row.paymentType == 4 && scope.row.status != 0">余额支付</el-tag>
- <el-tag type="info" v-if="scope.row.paymentType == 5 && scope.row.status != 0">三方平台支付</el-tag>
- </span
- ><br />
- <span>配送类型:{{ scope.row.productName }}</span
- ><br />
- <span
- >物品信息:{{ scope.row.productName }}/{{
- scope.row.weight
- }}公斤</span
- ><br />
- <div>
- <span v-if="
- scope.row.waimaiOrderId != null &&
- scope.row.waimaiOrderId != ''
- ">商品金额:¥{{ scope.row.puductMoney }}</span
- ><span v-else>商品金额:¥{{ scope.row.productAmount }}</span
- ><br />
- </div>
- <div
- >
- <span
- >商品详情:
- <el-button
- type="text"
- @click="productInfoOpen(scope.row.waimaiOrderId)"
- >点击查看</el-button
- > </span
- ><br />
- </div>
- <div>
- 备注:
- <span
- v-if="
- scope.row.waimaiOrderId != null &&
- scope.row.waimaiOrderId != ''
- "
- ><span v-if="scope.row.takeRemark != null">【{{ scope.row.takeRemark }}】</span>{{ scope.row.wmCaution }}</span
- >
- <span v-else>{{ scope.row.takeRemark }}</span>
- </div>
- </div>
- </el-col>
- <el-col :span="6">
- <div style="margin-top: 10px;margin-left: 5px;">
- <div
- v-if="
- scope.row.outTradeNo != null && scope.row.outTradeNo != ''
- "
- >
- <div>
- 接单平台:
- <span v-if="scope.row.deliveryId != null">
- <span v-text="getName(scope.row.deliveryId)"></span>
- <!-- <span>{{ scope.row.deliveryName}}</span> -->
- </span>
- <span
- v-if="
- scope.row.deliveryId == null &&
- scope.row.wmstatus == 4 &&
- scope.row.deliveryStatus != 4
- "
- >
- 其它平台</span
- >
- </div>
- <div>
- 骑手姓名:
- <span v-if="scope.row.shipperName != null">{{
- scope.row.shipperName
- }}</span>
- <span v-else> -- </span>
- </div>
- <div>
- 骑手电话:
- <span v-if="scope.row.shipperPhone != null">{{
- scope.row.shipperPhone
- }}</span>
- <span v-else> -- </span>
- </div>
- <div>
- 三方订单号:
- <span v-if="scope.row.outTradeNo != null">{{
- scope.row.outTradeNo
- }}</span>
- <span v-else> -- </span>
- </div>
- <div>
- 接单时间:
- <span
- v-if="
- scope.row.deliveryTime != null
- "
- >{{ scope.row.deliveryTime }}</span
- >
- <span v-else>--</span>
- </div>
- <div>
- 取货时间:
- <span v-if="scope.row.pickUpTime != null">{{
- scope.row.pickUpTime
- }}</span>
- <span v-else> -- </span>
- </div>
- <div>
- 送到时间:
- <span v-if="scope.row.finishTime != null">{{
- scope.row.finishTime
- }}</span>
- <span v-else>--</span>
- </div>
- </div>
- <!-- <div
- style="margin-top: 10px; margin-left: 5px"
- v-if="
- scope.row.outTradeNo == null || scope.row.outTradeNo == ''
- "
- >
- <span style="color: #778899">暂无信息</span>
- </div> -->
- <div>
- <div v-if="((scope.row.deliveryStatus == -1 || scope.row.deliveryStatus == -2) &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)) || scope.row.deleted == 1">
- 取消时间:
- <span>{{
- scope.row.cancelTime
- }}</span>
- </div>
- <div v-if="((scope.row.deliveryStatus == -1 || scope.row.deliveryStatus == -2) &&
- (scope.row.wmstatus != 4 || scope.row.wmstatus == null)) || scope.row.deleted == 1">
- 取消原因:
- <span v-if="scope.row.cancelReason != null">{{
- scope.row.cancelReason
- }}</span>
- <span v-else> -- </span>
- </div>
- </div>
- </div>
- </el-col>
- <el-col :span="4">
- <div style="margin-top: 10px; text-align: right">
- <span> 商户名称:{{ scope.row.merchantName == null ? ' -- ' : scope.row.merchantName }} </span><br />
- <span> 门店名称:{{ scope.row.shopName == null ? ' -- ' : scope.row.shopName }} </span><br />
- <span v-if="scope.row.dadaDspType == null">代理商:{{ scope.row.agentName == null ? ' -- ' : scope.row.agentName }}</span
- ><br />
- <span v-if="scope.row.dadaDspType != null">配送商:{{ scope.row.dadaDspName == null ? ' -- ' : scope.row.dadaDspName }}</span
- ><br />
- <!-- <span>所属员工:{{ scope.row.personnelName == null ? ' -- ' : scope.row.personnelName }}</span
- ><br /> -->
- <span
- v-if="
- scope.row.personnelName != null &&
- scope.row.personnelName != ''
- "
- >所属员工:{{ scope.row.personnelName }}<br /></span
- >
- <span v-if="scope.row.dadaDspType == null">
- 佣金:
- <span
- v-if="
- scope.row.getCommission != null &&
- scope.row.getCommission != ''
- "
- >¥{{ scope.row.getCommission }}</span
- >
- <span v-else> -- </span> </span
- ><br />
- <span v-if="scope.row.dadaDspType != null">服务费:{{ scope.row.getCommission == null ? ' -- ' : scope.row.getCommission}} </span><br />
- <span> 下单人:{{ scope.row.memberName }} </span><br />
- <span>手机号:{{ scope.row.memberMobile }}</span
- ><br />
- </div>
- </el-col>
- </el-row>
- </template>
- </el-table-column>
- </Pagination>
- <el-dialog
- title="金额详细信息"
- :visible.sync="amountInfoVisible"
- width="500"
- >
- <div style="font-size: 18px; font-weight: 400">
- <span>配送费:¥{{
- (amountInfo.totalAmount +
- amountInfo.couponAmount - amountInfo.tipAmount).toFixed(2)
- }}</span
- ><br /><br />
- <span v-if="amountInfo.deliveryId != 24 && amountInfo.deliveryId != 19" style="margin-top: 10px">小费:¥{{ amountInfo.tipAmount }}</span
- >
- <span v-if="amountInfo.deliveryId == 24 || amountInfo.deliveryId == 19" style="margin-top: 10px">小费:¥0</span
- ><br /><br />
- <span style="margin-top: 10px"
- >优惠券:-¥{{ amountInfo.couponAmount }}</span
- ><br /><br />
- <span style="margin-top: 10px"
- >其它优惠:-¥{{ amountInfo.firstCoupon != undefined ? amountInfo.firstCoupon: 0}}</span
- ><br /><br />
- <!-- <span v-if="amountInfo.deliveryId != 24 && amountInfo.deliveryId != 19" style="margin-top: 10px"
- >支付金额:¥{{ amountInfo.payAmount }}</span
- >
- <span v-if="amountInfo.deliveryId == 24 || amountInfo.deliveryId == 19" style="margin-top: 10px"
- >支付金额:¥{{ (amountInfo.payAmount - amountInfo.tipAmount).toFixed(2) }}</span
- > -->
- <span style="margin-top: 10px"
- >支付金额:¥{{ amountInfo.payAmount }}</span
- ><br /><br />
- <!-- <div>
- <span style="margin-top: 10px" v-if="this.type != 2 && amountInfo.commission != null"
- >参与分佣金额:¥{{ amountInfo.commission }}</span
- >
- <span style="margin-top: 10px" v-if="this.type != 2 && amountInfo.commission == null"
- >参与分佣金额:¥0</span
- >
- </div> -->
- </div>
- </el-dialog>
- <el-dialog title="选择取消订单原因" :visible.sync="cancelOrderVisible" wdith="700" append-to-body>
- <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="150px">
- <el-form-item label="原因" prop="memberName">
- <el-select v-model="dataForm.cancelOrderId" placeholder="请选择取消原因" clearable>
- <el-option v-for="item in orderReasonOption" :key="item.value" :label="item.label" :value="item.value"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="cancelOrderVisible = false">取 消</el-button>
- <el-button type="primary" @click="submite()">确定</el-button>
- </span>
- </el-dialog>
- <el-dialog :visible.sync="productInfoVisible" width="700">
- <el-table :data="this.productInfoList">
- <el-table-column
- align="center"
- header-align="center"
- label="商品名称"
- prop="foodName"
- >
- <template slot-scope="scope">
- <span
- >
- {{ scope.row.foodName }}
- </span>
- <!-- <span v-if="this.productInfoWaimaiId == undefined"> 到店查看 </span> -->
- </template>
- </el-table-column>
- <el-table-column align="center" header-align="center" label="数量">
- <template slot-scope="scope">
- <span
- >
- ×{{ scope.row.quantity }}
- </span>
- <!-- <span v-if="this.productInfoWaimaiId == undefined"> ×1 </span> -->
- </template>
- </el-table-column>
- </el-table>
- </el-dialog>
- <el-dialog :visible.sync="deliveryInfoVisible" width="700">
- <el-table :data="this.deliveryInfoList">
- <el-table-column align="center" header-align="center" label="子订单号" prop="childOrderSn" />
- <el-table-column align="center" header-align="center" label="三方订单号" prop="outTradeNo" />
- <el-table-column align="center" header-align="center" label="配送平台" prop="deliveryName" />
- <el-table-column align="center" header-align="center" label="金额" prop="payAmount" />
- <el-table-column align="center" header-align="center" label="状态" prop="deliveryStatus">
- <template slot-scope="scope">
- <span v-if="scope.row.deliveryStatus == 0">待发单</span>
- <span v-if="scope.row.deliveryStatus == 1">待接单</span>
- <span v-if="scope.row.deliveryStatus == 2">待配送</span>
- <span v-if="scope.row.deliveryStatus == -1">已取消</span>
- </template>
- </el-table-column>
- <el-table-column align="center" header-align="center" label="下单失败原因" prop="failMsg" />
- </el-table>
- </el-dialog>
- <el-dialog title="退款理由" :visible.sync="refundOpen" width="700px" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="140px">
- <el-form-item label="理由:" prop="refundReason">
- <el-input maxlength="20" placeholder="请输入理由" v-model="form.refundReason" type="textarea" :rows="2" style="width:450px">
- </el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="refund" :loading="this.refundConfir">确 定</el-button>
- <el-button @click="refundOpen = false">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- exportOrder
- } from "@/api/module/order";
- import Pagination from "@/components/Paginations";
- import moment from "moment";
- import user from "@/store/modules/user";
- import OldReceipt from "@/components/area/oldReceipt";
- import OldSend from "@/components/area/oldSend";
- import area from "@/api/oldCity";
- import { constants } from "os";
- export default {
- name: "Order",
- components: {
- OldReceipt,
- OldSend,
- Pagination
- },
- data() {
- return {
- flag: true,
- refundConfir: false,
- refundOpen: false,
- orderReasonOption: [],
- msg: undefined,
- type: '',
- show2: false,
- cancelOrderVisible: false,
- amountInfo: {
- deliveryId: undefined,
- totalAmount: 0.0,
- couponAmount: 0.0,
- firstCoupon: 0.0,
- tipAmount: 0.0,
- payAmount: 0.0,
- commission: 0.0,
- },
- amountInfoVisible: false,
- productInfoVisible: false,
- deliveryInfoVisible: false,
- productInfoList: [],
- deliveryInfoList: [],
- productInfoWaimaiId: '',
- user: {},
- agentList: [],
- personnelList: [],
- deliveryDate: [],
- createDate: [],
- completeDate: [],
- merchantOption: [],
- deliveryStatusList:[
- {
- "deliveryStatus": 1,
- "label": "待接单"
- },
- {
- "deliveryStatus": 2,
- "label": "取货中"
- },
- {
- "deliveryStatus": 3,
- "label": "配送中"
- },
- {
- "deliveryStatus":4,
- "label": "平台完成"
- },
- {
- "deliveryStatus": -2,
- "label": "异常"
- },
- {
- "deliveryStatus": 0,
- "label": "待发单"
- }
- ],
- dspDeliveryOption: [],
- activeName: "all",
- lableZero: "待接单",
- lableOne: "取货中",
- lableTwo: "配送中",
- lableThree: "平台完成",
- lableFour: "已取消",
- lableFive: "异常",
- lableSix: "待发单",
- lableSeven: "其它平台完成",
- waimaiOrderTypeOption: [
- {
- value: 1,
- label: "美团",
- },
- {
- value: 2,
- label: "饿了么",
- },
- {
- value: 3,
- label: "饿百零售",
- },
- {
- value: 4,
- label: "猎豹",
- },
- {
- value: 5,
- label: "美团闪购",
- },
- {
- value: 6,
- label: "京东到家",
- }
- ],
- paymentTypeOption: [
- {
- value: 1,
- label: "支付宝支付",
- },
- {
- value: 2,
- label: "微信支付",
- },
- {
- value: 3,
- label: "银联支付",
- },
- {
- value: 4,
- label: "余额支付",
- },
- {
- value: 5,
- label: "三方平台支付",
- },
- ],
- deliveryStatusOption: [
- {
- value: 0,
- label: "待发单",
- },
- {
- value: 1,
- label: "待接单",
- },
- {
- value: 2,
- label: "待配送",
- },
- {
- value: 3,
- label: "配送中",
- },
- {
- value: 4,
- label: "已完成",
- },
- {
- value: -1,
- label: "已取消",
- },
- {
- value: -2,
- label: "异常",
- },
- {
- value: 100,
- label: "其它平台完成",
- },
- ],
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 配送订单表格数据
- orderList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- areaProp: {},
- startArea: {
- province: "",
- city: "",
- district: "",
- provinceName: "",
- cityName: "",
- districtName: "",
- cityValues: [],
- districtValues: [],
- districtNames: [],
- },
- sendAreaProp: {},
- sendStartArea: {
- province: "",
- city: "",
- district: "",
- provinceName: "",
- cityName: "",
- districtName: "",
- cityValues: [],
- districtValues: [],
- districtNames: [],
- },
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- outTradeNo: undefined,
- productId: undefined,
- productName: undefined,
- weight: undefined,
- takeDate: undefined,
- takeTime: undefined,
- takeRemark: undefined,
- paymentType: undefined,
- totalAmount: undefined,
- couponAmount: undefined,
- payAmount: undefined,
- couponId: undefined,
- sendAddressId: undefined,
- sendProvinceName: undefined,
- sendCityName: undefined,
- sendDistrictName: undefined,
- sendAddress: undefined,
- sendContactName: undefined,
- sendPhone: undefined,
- receiptAddressId: undefined,
- receiptProvinceName: undefined,
- receiptCityName: undefined,
- receiptDistrictName: undefined,
- receiptAddress: undefined,
- receiptContactName: undefined,
- receiptPhone: undefined,
- deliveryType: undefined,
- preDeliveryIds: undefined,
- actualDeliveryId: undefined,
- useTip: undefined,
- tipAmount: undefined,
- status: undefined,
- deliveryStatus: undefined,
- merchantId: undefined,
- merchantName: undefined,
- shopName: undefined,
- aId: undefined,
- orderSn: undefined,
- memberName: undefined,
- memberMobile: undefined,
- waimaiOrderType: undefined,
- personnelName: undefined,
- personnelId: undefined
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- outTradeNo: [
- {
- required: true,
- message: "外部订单流水号不能为空",
- trigger: "blur",
- },
- ],
- productId: [
- { required: true, message: "物品ID不能为空", trigger: "blur" },
- ],
- productName: [
- { required: true, message: "物品名称不能为空", trigger: "blur" },
- ],
- weight: [
- { required: true, message: "物品重量不能为空", trigger: "blur" },
- ],
- takeDate: [
- { required: true, message: "取件日期不能为空", trigger: "blur" },
- ],
- takeTime: [
- { required: true, message: "取件时间不能为空", trigger: "blur" },
- ],
- paymentType: [
- {
- required: true,
- message:
- "支付类型:1->支付宝支付 2->微信支付 3->银联支付 4->余额支付不能为空",
- trigger: "change",
- },
- ],
- totalAmount: [
- { required: true, message: "订单总金额不能为空", trigger: "blur" },
- ],
- couponAmount: [
- { required: true, message: "优惠金额不能为空", trigger: "blur" },
- ],
- payAmount: [
- { required: true, message: "实际支付金额不能为空", trigger: "blur" },
- ],
- sendAddressId: [
- { required: true, message: "发件地址ID不能为空", trigger: "blur" },
- ],
- sendProvinceName: [
- { required: true, message: "发件所在省不能为空", trigger: "blur" },
- ],
- sendCityName: [
- { required: true, message: "发件所在城市不能为空", trigger: "blur" },
- ],
- sendDistrictName: [
- { required: true, message: "发件所在区不能为空", trigger: "blur" },
- ],
- sendAddress: [
- { required: true, message: "发件详细地址不能为空", trigger: "blur" },
- ],
- sendContactName: [
- { required: true, message: "发件联系人不能为空", trigger: "blur" },
- ],
- sendPhone: [
- { required: true, message: "发件联系电话不能为空", trigger: "blur" },
- ],
- receiptAddressId: [
- { required: true, message: "收件地址ID不能为空", trigger: "blur" },
- ],
- receiptProvinceName: [
- { required: true, message: "收件所在省不能为空", trigger: "blur" },
- ],
- receiptCityName: [
- { required: true, message: "收件所在城市不能为空", trigger: "blur" },
- ],
- receiptDistrictName: [
- { required: true, message: "收件所在区不能为空", trigger: "blur" },
- ],
- receiptAddress: [
- { required: true, message: "收件地址不能为空", trigger: "blur" },
- ],
- receiptContactName: [
- { required: true, message: "收件联系人不能为空", trigger: "blur" },
- ],
- receiptPhone: [
- { required: true, message: "收件联系电话不能为空", trigger: "blur" },
- ],
- status: [
- {
- required: true,
- message:
- "订单状态:0-> 待支付,1->已支付, 2->派单中, 3->取件中,4->配送中,5->已完成,-1->已取消不能为空",
- trigger: "blur",
- },
- ],
- refundReason: [
- {
- required: true,
- message:
- "退款理由不能为空",
- trigger: "blur",
- },
- ],
- },
- dataForm: {
- id: '',
- cancelOrderId: ''
- },
- dataRule: {},
- };
- },
- created() {
- this.type = localStorage.getItem("SYS_USER_TYPE")
- this.queryParams.merchantId = this.$route.query.merchantId;
- this.queryParams.memberId = this.$route.query.memberId;
- // this.getList();
- this.user = user.actions.getSysUser();
- this.$http.get(`/module/personnel/personnelList`).then(({data}) => {
- console.log('data2', data)
- if (data) {
- console.log('data', data)
- this.personnelList = data
- }
- });
- // 获取商户列表
- this.$http.get(`/module/agent/list/agent`).then(({ data }) => {
- if (data) {
- this.agentList = data.list.rows;
- // console.log("agentList", this.agentList);
- }
- });
- // this.getMerchantOption();
- this.getDspDeliveryOption();
- this.createDate[0] =
- this.formatDate(new Date().getTime() - 2 * 24 * 60 * 60 * 1000) +
- " 00:00:00";
- this.createDate[1] = this.formatDate(new Date().getTime()) + " 23:59:59";
- // console.log(this.createDate);
- this.handleQuery();
- // this.getStatusNum();
- },
- methods: {
- deliveryInfo(orderSn) {
- console.log('orderSn', orderSn)
- if(orderSn != null && orderSn != '') {
- this.$http.get('/module/order/deliveryInfo?orderSn=' + orderSn).then(({ data }) => {
- this.deliveryInfoList = data
- })
- this.deliveryInfoVisible = true
- }
- },
- formatDate(time) {
- return moment(time).format("YYYY-MM-DD");
- },
- handleClick(tab, event) {
- // loading开始
- this.queryParams.deliveryStatus = this.activeName == 'all' ? null : Number(this.activeName)
- this.$nextTick(() => {
- this.getStatusNum();
- this.$refs.pagination.handleSearch(true);
- });
- // loading结束
- },
- getStatusNum() {
- this.deliveryStatusList = [
- {
- "deliveryStatus": 1,
- "label": "待接单"
- },
- {
- "deliveryStatus": 2,
- "label": "取货中"
- },
- {
- "deliveryStatus": 3,
- "label": "配送中"
- },
- {
- "deliveryStatus":4,
- "label": "平台完成"
- },
- {
- "deliveryStatus": -2,
- "label": "异常"
- },
- {
- "deliveryStatus": 0,
- "label": "待发单"
- }
- ];
- this.$http({
- url: this.$http.adornUrl("/module/order/sumByStatus"),
- method: "post",
- data: JSON.stringify(this.deliveryStatusList),
- params: this.$http.adornParams(this.queryParams)
- }).then(({ data }) => {
- if (data != null) {
- console.log('data', data)
- this.deliveryStatusList = data
- // this.lablZero = "待接单 " + data;
- this.deliveryStatusList.filter(item => {
- if(item.deliveryStatus == 1) {
- this.lableZero = item.label
- }
- if(item.deliveryStatus == 2) {
- this.lableOne = item.label
- }
- if(item.deliveryStatus == 3) {
- this.lableTwo = item.label
- }
- if(item.deliveryStatus == -1) {
- this.lableFour = item.label
- }
- if(item.deliveryStatus == 4) {
- this.lableThree = item.label
- }
- if(item.deliveryStatus == -2) {
- this.lableFive = item.label
- }
- if(item.deliveryStatus == 0) {
- this.lableSix = item.label
- }
- })
- }
- });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/1"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lablZero = "待接单 " + data;
- // }
- // });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/2"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lableOne = "取货中 " + data;
- // }
- // });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/3"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lableTwo = "配送中 " + data;
- // }
- // });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/-1"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lableFour = "已取消 " + data;
- // }
- // });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/-2"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lableFive = "异常 " + data;
- // }
- // });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/0"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lableSix = "待发单 " + data;
- // }
- // });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/100"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lableSeven = "其它平台完成 " + data;
- // }
- // });
- // this.$http({
- // url: this.$http.adornUrl("/module/order/sumByStatus/4"),
- // method: "get",
- // params: this.$http.adornParams(this.queryParams)
- // }).then(({ data }) => {
- // if (data != null) {
- // this.lableThree = "平台完成 " + data;
- // }
- // });
- // console.log('deliveryStatusSum', this.queryParams.deliveryStatus)
- },
- amountInfoOpen(row) {
- // console.log('row', row)
- this.amountInfo.deliveryId = row.deliveryId
- this.amountInfo.totalAmount = row.totalAmount;
- this.amountInfo.couponAmount = row.couponAmount;
- this.amountInfo.firstCoupon = row.firstCoupon;
- this.amountInfo.tipAmount = row.tipAmount;
- this.amountInfo.payAmount = row.payAmount;
- this.amountInfo.commission = row.commission;
- this.amountInfoVisible = true;
- },
- productInfoOpen(waimaiOrderId) {
- this.productInfoWaimaiId = waimaiOrderId;
- if(waimaiOrderId != undefined) {
- this.productInfoList = []
- this.$http
- .get("/module/order/productInfo?waimaiOrderId=" + waimaiOrderId)
- .then(({ data }) => {
- if (data) {
- this.productInfoList = data;
- }
- });
- }else {
- this.productInfoList = [{'foodName':'到店查看','quantity':'1'}]
- }
- this.productInfoVisible = true;
- },
- // 选择区域
- changeArea(e) {
- this.startArea = e;
- },
- changeSendArea(e) {
- this.sendStartArea = e;
- },
- getName(deliveryId) {
- var t = this.dspDeliveryOption.filter(function (obj) {
- return obj.id === deliveryId;
- });
- if (t[0]) {
- return t[0].name;
- } else {
- return "--";
- }
- },
- getMerchantOption() {
- this.$http.get(`/module/merchant/getMerchantOption`).then(({ data }) => {
- if (data) {
- this.merchantOption = data.list.rows;
- }
- });
- },
- getDspDeliveryOption() {
- this.$http
- .get(`/module/dspDelivery/selectOrderDspDeliverys`)
- .then(({ data }) => {
- if (data) {
- this.dspDeliveryOption = data;
- }
- });
- },
- /** 查询配送订单列表 */
- // getList() {
- // this.loading = true;
- // listOrder(this.queryParams).then(response => {
- // this.orderList = response.rows;
- // this.total = response.total;
- // this.loading = false;
- // });
- // },
- // 取消按钮
- // init(id) {
- // this.queryParams.merchantId = id;
- // this.getList()
- // },
- // 取消订单
- cancelOrder(orderId) {
- console.log('orderId', orderId)
- this.dataForm.id = orderId
- this.$http.get('/module/order/getOrderReason').then(({ data }) => {
- console.log('data', data)
- this.orderReasonOption = data.map(v => ({ value: Object.keys(v)[0], label: v[Object.keys(v)[0]] }))
- // 此方法效率更高,少一次Object.keys()方法执行和数组寻址
- // this.orderReasonOption = data.map(v => {
- // // 获取数组每个对象的key
- // const key = Object.keys(v)[0]
- // // 返回新数组
- // return ({value:key, label:v[key]});
- // })
- console.log('orderReason', this.orderReasonOption)
- })
- this.cancelOrderVisible = true
- },
- // 手动完成订单
- finishOrder(orderId) {
- console.log('orderId', orderId)
- this.dataForm.id = orderId
- this.$confirm('此操作将手动完成该订单,是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.$http.post("/module/order/finishOrder", this.dataForm).then(({ data }) => {
- if (data) {
- setTimeout(() => {
- this.$message({
- type: 'success',
- message: '操作成功!'
- });
- this.handleQuery();
- }, 1000)
- } else {
- this.$message.error(data.msg);
- }
- });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消操作'
- })
- })
- },
- refundDia(orderId) {
- this.refundOpen = true
- this.form.refundId = orderId
- console.log("refundId1", this.form.refundId)
- },
- // 订单退款
- refund() {
- this.$confirm('此操作将退款该订单,是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- console.log("refundId2", this.form.refundId)
- this.refundConfir = true
- this.$http.post("/module/order/orderRefund", this.form).then(({ data }) => {
- if (data) {
- setTimeout(() => {
- this.$message({
- type: 'success',
- message: '操作成功!'
- });
- this.refundOpen = false;
- this.handleQuery();
- }, 1000)
- } else {
- this.$message.error(data.msg);
- }
- });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消操作'
- })
- })
- },
- submite() {
- this.$refs["dataForm"].validate((valid) => {
- if (valid) {
- this.$confirm('此操作将取消该订单,是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.$http.post("/module/order/cancelOrder", this.dataForm).then(({ data }) => {
- if (data) {
- setTimeout(() => {
- this.cancelOrderVisible = false;
- this.$message({
- type: 'success',
- message: '操作成功!'
- });
- this.handleQuery();
- }, 1000)
- } else {
- this.$message.error(data.msg);
- }
- });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消操作'
- })
- })
- }
- });
- },
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- id: undefined,
- outTradeNo: undefined,
- productId: undefined,
- productName: undefined,
- weight: undefined,
- takeDate: undefined,
- takeTime: undefined,
- takeRemark: undefined,
- paymentType: undefined,
- totalAmount: undefined,
- couponAmount: undefined,
- payAmount: undefined,
- couponId: undefined,
- sendAddressId: undefined,
- sendProvinceName: undefined,
- sendCityName: undefined,
- sendDistrictName: undefined,
- sendAddress: undefined,
- sendContactName: undefined,
- sendPhone: undefined,
- receiptAddressId: undefined,
- receiptProvinceName: undefined,
- receiptCityName: undefined,
- receiptDistrictName: undefined,
- receiptAddress: undefined,
- receiptContactName: undefined,
- receiptPhone: undefined,
- deliveryType: undefined,
- preDeliveryIds: undefined,
- actualDeliveryId: undefined,
- useTip: undefined,
- tipAmount: undefined,
- status: 0,
- deliveryStatus: 0,
- refundReason: undefined,
- refundId: undefined
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- // console.log("createDate", this.createDate);
- if (this.createDate !== null && this.createDate !== "") {
- if (this.createDate[0] !== undefined) {
- this.queryParams.createStartTime = this.createDate[0];
- this.queryParams.createEndTime = this.createDate[1];
- }
- } else {
- this.queryParams.createStartTime = "";
- this.queryParams.createEndTime = "";
- }
- // console.log("createStartTime", this.queryParams.createStartTime);
- // console.log("createEndTime", this.queryParams.createEndTime);
- if (this.completeDate !== null && this.completeDate !== "") {
- if (this.completeDate[0] !== undefined) {
- this.queryParams.completeStartTime = this.completeDate[0];
- this.queryParams.completeEndTime = this.completeDate[1];
- }
- } else {
- this.queryParams.completeStartTime = "";
- this.queryParams.completeEndTime = "";
- }
- if (this.deliveryDate !== null && this.deliveryDate !== "") {
- if (this.deliveryDate[0] !== undefined) {
- this.queryParams.deliveryStartTime = this.deliveryDate[0];
- this.queryParams.deliveryEndTime = this.deliveryDate[1];
- }
- } else {
- this.queryParams.deliveryStartTime = "";
- this.queryParams.deliveryEndTime = "";
- }
- this.queryParams.sendProvinceName = this.sendStartArea.provinceName;
- this.queryParams.sendCityName = this.sendStartArea.cityName;
- this.queryParams.sendDistrictName = this.sendStartArea.districtName;
- this.queryParams.receiptProvinceName = this.startArea.provinceName;
- this.queryParams.receiptCityName = this.startArea.cityName;
- this.queryParams.receiptDistrictName = this.startArea.districtName;
- // console.log("startArea", this.startArea);
- // console.log("sendStartArea", this.sendStartArea);
- if(this.queryParams.createStartTime == '' || this.queryParams.createEndTime == '') {
- this.flag = false;
- this.$message.error("下单时间查询条件不能为空!");
- return;
- }
- var dateStart = new Date(this.queryParams.createStartTime);
- var dateEnd = new Date(this.queryParams.createEndTime);
- var dateDiff = dateEnd.getTime() - dateStart.getTime();
- var subDay = Math.ceil(dateDiff / (24 * 3600 * 1000))
- if(subDay > 31) {
- this.flag = false;
- this.$message.error("下单时间查询条件不能大于31天!");
- return;
- }
- this.getStatusNum();
- this.$refs.pagination.handleSearch(true);
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.startArea = {
- province: "",
- city: "",
- district: "",
- provinceName: "",
- cityName: "",
- districtName: "",
- cityValues: [],
- districtValues: [],
- districtNames: [],
- };
- this.areaProp = {};
- this.sendStartArea = {
- province: "",
- city: "",
- district: "",
- provinceName: "",
- cityName: "",
- districtName: "",
- cityValues: [],
- districtValues: [],
- districtNames: [],
- };
- this.sendAreaProp = {};
- this.handleQuery();
- this.getStatusNum();
- },
- /** 导出按钮操作 */
- handleExport() {
- this.handleQuery();
- if(this.flag == false) {
- return;
- }
- const queryParams = this.queryParams;
- this.$confirm("是否确认导出配送订单数据?", "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then( () => {
- this.msg = this.$message({
- message: '正在导出,请稍等。。。',
- duration: 0,
- type: 'warning',
- showClose: true
- });
- return exportOrder(queryParams);
- })
- .then((response) => {
- setTimeout(() => {
- this.msg.close()
- this.msg = this.$message({
- duration: 2000,
- message: '导出成功!',
- type: 'success'
- }, 2000)
- });
- this.download(response.data);
- })
- .catch((err) => {
- console.log(err)
- });
- },
- },
- };
- </script>
- <style lang="scss">
- .clearFix:after{
- content: "";
- font-size: 0;
- height: 0;
- display: block;
- clear: both;
- }
- .description p {
- margin: 0;
- padding-left: 10px;
- }
- i.sendLogo {
- background: black;
- color: white;
- border-radius: 50%;
- width: 25px;
- height: 25px;
- font-size: 15px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-style: normal;
- }
- i.sendLogo::before {
- content: "发";
- }
- i.receiptLogo {
- background: black;
- color: white;
- border-radius: 50%;
- width: 25px;
- height: 25px;
- font-size: 15px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-style: normal;
- }
- i.receiptLogo::before {
- content: "收";
- }
- .el-icon-info:before {
- content: "";
- }
- .transition-box {
- margin-bottom: 10px;
- width: 100%;
- height: 120px;
- border-radius: 4px;
- /* text-align: center; */
- color: #fff;
- /* padding: 40px 20px; */
- box-sizing: border-box;
- margin-right: 20px;
- }
- .border-line {
- position: relative;
- }
- .border-line::before {
- content: "";
- position: absolute;
- left: -10px;
- height: 1px;
- width: calc(100% + 20px);
- background: #DFE4ED;
- }
- .update-css {
- .el-table {
- .el-table__header-wrapper {
- display: none;
- }
- .el-table__body-wrapper {
- .el-table__body {
- > tbody {
- display: flex;
- flex-direction: column;
- width: 100%;
- > tr {
- display: flex;
- width: 100%;
- &:nth-of-type(n + 2) {
- margin-top: 20px;
- }
- &:last-of-type {
- margin-bottom: 1px;
- }
- > td {
- border: 1px solid #DFE4ED;
- display: flex;
- width: 100%;
- .cell {
- width: 100%;
- }
- }
- }
- }
- }
- }
- }
- }
- .serial {
- background-color: RGB(50,122,244);
- border-radius: 50px 50px;
- height: 29px;
- width: 115px;
- line-height: 29px;
- text-align: center;
- display: inline-block;
- margin-right: 5px;
- }
- .serial_text {
- color: #fff;
- font-size: 14px;
- letter-spacing: 2px;
- }
- </style>
|