|
@@ -12,7 +12,20 @@
|
|
:rules="rules"
|
|
:rules="rules"
|
|
label-width="100px"
|
|
label-width="100px"
|
|
>
|
|
>
|
|
- <el-form-item label="快递公司:" prop="deliveryId">
|
|
|
|
|
|
+ <el-form-item label="配送方式:" prop="deliveryId">
|
|
|
|
+ <el-radio @change="radioDistribution" v-model="shipForm.deliveryType" label="1">快递发货</el-radio>
|
|
|
|
+ <el-radio @change="radioDistribution" v-model="shipForm.deliveryType" label="2">无需物流</el-radio>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="shipForm.deliveryType == 1" label="快递单号:" prop="deliveryFlowId">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="shipForm.deliveryFlowId"
|
|
|
|
+ placeholder="输入快递单号"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 300px"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="shipForm.deliveryType == 1" label="快递公司:" prop="deliveryId">
|
|
<el-select
|
|
<el-select
|
|
v-model="shipForm.deliveryId"
|
|
v-model="shipForm.deliveryId"
|
|
placeholder="请选择快递公司"
|
|
placeholder="请选择快递公司"
|
|
@@ -28,15 +41,6 @@
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="快递单号:" prop="deliveryFlowId">
|
|
|
|
- <el-input
|
|
|
|
- v-model="shipForm.deliveryFlowId"
|
|
|
|
- placeholder="输入快递单号"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- style="width: 300px"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 按钮 -->
|
|
<!-- 按钮 -->
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -79,15 +83,16 @@ export default {
|
|
shipForm: {
|
|
shipForm: {
|
|
deliveryId: "",
|
|
deliveryId: "",
|
|
deliveryFlowId: "",
|
|
deliveryFlowId: "",
|
|
|
|
+ deliveryType: "1",//配送方式
|
|
},
|
|
},
|
|
// 快递下拉列表
|
|
// 快递下拉列表
|
|
companyData: [],
|
|
companyData: [],
|
|
rules: {
|
|
rules: {
|
|
deliveryId: [
|
|
deliveryId: [
|
|
- { required: true, message: "请选择快递公司", trigger: "change" },
|
|
|
|
|
|
+ { required: false, message: "请选择快递公司", trigger: "change" },
|
|
],
|
|
],
|
|
deliveryFlowId: [
|
|
deliveryFlowId: [
|
|
- { required: true, message: "请输入快递单号", trigger: "blur" },
|
|
|
|
|
|
+ { required: false, message: "请输入快递单号", trigger: "blur" },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
};
|
|
};
|
|
@@ -100,8 +105,9 @@ export default {
|
|
getFormData(){
|
|
getFormData(){
|
|
this.shipForm.deliveryId = this.goodsInfo.deliveryId
|
|
this.shipForm.deliveryId = this.goodsInfo.deliveryId
|
|
this.shipForm.deliveryFlowId = this.goodsInfo.deliveryFlowId
|
|
this.shipForm.deliveryFlowId = this.goodsInfo.deliveryFlowId
|
|
|
|
+ this.shipForm.deliveryType = this.goodsInfo.deliveryType
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
// 关闭发货弹框
|
|
// 关闭发货弹框
|
|
close() {
|
|
close() {
|
|
this.$emit("close");
|
|
this.$emit("close");
|
|
@@ -109,6 +115,15 @@ export default {
|
|
this.$refs["shipForm"].resetFields();
|
|
this.$refs["shipForm"].resetFields();
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ //切换配送方式时清空另一个方式所选项
|
|
|
|
+ radioDistribution(){
|
|
|
|
+ if(this.shipForm.deliveryType == '2'){
|
|
|
|
+ this.shipForm.deliveryId = '';
|
|
|
|
+ this.shipForm.deliveryFlowId = '';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
// 快递下拉列表
|
|
// 快递下拉列表
|
|
getCompanyList() {
|
|
getCompanyList() {
|
|
companyList({}).then((res) => {
|
|
companyList({}).then((res) => {
|
|
@@ -154,4 +169,4 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
-</style>
|
|
|
|
|
|
+</style>
|