|
@@ -24,7 +24,21 @@
|
|
|
>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+ <el-form-item label="认领状态" prop="status">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.status"
|
|
|
+ placeholder="选择账户类型"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in queryParamsList.statusList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
|
|
>搜索</el-button
|
|
@@ -150,6 +164,18 @@
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="认领记录" align="center" prop="userName"> </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" prop="action">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleAddbroadcast(scope.row)"
|
|
|
+ >认领</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
@@ -159,6 +185,171 @@
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
+
|
|
|
+ <!-- 认领 -->
|
|
|
+ <el-dialog
|
|
|
+ title=" 认领"
|
|
|
+ :visible.sync="openAllocation"
|
|
|
+ width="800px"
|
|
|
+ append-to-body
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ ref="formBroadcast"
|
|
|
+ :model="formBroadcast"
|
|
|
+ :rules="rulesBroadcast"
|
|
|
+ label-width="100px"
|
|
|
+ :inline="true"
|
|
|
+ >
|
|
|
+ <div v-if="!ids">
|
|
|
+ <el-form-item label="创建人" prop="userName" style="width: 100%">
|
|
|
+ {{ $store.getters.name }}
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="达人昵称"
|
|
|
+ prop="promoterId"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ {{ formBroadcast.promoterNickName }}
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="快手ID"
|
|
|
+ prop="promoterId"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ {{ formBroadcast.promoterId }}
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="佣金要求"
|
|
|
+ prop="commissionRequirement"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入佣金要求"
|
|
|
+ style="width: 240px"
|
|
|
+ v-model="formBroadcast.commissionRequirement"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="品类要求"
|
|
|
+ prop="categoryRequirement"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入品类要求"
|
|
|
+ style="width: 240px"
|
|
|
+ v-model="formBroadcast.categoryRequirement"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="收货人"
|
|
|
+ prop="consignee"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入收货人"
|
|
|
+ style="width: 240px"
|
|
|
+ v-model="formBroadcast.consignee"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="联系方式"
|
|
|
+ prop="phone"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入联系方式"
|
|
|
+ style="width: 240px"
|
|
|
+ v-model="formBroadcast.phone"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="发货地址"
|
|
|
+ prop="promoterAddress"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入发货地址"
|
|
|
+ style="width: 100%"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ v-model="formBroadcast.promoterAddress"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-form-item label="达人名称" prop="promoterNickName" style="width: 100%">
|
|
|
+ {{ formBroadcast.promoterNickName }}({{ formBroadcast.promoterId }})
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="收货人"
|
|
|
+ prop="consignee"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入收货人"
|
|
|
+ style="width: 240px"
|
|
|
+ v-model="formBroadcast.consignee"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="联系方式"
|
|
|
+ prop="phone"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入联系方式"
|
|
|
+ style="width: 240px"
|
|
|
+ v-model="formBroadcast.phone"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="发货地址"
|
|
|
+ prop="promoterAddress"
|
|
|
+ style="width: 100%"
|
|
|
+ class="entire-line"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入发货地址"
|
|
|
+ style="width: 100%"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ v-model="formBroadcast.promoterAddress"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitFormBroadcast" :loading="confirmLoading"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="
|
|
|
+ confirmLoading = false;
|
|
|
+ openAllocation = false;
|
|
|
+ formBroadcast = {};
|
|
|
+ "
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -228,9 +419,15 @@ export default {
|
|
|
pageSize: 10,
|
|
|
promoterNickName: undefined,
|
|
|
promoterId: undefined,
|
|
|
+ status: undefined,
|
|
|
},
|
|
|
//页面所有的下拉数据
|
|
|
- queryParamsList: {},
|
|
|
+ queryParamsList: {
|
|
|
+ statusList: [
|
|
|
+ { value: 1, label: "已认领" },
|
|
|
+ { value: 2, label: "未认领" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
formBroadcast: {},
|
|
@@ -245,11 +442,6 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {},
|
|
|
rulesBroadcast: {
|
|
|
- promoterId: {
|
|
|
- required: true,
|
|
|
- message: "快手ID必填",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
consignee: {
|
|
|
required: true,
|
|
|
message: "收货人必填",
|
|
@@ -382,6 +574,7 @@ export default {
|
|
|
this.ids = item.id;
|
|
|
this.edit = true;
|
|
|
this.openAllocation = true;
|
|
|
+
|
|
|
this.$set(this.formBroadcast, "consignee", item.consignee);
|
|
|
this.$set(this.formBroadcast, "phone", item.phone);
|
|
|
this.$set(this.formBroadcast, "promoterAddress", item.promoterAddress);
|
|
@@ -443,34 +636,18 @@ export default {
|
|
|
...this.formBroadcast,
|
|
|
};
|
|
|
|
|
|
- if (!this.ids) {
|
|
|
- addPromoter(formData)
|
|
|
- .then((res) => {
|
|
|
- this.confirmLoading = false;
|
|
|
- this.$message.success("新增成功");
|
|
|
- this.openAllocation = false;
|
|
|
- this.ids = null;
|
|
|
- this.cancel();
|
|
|
- this.handleQuery();
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.confirmLoading = false;
|
|
|
- });
|
|
|
- } else {
|
|
|
- formData.id = this.ids;
|
|
|
- editPromoter(formData)
|
|
|
- .then((res) => {
|
|
|
- this.confirmLoading = false;
|
|
|
- this.$message.success("修改成功");
|
|
|
- this.openAllocation = false;
|
|
|
- this.ids = null;
|
|
|
- this.cancel();
|
|
|
- this.handleQuery();
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.confirmLoading = false;
|
|
|
- });
|
|
|
- }
|
|
|
+ addPromoter(formData)
|
|
|
+ .then((res) => {
|
|
|
+ this.confirmLoading = false;
|
|
|
+ this.$message.success("认领成功");
|
|
|
+ this.openAllocation = false;
|
|
|
+ this.ids = null;
|
|
|
+ this.cancel();
|
|
|
+ this.handleQuery();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.confirmLoading = false;
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|