|
@@ -1,13 +1,19 @@
|
|
|
// 接收化产焦炭运单
|
|
|
<template>
|
|
|
- <div >
|
|
|
+ <div>
|
|
|
<div style="margin:10px">
|
|
|
- <el-select v-model="condition1" placeholder="请选择筛选条件" style="width:150px" clearable>
|
|
|
+ <el-select
|
|
|
+ v-model="condition1"
|
|
|
+ placeholder="请选择筛选条件"
|
|
|
+ style="width:150px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in options"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-input
|
|
@@ -17,12 +23,18 @@
|
|
|
clearable
|
|
|
>
|
|
|
</el-input>
|
|
|
- <el-select v-model="condition2" placeholder="请选择筛选条件" style="width:150px" clearable>
|
|
|
+ <el-select
|
|
|
+ v-model="condition2"
|
|
|
+ placeholder="请选择筛选条件"
|
|
|
+ style="width:150px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in options"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-input
|
|
@@ -209,480 +221,434 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getCookie } from "@/utils/util.js";
|
|
|
+import { getCookie } from '@/utils/util.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- condition1:null,
|
|
|
- condition2:null,
|
|
|
- input1:null,
|
|
|
- input2:null,
|
|
|
- options:[
|
|
|
+ condition1: null,
|
|
|
+ condition2: null,
|
|
|
+ input1: null,
|
|
|
+ input2: null,
|
|
|
+ options: [
|
|
|
{
|
|
|
- label:"车牌号",
|
|
|
- value:"capacityNumber"
|
|
|
- },
|
|
|
- {
|
|
|
- label:"发货单位",
|
|
|
- value:"shipperName"
|
|
|
+ label: '车牌号',
|
|
|
+ value: 'capacityNumber'
|
|
|
},
|
|
|
- {
|
|
|
- label:"收货单位",
|
|
|
- value:"consigneeCompanyName"
|
|
|
+ {
|
|
|
+ label: '发货单位',
|
|
|
+ value: 'shipperName'
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '收货单位',
|
|
|
+ value: 'consigneeCompanyName'
|
|
|
+ }
|
|
|
],
|
|
|
shiyHeigth: 190,
|
|
|
isHeigth: true,
|
|
|
pageSize: 100,
|
|
|
isKuang: false,
|
|
|
inputTruck: null,
|
|
|
- inputText: "",
|
|
|
+ inputText: '',
|
|
|
option1: {
|
|
|
// option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
|
|
|
- requestUrl:
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
|
|
|
- "",
|
|
|
+ requestUrl: ''
|
|
|
},
|
|
|
option2: {
|
|
|
// option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
|
|
|
- requestUrl:
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
|
|
|
- "",
|
|
|
+ requestUrl: ''
|
|
|
},
|
|
|
option3: {
|
|
|
// option3请求数据的地址
|
|
|
- requestUrl:
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
|
|
|
- "",
|
|
|
- selectionType: "select",
|
|
|
- mapList: [],
|
|
|
+ requestUrl: '',
|
|
|
+ selectionType: 'select',
|
|
|
+ mapList: []
|
|
|
},
|
|
|
truck: {
|
|
|
- requestUrl: "",
|
|
|
- selectionType: "radio",
|
|
|
+ requestUrl: '',
|
|
|
+ selectionType: 'radio'
|
|
|
},
|
|
|
- activeName: "third",
|
|
|
+ activeName: 'third',
|
|
|
//记录旧的row对象(已接收)
|
|
|
- oldRow: "",
|
|
|
+ oldRow: '',
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
|
|
|
oldRowCount: 1,
|
|
|
//记录旧的row对象(已拒绝)
|
|
|
- oldRow1: "",
|
|
|
+ oldRow1: '',
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已拒绝)
|
|
|
oldRowCount1: 1,
|
|
|
//记录旧的row对象(未接收)
|
|
|
- oldRow2: "",
|
|
|
+ oldRow2: '',
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
|
|
|
oldRowCount2: 1,
|
|
|
tableHead: [
|
|
|
{
|
|
|
- prop: "materialName",
|
|
|
- label: "物资名称",
|
|
|
- width: 150,
|
|
|
+ prop: 'materialName',
|
|
|
+ label: '物资名称',
|
|
|
+ width: 150
|
|
|
},
|
|
|
{
|
|
|
- prop: "specificationModel",
|
|
|
- label: "规格型号",
|
|
|
- width: 150,
|
|
|
+ prop: 'specificationModel',
|
|
|
+ label: '规格型号',
|
|
|
+ width: 150
|
|
|
},
|
|
|
{
|
|
|
- prop: "materialNumber",
|
|
|
- label: "物资件数",
|
|
|
- width: 100,
|
|
|
+ prop: 'materialNumber',
|
|
|
+ label: '物资件数',
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- prop: "materialWeight",
|
|
|
- label: "物资重量",
|
|
|
- width: 100,
|
|
|
- },
|
|
|
+ prop: 'materialWeight',
|
|
|
+ label: '物资重量',
|
|
|
+ width: 100
|
|
|
+ }
|
|
|
],
|
|
|
tableData: [],
|
|
|
tableData1: [],
|
|
|
tableData2: [],
|
|
|
capacityId: null,
|
|
|
dialogTableVisible: false,
|
|
|
- orderId: null,
|
|
|
- };
|
|
|
+ orderId: null
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
- if (this.activeName == "first") {
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- } else if (this.activeName == "second") {
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- } else {
|
|
|
- this.option3.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.activeName == "first") {
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
|
|
|
- "" +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- } else if (this.activeName == "second") {
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
|
|
|
- "" +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- } else {
|
|
|
- this.option3.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
|
|
|
- "" +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- }
|
|
|
- }
|
|
|
+ this.getRequestUrl()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
onClickTruck() {
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
this.truck.requestUrl =
|
|
|
- "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&index=" +
|
|
|
- this.inputTruck;
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
|
|
|
+ getCookie('userId') +
|
|
|
+ '&index=' +
|
|
|
+ this.inputTruck
|
|
|
} else {
|
|
|
this.truck.requestUrl =
|
|
|
- "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
|
|
|
null +
|
|
|
- "&index=" +
|
|
|
- this.inputTruck;
|
|
|
+ '&index=' +
|
|
|
+ this.inputTruck
|
|
|
}
|
|
|
},
|
|
|
getRequestUrl() {
|
|
|
- if(getCookie("orgCode")=="chengyunshang"){
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- this.option3.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- }else{
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
|
|
|
- "" +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
|
|
|
- ""+
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- this.option3.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
|
|
|
- "" +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
|
|
|
+ getCookie('userId') +
|
|
|
+ '&t=' +
|
|
|
+ new Date()
|
|
|
+ this.option2.requestUrl =
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
|
|
|
+ getCookie('userId') +
|
|
|
+ '&t=' +
|
|
|
+ new Date()
|
|
|
+ this.option3.requestUrl =
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
|
|
|
+ getCookie('userId') +
|
|
|
+ '&t=' +
|
|
|
+ new Date()
|
|
|
+ } else {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
|
|
|
+ '' +
|
|
|
+ '&t=' +
|
|
|
+ new Date()
|
|
|
+ this.option2.requestUrl =
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
|
|
|
+ '' +
|
|
|
+ '&t=' +
|
|
|
+ new Date()
|
|
|
+ this.option3.requestUrl =
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
|
|
|
+ '' +
|
|
|
+ '&t=' +
|
|
|
+ new Date()
|
|
|
}
|
|
|
},
|
|
|
selectionChange(selection) {
|
|
|
- this.option3.mapList = selection;
|
|
|
+ this.option3.mapList = selection
|
|
|
},
|
|
|
batchCloseOrder() {
|
|
|
if (this.option3.mapList.length == 0) {
|
|
|
this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "请先选择要关闭的订单!",
|
|
|
- });
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先选择要关闭的订单!'
|
|
|
+ })
|
|
|
} else {
|
|
|
- this.$confirm("是否关闭这些订单", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- center: true,
|
|
|
+ this.$confirm('是否关闭这些订单', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ center: true
|
|
|
})
|
|
|
.then(() => {
|
|
|
//初始化maplist
|
|
|
- var mapList = [];
|
|
|
- this.option3.mapList.forEach((item) => {
|
|
|
+ var mapList = []
|
|
|
+ this.option3.mapList.forEach(item => {
|
|
|
//初始化mapItem
|
|
|
var mapItem = {
|
|
|
//销售订单物资中间表id
|
|
|
- orderId: 0,
|
|
|
- };
|
|
|
- mapItem.orderId = item.orderId;
|
|
|
- mapList.push(mapItem);
|
|
|
- });
|
|
|
+ orderId: 0
|
|
|
+ }
|
|
|
+ mapItem.orderId = item.orderId
|
|
|
+ mapList.push(mapItem)
|
|
|
+ })
|
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
- message: "关闭成功!",
|
|
|
- });
|
|
|
+ type: 'success',
|
|
|
+ message: '关闭成功!'
|
|
|
+ })
|
|
|
this.axios
|
|
|
- .post("/api/v1/oms/batchCloseOrder", mapList)
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == "200") {
|
|
|
- this.getRequestUrl();
|
|
|
+ .post('/api/v1/oms/batchCloseOrder', mapList)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.getRequestUrl()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
- type: "info",
|
|
|
- message: "取消关闭!",
|
|
|
- });
|
|
|
- });
|
|
|
+ type: 'info',
|
|
|
+ message: '取消关闭!'
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
refresh() {
|
|
|
- this.getRequestUrl();
|
|
|
+ this.getRequestUrl()
|
|
|
},
|
|
|
handleClose(done) {
|
|
|
- done();
|
|
|
- this.$message.info("取消修改运力");
|
|
|
+ done()
|
|
|
+ this.$message.info('取消修改运力')
|
|
|
},
|
|
|
updateCapacity(row) {
|
|
|
- this.getTruckRequestUrl();
|
|
|
- this.orderId = row.orderId;
|
|
|
- this.dialogTableVisible = true;
|
|
|
- console.log(row.orderId);
|
|
|
+ this.getTruckRequestUrl()
|
|
|
+ this.orderId = row.orderId
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ console.log(row.orderId)
|
|
|
},
|
|
|
getTruckRequestUrl() {
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
this.truck.requestUrl =
|
|
|
- "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&test=" +
|
|
|
- new Date();
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
|
|
|
+ getCookie('userId') +
|
|
|
+ '&test=' +
|
|
|
+ new Date()
|
|
|
} else {
|
|
|
this.truck.requestUrl =
|
|
|
- "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
|
|
|
null +
|
|
|
- "&test=" +
|
|
|
- new Date();
|
|
|
+ '&test=' +
|
|
|
+ new Date()
|
|
|
}
|
|
|
},
|
|
|
updateClick(scope) {
|
|
|
- this.getTruckRequestUrl();
|
|
|
- this.orderId = scope.row.orderId;
|
|
|
- this.dialogTableVisible = true;
|
|
|
- console.log(scope.row.orderId);
|
|
|
+ this.getTruckRequestUrl()
|
|
|
+ this.orderId = scope.row.orderId
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ console.log(scope.row.orderId)
|
|
|
},
|
|
|
currentRadioChange1(row) {
|
|
|
- console.log(row);
|
|
|
- this.capacityId = row.capacityId;
|
|
|
+ console.log(row)
|
|
|
+ this.capacityId = row.capacityId
|
|
|
},
|
|
|
updateTruckCapacity() {
|
|
|
if (this.capacityId == null) {
|
|
|
- this.$message.error("未选中运力");
|
|
|
- return;
|
|
|
+ this.$message.error('未选中运力')
|
|
|
+ return
|
|
|
}
|
|
|
this.axios
|
|
|
- .post("/api/v1/oms/updateCapacityId", {
|
|
|
+ .post('/api/v1/oms/updateCapacityId', {
|
|
|
capacityId: this.capacityId,
|
|
|
- orderId: this.orderId,
|
|
|
+ orderId: this.orderId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == "200") {
|
|
|
- this.$message.success("修改运力成功");
|
|
|
- this.getRequestUrl();
|
|
|
- this.dialogTableVisible = false;
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.$message.success('修改运力成功')
|
|
|
+ this.getRequestUrl()
|
|
|
+ this.dialogTableVisible = false
|
|
|
} else {
|
|
|
- this.$message.error("修改运力失败");
|
|
|
+ this.$message.error('修改运力失败')
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
async onClick() {
|
|
|
- let option={
|
|
|
- requestQuery:{}
|
|
|
+ let option = {
|
|
|
+ requestQuery: {}
|
|
|
}
|
|
|
- option.requestQuery[this.condition1]=[];
|
|
|
- option.requestQuery[this.condition2]=[];
|
|
|
- if(this.condition1 == this.condition2){
|
|
|
- option.requestQuery[this.condition1]=[this.input1,this.input2]
|
|
|
- }else{
|
|
|
- option.requestQuery[this.condition1]=[this.input1]
|
|
|
- option.requestQuery[this.condition2]=[this.input2]
|
|
|
+ option.requestQuery[this.condition1] = []
|
|
|
+ option.requestQuery[this.condition2] = []
|
|
|
+ if (this.condition1 == this.condition2) {
|
|
|
+ option.requestQuery[this.condition1] = [this.input1, this.input2]
|
|
|
+ } else {
|
|
|
+ option.requestQuery[this.condition1] = [this.input1]
|
|
|
+ option.requestQuery[this.condition2] = [this.input2]
|
|
|
}
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
- if (this.activeName == "first") {
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
+ if (this.activeName == 'first') {
|
|
|
option.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId")
|
|
|
- await this.setOption("option1",option);
|
|
|
- } else if (this.activeName == "second") {
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
|
|
|
+ getCookie('userId')
|
|
|
+ await this.setOption('option1', option)
|
|
|
+ } else if (this.activeName == 'second') {
|
|
|
option.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId")
|
|
|
- await this.setOption("option2",option);
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
|
|
|
+ getCookie('userId')
|
|
|
+ await this.setOption('option2', option)
|
|
|
} else {
|
|
|
option.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
|
|
|
- getCookie("userId")
|
|
|
- await this.setOption("option3",option);
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
|
|
|
+ getCookie('userId')
|
|
|
+ await this.setOption('option3', option)
|
|
|
}
|
|
|
} else {
|
|
|
- if (this.activeName == "first") {
|
|
|
+ if (this.activeName == 'first') {
|
|
|
option.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
|
|
|
- ""
|
|
|
- await this.setOption("option1",option);
|
|
|
- } else if (this.activeName == "second") {
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
|
|
|
+ ''
|
|
|
+ await this.setOption('option1', option)
|
|
|
+ } else if (this.activeName == 'second') {
|
|
|
option.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
|
|
|
- ""
|
|
|
- await this.setOption("option2",option);
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
|
|
|
+ ''
|
|
|
+ await this.setOption('option2', option)
|
|
|
} else {
|
|
|
option.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
|
|
|
- ""
|
|
|
- await this.setOption("option3",option);
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
|
|
|
+ ''
|
|
|
+ await this.setOption('option3', option)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- setOption(prop,option){
|
|
|
- return new Promise((resolve,reject)=>{
|
|
|
- this.$set(this,prop,option)
|
|
|
- resolve("更新表格数据成功!");
|
|
|
- });
|
|
|
+ setOption(prop, option) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.$set(this, prop, option)
|
|
|
+ resolve('更新表格数据成功!')
|
|
|
+ })
|
|
|
},
|
|
|
// -------查看物资详情 (已接收)
|
|
|
detailclick(row) {
|
|
|
// 记录重复点击次数
|
|
|
if (this.oldRow === row) {
|
|
|
- this.oldRowCount += 1;
|
|
|
+ this.oldRowCount += 1
|
|
|
}
|
|
|
// 切换当前详情表
|
|
|
- this.$refs.table.toggleRowExpansion(row);
|
|
|
+ this.$refs.table.toggleRowExpansion(row)
|
|
|
// 打开前关闭上一个详情表
|
|
|
- if (this.oldRow != "") {
|
|
|
+ if (this.oldRow != '') {
|
|
|
if (this.oldRow != row) {
|
|
|
if (this.oldRowCount % 2 === 1) {
|
|
|
- this.$refs.table.toggleRowExpansion(this.oldRow);
|
|
|
+ this.$refs.table.toggleRowExpansion(this.oldRow)
|
|
|
} else {
|
|
|
- this.oldRowCount = 1;
|
|
|
+ this.oldRowCount = 1
|
|
|
}
|
|
|
} else {
|
|
|
- this.oldRow = null;
|
|
|
- return;
|
|
|
+ this.oldRow = null
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
// 重置上一个点击对象
|
|
|
- this.oldRow = row;
|
|
|
+ this.oldRow = row
|
|
|
// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
- .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
- .then((res) => {
|
|
|
- console.log("res.data.data", res.data.data);
|
|
|
- this.tableData = res.data.data;
|
|
|
- });
|
|
|
+ .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
|
|
|
+ .then(res => {
|
|
|
+ console.log('res.data.data', res.data.data)
|
|
|
+ this.tableData = res.data.data
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// -------查看物资详情(已拒绝)
|
|
|
detailclick1(row) {
|
|
|
// 记录重复点击次数
|
|
|
if (this.oldRow1 === row) {
|
|
|
- this.oldRowCount1 += 1;
|
|
|
+ this.oldRowCount1 += 1
|
|
|
}
|
|
|
// 切换当前详情表
|
|
|
- this.$refs.table1.toggleRowExpansion(row);
|
|
|
+ this.$refs.table1.toggleRowExpansion(row)
|
|
|
// 打开前关闭上一个详情表
|
|
|
- if (this.oldRow1 != "") {
|
|
|
+ if (this.oldRow1 != '') {
|
|
|
if (this.oldRow1 != row) {
|
|
|
if (this.oldRowCount1 % 2 === 1) {
|
|
|
- this.$refs.table1.toggleRowExpansion(this.oldRow1);
|
|
|
+ this.$refs.table1.toggleRowExpansion(this.oldRow1)
|
|
|
} else {
|
|
|
- this.oldRowCount1 = 1;
|
|
|
+ this.oldRowCount1 = 1
|
|
|
}
|
|
|
} else {
|
|
|
- this.oldRow1 = null;
|
|
|
- return;
|
|
|
+ this.oldRow1 = null
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
// 重置上一个点击对象
|
|
|
- this.oldRow1 = row;
|
|
|
+ this.oldRow1 = row
|
|
|
// 根据销售订单物资中间表id查询物资信息
|
|
|
this.axios
|
|
|
- .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
- .then((res) => {
|
|
|
- console.log("res.data.data", res.data.data);
|
|
|
- this.tableData1 = res.data.data;
|
|
|
- });
|
|
|
+ .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
|
|
|
+ .then(res => {
|
|
|
+ console.log('res.data.data', res.data.data)
|
|
|
+ this.tableData1 = res.data.data
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// -------查看物资详情(未接收)
|
|
|
detailclick2(row) {
|
|
|
// 记录重复点击次数
|
|
|
if (this.oldRow2 === row) {
|
|
|
- this.oldRowCount2 += 1;
|
|
|
+ this.oldRowCount2 += 1
|
|
|
}
|
|
|
// 切换当前详情表
|
|
|
- this.$refs.table2.toggleRowExpansion(row);
|
|
|
+ this.$refs.table2.toggleRowExpansion(row)
|
|
|
// 打开前关闭上一个详情表
|
|
|
- if (this.oldRow2 != "") {
|
|
|
+ if (this.oldRow2 != '') {
|
|
|
if (this.oldRow2 != row) {
|
|
|
if (this.oldRowCount2 % 2 === 1) {
|
|
|
- this.$refs.table2.toggleRowExpansion(this.oldRow2);
|
|
|
+ this.$refs.table2.toggleRowExpansion(this.oldRow2)
|
|
|
} else {
|
|
|
- this.oldRowCount2 = 1;
|
|
|
+ this.oldRowCount2 = 1
|
|
|
}
|
|
|
} else {
|
|
|
- this.oldRow2 = null;
|
|
|
- return;
|
|
|
+ this.oldRow2 = null
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
// 重置上一个点击对象
|
|
|
- this.oldRow2 = row;
|
|
|
+ this.oldRow2 = row
|
|
|
// 根据销售订单物资中间表id查询物资信息
|
|
|
this.axios
|
|
|
- .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
- .then((res) => {
|
|
|
- this.tableData2 = res.data.data;
|
|
|
- });
|
|
|
+ .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
|
|
|
+ .then(res => {
|
|
|
+ this.tableData2 = res.data.data
|
|
|
+ })
|
|
|
},
|
|
|
//关闭选中行的订单
|
|
|
closeOrder(row) {
|
|
|
- this.$confirm("是否关闭", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- center: true,
|
|
|
+ this.$confirm('是否关闭', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ center: true
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
- message: "关闭成功!",
|
|
|
- });
|
|
|
+ type: 'success',
|
|
|
+ message: '关闭成功!'
|
|
|
+ })
|
|
|
this.axios
|
|
|
- .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == "200") {
|
|
|
- this.getRequestUrl();
|
|
|
+ .post('/api/v1/oms/closeOrder?orderId=' + row.orderId)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.getRequestUrl()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
- type: "info",
|
|
|
- message: "取消关闭!",
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ type: 'info',
|
|
|
+ message: '取消关闭!'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scode>
|
|
|
.steel_inbound {
|