|
@@ -122,6 +122,11 @@
|
|
|
<i class="el-icon-circle-check"></i>生成账单
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-show="activeName == 'second'">
|
|
|
+ <el-button type="primary" @click="openDetails">
|
|
|
+ <i class="el-icon-circle-check"></i>直接修改详单金额
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
<!-- <el-form-item v-if="isShowOperate">
|
|
|
<el-button type="primary" @click="openReceive()">
|
|
|
<i class="el-icon-document"></i>签收抵达</el-button
|
|
@@ -590,6 +595,19 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="detailsRemark"
|
|
|
+ label="直接修改备注"
|
|
|
+ width="120px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="showPhoto(scope.row)" type="text" size="small">
|
|
|
+ {{scope.row.detailsRemark}}
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
@@ -797,7 +815,7 @@
|
|
|
<el-upload
|
|
|
ref="statementUpload"
|
|
|
list-type="picture-card"
|
|
|
- action="/api/v1/otms/addtmstruckArrivalResult"
|
|
|
+ action="noAction"
|
|
|
:limit="10"
|
|
|
:on-change="fileChange1"
|
|
|
:on-preview="handlePictureCardPreview"
|
|
@@ -817,9 +835,59 @@
|
|
|
>确定</el-button
|
|
|
>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="修改详单金额"
|
|
|
+ :visible.sync="showDetailsUpLoad"
|
|
|
+ :before-close="closeUpload2"
|
|
|
+ >
|
|
|
+ <el-form style="margin-left:20%">
|
|
|
+ <el-form-item label="修改金额">
|
|
|
+ <el-input
|
|
|
+ v-model="detailAmount"
|
|
|
+ style="width:200px"
|
|
|
+ type="number"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="修改备注">
|
|
|
+ <el-input
|
|
|
+ v-model="detailRemark"
|
|
|
+ style="width:200px"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="凭证图片" style="">
|
|
|
+ <el-upload
|
|
|
+ ref="detailsUpload"
|
|
|
+ action='noAction'
|
|
|
+ list-type="picture-card"
|
|
|
+ :limit="10"
|
|
|
+ :on-change="fileChange2"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-exceed="exceed"
|
|
|
+ accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP"
|
|
|
+ :auto-upload="false"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="updateTruckDetail"
|
|
|
+ :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>
|
|
|
+ <el-dialog
|
|
|
+ title="查看凭证"
|
|
|
+ :visible.sync="showPhotoPreview"
|
|
|
+ :before-close=" ()=>showPhotoPreview=false "
|
|
|
+ >
|
|
|
+ <img width="100%" v-for="(item,index) in previewList" :key="index" :src="item" alt="" />
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -1138,6 +1206,12 @@ export default {
|
|
|
excludeTax: null,
|
|
|
statementList: [],
|
|
|
showStatementUpLoad: false,
|
|
|
+ detailAmount:null,
|
|
|
+ detailsList:[],
|
|
|
+ showDetailsUpLoad:false,
|
|
|
+ detailRemark:null,
|
|
|
+ showPhotoPreview:false,
|
|
|
+ previewList:[],
|
|
|
selecteddetailsOrderAmount: 0,
|
|
|
scrollLeft: 0,
|
|
|
scrollLeft1: 0,
|
|
@@ -1615,6 +1689,85 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ openDetails() {
|
|
|
+ console.log(this.$refs.tableRef1.selection, 'selection')
|
|
|
+ if (
|
|
|
+ !this.$refs.tableRef1.selection ||
|
|
|
+ this.$refs.tableRef1.selection.length != 1
|
|
|
+ ) {
|
|
|
+ this.$message.warning('请选择需要上传发票的订单,一次只允许修改一个')
|
|
|
+ } else {
|
|
|
+ this.detailAmount = null
|
|
|
+ this.detailRemark = null
|
|
|
+ this.detailsList = []
|
|
|
+ let data = []
|
|
|
+ if (this.setteldAllselectValue == 1) {
|
|
|
+ data = this.tableData1
|
|
|
+ } else {
|
|
|
+ data = this.$refs.tableRef1.selection
|
|
|
+ }
|
|
|
+ this.selecteddetailsOrderAmount = data.reduce((prev, item) => {
|
|
|
+ return item.detailsAmount + prev
|
|
|
+ }, 0)
|
|
|
+ this.selecteddetailsOrderAmount = this.selecteddetailsOrderAmount.toFixed(
|
|
|
+ 2
|
|
|
+ )
|
|
|
+ console.log(
|
|
|
+ this.selecteddetailsOrderAmount,
|
|
|
+ 'selecteddetailsOrderAmount'
|
|
|
+ )
|
|
|
+ this.showDetailsUpLoad = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ updateTruckDetail(){
|
|
|
+ this.isLoading = true
|
|
|
+ if (!this.detailAmount || !this.detailRemark) {
|
|
|
+ this.$message.warning('请填写所有信息!')
|
|
|
+ this.isLoading = false
|
|
|
+ } else if (this.detailsList.length < 1) {
|
|
|
+ this.$message.warning('请上传凭证')
|
|
|
+ this.isLoading = false
|
|
|
+ } else {
|
|
|
+ let data = []
|
|
|
+ if (this.setteldAllselectValue == 1) {
|
|
|
+ data = this.tableData1
|
|
|
+ } else {
|
|
|
+ data = this.$refs.tableRef1.selection
|
|
|
+ }
|
|
|
+ let orderList = data.map(e => {
|
|
|
+ return e.orderId
|
|
|
+ })
|
|
|
+ console.log(orderList, 'orderList')
|
|
|
+ let formData = new window.FormData()
|
|
|
+ this.detailsList.forEach((item,index)=>{
|
|
|
+ formData.append('file'+index, item.raw)
|
|
|
+ });
|
|
|
+ formData.append('orderList', orderList)
|
|
|
+ formData.append('userId', getCookie('userId'))
|
|
|
+ formData.append('detailAmount',this.detailAmount);
|
|
|
+ formData.append('detailRemark',this.detailRemark);
|
|
|
+ let options = {
|
|
|
+ url: '/api/v1/bms/updateTruckDetail',
|
|
|
+ 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.setteldAllselectValue = 0
|
|
|
+ this.onclick();
|
|
|
+ this.closeUpload2()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data.data)
|
|
|
+ this.isLoading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
receiveClick(src, title) {
|
|
|
// this.dialogImageUrl = src
|
|
|
downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
|
|
@@ -2014,7 +2167,16 @@ export default {
|
|
|
this.statementList = fileList
|
|
|
},
|
|
|
fileChange2(file, fileList) {
|
|
|
- this.fileListReceive = fileList
|
|
|
+ this.detailsList = fileList
|
|
|
+ },
|
|
|
+ showPhoto(row){
|
|
|
+ this.showPhotoPreview=true;
|
|
|
+ this.axios.post('/api/v1/uc/getPicture',{
|
|
|
+ urls:row.photo
|
|
|
+ }).then((res)=>{
|
|
|
+ console.log(res);
|
|
|
+ this.previewList=res.data;
|
|
|
+ })
|
|
|
},
|
|
|
exceed() {
|
|
|
this.$message.warning('超出上传数量!')
|
|
@@ -2029,6 +2191,11 @@ export default {
|
|
|
this.$refs.statementUpload.clearFiles()
|
|
|
// this.$refs.receive.clearFiles()
|
|
|
},
|
|
|
+ closeUpload2(){
|
|
|
+ this.showDetailsUpLoad = false
|
|
|
+ this.isLoading = false
|
|
|
+ this.$refs.detailsUpload.clearFiles()
|
|
|
+ },
|
|
|
//防抖函数--防止用户重复点击
|
|
|
debounce(func, delay) {
|
|
|
let timer = null
|