|
@@ -25,60 +25,87 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
submit () {
|
|
|
- if (this.data.status == '新建') {
|
|
|
- this.$confirm('确定进行提交操作吗?','提示',{
|
|
|
- confirmButtonText:'确定',
|
|
|
- cancelButtonText:'取消'
|
|
|
- }).then(async () => {
|
|
|
- let res = await this.$api.requested({
|
|
|
- "id": 20221121202802,
|
|
|
- "content": {
|
|
|
- "sa_contractids": [this.data.sa_contractid]
|
|
|
- },
|
|
|
- })
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
- this.$emit('onSuccess')
|
|
|
- })
|
|
|
- })
|
|
|
- } else {
|
|
|
- console.log(this.data,'审核数据')
|
|
|
- console.log(new Date(this.data.enddate))
|
|
|
- console.log(new Date())
|
|
|
- console.log(new Date() > new Date(this.data.enddate))
|
|
|
- if (new Date() > new Date(this.data.enddate)){
|
|
|
- this.$confirm('当前合同有效期已过期,是否确定继续审核?','提示',{
|
|
|
- confirmButtonText:'确定',
|
|
|
- cancelButtonText:'取消'
|
|
|
- }).then(async () => {
|
|
|
- let res = await this.$api.requested({
|
|
|
- "id": 20221121203102,
|
|
|
- "content": {
|
|
|
- "type":1,//0:不通过,1:通过
|
|
|
- "sa_contractid": this.data.sa_contractid
|
|
|
- },
|
|
|
+ this.$api.requested({
|
|
|
+ "id": "2024091910001802",
|
|
|
+ "content": {
|
|
|
+ "ownertable": "sa_contract", //sa_project,sa_contract,sa_quotedprice
|
|
|
+ "ownerid": this.$route.query.id
|
|
|
+ },
|
|
|
+ }).then(result => {
|
|
|
+ if (result.code) {
|
|
|
+ if (this.data.status == '新建') {
|
|
|
+ this.$confirm('确定进行提交操作吗?','提示',{
|
|
|
+ confirmButtonText:'确定',
|
|
|
+ cancelButtonText:'取消'
|
|
|
+ }).then(async () => {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": 20221121202802,
|
|
|
+ "content": {
|
|
|
+ "sa_contractids": [this.data.sa_contractid]
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
})
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
- this.$emit('onSuccess')
|
|
|
- })
|
|
|
- })
|
|
|
- }else {
|
|
|
- this.$confirm('确定进行审核操作吗?','提示',{
|
|
|
+ } else {
|
|
|
+ console.log(this.data,'审核数据')
|
|
|
+ console.log(new Date(this.data.enddate))
|
|
|
+ console.log(new Date())
|
|
|
+ console.log(new Date() > new Date(this.data.enddate))
|
|
|
+ if (new Date() > new Date(this.data.enddate)){
|
|
|
+ this.$confirm('当前合同有效期已过期,是否确定继续审核?','提示',{
|
|
|
+ confirmButtonText:'确定',
|
|
|
+ cancelButtonText:'取消'
|
|
|
+ }).then(async () => {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": 20221121203102,
|
|
|
+ "content": {
|
|
|
+ "type":1,//0:不通过,1:通过
|
|
|
+ "sa_contractid": this.data.sa_contractid
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$confirm('确定进行审核操作吗?','提示',{
|
|
|
+ confirmButtonText:'确定',
|
|
|
+ cancelButtonText:'取消'
|
|
|
+ }).then(async () => {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": 20221121203102,
|
|
|
+ "content": {
|
|
|
+ "type":1,//0:不通过,1:通过
|
|
|
+ "sa_contractid": this.data.sa_contractid
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$confirm('产品中存在未通过的成品配置,是否立即提醒产品经理评审?','提示',{
|
|
|
confirmButtonText:'确定',
|
|
|
- cancelButtonText:'取消'
|
|
|
+ cancelButtonText:'取消',
|
|
|
+ type: 'warning'
|
|
|
}).then(async () => {
|
|
|
let res = await this.$api.requested({
|
|
|
- "id": 20221121203102,
|
|
|
+ "id": 2024091910214302,
|
|
|
"content": {
|
|
|
- "type":1,//0:不通过,1:通过
|
|
|
- "sa_contractid": this.data.sa_contractid
|
|
|
+ "ownertable": 'sa_contract',
|
|
|
+ "ownerid": this.$route.query.id
|
|
|
},
|
|
|
})
|
|
|
this.tool.showMessage(res,() => {
|
|
|
- this.$emit('onSuccess')
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
},
|
|
|
};
|