|
@@ -49,6 +49,14 @@
|
|
|
@click="handleFilter"
|
|
|
>搜索</el-button
|
|
|
>
|
|
|
+ <!-- <el-button
|
|
|
+ style="margin-left: 10px;"
|
|
|
+ :loading="searchLoading"
|
|
|
+ type="primary"
|
|
|
+ @click="goUpStore"
|
|
|
+ plain
|
|
|
+ >上线门店</el-button
|
|
|
+ > -->
|
|
|
<el-select
|
|
|
style="float:right;"
|
|
|
v-model="selectValue"
|
|
@@ -90,7 +98,11 @@
|
|
|
label="地址"
|
|
|
></el-table-column>
|
|
|
<el-table-column prop="contactname" label="联系人"></el-table-column>
|
|
|
- <el-table-column prop="contactphone" label="联系电话"></el-table-column>
|
|
|
+ <el-table-column prop="contactphone" label="联系电话">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.contactphone }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="district" label="区域"></el-table-column>
|
|
|
<el-table-column
|
|
|
prop="takeawayphone"
|
|
@@ -112,17 +124,20 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <!-- <el-table-column
|
|
|
+ <el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
- width="230"
|
|
|
class-name="small-padding fixed-width"
|
|
|
>
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-button type="primary" size="mini" @click="handleUpdate(row)">编辑</el-button>
|
|
|
- <el-button type="primary" size="mini" @click="handleUpdate(row)">商品管理</el-button>
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-button type="text" size="small" @click="handleUpdate(row)"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button type="primary" size="mini" @click="handleUpdate(row)"
|
|
|
+ >商品管理</el-button
|
|
|
+ > -->
|
|
|
</template>
|
|
|
- </el-table-column>-->
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<!-- <pagination
|
|
|
v-show="total>0"
|
|
@@ -142,17 +157,37 @@
|
|
|
label-width="90px"
|
|
|
style="margin-left:50px;"
|
|
|
>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item
|
|
|
+ label="状态"
|
|
|
+ :style="{ color: temp.isbuild == 1 ? '#409EFF' : 'red' }"
|
|
|
+ >
|
|
|
+ {{ temp.isbuild | filterBuild }}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="门店名称" prop="name">
|
|
|
- <el-input v-model="temp.name" placeholder="请输入" clearable />
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="temp.name"
|
|
|
+ placeholder="请输入"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="订餐电话" prop="tel">
|
|
|
- <el-input v-model="temp.tel" placeholder="请输入" clearable />
|
|
|
+ <el-form-item label="联系电话" prop="contactphone">
|
|
|
+ <el-input
|
|
|
+ v-model="temp.contactphone"
|
|
|
+ placeholder="请输入"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -162,7 +197,12 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="门店地址" prop="address">
|
|
|
- <el-input v-model="temp.address" placeholder="请输入" clearable />
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="temp.address"
|
|
|
+ placeholder="请输入"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -173,6 +213,7 @@
|
|
|
<el-form-item prop="startTime">
|
|
|
<el-time-select
|
|
|
placeholder="开始时间"
|
|
|
+ disabled
|
|
|
v-model="temp.startTime"
|
|
|
:picker-options="{
|
|
|
start: '08:30',
|
|
@@ -188,6 +229,7 @@
|
|
|
<el-form-item prop="endTime">
|
|
|
<el-time-select
|
|
|
placeholder="结束时间"
|
|
|
+ disabled
|
|
|
v-model="temp.endTime"
|
|
|
:picker-options="{
|
|
|
start: '08:30',
|
|
@@ -215,7 +257,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getList } from "@/api/shop";
|
|
|
+import { getList, changephone } from "@/api/shop";
|
|
|
import Pagination from "@/components/Pagination";
|
|
|
export default {
|
|
|
data() {
|
|
@@ -249,14 +291,14 @@ export default {
|
|
|
dialogStatus: "",
|
|
|
temp: {
|
|
|
name: "",
|
|
|
- tel: "",
|
|
|
+ contactphone: "",
|
|
|
address: "",
|
|
|
startTime: "",
|
|
|
endTime: ""
|
|
|
},
|
|
|
rules: {
|
|
|
name: [{ required: true, message: "请输入门店名称", trigger: "blur" }],
|
|
|
- tel: [
|
|
|
+ contactphone: [
|
|
|
{
|
|
|
required: true,
|
|
|
validator: checkPhone
|
|
@@ -303,6 +345,9 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ goUpStore() {
|
|
|
+ this.$router.push("setStore");
|
|
|
+ },
|
|
|
getList() {
|
|
|
this.listLoading = true;
|
|
|
getList().then(res => {
|
|
@@ -352,6 +397,41 @@ export default {
|
|
|
createData() {
|
|
|
this.$refs["dataForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
+ console.lg(valid);
|
|
|
+ // this.temp.id = parseInt(Math.random() * 100) + 1024 // mock a id
|
|
|
+ // this.temp.author = 'vue-element-admin'
|
|
|
+ // createArticle(this.temp).then(() => {
|
|
|
+ // this.list.unshift(this.temp)
|
|
|
+ // this.dialogFormVisible = false
|
|
|
+ // this.$notify({
|
|
|
+ // title: '成功',
|
|
|
+ // message: '创建成功',
|
|
|
+ // type: 'success',
|
|
|
+ // duration: 2000
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ updateData() {
|
|
|
+ this.$refs["dataForm"].validate(async valid => {
|
|
|
+ if (valid) {
|
|
|
+ console.log(valid);
|
|
|
+ console.log(this.temp);
|
|
|
+ let params = { shopid: this.temp.id, phone: this.temp.contactphone };
|
|
|
+ let res = await changephone(params);
|
|
|
+ console.log(res);
|
|
|
+ if (res === "OK") {
|
|
|
+ this.getList();
|
|
|
+ this.selectValue = "";
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ this.$notify({
|
|
|
+ title: "成功",
|
|
|
+ message: "修改成功!",
|
|
|
+ type: "success",
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
// this.temp.id = parseInt(Math.random() * 100) + 1024 // mock a id
|
|
|
// this.temp.author = 'vue-element-admin'
|
|
|
// createArticle(this.temp).then(() => {
|
|
@@ -369,7 +449,10 @@ export default {
|
|
|
},
|
|
|
handleUpdate(row) {
|
|
|
this.temp = Object.assign({}, row); // copy obj
|
|
|
- this.temp.timestamp = new Date(this.temp.timestamp);
|
|
|
+ console.log(this.temp);
|
|
|
+ this.temp.startTime = row.businesshour.split("-")[0];
|
|
|
+ this.temp.endTime = row.businesshour.split("-")[1];
|
|
|
+ // this.temp.timestamp = new Date(this.temp.timestamp);
|
|
|
this.dialogStatus = "update";
|
|
|
this.dialogFormVisible = true;
|
|
|
this.$nextTick(() => {
|