| | |
| | | </div> |
| | | <div class="single-page-con" :style="{ 'top': setting.isUseTabsRouter ? '100px' : '60px', height: setting.isUseTabsRouter ? 'calc(100% - 110px)' : 'calc(100% - 70px)' }"> |
| | | <div class="single-page"> |
| | | <!-- <keep-alive :include="cachePage"> --> |
| | | <keep-alive include="orderList"> |
| | | <!-- <keep-alive :include="cachePage">--> |
| | | <keep-alive :include="['orderList','fictitiousOrderList','CarPack','after-sale-order','member']"> |
| | | <router-view></router-view> |
| | | </keep-alive> |
| | | <!-- </keep-alive> --> |
| | | <!-- </keep-alive>--> |
| | | </div> |
| | | </div> |
| | | <!-- 全局加载动画 --> |
| | |
| | | ></Page> |
| | | </Row> |
| | | </Modal> |
| | | <Modal |
| | | v-model="showGeneralQrCode" |
| | | title="二维码" |
| | | width="800" |
| | | :mask-closable="false" |
| | | :loading="codeLoading" |
| | | > |
| | | <vue-qr |
| | | :text="QRCodeUrl" |
| | | :margin="0" |
| | | colorDark="#000" |
| | | colorLight="#fff" |
| | | :size="150" |
| | | ></vue-qr> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeGeneralQrCode">关闭</Button> |
| | | <!-- <Button type="primary" @click="generalQrCode">确认</Button>--> |
| | | </div> |
| | | </Modal> |
| | | </Card> |
| | | </div> |
| | | </template> |
| | |
| | | <script> |
| | | import { getCardPackData } from '@/api/cardPack' |
| | | import { getOrderList } from '@/api/order' |
| | | import vueQr from "vue-qr"; |
| | | export default { |
| | | name: "CarPack", |
| | | components: { |
| | | "vue-qr": vueQr, |
| | | }, |
| | | data() { |
| | | return { |
| | | modelShow:false, |
| | |
| | | style: { color } |
| | | }, text); |
| | | } |
| | | }, { |
| | | title: "操作", |
| | | key: "action", |
| | | align: "center", |
| | | width: 150, |
| | | fixed: "right", |
| | | render: (h, params) => { |
| | | const buttons = []; |
| | | // // 根据订单状态为'PAID'时显示额外操作按钮 |
| | | console.log('--------------------->',params.row.claimStatus ) |
| | | if (params.row.claimStatus === 'NOT_CLAIM') { |
| | | buttons.push( |
| | | h( |
| | | "Button", |
| | | { |
| | | props: {type: "primary", size: "small"}, |
| | | style: {marginRight: "5px"}, |
| | | on: { |
| | | click: () => { |
| | | this.handlerEditorQrcode(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "生成卡包二维码" |
| | | ) |
| | | ); |
| | | } |
| | | return h('div', buttons); |
| | | } |
| | | } |
| | | |
| | | ], |
| | | QRCodeUrl:'', |
| | | showGeneralQrCode:false, |
| | | codeLoading:false, |
| | | } |
| | | |
| | | }, |
| | | mounted(){ |
| | | //初始化 |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | }, |
| | | handlerEditorQrcode(row){ |
| | | this.QRCodeUrl = ''; |
| | | this.showGeneralQrCode = true |
| | | this.codeLoading = true; |
| | | |
| | | //获得商品对应的第一个skuid |
| | | this.codeLoading = false; |
| | | this.QRCodeUrl = this.QRcodeBaseUrl+ '/scanpage/claimCoupon'+'?id='+row.id |
| | | console.log(this.QRCodeUrl); |
| | | |
| | | }, |
| | | // 搜索 |
| | | handleSearch() { |
| | | this.searchForm.pageNumber = 1; |
| | |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | title: "退款状态", |
| | | key: "isRefund", |
| | | minWidth: 100, |
| | | render:(h, params) => { |
| | | if(params.row.isRefund==='NO_REFUND'){ |
| | | return h( |
| | | "div", |
| | | "未退款" |
| | | ); |
| | | }else if(params.row.isRefund==='ALL_REFUND'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "全部退款" |
| | | ); |
| | | }else if(params.row.isRefund==='PART_REFUND'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "部分退款" |
| | | ); |
| | | }else if(params.row.isRefund==='REFUNDING'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "退款中" |
| | | ); |
| | | } |
| | | else { |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "未知状态" |
| | | ); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | { |
| | | title: "小计", |
| | | key: "subTotal", |
| | | minWidth: 100, |
| | |
| | | console.log("to:",to.fullPath) |
| | | console.log("form:",from.fullPath) |
| | | // 正确打印路由对象的方法 |
| | | if((from.fullPath === "/orderList"|| from.fullPath === "/fictitiousOrderList" ||from.fullPath === "/orderStatistics") && to.fullPath.includes("/order-detail")){ |
| | | if((from.fullPath === "/orderList"|| from.fullPath === "/fictitiousOrderList" ||from.fullPath === "/orderStatistics"||from.fullPath.includes( "/member-detail")) && to.fullPath.includes("/order-detail")){ |
| | | this.sn = this.$route.query.sn; |
| | | this.getDataList(); |
| | | this.getOrderPackage(); |
| | |
| | | </div> |
| | | </Modal> |
| | | <!--订单分包裹发货--> |
| | | <Modal v-model="groupShipModal" :loading="shipLoading" title="分包裹发快递" width="1000"> |
| | | <Modal v-model="groupShipModal" :loading="shipLoading" title="分包裹发快递" width="1300"> |
| | | <div> |
| | | <Form ref="groupOrderDeliveryForm" :model="groupOrderDeliveryForm" :label-width="90" :rules="groupOrderDeliverFormValidate" style="position: relative"> |
| | | <FormItem label="物流公司" prop="logisticsId"> |
| | |
| | | </div> |
| | | </template> |
| | | <template slot="numSlot" slot-scope="{ row, index }"> |
| | | <InputNumber :min="0" :max="row.___num - row.deliverNumber" v-model="data[index].canNum"> |
| | | <InputNumber :min="0" :max="row.___num - row.deliverNumber - row.returnGoodsNumber" v-model="data[index].canNum"> |
| | | </InputNumber> |
| | | </template> |
| | | </Table> |
| | |
| | | ); |
| | | }, |
| | | }, |
| | | { |
| | | title: "退款数量", |
| | | key: "returnGoodsNumber", |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | title: "退款金额", |
| | | key: "refundPrice", |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | title: "退款状态", |
| | | key: "isRefund", |
| | | minWidth: 80, |
| | | render:(h, params) => { |
| | | if(params.row.isRefund==='NO_REFUND'){ |
| | | return h( |
| | | "div", |
| | | "未退款" |
| | | ); |
| | | }else if(params.row.isRefund==='ALL_REFUND'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "全部退款" |
| | | ); |
| | | }else if(params.row.isRefund==='PART_REFUND'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "部分退款" |
| | | ); |
| | | }else if(params.row.isRefund==='REFUNDING'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "退款中" |
| | | ); |
| | | } |
| | | else { |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "未知状态" |
| | | ); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | ], |
| | | data: [], // 商品表单数据 |
| | | orderLogColumns: [ |
| | |
| | | render: (h, params) => { |
| | | return h("div", this.$options.filters.unitPrice(params.row.subTotal, "¥")); |
| | | }, |
| | | }, |
| | | { |
| | | title: "退款数量", |
| | | key: "returnGoodsNumber", |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | title: "退款金额", |
| | | key: "refundPrice", |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | title: "退款状态", |
| | | key: "isRefund", |
| | | minWidth: 80, |
| | | render:(h, params) => { |
| | | if(params.row.isRefund==='NO_REFUND'){ |
| | | return h( |
| | | "div", |
| | | "未退款" |
| | | ); |
| | | }else if(params.row.isRefund==='ALL_REFUND'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "全部退款" |
| | | ); |
| | | }else if(params.row.isRefund==='PART_REFUND'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "部分退款" |
| | | ); |
| | | }else if(params.row.isRefund==='REFUNDING'){ |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "退款中" |
| | | ); |
| | | } |
| | | else { |
| | | return h( |
| | | "div", |
| | | { style: {color:"red"} }, |
| | | "未知状态" |
| | | ); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | ], |
| | | orderPackage: [], |
| | |
| | | this.data = res.result.orderItems.map((item) => { |
| | | // 只在弹窗打开状态下才保留用户修改的canNum值 |
| | | const existingItem = this.groupShipModalOpened ? this.data.find(d => d.id === item.id) : null; |
| | | const defaultCanNum = item.num - item.deliverNumber; |
| | | const defaultCanNum = item.num - item.deliverNumber - item.returnGoodsNumber; |
| | | |
| | | return { |
| | | ...item, |
| | |
| | | <DatePicker |
| | | v-model="selectDate" |
| | | type="datetimerange" |
| | | format="yyyy-MM-dd" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | @on-change="selectDateRange" |
| | | placeholder="选择起始时间" |
| | |
| | | }, |
| | | // 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新 |
| | | beforeRouteLeave(to, from, next) { |
| | | from.meta.keepAlive = false; |
| | | from.meta.keepAlive = true; |
| | | next(); |
| | | }, |
| | | }; |
| | |
| | | }, |
| | | // 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新 |
| | | beforeRouteLeave(to, from, next) { |
| | | from.meta.keepAlive = false |
| | | from.meta.keepAlive = true |
| | | next() |
| | | } |
| | | }; |