|
@@ -56,7 +56,7 @@
|
|
|
<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"
|
|
|
: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" @input="waterContentChange" placeholder="请输入扣杂" maxlength="100" size="small"
|
|
|
/>
|
|
|
<ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="未复检" maxlength="100" size="small"
|
|
|
disabled />
|
|
@@ -118,8 +118,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>
|
|
@@ -210,7 +210,7 @@
|
|
|
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
|
|
@@ -367,27 +367,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 +595,7 @@
|
|
|
})
|
|
|
} else if (this.types == 3) {
|
|
|
this.inspect.flag=0
|
|
|
- this.$confirm('确定保存质检信息?', '提示', {
|
|
|
+ this.$confirm('确定保存初检信息?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
@@ -614,7 +616,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 +706,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 +735,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 +787,7 @@
|
|
|
.then((response) => {
|
|
|
this.goodNameList = []
|
|
|
this.goodNameList = response
|
|
|
+ this.purchasePriceList = response
|
|
|
})
|
|
|
// 品级
|
|
|
packList({
|