|
@@ -67,7 +67,7 @@
|
|
|
style="width:150px"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
- <el-button type="primary" class="btn" @click="onclick">
|
|
|
+ <el-button type="primary" class="btn" @click="getSteelReport">
|
|
|
<i class="el-icon-search"></i>
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
@@ -104,11 +104,16 @@
|
|
|
><i class="el-icon-map-location"></i>实时路径</el-button
|
|
|
> -->
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item v-show="activeName=='first'">
|
|
|
<el-button type="primary" @click="makeSurePrice"
|
|
|
v-if="!notRoutList.includes('capacityNo')"
|
|
|
><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 v-if="isShowOperate">
|
|
|
<el-button type="primary" @click="openReceive()">
|
|
@@ -168,11 +173,10 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="orderMakingTime"
|
|
|
+ prop="saleMakeDate"
|
|
|
label="制单时间"
|
|
|
width="110px"
|
|
|
align="center"
|
|
|
- show-overflow-tooltip
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -346,7 +350,7 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="已结算" name="second">
|
|
|
+ <el-tab-pane label="已确认" name="second">
|
|
|
<div class="table1">
|
|
|
<el-table
|
|
|
:data="visibleList1"
|
|
@@ -355,18 +359,12 @@
|
|
|
border
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
:height="maxHeight"
|
|
|
- :row-class-name="tableRowClassName"
|
|
|
- @cell-click="cellClik"
|
|
|
- @cell-mouse-enter="cellMouse1"
|
|
|
- @cell-mouse-leave="cellLeave1"
|
|
|
- @row-click="rowClick"
|
|
|
:cell-style="cellStyle"
|
|
|
@filter-change="filterChange"
|
|
|
- :key="saleSteelKey"
|
|
|
id="salesLogisticsStat_saleSteelReports_table"
|
|
|
individual-panel
|
|
|
- @resetTable="reset"
|
|
|
>
|
|
|
+ <el-table-column type="selection" width="30" label="选择"></el-table-column>
|
|
|
<el-table-column
|
|
|
width="50"
|
|
|
label="序号"
|
|
@@ -386,11 +384,10 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="orderMakingTime"
|
|
|
+ prop="saleMakeDate"
|
|
|
label="制单时间"
|
|
|
width="110px"
|
|
|
align="center"
|
|
|
- show-overflow-tooltip
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -668,6 +665,42 @@
|
|
|
<el-button type="primary" @click="makeSure">只修改单价</el-button>
|
|
|
</div>
|
|
|
</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>
|
|
|
</template>
|
|
|
|
|
@@ -910,7 +943,6 @@ export default {
|
|
|
location: null,
|
|
|
orderNumber: null,
|
|
|
capacityNumber: null,
|
|
|
- arrivalReceiving: false,
|
|
|
fileListArrival: [],
|
|
|
fileListReceive: [],
|
|
|
dialogImageUrl: '',
|
|
@@ -948,7 +980,10 @@ export default {
|
|
|
opacity: 0.8, //滚动条透明度
|
|
|
'overflow-x': 'hidden'
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ excludeTax:null,
|
|
|
+ statementList:[],
|
|
|
+ showStatementUpLoad:false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -1096,6 +1131,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) {
|
|
|
// this.dialogImageUrl = src
|
|
|
downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
|
|
@@ -1163,6 +1245,8 @@ export default {
|
|
|
//只修改单价
|
|
|
makeSure() {
|
|
|
//若没有单价Id
|
|
|
+ console.log("获取数据")
|
|
|
+ console.log(this.userId)
|
|
|
console.log(this.makeSurePriceOrderList)
|
|
|
if (this.makeSurePriceOrderList.length == 0) {
|
|
|
this.$message({
|
|
@@ -1183,6 +1267,7 @@ export default {
|
|
|
})
|
|
|
let mapValue = {}
|
|
|
mapValue.mapList = mapList
|
|
|
+ mapValue.userId=this.userId
|
|
|
// //是否确定修改详单地址!
|
|
|
// this.$confirm('确定修改', '提示', {
|
|
|
// confirmButtonText: '仅修改单价',
|
|
@@ -1198,7 +1283,7 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.data.code == '200') {
|
|
|
this.$message.success('修改详单单价成功!')
|
|
|
- this.$refs.tableRef.clearSelection()
|
|
|
+ //this.$refs.tableRef.clearSelection()
|
|
|
//重置未结算详单表单信息
|
|
|
// this.operation(this.steelMap)
|
|
|
this.loadNewData()
|
|
@@ -1211,6 +1296,8 @@ export default {
|
|
|
},
|
|
|
//修改单价和收货地址
|
|
|
makeSureAll(){
|
|
|
+ console.log("获取数据")
|
|
|
+ console.log(this.userId)
|
|
|
if (this.makeSurePriceOrderList.length == 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
@@ -1231,11 +1318,14 @@ export default {
|
|
|
let mapValue = {}
|
|
|
mapValue.mapList = mapList
|
|
|
mapValue.updatePlace = 1
|
|
|
+ mapValue.userId=this.userId
|
|
|
+ console.log("要的数据")
|
|
|
+ console.log(mapValue)
|
|
|
this.axios
|
|
|
.post('/api/v1/bms/updateBatchDetailsOrder', mapValue)
|
|
|
.then(res => {
|
|
|
if (res.data.code == '200') {
|
|
|
- this.$refs.tableRef.clearSelection()
|
|
|
+ //this.$refs.tableRef.clearSelection()
|
|
|
this.$message.success('修改详单单价和地址成功!')
|
|
|
// this.operation(this.steelMap)
|
|
|
this.loadNewData()
|
|
@@ -1376,7 +1466,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
fileChange1(file, fileList) {
|
|
|
- this.fileListArrival = fileList
|
|
|
+ this.statementList = fileList
|
|
|
},
|
|
|
fileChange2(file, fileList) {
|
|
|
this.fileListReceive = fileList
|
|
@@ -1389,10 +1479,10 @@ export default {
|
|
|
this.dialogVisible = true
|
|
|
},
|
|
|
closeUpload() {
|
|
|
- this.arrivalReceiving = false
|
|
|
+ this.showStatementUpLoad = false
|
|
|
this.isLoading = false
|
|
|
- this.$refs.arrival.clearFiles()
|
|
|
- this.$refs.receive.clearFiles()
|
|
|
+ this.$refs.statementUpload.clearFiles()
|
|
|
+ // this.$refs.receive.clearFiles()
|
|
|
},
|
|
|
//防抖函数--防止用户重复点击
|
|
|
debounce(func, delay) {
|
|
@@ -2893,7 +2983,6 @@ export default {
|
|
|
loading.close()
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- loading.close()
|
|
|
})
|
|
|
|
|
|
this.axios
|
|
@@ -2932,8 +3021,9 @@ export default {
|
|
|
loading.close()
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- loading.close()
|
|
|
})
|
|
|
+ loading.close();
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|