|
|
@ -1,12 +1,12 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<el-dialog :title="!dataForm.id ? '添加车辆图片' : isDetail ? '添加车辆图片':'添加车辆图片'" :close-on-click-modal="false" append-to-body
|
|
|
|
<el-dialog :title="!dataForm.id ? '编辑合同与图片' : isDetail ? '编辑合同与图片':'编辑合同与图片'" :close-on-click-modal="false" append-to-body
|
|
|
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
|
|
|
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
|
|
|
|
<el-row :gutter="15" class="">
|
|
|
|
<el-row :gutter="15" class="">
|
|
|
|
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
|
|
|
|
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
|
|
|
|
<template v-if="!loading">
|
|
|
|
<template v-if="!loading">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="磅单上传" disabled prop="poundPictures">
|
|
|
|
<el-form-item label="磅单上传" prop="poundPictures">
|
|
|
|
<JNPF-UploadImgB disabled v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1" :disabled="true">
|
|
|
|
<JNPF-UploadImgB v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1">
|
|
|
|
</JNPF-UploadImgB>
|
|
|
|
</JNPF-UploadImgB>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -37,7 +37,7 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="销售合同" prop="salesId">
|
|
|
|
<el-form-item label="销售合同" prop="salesId">
|
|
|
|
<popupSelect disabled v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
|
|
|
|
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
|
|
|
|
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
|
|
|
|
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
|
|
|
|
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId"
|
|
|
|
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId"
|
|
|
|
hasPage :pageSize="20">
|
|
|
|
hasPage :pageSize="20">
|
|
|
@ -46,7 +46,7 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="采购合同" prop="purchaseId">
|
|
|
|
<el-form-item label="采购合同" prop="purchaseId">
|
|
|
|
<popupSelect disabled v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
|
|
|
|
<popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
|
|
|
|
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
|
|
|
|
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
|
|
|
|
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
|
|
|
|
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
|
|
|
|
hasPage :pageSize="20" @change="customerSelect2">
|
|
|
|
hasPage :pageSize="20" @change="customerSelect2">
|
|
|
@ -198,6 +198,7 @@
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {},
|
|
|
|
components: {},
|
|
|
|
props: [],
|
|
|
|
props: [],
|
|
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
submitDisabled: false,
|
|
|
|
submitDisabled: false,
|
|
|
@ -238,6 +239,13 @@
|
|
|
|
remark: '',
|
|
|
|
remark: '',
|
|
|
|
creatorTime: "",
|
|
|
|
creatorTime: "",
|
|
|
|
isExamine: "",
|
|
|
|
isExamine: "",
|
|
|
|
|
|
|
|
purchaseStatus: 0,
|
|
|
|
|
|
|
|
salesStatus: 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
purchaseIdOld:0,
|
|
|
|
|
|
|
|
purchaseId:0,
|
|
|
|
|
|
|
|
salesIdOld:0,
|
|
|
|
|
|
|
|
salesId:0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
materialId: [{
|
|
|
|
materialId: [{
|
|
|
@ -477,6 +485,7 @@
|
|
|
|
this.dataForm.buckleWeight = res.data.buckleWeight;
|
|
|
|
this.dataForm.buckleWeight = res.data.buckleWeight;
|
|
|
|
this.dataForm.netWeight = res.data.netWeight;
|
|
|
|
this.dataForm.netWeight = res.data.netWeight;
|
|
|
|
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
|
|
|
|
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changePicture(a, b) {
|
|
|
|
changePicture(a, b) {
|
|
|
|
this.dataForm.vehiclePictures = JSON.parse(b.vehiclephotos);
|
|
|
|
this.dataForm.vehiclePictures = JSON.parse(b.vehiclephotos);
|
|
|
@ -516,19 +525,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// poundAI(){
|
|
|
|
|
|
|
|
// let formData = new FormData();
|
|
|
|
|
|
|
|
// let file = this.dataForm.poundPictures
|
|
|
|
|
|
|
|
// formData.append('file',file);
|
|
|
|
|
|
|
|
// request({
|
|
|
|
|
|
|
|
// url: '/api/tradeupload/Tradeupload/poundai',
|
|
|
|
|
|
|
|
// method: 'post',
|
|
|
|
|
|
|
|
// data: formData
|
|
|
|
|
|
|
|
// }).then(res => {
|
|
|
|
|
|
|
|
// this.dataInfo(res.data)
|
|
|
|
|
|
|
|
// this.loading = false
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
clearData(data) {
|
|
|
|
clearData(data) {
|
|
|
|
for (let key in data) {
|
|
|
|
for (let key in data) {
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
@ -566,38 +563,112 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单提交
|
|
|
|
// 表单提交
|
|
|
|
dataFormSubmit() {
|
|
|
|
dataFormSubmit() {
|
|
|
|
var tareWeight = this.dataForm.tareWeight;//皮重
|
|
|
|
var purchaseStatus = this.dataForm.purchaseStatus;//采购状态
|
|
|
|
var grossWeight = this.dataForm.grossWeight;//毛重
|
|
|
|
var salesStatus = this.dataForm.salesStatus;//销售状态
|
|
|
|
var buckleWeight = this.dataForm.buckleWeight;//扣重
|
|
|
|
|
|
|
|
var netWeight = this.dataForm.netWeight;//净重
|
|
|
|
|
|
|
|
this.dataForm.isExamine = '1';
|
|
|
|
this.dataForm.isExamine = '1';
|
|
|
|
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
|
|
|
|
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
|
|
|
|
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
|
|
|
|
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
|
|
|
|
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
|
|
|
|
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
|
|
|
|
if(grossWeight < tareWeight + buckleWeight + netWeight){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
// var purchaseName1=this.dataForm.purchaseName;
|
|
|
|
message: '毛重不得小于皮重+扣重+净重',
|
|
|
|
var purchaseIdOld=this.dataForm.purchaseIdOld;
|
|
|
|
type: 'success',
|
|
|
|
var salesIdOld=this.dataForm.salesIdOld;
|
|
|
|
duration: 1000
|
|
|
|
if (purchaseIdOld !=this.dataForm.purchaseId ){
|
|
|
|
})
|
|
|
|
if (purchaseStatus==0){
|
|
|
|
return
|
|
|
|
this.$message({
|
|
|
|
}
|
|
|
|
message: '采购订单已经生成,现在是待开票状态',
|
|
|
|
if(buckleWeight >= netWeight){
|
|
|
|
type: 'success',
|
|
|
|
this.$message({
|
|
|
|
duration: 1000
|
|
|
|
message: '扣重不得大于净重',
|
|
|
|
})
|
|
|
|
type: 'success',
|
|
|
|
return
|
|
|
|
duration: 1000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
if (purchaseStatus==1){
|
|
|
|
return
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '采购订单已经生成,现在是开票中状态',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (purchaseStatus==2){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '采购订单已经生成,现在是已入库状态',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (purchaseStatus==3){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '采购订单已经生成,现在是归档状态',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(buckleWeight >= grossWeight){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '扣重不得大于毛重',
|
|
|
|
if (salesIdOld !=this.dataForm.salesId ){
|
|
|
|
type: 'success',
|
|
|
|
if (salesStatus==0){
|
|
|
|
duration: 1000
|
|
|
|
this.$message({
|
|
|
|
})
|
|
|
|
message: '销售订单已经生成,现在是待发货状态',
|
|
|
|
return
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (salesStatus==1){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '销售订单已经生成,现在是待开票状态',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (salesStatus==2){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '销售订单已经生成,现在是待回款状态',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (salesStatus==3){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '销售订单已经生成,现在是归档状态',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if(grossWeight < tareWeight + buckleWeight + netWeight){
|
|
|
|
|
|
|
|
// this.$message({
|
|
|
|
|
|
|
|
// message: '毛重不得小于皮重+扣重+净重',
|
|
|
|
|
|
|
|
// type: 'success',
|
|
|
|
|
|
|
|
// duration: 1000
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if(buckleWeight >= netWeight){
|
|
|
|
|
|
|
|
// this.$message({
|
|
|
|
|
|
|
|
// message: '扣重不得大于净重',
|
|
|
|
|
|
|
|
// type: 'success',
|
|
|
|
|
|
|
|
// duration: 1000
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if(buckleWeight >= grossWeight){
|
|
|
|
|
|
|
|
// this.$message({
|
|
|
|
|
|
|
|
// message: '扣重不得大于毛重',
|
|
|
|
|
|
|
|
// type: 'success',
|
|
|
|
|
|
|
|
// duration: 1000
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
// }
|
|
|
|
this.$refs['elForm'].validate((valid) => {
|
|
|
|
this.$refs['elForm'].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
this.request2()
|
|
|
|
this.request2()
|
|
|
@ -736,6 +807,9 @@
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
_dataAll.originPlace = []
|
|
|
|
_dataAll.originPlace = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_dataAll.purchaseIdOld = _dataAll.purchaseId;
|
|
|
|
|
|
|
|
_dataAll.salesIdOld = _dataAll.salesId;
|
|
|
|
|
|
|
|
console.log(_dataAll)
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|