|
@@ -138,8 +138,8 @@
|
|
packList
|
|
packList
|
|
} from '@/model/contarct/index'
|
|
} from '@/model/contarct/index'
|
|
import inspectInfoPrint from './component/inspectInfoPrint.vue'
|
|
import inspectInfoPrint from './component/inspectInfoPrint.vue'
|
|
- import html2canvas from "html2canvas"
|
|
|
|
- import axios from "axios"
|
|
|
|
|
|
+ import html2canvas from 'html2canvas'
|
|
|
|
+ import axios from 'axios'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
inspectInfoPrint,
|
|
inspectInfoPrint,
|
|
@@ -152,8 +152,8 @@
|
|
inspect: {
|
|
inspect: {
|
|
tidalGrainPrice: 0,
|
|
tidalGrainPrice: 0,
|
|
buckleWeightRatio: 0,
|
|
buckleWeightRatio: 0,
|
|
- natureOfGrainPurchase:"贸易粮",
|
|
|
|
- type:"潮粮"
|
|
|
|
|
|
+ natureOfGrainPurchase:'贸易粮',
|
|
|
|
+ type:'潮粮'
|
|
},
|
|
},
|
|
disabled: false,
|
|
disabled: false,
|
|
disabled1: false,
|
|
disabled1: false,
|
|
@@ -171,7 +171,7 @@
|
|
typeList: ['干粮', '潮粮'],
|
|
typeList: ['干粮', '潮粮'],
|
|
purchasePriceList: [],
|
|
purchasePriceList: [],
|
|
id: '',
|
|
id: '',
|
|
- imgUrl:"",
|
|
|
|
|
|
+ imgUrl:'',
|
|
printData:{},
|
|
printData:{},
|
|
num:0,
|
|
num:0,
|
|
tipFlag:true
|
|
tipFlag:true
|
|
@@ -186,8 +186,8 @@
|
|
this.inspect = {
|
|
this.inspect = {
|
|
tidalGrainPrice: 0,
|
|
tidalGrainPrice: 0,
|
|
buckleWeightRatio: 0,
|
|
buckleWeightRatio: 0,
|
|
- natureOfGrainPurchase:"贸易粮",
|
|
|
|
- type:"潮粮"
|
|
|
|
|
|
+ natureOfGrainPurchase:'贸易粮',
|
|
|
|
+ type:'潮粮'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.cangid = this.$route.query.cangid
|
|
this.cangid = this.$route.query.cangid
|
|
@@ -205,6 +205,10 @@
|
|
this.disabled1 = true
|
|
this.disabled1 = true
|
|
this.information = '编辑'
|
|
this.information = '编辑'
|
|
}
|
|
}
|
|
|
|
+ else{
|
|
|
|
+ this.disabled1 = false
|
|
|
|
+ this.disabled = false
|
|
|
|
+ }
|
|
this.calculation()
|
|
this.calculation()
|
|
this.getList(this.id)
|
|
this.getList(this.id)
|
|
},
|
|
},
|
|
@@ -236,12 +240,12 @@
|
|
},
|
|
},
|
|
closeDialog() {
|
|
closeDialog() {
|
|
html2canvas(this.$refs.saveImg.$el).then(canvas => {
|
|
html2canvas(this.$refs.saveImg.$el).then(canvas => {
|
|
- let dataURL = canvas.toDataURL("image/png");
|
|
|
|
|
|
+ let dataURL = canvas.toDataURL('image/png');
|
|
this.imgUrl = dataURL;
|
|
this.imgUrl = dataURL;
|
|
- if (this.imgUrl !== "") {
|
|
|
|
- let b = this.dataURLtoFile(this.imgUrl, "printImg")
|
|
|
|
|
|
+ if (this.imgUrl !== '') {
|
|
|
|
+ let b = this.dataURLtoFile(this.imgUrl, 'printImg')
|
|
let formdata = new FormData();
|
|
let formdata = new FormData();
|
|
- formdata.append("file", b);
|
|
|
|
|
|
+ formdata.append('file', b);
|
|
axios({
|
|
axios({
|
|
method: 'post',
|
|
method: 'post',
|
|
url: 'https://www.zthymaoyi.com/upload/admin',
|
|
url: 'https://www.zthymaoyi.com/upload/admin',
|
|
@@ -257,13 +261,13 @@
|
|
this.dialogTableVisible = true;
|
|
this.dialogTableVisible = true;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- this.types = ""
|
|
|
|
|
|
+ this.types = ''
|
|
// this.inspect = []
|
|
// this.inspect = []
|
|
this.isShowPrint = false
|
|
this.isShowPrint = false
|
|
this.$router.push({path:'inspectionManagement'})
|
|
this.$router.push({path:'inspectionManagement'})
|
|
},
|
|
},
|
|
typeChange(){
|
|
typeChange(){
|
|
- if(this.inspect.type == "干粮" && this.inspect.goodsName){
|
|
|
|
|
|
+ if(this.inspect.type == '干粮' && this.inspect.goodsName){
|
|
getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
|
|
getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
@@ -272,7 +276,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
closePrint(){
|
|
closePrint(){
|
|
- this.types = ""
|
|
|
|
|
|
+ this.types = ''
|
|
// this.inspect = []
|
|
// this.inspect = []
|
|
this.isShowPrint = false
|
|
this.isShowPrint = false
|
|
this.$router.push({path:'inspectionManagement'})
|
|
this.$router.push({path:'inspectionManagement'})
|
|
@@ -371,7 +375,7 @@
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if(this.inspect.type == "干粮"){
|
|
|
|
|
|
+ if(this.inspect.type == '干粮'){
|
|
if(!this.inspect.dryGrainPrice){
|
|
if(!this.inspect.dryGrainPrice){
|
|
this.$message({
|
|
this.$message({
|
|
message:'干粮价格不能为空',
|
|
message:'干粮价格不能为空',
|
|
@@ -577,7 +581,7 @@
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.inspect = response
|
|
this.inspect = response
|
|
- console.log(this.inspect,"cdsklh")
|
|
|
|
|
|
+ console.log(this.inspect,'cdsklh')
|
|
})
|
|
})
|
|
this.isShowPrint = true
|
|
this.isShowPrint = true
|
|
})
|
|
})
|
|
@@ -588,7 +592,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
cancel() {
|
|
cancel() {
|
|
- this.types = ""
|
|
|
|
|
|
+ this.types = ''
|
|
// this.inspect = []
|
|
// this.inspect = []
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: 'inspectionManagement'
|
|
path: 'inspectionManagement'
|
|
@@ -644,7 +648,7 @@
|
|
this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
|
|
this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(this.inspect.type == "干粮"){
|
|
|
|
|
|
+ if(this.inspect.type == '干粮'){
|
|
getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
|
|
getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|