|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <basic-container v-show="isShow">
|
|
|
+ <basic-container v-show="isShow" v-loading="loadingfalse">
|
|
|
<avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
|
|
|
:table-loading="loading" @row-del="rowDel" @row-update="rowUpdate" :before-open="beforeOpen"
|
|
|
:before-close="beforeClose" @row-save="rowSave" @search-change="searchChange"
|
|
@@ -60,7 +60,7 @@
|
|
|
<!-- </el-button>-->
|
|
|
<el-button
|
|
|
type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
+ icon="el-icon-s-promotion"
|
|
|
size="small"
|
|
|
:disabled="scope.row.deliveryStatus !== '录入'"
|
|
|
@click.stop="sendInGoods(scope.row, scope.index)">确认发货
|
|
@@ -72,6 +72,14 @@
|
|
|
:disabled="scope.row.deliveryStatus === '已发货'"
|
|
|
@click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.voucherStatus == '0' && scope.row.deliveryStatus === '已发货' && saberTenantId.content == 681169"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-tickets"
|
|
|
+ size="small"
|
|
|
+ style="color: red"
|
|
|
+ @click.stop="pingzhengfun(scope.row, scope.index)">凭证
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -82,7 +90,7 @@
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/mainList.json";
|
|
|
-import {customerList, typeSave, deleteDetails, sendInGoods} from "@/api/basicData/receipt"
|
|
|
+import {customerList, typeSave, deleteDetails, sendInGoods, pingzheng} from "@/api/basicData/receipt"
|
|
|
import detailPage from "./detailsPageEdit";
|
|
|
import {defaultDate} from "@/util/date";
|
|
|
import {gainUser} from "@/api/basicData/customerInquiry";
|
|
@@ -95,6 +103,11 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 租户号
|
|
|
+ saberTenantId:'',
|
|
|
+ // 加载动画
|
|
|
+ loadingfalse:false,
|
|
|
+
|
|
|
configuration: {
|
|
|
multipleChoices: false,
|
|
|
multiple: false,
|
|
@@ -133,6 +146,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
|
+ // 获取租户信息
|
|
|
+ this.saberTenantId = JSON.parse(localStorage.getItem('saber-tenantId'))
|
|
|
// this.search.businessDate = defaultDate(1)
|
|
|
this.search.createTime = defaultDate(3)
|
|
|
// this.option = option
|
|
@@ -202,6 +217,24 @@ export default {
|
|
|
}, 100);
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 点击凭证按钮触发
|
|
|
+ pingzhengfun(row){
|
|
|
+ this.$confirm('是否要生成凭证?', '提示', {
|
|
|
+ confirmButtonText: '是',
|
|
|
+ cancelButtonText: '否',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.loadingfalse = true
|
|
|
+ pingzheng({
|
|
|
+ id:row.id
|
|
|
+ }).then(res=>{
|
|
|
+ this.$message.success(res.data.msg);
|
|
|
+ this.loadingfalse = false
|
|
|
+ this.onLoad(this.page, this.search)
|
|
|
+ })
|
|
|
+ }).catch(() => {});
|
|
|
+
|
|
|
+ },
|
|
|
cellStyle() {
|
|
|
return "padding:0;height:40px;";
|
|
|
},
|