|
@@ -6,7 +6,7 @@
|
|
|
<div class="form_box" style="margin-right: 10rem">
|
|
|
<dil-form :formId="309" v-model="form1" ref="from1"></dil-form>
|
|
|
</div>
|
|
|
- <!-- <div class="inputBox">
|
|
|
+ <div class="inputBox">
|
|
|
<span class="text">所属承运商</span>
|
|
|
<el-autocomplete
|
|
|
class="input"
|
|
@@ -17,7 +17,7 @@
|
|
|
:trigger-on-focus="false"
|
|
|
@select="handleSelect"
|
|
|
></el-autocomplete>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
<div class="button_box">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
@@ -40,53 +40,63 @@ export default {
|
|
|
restaurants: [],
|
|
|
accessToken:null,
|
|
|
userCode:null,
|
|
|
- carrierUserId:null
|
|
|
+ carrierUserId:null,
|
|
|
+ carrierId:null
|
|
|
};
|
|
|
},
|
|
|
created(){
|
|
|
this.carrierUserId = getCookie("userId");
|
|
|
console.log(this.carrierUserId ,'carrierUserId')
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
- },
|
|
|
+ this.axios.post(
|
|
|
+ "api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
|
|
|
+ )
|
|
|
+ .then((res) => {
|
|
|
+ if(res.data.code == "200"){
|
|
|
+ console.log(res.data.data)
|
|
|
+ this.state = res.data.data.carrierName
|
|
|
+ this.carrierIds = res.data.data.carrierId
|
|
|
+ }
|
|
|
+ })},
|
|
|
methods: {
|
|
|
- // onInput() {
|
|
|
- // this.axios.post(
|
|
|
- // "/api/v1/rms/getCarrierName?state="+this.state,
|
|
|
- // )
|
|
|
- // .then((res) => {
|
|
|
- // if(res.data.code == "200"){
|
|
|
- // res.data.data.forEach(element => {
|
|
|
- // this.restaurants.push({
|
|
|
- // value:element.carrierName,
|
|
|
- // carrierIds:element.carrierId
|
|
|
- // })
|
|
|
- // });
|
|
|
- // }
|
|
|
+ onInput() {
|
|
|
+ this.axios.post(
|
|
|
+ "/api/v1/rms/getCarrierName?state="+this.state,
|
|
|
+ )
|
|
|
+ .then((res) => {
|
|
|
+ if(res.data.code == "200"){
|
|
|
+ res.data.data.forEach(element => {
|
|
|
+ this.restaurants.push({
|
|
|
+ value:element.carrierName,
|
|
|
+ carrierIds:element.carrierId
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- // });
|
|
|
- // },
|
|
|
- // querySearch(queryString, cb) {
|
|
|
- // var restaurants = this.restaurants;
|
|
|
- // var results = queryString
|
|
|
- // ? restaurants.filter(this.createFilter(queryString))
|
|
|
- // : restaurants;
|
|
|
- // // 调用 callback 返回建议列表的数据
|
|
|
- // cb(results);
|
|
|
- // },
|
|
|
- // createFilter(queryString) {
|
|
|
- // return (restaurant) => {
|
|
|
- // return (
|
|
|
- // restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
|
|
|
- // 0
|
|
|
- // );
|
|
|
- // };
|
|
|
- // },
|
|
|
- // handleSelect(item) {
|
|
|
- // this.carrierIds = item.carrierIds;
|
|
|
- // console.log(item);
|
|
|
- // },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ querySearch(queryString, cb) {
|
|
|
+ var restaurants = this.restaurants;
|
|
|
+ var results = queryString
|
|
|
+ ? restaurants.filter(this.createFilter(queryString))
|
|
|
+ : restaurants;
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
+ cb(results);
|
|
|
+ },
|
|
|
+ createFilter(queryString) {
|
|
|
+ return (restaurant) => {
|
|
|
+ return (
|
|
|
+ restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
|
|
|
+ 0
|
|
|
+ );
|
|
|
+ };
|
|
|
+ },
|
|
|
+ handleSelect(item) {
|
|
|
+ this.carrierIds = item.carrierIds;
|
|
|
+ console.log(item);
|
|
|
+ },
|
|
|
deleteUser(userId){
|
|
|
this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
|
|
|
this.$message.error("添加失败,车牌可能重复");
|
|
@@ -119,9 +129,8 @@ export default {
|
|
|
capacityOwneris: this.form1.capacityOwneris,
|
|
|
capacityVip: this.form1.capacityVip,
|
|
|
capacityBlacklist: this.form1.capacityBlacklist,
|
|
|
- // carrierId:this.form1.carrierId,
|
|
|
- state: this.state,
|
|
|
- carrierUserId:this.carrierUserId
|
|
|
+ carrierId:this.carrierIds,
|
|
|
+ state: this.state
|
|
|
};
|
|
|
if (
|
|
|
RmsCapacity.capacityNumber == null ||
|
|
@@ -169,22 +178,6 @@ export default {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
|
});
|
|
|
- // this.axios
|
|
|
- // .post("/api/v1/rms/insertCapacity", RmsCapacity)
|
|
|
- // .then((res) => {
|
|
|
- // console.log("res.data.code", res.data.code);
|
|
|
- // if (res.data.code == 200) {
|
|
|
- // this.$message({
|
|
|
- // type: "success",
|
|
|
- // message: "新增成功!",
|
|
|
- // });
|
|
|
- // // this.$refs.table.refreshData();
|
|
|
- // this.$router.go(-1);
|
|
|
- // } else {
|
|
|
- // this.$message.error("新增失败,可能存在重复!");
|
|
|
- // }
|
|
|
- // // this.$refs['table'].resetField();
|
|
|
- // });
|
|
|
},
|
|
|
// 取消
|
|
|
cancel() {
|