|
@@ -3,7 +3,7 @@
|
|
|
<div class="center">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <h2 class="bg-left titleup">{{ information }}质检信息</h2>
|
|
|
+ <h2 class="bg-left titleup">{{ information }}信息</h2>
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="bg-right">
|
|
|
<el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
|
|
@@ -54,9 +54,9 @@
|
|
|
:disabled="disabled" />
|
|
|
</ws-form-item>
|
|
|
<ws-form-item v-else label="扣杂" span="1" prop="buckleWeightRatio">
|
|
|
- <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
|
|
|
+ <ws-input type="number" style="padding-right:30px" @mousewheel.native.prevent v-model="inspect.buckleMiscellaneous" @input="waterContentChange" placeholder="请输入扣杂" maxlength="100" size="small"
|
|
|
:disabled="disabled" />
|
|
|
- <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
|
|
|
+ <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
|
|
|
/>
|
|
|
<ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="未复检" maxlength="100" size="small"
|
|
|
disabled />
|
|
@@ -92,7 +92,8 @@
|
|
|
:disabled="disabled" />
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="水分(%)" span="1" prop="waterContent">
|
|
|
- <ws-input type="number" @mousewheel.native.prevent v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
|
|
|
+
|
|
|
+ <ws-input type="number" @mousewheel.native.prevent style="padding-right:30px" v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
|
|
|
@change="waterContentChange('water')" :disabled="disabled" />
|
|
|
<ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="请输入水分占比" maxlength="100" size="small"
|
|
|
/>
|
|
@@ -118,8 +119,8 @@
|
|
|
</ws-info-table>
|
|
|
<div class="but">
|
|
|
<el-button @click="cancel" v-if="this.types != 2" type="primary">取消</el-button>
|
|
|
- <el-button @click="print" v-if="this.types ==3 || this.types ==4 ||this.types ==1" type="primary">保存</el-button>
|
|
|
- <el-button @click="print" v-if="this.types ==5 " type="primary">保存并打印</el-button>
|
|
|
+ <el-button @click="print" v-if="this.types ==3 || this.types ==4 ||this.types ==1" type="primary">保存</el-button>
|
|
|
+ <el-button @click="print" v-if="this.types ==5 " type="primary">确认并打印</el-button>
|
|
|
<el-button @click="cancel" v-if="this.types == 2" type="primary">关闭</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -167,14 +168,14 @@
|
|
|
tidalGrainPrice: 0,
|
|
|
buckleWeightRatio: 0,
|
|
|
natureOfGrainPurchase:'贸易粮',
|
|
|
- BuckleMiscellaneous:0,
|
|
|
+ buckleMiscellaneous:0,
|
|
|
paramType:1,
|
|
|
type:'潮粮'
|
|
|
},
|
|
|
disabled: false,
|
|
|
disabled1: false,
|
|
|
types: '1',
|
|
|
- information: '添加',
|
|
|
+ information: '添加初检',
|
|
|
goodNameList: [],
|
|
|
gradeList: [],
|
|
|
customerList: [],
|
|
@@ -197,7 +198,7 @@
|
|
|
this.types = this.$route.query.type
|
|
|
if(!this.types){
|
|
|
this.types = 1
|
|
|
- this.information = '添加'
|
|
|
+ this.information = '添加初检'
|
|
|
this.disabled = false
|
|
|
this.inspect = {
|
|
|
tidalGrainPrice: 0,
|
|
@@ -210,24 +211,24 @@
|
|
|
this.warehouseName = this.$route.query.warehouseName
|
|
|
this.cangNo = this.$route.query.warehouseNo
|
|
|
this.count = Number(this.$route.query.count) + 1
|
|
|
- this.purchasePriceList = this.$route.query.purchasePriceList
|
|
|
+ // this.purchasePriceList = this.$route.query.purchasePriceList
|
|
|
this.id = this.$route.query.id
|
|
|
if (this.types == 2) {
|
|
|
this.disabled = true
|
|
|
this.disabled1 = true
|
|
|
- this.information = '查看'
|
|
|
+ this.information = '查看质检'
|
|
|
} else if (this.types == 3) {
|
|
|
this.disabled = false
|
|
|
this.disabled1 = true
|
|
|
- this.information = '编辑'
|
|
|
+ this.information = '编辑初检'
|
|
|
}else if (this.types == 4) {
|
|
|
this.disabled = true
|
|
|
this.disabled1 = true
|
|
|
- this.information = '编辑'
|
|
|
+ this.information = '编辑复检'
|
|
|
}else if (this.types == 5) {
|
|
|
this.disabled = false
|
|
|
this.disabled1 = true
|
|
|
- this.information = '编辑'
|
|
|
+ this.information = '确认质检'
|
|
|
}
|
|
|
else{
|
|
|
this.disabled1 = false
|
|
@@ -367,27 +368,29 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (
|
|
|
- this.inspect.buckleWeightRatio < 0 ||
|
|
|
- this.inspect.buckleWeightRatio > 2
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- message: '扣重比输入错误',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (
|
|
|
- String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
|
|
|
- String(this.inspect.buckleWeightRatio).length -
|
|
|
- (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
|
|
|
- 2
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- message: '扣重比输入错误',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- return
|
|
|
+ if(this.inspect.paramType == '2'){
|
|
|
+ if (
|
|
|
+ this.inspect.buckleWeightRatio < 0 ||
|
|
|
+ this.inspect.buckleWeightRatio > 2
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重比输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
|
|
|
+ String(this.inspect.buckleWeightRatio).length -
|
|
|
+ (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
|
|
|
+ 2
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重比输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if (!this.inspect.type) {
|
|
|
this.$message({
|
|
@@ -593,7 +596,7 @@
|
|
|
})
|
|
|
} else if (this.types == 3) {
|
|
|
this.inspect.flag=0
|
|
|
- this.$confirm('确定保存质检信息?', '提示', {
|
|
|
+ this.$confirm('确定保存初检信息?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
@@ -614,7 +617,7 @@
|
|
|
else if (this.types == 4) {
|
|
|
this.inspect.flag=1
|
|
|
this.inspect.reInspector=sessionStorage.getItem('ws-pf_roleName') + sessionStorage.getItem('ws-pf_staffName')
|
|
|
- this.$confirm('确定保存质检信息?', '提示', {
|
|
|
+ this.$confirm('确定保存复检信息?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
@@ -704,24 +707,20 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // waterContentChange() {
|
|
|
- // debugger
|
|
|
- // if (this.inspect.goodsName) {
|
|
|
waterContentChange(type) {
|
|
|
if (this.inspect.goodsName&&type!='water') {
|
|
|
+ getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$set(this.inspect,'dryGrainPrice',response)
|
|
|
+ })
|
|
|
for (var i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
|
|
|
- this.$set(this.inspect,'paramType',this.purchasePriceList[i].paramType)
|
|
|
this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
|
|
|
+ this.$set(this.inspect,'paramType',this.purchasePriceList[i].paramType)
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
- if(this.inspect.type == '干粮'){
|
|
|
- getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$set(this.inspect,'dryGrainPrice',response)
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
//潮粮单价改变事件
|
|
|
if (
|
|
@@ -737,8 +736,11 @@
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- this.inspect.tidalGrainPrice = response
|
|
|
- this.unitPrice = response
|
|
|
+ if(this.inspect.paramType == '1'){
|
|
|
+ this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect.buckleMiscellaneous)/100*parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
|
|
|
+ }else{
|
|
|
+ this.inspect.tidalGrainPrice = response
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
if(this.inspect.goodsName && this.inspect.customerName ){
|
|
@@ -786,6 +788,7 @@
|
|
|
.then((response) => {
|
|
|
this.goodNameList = []
|
|
|
this.goodNameList = response
|
|
|
+ this.purchasePriceList = response
|
|
|
})
|
|
|
// 品级
|
|
|
packList({
|