|
@@ -298,6 +298,8 @@ export default {
|
|
|
isusedrebate: "",
|
|
|
checked: 0,
|
|
|
rebateamount: "",
|
|
|
+ typeNew:'',
|
|
|
+ fullscreenLoading:false
|
|
|
};
|
|
|
},
|
|
|
provide() {
|
|
@@ -320,28 +322,43 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async queryMainData(id) {
|
|
|
- return new Promise(async (re, rj) => {
|
|
|
+ if (this.typeNew == '提交'){
|
|
|
const res = await this.$api.requested({
|
|
|
- id: "20221108151302",
|
|
|
+ id: type === "审核" ? 20221108153502 : 20221108153402,
|
|
|
content: {
|
|
|
- nocache: true,
|
|
|
- sa_orderid: this.$route.query.id,
|
|
|
+ sa_orderid: this.mainData.sa_orderid,
|
|
|
+ sys_enterpriseid: this.mainData.sys_enterpriseid,
|
|
|
+ sa_accountclassid: this.mainData.accountclass.sa_accountclassid,
|
|
|
},
|
|
|
});
|
|
|
- this.mainData = res.data;
|
|
|
- this.checked = this.mainData.rebate_used;
|
|
|
- if (this.mainData.rebateamount > this.mainData.defaultamount) {
|
|
|
- this.rebateamount = this.tool.formatAmount(
|
|
|
- +this.mainData.defaultamount / 2
|
|
|
- );
|
|
|
- } else {
|
|
|
- this.rebateamount = this.mainData.rebateamount;
|
|
|
- }
|
|
|
- this.changeDataStructure();
|
|
|
- this.queryUsedrebate();
|
|
|
+ this.tool.showMessage(res, async () => {
|
|
|
+ this.typeNew = ''
|
|
|
+ this.queryMainData();
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ return new Promise(async (re, rj) => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ id: "20221108151302",
|
|
|
+ content: {
|
|
|
+ nocache: true,
|
|
|
+ sa_orderid: this.$route.query.id,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.mainData = res.data;
|
|
|
+ this.checked = this.mainData.rebate_used;
|
|
|
+ if (this.mainData.rebateamount > this.mainData.defaultamount) {
|
|
|
+ this.rebateamount = this.tool.formatAmount(
|
|
|
+ +this.mainData.defaultamount / 2
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.rebateamount = this.mainData.rebateamount;
|
|
|
+ }
|
|
|
+ this.changeDataStructure();
|
|
|
+ this.queryUsedrebate();
|
|
|
|
|
|
- re();
|
|
|
- });
|
|
|
+ re();
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
changeDataStructure() {
|
|
|
let that = this;
|
|
@@ -540,17 +557,21 @@ export default {
|
|
|
}
|
|
|
)
|
|
|
.then(async () => {
|
|
|
- const res = await this.$api.requested({
|
|
|
- id: type === "审核" ? 20221108153502 : 20221108153402,
|
|
|
- content: {
|
|
|
- sa_orderid: this.mainData.sa_orderid,
|
|
|
- sys_enterpriseid: this.mainData.sys_enterpriseid,
|
|
|
- sa_accountclassid: this.mainData.accountclass.sa_accountclassid,
|
|
|
- },
|
|
|
- });
|
|
|
- this.tool.showMessage(res, async () => {
|
|
|
- this.queryMainData();
|
|
|
- });
|
|
|
+ if (this.$refs.prod.time == null){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ id: type === "审核" ? 20221108153502 : 20221108153402,
|
|
|
+ content: {
|
|
|
+ sa_orderid: this.mainData.sa_orderid,
|
|
|
+ sys_enterpriseid: this.mainData.sys_enterpriseid,
|
|
|
+ sa_accountclassid: this.mainData.accountclass.sa_accountclassid,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.tool.showMessage(res, async () => {
|
|
|
+ this.queryMainData();
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ this.typeNew = type
|
|
|
+ }
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.$message({
|