|
@@ -98,6 +98,10 @@
|
|
|
><i class="el-icon-map-location"></i>实时路径</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="openReceive()" >
|
|
|
+ <i class="el-icon-document"></i>签收抵达</el-button>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<span style="margin-left: 1rem;font-size:16px">车数/件数:</span>
|
|
|
<span style="font-size:16px"
|
|
@@ -807,6 +811,49 @@
|
|
|
><currentLocation :carNumber="carNumber"></currentLocation
|
|
|
></vxe-modal>
|
|
|
</div>
|
|
|
+ <el-dialog title="抵达签收" :visible.sync="arrivalReceiving" :before-close="closeUpload">
|
|
|
+ <el-form :inline="true" style="margin-left:20%">
|
|
|
+ <el-form-item label="车牌号码">
|
|
|
+ <el-input v-model="capacityNumber" disabled style="width:300px"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="签收地址">
|
|
|
+ <el-input v-model="location" style="width:300px"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="抵达图片(满货箱)">
|
|
|
+ <el-upload
|
|
|
+ ref="arrival"
|
|
|
+ list-type="picture-card"
|
|
|
+ action="/api/v1/otms/addtmstruckArrivalResult"
|
|
|
+ :limit="1"
|
|
|
+ :on-change="fileChange1"
|
|
|
+ :on-exceed="exceed"
|
|
|
+ accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
|
|
|
+ :auto-upload="false">
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ <el-dialog :visible.sync="dialogVisible1">
|
|
|
+ <img width="100%" :src="dialogImageUrl" alt="">
|
|
|
+ </el-dialog>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="签收图片(空货箱、质保书、签收单)">
|
|
|
+ <el-upload
|
|
|
+ ref="receive"
|
|
|
+ list-type="picture-card"
|
|
|
+ action="null"
|
|
|
+ :limit="5"
|
|
|
+ :on-change="fileChange2"
|
|
|
+ :on-exceed="exceed"
|
|
|
+ accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
|
|
|
+ :auto-upload="false">
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ <el-dialog :visible.sync="dialogVisible2">
|
|
|
+ <img width="100%" :src="dialogImageUrl" alt="">
|
|
|
+ </el-dialog>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-button type="primary" @click="arrivalAndReceive" :loading="isLoading" style="margin-left:40%">确定</el-button>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -991,7 +1038,17 @@ export default {
|
|
|
filtermaterialSpe: [],
|
|
|
filterMap: {},
|
|
|
//权限控制
|
|
|
- notRoutList: []
|
|
|
+ notRoutList: [],
|
|
|
+ location:null,
|
|
|
+ orderNumber:null,
|
|
|
+ capacityNumber:null,
|
|
|
+ arrivalReceiving:false,
|
|
|
+ fileListArrival:[],
|
|
|
+ fileListReceive:[],
|
|
|
+ dialogImageUrl: '',
|
|
|
+ dialogVisible1: false,
|
|
|
+ dialogVisible2: false,
|
|
|
+ isLoading:false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -1048,6 +1105,98 @@ export default {
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
+ openReceive() {
|
|
|
+ if (Object.values(this.steelMap).length == 0) {
|
|
|
+ this.$message.warning('请选择需要补录的实绩')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let row = this.steelMap;
|
|
|
+ if(!row.outGateTime){
|
|
|
+ this.$message.warning('该车未出厂,不允许签收')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (row.arrivalAddress != null && row.arrivalAddress!=null) {
|
|
|
+ this.$message.warning('该车已有抵达签收实绩,不允许签收')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.location=row.addressPlace;
|
|
|
+ this.orderNumber=row.orderNo;
|
|
|
+ this.capacityNumber=row.capacityNo;
|
|
|
+ this.arrivalReceiving=true;
|
|
|
+ },
|
|
|
+ arrivalAndReceive(){
|
|
|
+ if(!this.location){
|
|
|
+ this.$message.warning('请填写签收地址');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(this.fileListArrival.length < 1){
|
|
|
+ this.$message.warning('请上传抵达图片');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(this.fileListReceive.length < 3){
|
|
|
+ this.$message.warning('签收图最少三张');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading=true;
|
|
|
+ //上传抵达
|
|
|
+ let formData = new window.FormData();
|
|
|
+ formData.append("file",this.fileListArrival[0].raw);
|
|
|
+ formData.append("orderNumber",this.orderNumber);
|
|
|
+ formData.append("resultArrivalAddress",this.location);
|
|
|
+ let options = { // 设置axios的参数
|
|
|
+ url: '/api/v1/otms/addtmstruckArrivalResult',
|
|
|
+ data: formData,
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.axios(options).then((res) => {
|
|
|
+ console.log("arrivalRes:",res);
|
|
|
+ //上传签收
|
|
|
+ let formData = new window.FormData();
|
|
|
+ let request=''
|
|
|
+ this.fileListReceive.forEach((item,index)=>{
|
|
|
+ formData.append("file"+index,item.raw);
|
|
|
+ })
|
|
|
+ formData.append("orderNumber",this.orderNumber);
|
|
|
+ formData.append("resultArrivalAddress",this.location);
|
|
|
+ formData.append("num",request.length);
|
|
|
+ let options = {
|
|
|
+ url: '/api/v1/otms/addTmstruckReceiptResult',
|
|
|
+ data: formData,
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.axios(options).then((res) => {
|
|
|
+ console.log("receiveRes:",res);
|
|
|
+ if(res.data.data==4){
|
|
|
+ this.$message.error("新增抵达失败!");
|
|
|
+ this.isLoading=false;
|
|
|
+ }else{
|
|
|
+ this.$message.success("上传成功!");
|
|
|
+ this.closeUpload();
|
|
|
+ this.$router.go(0);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fileChange1(file, fileList){
|
|
|
+ this.fileListArrival=fileList;
|
|
|
+ },
|
|
|
+ fileChange2(file, fileList){
|
|
|
+ this.fileListReceive=fileList;
|
|
|
+ },
|
|
|
+ exceed(){
|
|
|
+ this.$message.warning("超出上传数量!");
|
|
|
+ },
|
|
|
+ closeUpload(){
|
|
|
+ this.arrivalReceiving=false;
|
|
|
+ this.$refs.arrival.clearFiles();
|
|
|
+ this.$refs.receive.clearFiles();
|
|
|
+ },
|
|
|
//防抖函数--防止用户重复点击
|
|
|
debounce(func, delay) {
|
|
|
let timer = null
|