|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-list-content">
|
|
|
<x-crud class="liu-crud-wrap order-list-wrap" @load="onLoad">
|
|
|
- <!-- tabs -->
|
|
|
+
|
|
|
<template #slot-tabs>
|
|
|
<el-tabs class="liu-tabs" type="border-card" v-model="tabIndex">
|
|
|
<el-tab-pane
|
|
|
@@ -13,36 +13,35 @@
|
|
|
</el-tabs>
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
<template #slot-search-date="{scope}">
|
|
|
<el-date-picker v-model="searchDate" @change="changeDate()" value-format="yyyy-MM-dd" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
|
|
|
</el-date-picker>
|
|
|
</template>
|
|
|
|
|
|
- <!-- 添加商品 -->
|
|
|
<template #slot-option-area-list>
|
|
|
-
|
|
|
- <el-popover style="margin-left:40px;" placement="top" width="160" ref="directPrintRef">
|
|
|
+ <el-popover style="margin-left:40px;" placement="top" width="160" ref="openCloseBookRef">
|
|
|
<p>确认{{ shop.bookSn==0?'开启':'结束' }}?</p>
|
|
|
<div style="text-align: right; margin: 0">
|
|
|
- <el-button size="mini" type="text" @click.stop="">取消</el-button>
|
|
|
- <el-button type="primary" size="mini" @click.stop="">确定</el-button>
|
|
|
+ <el-button size="mini" type="text" @click.stop="cancelBook">取消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click.stop="changeBook(shop.bookSn)">确定</el-button>
|
|
|
</div>
|
|
|
<el-button slot="reference" type="primary">{{ shop.bookSn==0?'开启预订':'结束预订' }}</el-button>
|
|
|
</el-popover>
|
|
|
-
|
|
|
<el-button type="primary" size="mini" @click="" style="margin-left:40px;">我的采购</el-button>
|
|
|
- <el-button type="primary" size="mini" @click="" style="margin-left:40px;">去采购</el-button>
|
|
|
-
|
|
|
+ <el-button type="primary" size="mini" @click="" style="margin-left:40px;">去采购</el-button>
|
|
|
</template>
|
|
|
|
|
|
- <template #table-column-remainStockNumt="{scope}">
|
|
|
+ <template #table-column-remainStockNum="{scope}">
|
|
|
<span v-if="Number(scope.row.remainStockNum)>0 && (Number(scope.row.bookNum)-Number(scope.row.onNum))>0" style="color:blue;font-weight:bold;">
|
|
|
{{scope.row.remainStockNum?parseFloat(scope.row.remainStockNum):0}}
|
|
|
</span>
|
|
|
<span v-else>{{scope.row.remainStockNum?parseFloat(scope.row.remainStockNum):0}}</span>
|
|
|
</template>
|
|
|
|
|
|
+ <template #slot-column-option="{scope}">
|
|
|
+ <el-button @click.stop="goDetail(scope.row)" size="medium" type="primary">查看明细</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
</x-crud>
|
|
|
|
|
|
</div>
|
|
|
@@ -111,8 +110,20 @@ export default {
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
- cancelLittlePrint(){
|
|
|
- this.$refs['littlePrintRef'].doClose()
|
|
|
+ goDetail(info){
|
|
|
+ let query = {itemId:info.itemId,itemName:info.name}
|
|
|
+ this.$router.push({path:'/book/itemCustom',query})
|
|
|
+ },
|
|
|
+ cancelBook(){
|
|
|
+ this.$refs['openCloseBookRef'].doClose()
|
|
|
+ },
|
|
|
+ changeBook(bookSn){
|
|
|
+ this.$refs['openCloseBookRef'].doClose()
|
|
|
+ let status = bookSn == 0 ? 1 : 0
|
|
|
+ return this.$service.book.changeBook({status:status}).then((res) => {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.app.refresh({ status: this.tabIndex})
|
|
|
+ })
|
|
|
},
|
|
|
init(){
|
|
|
|
|
|
@@ -131,7 +142,7 @@ export default {
|
|
|
this.searchTime = 'custom'
|
|
|
this.startDate = startDate
|
|
|
this.endDate = endDate
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:startDate,endTime:endDate});
|
|
|
+ this.app.refresh({ status: this.tabIndex})
|
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
|
@@ -182,8 +193,8 @@ export default {
|
|
|
op: {
|
|
|
visible: true,
|
|
|
props: {
|
|
|
- width: 300,
|
|
|
- align: 'center',
|
|
|
+ width: 500,
|
|
|
+ align: 'left',
|
|
|
fixed: 'right',
|
|
|
label: '操作'
|
|
|
},
|
|
|
@@ -201,7 +212,7 @@ export default {
|
|
|
this.printData = respond.printData
|
|
|
})
|
|
|
.done();
|
|
|
- app.refresh({ status: this.tabIndex,searchTime:this.searchTime});
|
|
|
+ app.refresh({ status: this.tabIndex});
|
|
|
}
|
|
|
}
|
|
|
};
|