|
@@ -67,9 +67,11 @@ export default {
|
|
|
name: "index",
|
|
|
data(){
|
|
|
return {
|
|
|
- mainData:{
|
|
|
+ mainData:[],
|
|
|
+ disabledFlag:{
|
|
|
disabled:true,
|
|
|
},
|
|
|
+ mainDataNew:[],
|
|
|
mainAreaData:[],
|
|
|
disabled:false,
|
|
|
flag:false,
|
|
@@ -106,7 +108,7 @@ export default {
|
|
|
if (this.mainData.leader.length !== 0){
|
|
|
if (JSON.parse(window.sessionStorage.getItem('active_account')).userid === this.mainData.leader[0].userid){
|
|
|
|
|
|
- this.mainData.disabled = true
|
|
|
+ this.disabledFlag.disabled = true
|
|
|
}else {
|
|
|
let flag = 0
|
|
|
for (var i=0;i<res.data[0].team.length;i++){
|
|
@@ -122,10 +124,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
/*不是负责人*/
|
|
|
- flag === 0?this.mainData.disabled = false:this.mainData.disabled = true
|
|
|
+ flag === 0?this.disabledFlag.disabled = false:this.disabledFlag.disabled = true
|
|
|
}
|
|
|
}
|
|
|
- console.log("权限结果",this.mainData.disabled)
|
|
|
+ console.log("权限结果",this.disabledFlag.disabled)
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -133,14 +135,15 @@ export default {
|
|
|
this.$refs.details.$refs.group.queryGroup()
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20221020165203,
|
|
|
- "version":1,
|
|
|
"content": {
|
|
|
nocache:true,
|
|
|
- "sa_quotedpriceid":id
|
|
|
+ "sa_quotedpriceid":this.$route.query.id
|
|
|
}
|
|
|
})
|
|
|
/*this.mainData = res.data*/
|
|
|
- this.mainData = Object.assign({},this.mainData,res.data)
|
|
|
+ this.mainData = res.data
|
|
|
+ this.mainDataNew = res.data
|
|
|
+ this.mainData = Object.assign({},this.mainData,this.disabledFlag)
|
|
|
this.productList()
|
|
|
/*this.$refs.productList.productData()*/
|
|
|
this.$nextTick(()=>{
|
|
@@ -196,17 +199,17 @@ export default {
|
|
|
value:this.mainData.contactsphonenumber
|
|
|
},
|
|
|
{
|
|
|
- label:'折扣(%)',
|
|
|
+ label:'整单折扣(%)',
|
|
|
value:this.mainData.discountrate !== 0?Math.round((this.mainData.discountrate * 100)*100)/100:'--'
|
|
|
},
|
|
|
{
|
|
|
label:'总金额(元)',
|
|
|
- value:this.totalPrice ? this.tool.formatAmount(this.totalPrice,2) : '--'
|
|
|
+ value:this.mainData.sumamount ? this.tool.formatAmount(this.mainData.sumamount,2) : '--'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
label:'是否特价',
|
|
|
- value:this.mainData.specialoffer === 1?'是':'否'
|
|
|
+ value:this.mainDataNew.specialoffer?'是':'否'
|
|
|
},
|
|
|
{
|
|
|
label:'状态',
|
|
@@ -261,12 +264,12 @@ export default {
|
|
|
value:this.mainData.contactsphonenumber
|
|
|
},
|
|
|
{
|
|
|
- label:'折扣(%)',
|
|
|
+ label:'整单折扣(%)',
|
|
|
value:this.mainData.discountrate !== 0?Math.round((this.mainData.discountrate * 100)*100)/100:'--'
|
|
|
},
|
|
|
{
|
|
|
label:'总金额(元)',
|
|
|
- value:this.totalPrice ? this.tool.formatAmount(this.totalPrice,2) : '--'
|
|
|
+ value:this.mainData.sumamount ? this.tool.formatAmount(this.mainData.sumamount,2) : '--'
|
|
|
},
|
|
|
|
|
|
{
|
|
@@ -305,21 +308,15 @@ export default {
|
|
|
/*产品配置信息*/
|
|
|
async productList(){
|
|
|
const res = await this.$api.requested({
|
|
|
- "id": 20221021095503,
|
|
|
+ "id": 20221020165203,
|
|
|
"content": {
|
|
|
- "sa_quotedpriceid":this.$route.query.id //sat_notice_classid<=0时 为新增
|
|
|
- }
|
|
|
- })
|
|
|
- this.totalPrice = 0
|
|
|
- this.mainData.specialoffer = 0
|
|
|
- res.data.forEach((item)=> {
|
|
|
- if (item.discountDifferenceAmount < 0){
|
|
|
- this.mainData.specialoffer = 1
|
|
|
+ nocache:true,
|
|
|
+ "sa_quotedpriceid":this.$route.query.id
|
|
|
}
|
|
|
- this.totalPrice = this.totalPrice + item.amount
|
|
|
})
|
|
|
- /*this.queryMainData(this.$route.query.id)*/
|
|
|
- this.totalPrice = Math.round(this.totalPrice * 100) / 100
|
|
|
+ this.mainData = res.data
|
|
|
+ this.mainDataNew = res.data
|
|
|
+ this.mainData = Object.assign({},this.mainData,this.disabledFlag)
|
|
|
this.changeDataStructure()
|
|
|
},
|
|
|
onSuccess(){
|
|
@@ -327,7 +324,6 @@ export default {
|
|
|
|
|
|
},
|
|
|
productSuccess(){
|
|
|
- /*this.queryMainData(this.$route.query.id)*/
|
|
|
this.productList()
|
|
|
}
|
|
|
|