Commit 09c1572c authored by dragondean@qq.com's avatar dragondean@qq.com

拆单重置

parent 864ccc22
......@@ -59,7 +59,6 @@ export function deleteSplit(id) {
})
}
//取消申请拆单
export function cancelApply(data) {
return request({
url: '/order/split/cancel-apply',
......@@ -137,3 +136,12 @@ export function quantitycheck(query) {
params: query
})
}
// 重置拆单
export function deleteAllSplit(orderId) {
return request({
url: '/order/split/delete/all',
method: 'delete',
params: {orderId}
})
}
......@@ -302,7 +302,17 @@
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import {getSplitList,splitApply,createSplit,cancelApply,createSplitItem,deleteSplitItem,deleteSplit,quantitycheck} from "@/api/ecw/orderHandle"
import {
getSplitList,
splitApply,
createSplit,
cancelApply,
createSplitItem,
deleteSplitItem,
deleteSplit,
quantitycheck,
deleteAllSplit
} from "@/api/ecw/orderHandle"
import {getWarehouseList} from '@/api/ecw/warehouse'
import {getChannelList} from '@/api/ecw/channel'
import WorkFlow from '@/components/WorkFlow'
......@@ -359,7 +369,7 @@ export default {
quantitySum:0
};
},
created() {
async created() {
this.getChannel()
getWarehouseList().then(res => {
this.tradeCityList = res.data
......@@ -368,8 +378,17 @@ export default {
if (this.$route.query.orderId) {
this.queryParams.orderId = this.$route.query.orderId
}
this.getList()
await this.getList()
this.getOrder()
console.log("拆单数据", this.splitData, this.splitData.length)
if(this.splitData.length){
this.$confirm(this.$t('已有拆单数据,是否要重置?')).then(res => {
return deleteAllSplit(this.queryParams.orderId)
}).then(res => {
this.getList()
this.$message.success("重置成功")
})
}
},
watch: {
//监听table这个对象
......@@ -459,7 +478,7 @@ export default {
getList() {
this.loading = true;
// 执行查询
getSplitList(this.queryParams).then(response => {
return getSplitList(this.queryParams).then(response => {
this.splitData = response.data.orderSplitBackVOList
this.orderApprovalBackVO = response.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment