|
@@ -3,7 +3,7 @@
|
|
|
<x-crud class="liu-crud-wrap order-list-wrap" @load="onLoad">
|
|
<x-crud class="liu-crud-wrap order-list-wrap" @load="onLoad">
|
|
|
|
|
|
|
|
<template #slot-tabs>
|
|
<template #slot-tabs>
|
|
|
- <el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="handleClick">
|
|
|
|
|
|
|
+ <el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="changeTab">
|
|
|
<el-tab-pane
|
|
<el-tab-pane
|
|
|
v-for="(item, index) in tabsData"
|
|
v-for="(item, index) in tabsData"
|
|
|
:key="index"
|
|
:key="index"
|
|
@@ -55,9 +55,18 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-column-option="{scope}">
|
|
<template #slot-column-option="{scope}">
|
|
|
- <el-button @click.stop="changePrice(scope.row)" size="small" type="primary">改价入库</el-button>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-button size="small" v-if="scope.row.status == 5">改价入库</el-button>
|
|
|
|
|
+ <el-button @click.stop="changePrice(scope.row)" size="small" type="success" v-else-if="scope.row.status == 4">修改价格</el-button>
|
|
|
|
|
+ <el-button @click.stop="changePrice(scope.row)" size="small" type="primary" v-else>改价入库</el-button>
|
|
|
|
|
+
|
|
|
<el-button @click.stop="detailShowFn(scope.row)" size="small" type="success">详情</el-button>
|
|
<el-button @click.stop="detailShowFn(scope.row)" size="small" type="success">详情</el-button>
|
|
|
- <el-button @click.stop="detailShowFn(scope.row)" size="small" type="primary">取消</el-button>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-button size="small" v-if="scope.row.status == 5 || scope.row.status == 1">打小票</el-button>
|
|
|
|
|
+ <el-button @click.stop="printOrder(scope.row)" size="small" type="primary" v-else>打小票</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <el-button @click.stop="cancelOrder(scope.row)" size="small" type="primary" v-if="scope.row.status == 3 || scope.row.status == 2 || scope.row.status == 1">取消</el-button>
|
|
|
|
|
+ <el-button size="small" v-else>取消</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-new-cg>
|
|
<template #slot-new-cg>
|
|
@@ -143,13 +152,26 @@ export default {
|
|
|
query.backType = 'list'
|
|
query.backType = 'list'
|
|
|
this.$router.push({path:'/in/change',query})
|
|
this.$router.push({path:'/in/change',query})
|
|
|
},
|
|
},
|
|
|
|
|
+ printOrder(item){
|
|
|
|
|
+ this.$service.purchaseOrder.printBill({id:item.id}).then(data => {
|
|
|
|
|
+ this.$notify({ title: '已打小票', message: '操作成功', type: 'success'})
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ cancelOrder(item){
|
|
|
|
|
+ this.$confirm('确认取消?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
|
|
|
+ this.$service.purchaseOrder.cancelOrder({id:item.id}).then(data => {
|
|
|
|
|
+ this.$notify({ title: '已取消', message: '操作成功', type: 'success'})
|
|
|
|
|
+ this.app.refresh({ status: this.tabIndex})
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
detailShowFn(item) {
|
|
detailShowFn(item) {
|
|
|
this.optionData = item;
|
|
this.optionData = item;
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.$refs.orderDetail.init();
|
|
this.$refs.orderDetail.init();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleClick(tab, e) {
|
|
|
|
|
|
|
+ changeTab(tab, e) {
|
|
|
this.app.refresh({ status: this.tabIndex});
|
|
this.app.refresh({ status: this.tabIndex});
|
|
|
},
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
onLoad({ ctx, app }) {
|
|
@@ -164,7 +186,7 @@ export default {
|
|
|
prop: 'orderSn',
|
|
prop: 'orderSn',
|
|
|
label: '单号',
|
|
label: '单号',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: '160'
|
|
|
|
|
|
|
+ width: '130'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'supplierName',
|
|
prop: 'supplierName',
|
|
@@ -244,7 +266,7 @@ export default {
|
|
|
op: {
|
|
op: {
|
|
|
visible: true,
|
|
visible: true,
|
|
|
props: {
|
|
props: {
|
|
|
- width: 300,
|
|
|
|
|
|
|
+ width: 320,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
label: '操作'
|
|
label: '操作'
|