|
|
@@ -424,7 +424,7 @@ export default {
|
|
424
|
424
|
userId: this.$store.state.user.userInfo.userId,
|
|
425
|
425
|
})
|
|
426
|
426
|
this.formData = res.data
|
|
427
|
|
- this.formData.recycleTime = this.$dayjs(res.data.recycleTime).format('YYYY-MM-DD') || ''
|
|
|
427
|
+ this.formData.recycleTime = res.data.recycleTime ? this.$dayjs(res.data.recycleTime).format('YYYY-MM-DD') : ''
|
|
428
|
428
|
this.echoInfoType = res.data.type || '1'//商品分类回显
|
|
429
|
429
|
this.formData.type = res.data.type || '1'//商品分类校验
|
|
430
|
430
|
this.echoInfoProductAttribute = res.data.productAttribute || '1'//商品属性回显
|
|
|
@@ -439,14 +439,14 @@ export default {
|
|
439
|
439
|
this.echoInfoRecycleType = res.data.recycleType//回收类型回显
|
|
440
|
440
|
this.echoInfoRecycleSituation = res.data.recycleSituation || '0'//回收情况回显
|
|
441
|
441
|
this.echoInfoLabel = res.data.label//商品标签回显
|
|
442
|
|
- this.recognitionContent = `品牌:${res.data.dictLabel || '-'}
|
|
443
|
|
-来源:${res.data.origin || '-'}
|
|
444
|
|
-实价:${res.data.actualPrice || '-'}
|
|
445
|
|
-型号:${res.data.model || '-'}
|
|
446
|
|
-编码:${res.data.indentifyCode || '-'}
|
|
447
|
|
-日期:${res.data.cardYear || '-'}
|
|
448
|
|
-备注:${res.data.productDesc || '-'}
|
|
449
|
|
-付款方式:${this.paymentTabList.find(item => item.value == res.data.payType)?.name || '-'}
|
|
|
442
|
+ this.recognitionContent = `品牌:${res.data.dictLabel || ''}
|
|
|
443
|
+来源:${res.data.origin || ''}
|
|
|
444
|
+实价:${res.data.actualPrice || ''}
|
|
|
445
|
+型号:${res.data.model || ''}
|
|
|
446
|
+编码:${res.data.indentifyCode || ''}
|
|
|
447
|
+日期:${res.data.cardYear || ''}
|
|
|
448
|
+备注:${res.data.productDesc || ''}
|
|
|
449
|
+付款方式:${this.paymentTabList.find(item => item.value == res.data.payType)?.name || ''}
|
|
450
|
450
|
`
|
|
451
|
451
|
}
|
|
452
|
452
|
})
|
|
|
@@ -464,9 +464,13 @@ export default {
|
|
464
|
464
|
if (this.formData.actualPrice) {
|
|
465
|
465
|
const actualPrice = Number(this.formData.actualPrice)
|
|
466
|
466
|
let obj = {}
|
|
467
|
|
- // 只要账号权限里面有销售权限,就按照销售的计算规则,没有就固定计算
|
|
468
|
|
- if(getRoles().includes('SALESMAN')){
|
|
469
|
|
- obj = this.xhlSystemSetList.find(item => item.agentType == 'SALESMAN') || {}
|
|
|
467
|
+ // 查找包含SALEMAN字符的权限
|
|
|
468
|
+ const roles = getRoles()
|
|
|
469
|
+ const salesmanRole = roles.find(role => role.toUpperCase().includes('SALEMAN'))
|
|
|
470
|
+
|
|
|
471
|
+ // 只要账号权限里面有包含SALEMAN的权限,就按照对应权限的计算规则,没有就固定计算
|
|
|
472
|
+ if(salesmanRole){
|
|
|
473
|
+ obj = this.xhlSystemSetList.find(item => item.agentType == salesmanRole) || {}
|
|
470
|
474
|
}else{
|
|
471
|
475
|
obj = {
|
|
472
|
476
|
goodsRate: 0.003,
|