| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="100%" |
| | | :visible.sync="visible" |
| | | > |
| | | <div class="detail-box" > |
| | | <p class="tip-warn" style="margin-bottom: 30px;font-size: 14px;"> |
| | | <i class="el-icon-warning"></i> |
| | | æä½è¯´æï¼æ¨æ£é对订å<span class="red">{{ info.code }} </span>è¿è¡é款æä½ï¼è¯¥æä½ä¸å¯é请谨æ
æä½ï¼ï¼</p> |
| | | <div class="header"> |
| | | <div class="header-b">ååä¿¡æ¯</div> |
| | | </div> |
| | | <div class="info-item" > |
| | | <el-table :data="info.goodsorderDetailList||[]" stripe border > |
| | | <el-table-column prop="imgurl" label="ååå¾" min-width="80px" align="center"> |
| | | <template slot-scope="{row}"> |
| | | <el-image style="width: 50px;height: 50px;" v-if="row.imgurl && row.imgurl!=''" :src="row.imgurl" :preview-src-list="[row.imgurl]"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="åååç§°" align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="categoryName" label="åååç±»" align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="goodsWeight" label="éé(kg)" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="price" label="éå®ä»·(å
)" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>ï¿¥{{(row.price || 0).toFixed(2)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="goodsNum" label="æ°é" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="totalPrice" label="å°è®¡(å
)" align="center" min-width="150px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="orange">ï¿¥{{(row.totalPrice || 0).toFixed(2)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="info-item" > |
| | | <div class="info-item-a">å忻价ï¼<span> ï¿¥{{((info.totalPrice||0)-(info.mailPrice || 0)).toFixed(2)}}</span></div> |
| | | <div class="info-item-a">å¿«éè´¹ï¼<span>ï¿¥{{(info.mailPrice||0).toFixed(2)}}</span></div> |
| | | <div class="info-item-a">è®¢åæ»ä»·ï¼<span> ï¿¥{{(info.totalPrice||0).toFixed(2)}}</span></div> |
| | | </div> |
| | | <div class="info-item" > |
| | | <div class="info-item-a">ç§¯åæµæ£ï¼<span v-if="(info.integral||0)>0">-ï¿¥{{(info.integral||0).toFixed(2) +' '}}使ç¨{{(info.useIntegral||0)}}ç§¯åæµæ£ï¿¥{{(info.integral||0).toFixed(2) +' '}}å
</span></div> |
| | | <div class="info-item-a">伿 å¸ï¼<span v-if="(info.couponPrice||0)>0">-ï¿¥{{(info.couponPrice||0).toFixed(2) +' '}} 使ç¨{{info.couponName}}</span></div> |
| | | <div class="info-item-a">ç»éåç»ç®ï¼<span style="margin-right: 10px;"> ï¿¥{{(info.shopSettlement||0).toFixed(2)}}</span>ï¼{{info.shopName}}ï¼</div> |
| | | </div> |
| | | <div class="info-item" > |
| | | <div class="info-item-a">å®ä»éé¢ï¼<span class="red"> ï¿¥{{(info.price||0).toFixed(2)}}</span></div> |
| | | <div class="info-item-a">è¿è¿ç¨æ·ç§¯åï¼<span class="orange"> {{(info.returnMemberIntegral||0)}}</span></div> |
| | | <div class="info-item-a">è¿è¿ç»éå积åï¼<span class="orange">ï¿¥{{(info.shopSettlement || 0).toFixed(2) }}</span></div> |
| | | </div> |
| | | <div class="header"> |
| | | <div class="header-b">鿬¾å
容</div> |
| | | <div class="info-item" > |
| | | <el-form :model="form" ref="form" label-width="120px" label-suffix="ï¼" :rules="rules" inline> |
| | | <el-form-item label="鿬¾éé¢" prop="money" style="display: block;"> |
| | | <el-input type="number" v-model="form.money" placeholder="请è¾å
¥é款éé¢" v-trim> <template slot="append"> å
</template> </el-input> |
| | | <span class="tip-warn" style="margin-bottom: 30px;font-size: 14px;"> <i class="el-icon-warning"></i> |
| | | æç¤ºï¼å½å订åæå¤å¯ééé¢ä¸º<span class="red">{{(info.price||0).toFixed(2)}}</span></span> |
| | | </el-form-item> |
| | | <div style="display:flex;"> |
| | | <el-form-item label="éè¿" prop="refundInfo" style="display: inline;"> |
| | | <el-checkbox style="border: none;" v-model="form.returnUseCouponStatus" label="éè¿å®¢æ·ä¼æ å¸" border></el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="refundInfo" style="display: inline;"> |
| | | <el-checkbox style="border: none" v-model="form.returnUseIntegralStatus" label="éè¿å®¢æ·ç§¯å" border></el-checkbox> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <el-form-item label="æ£é¤" prop="refundInfo" style="display: inline;"> |
| | | <el-checkbox style="border: none" v-model="form.returnShopSettlementStatus" label="æ£é¤ç»éåå·²ç»ç®éé¢" border></el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="refundInfo" style="display: inline;"> |
| | | <el-checkbox style="border: none" v-model="form.returnIntegralStatus" label="æ£é¤å·²è¿å®¢æ·ç§¯å" border></el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="refundInfo" style="display: inline;"> |
| | | <el-checkbox style="border: none" v-model="form.returnShopIntegralStatus" label="æ£é¤å·²è¿ç»éå积å" border></el-checkbox> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="夿³¨" prop="remark" style="display: block;"> |
| | | <el-input type="textarea" :autosize="{ minRows: 4, maxRows:4 }" style="width: 500px;" v-model="form.remark" placeholder="请è¾å
¥åæ¶è¯´æ" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <template v-slot:footer> |
| | | <el-button type="primary" @click="confirm">确认</el-button> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import { shopDetail } from '@/api/business/shop' |
| | | export default { |
| | | name: 'OperaOrderRefundWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | title: '', |
| | | visible2: false, |
| | | visible: false, |
| | | tabelHeight: null, |
| | | info: {}, |
| | | shopInfo: {}, |
| | | rules: { |
| | | money: [ |
| | | { required: true, message: '请è¾å
¥é款éé¢', tigger: 'blur' } |
| | | ] |
| | | }, |
| | | // æç´¢ |
| | | form: { |
| | | orderId: '', |
| | | money: null, |
| | | returnShopIntegralStatus: false, |
| | | returnIntegralStatus: false, |
| | | returnShopSettlementStatus: false, |
| | | returnUseIntegralStatus: false, |
| | | returnUseCouponStatus: false, |
| | | remark: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '订åä¿¡æ¯è¡¨', |
| | | api: '/business/goodsorder', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | successBiz () { |
| | | this.loadInfo() |
| | | this.$emit('success') |
| | | }, |
| | | loadInfo () { |
| | | shopDetail(this.info.distributionShopId).then(res => { |
| | | this.shopInfo = res || this.shopInfo |
| | | }) |
| | | }, |
| | | open (title, info) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.info = info || {} |
| | | this.form = { |
| | | orderId: info.id, |
| | | money: null, |
| | | returnShopIntegralStatus: false, |
| | | returnIntegralStatus: false, |
| | | returnShopSettlementStatus: false, |
| | | returnUseIntegralStatus: false, |
| | | returnUseCouponStatus: false, |
| | | remark: '' |
| | | } |
| | | |
| | | if (this.info.distributionShopId != null) { |
| | | this.loadInfo() |
| | | } |
| | | }, |
| | | doSubmit () { |
| | | |
| | | }, |
| | | confirm () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | var msg = `ç¡®å®å¯¹è®¢åã${this.info.code}ãè¿è¡é款æä½åï¼` |
| | | if (this.form.returnShopSettlementStatus && (this.info.shopSettlement || 0) > 0 && (this.info.shopSettlement || 0) > (this.shopInfo.amount || 0)) { |
| | | msg = 'ç»éåä½é¢ä¸è¶³ï¼' + msg |
| | | } |
| | | this.$dialog.messageWaring(msg) |
| | | .then(() => { |
| | | this.isWorking = true |
| | | this.api.orderRefund({ |
| | | orderId: this.form.orderId, |
| | | money: this.form.money, |
| | | returnShopIntegralStatus: this.form.returnShopIntegralStatus ? 1 : 0, |
| | | returnIntegralStatus: this.form.returnIntegralStatus ? 1 : 0, |
| | | returnShopSettlementStatus: this.form.returnShopSettlementStatus ? 1 : 0, |
| | | returnUseIntegralStatus: this.form.returnUseIntegralStatus ? 1 : 0, |
| | | returnUseCouponStatus: this.form.returnUseCouponStatus ? 1 : 0, |
| | | remark: this.form.remark |
| | | }) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('鿬¾æå') |
| | | this.$emit('success') |
| | | }).catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .table-pagination{ |
| | | position: fixed !important; |
| | | bottom: 50px; |
| | | } |
| | | .header-b{ |
| | | display: inline-block; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | .header-red-btn{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | background-color: red; |
| | | padding: 2px 10px 3px 10px; |
| | | margin-left: 20px; |
| | | color: white; |
| | | cursor: pointer; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-blue-btn{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | background-color: #216EEE; |
| | | padding: 2px 10px 3px 10px; |
| | | margin-left: 20px; |
| | | color: white; |
| | | cursor: pointer; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-grey{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid grey; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: grey; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-orange{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid orange; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: orange; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-btn{ |
| | | display: inline-block; |
| | | border: none; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | } |
| | | .info-item{ |
| | | display: flex; |
| | | width: 100%; |
| | | margin: 15px; |
| | | } |
| | | .info-item-a{ |
| | | flex: 1; |
| | | font-size: 14px; |
| | | |
| | | } |
| | | .info-item-a span{ |
| | | } |
| | | .info-item-a .btn{ |
| | | font-size: 12px !important; |
| | | cursor: pointer !important; |
| | | } |
| | | </style> |