|
@@ -9,9 +9,29 @@
|
|
<div class="liulan">
|
|
<div class="liulan">
|
|
<el-button type="primary" class="btn" @click="lineClick">浏览</el-button>
|
|
<el-button type="primary" class="btn" @click="lineClick">浏览</el-button>
|
|
<el-button type="primary" class="btn1" @click="addressClick">浏览</el-button>
|
|
<el-button type="primary" class="btn1" @click="addressClick">浏览</el-button>
|
|
- <el-button type="primary" class="btn2">浏览</el-button>
|
|
|
|
|
|
+ <!-- <el-button type="primary" class="btn2">浏览</el-button> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="elForm">
|
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
|
+ <el-form-item label="所属承运商">
|
|
|
|
+ <el-autocomplete
|
|
|
|
+ class="inline-input"
|
|
|
|
+ v-model="state"
|
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
|
+ placeholder="请输入承运商名称"
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
+ @select="handleSelect"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="{ item }">
|
|
|
|
+ <div class="name" v-if="item.carrierName">
|
|
|
|
+ {{ item.carrierName }}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
<div class="button_box">
|
|
<div class="button_box">
|
|
<el-button @click="cancel">取消</el-button>
|
|
<el-button @click="cancel">取消</el-button>
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
<el-button type="primary" @click="makeSure">确定</el-button>
|
|
@@ -79,16 +99,23 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import PageTitle from "@/components/Page/Title";
|
|
import PageTitle from "@/components/Page/Title";
|
|
-
|
|
|
|
|
|
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
|
|
export default {
|
|
export default {
|
|
components: { PageTitle },
|
|
components: { PageTitle },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ //承运商名称
|
|
|
|
+ state: null,
|
|
|
|
+ //承运商id
|
|
|
|
+ carrierIds: null,
|
|
//是否打开收货地址模态框
|
|
//是否打开收货地址模态框
|
|
addresDrawer:false,
|
|
addresDrawer:false,
|
|
//收货地址查询条件
|
|
//收货地址查询条件
|
|
addresText:null,
|
|
addresText:null,
|
|
|
|
+ //收货地址id
|
|
|
|
+ addressId:null,
|
|
//收货地址模态框数据
|
|
//收货地址模态框数据
|
|
|
|
+ addressDetailed :null,
|
|
addres:{
|
|
addres:{
|
|
requestUrl:"",
|
|
requestUrl:"",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
@@ -102,6 +129,8 @@ export default {
|
|
LineDrawer:false,
|
|
LineDrawer:false,
|
|
//线路查询条件
|
|
//线路查询条件
|
|
LineText:null,
|
|
LineText:null,
|
|
|
|
+ //线路Id
|
|
|
|
+ lineId:null,
|
|
//线路模态框查询按钮状态
|
|
//线路模态框查询按钮状态
|
|
selectLineLoading:false,
|
|
selectLineLoading:false,
|
|
//线路模态窗口的数据
|
|
//线路模态窗口的数据
|
|
@@ -114,9 +143,10 @@ export default {
|
|
//表单数据
|
|
//表单数据
|
|
form1: {
|
|
form1: {
|
|
priceDate:new Date(),
|
|
priceDate:new Date(),
|
|
|
|
+ oilTypeId:10,
|
|
},
|
|
},
|
|
//提交给后端的数据
|
|
//提交给后端的数据
|
|
- map:{},
|
|
|
|
|
|
+ // map:{},
|
|
ops: {
|
|
ops: {
|
|
vuescroll: {},
|
|
vuescroll: {},
|
|
scrollPanel: {},
|
|
scrollPanel: {},
|
|
@@ -133,6 +163,21 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
|
|
|
|
+ )
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ console.log(res.data.data);
|
|
|
|
+ if (res.data.data) {
|
|
|
|
+ this.state = res.data.data.carrierName;
|
|
|
|
+ this.carrierIds = res.data.data.carrierId;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
func(res){
|
|
func(res){
|
|
this.selectLineLoading = false;
|
|
this.selectLineLoading = false;
|
|
@@ -159,33 +204,70 @@ export default {
|
|
this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
|
|
this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //承运商弹出层
|
|
|
|
+ handleSelect(item) {
|
|
|
|
+ this.carrierIds = item.carrierId;
|
|
|
|
+ item.carrierName = this.state;
|
|
|
|
+ },
|
|
|
|
+ //以下是承运商边输边查搜索
|
|
|
|
+ querySearch(queryString, cb) {
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ console.log(res.data.data);
|
|
|
|
+ var restaurants = res.data.data;
|
|
|
|
+ // console.log(restaurants, "restaurants");
|
|
|
|
+ var results = queryString
|
|
|
|
+ ? restaurants.filter(this.createFilter(queryString))
|
|
|
|
+ : restaurants;
|
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
|
+ cb(results);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ createFilter(queryString) {
|
|
|
|
+ return (restaurants) => {
|
|
|
|
+ return (
|
|
|
|
+ restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
|
|
|
|
+ -1
|
|
|
|
+ );
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //以上是承运商边输边查搜索
|
|
currentRadioChange(val){
|
|
currentRadioChange(val){
|
|
let mapvalue = {
|
|
let mapvalue = {
|
|
- shipperId:this.form1.shipperId,
|
|
|
|
|
|
+ shipperId : this.form1.shipperId,
|
|
lineName:val.lineName,
|
|
lineName:val.lineName,
|
|
- carrierId:this.form1.carrierId,
|
|
|
|
|
|
+ capacityTypeId : this.form1.capacityTypeId,
|
|
|
|
+ cargonameId : this.form1.cargonameId,
|
|
|
|
+ priceValue : this.form1.priceValue,
|
|
|
|
+ priceDate : this.form1.priceDate,
|
|
addressName:this.form1.addressName,
|
|
addressName:this.form1.addressName,
|
|
- priceValue:this.form1.priceValue,
|
|
|
|
- materialId:this.form1.materialId,
|
|
|
|
- type:this.form1.type,
|
|
|
|
- priceDate:this.form1.priceDate,
|
|
|
|
|
|
+ type : this.form1.type,
|
|
|
|
+ oilpriceBase : this.form1.oilpriceBase,
|
|
|
|
+ oilTypeId : this.form1.oilTypeId,
|
|
|
|
+ oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
|
|
}
|
|
}
|
|
- this.form1 = mapvalue
|
|
|
|
- this.map.lineId = val.lineId;
|
|
|
|
|
|
+ this.form1 = mapvalue;
|
|
|
|
+ this.lineId = val.lineId;
|
|
},
|
|
},
|
|
currentRadioChange1(val){
|
|
currentRadioChange1(val){
|
|
let mapvalue = {
|
|
let mapvalue = {
|
|
- shipperId:this.form1.shipperId,
|
|
|
|
|
|
+ shipperId : this.form1.shipperId,
|
|
lineName:this.form1.lineName,
|
|
lineName:this.form1.lineName,
|
|
- carrierId:this.form1.carrierId,
|
|
|
|
|
|
+ capacityTypeId : this.form1.capacityTypeId,
|
|
|
|
+ cargonameId : this.form1.cargonameId,
|
|
|
|
+ priceValue : this.form1.priceValue,
|
|
|
|
+ priceDate : this.form1.priceDate,
|
|
addressName:val.address,
|
|
addressName:val.address,
|
|
- priceValue:this.form1.priceValue,
|
|
|
|
- materialId:this.form1.materialId,
|
|
|
|
- type:this.form1.type,
|
|
|
|
- priceDate:this.form1.priceDate,
|
|
|
|
|
|
+ type : this.form1.type,
|
|
|
|
+ oilpriceBase : this.form1.oilpriceBase,
|
|
|
|
+ oilTypeId : this.form1.oilTypeId,
|
|
|
|
+ oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
|
|
}
|
|
}
|
|
- this.form1 = mapvalue
|
|
|
|
- this.map.addressId = val.addressId;
|
|
|
|
|
|
+ this.form1 = mapvalue;
|
|
|
|
+ this.addressId = val.addressId;
|
|
},
|
|
},
|
|
//打开线路的模态窗口
|
|
//打开线路的模态窗口
|
|
lineClick(){
|
|
lineClick(){
|
|
@@ -208,7 +290,30 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
makeSure() {
|
|
makeSure() {
|
|
-
|
|
|
|
|
|
+ let amsContractTransportPrice={
|
|
|
|
+ shipperId : this.form1.shipperId,
|
|
|
|
+ carrierId : this.carrierIds,
|
|
|
|
+ lineId : this.lineId,
|
|
|
|
+ capacityTypeId : this.form1.capacityTypeId,
|
|
|
|
+ cargonameId : this.form1.cargonameId,
|
|
|
|
+ priceValue : this.form1.priceValue,
|
|
|
|
+ priceDate : sjTime(this.form1.priceDate),
|
|
|
|
+ addressId : this.addressId,
|
|
|
|
+ type : this.form1.type,
|
|
|
|
+ oilpriceBase : this.form1.oilpriceBase,
|
|
|
|
+ oilTypeId : this.form1.oilTypeId,
|
|
|
|
+ oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
|
|
|
|
+ }
|
|
|
|
+ // console.log("amsContractTransportPrice",amsContractTransportPrice)
|
|
|
|
+ this.axios.post("/api/v1/ams/addAmsContractTransportPrice", amsContractTransportPrice).then((res) => {
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ this.$router.go(-1);
|
|
|
|
+ }
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "新增运输单价成功!",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 取消
|
|
// 取消
|
|
cancel() {
|
|
cancel() {
|
|
@@ -218,6 +323,9 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang='scss'>
|
|
<style lang='scss'>
|
|
|
|
+.elForm {
|
|
|
|
+ margin-left: 30%;
|
|
|
|
+ }
|
|
.addTransportPrice{
|
|
.addTransportPrice{
|
|
.form{
|
|
.form{
|
|
display: flex;
|
|
display: flex;
|