|
@@ -104,11 +104,16 @@
|
|
><i class="el-icon-map-location"></i>实时路径</el-button
|
|
><i class="el-icon-map-location"></i>实时路径</el-button
|
|
> -->
|
|
> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item>
|
|
|
|
|
|
+ <el-form-item v-show="activeName=='first'">
|
|
<el-button type="primary" @click="makeSurePrice"
|
|
<el-button type="primary" @click="makeSurePrice"
|
|
v-if="!notRoutList.includes('capacityNo')"
|
|
v-if="!notRoutList.includes('capacityNo')"
|
|
><i class="el-icon-circle-check"></i>确认执行价</el-button
|
|
><i class="el-icon-circle-check"></i>确认执行价</el-button
|
|
>
|
|
>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-show="activeName=='second'">
|
|
|
|
+ <el-button type="primary" @click="openStatement">
|
|
|
|
+ <i class="el-icon-circle-check"></i>生成账单
|
|
|
|
+ </el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- <el-form-item v-if="isShowOperate">
|
|
<!-- <el-form-item v-if="isShowOperate">
|
|
<el-button type="primary" @click="openReceive()">
|
|
<el-button type="primary" @click="openReceive()">
|
|
@@ -345,7 +350,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
- <el-tab-pane label="已结算" name="second">
|
|
|
|
|
|
+ <el-tab-pane label="已确认" name="second">
|
|
<div class="table1">
|
|
<div class="table1">
|
|
<el-table
|
|
<el-table
|
|
:data="visibleList1"
|
|
:data="visibleList1"
|
|
@@ -366,6 +371,7 @@
|
|
individual-panel
|
|
individual-panel
|
|
@resetTable="reset"
|
|
@resetTable="reset"
|
|
>
|
|
>
|
|
|
|
+ <el-table-column type="selection" width="30" label="选择"></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
width="50"
|
|
width="50"
|
|
label="序号"
|
|
label="序号"
|
|
@@ -666,6 +672,42 @@
|
|
<el-button type="primary" @click="makeSure">只修改单价</el-button>
|
|
<el-button type="primary" @click="makeSure">只修改单价</el-button>
|
|
</div>
|
|
</div>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="上传账单"
|
|
|
|
+ :visible.sync="showStatementUpLoad"
|
|
|
|
+ :before-close="closeUpload"
|
|
|
|
+ >
|
|
|
|
+ <el-form style="margin-left:20%">
|
|
|
|
+ <el-form-item label="发票金额">
|
|
|
|
+ <el-input v-model="excludeTax" style="width:200px" type="number"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="发票图片" style="">
|
|
|
|
+ <el-upload
|
|
|
|
+ ref="statementUpload"
|
|
|
|
+ list-type="picture-card"
|
|
|
|
+ action="/api/v1/otms/addtmstruckArrivalResult"
|
|
|
|
+ :limit="1"
|
|
|
|
+ :on-change="fileChange1"
|
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
|
+ :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-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="generateStatement"
|
|
|
|
+ :loading="isLoading"
|
|
|
|
+ style="margin-left:40%"
|
|
|
|
+ >确定</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog :visible.sync="dialogVisible" width="80%">
|
|
|
|
+ <img width="100%" :src="dialogImageUrl" alt="" />
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -908,7 +950,6 @@ export default {
|
|
location: null,
|
|
location: null,
|
|
orderNumber: null,
|
|
orderNumber: null,
|
|
capacityNumber: null,
|
|
capacityNumber: null,
|
|
- arrivalReceiving: false,
|
|
|
|
fileListArrival: [],
|
|
fileListArrival: [],
|
|
fileListReceive: [],
|
|
fileListReceive: [],
|
|
dialogImageUrl: '',
|
|
dialogImageUrl: '',
|
|
@@ -946,7 +987,10 @@ export default {
|
|
opacity: 0.8, //滚动条透明度
|
|
opacity: 0.8, //滚动条透明度
|
|
'overflow-x': 'hidden'
|
|
'overflow-x': 'hidden'
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ excludeTax:null,
|
|
|
|
+ statementList:[],
|
|
|
|
+ showStatementUpLoad:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -1094,6 +1138,53 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ openStatement(){
|
|
|
|
+ console.log(this.$refs.tableRef1.selection, 'selection');
|
|
|
|
+ if(!this.$refs.tableRef1.selection || this.$refs.tableRef1.selection.length<=0){
|
|
|
|
+ this.$message.warning("请选择需要上传发票的订单");
|
|
|
|
+ }else{
|
|
|
|
+ this.excludeTax=null;
|
|
|
|
+ this.statementList=[];
|
|
|
|
+ this.showStatementUpLoad=true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ generateStatement(){
|
|
|
|
+ this.isLoading=true;
|
|
|
|
+ if(!this.excludeTax){
|
|
|
|
+ this.$message.warning('请填写发票金额')
|
|
|
|
+ this.isLoading=false;
|
|
|
|
+ }else if(this.statementList.length < 1) {
|
|
|
|
+ this.$message.warning('请上传发票')
|
|
|
|
+ this.isLoading=false;
|
|
|
|
+ }else{
|
|
|
|
+ let orderList = this.$refs.tableRef1.selection.map(e => {
|
|
|
|
+ return e.orderId
|
|
|
|
+ })
|
|
|
|
+ let formData = new window.FormData();
|
|
|
|
+ formData.append('file0', this.statementList[0].raw);
|
|
|
|
+ formData.append('orderList',orderList);
|
|
|
|
+ formData.append('excludeTax', this.excludeTax);
|
|
|
|
+ formData.append('userId',getCookie('userId'));
|
|
|
|
+ let options = {
|
|
|
|
+ url: '/api/v1/bms/addTruckStatement',
|
|
|
|
+ data: formData,
|
|
|
|
+ method: 'post',
|
|
|
|
+ headers: {
|
|
|
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.axios(options).then(res => {
|
|
|
|
+ console.log('uploadRes:', res)
|
|
|
|
+ if(res.data.status=='succeed'){
|
|
|
|
+ this.$message.success('上传成功!')
|
|
|
|
+ this.closeUpload()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.data.data);
|
|
|
|
+ this.isLoading = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
receiveClick(src, title) {
|
|
receiveClick(src, title) {
|
|
// this.dialogImageUrl = src
|
|
// this.dialogImageUrl = src
|
|
downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
|
|
downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
|
|
@@ -1382,7 +1473,7 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
fileChange1(file, fileList) {
|
|
fileChange1(file, fileList) {
|
|
- this.fileListArrival = fileList
|
|
|
|
|
|
+ this.statementList = fileList
|
|
},
|
|
},
|
|
fileChange2(file, fileList) {
|
|
fileChange2(file, fileList) {
|
|
this.fileListReceive = fileList
|
|
this.fileListReceive = fileList
|
|
@@ -1395,10 +1486,10 @@ export default {
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
},
|
|
},
|
|
closeUpload() {
|
|
closeUpload() {
|
|
- this.arrivalReceiving = false
|
|
|
|
|
|
+ this.showStatementUpLoad = false
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
- this.$refs.arrival.clearFiles()
|
|
|
|
- this.$refs.receive.clearFiles()
|
|
|
|
|
|
+ this.$refs.statementUpload.clearFiles()
|
|
|
|
+ // this.$refs.receive.clearFiles()
|
|
},
|
|
},
|
|
//防抖函数--防止用户重复点击
|
|
//防抖函数--防止用户重复点击
|
|
debounce(func, delay) {
|
|
debounce(func, delay) {
|