feat: ✨ 集成顺丰平台,发货,查询物流,打印面单
parent
4fd419fcfe
commit
f7a9bff2ba
|
@ -5,21 +5,40 @@
|
||||||
<RadioGroup v-model="formValidate.type" type="button">
|
<RadioGroup v-model="formValidate.type" type="button">
|
||||||
<Radio label="KDNIAO">快递鸟</Radio>
|
<Radio label="KDNIAO">快递鸟</Radio>
|
||||||
<Radio label="KUAIDI100">快递100</Radio>
|
<Radio label="KUAIDI100">快递100</Radio>
|
||||||
|
<Radio label="SHUNFENG">顺丰</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="formValidate.type==='KDNIAO'" label="快递鸟 商户ID" prop="kdniaoEbusinessID">
|
<FormItem v-if="formValidate.type === 'KDNIAO'" label="快递鸟 商户ID" prop="kdniaoEbusinessID">
|
||||||
<Input v-model="formValidate.kdniaoEbusinessID" />
|
<Input v-model="formValidate.kdniaoEbusinessID" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="formValidate.type==='KDNIAO'" label="快递鸟 AppKey" prop="kdniaoAppKey">
|
<FormItem v-if="formValidate.type === 'KDNIAO'" label="快递鸟 AppKey" prop="kdniaoAppKey">
|
||||||
<Input class="label-appkey" v-model="formValidate.kdniaoAppKey" />
|
<Input class="label-appkey" v-model="formValidate.kdniaoAppKey" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem v-if="formValidate.type==='KUAIDI100'" label="快递100 授权码" prop="kuaidi100Customer">
|
<FormItem v-if="formValidate.type === 'KUAIDI100'" label="快递100 授权码" prop="kuaidi100Customer">
|
||||||
<Input class="label-appkey" v-model="formValidate.kuaidi100Customer" />
|
<Input class="label-appkey" v-model="formValidate.kuaidi100Customer" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="formValidate.type==='KUAIDI100'" label="快递100 Key" prop="kuaidi100Key">
|
<FormItem v-if="formValidate.type === 'KUAIDI100'" label="快递100 Key" prop="kuaidi100Key">
|
||||||
<Input class="label-appkey" v-model="formValidate.kuaidi100Key" />
|
<Input class="label-appkey" v-model="formValidate.kuaidi100Key" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
<div v-if="formValidate.type === 'SHUNFENG'">
|
||||||
|
<FormItem label="顾客编码" prop="clientCode">
|
||||||
|
<Input v-model="formValidate.clientCode" />
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="校验码" prop="checkWord">
|
||||||
|
<Input v-model="formValidate.checkWord" />
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="请求地址" prop="callUrl">
|
||||||
|
<Input class="label-appkey" v-model="formValidate.callUrl" />
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
<FormItem label="打印模板" prop="templateCode">
|
||||||
|
<Input class="label-appkey" v-model="formValidate.templateCode" />
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="月结号" prop="monthlyCardNo">
|
||||||
|
<Input class="label-appkey" v-model="formValidate.monthlyCardNo" />
|
||||||
|
</FormItem>
|
||||||
|
</div>
|
||||||
<div class="label-btns">
|
<div class="label-btns">
|
||||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,12 +55,13 @@ export default {
|
||||||
formValidate: { // 表单数据
|
formValidate: { // 表单数据
|
||||||
type: "",
|
type: "",
|
||||||
kdniaoEbusinessID: "",
|
kdniaoEbusinessID: "",
|
||||||
kdniaoAppKey: "" ,
|
kdniaoAppKey: "",
|
||||||
kuaidi100Customer: "" ,
|
kuaidi100Customer: "",
|
||||||
kuaidi100Key: "" ,},
|
kuaidi100Key: "",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["res",'type'],
|
props: ["res", 'type'],
|
||||||
created() {
|
created() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
@ -49,7 +69,7 @@ export default {
|
||||||
// 验证
|
// 验证
|
||||||
submit(name) {
|
submit(name) {
|
||||||
let that = this;
|
let that = this;
|
||||||
if( handleSubmit(that, name )){
|
if (handleSubmit(that, name)) {
|
||||||
this.setupSetting()
|
this.setupSetting()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -83,15 +103,17 @@ export default {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./style.scss";
|
@import "./style.scss";
|
||||||
|
|
||||||
.label-item {
|
.label-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .ivu-input {
|
/deep/ .ivu-input {
|
||||||
width: 300px !important;
|
width: 300px !important;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ivu-input-wrapper {
|
.ivu-input-wrapper {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}</style>
|
||||||
</style>
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {
|
||||||
postRequest,
|
postRequest,
|
||||||
putRequest,
|
putRequest,
|
||||||
deleteRequest,
|
deleteRequest,
|
||||||
|
getRequestHasHeader,
|
||||||
importRequest,
|
importRequest,
|
||||||
getRequestWithNoToken
|
getRequestWithNoToken
|
||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
|
@ -35,4 +36,13 @@ export const getCheckedOn = params =>{
|
||||||
return getRequest(`/other/logistics/getCheckedFaceSheet`,params);
|
return getRequest(`/other/logistics/getCheckedFaceSheet`,params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取物流设置
|
||||||
|
export const getLogisticsSetting = () =>{
|
||||||
|
return getRequest(`/other/logistics/setting`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getShunFengFaceSheet = (url,headers) =>{
|
||||||
|
return getRequestHasHeader(`${url}`,null,headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,11 @@ export const orderDelivery = (sn, params) => {
|
||||||
return postRequest(`/order/order/${sn}/delivery`, params);
|
return postRequest(`/order/order/${sn}/delivery`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 订单发货
|
||||||
|
export const orderShunFengDelivery = (sn) => {
|
||||||
|
return postRequest(`/order/order/${sn}/shunfeng/delivery`);
|
||||||
|
};
|
||||||
|
|
||||||
// 获取商家选中的物流公司
|
// 获取商家选中的物流公司
|
||||||
export const getLogisticsChecked = () => {
|
export const getLogisticsChecked = () => {
|
||||||
return getRequest(`/other/logistics/getChecked`);
|
return getRequest(`/other/logistics/getChecked`);
|
||||||
|
|
|
@ -188,6 +188,38 @@ export const getRequest = (url, params, resBlob) => {
|
||||||
return service(data);
|
return service(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getRequestHasHeader = (url, params, headers) => {
|
||||||
|
let accessToken = getStore("accessToken");
|
||||||
|
let data = {
|
||||||
|
method: "get",
|
||||||
|
url: `${url}`,
|
||||||
|
params: params,
|
||||||
|
transformRequest: headers
|
||||||
|
? undefined
|
||||||
|
: [
|
||||||
|
function(data) {
|
||||||
|
let ret = "";
|
||||||
|
for (let it in data) {
|
||||||
|
ret +=
|
||||||
|
encodeURIComponent(it) +
|
||||||
|
"=" +
|
||||||
|
encodeURIComponent(data[it]) +
|
||||||
|
"&";
|
||||||
|
}
|
||||||
|
ret = ret.substring(0, ret.length - 1);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
],
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
accessToken: accessToken,
|
||||||
|
...headers
|
||||||
|
},
|
||||||
|
responseType: "blob"
|
||||||
|
};
|
||||||
|
return service(data);
|
||||||
|
};
|
||||||
|
|
||||||
export const postRequest = (url, params, headers) => {
|
export const postRequest = (url, params, headers) => {
|
||||||
let accessToken = getStore("accessToken");
|
let accessToken = getStore("accessToken");
|
||||||
return service({
|
return service({
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue