Zory 6 روز پیش
والد
کامیت
da15a63933

+ 7 - 0
src/api/model/order.js

@@ -23,4 +23,11 @@ export default {
             return await http.get(this.url, params);
         },
     },
+    print_refresh: {
+        url: `${config.API_URL}/order/print_refresh`,
+        name: "-",
+        get: async function (params) {
+            return await http.get(this.url, params);
+        },
+    },
 }

+ 1 - 1
src/views/manage/goods/components/form.vue

@@ -190,7 +190,7 @@ export default {
         setData(data){
             this.formData = JSON.parse(JSON.stringify(data));
             if (this.mode == 'edit') {
-                this.specs = data.data_specs;
+                this.specs = data.data_specs?data.data_specs:[];
             }
         },
         async submit(){

+ 64 - 0
src/views/manage/order/print/components/log.vue

@@ -0,0 +1,64 @@
+<template>
+    <el-drawer :title="titleMap[mode]" :append-to-body="true" v-model="visible" :size="1000" destroy-on-close :close-on-click-modal="false" @closed="$emit('closed')" :with-header="false">
+        <el-container class="flex-column" v-loading="loading">
+            <div class="drawer-detail-main">
+                <div class="drawer-detail-header">
+                    <div class="drawer-detail-header-body">
+                        <div class="drawer-detail-header-left">{{ titleMap[mode] }}</div>
+                        <div class="drawer-detail-header-left">
+                            <el-button type="default" icon="el-icon-close" @click="visible=false"></el-button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <el-main>
+                <el-timeline>
+                    <el-timeline-item :timestamp="item.create_at" center placement="top"  v-for="(item,index) in logData" :key="index">
+                        <el-card shadow="never">
+                            <template #header>{{ item.title }}</template>
+                            <p>{{ item.remark }}</p>
+                        </el-card>
+                    </el-timeline-item>
+                </el-timeline>
+            </el-main>
+            <el-footer style="text-align: right;">
+                <el-button @click="visible=false" >关 闭</el-button>
+            </el-footer>
+        </el-container>
+    </el-drawer>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            loading: false,
+            mode:"add",
+            titleMap:{
+                add:"订单记录",
+                edit:"订单记录"
+            },
+            visible: false,
+            isSaveing: false,
+            logData:[]
+        }
+    },
+    methods:{
+        open(mode = 'add'){
+            this.mode = mode;
+            this.visible = true;
+            return this
+        },
+        //表单注入数据
+        setData(data){
+            this.getLogData(data);
+        },
+        async getLogData(order){
+            this.loading = true;
+            var resp = await this.$API.order.log.get({"order":order.order_sn});
+            this.loading = false;
+            this.logData = resp.data;
+        }
+    }
+}
+</script>

+ 63 - 0
src/views/manage/order/print/components/option.vue

@@ -0,0 +1,63 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">按需操作</el-tag>
+        </legend>
+        <div class="op-header">
+            <div class="left-panel">
+                <el-button type="primary" icon="el-icon-refresh" @click="refresh_print">重启打印</el-button>
+            </div>
+        </div>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    props: {
+        status: { type: String, default: "1" },
+        name: { type: String, default: "已预约订单" },
+        dataSelect: { type: Array, default: () => [] },
+        searchKey: { type: Object, default: () => {} },
+        dataSelectFull: { type: Array, default: () => [] }
+    },
+    data(){
+        return {
+
+        }
+    },
+    methods: {
+        refresh_print(){
+            this.$confirm(`重启打印前请确认打印机正常在线,重启操作后等待1-2分钟打印机会自动开始工作`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var resp = await this.$API.order.print_refresh.post();
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg)
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        table_export(){
+            
+        },
+        async table_batch_status(status){
+            if (this.dataSelect.length == 0) {
+                return this.$message.error("请选择修改数据")
+            }
+            let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
+            var resp = await this.$API.merGoods.batch.post(submitData);
+            if (resp.code == 0) {
+                return this.$message.error(resp.msg);
+            }
+            this.$message.success(resp.msg);
+            this.$emit("success");
+        },
+        handleSuccess(){
+            this.$emit("success");
+        },
+    }
+}
+</script>

+ 62 - 0
src/views/manage/order/print/components/search.vue

@@ -0,0 +1,62 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">条件筛选</el-tag>
+        </legend>
+        <el-form class="lv-form-inline" ref="searchForm" :model="searchKey" label-position="right" label-width="100px">
+            <div class="search-form">
+                <div class="form-left">
+                    <el-row :gutter="10">
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.orderid" placeholder="订单编号" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>订单编号</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.product" placeholder="商品ID" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>商品ID</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.certificate" placeholder="券ID" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>券ID</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.name" placeholder="商品标题" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>商品标题</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm" />
+                        </el-col>
+                    </el-row>
+                </div>
+                <div class="form-line"></div>
+                <div class="form-right">
+                    <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
+                </div>
+            </div>
+        </el-form>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    props: {
+        status: { type: String, default: "1" },
+    },
+    data(){
+        return {
+            searchKey:{
+                auto:3
+            }
+        }
+    },
+    methods: {
+        searchForm(){
+            this.$emit("success",this.searchKey);
+        }
+    }
+}
+</script>

+ 244 - 0
src/views/manage/order/print/components/table.vue

