用户修改
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="物流公司" prop="deliverLcd">
|
||||
<el-select size="mini" v-model="ruleForm.deliverLcd" placeholder="请选择物流公司" @change="selectChanged">
|
||||
<el-option v-for="(item, index) in expressList" :label="item.dictValue"
|
||||
:value="item.dictType"></el-option>
|
||||
<el-option v-for="(item, index) in expressList" :label="item.expressName" :key="index"
|
||||
:value="item.expressCode"></el-option>
|
||||
</el-select>
|
||||
<el-radio-group v-model="radio3" size="mini" style="float: right;">
|
||||
<el-radio-group v-model="radio3" size="mini" style="float: right;" @change="tabChange">
|
||||
<!-- 三种发货形态-general:普通发货,merge:合并发货,mix:混合发货 -->
|
||||
<el-radio-button label="general">普通发货</el-radio-button>
|
||||
<!-- <el-radio-button label="merge">合并发货</el-radio-button> -->
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="flexbox orderProducts" v-for="products in productsCodeList" :key="products.productId">
|
||||
<div class="flexbox productItem" style="">
|
||||
<!-- <el-checkbox :label="products.allOrderId"></el-checkbox> -->
|
||||
<img :src="products.image" width="30px" height="30px">
|
||||
<img :src="products.productUrl" width="30px" height="30px">
|
||||
<div class="flexbox" style="align-items: center;">
|
||||
<div class="bookName">{{ products.productName }}</div>
|
||||
</div>
|
||||
@@ -58,7 +58,7 @@
|
||||
<div v-else>
|
||||
<el-checkbox-group v-model="checkedList" @change="handleCheckedCitiesChange">
|
||||
|
||||
<li class="flexbox mergeList" style="border:1px solid #ddf6f3" v-for="(item, index) in mixOrderList">
|
||||
<li class="flexbox mergeList" style="border:1px solid #ddf6f3" v-for="(item, index) in mixOrderList" :key="index">
|
||||
<div class="buierInfo flexbox">
|
||||
<div style="display: flex;width:180px; align-items: center;">
|
||||
<div style="padding: 10px;" class="">
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<div class="productInfo" style="width:100%;">
|
||||
|
||||
<div class="item" v-for="(item2, index) in item.orderList">
|
||||
<div class="item" v-for="(item2, index) in item.orderList" :key="index">
|
||||
<div class="item_head no_right_border">
|
||||
<el-row>
|
||||
<el-col :span="24"
|
||||
@@ -84,10 +84,10 @@
|
||||
<div class="flexbox" style="justify-content: space-between;">
|
||||
<div class="td1" style="width:100%; ">
|
||||
|
||||
<div class="flexbox orderProducts" style="width:50%; float: left;" v-for="(item3, index) in item2.products">
|
||||
<div class="flexbox orderProducts" style="width:50%; float: left;" v-for="(item3, index) in item2.products" :key="index">
|
||||
<div class="flexbox productItem" style="width:100%;">
|
||||
<el-checkbox :label="item3.allOrderId" :disabled="item3.orderStatus == '1'"><br></el-checkbox>
|
||||
<img :src="item3.image" width="30px" style="margin-left: -15px;"
|
||||
<img :src="item3.productUrl" width="30px" style="margin-left: -15px;"
|
||||
height="30px">
|
||||
<div class="flexbox" style="align-items: center;">
|
||||
<div class="bookName">{{item3.productName}}</div>
|
||||
@@ -153,23 +153,30 @@ export default {
|
||||
// this.visible = false
|
||||
this.getExpressList()
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
tabChange(e){
|
||||
console.log('变化了')
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
},
|
||||
// 获取快递公司列表
|
||||
getExpressList() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/book/sysdictdata/selectByType/express_name'),
|
||||
// url: this.$http.adornUrl('/book/sysdictdata/selectByType/express_name'),
|
||||
url: this.$http.adornUrl('/express/getExpressCompanyList'),
|
||||
method: 'get',
|
||||
}).then(({ data }) => {
|
||||
// console.log(data, '快递列表')
|
||||
this.expressList = data.dataList
|
||||
this.expressList = data.result
|
||||
}).catch(({ e }) => {
|
||||
console.log(e,'e')
|
||||
})
|
||||
},
|
||||
selectChanged(val){
|
||||
console.log(this.ruleForm)
|
||||
if(this.expressList && this.expressList.length > 0){
|
||||
this.expressList.forEach(element => {
|
||||
if(element.dictType == val){
|
||||
return this.ruleForm.dictValue = element.dictValue
|
||||
if(element.expressCode == val){
|
||||
return this.ruleForm.dictValue = element.expressName
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -183,7 +190,7 @@ export default {
|
||||
getMixDeliverOrderList() {
|
||||
this.orderIds[0] = this.orderitem.orderId
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/buyorder/checkMerge`),
|
||||
url: this.$http.adornUrl(`/book/buyOrder/checkMerge`),
|
||||
method: 'post',
|
||||
data: this.orderIds
|
||||
}).then(({ data }) => {
|
||||
@@ -205,26 +212,31 @@ export default {
|
||||
this.productsCodeList.splice(index, 1)
|
||||
console.log(index)
|
||||
}
|
||||
this.productsIdsList = this.productsCodeList.map( item => item.allOrderId)
|
||||
this.productsIdsList = this.productsCodeList.map( item => item.id)
|
||||
})
|
||||
},
|
||||
//
|
||||
// getProductsCodeList
|
||||
// 普通发货
|
||||
submit1() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '请稍后',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
this.getNewProducts()
|
||||
console.log(this.productsIdsList)
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '请稍后',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/buyorder/blendSendFMS/${this.ruleForm.deliverLcd}`),
|
||||
// url: this.$http.adornUrl(`/book/buyOrder/blendSendFMS/${this.ruleForm.deliverLcd}`),
|
||||
url: this.$http.adornUrl(`/book/buyOrder/delivery/`),
|
||||
method: 'post',
|
||||
params: this.$http.adornParams({
|
||||
"shipperName" : this.ruleForm.dictValue
|
||||
// "shipperName" : this.ruleForm.dictValue
|
||||
'expressCompanyCode': this.ruleForm.deliverLcd
|
||||
}),
|
||||
data: this.productsIdsList // 是个数组
|
||||
// 传orderid
|
||||
@@ -235,14 +247,20 @@ export default {
|
||||
this.beforeCloseDialog()
|
||||
return this.$message.success('发货成功')
|
||||
}
|
||||
}).catch(({e}) => {
|
||||
|
||||
console.log('e',e)
|
||||
})
|
||||
}else{
|
||||
this.$message.error('请先选择物流公司')
|
||||
|
||||
}})
|
||||
},
|
||||
// 获取数据列表
|
||||
getData() {
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/book/buyorder/appGetOrderInfo'),
|
||||
url: this.$http.adornUrl('/book/buyOrder/appGetOrderInfo'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'orderId': this.orderId,
|
||||
@@ -279,13 +297,15 @@ export default {
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/buyorder/blendSendFMS/${this.ruleForm.deliverLcd}`),
|
||||
// url: this.$http.adornUrl(`/book/buyOrder/blendSendFMS/${this.ruleForm.deliverLcd}`),
|
||||
url: this.$http.adornUrl(`/book/buyOrder/delivery/`),
|
||||
method: 'post',
|
||||
params: this.$http.adornParams({
|
||||
"shipperName" : this.ruleForm.dictValue
|
||||
// "shipperName" : this.ruleForm.dictValue
|
||||
'expressCompanyCode': this.ruleForm.deliverLcd
|
||||
}),
|
||||
data: this.checkedList,
|
||||
// 传orderid
|
||||
// 传orderid
|
||||
}).then(({ data }) => {
|
||||
if(data && data.code === 0){
|
||||
// console.log(data)
|
||||
@@ -293,16 +313,19 @@ export default {
|
||||
return this.$message.success('发货成功')
|
||||
this.beforeCloseDialog()
|
||||
}
|
||||
}).catch(({e}) => {
|
||||
loading.close();
|
||||
console.log('e',e)
|
||||
})
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '发货成功!'
|
||||
// });
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消删除'
|
||||
// });
|
||||
});
|
||||
//this.beforeCloseDialog()
|
||||
}
|
||||
@@ -325,9 +348,11 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
orderitem: {
|
||||
handler(val, oldVal) {
|
||||
handler(val, oldVal) {
|
||||
console.log('变化',val)
|
||||
this.productsCodeList = val.products
|
||||
this.getNewProducts()
|
||||
this.getNewProducts()
|
||||
console.log('productsIdsList',this.productsIdsList)
|
||||
this.getMixDeliverOrderList()
|
||||
// this.getData()
|
||||
// this.visible = true
|
||||
|
||||
Reference in New Issue
Block a user