添加车辆图片修改成合同和图片修改

product
bawei 2 years ago
parent 2c704c68e7
commit 602483053d

@ -153,4 +153,10 @@ public class TradeuploadInfoVO{
@JsonProperty("purchaseName") @JsonProperty("purchaseName")
private String purchaseName; private String purchaseName;
@JsonProperty("salesStatus")
private String salesStatus;
@JsonProperty("purchaseStatus")
private String purchaseStatus;
} }

@ -185,4 +185,10 @@ public class TradeuploadListVO{
/** 收货单价 **/ /** 收货单价 **/
@JsonProperty("collectPrice") @JsonProperty("collectPrice")
private String collectPrice; private String collectPrice;
@JsonProperty("salesStatus")
private String salesStatus;
@JsonProperty("purchaseStatus")
private String purchaseStatus;
} }

@ -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){
// var purchaseName1=this.dataForm.purchaseName;
var purchaseIdOld=this.dataForm.purchaseIdOld;
var salesIdOld=this.dataForm.salesIdOld;
if (purchaseIdOld !=this.dataForm.purchaseId ){
if (purchaseStatus==0){
this.$message({ this.$message({
message: '毛重不得小于皮重+扣重+净重', message: '采购订单已经生成,现在是待开票状态',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}) })
return return
} }
if(buckleWeight >= netWeight){ if (purchaseStatus==1){
this.$message({ this.$message({
message: '扣重不得大于净重', message: '采购订单已经生成,现在是开票中状态',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}) })
return return
} }
if(buckleWeight >= grossWeight){ if (purchaseStatus==2){
this.$message({ this.$message({
message: '扣重不得大于毛重', message: '采购订单已经生成,现在是已入库状态',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}) })
return return
} }
if (purchaseStatus==3){
this.$message({
message: '采购订单已经生成,现在是归档状态',
type: 'success',
duration: 1000
})
return
}
}
if (salesIdOld !=this.dataForm.salesId ){
if (salesStatus==0){
this.$message({
message: '销售订单已经生成,现在是待发货状态',
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
}, },
}, },

@ -649,7 +649,7 @@
type="text" type="text"
@click="addOvheicle(scope.row.id)" @click="addOvheicle(scope.row.id)"
v-has="'btn_addOvheicle'" v-has="'btn_addOvheicle'"
>添加车辆图片 >编辑合同与图片
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -1275,10 +1275,10 @@ export default {
this.$refs.JNPFForm.init(id, false); this.$refs.JNPFForm.init(id, false);
}); });
}, },
addOvheicle(id, isDetail) { addOvheicle(id, isDetail,salesStatus) {
this.formVisible6 = true; this.formVisible6 = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm6.init(id, isDetail); this.$refs.JNPFForm6.init(id, isDetail,salesStatus);
}); });
}, },
exportData() { exportData() {

Loading…
Cancel
Save