|
@@ -11,8 +11,8 @@
|
|
|
<el-row class="base-info">
|
|
|
<el-col :span="2" style="line-height: 32px;">基本信息</el-col>
|
|
|
<el-col :span="22">
|
|
|
- <el-button :type="!isSolidFood?'primary':''" @click="typeChange()" v-if="type == '新增'">以水分定价</el-button>
|
|
|
- <el-button :type="isSolidFood?'primary':''" @click="typeChange(1)" v-if="type == '新增'">以容重定价</el-button>
|
|
|
+ <el-button :type="!isSolidFood ? 'primary' : ''" @click="typeChange()" v-if="type == '新增'">以水分定价</el-button>
|
|
|
+ <el-button :type="isSolidFood ? 'primary' : ''" @click="typeChange(1)" v-if="type == '新增'">以容重定价</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="row1">
|
|
@@ -114,7 +114,8 @@
|
|
|
<div class="item-style">
|
|
|
<div v-if="item1.type != 4" class="item-style-title">
|
|
|
<span>{{ item1.name }}{{ item1.index }}</span>
|
|
|
- <el-button class="add" @click="add(item, item1, index)" v-if="item1.type != 3" :disabled="!isEdit">+
|
|
|
+ <el-button class="add" @click="add(item, item1, index)" v-if="item1.type != 3"
|
|
|
+ :disabled="!isEdit">+
|
|
|
</el-button>
|
|
|
<el-button class="reduce" @click="reduce(item, item1, index)"
|
|
|
v-show="item1.type != 1 && item1.type != 2 && item1.type != 3" :disabled="!isEdit">-</el-button>
|
|
@@ -145,7 +146,8 @@
|
|
|
<div class="content">
|
|
|
<div class="count">
|
|
|
<div class="left" style="align-items: center;justify-content: flex-end;">
|
|
|
- <div>容重(g/L)</div>
|
|
|
+ <div v-if="this.baseInfoForm.goodsNameKey == 6">蛋白(g/L)</div>
|
|
|
+ <div v-else>容重(g/L)</div>
|
|
|
<div>价格(元/公斤)</div>
|
|
|
</div>
|
|
|
|
|
@@ -153,7 +155,28 @@
|
|
|
<div class="jt-style1"></div>
|
|
|
<div class="line1"></div>
|
|
|
|
|
|
- <div v-for="(item1, index) in priceRZObj.detailList" :key="index">
|
|
|
+ <div v-show="baseInfoForm.goodsNameKey == 6" v-for="(item1, index) in priceRZObjDb.detailListDb">
|
|
|
+ <div class="item-style" v-if="item1.isShow">
|
|
|
+ <div v-if="item1.type != 4" class="item-style-title">
|
|
|
+ <span>{{ item1.name }}</span>
|
|
|
+ <el-button class="add" @click="addDB(item1, index)" v-if="item1.type != 3" :disabled="!isEdit">+
|
|
|
+ </el-button>
|
|
|
+ <el-button class="reduce" @click="reduceDB(item1, index)"
|
|
|
+ v-show="item1.type != 1 && priceRZObjDb.detailListDb.length > 2"
|
|
|
+ :disabled="!isEdit">-</el-button>
|
|
|
+ </div>
|
|
|
+ <div v-show="item1.type != 4">
|
|
|
+ <input class="water-price" :class="item1.isWrite ? 'white-bgc' : ''"
|
|
|
+ v-model="item1.weight"></input>
|
|
|
+ </div>
|
|
|
+ <div class="circle" v-if="item1.type != 4"></div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-price">
|
|
|
+ <input v-if="item1.type == 4" class="water-price" :class="isEdit ? 'white-bgc' : ''"
|
|
|
+ v-model="item1.jfprice" :disabled="!isEdit"></input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-show="baseInfoForm.goodsNameKey != 6" 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">
|
|
|
<span>{{ item1.name }}</span>
|
|
@@ -163,7 +186,8 @@
|
|
|
v-show="item1.type != 1 && priceRZObj.detailList.length > 2" :disabled="!isEdit">-</el-button>
|
|
|
</div>
|
|
|
<div v-show="item1.type != 4">
|
|
|
- <input class="water-price" :class="item1.isWrite ? 'white-bgc' : ''" v-model="item1.weight"></input>
|
|
|
+ <input class="water-price" :class="item1.isWrite ? 'white-bgc' : ''"
|
|
|
+ v-model="item1.weight"></input>
|
|
|
</div>
|
|
|
<div class="circle" v-if="item1.type != 4"></div>
|
|
|
</div>
|
|
@@ -199,7 +223,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
- <div class="page2-content" v-else>
|
|
|
+ <div v-else-if="this.baseInfoForm.bulkDensityStandard && this.baseInfoForm.goodsName != '大豆'" class="page2-content">
|
|
|
<!-- 容重打印 -->
|
|
|
<div class="titel">
|
|
|
{{ selectVal }}价格对照表(按容重)
|
|
@@ -213,6 +237,20 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
+ <div v-else class="page2-content">
|
|
|
+ <!-- 容重打印 -->
|
|
|
+ <div class="titel">
|
|
|
+ {{ selectVal }}价格对照表(按蛋白)
|
|
|
+ </div>
|
|
|
+ <el-table :data="tableData1" style="width: 100%" :row-class-name="tableRowClassName">
|
|
|
+ <el-table-column prop="bulkDensityMax" label="蛋白上限">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="bulkDensityMin" label="蛋白下限">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="bulkDensityPrice" label="蛋白单价">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
<div class="bottom-btn">
|
|
|
<div v-if="baseInfoForm.status == '审核中'" class="left">当前价格尚未通过审核,建议审核通过后进行打印</div>
|
|
|
<div class="right">
|
|
@@ -276,6 +314,31 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ priceRZObjDb: {
|
|
|
+ index: 0,
|
|
|
+ checkList: [],
|
|
|
+ basicUnitPrice: '',
|
|
|
+ detailListDb: [
|
|
|
+ {
|
|
|
+ type: 1,
|
|
|
+ name: '蛋白',
|
|
|
+ weight: '1000',
|
|
|
+ isWrite: false,
|
|
|
+ isShow: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 4,
|
|
|
+ jfprice: '',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 1,
|
|
|
+ name: '蛋白',
|
|
|
+ weight: '',
|
|
|
+ isWrite: true,
|
|
|
+ isShow: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
priceList: [
|
|
|
{
|
|
|
index: 0,
|
|
@@ -331,6 +394,7 @@ export default {
|
|
|
dryGrainPrice: '',
|
|
|
details: [],
|
|
|
detailPrints: [],
|
|
|
+ protein: '',
|
|
|
},
|
|
|
index: 0,
|
|
|
type: '',
|
|
@@ -341,6 +405,7 @@ export default {
|
|
|
checkList2: [],
|
|
|
checkList3: [],
|
|
|
checkList4: [],
|
|
|
+ bulkDensityStandard:'',
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -515,12 +580,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- typeChange(val){
|
|
|
- if(val == 1){
|
|
|
+ typeChange(val) {
|
|
|
+ if (val == 1) {
|
|
|
this.isSolidFood = true
|
|
|
+ this.bulkDensityStandard = 1
|
|
|
this.baseInfoForm.bulkDensityStandard = 1
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.isSolidFood = false
|
|
|
+ this.bulkDensityStandard = ''
|
|
|
this.baseInfoForm.bulkDensityStandard = ''
|
|
|
}
|
|
|
},
|
|
@@ -544,10 +611,10 @@ export default {
|
|
|
//构造查看priceList数据
|
|
|
this.priceList = []
|
|
|
this.makeLookPriceList()
|
|
|
- if(this.baseInfoForm.bulkDensityStandard == 1){
|
|
|
+ if (this.baseInfoForm.bulkDensityStandard == 1) {
|
|
|
this.isSolidFood = true
|
|
|
this.baseInfoForm.bulkDensityStandard = 1
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.isSolidFood = false
|
|
|
this.baseInfoForm.bulkDensityStandard = ''
|
|
|
}
|
|
@@ -592,43 +659,44 @@ export default {
|
|
|
},
|
|
|
goodsChange(e) {
|
|
|
this.baseInfoForm = {
|
|
|
- //防止填完数据 后切换货名不清空多余数据
|
|
|
- warehouseId: '',
|
|
|
- warehouseName: '',
|
|
|
- compId: this.$route.query.compId,
|
|
|
- goodsNameKey: '',
|
|
|
- goodsName: '',
|
|
|
- waterBase: '',
|
|
|
- deductWeight: '',
|
|
|
- waterMin: '',
|
|
|
- waterMax: '',
|
|
|
- saleLimit: 2000,
|
|
|
- statusFlag: '',
|
|
|
- status: '',
|
|
|
- workflowId: '',
|
|
|
- approveStatus: '',
|
|
|
- passDate: '',
|
|
|
- dryGrainPrice: '',
|
|
|
- details: [],
|
|
|
- detailPrints: [],
|
|
|
- paramType: '2',
|
|
|
- }
|
|
|
- this.baseInfoForm.warehouseId = this.$route.query.warehouseId
|
|
|
- this.baseInfoForm.warehouseName = this.$route.query.warehouseName
|
|
|
- this.baseInfoForm.compId = this.$route.query.compId
|
|
|
- if (e == '玉米淀粉' ||
|
|
|
- e == '玉米(机收)' ||
|
|
|
- e == '玉米(酒精)' ||
|
|
|
- e == '玉米(筛漏)' ||
|
|
|
- e == '玉米(陈粮)' ||
|
|
|
- e == '玉米(棒)' ||
|
|
|
- e == '玉米'
|
|
|
- ) {
|
|
|
-
|
|
|
- this.baseInfoForm.bulkDensityStandard = 1
|
|
|
- }else{
|
|
|
- this.baseInfoForm.bulkDensityStandard = ''
|
|
|
+ //防止填完数据 后切换货名不清空多余数据
|
|
|
+ warehouseId: '',
|
|
|
+ warehouseName: '',
|
|
|
+ compId: this.$route.query.compId,
|
|
|
+ goodsNameKey: '',
|
|
|
+ goodsName: '',
|
|
|
+ waterBase: '',
|
|
|
+ deductWeight: '',
|
|
|
+ waterMin: '',
|
|
|
+ waterMax: '',
|
|
|
+ saleLimit: 2000,
|
|
|
+ statusFlag: '',
|
|
|
+ status: '',
|
|
|
+ workflowId: '',
|
|
|
+ approveStatus: '',
|
|
|
+ passDate: '',
|
|
|
+ dryGrainPrice: '',
|
|
|
+ details: [],
|
|
|
+ detailPrints: [],
|
|
|
+ paramType: '2',
|
|
|
+ protein: '',
|
|
|
}
|
|
|
+ this.baseInfoForm.warehouseId = this.$route.query.warehouseId
|
|
|
+ this.baseInfoForm.warehouseName = this.$route.query.warehouseName
|
|
|
+ this.baseInfoForm.compId = this.$route.query.compId
|
|
|
+ this.baseInfoForm.bulkDensityStandard = this.bulkDensityStandard
|
|
|
+ // if (e == '玉米淀粉' ||
|
|
|
+ // e == '玉米(机收)' ||
|
|
|
+ // e == '玉米(酒精)' ||
|
|
|
+ // e == '玉米(筛漏)' ||
|
|
|
+ // e == '玉米(陈粮)' ||
|
|
|
+ // e == '玉米(棒)' ||
|
|
|
+ // e == '玉米'
|
|
|
+ // ) {
|
|
|
+ // this.baseInfoForm.bulkDensityStandard = 1
|
|
|
+ // } else {
|
|
|
+ // this.baseInfoForm.bulkDensityStandard = ''
|
|
|
+ // }
|
|
|
for (let num = 0; num < this.goodnameList.length; num++) {
|
|
|
if (e == this.goodnameList[num].constValue) {
|
|
|
this.baseInfoForm.goodsNameKey = this.goodnameList[num].constKey
|
|
@@ -705,19 +773,19 @@ export default {
|
|
|
// type: 'warning',
|
|
|
// })
|
|
|
// } else {
|
|
|
- item.index++
|
|
|
- item.detailList.splice(index + 1, 0, {
|
|
|
- name: '分界',
|
|
|
- water: '',
|
|
|
- type: 5,
|
|
|
- index: 1,
|
|
|
- isWrite: true,
|
|
|
- })
|
|
|
- item.detailList.splice(index + 1, 0, {
|
|
|
- jfprice: '',
|
|
|
- type: 4,
|
|
|
- })
|
|
|
- this.makeSpliceIndex(item, item1, index)
|
|
|
+ item.index++
|
|
|
+ item.detailList.splice(index + 1, 0, {
|
|
|
+ name: '分界',
|
|
|
+ water: '',
|
|
|
+ type: 5,
|
|
|
+ index: 1,
|
|
|
+ isWrite: true,
|
|
|
+ })
|
|
|
+ item.detailList.splice(index + 1, 0, {
|
|
|
+ jfprice: '',
|
|
|
+ type: 4,
|
|
|
+ })
|
|
|
+ this.makeSpliceIndex(item, item1, index)
|
|
|
// }
|
|
|
},
|
|
|
// 减少分界
|
|
@@ -735,6 +803,22 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ addDB(item1, index) {
|
|
|
+ this.priceRZObjDb.detailListDb.splice(index + 1, 0, {
|
|
|
+ name: '蛋白',
|
|
|
+ water: '',
|
|
|
+ type: 1,
|
|
|
+ isWrite: true,
|
|
|
+ isShow: true,
|
|
|
+ })
|
|
|
+ this.priceRZObjDb.detailListDb.splice(index + 1, 0, {
|
|
|
+ jfprice: '',
|
|
|
+ type: 4,
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reduceDB(index) {
|
|
|
+ this.priceRZObjDb.detailListDb.splice(index - 1, 2)
|
|
|
+ },
|
|
|
// 复选框变化监听
|
|
|
changeLevel(val, index) {
|
|
|
let _data = this.priceList
|
|
@@ -873,38 +957,73 @@ export default {
|
|
|
//构造新增价格数据
|
|
|
makePriceDataList() {
|
|
|
if (this.baseInfoForm.bulkDensityStandard == 1) {
|
|
|
- //以容重构造数据
|
|
|
- let _index = 0
|
|
|
- let _index1 = 0
|
|
|
- let _detailsObj = {
|
|
|
- compId: this.baseInfoForm.warehouseId,
|
|
|
- // basePrice: this.priceList[k].basicUnitPrice,
|
|
|
- // level: '',
|
|
|
- point: '',
|
|
|
- pointPrice: '',
|
|
|
- }
|
|
|
- for (let k = 0; k < this.priceRZObj.detailList.length; k++) {
|
|
|
- // 新增
|
|
|
- if (this.priceRZObj.detailList[k].type == 4) {
|
|
|
- //价格
|
|
|
- if (_index == 0) {
|
|
|
- _index++
|
|
|
- _detailsObj.pointPrice += this.priceRZObj.detailList[k].jfprice
|
|
|
+ if (this.baseInfoForm.goodsNameKey == 6) {
|
|
|
+ //以容重构造数据
|
|
|
+ let _index = 0
|
|
|
+ let _index1 = 0
|
|
|
+ let _detailsObj = {
|
|
|
+ compId: this.baseInfoForm.warehouseId,
|
|
|
+ // basePrice: this.priceList[k].basicUnitPrice,
|
|
|
+ // level: '',
|
|
|
+ point: '',
|
|
|
+ pointPrice: '',
|
|
|
+ }
|
|
|
+ for (let k = 0; k < this.priceRZObjDb.detailListDb.length; k++) {
|
|
|
+ // 新增
|
|
|
+ if (this.priceRZObjDb.detailListDb[k].type == 4) {
|
|
|
+ //价格
|
|
|
+ if (_index == 0) {
|
|
|
+ _index++
|
|
|
+ _detailsObj.pointPrice += this.priceRZObjDb.detailListDb[k].jfprice
|
|
|
+ } else {
|
|
|
+ _detailsObj.pointPrice +=
|
|
|
+ ',' + this.priceRZObjDb.detailListDb[k].jfprice
|
|
|
+ }
|
|
|
} else {
|
|
|
- _detailsObj.pointPrice +=
|
|
|
- ',' + this.priceRZObj.detailList[k].jfprice
|
|
|
+ //容重
|
|
|
+ if (_index1 == 0) {
|
|
|
+ _index1++
|
|
|
+ _detailsObj.point += this.priceRZObjDb.detailListDb[k].weight
|
|
|
+ } else {
|
|
|
+ _detailsObj.point += ',' + this.priceRZObjDb.detailListDb[k].weight
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
- //容重
|
|
|
- if (_index1 == 0) {
|
|
|
- _index1++
|
|
|
- _detailsObj.point += this.priceRZObj.detailList[k].weight
|
|
|
+ }
|
|
|
+ this.baseInfoForm.details.push(_detailsObj)
|
|
|
+ } else {
|
|
|
+ //货名不为大豆时,以容重构造数据
|
|
|
+ let _index = 0
|
|
|
+ let _index1 = 0
|
|
|
+ let _detailsObj = {
|
|
|
+ compId: this.baseInfoForm.warehouseId,
|
|
|
+ // basePrice: this.priceList[k].basicUnitPrice,
|
|
|
+ // level: '',
|
|
|
+ point: '',
|
|
|
+ pointPrice: '',
|
|
|
+ }
|
|
|
+ for (let k = 0; k < this.priceRZObj.detailList.length; k++) {
|
|
|
+ // 新增
|
|
|
+ if (this.priceRZObj.detailList[k].type == 4) {
|
|
|
+ //价格
|
|
|
+ if (_index == 0) {
|
|
|
+ _index++
|
|
|
+ _detailsObj.pointPrice += this.priceRZObj.detailList[k].jfprice
|
|
|
+ } else {
|
|
|
+ _detailsObj.pointPrice +=
|
|
|
+ ',' + this.priceRZObj.detailList[k].jfprice
|
|
|
+ }
|
|
|
} else {
|
|
|
- _detailsObj.point += ',' + this.priceRZObj.detailList[k].weight
|
|
|
+ //容重
|
|
|
+ if (_index1 == 0) {
|
|
|
+ _index1++
|
|
|
+ _detailsObj.point += this.priceRZObj.detailList[k].weight
|
|
|
+ } else {
|
|
|
+ _detailsObj.point += ',' + this.priceRZObj.detailList[k].weight
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ this.baseInfoForm.details.push(_detailsObj)
|
|
|
}
|
|
|
- this.baseInfoForm.details.push(_detailsObj)
|
|
|
} else {
|
|
|
//已水分构造数据
|
|
|
for (let k = 0; k < this.priceList.length; k++) {
|
|
@@ -1382,15 +1501,25 @@ 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
|
|
|
- }
|
|
|
+ // if (this.baseInfoForm.goodsName != '大豆') {
|
|
|
+ if (!this.baseInfoForm.detailPrints[i].bulkDensityMin || !this.baseInfoForm.detailPrints[i].bulkDensityMax || !this.baseInfoForm.detailPrints[i].bulkDensityPrice) {
|
|
|
+ that.$message.error(this.baseInfoForm.goodsName != '大豆' ? '请输入容重和对应区间价格!':'请输入蛋白和对应区间价格!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (Number(this.baseInfoForm.detailPrints[i].bulkDensityMin) > Number(this.baseInfoForm.detailPrints[i].bulkDensityMax)) {
|
|
|
+ that.$message.error(this.baseInfoForm.goodsName != '大豆' ? '请从左到右按大到小填写容重!':'请输入蛋白和对应区间价格!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ // }else{
|
|
|
+ // 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
|
|
|
},
|
|
@@ -1415,7 +1544,43 @@ export default {
|
|
|
// 关闭
|
|
|
closeCount() {
|
|
|
this.isCountShow = true
|
|
|
- this.splitPriceList = []
|
|
|
+ this.priceRZObjDb.detailListDb =[ {
|
|
|
+ type: 1,
|
|
|
+ name: '蛋白',
|
|
|
+ weight: '1000',
|
|
|
+ isWrite: false,
|
|
|
+ isShow: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 4,
|
|
|
+ jfprice: '',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 1,
|
|
|
+ name: '蛋白',
|
|
|
+ weight: '',
|
|
|
+ isWrite: true,
|
|
|
+ isShow: true,
|
|
|
+ },]
|
|
|
+ this.priceRZObj.detailList =[ {
|
|
|
+ type: 1,
|
|
|
+ name: '容重',
|
|
|
+ weight: '1000',
|
|
|
+ isWrite: false,
|
|
|
+ isShow: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 4,
|
|
|
+ jfprice: '',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 1,
|
|
|
+ name: '容重',
|
|
|
+ weight: '',
|
|
|
+ isWrite: true,
|
|
|
+ isShow: true,
|
|
|
+ },]
|
|
|
+ // this.baseInfoForm.splitPriceList = []
|
|
|
this.$router.push({
|
|
|
name: 'acquisitionManagement',
|
|
|
})
|
|
@@ -1423,48 +1588,93 @@ export default {
|
|
|
//处理价格表格数据
|
|
|
makeTableList() {
|
|
|
if (this.baseInfoForm.bulkDensityStandard == 1) {
|
|
|
- //以容重构造打印数据
|
|
|
- let price = []
|
|
|
- let weight = []
|
|
|
- let _obj1 = {}
|
|
|
- let _Lists = []
|
|
|
- for (let num = 0; num < this.priceRZObj.detailList.length; num++) {
|
|
|
- if (this.priceRZObj.detailList[num].type == 4) {
|
|
|
- price.push(this.priceRZObj.detailList[num].jfprice)
|
|
|
- } else if (this.priceRZObj.detailList[num].type == 1) {
|
|
|
- weight.push(this.priceRZObj.detailList[num].weight)
|
|
|
+ if (this.baseInfoForm.goodsName != '大豆') {
|
|
|
+ //以容重构造打印数据
|
|
|
+ let price = []
|
|
|
+ let weight = []
|
|
|
+ let _obj1 = {}
|
|
|
+ let _Lists = []
|
|
|
+ for (let num = 0; num < this.priceRZObj.detailList.length; num++) {
|
|
|
+ if (this.priceRZObj.detailList[num].type == 4) {
|
|
|
+ price.push(this.priceRZObj.detailList[num].jfprice)
|
|
|
+ } else if (this.priceRZObj.detailList[num].type == 1) {
|
|
|
+ weight.push(this.priceRZObj.detailList[num].weight)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- for (let val = 0; val < price.length; val++) {
|
|
|
- if (val == 0) {
|
|
|
- _obj1 = {
|
|
|
- bulkDensityMax: weight[val],
|
|
|
- bulkDensityMin: weight[val + 1],
|
|
|
- bulkDensityPrice: price[val],
|
|
|
+ for (let val = 0; val < price.length; val++) {
|
|
|
+ if (val == 0) {
|
|
|
+ _obj1 = {
|
|
|
+ bulkDensityMax: weight[val],
|
|
|
+ bulkDensityMin: weight[val + 1],
|
|
|
+ bulkDensityPrice: price[val],
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ _obj1 = {
|
|
|
+ bulkDensityMax: weight[val] - 1,
|
|
|
+ bulkDensityMin: weight[val + 1],
|
|
|
+ bulkDensityPrice: price[val],
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
- _obj1 = {
|
|
|
- bulkDensityMax: weight[val] - 1,
|
|
|
- bulkDensityMin: weight[val + 1],
|
|
|
- bulkDensityPrice: price[val],
|
|
|
+ _Lists.push(_obj1)
|
|
|
+ }
|
|
|
+ this.baseInfoForm.detailPrints = _Lists
|
|
|
+ this.tableData1 = _Lists
|
|
|
+ // /**
|
|
|
+ // * 容重下限
|
|
|
+ // */
|
|
|
+ // private Float bulkDensityMin;
|
|
|
+ // /**
|
|
|
+ // * 容重上限
|
|
|
+ // */
|
|
|
+ // private Float bulkDensityMax;
|
|
|
+ // /**
|
|
|
+ // * 容重单价
|
|
|
+ // */
|
|
|
+ // private Float bulkDensityPrice;
|
|
|
+ } else {
|
|
|
+ //以容重构造打印数据
|
|
|
+ let price = []
|
|
|
+ let weight = []
|
|
|
+ let _obj1 = {}
|
|
|
+ let _Lists = []
|
|
|
+ for (let num = 0; num < this.priceRZObjDb.detailListDb.length; num++) {
|
|
|
+ if (this.priceRZObjDb.detailListDb[num].type == 4) {
|
|
|
+ price.push(this.priceRZObjDb.detailListDb[num].jfprice)
|
|
|
+ } else if (this.priceRZObjDb.detailListDb[num].type == 1) {
|
|
|
+ weight.push(this.priceRZObjDb.detailListDb[num].weight)
|
|
|
}
|
|
|
}
|
|
|
- _Lists.push(_obj1)
|
|
|
+ for (let val = 0; val < price.length; val++) {
|
|
|
+ if (val == 0) {
|
|
|
+ _obj1 = {
|
|
|
+ bulkDensityMax: weight[val],
|
|
|
+ bulkDensityMin: weight[val + 1],
|
|
|
+ bulkDensityPrice: price[val],
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ _obj1 = {
|
|
|
+ bulkDensityMax: weight[val] - 1,
|
|
|
+ bulkDensityMin: weight[val + 1],
|
|
|
+ bulkDensityPrice: price[val],
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _Lists.push(_obj1)
|
|
|
+ }
|
|
|
+ this.baseInfoForm.detailPrints = _Lists
|
|
|
+ this.tableData1 = _Lists
|
|
|
+ // /**
|
|
|
+ // * 容重下限
|
|
|
+ // */
|
|
|
+ // private Float bulkDensityMin;
|
|
|
+ // /**
|
|
|
+ // * 容重上限
|
|
|
+ // */
|
|
|
+ // private Float bulkDensityMax;
|
|
|
+ // /**
|
|
|
+ // * 容重单价
|
|
|
+ // */
|
|
|
+ // private Float bulkDensityPrice;
|
|
|
}
|
|
|
- this.baseInfoForm.detailPrints = _Lists
|
|
|
- this.tableData1 = _Lists
|
|
|
- // /**
|
|
|
- // * 容重下限
|
|
|
- // */
|
|
|
- // private Float bulkDensityMin;
|
|
|
- // /**
|
|
|
- // * 容重上限
|
|
|
- // */
|
|
|
- // private Float bulkDensityMax;
|
|
|
- // /**
|
|
|
- // * 容重单价
|
|
|
- // */
|
|
|
- // private Float bulkDensityPrice;
|
|
|
} else {
|
|
|
//以水分构造打印数据
|
|
|
// 获取等级对应分界钱数
|
|
@@ -1968,36 +2178,70 @@ export default {
|
|
|
let _pointPrice = []
|
|
|
let _basePrice = 0
|
|
|
if (this.baseInfoForm.bulkDensityStandard == 1) {
|
|
|
- // this.isSolidFood = true
|
|
|
- //以容重查看
|
|
|
- _pointPrice = _priceList[0].pointPrice.split(',')
|
|
|
- _detailList = _priceList[0].point.split(',')
|
|
|
- let count = _pointPrice.length + _detailList.length
|
|
|
- let obj = {}
|
|
|
- let index = 0
|
|
|
- let index1 = 0
|
|
|
- this.priceRZObj.detailList = []
|
|
|
- for (let j = 0; j < count; j++) {
|
|
|
- if (j % 2 == 0) {
|
|
|
- obj = {
|
|
|
- type: 1,
|
|
|
- name: '容重',
|
|
|
- weight: _detailList[index],
|
|
|
- isWrite: false,
|
|
|
- isShow: true,
|
|
|
- }
|
|
|
- if (j == 0) {
|
|
|
- obj.isShow = false
|
|
|
+ if (this.baseInfoForm.goodsName == '大豆') {
|
|
|
+ //以容重查看
|
|
|
+ _pointPrice = _priceList[0].pointPrice.split(',')
|
|
|
+ _detailList = _priceList[0].point.split(',')
|
|
|
+ let count = _pointPrice.length + _detailList.length
|
|
|
+ let obj = {}
|
|
|
+ let index = 0
|
|
|
+ let index1 = 0
|
|
|
+ this.priceRZObjDb.detailListDb = []
|
|
|
+ for (let j = 0; j < count; j++) {
|
|
|
+ if (j % 2 == 0) {
|
|
|
+ obj = {
|
|
|
+ type: 1,
|
|
|
+ name: '蛋白',
|
|
|
+ weight: _detailList[index],
|
|
|
+ isWrite: false,
|
|
|
+ isShow: true,
|
|
|
+ }
|
|
|
+ if (j == 0) {
|
|
|
+ obj.isShow = false
|
|
|
+ }
|
|
|
+ index++
|
|
|
+ } else {
|
|
|
+ obj = {
|
|
|
+ type: 4,
|
|
|
+ jfprice: _pointPrice[index1],
|
|
|
+ }
|
|
|
+ index1++
|
|
|
}
|
|
|
- index++
|
|
|
- } else {
|
|
|
- obj = {
|
|
|
- type: 4,
|
|
|
- jfprice: _pointPrice[index1],
|
|
|
+ this.priceRZObjDb.detailListDb.push(obj)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // this.isSolidFood = true
|
|
|
+ //以容重查看
|
|
|
+ _pointPrice = _priceList[0].pointPrice.split(',')
|
|
|
+ _detailList = _priceList[0].point.split(',')
|
|
|
+ let count = _pointPrice.length + _detailList.length
|
|
|
+ let obj = {}
|
|
|
+ let index = 0
|
|
|
+ let index1 = 0
|
|
|
+ this.priceRZObj.detailList = []
|
|
|
+ for (let j = 0; j < count; j++) {
|
|
|
+ if (j % 2 == 0) {
|
|
|
+ obj = {
|
|
|
+ type: 1,
|
|
|
+ name: '容重',
|
|
|
+ weight: _detailList[index],
|
|
|
+ isWrite: false,
|
|
|
+ isShow: true,
|
|
|
+ }
|
|
|
+ if (j == 0) {
|
|
|
+ obj.isShow = false
|
|
|
+ }
|
|
|
+ index++
|
|
|
+ } else {
|
|
|
+ obj = {
|
|
|
+ type: 4,
|
|
|
+ jfprice: _pointPrice[index1],
|
|
|
+ }
|
|
|
+ index1++
|
|
|
}
|
|
|
- index1++
|
|
|
+ this.priceRZObj.detailList.push(obj)
|
|
|
}
|
|
|
- this.priceRZObj.detailList.push(obj)
|
|
|
}
|
|
|
} else {
|
|
|
//以水分查看
|