|
@@ -344,210 +344,155 @@ export default {
|
|
|
// + this.verifyinit()
|
|
|
},
|
|
|
print() {
|
|
|
- // if (!this.inspect.qualityNo) {
|
|
|
- // this.$message({
|
|
|
- // message: '编号不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.binNumber) {
|
|
|
- // this.$message({
|
|
|
- // message: '仓位不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.customerName) {
|
|
|
- // this.$message({
|
|
|
- // message: '客户不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.storageTagNo) {
|
|
|
- // this.$message({
|
|
|
- // message: '囤位号不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
+ if (!this.inspect.qualityNo) {
|
|
|
+ this.$message({
|
|
|
+ message: '编号不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.binNumber) {
|
|
|
+ this.$message({
|
|
|
+ message: '仓位不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.customerName) {
|
|
|
+ this.$message({
|
|
|
+ message: '客户不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.storageTagNo) {
|
|
|
+ this.$message({
|
|
|
+ message: '囤位号不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
- // if (this.inspect.storageTagNo.length > 10) {
|
|
|
- // this.$message({
|
|
|
- // message: '囤位号不超过10个字符',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.carNumber) {
|
|
|
- // this.$message({
|
|
|
- // message: '车牌号不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (this.inspect.carNumber.length > 7) {
|
|
|
- // this.$message({
|
|
|
- // message: '车牌号输入错误',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.goodsName) {
|
|
|
- // this.$message({
|
|
|
- // message: '货名不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // 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.type) {
|
|
|
- // this.$message({
|
|
|
- // message: '类型不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.type) {
|
|
|
- // this.$message({
|
|
|
- // message: '类型不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.natureOfGrainPurchase) {
|
|
|
- // this.$message({
|
|
|
- // message: '购粮性质不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.grade) {
|
|
|
- // this.$message({
|
|
|
- // message: '等级不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.impurity) {
|
|
|
- // this.$message({
|
|
|
- // message: '杂质不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.waterContent) {
|
|
|
- // this.$message({
|
|
|
- // message: '水分不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.mildewGrain) {
|
|
|
- // this.$message({
|
|
|
- // message: '霉变粒不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.bulkDensity) {
|
|
|
- // this.$message({
|
|
|
- // message: '容重不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.jiaorenli) {
|
|
|
- // this.$message({
|
|
|
- // message: '热损伤不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (!this.inspect.imperfectGrain) {
|
|
|
- // this.$message({
|
|
|
- // message: '不完整粒不能为空',
|
|
|
- // type: 'warning',
|
|
|
- // })
|
|
|
- // return
|
|
|
- // }
|
|
|
- // //查看当前用户对应货名有未结算状态的送货
|
|
|
- // let count = 0
|
|
|
- // getCount({
|
|
|
- // compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
- // customerName: this.inspect.customerName,
|
|
|
- // goodsName: this.inspect.goodsName,
|
|
|
- // }) .toPromise()
|
|
|
- // .then((response) => {
|
|
|
- // count = response
|
|
|
- // })
|
|
|
- // // 客户下拉校验
|
|
|
- // getamount({
|
|
|
- // compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
- // customerName: this.inspect.customerName,
|
|
|
- // goodsName: this.inspect.goodsName,
|
|
|
- // })
|
|
|
- // .toPromise()
|
|
|
- // .then((response) => {
|
|
|
- // for (let i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
- // if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
|
|
|
- // console.log(this.purchasePriceList[i].saleLimit - response)
|
|
|
- // if (this.purchasePriceList[i].saleLimit - response < 50 || count > 0) {
|
|
|
- // // this.$confirm(
|
|
|
- // // '当前客户已累计销售我司' +
|
|
|
- // // this.inspect.goodsName +
|
|
|
- // // response +
|
|
|
- // // '吨,最高可售' +
|
|
|
- // // this.purchasePriceList[i].saleLimit +
|
|
|
- // // '吨。',
|
|
|
- // // '提示',
|
|
|
- // // {
|
|
|
- // // cancelButtonText: '取消',
|
|
|
- // // type: 'warning',
|
|
|
- // // }
|
|
|
- // // )
|
|
|
- // // .then(() => {})
|
|
|
- // // .catch(() => {
|
|
|
- // // return false
|
|
|
- // // })
|
|
|
- // this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + response +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
|
|
|
- // '提示',
|
|
|
- // {
|
|
|
- // confirmButtonText: '确定',
|
|
|
- // callback: (action) => {
|
|
|
- // // this.$message({
|
|
|
- // // type: 'info',
|
|
|
- // // message: `累计售粮已超出上限`,
|
|
|
- // // })
|
|
|
- // },
|
|
|
- // }
|
|
|
- // )
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
+ if (this.inspect.storageTagNo.length > 10) {
|
|
|
+ this.$message({
|
|
|
+ message: '囤位号不超过10个字符',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.carNumber) {
|
|
|
+ this.$message({
|
|
|
+ message: '车牌号不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.inspect.carNumber.length > 7) {
|
|
|
+ this.$message({
|
|
|
+ message: '车牌号输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.goodsName) {
|
|
|
+ this.$message({
|
|
|
+ message: '货名不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ 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.type) {
|
|
|
+ this.$message({
|
|
|
+ message: '类型不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.type) {
|
|
|
+ this.$message({
|
|
|
+ message: '类型不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.natureOfGrainPurchase) {
|
|
|
+ this.$message({
|
|
|
+ message: '购粮性质不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.grade) {
|
|
|
+ this.$message({
|
|
|
+ message: '等级不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.impurity) {
|
|
|
+ this.$message({
|
|
|
+ message: '杂质不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.waterContent) {
|
|
|
+ this.$message({
|
|
|
+ message: '水分不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.mildewGrain) {
|
|
|
+ this.$message({
|
|
|
+ message: '霉变粒不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.bulkDensity) {
|
|
|
+ this.$message({
|
|
|
+ message: '容重不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.jiaorenli) {
|
|
|
+ this.$message({
|
|
|
+ message: '热损伤不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.inspect.imperfectGrain) {
|
|
|
+ this.$message({
|
|
|
+ message: '不完整粒不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.inspect.warehouseName = this.warehouseName
|
|
|
this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
this.inspect.qualityInspector = sessionStorage.getItem('ws-pf_staffName')
|
|
@@ -568,8 +513,6 @@ export default {
|
|
|
this.inspect = response
|
|
|
})
|
|
|
this.isShowPrint = true
|
|
|
- //打印
|
|
|
- // this.$router.go(-1)
|
|
|
})
|
|
|
})
|
|
|
.catch(() => {
|
|
@@ -607,6 +550,40 @@ export default {
|
|
|
let customers = e.split('(')
|
|
|
this.inspect.customerName = customers[0]
|
|
|
this.inspect.customerPhone = customers[1].split(')')[0]
|
|
|
+ if(this.inspect.goodsName && this.inspect.customerName){
|
|
|
+ let count = 0
|
|
|
+ getCount({
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ customerName: this.inspect.customerName,
|
|
|
+ goodsName: this.inspect.goodsName,
|
|
|
+ }) .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ count = response
|
|
|
+ })
|
|
|
+ // 客户下拉校验
|
|
|
+ getamount({
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ customerName: this.inspect.customerName,
|
|
|
+ goodsName: this.inspect.goodsName,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ for (let i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
+ if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
|
|
|
+ if (this.purchasePriceList[i].saleLimit - response < 50 || count > 0) {
|
|
|
+ this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + response +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: (action) => {
|
|
|
+ },
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
waterContentChange() {
|
|
@@ -636,6 +613,40 @@ export default {
|
|
|
this.unitPrice = response
|
|
|
})
|
|
|
}
|
|
|
+ if(this.inspect.goodsName && this.inspect.customerName){
|
|
|
+ let count = 0
|
|
|
+ getCount({
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ customerName: this.inspect.customerName,
|
|
|
+ goodsName: this.inspect.goodsName,
|
|
|
+ }) .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ count = response
|
|
|
+ })
|
|
|
+ // 客户下拉校验
|
|
|
+ getamount({
|
|
|
+ compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
+ customerName: this.inspect.customerName,
|
|
|
+ goodsName: this.inspect.goodsName,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ for (let i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
+ if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
|
|
|
+ if (this.purchasePriceList[i].saleLimit - response < 50 || count > 0) {
|
|
|
+ this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + response +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: (action) => {
|
|
|
+ },
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
getList(ids) {
|