@@ -0,0 +1,244 @@
+<template>
+    <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
+        <el-table-column type="selection" width="50" fixed="left"></el-table-column>
+        <el-table-column label="订单编号" prop="order_id" width="220" fixed="left">
+            <template #default="scope">
+                <span v-if="scope.row.order_id">{{ scope.row.order_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="所属代理" prop="status" width="160">
+            <template #default="scope">
+                <span>{{ scope.row.agent?scope.row.agent.name:'-' }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="所属店铺" prop="status" width="160">
+            <template #default="scope">
+                <span>{{ scope.row.store?scope.row.store.store_name:'-' }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="订单类型" prop="status" width="120">
+            <template #default="scope">
+                <div class="status-danger" v-if="scope.row.service_type==1"><sc-status-indicator type="danger"></sc-status-indicator> 预约</div>
+                <div class="status-success" v-if="scope.row.service_type==2"><sc-status-indicator type="success"></sc-status-indicator> 快递</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="收货地址" prop="company_id" width="120">
+            <template #default="scope">
+                <el-popover :width="200" placement="top-start" v-if="scope.row.service_type==2">
+                    <template #reference>
+                        <div class="el-text">
+                            {{ scope.row.mobile }}
+                            <div class="desc" v-copy="'联系人:'+scope.row.username+';联系电话:'+scope.row.mobile+';联系地址:'+scope.row.region+scope.row.address"><span>一键复制</span></div>
+                        </div>
+                    </template>
+                    <div class="flex-tags-size">
+                        <span>联系人</span>{{scope.row.username?scope.row.username:'-'}}<br><br>
+                        <span>联系电话</span>{{scope.row.mobile?scope.row.mobile:'-'}}<br><br>
+                        <span>联系地址</span>{{scope.row.region?scope.row.region:'-'}}{{scope.row.address?scope.row.address:'-'}}
+                    </div>
+                </el-popover>
+                <span v-else>-</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="商品ID" prop="out_id" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.product_id">{{ scope.row.product_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="券ID" prop="certificate_id" width="180">
+            <template #default="scope">
+                <span v-if="scope.row.certificate_id">{{ scope.row.certificate_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="商品信息" prop="product_name" width="220">
+            <template #default="scope">
+                <div class="el-text" v-if="scope.row.product_name">
+                    {{ scope.row.product_name }}
+                    <div class="desc" v-copy="'商品名称:'+scope.row.product_name+';规格信息:'+scope.row.sku">
+                        <el-tooltip effect="dark" content="点击即可复制商品信息" placement="top-start">
+                            <span>{{ scope.row.sku }}</span>
+                        </el-tooltip>
+                    </div>
+                </div>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="数量" prop="count" width="100">
+            <template #default="scope">
+                <span>{{ scope.row.parent.count }}件</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="订单金额" prop="order_amount" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.parent.order_amount">¥{{ scope.row.parent.order_amount }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="支付金额" prop="pay_amount" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.parent.pay_amount">¥{{ scope.row.parent.pay_amount }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="未打印原因" prop="express_remark" width="200">
+            <template #default="scope">
+                <span v-if="scope.row.express_remark">{{ scope.row.express_remark }}</span>
+                <span class="status-danger" v-else>-</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="状态" prop="status" width="180">
+            <template #default="scope">
+                <div class="status-danger" v-if="scope.row.express_status==0"><sc-status-indicator type="danger"></sc-status-indicator> 待发货</div>
+                <div class="status-success" v-if="scope.row.express_status==1"><sc-status-indicator type="success"></sc-status-indicator> 待核销</div>
+                <div class="status-danger" v-if="scope.row.express_status==2"><sc-status-indicator type="danger"></sc-status-indicator> 已完成</div>
+                <div class="status-info" v-if="scope.row.express_status==3"><sc-status-indicator type="info"></sc-status-indicator> 已取消</div>
+                <div class="status-info" v-if="scope.row.express_status==4"><sc-status-indicator type="info"></sc-status-indicator> 退款审核</div>
+                <div class="status-info" v-if="scope.row.express_status==5"><sc-status-indicator type="info"></sc-status-indicator> 拒绝退款</div>
+                <div v-if="scope.row.status==5 && scope.row.remark">{{ scope.row.remark }}</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="创建时间" prop="create_at" width="180"></el-table-column>
+    </scTable>
+    <addMain ref="addMain" @success="handleSuccess"></addMain>
+    <logMain ref="logMain" @success="handleSuccess"></logMain>
+</template>
+
+<script>
+import addMain from "@/views/manage/components/send";
+import logMain from '@/views/manage/order/components/log'
+export default {
+    components: {
+        addMain,logMain
+    },
+    props: {
+        status: { type: String, default: "1" }
+    },
+    data(){
+        return {
+            list: {
+                apiObj: this.$API.order.list
+            },
+            dataSelect:[],
+            dataSelectFull:[],
+            searchKey:{
+                auto:3
+            }
+        }
+    },
+    methods: {
+        async table_print(data){
+            var resp = await this.$API.store.hook.get();
+            var url = resp.data.url+"print/view?order="+data.order_id
+            window.open(url,"_blank")
+        },
+        table_passwd(row){
+            return this.$message.success("暂未开放");
+            this.$nextTick(() => {
+                this.$refs.formMain.open("edit").setData(row)
+            })
+        },
+        table_end(data){
+            return this.$message.success("暂未开放");
+            this.$confirm(`核销后该笔订单即为完成,如客户需退款只能通过来客后台进行操作,当前后台不支持核销后退款操作,确定要执行吗?`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var loading = this.$loading();
+                var resp = await this.$API.order.end.post({"order_id":data.order_id});
+                loading.close();
+                if (resp.code !== 1) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(() => {
+
+            })
+        },
+        table_express(data){
+            return this.$message.success("暂未开放");
+            this.$confirm(`呼叫快递成功后,可进入【待核销】栏目进行打印快递面单,如已接通云打印可忽略`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var loading = this.$loading();
+                var resp = await this.$API.merOrder.express.post({"id":data.id});
+                loading.close();
+                if (resp.code == 0) {
+                    return this.$message.warning(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
+        },
+        table_log(data){
+            this.$nextTick(() => {
+                this.$refs.logMain.open("edit").setData(data)
+            })
+        },
+        refresh(){
+            this.$refs.table.refresh()
+        },
+        upData(data){
+            this.$refs.table.upData(data)
+        },
+        handleSuccess(){
+            this.$refs.table.refresh()
+        },
+        sortChange(event){
+            if (event.order) {
+                var data = {
+                    "field":event.prop,
+                    "order":event.order
+                }
+                this.$refs.table.upData(data)
+            } else {
+                this.$refs.table.reload(this.searchKey)
+            }
+            return ;
+        },
+        selectionChange(event){
+            this.dataSelect = [];
+            var arr = [];
+            var arrCompany = [];
+            event.forEach(function(val,index){
+                arr[index] = val.id;
+                arrCompany[index] = val;
+            });
+            this.dataSelectFull = arrCompany;
+            this.dataSelect = arr;
+            this.$emit("success",this.dataSelect);
+            this.$emit("successFull",this.dataSelectFull);
+        },
+    }
+}
+</script>
+
+<style>
+.desc{
+    color: #999;
+    font-size: 12px;
+}
+.flex-btn{
+    display: flex;
+    flex-wrap: wrap;
+    gap: 5px;
+}
+.flex-tags {
+    display: flex;
+    gap: 2px;
+    flex-wrap: wrap;
+}
+.flex-btn .el-button.is-text{
+    margin-left: 0;
+}
+.flex-tags-size{
+    font-size: 12px;
+}
+.flex-tags-size span{
+    display: block;
+    margin-bottom: 5px;
+    color: #999;
+}
+</style>

+ 51 - 0
src/views/manage/order/print/index.vue

@@ -0,0 +1,51 @@
+<template>
+    <el-container class="flex-column">
+        <div class="table-search">
+            <search @success="handleSuccess" status="3"></search>
+            <el-alert type="warning" show-icon title="栏目提醒" description="该栏目订单为自助打印失败数据,未开通自动打印商家该栏目不会有任何信息" :closable="false" style="margin-bottom: 10px;"></el-alert>
+            <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" status="3" name="已核销订单" :searchKey="searchKey"></optionBtn>
+        </div>
+        <el-main class="nopadding">
+            <div class="table-container">
+                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" status="3"></tablePage>
+            </div>
+        </el-main>
+    </el-container>  
+</template>
+
+<script>
+import search from './components/search';
+import optionBtn from './components/option';
+import tablePage from './components/table';
+export default {
+    components: {
+        search,tablePage,optionBtn
+    },
+    data(){
+        return {
+            searchKey:{
+                auto:3
+            },
+            dataSelect:[],
+            dataSelectFull:[],
+        }
+    },
+    methods: {
+        tableHandle(data){
+            this.dataSelect = data;
+        },
+        tableHandleFull(data){
+            this.dataSelectFull = data;
+        },
+        handleSuccess(data){
+            this.searchKey = data;
+            this.$refs.tablePage.upData(data)
+        },
+        handleClick(name){
+            this.activeName = name;
+            this.searchKey.type = name;
+            this.$refs.tablePage.upData(this.searchKey)
+        }
+    }
+}
+</script>

+ 1 - 1
src/views/merchant/goods/components/form.vue

@@ -193,7 +193,7 @@ export default {
         setData(data){
             this.formData = JSON.parse(JSON.stringify(data));
             if (this.mode == 'edit') {
-                this.specs = data.data_specs;
+                this.specs = data.data_specs?data.data_specs:[];
             }
         },
         async submit(){

+ 64 - 0
src/views/merchant/order/print/components/log.vue

@@ -0,0 +1,64 @@
+<template>
+    <el-drawer :title="titleMap[mode]" :append-to-body="true" v-model="visible" :size="1000" destroy-on-close :close-on-click-modal="false" @closed="$emit('closed')" :with-header="false">
+        <el-container class="flex-column" v-loading="loading">
+            <div class="drawer-detail-main">
+                <div class="drawer-detail-header">
+                    <div class="drawer-detail-header-body">
+                        <div class="drawer-detail-header-left">{{ titleMap[mode] }}</div>
+                        <div class="drawer-detail-header-left">
+                            <el-button type="default" icon="el-icon-close" @click="visible=false"></el-button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <el-main>
+                <el-timeline>
+                    <el-timeline-item :timestamp="item.create_at" center placement="top"  v-for="(item,index) in logData" :key="index">
+                        <el-card shadow="never">
+                            <template #header>{{ item.title }}</template>
+                            <p>{{ item.remark }}</p>
+                        </el-card>
+                    </el-timeline-item>
+                </el-timeline>
+            </el-main>
+            <el-footer style="text-align: right;">
+                <el-button @click="visible=false" >关 闭</el-button>
+            </el-footer>
+        </el-container>
+    </el-drawer>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            loading: false,
+            mode:"add",
+            titleMap:{
+                add:"订单记录",
+                edit:"订单记录"
+            },
+            visible: false,
+            isSaveing: false,
+            logData:[]
+        }
+    },
+    methods:{
+        open(mode = 'add'){
+            this.mode = mode;
+            this.visible = true;
+            return this
+        },
+        //表单注入数据
+        setData(data){
+            this.getLogData(data);
+        },
+        async getLogData(order){
+            this.loading = true;
+            var resp = await this.$API.order.log.get({"order":order.order_sn});
+            this.loading = false;
+            this.logData = resp.data;
+        }
+    }
+}
+</script>

+ 63 - 0
src/views/merchant/order/print/components/option.vue

@@ -0,0 +1,63 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">按需操作</el-tag>
+        </legend>
+        <div class="op-header">
+            <div class="left-panel">
+                <el-button type="primary" icon="el-icon-refresh" @click="refresh_print">重启打印</el-button>
+            </div>
+        </div>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    props: {
+        status: { type: String, default: "1" },
+        name: { type: String, default: "已预约订单" },
+        dataSelect: { type: Array, default: () => [] },
+        searchKey: { type: Object, default: () => {} },
+        dataSelectFull: { type: Array, default: () => [] }
+    },
+    data(){
+        return {
+
+        }
+    },
+    methods: {
+        refresh_print(){
+            this.$confirm(`重启打印前请确认打印机正常在线,重启操作后等待1-2分钟打印机会自动开始工作`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var resp = await this.$API.order.print_refresh.post();
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg)
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        table_export(){
+            
+        },
+        async table_batch_status(status){
+            if (this.dataSelect.length == 0) {
+                return this.$message.error("请选择修改数据")
+            }
+            let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
+            var resp = await this.$API.merGoods.batch.post(submitData);
+            if (resp.code == 0) {
+                return this.$message.error(resp.msg);
+            }
+            this.$message.success(resp.msg);
+            this.$emit("success");
+        },
+        handleSuccess(){
+            this.$emit("success");
+        },
+    }
+}
+</script>

+ 62 - 0
src/views/merchant/order/print/components/search.vue

@@ -0,0 +1,62 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">条件筛选</el-tag>
+        </legend>
+        <el-form class="lv-form-inline" ref="searchForm" :model="searchKey" label-position="right" label-width="100px">
+            <div class="search-form">
+                <div class="form-left">
+                    <el-row :gutter="10">
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.orderid" placeholder="订单编号" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>订单编号</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.product" placeholder="商品ID" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>商品ID</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.certificate" placeholder="券ID" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>券ID</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.name" placeholder="商品标题" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>商品标题</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm" />
+                        </el-col>
+                    </el-row>
+                </div>
+                <div class="form-line"></div>
+                <div class="form-right">
+                    <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
+                </div>
+            </div>
+        </el-form>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    props: {
+        status: { type: String, default: "1" },
+    },
+    data(){
+        return {
+            searchKey:{
+                auto:3
+            }
+        }
+    },
+    methods: {
+        searchForm(){
+            this.$emit("success",this.searchKey);
+        }
+    }
+}
+</script>

+ 244 - 0
src/views/merchant/order/print/components/table.vue

@@ -0,0 +1,244 @@
+<template>
+    <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
+        <el-table-column type="selection" width="50" fixed="left"></el-table-column>
+        <el-table-column label="订单编号" prop="order_id" width="220" fixed="left">
+            <template #default="scope">
+                <span v-if="scope.row.order_id">{{ scope.row.order_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="所属代理" prop="status" width="160">
+            <template #default="scope">
+                <span>{{ scope.row.agent?scope.row.agent.name:'-' }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="所属店铺" prop="status" width="160">
+            <template #default="scope">
+                <span>{{ scope.row.store?scope.row.store.store_name:'-' }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="订单类型" prop="status" width="120">
+            <template #default="scope">
+                <div class="status-danger" v-if="scope.row.service_type==1"><sc-status-indicator type="danger"></sc-status-indicator> 预约</div>
+                <div class="status-success" v-if="scope.row.service_type==2"><sc-status-indicator type="success"></sc-status-indicator> 快递</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="收货地址" prop="company_id" width="120">
+            <template #default="scope">
+                <el-popover :width="200" placement="top-start" v-if="scope.row.service_type==2">
+                    <template #reference>
+                        <div class="el-text">
+                            {{ scope.row.mobile }}
+                            <div class="desc" v-copy="'联系人:'+scope.row.username+';联系电话:'+scope.row.mobile+';联系地址:'+scope.row.region+scope.row.address"><span>一键复制</span></div>
+                        </div>
+                    </template>
+                    <div class="flex-tags-size">
+                        <span>联系人</span>{{scope.row.username?scope.row.username:'-'}}<br><br>
+                        <span>联系电话</span>{{scope.row.mobile?scope.row.mobile:'-'}}<br><br>
+                        <span>联系地址</span>{{scope.row.region?scope.row.region:'-'}}{{scope.row.address?scope.row.address:'-'}}
+                    </div>
+                </el-popover>
+                <span v-else>-</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="商品ID" prop="out_id" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.product_id">{{ scope.row.product_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="券ID" prop="certificate_id" width="180">
+            <template #default="scope">
+                <span v-if="scope.row.certificate_id">{{ scope.row.certificate_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="商品信息" prop="product_name" width="220">
+            <template #default="scope">
+                <div class="el-text" v-if="scope.row.product_name">
+                    {{ scope.row.product_name }}
+                    <div class="desc" v-copy="'商品名称:'+scope.row.product_name+';规格信息:'+scope.row.sku">
+                        <el-tooltip effect="dark" content="点击即可复制商品信息" placement="top-start">
+                            <span>{{ scope.row.sku }}</span>
+                        </el-tooltip>
+                    </div>
+                </div>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="数量" prop="count" width="100">
+            <template #default="scope">
+                <span>{{ scope.row.parent.count }}件</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="订单金额" prop="order_amount" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.parent.order_amount">¥{{ scope.row.parent.order_amount }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="支付金额" prop="pay_amount" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.parent.pay_amount">¥{{ scope.row.parent.pay_amount }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="未打印原因" prop="express_remark" width="200">
+            <template #default="scope">
+                <span v-if="scope.row.express_remark">{{ scope.row.express_remark }}</span>
+                <span class="status-danger" v-else>-</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="状态" prop="status" width="180">
+            <template #default="scope">
+                <div class="status-danger" v-if="scope.row.express_status==0"><sc-status-indicator type="danger"></sc-status-indicator> 待发货</div>
+                <div class="status-success" v-if="scope.row.express_status==1"><sc-status-indicator type="success"></sc-status-indicator> 待核销</div>
+                <div class="status-danger" v-if="scope.row.express_status==2"><sc-status-indicator type="danger"></sc-status-indicator> 已完成</div>
+                <div class="status-info" v-if="scope.row.express_status==3"><sc-status-indicator type="info"></sc-status-indicator> 已取消</div>
+                <div class="status-info" v-if="scope.row.express_status==4"><sc-status-indicator type="info"></sc-status-indicator> 退款审核</div>
+                <div class="status-info" v-if="scope.row.express_status==5"><sc-status-indicator type="info"></sc-status-indicator> 拒绝退款</div>
+                <div v-if="scope.row.status==5 && scope.row.remark">{{ scope.row.remark }}</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="创建时间" prop="create_at" width="180"></el-table-column>
+    </scTable>
+    <addMain ref="addMain" @success="handleSuccess"></addMain>
+    <logMain ref="logMain" @success="handleSuccess"></logMain>
+</template>
+
+<script>
+import addMain from "@/views/manage/components/send";
+import logMain from '@/views/manage/order/components/log'
+export default {
+    components: {
+        addMain,logMain
+    },
+    props: {
+        status: { type: String, default: "1" }
+    },
+    data(){
+        return {
+            list: {
+                apiObj: this.$API.merOrder.list
+            },
+            dataSelect:[],
+            dataSelectFull:[],
+            searchKey:{
+                auto:3
+            }
+        }
+    },
+    methods: {
+        async table_print(data){
+            var resp = await this.$API.store.hook.get();
+            var url = resp.data.url+"print/view?order="+data.order_id
+            window.open(url,"_blank")
+        },
+        table_passwd(row){
+            return this.$message.success("暂未开放");
+            this.$nextTick(() => {
+                this.$refs.formMain.open("edit").setData(row)
+            })
+        },
+        table_end(data){
+            return this.$message.success("暂未开放");
+            this.$confirm(`核销后该笔订单即为完成,如客户需退款只能通过来客后台进行操作,当前后台不支持核销后退款操作,确定要执行吗?`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var loading = this.$loading();
+                var resp = await this.$API.order.end.post({"order_id":data.order_id});
+                loading.close();
+                if (resp.code !== 1) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(() => {
+
+            })
+        },
+        table_express(data){
+            return this.$message.success("暂未开放");
+            this.$confirm(`呼叫快递成功后,可进入【待核销】栏目进行打印快递面单,如已接通云打印可忽略`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var loading = this.$loading();
+                var resp = await this.$API.merOrder.express.post({"id":data.id});
+                loading.close();
+                if (resp.code == 0) {
+                    return this.$message.warning(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
+        },
+        table_log(data){
+            this.$nextTick(() => {
+                this.$refs.logMain.open("edit").setData(data)
+            })
+        },
+        refresh(){
+            this.$refs.table.refresh()
+        },
+        upData(data){
+            this.$refs.table.upData(data)
+        },
+        handleSuccess(){
+            this.$refs.table.refresh()
+        },
+        sortChange(event){
+            if (event.order) {
+                var data = {
+                    "field":event.prop,
+                    "order":event.order
+                }
+                this.$refs.table.upData(data)
+            } else {
+                this.$refs.table.reload(this.searchKey)
+            }
+            return ;
+        },
+        selectionChange(event){
+            this.dataSelect = [];
+            var arr = [];
+            var arrCompany = [];
+            event.forEach(function(val,index){
+                arr[index] = val.id;
+                arrCompany[index] = val;
+            });
+            this.dataSelectFull = arrCompany;
+            this.dataSelect = arr;
+            this.$emit("success",this.dataSelect);
+            this.$emit("successFull",this.dataSelectFull);
+        },
+    }
+}
+</script>
+
+<style>
+.desc{
+    color: #999;
+    font-size: 12px;
+}
+.flex-btn{
+    display: flex;
+    flex-wrap: wrap;
+    gap: 5px;
+}
+.flex-tags {
+    display: flex;
+    gap: 2px;
+    flex-wrap: wrap;
+}
+.flex-btn .el-button.is-text{
+    margin-left: 0;
+}
+.flex-tags-size{
+    font-size: 12px;
+}
+.flex-tags-size span{
+    display: block;
+    margin-bottom: 5px;
+    color: #999;
+}
+</style>

+ 51 - 0
src/views/merchant/order/print/index.vue

@@ -0,0 +1,51 @@
+<template>
+    <el-container class="flex-column">
+        <div class="table-search">
+            <search @success="handleSuccess" status="3"></search>
+            <el-alert type="warning" show-icon title="栏目提醒" description="该栏目订单为自助打印失败数据,未开通自动打印商家该栏目不会有任何信息" :closable="false" style="margin-bottom: 10px;"></el-alert>
+            <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" status="3" name="已核销订单" :searchKey="searchKey"></optionBtn>
+        </div>
+        <el-main class="nopadding">
+            <div class="table-container">
+                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" status="3"></tablePage>
+            </div>
+        </el-main>
+    </el-container>  
+</template>
+
+<script>
+import search from './components/search';
+import optionBtn from './components/option';
+import tablePage from './components/table';
+export default {
+    components: {
+        search,tablePage,optionBtn
+    },
+    data(){
+        return {
+            searchKey:{
+                auto:3
+            },
+            dataSelect:[],
+            dataSelectFull:[],
+        }
+    },
+    methods: {
+        tableHandle(data){
+            this.dataSelect = data;
+        },
+        tableHandleFull(data){
+            this.dataSelectFull = data;
+        },
+        handleSuccess(data){
+            this.searchKey = data;
+            this.$refs.tablePage.upData(data)
+        },
+        handleClick(name){
+            this.activeName = name;
+            this.searchKey.type = name;
+            this.$refs.tablePage.upData(this.searchKey)
+        }
+    }
+}
+</script>

+ 1 - 1
src/views/store/goods/components/form.vue

@@ -162,7 +162,7 @@ export default {
         setData(data){
             this.formData = JSON.parse(JSON.stringify(data));
             if (this.mode == 'edit') {
-                this.specs = data.data_specs;
+                this.specs = data.data_specs?data.data_specs:[];
             }
         },
         async submit(){

+ 64 - 0
src/views/store/order/print/components/log.vue

@@ -0,0 +1,64 @@
+<template>
+    <el-drawer :title="titleMap[mode]" :append-to-body="true" v-model="visible" :size="1000" destroy-on-close :close-on-click-modal="false" @closed="$emit('closed')" :with-header="false">
+        <el-container class="flex-column" v-loading="loading">
+            <div class="drawer-detail-main">
+                <div class="drawer-detail-header">
+                    <div class="drawer-detail-header-body">
+                        <div class="drawer-detail-header-left">{{ titleMap[mode] }}</div>
+                        <div class="drawer-detail-header-left">
+                            <el-button type="default" icon="el-icon-close" @click="visible=false"></el-button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <el-main>
+                <el-timeline>
+                    <el-timeline-item :timestamp="item.create_at" center placement="top"  v-for="(item,index) in logData" :key="index">
+                        <el-card shadow="never">
+                            <template #header>{{ item.title }}</template>
+                            <p>{{ item.remark }}</p>
+                        </el-card>
+                    </el-timeline-item>
+                </el-timeline>
+            </el-main>
+            <el-footer style="text-align: right;">
+                <el-button @click="visible=false" >关 闭</el-button>
+            </el-footer>
+        </el-container>
+    </el-drawer>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            loading: false,
+            mode:"add",
+            titleMap:{
+                add:"订单记录",
+                edit:"订单记录"
+            },
+            visible: false,
+            isSaveing: false,
+            logData:[]
+        }
+    },
+    methods:{
+        open(mode = 'add'){
+            this.mode = mode;
+            this.visible = true;
+            return this
+        },
+        //表单注入数据
+        setData(data){
+            this.getLogData(data);
+        },
+        async getLogData(order){
+            this.loading = true;
+            var resp = await this.$API.order.log.get({"order":order.order_sn});
+            this.loading = false;
+            this.logData = resp.data;
+        }
+    }
+}
+</script>

+ 63 - 0
src/views/store/order/print/components/option.vue

@@ -0,0 +1,63 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">按需操作</el-tag>
+        </legend>
+        <div class="op-header">
+            <div class="left-panel">
+                <el-button type="primary" icon="el-icon-refresh" @click="refresh_print">重启打印</el-button>
+            </div>
+        </div>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    props: {
+        status: { type: String, default: "1" },
+        name: { type: String, default: "已预约订单" },
+        dataSelect: { type: Array, default: () => [] },
+        searchKey: { type: Object, default: () => {} },
+        dataSelectFull: { type: Array, default: () => [] }
+    },
+    data(){
+        return {
+
+        }
+    },
+    methods: {
+        refresh_print(){
+            this.$confirm(`重启打印前请确认打印机正常在线,重启操作后等待1-2分钟打印机会自动开始工作`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var resp = await this.$API.order.print_refresh.post();
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg)
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        table_export(){
+            
+        },
+        async table_batch_status(status){
+            if (this.dataSelect.length == 0) {
+                return this.$message.error("请选择修改数据")
+            }
+            let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
+            var resp = await this.$API.merGoods.batch.post(submitData);
+            if (resp.code == 0) {
+                return this.$message.error(resp.msg);
+            }
+            this.$message.success(resp.msg);
+            this.$emit("success");
+        },
+        handleSuccess(){
+            this.$emit("success");
+        },
+    }
+}
+</script>

+ 62 - 0
src/views/store/order/print/components/search.vue

@@ -0,0 +1,62 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">条件筛选</el-tag>
+        </legend>
+        <el-form class="lv-form-inline" ref="searchForm" :model="searchKey" label-position="right" label-width="100px">
+            <div class="search-form">
+                <div class="form-left">
+                    <el-row :gutter="10">
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.orderid" placeholder="订单编号" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>订单编号</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.product" placeholder="商品ID" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>商品ID</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.certificate" placeholder="券ID" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>券ID</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-input v-model="searchKey.name" placeholder="商品标题" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
+                                <template #prepend>商品标题</template>
+                            </el-input>
+                        </el-col>
+                        <el-col :span="this.$store.state.global.ismobile?12:4">
+                            <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm" />
+                        </el-col>
+                    </el-row>
+                </div>
+                <div class="form-line"></div>
+                <div class="form-right">
+                    <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
+                </div>
+            </div>
+        </el-form>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    props: {
+        status: { type: String, default: "1" },
+    },
+    data(){
+        return {
+            searchKey:{
+                auto:3
+            }
+        }
+    },
+    methods: {
+        searchForm(){
+            this.$emit("success",this.searchKey);
+        }
+    }
+}
+</script>

+ 244 - 0
src/views/store/order/print/components/table.vue

@@ -0,0 +1,244 @@
+<template>
+    <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
+        <el-table-column type="selection" width="50" fixed="left"></el-table-column>
+        <el-table-column label="订单编号" prop="order_id" width="220" fixed="left">
+            <template #default="scope">
+                <span v-if="scope.row.order_id">{{ scope.row.order_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="所属代理" prop="status" width="160">
+            <template #default="scope">
+                <span>{{ scope.row.agent?scope.row.agent.name:'-' }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="所属店铺" prop="status" width="160">
+            <template #default="scope">
+                <span>{{ scope.row.store?scope.row.store.store_name:'-' }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="订单类型" prop="status" width="120">
+            <template #default="scope">
+                <div class="status-danger" v-if="scope.row.service_type==1"><sc-status-indicator type="danger"></sc-status-indicator> 预约</div>
+                <div class="status-success" v-if="scope.row.service_type==2"><sc-status-indicator type="success"></sc-status-indicator> 快递</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="收货地址" prop="company_id" width="120">
+            <template #default="scope">
+                <el-popover :width="200" placement="top-start" v-if="scope.row.service_type==2">
+                    <template #reference>
+                        <div class="el-text">
+                            {{ scope.row.mobile }}
+                            <div class="desc" v-copy="'联系人:'+scope.row.username+';联系电话:'+scope.row.mobile+';联系地址:'+scope.row.region+scope.row.address"><span>一键复制</span></div>
+                        </div>
+                    </template>
+                    <div class="flex-tags-size">
+                        <span>联系人</span>{{scope.row.username?scope.row.username:'-'}}<br><br>
+                        <span>联系电话</span>{{scope.row.mobile?scope.row.mobile:'-'}}<br><br>
+                        <span>联系地址</span>{{scope.row.region?scope.row.region:'-'}}{{scope.row.address?scope.row.address:'-'}}
+                    </div>
+                </el-popover>
+                <span v-else>-</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="商品ID" prop="out_id" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.product_id">{{ scope.row.product_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="券ID" prop="certificate_id" width="180">
+            <template #default="scope">
+                <span v-if="scope.row.certificate_id">{{ scope.row.certificate_id }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="商品信息" prop="product_name" width="220">
+            <template #default="scope">
+                <div class="el-text" v-if="scope.row.product_name">
+                    {{ scope.row.product_name }}
+                    <div class="desc" v-copy="'商品名称:'+scope.row.product_name+';规格信息:'+scope.row.sku">
+                        <el-tooltip effect="dark" content="点击即可复制商品信息" placement="top-start">
+                            <span>{{ scope.row.sku }}</span>
+                        </el-tooltip>
+                    </div>
+                </div>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="数量" prop="count" width="100">
+            <template #default="scope">
+                <span>{{ scope.row.parent.count }}件</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="订单金额" prop="order_amount" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.parent.order_amount">¥{{ scope.row.parent.order_amount }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="支付金额" prop="pay_amount" width="150">
+            <template #default="scope">
+                <span v-if="scope.row.parent.pay_amount">¥{{ scope.row.parent.pay_amount }}</span>
+                <span class="status-danger" v-else>未设置</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="未打印原因" prop="express_remark" width="200">
+            <template #default="scope">
+                <span v-if="scope.row.express_remark">{{ scope.row.express_remark }}</span>
+                <span class="status-danger" v-else>-</span>
+            </template>
+        </el-table-column>
+        <el-table-column label="状态" prop="status" width="180">
+            <template #default="scope">
+                <div class="status-danger" v-if="scope.row.express_status==0"><sc-status-indicator type="danger"></sc-status-indicator> 待发货</div>
+                <div class="status-success" v-if="scope.row.express_status==1"><sc-status-indicator type="success"></sc-status-indicator> 待核销</div>
+                <div class="status-danger" v-if="scope.row.express_status==2"><sc-status-indicator type="danger"></sc-status-indicator> 已完成</div>
+                <div class="status-info" v-if="scope.row.express_status==3"><sc-status-indicator type="info"></sc-status-indicator> 已取消</div>
+                <div class="status-info" v-if="scope.row.express_status==4"><sc-status-indicator type="info"></sc-status-indicator> 退款审核</div>
+                <div class="status-info" v-if="scope.row.express_status==5"><sc-status-indicator type="info"></sc-status-indicator> 拒绝退款</div>
+                <div v-if="scope.row.status==5 && scope.row.remark">{{ scope.row.remark }}</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="创建时间" prop="create_at" width="180"></el-table-column>
+    </scTable>
+    <addMain ref="addMain" @success="handleSuccess"></addMain>
+    <logMain ref="logMain" @success="handleSuccess"></logMain>
+</template>
+
+<script>
+import addMain from "@/views/manage/components/send";
+import logMain from '@/views/manage/order/components/log'
+export default {
+    components: {
+        addMain,logMain
+    },
+    props: {
+        status: { type: String, default: "1" }
+    },
+    data(){
+        return {
+            list: {
+                apiObj: this.$API.storeOrder.list
+            },
+            dataSelect:[],
+            dataSelectFull:[],
+            searchKey:{
+                auto:3
+            }
+        }
+    },
+    methods: {
+        async table_print(data){
+            var resp = await this.$API.store.hook.get();
+            var url = resp.data.url+"print/view?order="+data.order_id
+            window.open(url,"_blank")
+        },
+        table_passwd(row){
+            return this.$message.success("暂未开放");
+            this.$nextTick(() => {
+                this.$refs.formMain.open("edit").setData(row)
+            })
+        },
+        table_end(data){
+            return this.$message.success("暂未开放");
+            this.$confirm(`核销后该笔订单即为完成,如客户需退款只能通过来客后台进行操作,当前后台不支持核销后退款操作,确定要执行吗?`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var loading = this.$loading();
+                var resp = await this.$API.order.end.post({"order_id":data.order_id});
+                loading.close();
+                if (resp.code !== 1) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(() => {
+
+            })
+        },
+        table_express(data){
+            return this.$message.success("暂未开放");
+            this.$confirm(`呼叫快递成功后,可进入【待核销】栏目进行打印快递面单,如已接通云打印可忽略`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var loading = this.$loading();
+                var resp = await this.$API.merOrder.express.post({"id":data.id});
+                loading.close();
+                if (resp.code == 0) {
+                    return this.$message.warning(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
+        },
+        table_log(data){
+            this.$nextTick(() => {
+                this.$refs.logMain.open("edit").setData(data)
+            })
+        },
+        refresh(){
+            this.$refs.table.refresh()
+        },
+        upData(data){
+            this.$refs.table.upData(data)
+        },
+        handleSuccess(){
+            this.$refs.table.refresh()
+        },
+        sortChange(event){
+            if (event.order) {
+                var data = {
+                    "field":event.prop,
+                    "order":event.order
+                }
+                this.$refs.table.upData(data)
+            } else {
+                this.$refs.table.reload(this.searchKey)
+            }
+            return ;
+        },
+        selectionChange(event){
+            this.dataSelect = [];
+            var arr = [];
+            var arrCompany = [];
+            event.forEach(function(val,index){
+                arr[index] = val.id;
+                arrCompany[index] = val;
+            });
+            this.dataSelectFull = arrCompany;
+            this.dataSelect = arr;
+            this.$emit("success",this.dataSelect);
+            this.$emit("successFull",this.dataSelectFull);
+        },
+    }
+}
+</script>
+
+<style>
+.desc{
+    color: #999;
+    font-size: 12px;
+}
+.flex-btn{
+    display: flex;
+    flex-wrap: wrap;
+    gap: 5px;
+}
+.flex-tags {
+    display: flex;
+    gap: 2px;
+    flex-wrap: wrap;
+}
+.flex-btn .el-button.is-text{
+    margin-left: 0;
+}
+.flex-tags-size{
+    font-size: 12px;
+}
+.flex-tags-size span{
+    display: block;
+    margin-bottom: 5px;
+    color: #999;
+}
+</style>

+ 51 - 0
src/views/store/order/print/index.vue

@@ -0,0 +1,51 @@
+<template>
+    <el-container class="flex-column">
+        <div class="table-search">
+            <search @success="handleSuccess" status="3"></search>
+            <el-alert type="warning" show-icon title="栏目提醒" description="该栏目订单为自助打印失败数据,未开通自动打印商家该栏目不会有任何信息" :closable="false" style="margin-bottom: 10px;"></el-alert>
+            <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" status="3" name="已核销订单" :searchKey="searchKey"></optionBtn>
+        </div>
+        <el-main class="nopadding">
+            <div class="table-container">
+                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" status="3"></tablePage>
+            </div>
+        </el-main>
+    </el-container>  
+</template>
+
+<script>
+import search from './components/search';
+import optionBtn from './components/option';
+import tablePage from './components/table';
+export default {
+    components: {
+        search,tablePage,optionBtn
+    },
+    data(){
+        return {
+            searchKey:{
+                auto:3
+            },
+            dataSelect:[],
+            dataSelectFull:[],
+        }
+    },
+    methods: {
+        tableHandle(data){
+            this.dataSelect = data;
+        },
+        tableHandleFull(data){
+            this.dataSelectFull = data;
+        },
+        handleSuccess(data){
+            this.searchKey = data;
+            this.$refs.tablePage.upData(data)
+        },
+        handleClick(name){
+            this.activeName = name;
+            this.searchKey.type = name;
+            this.$refs.tablePage.upData(this.searchKey)
+        }
+    }
+}
+</script>