|
|
@@ -7,17 +7,20 @@
|
|
|
}
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
+
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<title>商品规格(修改)</title>
|
|
|
<meta name="renderer" content="webkit">
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
+ <meta name="viewport"
|
|
|
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
<link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
|
|
|
<script src="/admin/js/jquery-1.10.1.min.js"></script>
|
|
|
<script src="/admin/js/LAreaData2.js"></script>
|
|
|
<script src="/admin/js/vue.min.js"></script>
|
|
|
</head>
|
|
|
+
|
|
|
<body>
|
|
|
|
|
|
<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
|
|
|
@@ -26,138 +29,170 @@
|
|
|
<input type="hidden" id="ItemList" name="ItemList" value="" />
|
|
|
<input type="hidden" id="DetailList" name="DetailList" value="" />
|
|
|
<div class="layui-card">
|
|
|
- <div class="layui-card-body">
|
|
|
- <div class="layui-tab" lay-filter="mytabbar">
|
|
|
- <ul class="layui-tab-title">
|
|
|
- <li class="layui-this" lay-id="1">规格项</li>
|
|
|
- <li lay-id="2">规格明细</li>
|
|
|
- </ul>
|
|
|
- <div class="layui-tab-content mt20" id="app">
|
|
|
- <div class="layui-tab-item layui-show">
|
|
|
- <div class="layui-form-item">
|
|
|
- <label class="layui-form-label">模板</label>
|
|
|
- <div class="layui-input-inline">
|
|
|
- <select id="TempId" name="TempId" lay-filter="tempid" lay-search="">
|
|
|
- <option value="">请选择</option>
|
|
|
- <option v-for="item in tempList" :value="item.id">{{item.name}}</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="layui-form-mid layui-word-aux">
|
|
|
- <a href="###" v-on:click="showTemplate">刷新</a>
|
|
|
- </div>
|
|
|
- <div class="layui-form-mid layui-word-aux">
|
|
|
- <a href="###" lay-href="/Admin/ProductNormTemp/Index?MerchantId=@MerchantId&right=@right">模板管理</a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-form-item">
|
|
|
- <label class="layui-form-label">商品规格</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <div>
|
|
|
- <table width="100%" v-for="item,i in itemList">
|
|
|
- <thead>
|
|
|
- <tr style="height:30px; line-height:30px; background-color:#eee;">
|
|
|
- <th style="padding:10px;width:60px;">规格名:</th>
|
|
|
- <th style="padding:10px;">
|
|
|
- <input class="layui-input" style="width:150px;" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入规格名" v-model="item.name">
|
|
|
- </th>
|
|
|
- <th style="padding:10px;width:150px;">
|
|
|
- <input type="button" value="上移" v-on:click="toup(i)" />
|
|
|
- <input type="button" value="下移" v-on:click="todown(i)" />
|
|
|
- <input type="button" value="删除" v-on:click="del(i)" />
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
+ <div class="layui-card-body">
|
|
|
+ <div class="layui-tab" lay-filter="mytabbar">
|
|
|
+ <ul class="layui-tab-title">
|
|
|
+ <li class="layui-this" lay-id="1">规格项</li>
|
|
|
+ <li lay-id="2">规格明细</li>
|
|
|
+ </ul>
|
|
|
+ <div class="layui-tab-content mt20" id="app">
|
|
|
+ <div class="layui-tab-item layui-show">
|
|
|
+ <div class="layui-form-item">
|
|
|
+ <label class="layui-form-label">模板</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <select id="TempId" name="TempId" lay-filter="tempid" lay-search="">
|
|
|
+ <option value="">请选择</option>
|
|
|
+ <option v-for="item in tempList" :value="item.id">{{item.name}}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="layui-form-mid layui-word-aux">
|
|
|
+ <a href="###" v-on:click="showTemplate">刷新</a>
|
|
|
+ </div>
|
|
|
+ <div class="layui-form-mid layui-word-aux">
|
|
|
+ <a href="###"
|
|
|
+ lay-href="/Admin/ProductNormTemp/Index?MerchantId=@MerchantId&right=@right">模板管理</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-form-item">
|
|
|
+ <label class="layui-form-label">商品规格</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <div>
|
|
|
+ <table width="100%" v-for="item,i in itemList">
|
|
|
+ <thead>
|
|
|
+ <tr style="height:30px; line-height:30px; background-color:#eee;">
|
|
|
+ <th style="padding:10px;width:60px;">规格名:</th>
|
|
|
+ <th style="padding:10px;">
|
|
|
+ <input class="layui-input" style="width:150px;" type="text"
|
|
|
+ maxlength="20" lay-verify="" autocomplete="off"
|
|
|
+ placeholder="请输入规格名" v-model="item.name">
|
|
|
+ </th>
|
|
|
+ <th style="padding:10px;width:150px;">
|
|
|
+ <input type="button" value="上移" v-on:click="toup(i)" />
|
|
|
+ <input type="button" value="下移" v-on:click="todown(i)" />
|
|
|
+ <input type="button" value="删除" v-on:click="del(i)" />
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr style="height:30px; line-height:30px;">
|
|
|
+ <td style="padding:10px;width:60px;">规格值:</td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <div style="float:left;width:150px;margin-right:5px;"
|
|
|
+ v-for="subitem,j in item.vallist">
|
|
|
+ <input class="layui-input" type="text" maxlength="20"
|
|
|
+ lay-verify="" autocomplete="off" placeholder="请输入规格值"
|
|
|
+ v-model="subitem.name" v-on:keyup="showDetail">
|
|
|
+ <input type="button" value="左移"
|
|
|
+ v-on:click="toleftsub(item,j)" />
|
|
|
+ <input type="button" value="右移"
|
|
|
+ v-on:click="torightsub(item,j)" />
|
|
|
+ <input type="button" value="删除"
|
|
|
+ v-on:click="delsub(item,j)" />
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input type="button" class="layui-btn" value="增加"
|
|
|
+ v-on:click="addsub(item)" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <table width="100%">
|
|
|
<tr style="height:30px; line-height:30px;">
|
|
|
- <td style="padding:10px;width:60px;">规格值:</td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <div style="float:left;width:150px;margin-right:5px;" v-for="subitem,j in item.vallist">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入规格值" v-model="subitem.name" v-on:keyup="showDetail">
|
|
|
- <input type="button" value="左移" v-on:click="toleftsub(item,j)" />
|
|
|
- <input type="button" value="右移" v-on:click="torightsub(item,j)" />
|
|
|
- <input type="button" value="删除" v-on:click="delsub(item,j)" />
|
|
|
- </div>
|
|
|
- </td>
|
|
|
<td style="padding:10px;">
|
|
|
- <input type="button" class="layui-btn" value="增加" v-on:click="addsub(item)" />
|
|
|
+ <input type="button" class="layui-btn" value="添加项" v-on:click="add" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <table width="100%">
|
|
|
- <tr style="height:30px; line-height:30px;">
|
|
|
- <td style="padding:10px;">
|
|
|
- <input type="button" class="layui-btn" value="添加项" v-on:click="add" />
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-tab-item">
|
|
|
- <div class="layui-form-item">
|
|
|
- <label class="layui-form-label">规格明细</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <table width="100%">
|
|
|
- <thead>
|
|
|
- <tr style="height:30px; line-height:30px; background-color:#eee;">
|
|
|
- <th style="padding:10px;" v-for="item in itemList">{{item.name}}</th>
|
|
|
- <th style="padding:10px;">价格</th>
|
|
|
- <th style="padding:10px;">积分抵扣</th>
|
|
|
- <th style="padding:10px;">创客价格</th>
|
|
|
- <th style="padding:10px;">创客积分抵扣</th>
|
|
|
- <th style="padding:10px;">库存</th>
|
|
|
- <th style="padding:10px;">规格编码</th>
|
|
|
- <th style="padding:10px;">成本价</th>
|
|
|
- <th style="padding:10px;">限购数量</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <tr style="height:30px; line-height:30px;" v-for="item in detailList">
|
|
|
- <td style="padding:10px;width:80px;" v-for="subitem in item.title">{{subitem.name}}</td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入价格" v-model="item.price">
|
|
|
- </td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入积分抵扣" v-model="item.integral">
|
|
|
- </td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入创客价格" v-model="item.userprice">
|
|
|
- </td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入创客积分抵扣" v-model="item.userintegral">
|
|
|
- </td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入库存" v-model="item.stock">
|
|
|
- </td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入规格编码" v-model="item.code">
|
|
|
- </td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入成本价" v-model="item.costprice">
|
|
|
- </td>
|
|
|
- <td style="padding:10px;">
|
|
|
- <input class="layui-input" type="text" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入限购数量" v-model="item.limitcount">
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <div class="layui-tab-item">
|
|
|
+ <div class="layui-form-item">
|
|
|
+ <label class="layui-form-label">规格明细</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <table width="100%">
|
|
|
+ <thead>
|
|
|
+ <tr style="height:30px; line-height:30px; background-color:#eee;">
|
|
|
+ <th style="padding:10px;" v-for="item in itemList">{{item.name}}</th>
|
|
|
+ <th style="padding:10px;">价格</th>
|
|
|
+ <th style="padding:10px;">积分抵扣</th>
|
|
|
+ <th style="padding:10px;">创客价格</th>
|
|
|
+ <th style="padding:10px;">创客积分抵扣</th>
|
|
|
+ <th style="padding:10px;">库存</th>
|
|
|
+ <th style="padding:10px;">规格编码</th>
|
|
|
+ <th style="padding:10px;">成本价</th>
|
|
|
+ <th style="padding:10px;">起购数量</th>
|
|
|
+ <th style="padding:10px;">限购数量</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr style="height:30px; line-height:30px;" v-for="item in detailList">
|
|
|
+ <td style="padding:10px;width:80px;" v-for="subitem in item.title">
|
|
|
+ {{subitem.name}}</td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入价格" v-model="item.price">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入积分抵扣"
|
|
|
+ v-model="item.integral">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入创客价格"
|
|
|
+ v-model="item.userprice">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入创客积分抵扣"
|
|
|
+ v-model="item.userintegral">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入库存" v-model="item.stock">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入规格编码" v-model="item.code">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入成本价"
|
|
|
+ v-model="item.costprice">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入起购数量"
|
|
|
+ v-model="item.startbuycount">
|
|
|
+ </td>
|
|
|
+ <td style="padding:10px;">
|
|
|
+ <input class="layui-input" type="text" maxlength="20" lay-verify=""
|
|
|
+ autocomplete="off" placeholder="请输入限购数量"
|
|
|
+ v-model="item.limitcount">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="layui-form-item layui-hide">
|
|
|
+ <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit"
|
|
|
+ value="确认">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="layui-form-item layui-hide">
|
|
|
- <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit" value="确认">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
|
|
|
<script src="/layuiadmin/layui/layui.js"></script>
|
|
|
- <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
|
|
|
+ <script
|
|
|
+ src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
|
|
|
<script src="/other/mybjq/kindeditor-min.js"></script>
|
|
|
<script src="/other/mybjq/lang/zh_CN.js"></script>
|
|
|
<script>//编辑器
|
|
|
@@ -473,6 +508,7 @@
|
|
|
stock: 0,
|
|
|
code: '',
|
|
|
costprice: 0,
|
|
|
+ startbuycount: 0,
|
|
|
limitcount: 0,
|
|
|
});
|
|
|
}
|
|
|
@@ -488,6 +524,7 @@
|
|
|
stock: 0,
|
|
|
code: '',
|
|
|
costprice: 0,
|
|
|
+ startbuycount: 0,
|
|
|
limitcount: 0,
|
|
|
});
|
|
|
}
|
|
|
@@ -504,6 +541,7 @@
|
|
|
stock: 0,
|
|
|
code: '',
|
|
|
costprice: 0,
|
|
|
+ startbuycount: 0,
|
|
|
limitcount: 0,
|
|
|
});
|
|
|
}
|
|
|
@@ -520,6 +558,7 @@
|
|
|
stock: 0,
|
|
|
code: '',
|
|
|
costprice: 0,
|
|
|
+ startbuycount: 0,
|
|
|
limitcount: 0,
|
|
|
});
|
|
|
}
|
|
|
@@ -536,6 +575,7 @@
|
|
|
stock: 0,
|
|
|
code: '',
|
|
|
costprice: 0,
|
|
|
+ startbuycount: 0,
|
|
|
limitcount: 0,
|
|
|
});
|
|
|
}
|
|
|
@@ -580,14 +620,14 @@
|
|
|
if (array5.length > 0) {
|
|
|
for (var m = 0; m < array5.length; m++) {
|
|
|
for (var num = 0; num < this.detailList.length; num++) {
|
|
|
- if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i],array2[j],array3[k],array4[l],array5[m]]) && !this.isTitle(JSON.stringify([array1[i],array2[j],array3[k],array4[l],array5[m]]))) {
|
|
|
+ if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i], array2[j], array3[k], array4[l], array5[m]]) && !this.isTitle(JSON.stringify([array1[i], array2[j], array3[k], array4[l], array5[m]]))) {
|
|
|
arr.push(this.detailList[num]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
for (var num = 0; num < this.detailList.length; num++) {
|
|
|
- if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i],array2[j],array3[k],array4[l]]) && !this.isTitle(JSON.stringify([array1[i],array2[j],array3[k],array4[l]]))) {
|
|
|
+ if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i], array2[j], array3[k], array4[l]]) && !this.isTitle(JSON.stringify([array1[i], array2[j], array3[k], array4[l]]))) {
|
|
|
arr.push(this.detailList[num]);
|
|
|
}
|
|
|
}
|
|
|
@@ -595,7 +635,7 @@
|
|
|
}
|
|
|
} else {
|
|
|
for (var num = 0; num < this.detailList.length; num++) {
|
|
|
- if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i],array2[j],array3[k]]) && !this.isTitle(JSON.stringify([array1[i],array2[j],array3[k]]))) {
|
|
|
+ if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i], array2[j], array3[k]]) && !this.isTitle(JSON.stringify([array1[i], array2[j], array3[k]]))) {
|
|
|
arr.push(this.detailList[num]);
|
|
|
}
|
|
|
}
|
|
|
@@ -603,7 +643,7 @@
|
|
|
}
|
|
|
} else {
|
|
|
for (var num = 0; num < this.detailList.length; num++) {
|
|
|
- if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i],array2[j]]) && !this.isTitle(JSON.stringify([array1[i],array2[j]]))) {
|
|
|
+ if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i], array2[j]]) && !this.isTitle(JSON.stringify([array1[i], array2[j]]))) {
|
|
|
arr.push(this.detailList[num]);
|
|
|
}
|
|
|
}
|
|
|
@@ -631,4 +671,5 @@
|
|
|
});
|
|
|
</script>
|
|
|
</body>
|
|
|
+
|
|
|
</html>
|