用户修改
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
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-form-item>
|
||||
</el-form>
|
||||
@@ -72,30 +72,34 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 获取快递公司列表
|
||||
getExpressList() {
|
||||
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
|
||||
// console.log(data, '快递列表')
|
||||
this.expressList = data.result
|
||||
}).catch(({ e }) => {
|
||||
console.log(e,'e')
|
||||
})
|
||||
},
|
||||
selectChanged(val) {
|
||||
console.log(val.dictValue)
|
||||
console.log(val)
|
||||
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
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 关闭页面
|
||||
beforeCloseDialog() {
|
||||
this.$emit('closeDeliverDialog', false)
|
||||
this.$refs['ruleForm'].resetFields()
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
this.$refs['ruleForm'].resetFields()
|
||||
|
||||
/// this.selectData = []
|
||||
},
|
||||
// 发货操作
|
||||
@@ -110,7 +114,7 @@ export default {
|
||||
});
|
||||
// 发送后台请求
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/buyorder/delivery/${this.ruleForm.deliverLcd}`),
|
||||
url: this.$http.adornUrl(`/book/buyOrder/delivery/${this.ruleForm.deliverLcd}`),
|
||||
method: 'post',
|
||||
params: this.$http.adornParams({
|
||||
"shipperName": this.ruleForm.dictValue
|
||||
|
||||
Reference in New Issue
Block a user