123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716 |
- <template>
- <div class="dialog_container" v-loading.fullscreen.lock="detailLoading">
- <div class="head"></div>
- <div>
- <div class="filter-container">
- <el-input
- :placeholder="$t('place.onlineShopNumber')"
- clearable
- style="width: 200px;"
- class="filter-item"
- v-model="listQuery.ormorder"
- @change="validateParams"
- />
- <el-input
- :placeholder="$t('place.shopifyNumber')"
- clearable
- style="width: 200px;"
- class="filter-item"
- v-model="listQuery.shopify"
- @change="validateParams"
- />
- <el-select
- :placeholder="$t('place.afterSalesType')"
- clearable
- style="width: 200px;"
- class="filter-item"
- v-model="listQuery.refundType"
- @change="validateParams"
- >
- <el-option
- v-for="afterSaleType in afterSaleTypes"
- :key="afterSaleType.value"
- :label="$t(afterSaleType.label)"
- :value="afterSaleType.value"
- >
- </el-option>
- </el-select>
- <el-button
- v-waves
- class="filter-item"
- type="success"
- icon="el-icon-search"
- @click="getDetail(null)"
- >{{ $t("view.search") }}</el-button
- >
- </div>
- </div>
- <div class="main" v-if="show">
- <div class="box" style="margin-top: 15px;">
- <div class="item_title">{{ $t("view.shippingInfo") }}</div>
- <div class="ptitle">
- <template>
- <el-descriptions
- class="margin-top"
- :title="$t('title.addressInfo')"
- :column="4"
- direction="horizontal"
- v-if="addressInfo.length == 1"
- >
- <el-descriptions-item :label="$t('country')">{{
- addressInfo[0].receiverCountryCode
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('label.postalCode')">{{
- addressInfo[0].receiverZip
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('state')">{{
- addressInfo[0].receiverState
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('city')">{{
- addressInfo[0].receiverCity
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('suburb')">{{
- addressInfo[0].receiverDistrict
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('street')">{{
- addressInfo[0].receiverStreet
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('address')">{{
- addressInfo[0].receiverAddress
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('dooeNo')">{{
- addressInfo[0].receiverAddress2
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('recipient')">{{
- addressInfo[0].receiverName
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('telephone')">{{
- addressInfo[0].receiverPhone
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('moPhone')">{{
- addressInfo[0].receiverMobile
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('post')">{{
- addressInfo[0].email
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('label.shippingFee')">{{
- addressInfo[0].freight
- }}</el-descriptions-item>
- </el-descriptions>
- <div class="container" width="500px" v-if="addressInfo.length > 1">
- <div
- v-for="(item, index) in addressInfo"
- :key="index"
- width="100px"
- margin-right="50px"
- >
- <el-popover
- placement="top"
- :title="$t('title.addressInfo')"
- width="300"
- offset="300"
- trigger="hover"
- >
- <el-descriptions
- class="margin-top"
- title=""
- :column="1"
- direction="horizontal"
- >
- <el-descriptions-item :label="$t('country')">{{
- item.receiverCountryCode
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('address')">{{
- item.receiverAddress
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('recipient')">{{
- item.receiverName
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('post')">{{
- item.email
- }}</el-descriptions-item>
- <el-descriptions-item :label="$t('label.shippingFee')">{{
- item.freight
- }}</el-descriptions-item>
- </el-descriptions>
- <el-button
- slot="reference"
- @click="chooseClick(item.idList)"
- >{{ item.receiverCountryCode }}</el-button
- >
- </el-popover>
- </div>
- </div>
- <!-- <el-descriptions class="margin-top" :title="'地址信息-' + (index + 1)" :column="4" direction="horizontal" v-for="(item, index) in addressInfo" :key="index"> -->
- <!-- <el-descriptions-item :label="$t('country')">{{item.receiverCountryCode}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('label.postalCode')">{{item.receiverZip}}</el-descriptions-item>
- <el-descriptions-item :label="$t('state')">{{item.receiverState}}</el-descriptions-item>
- <el-descriptions-item :label="$t('city')" >{{item.receiverCity}}</el-descriptions-item>
- <el-descriptions-item :label="$t('suburb')" >{{item.receiverDistrict}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('street')" >{{item.receiverStreet}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('address')" >{{item.receiverAddress}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('dooeNo')" >{{item.receiverAddress2}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('recipient')" >{{item.receiverName}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('telephone')" >{{item.receiverPhone}}</el-descriptions-item>
- <el-descriptions-item :label="$t('moPhone')" >{{item.receiverMobile}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('post')" >{{item.email}}</el-descriptions-item> -->
- <!-- <el-descriptions-item :label="$t('label.shippingFee')" >{{item.freight}}</el-descriptions-item> -->
- <!-- <el-descriptions-item v-if=" addressInfo.length !=0 && addressInfo.length !=1 " :label="$t('actions')">
- <el-button
- type="success"
- @click="chooseClick(item.idList)"
- v-loading="btnLoading"
- >选择</el-button
- >
- </el-descriptions-item> -->
- <!-- </el-descriptions> -->
- </template>
- </div>
- </div>
- <div
- class="box"
- style="margin-top: 15px;padding-bottom: 10px;"
- v-loading="fromLoading"
- v-if="
- (this.listQuery.ormorder || this.listQuery.shopify) &&
- this.listQuery.refundType
- "
- >
- <div class="item_title">{{ $t("view.refundInfo") }}</div>
- <div class="ptitle">
- <el-form
- label-position="left"
- ref="addRefundForm"
- :model="addRefundForm"
- >
- <div class="row">
- <div class="row-item">
- <div class="row">
- <el-form-item class="inputleft" :label="$t('currency')">
- <el-input
- disabled
- v-model="addRefundForm.currency"
- placeholder
- class="normal-input"
- ></el-input>
- </el-form-item>
- <el-form-item
- :label="$t('label.expectedRefundAmount')"
- required
- >
- <el-input
- v-model="addRefundForm.refundTotalAmount"
- :disabled="true"
- />
- </el-form-item>
- </div>
- <el-form-item :label="$t('label.refundMethod')" required>
- <el-radio-group v-model="addRefundForm.refundMethod">
- <el-radio label="system">{{
- $t("view.systemRefund")
- }}</el-radio>
- <el-radio label="manual">{{
- $t("view.manualRefund")
- }}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item
- v-if="addRefundForm.refundMethod == 'manual'"
- :label="$t('label.accountType')"
- required
- >
- <el-radio-group v-model="addRefundForm.refundAccountType">
- <el-radio label="PayPal">PayPal</el-radio>
- <!-- 银行卡暂时隐藏 -->
- <!-- <el-radio label="bankCard">银行卡</el-radio> -->
- <!-- <el-radio label="Gift Card">Gift Card</el-radio> -->
- </el-radio-group>
- </el-form-item>
- <el-form-item
- :label="$t('label.receivingAccount')"
- v-if="
- addRefundForm.refundMethod == 'manual' &&
- addRefundForm.refundAccountType == 'PayPal'
- "
- required
- >
- <el-input
- v-model="addRefundForm.refundAccount"
- :placeholder="$t('place.pleaseFillIn')"
- class="normal-input"
- ></el-input>
- </el-form-item>
- <el-form-item :label="$t('label.taxRefund')">
- <el-radio-group
- v-model="addRefundForm.refundTaxAble"
- @change="calculateRefundAmount"
- >
- <el-radio label="0">{{ $t("view.noTaxRefund") }}</el-radio>
- <el-radio label="1">{{ $t("view.taxRefund") }}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item
- v-if="addRefundForm.refundTaxAble == 1"
- :label="$t('label.taxRefundAmount')"
- >
- <el-input-number
- v-model="addRefundForm.refundTaxAmount"
- :min="0.0"
- :step="0.01"
- step-strictly
- @change="calculateRefundAmount"
- ></el-input-number>
- </el-form-item>
- <!-- 选择是否退运费-->
- <el-form-item :label="$t('label.shippingFee')">
- <el-radio-group
- v-model="addRefundForm.refundPostage"
- @change="calculateRefundAmount"
- >
- <el-radio label="0">{{ $t("view.noRefund") }}</el-radio>
- <el-radio label="1">{{
- $t("view.refundShippingFee")
- }}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item
- v-if="addRefundForm.refundPostage == 1"
- :label="$t('label.returnShippingFeeAmount')"
- >
- <el-input-number
- v-model="addRefundForm.refundPostageAmount"
- :min="0.0"
- :step="0.01"
- step-strictly
- @change="calculateRefundAmount"
- ></el-input-number>
- </el-form-item>
- <el-form-item
- v-if="this.queryRefundType == 3"
- :label="$t('label.receivingReturnWarehouse')"
- >
- <el-select
- :placeholder="$t('place.pleaseSelect')"
- clearable
- style="width: 200px;"
- class="filter-item"
- v-model="addRefundForm.warehouseCode"
- @change="ShippingLabelOption"
- >
- <el-option
- v-for="item in warehouseItems"
- :key="item.key"
- :label="item.key"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="
- addRefundForm.warehouseCode == 'PSJ-G001001' ||
- addRefundForm.warehouseCode == 'PSJ-G001003' ||
- addRefundForm.warehouseCode == 'PSJ-H0000024' ||
- addRefundForm.warehouseCode == 'PSJ-H0000019' ||
- addRefundForm.warehouseCode == 'PSJ-H0000011' ||
- addRefundForm.warehouseCode == 'PSJ-G001004'
- "
- label="ShippingLabel"
- >
- <el-radio-group
- v-model="addRefundForm.slUseable"
- @change="changeSlradio()"
- >
- <el-radio label="0" value="0">{{
- $t("view.notEnabled")
- }}</el-radio>
- <el-radio label="1" value="1">{{
- $t("view.enabled")
- }}</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item
- v-if="
- this.queryRefundType == 3 &&
- this.addRefundForm.slUseable == 0
- "
- :label="$t('label.returnLogisticsCompanyCode')"
- >
- <el-input
- v-model="addRefundForm.shipmodeId"
- :placeholder="$t('place.pleaseFillIn')"
- class="normal-input"
- ></el-input>
- </el-form-item>
- <el-form-item
- v-if="
- this.queryRefundType == 3 &&
- this.addRefundForm.slUseable == 0
- "
- :label="$t('label.returnLogisticsNumber')"
- >
- <el-input
- v-model="addRefundForm.shippingNo"
- :placeholder="$t('place.pleaseFillIn')"
- class="normal-input"
- ></el-input>
- </el-form-item>
- </div>
- <div class="row-item">
- <el-form-item :label="$t('label.afterSalesInstructions')">
- <el-input
- type="textarea"
- class="afertextarea"
- :placeholder="$t('place.enterContent')"
- v-model="addRefundForm.notes"
- :rows="4"
- maxlength="150"
- show-word-limit
- >
- </el-input>
- </el-form-item>
- <el-form-item :label="$t('label.uploadVoucher')">
- <el-upload
- class="avatar-uploader"
- :action="uploadPhotos"
- :show-file-list="false"
- :on-success="handleAvatarSuccess"
- :before-upload="beforeAvatarUpload"
- :headers="headers"
- >
- <img v-if="imageUrl" :src="imageUrl" class="avatar" />
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
- </el-upload>
- </el-form-item>
- </div>
- </div>
- </el-form>
- </div>
- <!-- 因为要多选的问题 不考虑分页 -->
- <div class="box" style="margin-top: 15px;">
- <div class="item_title">
- <span>{{ $t("view.selectItems") }}</span>
- <el-select
- v-if="this.multipleSelection && this.multipleSelection.length > 0"
- v-model="refundReasonAss"
- style="width: 260px;"
- :placeholder="$t('place.selectCheckedRefundReasons')"
- clearable
- @change="chooseReason(refundReasonAss, reasonListAll)"
- >
- <el-option
- v-for="status in reasonListAll"
- :key="status.id"
- :label="status.reasonContentChinese"
- :value="String(status.id)"
- >
- </el-option>
- </el-select>
- <el-input
- v-if="otherReasonFlag == '1'"
- :placeholder="$t('place.enterReason')"
- clearable
- style="width: 220px;"
- class="filter-item"
- v-model="refundOtherReasonAss"
- @change="writeReason(refundOtherReasonAss)"
- />
- </div>
- <div>
- <el-table
- class="itemtable"
- ref="multipleTable"
- @selection-change="handleSelectionChange"
- style="width: 100%;"
- v-loading="listLoading"
- :key="tableKey"
- :data="tableOrderDeatils"
- row-key="id"
- stripe
- border
- fit
- highlight-current-row
- >
- <el-table-column
- type="selection"
- width="55"
- :selectable="checkSelectable"
- >
- </el-table-column>
- <el-table-column
- :label="$t('label.orderNumber')"
- width="150"
- align="center"
- prop="ordersId"
- >
- </el-table-column>
- <el-table-column
- :label="$t('goodsCode')"
- width="150"
- align="center"
- prop="skuCode"
- >
- </el-table-column>
- <el-table-column
- :label="$t('onlyCode')"
- min-width="180"
- align="center"
- prop=""
- >
- <template slot-scope="scope">
- <div v-if="scope.row.uniqueCode">
- <div
- v-for="(item, index) in scope.row.uniqueCode"
- :key="index"
- >
- {{ item }}
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('goodsName')"
- width="300"
- align="center"
- prop="productName"
- ></el-table-column>
- <el-table-column
- :label="$t('bagSkuCode')"
- width="180"
- align="center"
- prop="bagSkuCode"
- ></el-table-column>
- <el-table-column
- :label="$t('label.originalQuantity')"
- width="80"
- align="center"
- prop="oldQuantity"
- ></el-table-column>
- <el-table-column
- :label="$t('goodsPrice')"
- width="80"
- align="center"
- prop="price"
- ></el-table-column>
- <el-table-column
- :label="$t('offerAmount')"
- width="80"
- align="center"
- prop="discountFee"
- ></el-table-column>
- <el-table-column
- :label="$t('payAmount')"
- width="80"
- align="center"
- prop="totalFee"
- ></el-table-column>
- <el-table-column
- :label="$t('label.refundPercentage')"
- width="150"
- align="center"
- >
- <template slot-scope="scope">
- <div v-if="multipleSelection.indexOf(scope.row) == -1">
- <div>{{ scope.row.refundSales }}</div>
- </div>
- <div v-else>
- <el-input-number
- v-model="scope.row.refundSales"
- @change="changeQuantity(scope.row)"
- size="mini"
- :min="0"
- :max="1"
- :step="0.01"
- step-strictly
- ></el-input-number>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('label.eligibleQuantity')"
- width="150"
- align="center"
- >
- <template slot-scope="scope">
- <div v-if="multipleSelection.indexOf(scope.row) == -1">
- <div>{{ scope.row | quantityFilter }}</div>
- </div>
- <div v-else>
- <!-- <tableEdit :row.sync="scope.row"></tableEdit> -->
- <el-input-number
- v-model="scope.row.quantity"
- @change="changeQuantity(scope.row)"
- size="mini"
- :min="0"
- :max="scope.row.maxq"
- :step="1"
- step-strictly
- ></el-input-number>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('label.refundedAmount')"
- width="150"
- align="center"
- >
- <template slot-scope="scope">
- <div v-if="multipleSelection.indexOf(scope.row) == -1">
- <div>0</div>
- </div>
- <div v-else>
- <el-input-number
- v-model="scope.row.refundAmount"
- size="mini"
- @change="refundAmountChange"
- :min="0.0"
- :max="scope.row.originRefundAmount"
- ></el-input-number>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('label.needPayWithCustomers')"
- width="150"
- align="center"
- >
- <template slot-scope="scope">
- <div v-if="multipleSelection.indexOf(scope.row) == -1">
- <div>0</div>
- </div>
- <div v-else>
- <el-input-number
- v-model="scope.row.differenceAmount"
- size="mini"
- :min="0.0"
- :max="scope.row.originPaidAmount"
- @change="refundAmountChange"
- ></el-input-number>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('label.refundReason')"
- width="150"
- align="center"
- >
- <template slot-scope="scope">
- <div v-if="multipleSelection.indexOf(scope.row) == -1"></div>
- <div v-else>
- <el-select
- v-model="scope.row.refundReason"
- :placeholder="$t('place.pleaseSelect')"
- clearable
- @change="refundChange(scope.row.refundReason, scope.row)"
- >
- <el-option
- v-for="status in scope.row.refundReasonList"
- :key="status.id"
- :label="status.reasonContentChinese"
- :value="String(status.id)"
- >
- </el-option>
- </el-select>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('label.reasonExplanation')"
- width="150"
- align="center"
- >
- <template slot-scope="scope">
- <div v-if="multipleSelection.indexOf(scope.row) == -1"></div>
- <div v-else>
- <el-input
- v-if="scope.row.customOpen == '1'"
- :placeholder="$t('place.enterReason')"
- clearable
- style="width: 200px;"
- class="filter-item"
- v-model="scope.row.otherReason"
- />
- </div>
- </template>
- </el-table-column>
- <el-table-column
- width="55"
- :label="$t('label.flashPurchase')"
- align="center"
- >
- <template slot-scope="scope">
- <el-checkbox
- v-model="scope.row.flashPurchaseFlag == 1"
- ></el-checkbox>
- </template>
- </el-table-column>
- <el-table-column
- width="55"
- :label="$t('label.exchangePurchase')"
- align="center"
- >
- <template slot-scope="scope">
- <el-checkbox
- v-model="scope.row.exchangePurchaseFlag == 1"
- ></el-checkbox>
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('label.refundedQuantity')"
- width="80"
- align="center"
- prop="refundQuantity"
- ></el-table-column>
- <el-table-column
- :label="$t('status')"
- width="80"
- align="center"
- prop="status"
- >
- <template slot-scope="scope">
- {{ scope.row.status | statusFilter }}
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('label.signedForTheReturn')"
- width="80"
- align="center"
- prop="matchStatus"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.matchStatus == 'unmatch'">
- {{ $t("label.notMatched") }}
- </span>
- <span
- v-if="
- scope.row.matchStatus == 'order_matched' ||
- scope.row.matchStatus == 'matched'
- "
- >
- {{ $t("label.matchedSuccess") }}
- </span>
- <span v-if="scope.row.matchStatus == null">
- {{ $t("label.not") }}
- </span>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <!-- 多件多折折扣重算 -->
- <div class="box" v-has="'priceRule:list'">
- <div class="item_title">
- {{ $t("multipleDiscountInfo.multipleDiscountReCal") }}
- </div>
- <div>
- <el-table
- :key="tableKey"
- :data="returnPreviewDatas"
- row-key="id"
- stripe
- border
- fit
- highlight-current-row
- >
- <el-table-column type="index" width="40" />
- <el-table-column
- :label="$t('multipleDiscountInfo.OriginalDiscount')"
- align="center"
- prop="originTip"
- />
- <el-table-column
- :label="$t('multipleDiscountInfo.OriginalMoneny')"
- align="center"
- prop="originalOrderAmount"
- />
- <el-table-column
- :label="$t('multipleDiscountInfo.afterReturnDiscount')"
- align="center"
- prop="currentTip"
- />
- <el-table-column
- :label="$t('multipleDiscountInfo.afterReturnMoney')"
- align="center"
- prop="currentOrderAmount"
- />
- <el-table-column
- :label="$t('multipleDiscountInfo.returnMoney')"
- align="center"
- prop="refundAmount"
- >
- <template slot-scope="scope">
- {{ scope.row.refundAmount || 0 }}
- </template>
- </el-table-column>
- <el-table-column
- :label="$t('multipleDiscountInfo.needPayMoney')"
- align="center"
- prop="differenceAmount"
- >
- <template slot-scope="scope">
- {{ scope.row.differenceAmount || 0 }}
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="box total_box">
- <div class="item_title">
- {{ $t("view.totalRefund") }}
- </div>
- <div class="item_box">
- {{ $t("view.totalRefund") }}:{{ addRefundForm.refundTotalAmount }}
- </div>
- </div>
- <div class="box btn_box">
- <el-button
- :style="btnStyle"
- class="save_btn"
- type="primary"
- @click="submit(this)"
- v-loading="btnLoading"
- >{{ $t("save") }}</el-button
- >
- <el-button type="danger" class="backbtn" @click="back">{{
- $t("back")
- }}</el-button>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- // import {getRefundReason} from '@/api/oms/refund/refund'
- import global from "@/views/oms/global";
- import waves from "@/directive/waves";
- import { getToken } from "@/utils/auth";
- import { dcmSub } from "@/utils/toolUtil";
- import { getDetailListForRefund, statusKeyValue } from "@/api/oms/order/order";
- import {
- validPromotionReq,
- warehouseList,
- checkSubmitRefund,
- backstageSubmitRefund
- } from "@/api/oms/refund/refund";
- import { BigNumber } from "bignumber.js";
- import tableEdit from "./tableEdit";
- import i18n from "@/lang";
- export default {
- name: "createRefundDialog",
- directives: {
- waves
- },
- components: {
- global,
- tableEdit
- },
- filters: {
- statusFilter(key) {
- return statusKeyValue[key];
- },
- quantityFilter(row) {
- if (row.refundQuantity > 0) {
- return dcmSub(row.oldQuantity, row.refundQuantity);
- }
- return row.oldQuantity;
- }
- },
- data() {
- return {
- matchStatus: null,
- listLoading: false,
- detailLoading: false,
- fromLoading: false,
- btnLoading: false,
- addressInfo: [],
- listQuery: {
- ormorder: null,
- shopify: null,
- refundType: null,
- idList: null
- },
- show: false,
- tableOrderDeatils: [],
- multipleSelection: [],
- returnPreviewDatas: [], // 勾选后,退款预览数据
- originReturnPreviewDatas: {}, //记录下来的,退款原来预览数据
- addRefundForm: {
- refundMethod: "system",
- refundAccountType: "PayPal",
- refundAccount: "",
- refundType: "",
- refundPostage: "0",
- refundAmount: 0.0, //商品退款金额
- differenceAmount: 0, // 补款金额
- refundPostageAmount: 0.0,
- warehouseCode: "",
- annexPath: "",
- items: [],
- oldQuantity: 0,
- refundTaxAble: "0", //是否退税
- refundTaxAmount: 0.0, //退税金额
- refundTotalAmount: 0.0, //总计退款金额 = 商品退款金额 + 退运费金额 + 退税金额 。 实际执行时,refundAmount=商品退款金额 + 退税金额;退运费金额单独计算
- // refundReason:'', // 退款原因
- // otherReason:'', // 其他退款理由
- slUseable: "0", //是否开启ShippingLabel选项
- currency: "", //币种
- shipmodeId: "", //退货物流公司编号
- shippingNo: "", //退货物流单号
- notes: ""
- },
- afterSaleTypes: global.afterSaleType, //售后类型
- warehouseItems: [],
- queryRefundType: "",
- queryOrmorder: "",
- queryShopify: "",
- btnStyle: "",
- imageUrl: "",
- uploadPhotos: process.env.VUE_APP_OMS_API + "ordersRefund/uploadPhotos",
- reasonListAll: [],
- refundReasonAss: "",
- refundOtherReasonAss: "",
- otherReasonFlag: "",
- tableKey: Math.random(),
- isRefund: true //是否是退款 true:退款 false:补款
- };
- },
- created() {
- //情况清空数据
- this.getWarehouseList();
- },
- computed: {
- // 计算属性的 getter
- headers: function() {
- return {
- "X-Token": getToken()
- };
- }
- },
- methods: {
- getDetail(idList) {
- this.ShippingLabelOption();
- //非空判断
- if (!this.listQuery.ormorder && !this.listQuery.shopify) {
- this.$message.error("网店单号和shopify单号不能同时为空");
- return;
- }
- if (!this.listQuery.refundType) {
- this.$message.error("请选择售后类型");
- return;
- }
- //初始化数据
- this.addRefundForm.refundAmount = 0.0;
- this.addRefundForm.differenceAmount = 0.0;
- this.addRefundForm.noTaxRefundAmount = 0.0;
- this.addRefundForm.noTaxDifferenceAmount = 0.0;
- this.addRefundForm.refundPostage = "0";
- this.addRefundForm.refundPostageAmount = 0.0;
- this.addRefundForm.warehouseCode = "";
- this.addRefundForm.annexPath = "";
- this.addRefundForm.items = [];
- this.addRefundForm.oldQuantity = 0.0;
- this.addRefundForm.refundTaxAble = "0"; //是否退税
- this.addRefundForm.refundTaxAmount = 0.0; //退税金额
- this.addRefundForm.refundTotalAmount = 0.0;
- this.addRefundForm.shipmodeId = "";
- this.addRefundForm.shippingNo = "";
- this.addRefundForm.refundMethod = "system";
- this.addRefundForm.refundAccountType = "PayPal";
- this.addRefundForm.refundAccount = "";
- this.addRefundForm.notes = "";
- this.addressInfo = [];
- this.listQuery.idList = null;
- // this.listQuery.addressId = addressId;
- if (idList) {
- var addressIds = "";
- for (let id in idList) {
- addressIds = addressIds + idList[id] + ",";
- }
- this.listQuery.idList = addressIds.slice(0, addressIds.length - 1);
- }
- this.reasonListAll = [];
- this.refundReasonAss = "";
- this.refundOtherReasonAss = "";
- this.otherReasonFlag = "";
- //查询满足条件的所有订单项
- this.listLoading = true;
- getDetailListForRefund(this.listQuery).then(res => {
- if (200 == res.code) {
- if (res.data.isPayment) {
- //true:存在未支付订单 ,false:不存在未支付
- this.$message.error(i18n.t("label.paidTips"));
- this.show = false;
- } else {
- this.show = true;
- //第一次查询的退款类型
- this.queryRefundType = res.data.refundType;
- this.queryOrmorder = res.data.ormorder;
- this.queryShopify = res.data.shopify;
- this.tableOrderDeatils = res.data.list;
- this.addRefundForm.currency = res.data.currency;
- this.addressInfo = res.data.addressList;
- this.reasonListAll = res.data.refundReasonList;
- let goodsRefundAmount = BigNumber(0);
- if (this.tableOrderDeatils) {
- for (let ind in this.tableOrderDeatils) {
- if (this.tableOrderDeatils[ind].refundFlag == "0") {
- this.tableOrderDeatils[ind].refundQuantity = 0;
- }
- this.tableOrderDeatils[
- ind
- ].oldQuantity = this.tableOrderDeatils[ind].quantity;
- }
- //退商品金额计算
- this.refundAmount = goodsRefundAmount.toFixed(2);
- this.$nextTick(() => {
- this.tableOrderDeatils.forEach(row => {
- if (row.selectedRow == 1) {
- this.$refs.multipleTable.toggleRowSelection(row, true);
- }
- });
- });
- }
- }
- } else {
- this.$message.error(res.msg);
- this.show = false;
- }
- this.listLoading = false;
- });
- },
- //获取退货仓库信息
- getWarehouseList() {
- warehouseList().then(res => {
- if (200 == res.code) {
- this.warehouseItems = res.data;
- }
- });
- },
- //计算退款总额 商品退款金额 + 退运费金额 +退税金额
- calculateRefundAmount() {
- //如果没选择退税
- if (this.addRefundForm.refundTaxAble != "1") {
- this.addRefundForm.refundTaxAmount = BigNumber(0)
- .toNumber()
- .toFixed(2);
- }
- //如果没选择退运费
- if (this.addRefundForm.refundPostage != "1") {
- this.addRefundForm.refundPostageAmount = BigNumber(0)
- .toNumber()
- .toFixed(2);
- }
- var taxAndShippingAmount = BigNumber(this.addRefundForm.refundTaxAmount)
- .plus(BigNumber(this.addRefundForm.refundPostageAmount))
- .toNumber()
- .toFixed(2);
- let price =
- this.addRefundForm.noTaxRefundAmount !== "NaN" &&
- this.addRefundForm.noTaxRefundAmount > 0
- ? BigNumber(this.addRefundForm.noTaxRefundAmount)
- : BigNumber(this.addRefundForm.noTaxDifferenceAmount).negated();
- this.addRefundForm.refundTotalAmount = BigNumber(taxAndShippingAmount)
- .plus(BigNumber(price))
- .toNumber()
- .toFixed(2);
- },
- // 重新计算退款的金额
- reCalReturn() {
- const data = this.multipleSelection;
- const formData = {
- ormOrderId: this.queryOrmorder,
- promotionRefundDetails: data.map(item => {
- return {
- soOrderId: item.ordersId,
- orderItemId: item.orderitemId,
- ormOrderItemId: item.ormOrderItemId,
- quantity: item.quantity
- };
- })
- };
- this.listLoading = true;
- checkSubmitRefund(formData)
- .then(res => {
- if (res.code === 200) {
- const { orderPreviewVO, ordersRefund } = res.data;
- const { isRefund, titleAmount } = orderPreviewVO;
- const refundAmount = isRefund ? titleAmount : 0;
- const differenceAmount = isRefund ? 0 : titleAmount;
- this.returnPreviewDatas = [
- { ...orderPreviewVO, refundAmount, differenceAmount }
- ];
- this.originReturnPreviewDatas = orderPreviewVO;
- this.isRefund = orderPreviewVO.isRefund;
- const totalPrice = this.multipleSelection.reduce((prev, cur) => {
- return prev + cur.totalFee;
- }, 0);
- for (let k in this.multipleSelection) {
- let row = this.multipleSelection[k];
- let data = ordersRefund.items.find(
- item => item.ormOrderItemId === row.ormOrderItemId
- );
- if (orderPreviewVO.isRefund) {
- // 退款
- row.refundAmount = data.refundAmount;
- row.originRefundAmount = data.refundAmount;
- row.differenceAmount = 0;
- } else {
- // 补差价
- const val = this.calNeedPaidMoney(
- k,
- row,
- orderPreviewVO.titleAmount,
- totalPrice
- );
- row.originPaidAmount = val;
- row.differenceAmount = val;
- row.refundAmount = 0;
- }
- }
- this.jisuan();
- } else {
- this.$message.error(res.msg);
- }
- })
- .finally(() => {
- this.listLoading = false;
- });
- },
- // 计算补差价的金额
- calNeedPaidMoney(i, row, differenceAmount, totalPrice) {
- let data = 0;
- if (this.multipleSelection.length === 1) {
- data = differenceAmount;
- } else if (i === String(this.multipleSelection.length - 1)) {
- const price = this.multipleSelection.reduce((prev, cur) => {
- const amont = cur.differenceAmount || 0;
- return prev + amont;
- }, 0);
- // 最后一个的时候,需要用减法
- data = (differenceAmount - price).toFixed(2);
- } else {
- data = ((row.totalFee / totalPrice) * differenceAmount).toFixed(2);
- }
- return Number(data);
- },
- // 当前选中的 退款金额
- handleSelectionChange(val) {
- this.refundAmount = 0;
- this.differenceAmount = 0;
- this.multipleSelection = val;
- if (this.multipleSelection && this.multipleSelection.length > 0) {
- // 如果是退款新版本,包含多件多折 需要重算退款金额
- this.reCalReturn();
- } else {
- this.refundAmount = 0;
- this.addRefundForm.refundAmount = 0;
- this.addRefundForm.differenceAmount = 0;
- this.addRefundForm.noTaxRefundAmount = 0;
- this.addRefundForm.noTaxDifferenceAmount = 0;
- this.differenceAmount = 0;
- this.returnPreviewDatas = [];
- this.addRefundForm.refundTotalAmount = 0;
- }
- },
- refundAmountChange() {
- this.jisuan();
- },
- jisuan() {
- this.taxAndShippingAmount = BigNumber(this.addRefundForm.refundTaxAmount)
- .plus(BigNumber(this.addRefundForm.refundPostageAmount))
- .toNumber();
- let refundAmount = BigNumber(0); // 退款金额
- let differenceAmount = BigNumber(0); // 补款单金额
- if (this.multipleSelection && this.multipleSelection.length > 0) {
- for (let uy in this.multipleSelection) {
- var row = this.multipleSelection[uy];
- refundAmount = refundAmount.plus(BigNumber(row.refundAmount));
- differenceAmount = differenceAmount.plus(
- BigNumber(row.differenceAmount)
- );
- }
- this.refundAmount = refundAmount.toNumber().toFixed(2);
- this.differenceAmount = differenceAmount.toNumber().toFixed(2);
- }
- this.$set(this.addRefundForm, "noTaxRefundAmount", this.refundAmount);
- this.$set(
- this.addRefundForm,
- "noTaxDifferenceAmount",
- this.differenceAmount
- );
- const refundNewAmount =
- this.refundAmount === "NaN" ? 0 : this.refundAmount;
- const differenceNewAmount =
- this.differenceAmount === "NaN" ? 0 : this.differenceAmount;
- this.returnPreviewDatas[0].refundAmount = refundNewAmount;
- this.returnPreviewDatas[0].differenceAmount = differenceNewAmount;
- let total = 0;
- let price =
- refundNewAmount > 0 ? refundAmount : differenceAmount.negated();
- console.log(
- refundNewAmount,
- differenceNewAmount,
- " price",
- refundNewAmount > 0
- );
- // 退款
- total = price
- .plus(BigNumber(this.taxAndShippingAmount))
- .toNumber()
- .toFixed(2);
- this.$set(this.addRefundForm, "refundTotalAmount", total);
- },
- checkSelectable(row) {
- // 虚拟商品不可选
- // if (row.skuCode === "108C4G1V000BXS") return false;
- if (row.refundQuantity > 0) {
- var refcount = dcmSub(row.oldQuantity, row.refundQuantity);
- //发生退款
- if (refcount <= 0 && this.queryRefundType != "1") {
- return false; //不可选择
- }
- row["maxq"] = refcount;
- } else {
- row["maxq"] = row.oldQuantity;
- }
- // if( row.status == "delivery" && (row.exchangePurchaseFlag == 1)){
- // return false; //不可选择
- // }
- // if (row.quantity != 0) {
- // row.quantity = row["maxq"];
- // }
- //未发货
- if (
- this.queryRefundType == "2" &&
- (row.status == "delivery" ||
- row.status == "off" ||
- row.status == "partdelivery")
- ) {
- return false; //不可选择
- }
- //退货退款
- else if (
- this.queryRefundType == "3" &&
- (row.status == "unchecked" ||
- row.status == "check" ||
- row.status == "undelivery")
- ) {
- return false; //不可选择
- }
- // 促销赠品
- // if (row.isGift === "1" && row.isPromotion === 1) {
- // return false; //不可选择
- // }
- return true;
- },
- refundChange(id, arr) {
- if (id) {
- arr.refundReasonList.forEach(item => {
- if (item.id == id) {
- arr.customOpen = item.custom;
- if (arr.customOpen && arr.customOpen != 1) {
- arr.otherReason = "";
- }
- }
- });
- } else {
- arr.customOpen = "";
- }
- },
- writeReason(otherReason) {
- if (this.multipleSelection && this.multipleSelection.length > 0) {
- for (let uy in this.multipleSelection) {
- var row = this.multipleSelection[uy];
- if (row.customOpen == 1) {
- row.otherReason = otherReason;
- }
- ``;
- }
- }
- },
- chooseReason(id, arr) {
- if (id) {
- arr.forEach(item => {
- if (item.id == id) {
- this.otherReasonFlag = item.custom;
- }
- });
- } else {
- this.otherReasonFlag = "";
- }
- if (this.multipleSelection && this.multipleSelection.length > 0) {
- for (let uy in this.multipleSelection) {
- var row = this.multipleSelection[uy];
- row.refundReason = String(id);
- row.customOpen = this.otherReasonFlag;
- if (row.customOpen != 1) {
- row.otherReason = "";
- }
- }
- }
- },
- changeQuantity() {
- this.reCalReturn();
- },
- handleAvatarSuccess(res, file) {
- this.imageUrl = res.accessUrl;
- if (this.imageUrl) {
- this.addRefundForm.annexPath = this.imageUrl;
- }
- },
- beforeAvatarUpload(file) {
- const isJPG = file.type === "image/jpeg";
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isJPG) {
- this.$message.error("上传头像图片只能是 JPG 格式!");
- }
- if (!isLt2M) {
- this.$message.error("上传头像图片大小不能超过 2MB!");
- }
- return isJPG && isLt2M;
- },
- chooseClick(idList) {
- this.getDetail(idList);
- },
- //创建退款单
- submit() {
- if (this.multipleSelection.some(it => it.matchStatus == "unmatch")) {
- this.$message.error("已签收退货状态匹配错误,请匹配成功后重试!");
- return false;
- }
- var flag = false;
- var str = "";
- if (this.addressInfo.length != 1) {
- this.$message.error("请确保地址信息为1!");
- return false;
- }
- //验证 ormorder refundType
- if (!this.listQuery.ormorder && !this.listQuery.shopify) {
- str = str + "网店单号shopify单号不能同时为空。";
- flag = true;
- }
- if (this.queryRefundType != this.listQuery.refundType) {
- str = str + "退款类型不匹配。";
- flag = true;
- }
- if (
- this.listQuery.ormorder &&
- this.listQuery.ormorder != this.queryOrmorder
- ) {
- str = str + "网店单号不匹配";
- flag = true;
- }
- if (
- this.listQuery.shopify &&
- this.listQuery.shopify != this.queryShopify
- ) {
- str = str + "shopify单号不匹配";
- flag = true;
- }
- if (flag) {
- this.$message.error(str + ",请点击查询后继续此操作");
- return false;
- }
- //验证通过 保存逻辑
- this.addRefundForm.ormorder = this.queryOrmorder;
- this.addRefundForm.refundType = this.queryRefundType;
- //退货退款仓库验证
- if (
- this.addRefundForm.refundType == 3 &&
- !this.addRefundForm.warehouseCode
- ) {
- this.$message.error("请选择收退货仓库!");
- return false;
- }
- if (this.multipleSelection.length == 0) {
- this.$message.error("请选择要退的货品!");
- return false;
- }
- var items = [];
- // this.btnLoading = true;
- this.$confirm(
- "退款总计:" + this.addRefundForm.refundTotalAmount + ",是否确认?",
- "提示",
- {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }
- )
- .then(async () => {
- for (let ind in this.multipleSelection) {
- var obj = this.multipleSelection[ind];
- if (!obj.refundReason) {
- this.$alert(obj.ordersId + ":请选择退款原因");
- this.btnLoading = false;
- return;
- }
- var newobj = {
- productName: obj.productName,
- quantity: obj.quantity,
- ormOrderItemId: obj.ormOrderItemId,
- orderitemId: obj.orderitemId,
- skuCode: obj.skuCode,
- refundAmount: obj.refundAmount,
- differenceAmount: obj.differenceAmount,
- refundReason: obj.refundReason,
- otherReason: obj.otherReason,
- soOrdersId: obj.ordersId,
- isGift: obj.isGift,
- isPromotion: obj.isPromotion
- };
- items.push(newobj);
- }
- this.addRefundForm.items = items;
- //这里默认客服发起
- this.addRefundForm.originatorFlag = 1;
- // 总金额, 正数为退款 负数为补款
- let val = Number(this.addRefundForm.refundTotalAmount);
- if (val < 0) {
- this.addRefundForm.differenceAmount = Math.abs(val);
- this.addRefundForm.refundAmount = 0;
- } else {
- this.addRefundForm.refundAmount = val;
- this.addRefundForm.differenceAmount = 0;
- }
- const saveRefund = () => {
- let query = {
- orderPreviewVO: this.originReturnPreviewDatas,
- ordersRefund: this.addRefundForm
- };
- backstageSubmitRefund(query).then(
- res => {
- if (200 == res.code) {
- this.$message({
- message: this.$t("optSuccess"),
- type: "success"
- });
- items = [];
- this.btnStyle = "display:none";
- }
- },
- error => {
- this.btnLoading = false;
- }
- );
- };
- const validPromotion = async () => {
- // 校验是否包含促销赠品,不包含直接返回true
- if (
- !this.tableOrderDeatils.some(
- item => item.isGift === "1" && item.isPromotion === 1
- )
- ) {
- return true;
- }
- // TODO 解开注释请求校验
- // 校验是否满足促销条件 满足返回true(不提示)
- const { code, data } = await validPromotionReq(this.addRefundForm);
- if (code === 200) {
- return data.valid;
- }
- return false;
- };
- // TODO 存在赠品的订单,在客服创建未发货退款售后单时,需判断扣除已退款明细之后是否还满足促销条件,若不满足,需弹窗提示客服,由客服判断是否继续执行退款。
- if (await validPromotion()) {
- saveRefund();
- } else {
- const res = await this.$confirm(
- "退款后订单将不满足促销条件,是否确认?",
- "提示",
- {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }
- );
- if (res === "confirm") {
- saveRefund();
- }
- }
- })
- .catch(() => {
- this.btnLoading = false;
- this.$message({
- type: "info",
- message: "已取消操作"
- });
- });
- },
- //TODO 暂时关闭SL
- ShippingLabelOption() {
- this.addRefundForm.slUseable = "0";
- if (
- this.listQuery.refundType == 3 &&
- this.queryRefundType == 3 &&
- this.addressInfo &&
- this.addressInfo.length > 0 &&
- this.addressInfo[0].receiverCountryCode == "US" &&
- (this.addRefundForm.warehouseCode == "PSJ-H0000024" ||
- this.addRefundForm.warehouseCode == "PSJ-H0000019" ||
- this.addRefundForm.warehouseCode == "PSJ-H0000011" ||
- this.addRefundForm.warehouseCode == "PSJ-G001001" ||
- this.addRefundForm.warehouseCode == "PSJ-G001003" ||
- this.addRefundForm.warehouseCode == "PSJ-G001004")
- ) {
- this.addRefundForm.slUseable = "1";
- } else {
- this.addRefundForm.slUseable = "0";
- }
- },
- changeSlradio() {
- if (this.addRefundForm.slUseable == "0") {
- this.addRefundForm.shipmodeId = "";
- this.addRefundForm.shippingNo = "";
- }
- },
- //查询条件等发生变化时触发的方法
- validateParams() {
- //如果退款类型,单号都有
- if (
- (this.listQuery.ormorder || this.listQuery.shopify) &&
- this.listQuery.refundType
- ) {
- //直接触发一次重新查询
- this.getDetail();
- } else {
- //参数不完整的情况,清空之前的选项 初始化数据
- this.ShippingLabelOption();
- //初始化数据
- this.addRefundForm.refundAmount = 0.0;
- this.addRefundForm.noTaxRefundAmount = 0.0;
- this.addRefundForm.noTaxDifferenceAmount = 0.0;
- this.addRefundForm.differenceAmount = 0.0;
- this.addRefundForm.refundPostage = "0";
- this.addRefundForm.refundPostageAmount = 0.0;
- this.addRefundForm.warehouseCode = "";
- this.addRefundForm.annexPath = "";
- this.addRefundForm.items = [];
- this.addRefundForm.oldQuantity = 0.0;
- this.addRefundForm.refundTaxAble = "0"; //是否退税
- this.addRefundForm.refundTaxAmount = 0.0; //退税金额
- this.addRefundForm.refundTotalAmount = 0.0;
- this.addRefundForm.shipmodeId = "";
- this.addRefundForm.shippingNo = "";
- this.addRefundForm.refundMethod = "system";
- this.addRefundForm.refundAccountType = "PayPal";
- this.addRefundForm.refundAccount = "";
- this.addRefundForm.notes = "";
- this.addressInfo = [];
- this.listQuery.idList = null;
- this.reasonListAll = [];
- this.refundReasonAss = "";
- this.refundOtherReasonAss = "";
- this.otherReasonFlag = "";
- }
- },
- back() {
- this.$emit("back");
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .head {
- padding: 0px 20px;
- display: flex;
- justify-content: space-between;
- span:nth-child(1) {
- font-size: 15px;
- line-height: 25px;
- color: #909399;
- font-weight: 600;
- }
- span:nth-child(2) {
- line-height: 25px;
- cursor: pointer;
- color: #ae8878;
- font-size: 13px;
- }
- }
- .avatar-uploader .el-upload {
- border: 1px dashed #d9d9d9;
- border-radius: 6px;
- cursor: pointer;
- position: relative;
- overflow: hidden;
- }
- .avatar-uploader .el-upload:hover {
- border-color: #409eff;
- }
- .avatar-uploader-icon {
- font-size: 28px;
- color: #8c939d;
- width: 82px;
- height: 82px;
- line-height: 82px;
- text-align: center;
- border-radius: 3px;
- border: 1px solid #dcdfe6;
- margin-left: 49px;
- }
- .avatar {
- width: 178px;
- height: 178px;
- display: block;
- }
- .dialog_container {
- position: relative;
- }
- .main {
- margin-top: 15px;
- .box {
- .item_title {
- color: #606266;
- font-size: 16px !important;
- line-height: 16px;
- position: relative;
- padding-left: 8px !important;
- &:before {
- position: absolute;
- left: 0px;
- top: 13px;
- content: "";
- display: inline-block;
- width: 3px;
- height: 13px;
- background: #ae8877;
- border-radius: 0px 0px 0px 0px;
- }
- }
- .box_item {
- padding: 0 20px;
- display: flex;
- .item_title {
- line-height: 40px;
- font-size: 18px;
- text-align: left;
- font-weight: 600;
- }
- .item_list {
- text-align: left;
- font-size: 14px;
- color: #606266;
- display: flex;
- p {
- margin: 10px 0;
- }
- div:nth-child(2) {
- margin-left: 30px;
- }
- }
- }
- .item_title {
- padding-left: 20px;
- line-height: 40px;
- font-size: 18px;
- text-align: left;
- font-weight: 600;
- }
- }
- }
- .ptitle {
- display: flex;
- justify-content: space-between;
- margin: 20px 0px;
- color: #1f2d3d;
- text-align: left;
- font-weight: bold;
- width: 100%;
- /deep/.el-descriptions__title {
- color: #606266;
- }
- }
- .filter-container {
- .filter-item {
- margin-right: 11px;
- }
- }
- .container {
- display: flex; /* 使用 Flexbox 布局 */
- justify-content: space-between; /* 将盒子平均分布在容器中 */
- }
- .row {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- /deep/.el-form-item {
- display: flex;
- }
- .inputleft {
- margin-right: 42px;
- }
- .row-item {
- margin-right: 10vw;
- &:last-child {
- margin-right: 0px;
- }
- }
- .afertextarea {
- width: 306px;
- }
- }
- .el-table {
- font-size: 12px;
- margin: 20px 0px;
- }
- .itemtable {
- /deep/.has-gutter {
- .el-table__cell {
- background: #f5f0ee;
- padding: 0px;
- }
- }
- }
- .total_box {
- margin-bottom: 20px;
- .item_box {
- margin-top: 15px;
- }
- }
- .btn_box {
- position: absolute;
- right: 0px;
- bottom: -24px;
- .el-button {
- padding: 10px 37px;
- }
- }
- </style>
|