|
@@ -19,35 +19,32 @@
|
|
|
</el-popover>
|
|
</el-popover>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template #table-column-switch="{scope}">
|
|
|
|
|
- <span v-if="scope.row.switch==0"></span>
|
|
|
|
|
|
|
+ <template #table-column-switchOrder="{scope}">
|
|
|
|
|
+ <span v-if="scope.row.switchOrder==0"></span>
|
|
|
<span v-else>
|
|
<span v-else>
|
|
|
<i class="el-icon-success" style="color:green;font-size:18px;"></i>
|
|
<i class="el-icon-success" style="color:green;font-size:18px;"></i>
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-column-option="{scope}">
|
|
<template #slot-column-option="{scope}">
|
|
|
|
|
+
|
|
|
<el-button @click.stop="detailShowFn(scope.row)" size="small" type="success" v-if="scope.row.status != 1 && scope.row.status != 5">详情</el-button>
|
|
<el-button @click.stop="detailShowFn(scope.row)" size="small" type="success" v-if="scope.row.status != 1 && scope.row.status != 5">详情</el-button>
|
|
|
<el-button v-else size="small" @click.stop="detailShowFn(scope.row)">详情</el-button>
|
|
<el-button v-else size="small" @click.stop="detailShowFn(scope.row)">详情</el-button>
|
|
|
|
|
|
|
|
- <el-button v-if="scope.row.status != 1 && scope.row.status != 5" @click.stop="printOrder(scope.row)" size="small" type="primary">打A4</el-button>
|
|
|
|
|
- <el-button v-else size="small">打A4</el-button>
|
|
|
|
|
|
|
+ <el-button v-if="scope.row.status != 1 && scope.row.status != 5" @click.stop="printOrder(scope.row)" size="small" type="primary" style="margin-left:30px;">打A4</el-button>
|
|
|
|
|
+ <el-button v-else size="small" style="margin-left:30px;">打A4</el-button>
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-search-option="{scope}">
|
|
<template #slot-search-option="{scope}">
|
|
|
- <el-input v-model="name" placeholder="客户名称 / 订单号" size="mini" style="width:140px;" :clearable="true" ref="orderSearchRef" @input="changeSearch()" @focus="name=''"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="searchContent" placeholder="花材名称" size="mini" style="width:140px;" :clearable="true" ref="orderSearchRef" @input="changeSearch()" @focus="searchContent=''"></el-input>
|
|
|
<el-select size="mini" v-model="currentKdStaffName" placeholder="开单人" style="width:110px;margin-left:8px;" @change="getKdStaff" :clearable="true">
|
|
<el-select size="mini" v-model="currentKdStaffName" placeholder="开单人" style="width:110px;margin-left:8px;" @change="getKdStaff" :clearable="true">
|
|
|
<el-option v-for="item in staffList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
<el-option v-for="item in staffList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- <span style="margin-left:9px;font-size:18px;">时间:</span>
|
|
|
|
|
|
|
+ <span style="margin-left:9px;font-size:18px;">创建时间:</span>
|
|
|
<el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
|
|
<el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
|
|
|
class="custom-date-picker" end-placeholder="结束日期" :picker-options="pickerOptions" size="mini" style="margin-right:8px;">
|
|
class="custom-date-picker" end-placeholder="结束日期" :picker-options="pickerOptions" size="mini" style="margin-right:8px;">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
- <el-radio-group v-model="book" @change="changeBook" style="margin-right:20px;padding-top:6px;margin-left:4px;">
|
|
|
|
|
- <el-radio label="-1">全部</el-radio>
|
|
|
|
|
- <el-radio label="0">常规订单</el-radio>
|
|
|
|
|
- <el-radio label="1">预订单</el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-export-order>
|
|
<template #slot-export-order>
|
|
@@ -76,27 +73,17 @@ export default {
|
|
|
{
|
|
{
|
|
|
text: '全部订单',
|
|
text: '全部订单',
|
|
|
key: '0',
|
|
key: '0',
|
|
|
- val: 0
|
|
|
|
|
|
|
+ val: -1
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- text: '待付款',
|
|
|
|
|
|
|
+ text: '未转订单',
|
|
|
key: '1',
|
|
key: '1',
|
|
|
val: 0
|
|
val: 0
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- text: '待发货',
|
|
|
|
|
|
|
+ text: '已转订单',
|
|
|
key: '2',
|
|
key: '2',
|
|
|
- val: 0
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- text: '待收货',
|
|
|
|
|
- key: '3',
|
|
|
|
|
- val: 0
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- text: '已完成',
|
|
|
|
|
- key: '4',
|
|
|
|
|
- val: 0
|
|
|
|
|
|
|
+ val: 1
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
optionData: {},
|
|
optionData: {},
|
|
@@ -106,7 +93,7 @@ export default {
|
|
|
simpleData:{},
|
|
simpleData:{},
|
|
|
staffData:{title:'',changeType:'',obj:null},
|
|
staffData:{title:'',changeType:'',obj:null},
|
|
|
orderData:'',
|
|
orderData:'',
|
|
|
- book:"-1",
|
|
|
|
|
|
|
+ switchOrder:"-1",
|
|
|
currentDateList:[],
|
|
currentDateList:[],
|
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
|
shortcuts: [{
|
|
shortcuts: [{
|
|
@@ -138,7 +125,7 @@ export default {
|
|
|
startTime:'',
|
|
startTime:'',
|
|
|
endTime:'',
|
|
endTime:'',
|
|
|
searchTime:'',
|
|
searchTime:'',
|
|
|
- name:'',
|
|
|
|
|
|
|
+ searchContent:'',
|
|
|
currentRefundData:{},
|
|
currentRefundData:{},
|
|
|
refundRecordData:{},
|
|
refundRecordData:{},
|
|
|
currentKdStaffName:'',
|
|
currentKdStaffName:'',
|
|
@@ -169,71 +156,6 @@ export default {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
that.$refs.orderSearchRef.focus()
|
|
that.$refs.orderSearchRef.focus()
|
|
|
},1000)
|
|
},1000)
|
|
|
- },
|
|
|
|
|
- getStaff(staff){
|
|
|
|
|
- let that = this
|
|
|
|
|
- if(this.staffData.changeType == 'changeSend'){
|
|
|
|
|
- let order = this.staffData.obj
|
|
|
|
|
- this.$service.order.changeSendStaff({orderId:order.id,staffId:staff.id}).then(res=>{
|
|
|
|
|
- this.$message.success('修改成功')
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- that.refreshData()
|
|
|
|
|
- }, 1000)
|
|
|
|
|
- })
|
|
|
|
|
- return true
|
|
|
|
|
- }
|
|
|
|
|
- if(this.staffData.changeType == 'changeKd'){
|
|
|
|
|
- this.$message.error('开发中')
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- changeSendStaff(order){
|
|
|
|
|
- this.staffData = {title:'修改送货员',changeType:'changeSend',obj:order}
|
|
|
|
|
- this.$refs.selectStaffRef.init()
|
|
|
|
|
- },
|
|
|
|
|
- changeKdStaff(order){
|
|
|
|
|
- this.staffData = {title:'修改开单人',changeType:'changeKd',obj:order}
|
|
|
|
|
- this.$refs.selectStaffRef.init()
|
|
|
|
|
- },
|
|
|
|
|
- goRefund(data){
|
|
|
|
|
- this.currentRefundData = data
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.beginRefundRef.init()
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- getStockDetail(info){
|
|
|
|
|
- this.itemData = {id:info.productId,name:info.name,direction:'rtl'}
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.stockDetail.init()
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- getCostChange(info){
|
|
|
|
|
- this.costData = {id:info.productId,name:info.name,direction:'rtl'}
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.costChangeRef.init()
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- openLoan(param,orderId){
|
|
|
|
|
- this.$service.bookItemCustom.getInfo({orderId:orderId,productId:param.productId}).then(data=>{
|
|
|
|
|
- let info = data.res
|
|
|
|
|
- this.loanData = {customId:info.customId,customName:info.customName,id:info.id,itemName:info.name,itemId:info.itemId,direction:'rtl',orderId:orderId}
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.loanItemRef.init()
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- addNewItem(data){
|
|
|
|
|
- this.simpleData = data
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.simpleItemRef.init()
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- //预订单的确认发货
|
|
|
|
|
- confirmArrival(info){
|
|
|
|
|
- this.arrivalData = {id:info.id}
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.arrivalRef.init();
|
|
|
|
|
- })
|
|
|
|
|
},
|
|
},
|
|
|
changeSearch(){
|
|
changeSearch(){
|
|
|
let that = this
|
|
let that = this
|
|
@@ -241,12 +163,12 @@ export default {
|
|
|
clearTimeout(this.T)
|
|
clearTimeout(this.T)
|
|
|
}
|
|
}
|
|
|
this.T = setTimeout(function(){
|
|
this.T = setTimeout(function(){
|
|
|
- that.app.refresh({ status: that.tabIndex,book:that.book,searchTime:that.searchTime,startTime:that.startTime,endTime:that.endTime,name:that.name,shopAdminId:this.currentKdStaffId })
|
|
|
|
|
|
|
+ that.refreshData()
|
|
|
},650)
|
|
},650)
|
|
|
},
|
|
},
|
|
|
- changeBook(e){
|
|
|
|
|
- this.book = e
|
|
|
|
|
- this.app.refresh({ status: this.tabIndex,book:this.book,name:this.name,shopAdminId:this.currentKdStaffId });
|
|
|
|
|
|
|
+ changeSwitchOrder(e){
|
|
|
|
|
+ this.switchOrder = e
|
|
|
|
|
+ this.refreshData()
|
|
|
},
|
|
},
|
|
|
getSearchDate(){
|
|
getSearchDate(){
|
|
|
if (this.$util.isEmpty(this.currentDateList)) {
|
|
if (this.$util.isEmpty(this.currentDateList)) {
|
|
@@ -258,10 +180,10 @@ export default {
|
|
|
this.startTime = this.currentDateList[0]
|
|
this.startTime = this.currentDateList[0]
|
|
|
this.endTime = this.currentDateList[1]
|
|
this.endTime = this.currentDateList[1]
|
|
|
}
|
|
}
|
|
|
- this.app.refresh({ status: this.tabIndex,book:this.book,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.name,shopAdminId:this.currentKdStaffId})
|
|
|
|
|
|
|
+ this.refreshData()
|
|
|
},
|
|
},
|
|
|
refreshData(){
|
|
refreshData(){
|
|
|
- this.app.refresh({ status: this.tabIndex,book:this.book,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.name,shopAdminId:this.currentKdStaffId})
|
|
|
|
|
|
|
+ this.app.refresh({switchOrder:this.switchOrder,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,searchContent:this.searchContent,staffId:this.currentKdStaffId})
|
|
|
},
|
|
},
|
|
|
init() {
|
|
init() {
|
|
|
this.$store.dispatch('getUsage');
|
|
this.$store.dispatch('getUsage');
|
|
@@ -274,11 +196,10 @@ export default {
|
|
|
hiprint.init();
|
|
hiprint.init();
|
|
|
var hiprintTemplate = new hiprint.PrintTemplate({template:template});
|
|
var hiprintTemplate = new hiprint.PrintTemplate({template:template});
|
|
|
hiprintTemplate.print(printData)
|
|
hiprintTemplate.print(printData)
|
|
|
- //增加打印次数
|
|
|
|
|
this.$service.order.addPrintNum({id:info.id}).then(data => {
|
|
this.$service.order.addPrintNum({id:info.id}).then(data => {
|
|
|
- this.app.refresh({ status: this.tabIndex,book:this.book,name:this.name })
|
|
|
|
|
|
|
+ this.refreshData()
|
|
|
})
|
|
})
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
shipDrawFn(item) {
|
|
shipDrawFn(item) {
|
|
|
this.optionData = item;
|
|
this.optionData = item;
|
|
@@ -297,32 +218,22 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
handleClick(tab, e) {
|
|
handleClick(tab, e) {
|
|
|
- this.app.refresh({ status: this.tabIndex,book:this.book,name:this.name });
|
|
|
|
|
|
|
+ if(Number(this.tabIndex) == 0){
|
|
|
|
|
+ this.switchOrder = -1
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number(this.tabIndex) == 1){
|
|
|
|
|
+ this.switchOrder = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number(this.tabIndex) == 2){
|
|
|
|
|
+ this.switchOrder = 1
|
|
|
|
|
+ }
|
|
|
|
|
+ this.refreshData()
|
|
|
},
|
|
},
|
|
|
exportData(){
|
|
exportData(){
|
|
|
- this.$service.order.getOrderList({status: this.tabIndex,book:this.book,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,pageSize:9999999,export:1,name:this.name,shopAdminId:this.currentKdStaffId}).then(res => {
|
|
|
|
|
- if(res.file){
|
|
|
|
|
- window.location.href = res.file
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$message.error('开发中')
|
|
|
},
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
this.app = app;
|
|
|
- if(this.$route.query.status){
|
|
|
|
|
- this.tabIndex = this.$route.query.status
|
|
|
|
|
- }
|
|
|
|
|
- if(this.$route.query.customName){
|
|
|
|
|
- this.name = this.$route.query.customName
|
|
|
|
|
- }
|
|
|
|
|
- if(this.$route.query.searchTime){
|
|
|
|
|
- this.searchTime = this.$route.query.searchTime
|
|
|
|
|
- }
|
|
|
|
|
- if(this.$route.query.startTime){
|
|
|
|
|
- this.startTime = this.$route.query.startTime
|
|
|
|
|
- }
|
|
|
|
|
- if(this.$route.query.endTime){
|
|
|
|
|
- this.endTime = this.$route.query.endTime
|
|
|
|
|
- }
|
|
|
|
|
ctx.service(this.$service.liveOrder)
|
|
ctx.service(this.$service.liveOrder)
|
|
|
.set('table', {
|
|
.set('table', {
|
|
|
columns: [
|
|
columns: [
|
|
@@ -362,11 +273,17 @@ export default {
|
|
|
width: '100'
|
|
width: '100'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'switch',
|
|
|
|
|
|
|
+ prop: 'switchOrder',
|
|
|
label: '已转订单',
|
|
label: '已转订单',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
width: '100'
|
|
width: '100'
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'staffName',
|
|
|
|
|
+ label: '开单人',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ width: '100'
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
prop: 'addTime',
|
|
prop: 'addTime',
|
|
|
label: '创建时间',
|
|
label: '创建时间',
|
|
@@ -396,7 +313,7 @@ export default {
|
|
|
op: {
|
|
op: {
|
|
|
visible: true,
|
|
visible: true,
|
|
|
props: {
|
|
props: {
|
|
|
- width: 600,
|
|
|
|
|
|
|
+ width: 400,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
label: '操作'
|
|
label: '操作'
|
|
@@ -411,16 +328,14 @@ export default {
|
|
|
['flex1', 'pagination']
|
|
['flex1', 'pagination']
|
|
|
])
|
|
])
|
|
|
.on('refresh', async (params, { next }) => {
|
|
.on('refresh', async (params, { next }) => {
|
|
|
- this.name = params.name?params.name:''
|
|
|
|
|
|
|
+ this.searchContent = params.searchContent?params.searchContent:''
|
|
|
let asset = await next(params);
|
|
let asset = await next(params);
|
|
|
- this.tabsData[0].val = asset.shop.totalOrder||0;
|
|
|
|
|
- this.tabsData[1].val = asset.shop.unPayOrder||0;
|
|
|
|
|
- this.tabsData[2].val = asset.shop.unSendOrder||0;
|
|
|
|
|
- this.tabsData[3].val = asset.shop.sendingOrder||0;
|
|
|
|
|
- this.tabsData[4].val = asset.shop.finishOrder||0;
|
|
|
|
|
|
|
+ this.tabsData[0].val = 0
|
|
|
|
|
+ this.tabsData[1].val = 0
|
|
|
|
|
+ this.tabsData[2].val = 0
|
|
|
})
|
|
})
|
|
|
- .done();
|
|
|
|
|
- app.refresh({ status: this.tabIndex,book:this.book,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.name,shopAdminId:this.currentKdStaffId })
|
|
|
|
|
|
|
+ .done()
|
|
|
|
|
+ this.refreshData()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -429,15 +344,6 @@ export default {
|
|
|
.custom-date-picker{
|
|
.custom-date-picker{
|
|
|
width:230px;
|
|
width:230px;
|
|
|
}
|
|
}
|
|
|
-.book-wrap {
|
|
|
|
|
- @include disFlex(center, flex-start);
|
|
|
|
|
- & > div {
|
|
|
|
|
- margin-left: 6px;
|
|
|
|
|
- &:first-child {
|
|
|
|
|
- margin-left: 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
.print-html-box {
|
|
.print-html-box {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
left: 0;
|
|
left: 0;
|