|
@@ -56,13 +56,11 @@
|
|
</div>
|
|
</div>
|
|
<div class="buttonModel">
|
|
<div class="buttonModel">
|
|
<div class="operation">
|
|
<div class="operation">
|
|
- <el-button v-if="activeName == 'first'" type="primary" @click="receive">
|
|
|
|
- <i></i>批量接收订单
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-if="activeName == 'first'" type="primary" @click="refuse">
|
|
|
|
- <i></i>批量拒绝订单
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-if="activeName == 'second'" type="primary" @click="close">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="activeName == 'five'"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="batchCloseOrderReceived"
|
|
|
|
+ >
|
|
<i></i>批量关闭订单
|
|
<i></i>批量关闭订单
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -74,18 +72,20 @@
|
|
</div>
|
|
</div>
|
|
<div class="table">
|
|
<div class="table">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
- <!-- 未抢单 -->
|
|
|
|
- <el-tab-pane label="未接收" name="first">
|
|
|
|
|
|
+ <el-tab-pane label="未派单" name="second">
|
|
<dilTable
|
|
<dilTable
|
|
- v-bind.sync="first"
|
|
|
|
- ref="table"
|
|
|
|
- @selection-change="currentSelectChange"
|
|
|
|
|
|
+ v-bind.sync="second"
|
|
|
|
+ ref="table1"
|
|
|
|
+ @selection-change="currentSelectChange1"
|
|
max-height="300"
|
|
max-height="300"
|
|
>
|
|
>
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
+ <el-button @click="dispatch(scope)" type="text" size="small">
|
|
|
|
+ 派单
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
- @click="detailclick(scope.row)"
|
|
|
|
|
|
+ @click="detailclick1(scope.row)"
|
|
type="text"
|
|
type="text"
|
|
size="small"
|
|
size="small"
|
|
>
|
|
>
|
|
@@ -93,6 +93,7 @@
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+
|
|
<!-- 物资详情抽屉 -->
|
|
<!-- 物资详情抽屉 -->
|
|
<el-table-column type="expand" width="1">
|
|
<el-table-column type="expand" width="1">
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
@@ -103,7 +104,7 @@
|
|
>
|
|
>
|
|
<div v-if="false">{{ props }}</div>
|
|
<div v-if="false">{{ props }}</div>
|
|
<div>
|
|
<div>
|
|
- <el-table :data="tableData" border>
|
|
|
|
|
|
+ <el-table :data="tableData1" border>
|
|
<el-table-column
|
|
<el-table-column
|
|
v-for="(item, i) in tableHead"
|
|
v-for="(item, i) in tableHead"
|
|
:key="i"
|
|
:key="i"
|
|
@@ -118,17 +119,22 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</dilTable>
|
|
</dilTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
- <el-tab-pane label="已接收" name="second">
|
|
|
|
|
|
+ <el-tab-pane label="已派单" name="five">
|
|
<dilTable
|
|
<dilTable
|
|
- v-bind.sync="second"
|
|
|
|
- ref="table1"
|
|
|
|
- @selection-change="currentSelectChange1"
|
|
|
|
|
|
+ v-bind.sync="five"
|
|
|
|
+ ref="table2"
|
|
|
|
+ @selection-change="currentSelectChange2"
|
|
max-height="300"
|
|
max-height="300"
|
|
>
|
|
>
|
|
- <el-table-column fixed="right" label="操作" width="120">
|
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="180">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button @click="dispatch(scope)" type="text" size="small">
|
|
|
|
- 派单
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ @click="updateCapacity(scope.row)"
|
|
|
|
+ type="text"
|
|
|
|
+ size="small"
|
|
|
|
+ v-if="scope.row.transOrderStatus == '已派单'"
|
|
|
|
+ >
|
|
|
|
+ 修改运力
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
@click="detailclick1(scope.row)"
|
|
@click="detailclick1(scope.row)"
|
|
@@ -137,6 +143,14 @@
|
|
>
|
|
>
|
|
物资详情
|
|
物资详情
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ @click="closeOrder(scope.row)"
|
|
|
|
+ type="text"
|
|
|
|
+ size="small"
|
|
|
|
+ v-if="scope.row.transOrderStatus == '已派单'"
|
|
|
|
+ >
|
|
|
|
+ 关闭订单
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
@@ -167,6 +181,24 @@
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog title="车辆信息" :visible.sync="dialogTableVisible">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
+ v-model="inputTruck"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ <el-button type="primary" class="btn" @click="onClickTruck">
|
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
|
+ </el-button>
|
|
|
|
+ <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
|
|
|
|
+ </dilTable>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="dialogTableVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="updateTruckCapacity">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -175,6 +207,8 @@ import { getCookie } from '@/utils/util.js'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ inputTruck: '',
|
|
|
|
+ dialogTableVisible: false,
|
|
condition1: null,
|
|
condition1: null,
|
|
condition2: null,
|
|
condition2: null,
|
|
input1: null,
|
|
input1: null,
|
|
@@ -191,25 +225,29 @@ export default {
|
|
{
|
|
{
|
|
label: '备注',
|
|
label: '备注',
|
|
value: 'saleRemark'
|
|
value: 'saleRemark'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '车牌号',
|
|
|
|
+ value: 'capacityNumber'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
drawer: false,
|
|
drawer: false,
|
|
ssoId: null,
|
|
ssoId: null,
|
|
direction: 'rtl',
|
|
direction: 'rtl',
|
|
- activeName: 'first',
|
|
|
|
|
|
+ activeName: 'second',
|
|
inputText: '',
|
|
inputText: '',
|
|
dispatchId: null,
|
|
dispatchId: null,
|
|
input: '',
|
|
input: '',
|
|
//所有选中的车序号订单
|
|
//所有选中的车序号订单
|
|
selectTruckOrder: [],
|
|
selectTruckOrder: [],
|
|
- first: {
|
|
|
|
- // first请求数据的地址
|
|
|
|
|
|
+ second: {
|
|
requestUrl: '',
|
|
requestUrl: '',
|
|
selectionType: 'select'
|
|
selectionType: 'select'
|
|
},
|
|
},
|
|
- second: {
|
|
|
|
|
|
+ five: {
|
|
requestUrl: '',
|
|
requestUrl: '',
|
|
- selectionType: 'select'
|
|
|
|
|
|
+ selectionType: 'select',
|
|
|
|
+ mapList1: []
|
|
},
|
|
},
|
|
closeList: [],
|
|
closeList: [],
|
|
//记录旧的row对象(未接收)
|
|
//记录旧的row对象(未接收)
|
|
@@ -243,18 +281,171 @@ export default {
|
|
}
|
|
}
|
|
],
|
|
],
|
|
tableData: [],
|
|
tableData: [],
|
|
- tableData1: []
|
|
|
|
|
|
+ tableData1: [],
|
|
|
|
+ truck: {
|
|
|
|
+ requestUrl: '',
|
|
|
|
+ selectionType: 'radio'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.firstGetRequestUrl()
|
|
|
|
|
|
+ this.fiveGetRequestUrl()
|
|
this.secondGetRequestUrl()
|
|
this.secondGetRequestUrl()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ onClickTruck() {
|
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
|
|
|
|
+ getCookie('userId') +
|
|
|
|
+ '&index=' +
|
|
|
|
+ this.inputTruck
|
|
|
|
+ } else {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
|
|
|
|
+ null +
|
|
|
|
+ '&index=' +
|
|
|
|
+ this.inputTruck
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getRequestUrl() {
|
|
|
|
+ this.fiveGetRequestUrl()
|
|
|
|
+ this.secondGetRequestUrl()
|
|
|
|
+ },
|
|
|
|
+ //关闭选中行的订单
|
|
|
|
+ closeOrder(row) {
|
|
|
|
+ this.$confirm('是否关闭', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/oms/closeOrder?orderId=' + row.orderId)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '200') {
|
|
|
|
+ this.getRequestUrl()
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '关闭成功!'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '关闭失败!'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '取消关闭!'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ updateTruckCapacity() {
|
|
|
|
+ if (this.capacityId == null) {
|
|
|
|
+ this.$message.error('未选中运力')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/oms/updateCapacityId', {
|
|
|
|
+ capacityId: this.capacityId,
|
|
|
|
+ orderId: this.orderId
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '200') {
|
|
|
|
+ this.$message.success('修改运力成功')
|
|
|
|
+ this.getRequestUrl()
|
|
|
|
+ this.dialogTableVisible = false
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error('修改运力失败')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ updateCapacity(row) {
|
|
|
|
+ this.getTruckRequestUrl()
|
|
|
|
+ this.orderId = row.orderId
|
|
|
|
+ this.dialogTableVisible = true
|
|
|
|
+ console.log(row.orderId)
|
|
|
|
+ },
|
|
|
|
+ currentRadioChange1(row) {
|
|
|
|
+ console.log(row)
|
|
|
|
+ this.capacityId = row.capacityId
|
|
|
|
+ },
|
|
|
|
+ getTruckRequestUrl() {
|
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
|
|
|
|
+ getCookie('userId') +
|
|
|
|
+ '&test=' +
|
|
|
|
+ new Date()
|
|
|
|
+ } else {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
|
|
|
|
+ null +
|
|
|
|
+ '&test=' +
|
|
|
|
+ new Date()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
currentSelectChange1(selection) {
|
|
currentSelectChange1(selection) {
|
|
- console.log(selection)
|
|
|
|
this.closeList = selection
|
|
this.closeList = selection
|
|
},
|
|
},
|
|
|
|
+ currentSelectChange2(selection) {
|
|
|
|
+ this.five.mapList1 = selection
|
|
|
|
+ },
|
|
|
|
+ batchCloseOrderReceived() {
|
|
|
|
+ if (this.five.mapList1.length == 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: '请先选择要关闭的订单!'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$confirm('是否关闭这些订单(出皮无法关闭)', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ //初始化maplist
|
|
|
|
+ var mapList = []
|
|
|
|
+ this.five.mapList1.forEach(item => {
|
|
|
|
+ //初始化mapItem
|
|
|
|
+ let mapItem = {
|
|
|
|
+ //销售订单物资中间表id
|
|
|
|
+ orderId: 0
|
|
|
|
+ }
|
|
|
|
+ mapItem.orderId = item.orderId
|
|
|
|
+ mapList.push(mapItem)
|
|
|
|
+ })
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/oms/batchCloseOrder', mapList)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '200') {
|
|
|
|
+ this.getRequestUrl()
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '关闭成功!'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '关闭失败!'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '取消关闭!'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
close() {
|
|
close() {
|
|
this.$confirm('是否将选中的订单批量关闭? 继续?', {
|
|
this.$confirm('是否将选中的订单批量关闭? 继续?', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -267,6 +458,7 @@ export default {
|
|
.post('/api/v1/ams/refuseDispatchSaleOrderList', this.closeList)
|
|
.post('/api/v1/ams/refuseDispatchSaleOrderList', this.closeList)
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
|
+ this.closeList = []
|
|
this.$message.success('关闭成功')
|
|
this.$message.success('关闭成功')
|
|
this.secondGetRequestUrl()
|
|
this.secondGetRequestUrl()
|
|
} else {
|
|
} else {
|
|
@@ -284,6 +476,39 @@ export default {
|
|
handleClick(tab, event) {
|
|
handleClick(tab, event) {
|
|
console.log(tab, event)
|
|
console.log(tab, event)
|
|
},
|
|
},
|
|
|
|
+ fiveGetRequestUrl() {
|
|
|
|
+ let _this = this
|
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
|
+ let option = {
|
|
|
|
+ requestQuery: {},
|
|
|
|
+ selectionType: 'select'
|
|
|
|
+ }
|
|
|
|
+ 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') {
|
|
|
|
+ option.requestUrl =
|
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&shipperId=2&carrierSsoId=' +
|
|
|
|
+ getCookie('userId') +
|
|
|
|
+ '&t=' +
|
|
|
|
+ new Date()
|
|
|
|
+ } else {
|
|
|
|
+ option.requestUrl =
|
|
|
|
+ '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&shipperId=2&carrierSsoId=' +
|
|
|
|
+ '' +
|
|
|
|
+ '&t=' +
|
|
|
|
+ new Date()
|
|
|
|
+ }
|
|
|
|
+ resolve(option)
|
|
|
|
+ }).then(option => {
|
|
|
|
+ _this.five = option
|
|
|
|
+ })
|
|
|
|
+ },
|
|
firstGetRequestUrl() {
|
|
firstGetRequestUrl() {
|
|
let _this = this
|
|
let _this = this
|
|
new Promise((resolve, reject) => {
|
|
new Promise((resolve, reject) => {
|
|
@@ -347,8 +572,8 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
onclick1() {
|
|
onclick1() {
|
|
- if (this.activeName == 'first') {
|
|
|
|
- this.firstGetRequestUrl()
|
|
|
|
|
|
+ if (this.activeName == 'five') {
|
|
|
|
+ this.fiveGetRequestUrl()
|
|
} else if (this.activeName == 'second') {
|
|
} else if (this.activeName == 'second') {
|
|
this.secondGetRequestUrl()
|
|
this.secondGetRequestUrl()
|
|
}
|
|
}
|
|
@@ -483,134 +708,134 @@ export default {
|
|
.then(res => {
|
|
.then(res => {
|
|
this.tableData1 = res.data.data
|
|
this.tableData1 = res.data.data
|
|
})
|
|
})
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
|
|
//接收所有已选中的订单
|
|
//接收所有已选中的订单
|
|
- receive() {
|
|
|
|
- this.$confirm('是否接收已选中的订单', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- center: true
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- //初始化承运商SsoId
|
|
|
|
- var carrierSsoId = ''
|
|
|
|
- if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
- carrierSsoId = getCookie('userId')
|
|
|
|
- } else {
|
|
|
|
- carrierSsoId = null
|
|
|
|
- }
|
|
|
|
- //所有选中的分派Id
|
|
|
|
- var dispatchIdList = []
|
|
|
|
- this.selectTruckOrder.forEach(item => {
|
|
|
|
- //初始化mapItem
|
|
|
|
- var mapItem = {
|
|
|
|
- //分派Id
|
|
|
|
- dispatchId: 0
|
|
|
|
- }
|
|
|
|
- mapItem.dispatchId = item.dispatchId
|
|
|
|
- dispatchIdList.push(mapItem)
|
|
|
|
- })
|
|
|
|
- //保存承运商SsoId和所有选中的分派Id
|
|
|
|
- let map = {
|
|
|
|
- carrierSsoId: carrierSsoId,
|
|
|
|
- mapList: dispatchIdList
|
|
|
|
- }
|
|
|
|
- //请求后端
|
|
|
|
- this.axios
|
|
|
|
- .post('/api/v1/ams/lockDispatchSaleOrderList', map)
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: '接收成功!'
|
|
|
|
- })
|
|
|
|
- if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
- this.first.requestUrl =
|
|
|
|
- '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
- getCookie('userId') +
|
|
|
|
- '&i=' +
|
|
|
|
- new Date()
|
|
|
|
- } else {
|
|
|
|
- this.first.requestUrl =
|
|
|
|
- '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
- this.ssoId +
|
|
|
|
- '&i=' +
|
|
|
|
- new Date()
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- message: '接单失败,请联系管理员!',
|
|
|
|
- type: 'warning'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'info',
|
|
|
|
- message: '接单操作已取消!'
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ // receive() {
|
|
|
|
+ // this.$confirm('是否接收已选中的订单', '提示', {
|
|
|
|
+ // confirmButtonText: '确定',
|
|
|
|
+ // cancelButtonText: '取消',
|
|
|
|
+ // type: 'warning',
|
|
|
|
+ // center: true
|
|
|
|
+ // })
|
|
|
|
+ // .then(() => {
|
|
|
|
+ // //初始化承运商SsoId
|
|
|
|
+ // var carrierSsoId = ''
|
|
|
|
+ // if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
+ // carrierSsoId = getCookie('userId')
|
|
|
|
+ // } else {
|
|
|
|
+ // carrierSsoId = null
|
|
|
|
+ // }
|
|
|
|
+ // //所有选中的分派Id
|
|
|
|
+ // var dispatchIdList = []
|
|
|
|
+ // this.selectTruckOrder.forEach(item => {
|
|
|
|
+ // //初始化mapItem
|
|
|
|
+ // var mapItem = {
|
|
|
|
+ // //分派Id
|
|
|
|
+ // dispatchId: 0
|
|
|
|
+ // }
|
|
|
|
+ // mapItem.dispatchId = item.dispatchId
|
|
|
|
+ // dispatchIdList.push(mapItem)
|
|
|
|
+ // })
|
|
|
|
+ // //保存承运商SsoId和所有选中的分派Id
|
|
|
|
+ // let map = {
|
|
|
|
+ // carrierSsoId: carrierSsoId,
|
|
|
|
+ // mapList: dispatchIdList
|
|
|
|
+ // }
|
|
|
|
+ // //请求后端
|
|
|
|
+ // this.axios
|
|
|
|
+ // .post('/api/v1/ams/lockDispatchSaleOrderList', map)
|
|
|
|
+ // .then(res => {
|
|
|
|
+ // if (res.data.code == 200) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'success',
|
|
|
|
+ // message: '接收成功!'
|
|
|
|
+ // })
|
|
|
|
+ // if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
+ // // this.first.requestUrl =
|
|
|
|
+ // // '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
+ // // getCookie('userId') +
|
|
|
|
+ // // '&i=' +
|
|
|
|
+ // // new Date()
|
|
|
|
+ // } else {
|
|
|
|
+ // // this.first.requestUrl =
|
|
|
|
+ // // '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
+ // // this.ssoId +
|
|
|
|
+ // // '&i=' +
|
|
|
|
+ // // new Date()
|
|
|
|
+ // }
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: '接单失败,请联系管理员!',
|
|
|
|
+ // type: 'warning'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // .catch(() => {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'info',
|
|
|
|
+ // message: '接单操作已取消!'
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
//拒绝所有已选中的订单
|
|
//拒绝所有已选中的订单
|
|
- refuse() {
|
|
|
|
- this.$confirm('是否拒绝已选中的订单', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- center: true
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- //所有选中的分派Id
|
|
|
|
- var mapList = []
|
|
|
|
- this.selectTruckOrder.forEach(item => {
|
|
|
|
- //初始化mapItem
|
|
|
|
- var mapItem = {
|
|
|
|
- //分派Id
|
|
|
|
- dispatchId: 0
|
|
|
|
- }
|
|
|
|
- mapItem.dispatchId = item.dispatchId
|
|
|
|
- mapList.push(mapItem)
|
|
|
|
- })
|
|
|
|
- //请求后端
|
|
|
|
- this.axios
|
|
|
|
- .post('/api/v1/ams/refuseDispatchSaleOrderList', mapList)
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: '拒绝成功!'
|
|
|
|
- })
|
|
|
|
- if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
- this.first.requestUrl =
|
|
|
|
- '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
- getCookie('userId') +
|
|
|
|
- '&i=' +
|
|
|
|
- new Date()
|
|
|
|
- } else {
|
|
|
|
- this.first.requestUrl =
|
|
|
|
- '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
- this.ssoId +
|
|
|
|
- '&i=' +
|
|
|
|
- new Date()
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- message: '拒绝失败,请联系管理员!',
|
|
|
|
- type: 'error'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'info',
|
|
|
|
- message: '拒绝操作已取消!'
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // refuse() {
|
|
|
|
+ // this.$confirm('是否拒绝已选中的订单', '提示', {
|
|
|
|
+ // confirmButtonText: '确定',
|
|
|
|
+ // cancelButtonText: '取消',
|
|
|
|
+ // type: 'warning',
|
|
|
|
+ // center: true
|
|
|
|
+ // })
|
|
|
|
+ // .then(() => {
|
|
|
|
+ // //所有选中的分派Id
|
|
|
|
+ // var mapList = []
|
|
|
|
+ // this.selectTruckOrder.forEach(item => {
|
|
|
|
+ // //初始化mapItem
|
|
|
|
+ // var mapItem = {
|
|
|
|
+ // //分派Id
|
|
|
|
+ // dispatchId: 0
|
|
|
|
+ // }
|
|
|
|
+ // mapItem.dispatchId = item.dispatchId
|
|
|
|
+ // mapList.push(mapItem)
|
|
|
|
+ // })
|
|
|
|
+ // //请求后端
|
|
|
|
+ // this.axios
|
|
|
|
+ // .post('/api/v1/ams/refuseDispatchSaleOrderList', mapList)
|
|
|
|
+ // .then(res => {
|
|
|
|
+ // if (res.data.code == 200) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'success',
|
|
|
|
+ // message: '拒绝成功!'
|
|
|
|
+ // })
|
|
|
|
+ // if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
+ // this.first.requestUrl =
|
|
|
|
+ // '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
+ // getCookie('userId') +
|
|
|
|
+ // '&i=' +
|
|
|
|
+ // new Date()
|
|
|
|
+ // } else {
|
|
|
|
+ // this.first.requestUrl =
|
|
|
|
+ // '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
|
|
|
|
+ // this.ssoId +
|
|
|
|
+ // '&i=' +
|
|
|
|
+ // new Date()
|
|
|
|
+ // }
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: '拒绝失败,请联系管理员!',
|
|
|
|
+ // type: 'error'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // .catch(() => {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'info',
|
|
|
|
+ // message: '拒绝操作已取消!'
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|