Commit 9981e7e7 authored by zhengke's avatar zhengke
parents b5f2ff80 b0e9e6fe
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="从业年限"> <el-form-item label="从业年限">
<el-input type="text" class="w200" size="small" @keyup.native="checkPrice(addMsg,'WorkYears')" v-model="addMsg.WorkYears"> <el-input type="text" class="w200" size="small" @keyup.native="checkPrice(addMsg,'WorkYears')"
v-model="addMsg.WorkYears">
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -90,7 +91,8 @@ ...@@ -90,7 +91,8 @@
<el-input v-model="addMsg.Major" class="w400" size="small" placeholder="职务" maxlength="20" /> <el-input v-model="addMsg.Major" class="w400" size="small" placeholder="职务" maxlength="20" />
</el-form-item> </el-form-item>
<el-form-item label="简介"> <el-form-item label="简介">
<el-input type="textarea" :rows="3" v-model="addMsg.Introduction" class="w400" size="small" placeholder="简介"/> <el-input type="textarea" :rows="3" v-model="addMsg.Introduction" class="w400" size="small"
placeholder="简介" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -115,7 +117,7 @@ ...@@ -115,7 +117,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!--选择的商品列表--> <!--选择的商品列表-->
<el-dialog title="添加商品" :visible.sync="addcommodity" width="1024px"> <el-dialog title="选择商品" :visible.sync="addcommodity" width="800px">
<template> <template>
<div class="el-form-item"> <div class="el-form-item">
<div class="el-form-item__content"> <div class="el-form-item__content">
...@@ -126,27 +128,21 @@ ...@@ -126,27 +128,21 @@
<button type="button" class="el-button el-button--default el-button--small" style="margin-left: 15px" <button type="button" class="el-button el-button--default el-button--small" style="margin-left: 15px"
@click="msg2.pageIndex=1,getProductGoodsPageList()">查找商品</button> @click="msg2.pageIndex=1,getProductGoodsPageList()">查找商品</button>
<button class="el-button el-button--default el-button--small" style="float: right;" <button class="el-button el-button--default el-button--small" style="float: right;"
@click="batchAdd">批量添加</button> @click="batchAdd">添加</button>
</div> </div>
</div> </div>
<el-table v-loading="loading_t" :data="tableData" ref="dataTable" @selection-change="handleSelectionChange" <el-table v-loading="loading_t" :data="tableData" ref="dataTable" @selection-change="handleSelectionChange"
style="width: 984px;height:400px;overflow:auto;"> style="width: 750px;height:400px;overflow:auto;">
<el-table-column type="selection" width="55"> <el-table-column type="selection" width="55">
</el-table-column> </el-table-column>
<el-table-column prop="Id" label="ID" width="80"> <el-table-column prop="Id" label="ID" width="100">
</el-table-column> </el-table-column>
<el-table-column label="商品图" width="80"> <el-table-column label="商品图" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<img style="width:50px;height:50px;margin-right:1px" :src="scope.row.CoverImage" alt=""> <img style="width:50px;height:50px;margin-right:1px" :src="scope.row.CoverImage" alt="">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="Name" label="商品名称" width="333"> <el-table-column prop="Name" label="商品名称">
</el-table-column>
<el-table-column prop="address" label="操作">
<template slot-scope="scope">
<el-button type="primary" plain size="mini" @click="addtableData(scope)" :disabled="scope.row.disabled">
{{scope.row.disabled==true? '已添加':'添加'}}</el-button>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" <el-pagination style="text-align:right" background @current-change="handleCurrentChange"
...@@ -186,19 +182,20 @@ ...@@ -186,19 +182,20 @@
ServiceStatus: 1, // 启用/禁用 状态1启用 2禁用 ServiceStatus: 1, // 启用/禁用 状态1启用 2禁用
Telephone: '', //电话 Telephone: '', //电话
FictitiousReserveNum: '', //虚拟预约数 FictitiousReserveNum: '', //虚拟预约数
WorkYears:'', //工作年限 WorkYears: '', //工作年限
Introduction:'' //简介 Introduction: '' //简介
}, },
msg2: { msg2: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
Name: '', Name: '',
GoodsStatus: 0, GoodsStatus: 1,
IsSelectSellOut: 0, IsSelectSellOut: 0,
CategoryIds: '', CategoryIds: '',
Id: 0, Id: 0,
StartTime: '', StartTime: '',
EndTime: '', EndTime: '',
StoresIds: "",
}, },
genderList: [], //性别枚举 genderList: [], //性别枚举
inputValue: '', //新增标签输入框值 inputValue: '', //新增标签输入框值
...@@ -225,7 +222,6 @@ ...@@ -225,7 +222,6 @@
}, },
StoreList: [], //门店下拉数据 StoreList: [], //门店下拉数据
AppointList2: [], AppointList2: [],
rules: { rules: {
Name: [{ Name: [{
required: true, required: true,
...@@ -283,6 +279,8 @@ ...@@ -283,6 +279,8 @@
this.$refs.tree.setCheckedKeys(this.checkedkeys); this.$refs.tree.setCheckedKeys(this.checkedkeys);
}); });
} else if (val == 2) { } else if (val == 2) {
this.tableData = [];
this.count = 0;
this.checkedkeys = [] this.checkedkeys = []
this.addcommodity = true this.addcommodity = true
} }
...@@ -334,7 +332,13 @@ ...@@ -334,7 +332,13 @@
}) })
}, },
getProductGoodsPageList() { getProductGoodsPageList() {
this.loading_t = true
this.msg2.StoresIds = this.addMsg.StoreId;
if (this.msg2.StoresIds == '' || this.msg2.StoresIds == '0') {
this.Error("请选择门店!");
return;
}
this.loading_t = true;
this.apipost("/api/OSGoods/GetOfflineGoodsPageList", this.msg2, res => { this.apipost("/api/OSGoods/GetOfflineGoodsPageList", this.msg2, res => {
this.loading_t = false; this.loading_t = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -350,7 +354,7 @@ ...@@ -350,7 +354,7 @@
var myTable = JSON.parse(JSON.stringify(this.tableData)); var myTable = JSON.parse(JSON.stringify(this.tableData));
myTable[data.$index].disabled = true; myTable[data.$index].disabled = true;
this.commoditylist.push(data.row) this.commoditylist.push(data.row)
this.tableData=myTable; this.tableData = myTable;
this.Success('添加成功'); this.Success('添加成功');
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -386,7 +390,8 @@ ...@@ -386,7 +390,8 @@
this.Success('添加成功'); this.Success('添加成功');
} }
this.commoditylist = this.unique(this.commoditylist.concat(newdata)) this.commoditylist = this.unique(this.commoditylist.concat(newdata))
this.$refs.dataTable.clearSelection() this.$refs.dataTable.clearSelection();
this.addcommodity = false;
}, },
// 数组去重 // 数组去重
unique(arr) { unique(arr) {
...@@ -517,7 +522,7 @@ ...@@ -517,7 +522,7 @@
this.addMsg.ProductList.forEach(y => { this.addMsg.ProductList.forEach(y => {
if (y.ProductId == x.Id) { if (y.ProductId == x.Id) {
this.commoditylist.push(x); this.commoditylist.push(x);
x.disabled=true; x.disabled = true;
} }
}) })
}) })
...@@ -556,12 +561,10 @@ ...@@ -556,12 +561,10 @@
this.getMemberGradeList(); this.getMemberGradeList();
this.getSmallShopsDropDownList(); this.getSmallShopsDropDownList();
this.getStoreList(); this.getStoreList();
this.getProductGoodsPageList();
if (this.$route.query.ID) { if (this.$route.query.ID) {
this.addMsg.ID = this.$route.query.ID; this.addMsg.ID = this.$route.query.ID;
this.getData() this.getData()
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment