用户修改

This commit is contained in:
@fawn-nine
2023-10-19 18:04:56 +08:00
parent efcf6d45db
commit 9c662d1d9d
11 changed files with 630 additions and 229 deletions

View File

@@ -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