|
@@ -143,9 +143,11 @@
|
|
|
<div>容重(g/L)</div>
|
|
|
<div>价格(元/公斤)</div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="right">
|
|
|
- <div class="line"></div>
|
|
|
- <div class="jt-style"></div>
|
|
|
+ <div class="jt-style1"></div>
|
|
|
+ <div class="line1"></div>
|
|
|
+
|
|
|
<div v-for="(item1,index) in priceRZObj.detailList" :key="index">
|
|
|
<div class="item-style" v-if="item1.isShow">
|
|
|
<div v-if="item1.type!=4" class="item-style-title">
|
|
@@ -1219,7 +1221,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- //以容重定价
|
|
|
return true
|
|
|
}
|
|
|
|
|
@@ -1246,7 +1247,6 @@ export default {
|
|
|
submit() {
|
|
|
let isValidate = false
|
|
|
isValidate = this.validate()
|
|
|
-
|
|
|
if (isValidate) {
|
|
|
this.makeTableList()
|
|
|
this.baseInfoForm.details = []
|
|
@@ -1259,6 +1259,19 @@ export default {
|
|
|
case '新增':
|
|
|
isValidate = this.validate()
|
|
|
if (isValidate) {
|
|
|
+ if (this.baseInfoForm.bulkDensityStandard == 1) {
|
|
|
+ //以容重另外校验
|
|
|
+ let inspect = this.check() //
|
|
|
+ if(inspect){
|
|
|
+ purchasePriceAdd(this.baseInfoForm)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ // this.tableData = response.records
|
|
|
+ this.isCountShow = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
purchasePriceAdd(this.baseInfoForm)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
@@ -1266,20 +1279,32 @@ export default {
|
|
|
this.isCountShow = false
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
break
|
|
|
case '编辑':
|
|
|
+ isValidate = this.validate()
|
|
|
if (!this.baseInfoForm.bulkDensityStandard) {
|
|
|
//以水分计算等级
|
|
|
this.getEditCheckList()
|
|
|
- }
|
|
|
- isValidate = this.validate()
|
|
|
- if (isValidate) {
|
|
|
+ if (isValidate) {
|
|
|
purchasePriceEdit(this.baseInfoForm)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
this.isCountShow = false
|
|
|
})
|
|
|
}
|
|
|
+ }else{
|
|
|
+ let inspect = this.check() //以容重另外校验
|
|
|
+ if(inspect && isValidate){
|
|
|
+ purchasePriceEdit(this.baseInfoForm)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ // this.tableData = response.records
|
|
|
+ this.isCountShow = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
break
|
|
|
case '审核中':
|
|
|
// this.makePriceDataList()
|
|
@@ -1307,6 +1332,21 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ check(){
|
|
|
+ let that = this
|
|
|
+ for(let i = 0;i < this.baseInfoForm.detailPrints.length;i++){
|
|
|
+ if(!this.baseInfoForm.detailPrints[i].bulkDensityMin || !this.baseInfoForm.detailPrints[i].bulkDensityMax||!this.baseInfoForm.detailPrints[i].bulkDensityPrice){
|
|
|
+ that.$message.error('请输入容重和对应区间价格!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Number(this.baseInfoForm.detailPrints[i].bulkDensityMin) > Number(this.baseInfoForm.detailPrints[i].bulkDensityMax)){
|
|
|
+ that.$message.error('请从左到右按大到小填写容重!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
//审核
|
|
|
audit(item, status, status2) {
|
|
|
posthandle({
|
|
@@ -2129,6 +2169,20 @@ export default {
|
|
|
);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
+ .line1 {
|
|
|
+ position: absolute;
|
|
|
+ top: 72px;
|
|
|
+ width: 100%;
|
|
|
+ height: 5px;
|
|
|
+ margin-left:16px;
|
|
|
+ background: linear-gradient(
|
|
|
+ 39deg,
|
|
|
+ #5878e8 0%,
|
|
|
+ #91b0f5 42%,
|
|
|
+ #e6eeff 100%
|
|
|
+ );
|
|
|
+ border-radius: 3px;
|
|
|
+ }
|
|
|
|
|
|
.bottom-price {
|
|
|
position: absolute;
|
|
@@ -2219,4 +2273,14 @@ export default {
|
|
|
.white-bgc {
|
|
|
background: white !important;
|
|
|
}
|
|
|
+.jt-style1 {
|
|
|
+ position: absolute;
|
|
|
+ top: 64px;
|
|
|
+ width: 0px;
|
|
|
+ height: 0px;
|
|
|
+ // right: -15px;
|
|
|
+ border-right: 15px solid #5473e8;
|
|
|
+ border-top: 10px solid transparent;
|
|
|
+ border-bottom: 10px solid transparent;
|
|
|
+ }
|
|
|
</style>
|