Commit 766ca9d9 authored by zhengke's avatar zhengke

修改

parent c2ccc7b1
<style scope> <style scope>
.circle { .gd_Item{
width: 20px; cursor:pointer;
height: 20px; border:1px solid #dcdfe6;
margin:0 0 5px 5px;
padding:0px 8px;
border-radius:5px;
font-size:12px;
line-height: 24px;
display: inline-block; display: inline-block;
text-align: center;
background: grey;
border-radius: 20px;
margin-right: 5px;
} }
.goodLisPopver .checkSpec {
.circle.red {
background: #fe4433;
}
.circle.green {
background: green;
}
.circle.black {
background: black;
}
.remark {
margin-right: 20px;
font-size: 12px;
display: inline-block;
vertical-align: text-top;
}
.wd100 {
width: 100% !important;
}
.el-tag+.el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.goodlist .checkSpec {
border: 1px solid red !important; border: 1px solid red !important;
} }
.goodLisPopver .el-input__inner{
height:32px!important;
}
</style> </style>
<template> <template>
<div class="flexOne goodlist"> <div class="flexOne goodlist">
...@@ -74,7 +35,7 @@ ...@@ -74,7 +35,7 @@
<li> <li>
<span> <span>
<em>商品名称</em> <em>商品名称</em>
<el-input v-model="msg.Name" class="w150" clearable></el-input> <el-input v-model="msg.Name" class="w150" @keyup.enter.native="getGoodList" clearable></el-input>
</span> </span>
</li> </li>
<li> <li>
...@@ -85,27 +46,27 @@ ...@@ -85,27 +46,27 @@
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total"> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total">
</el-pagination> </el-pagination>
<table v-loading="loading"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<thead> <thead>
<tr> <tr>
<th style="width:100px;">编号</th> <th style="width:100px;">编号</th>
<th>分类</th> <th style="width:200px;">分类</th>
<th style="width:250px;"> <th>
商品名称 商品名称
</th> </th>
<th style="width:150px;"> <th style="width:200px;">
库存 库存
</th> </th>
<th style="width:150px;"> <th style="width:200px;">
售价 售价
</th> </th>
<th> <th style="width:200px;">
分享赚 分享赚
</th> </th>
<th> <th style="width:200px;">
购买省 购买省
</th> </th>
<th style="width:200px;"> <th style="width:150px;">
操作 操作
</th> </th>
</tr> </tr>
...@@ -118,11 +79,12 @@ ...@@ -118,11 +79,12 @@
<td> <td>
<template <template
v-if="item.erpgoodobj&&item.erpgoodobj.goods&&item.erpgoodobj.goods.cats&&item.erpgoodobj.goods.cats.length>0"> v-if="item.erpgoodobj&&item.erpgoodobj.goods&&item.erpgoodobj.goods.cats&&item.erpgoodobj.goods.cats.length>0">
<span v-for="(subItem,subIndex) in item.erpgoodobj.goods.cats" :key="subIndex">{{subItem.CategoryName}} <div v-for="(subItem,subIndex) in item.erpgoodobj.goods.cats" :key="subIndex" style="margin:2px 0;">
</span> <el-tag size="small">{{subItem.CategoryName}}</el-tag>
</div>
</template> </template>
</td> </td>
<td> <td style="text-align:left;padding:0 10px;">
{{item.name}} {{item.name}}
</td> </td>
<td> <td>
...@@ -142,52 +104,29 @@ ...@@ -142,52 +104,29 @@
</template> </template>
</td> </td>
<td> <td>
<el-popover placement="left" width="450" trigger="click"> <el-popover placement="left" width="450" popper-class="goodLisPopver" trigger="click">
<table> <div style="margin-bottom:20px;">
<thead> {{item.name}}
<tr> </div>
<td colspan="2"> <el-form label-width="80px" size="small">
{{item.name}} <template v-for="(subItem,subIndex) in item.attr_groups">
</td> <el-form-item :key="subIndex" :label="subItem.attr_group_name" style="line-height:25px;">
</tr> <span class="gd_Item" v-for="(childItem,childIndex) in subItem.attr_list" :key="childIndex"
</thead>
<tbody v-for="(subItem,subIndex) in item.attr_groups" :key="subIndex">
<tr>
<td colspan="2">
{{subItem.attr_group_name}}
</td>
</tr>
<tr>
<td colspan="2">
<span
style="cursor:pointer;border:1px solid #dcdfe6;margin-left:5px;padding:4px;border-radius:5px"
v-for="(childItem,childIndex) in subItem.attr_list" :key="childIndex"
@click="chooseSpec(subIndex,childIndex),calcTotalPrice()" @click="chooseSpec(subIndex,childIndex),calcTotalPrice()"
:class="{'checkSpec':subItem.checkId==childIndex}"> :class="{'checkSpec':subItem.checkId==childIndex}">
{{childItem.attr_name}}_ {{childItem.attr_name}}_
{{subItem.checkId}}_ {{subItem.checkId}}_
{{childIndex}} {{childIndex}}
</span> </span>
</td> </el-form-item>
</tr> </template>
</tbody> <el-form-item label="购买数量" size="small">
<tbody> <el-input-number @change="calcTotalPrice()" size="small" style="height:32px;" v-model="orderMsg.Number" :min="1" :max="10"
<tr> label="请输入购买数量"></el-input-number>
<td> </el-form-item>
购买数量: <el-form-item label="选择用户" size="small">
</td> <el-select size="small" v-model="orderMsg.mallUserId" filterable remote reserve-keyword
<td> placeholder="请输入微信昵称" :remote-method="getWechatData" @change="weChatChange">
<el-input-number @change="calcTotalPrice()" v-model="orderMsg.Number" :min="1" :max="10"
label="请输入购买数量"></el-input-number>
</td>
</tr>
<tr>
<td>
选择用户:
</td>
<td>
<el-select v-model="orderMsg.mallUserId" filterable remote reserve-keyword placeholder="请输入微信昵称"
:remote-method="getWechatData" @change="weChatChange">
<el-option v-for="wItem in weChatData" :key="wItem.Id" :label="wItem.Name" :value="wItem.Id"> <el-option v-for="wItem in weChatData" :key="wItem.Id" :label="wItem.Name" :value="wItem.Id">
<span style="float: left">{{ wItem.Name }} <span style="float: left">{{ wItem.Name }}
<template v-if="wItem.ShopId>0"> <template v-if="wItem.ShopId>0">
...@@ -196,46 +135,27 @@ ...@@ -196,46 +135,27 @@
</span> </span>
</el-option> </el-option>
</el-select> </el-select>
</td> </el-form-item>
</tr> <el-form-item label="收货地址" size="small">
<tr> <el-select size="small" v-model="orderMsg.AddressId" placeholder="请选择" @change="ChangeAddress">
<td>
收货地址:
</td>
<td>
<el-select v-model="orderMsg.AddressId" placeholder="请选择" @change="ChangeAddress">
<el-option v-for="aItem in addressList" :key="aItem.Id" :label="aItem.Name" :value="aItem.Id"> <el-option v-for="aItem in addressList" :key="aItem.Id" :label="aItem.Name" :value="aItem.Id">
<span style="float: left">{{ aItem.Name }}【{{aItem.DistrictAddress}}{{aItem.Address}}】</span> <span style="float: left">{{ aItem.Name }}【{{aItem.DistrictAddress}}{{aItem.Address}}】</span>
</el-option> </el-option>
</el-select> </el-select>
</td> </el-form-item>
</tr> <el-form-item label="运费" size="small">
</tbody> {{orderMsg.FreightMoney}}
<tfoot> </el-form-item>
<tr> <el-form-item label="价格" size="small">
<td> ¥{{orderMsg.TotalPrice}}元
运费: </el-form-item>
</td> </el-form>
<td>
{{orderMsg.FreightMoney}}
</td>
</tr>
<tr>
<td>
价格:
</td>
<td>
¥ {{orderMsg.TotalPrice}} 元
</td>
</tr>
</tfoot>
</table>
<p class="alcenter mt10"> <p class="alcenter mt10">
<input type="button" :value="$t('pub.saveBtn')" @click="SaveOrder()" class="normalBtn" /> <input type="button" :value="$t('pub.saveBtn')" @click="SaveOrder()" class="normalBtn" />
</p> </p>
<el-button type="primary" icon="iconfont icon-beizhu" slot="reference" <el-button type="primary" size="small" icon="iconfont icon-beizhu" slot="reference"
style="background:#AD9AF6; border-color:#AD9AF6; border-radius: 0;" style="background:#AD9AF6; border-color:#AD9AF6; border-radius: 0;padding:4px;"
@click="clreaMsg(),currentGoodsObj={},currentGoodsObj=item">下单 @click="clreaMsg(),currentGoodsObj={},currentGoodsObj=item,calcTotalPrice()"> 下单
</el-button> </el-button>
</el-popover> </el-popover>
</td> </td>
...@@ -426,13 +346,12 @@ ...@@ -426,13 +346,12 @@
tempArray.forEach(item => { tempArray.forEach(item => {
if (item.attr_groups && item.attr_groups.length > 0) { if (item.attr_groups && item.attr_groups.length > 0) {
item.attr_groups.forEach(specItem => { item.attr_groups.forEach(specItem => {
specItem.checkId = -1; //选择的规格索引 specItem.checkId = 0; //选择的规格索引
specItem.checkName = ""; //选择的规格名称 specItem.checkName = ""; //选择的规格名称
}) })
} }
}) })
} }
console.log("tempArray", JSON.parse(JSON.stringify(tempArray)))
this.DataList = tempArray; this.DataList = tempArray;
this.msg.total = res.data.data.count; this.msg.total = res.data.data.count;
} }
......
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