Edit.cshtml 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. @using MySystem.Models;
  2. @{
  3. string RightInfo = ViewBag.RightInfo as string;
  4. string right = ViewBag.right as string;
  5. string Id = ViewBag.Id as string;
  6. string MerchantId = ViewBag.MerchantId as string;
  7. }
  8. <!DOCTYPE html>
  9. <html>
  10. <head>
  11. <meta charset="utf-8">
  12. <title>商品规格(修改)</title>
  13. <meta name="renderer" content="webkit">
  14. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  15. <meta name="viewport"
  16. content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  17. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  18. <script src="/admin/js/jquery-1.10.1.min.js"></script>
  19. <script src="/admin/js/LAreaData2.js"></script>
  20. <script src="/admin/js/vue.min.js"></script>
  21. </head>
  22. <body>
  23. <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
  24. <input type="hidden" name="Id" value="@Id" />
  25. <input type="hidden" name="MerchantId" value="@MerchantId" />
  26. <input type="hidden" id="ItemList" name="ItemList" value="" />
  27. <input type="hidden" id="DetailList" name="DetailList" value="" />
  28. <div class="layui-card">
  29. <div class="layui-card-body">
  30. <div class="layui-tab" lay-filter="mytabbar">
  31. <ul class="layui-tab-title">
  32. <li class="layui-this" lay-id="1">规格项</li>
  33. <li lay-id="2">规格明细</li>
  34. </ul>
  35. <div class="layui-tab-content mt20" id="app">
  36. <div class="layui-tab-item layui-show">
  37. <div class="layui-form-item">
  38. <label class="layui-form-label">模板</label>
  39. <div class="layui-input-inline">
  40. <select id="TempId" name="TempId" lay-filter="tempid" lay-search="">
  41. <option value="">请选择</option>
  42. <option v-for="item in tempList" :value="item.id">{{item.name}}</option>
  43. </select>
  44. </div>
  45. <div class="layui-form-mid layui-word-aux">
  46. <a href="###" v-on:click="showTemplate">刷新</a>
  47. </div>
  48. <div class="layui-form-mid layui-word-aux">
  49. <a href="###"
  50. lay-href="/Admin/ProductNormTemp/Index?MerchantId=@MerchantId&right=@right">模板管理</a>
  51. </div>
  52. </div>
  53. <div class="layui-form-item">
  54. <label class="layui-form-label">商品规格</label>
  55. <div class="layui-input-block">
  56. <div>
  57. <table width="100%" v-for="item,i in itemList">
  58. <thead>
  59. <tr style="height:30px; line-height:30px; background-color:#eee;">
  60. <th style="padding:10px;width:60px;">规格名:</th>
  61. <th style="padding:10px;">
  62. <input class="layui-input" style="width:150px;" type="text"
  63. maxlength="20" lay-verify="" autocomplete="off"
  64. placeholder="请输入规格名" v-model="item.name">
  65. </th>
  66. <th style="padding:10px;width:150px;">
  67. <input type="button" value="上移" v-on:click="toup(i)" />
  68. <input type="button" value="下移" v-on:click="todown(i)" />
  69. <input type="button" value="删除" v-on:click="del(i)" />
  70. </th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <tr style="height:30px; line-height:30px;">
  75. <td style="padding:10px;width:60px;">规格值:</td>
  76. <td style="padding:10px;">
  77. <div style="float:left;width:150px;margin-right:5px;"
  78. v-for="subitem,j in item.vallist">
  79. <input class="layui-input" type="text" maxlength="20"
  80. lay-verify="" autocomplete="off" placeholder="请输入规格值"
  81. v-model="subitem.name" v-on:keyup="showDetail">
  82. <input type="button" value="左移"
  83. v-on:click="toleftsub(item,j)" />
  84. <input type="button" value="右移"
  85. v-on:click="torightsub(item,j)" />
  86. <input type="button" value="删除"
  87. v-on:click="delsub(item,j)" />
  88. </div>
  89. </td>
  90. <td style="padding:10px;">
  91. <input type="button" class="layui-btn" value="增加"
  92. v-on:click="addsub(item)" />
  93. </td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. </div>
  98. <table width="100%">
  99. <tr style="height:30px; line-height:30px;">
  100. <td style="padding:10px;">
  101. <input type="button" class="layui-btn" value="添加项" v-on:click="add" />
  102. </td>
  103. </tr>
  104. </table>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="layui-tab-item">
  109. <div class="layui-form-item">
  110. <label class="layui-form-label">规格明细</label>
  111. <div class="layui-input-block">
  112. <table width="100%">
  113. <thead>
  114. <tr style="height:30px; line-height:30px; background-color:#eee;">
  115. <th style="padding:10px;" v-for="item in itemList">{{item.name}}</th>
  116. <th style="padding:10px;">价格</th>
  117. @* <th style="padding:10px;">积分抵扣</th>
  118. <th style="padding:10px;">创客价格</th>
  119. <th style="padding:10px;">创客积分抵扣</th> *@
  120. <th style="padding:10px;">库存</th>
  121. @* <th style="padding:10px;">规格编码</th>
  122. <th style="padding:10px;">成本价</th> *@
  123. <th style="padding:10px;">起购数量</th>
  124. <th style="padding:10px;">限购数量</th>
  125. </tr>
  126. </thead>
  127. <tbody>
  128. <tr style="height:30px; line-height:30px;" v-for="item in detailList">
  129. <td style="padding:10px;width:80px;" v-for="subitem in item.title">
  130. {{subitem.name}}</td>
  131. <td style="padding:10px;">
  132. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  133. autocomplete="off" placeholder="请输入价格" v-model="item.price">
  134. </td>
  135. @* <td style="padding:10px;">
  136. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  137. autocomplete="off" placeholder="请输入积分抵扣"
  138. v-model="item.integral">
  139. </td>
  140. <td style="padding:10px;">
  141. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  142. autocomplete="off" placeholder="请输入创客价格"
  143. v-model="item.userprice">
  144. </td>
  145. <td style="padding:10px;">
  146. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  147. autocomplete="off" placeholder="请输入创客积分抵扣"
  148. v-model="item.userintegral">
  149. </td> *@
  150. <td style="padding:10px;">
  151. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  152. autocomplete="off" placeholder="请输入库存" v-model="item.stock">
  153. </td>
  154. @* <td style="padding:10px;">
  155. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  156. autocomplete="off" placeholder="请输入规格编码" v-model="item.code">
  157. </td>
  158. <td style="padding:10px;">
  159. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  160. autocomplete="off" placeholder="请输入成本价"
  161. v-model="item.costprice">
  162. </td> *@
  163. <td style="padding:10px;">
  164. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  165. autocomplete="off" placeholder="请输入起购数量"
  166. v-model="item.startbuycount">
  167. </td>
  168. <td style="padding:10px;">
  169. <input class="layui-input" type="text" maxlength="20" lay-verify=""
  170. autocomplete="off" placeholder="请输入限购数量"
  171. v-model="item.limitcount">
  172. </td>
  173. </tr>
  174. </tbody>
  175. </table>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="layui-form-item layui-hide">
  182. <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit"
  183. value="确认">
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. <script src="/layuiadmin/layui/layui.js"></script>
  189. <script
  190. src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
  191. <script src="/other/mybjq/kindeditor-min.js"></script>
  192. <script src="/other/mybjq/lang/zh_CN.js"></script>
  193. <script>//编辑器
  194. KindEditor.ready(function (K) {
  195. });
  196. var ids = "";
  197. function getChildren(obj) {
  198. $.each(obj, function (index, value) {
  199. var id = obj[index].id;
  200. ids += id + ",";
  201. var children = obj[index].children;
  202. if (children) {
  203. getChildren(children);
  204. }
  205. });
  206. }
  207. function AreasProvinceInit(tagId, areasVal, form, func) {
  208. for (var i = 0; i < provs_data.length; i++) {
  209. var sel = "";
  210. if (areasVal.indexOf(provs_data[i].text) > -1) {
  211. sel = " selected=selected";
  212. }
  213. $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' + provs_data[i].text + '</option>');
  214. }
  215. form.render();
  216. func();
  217. }
  218. function AreasProvinceSelected(tagId, areasVal, form, value, func) {
  219. $("#" + tagId + "City").html('<option value="">市</option>');
  220. var list = citys_data[value];
  221. for (var i = 0; i < list.length; i++) {
  222. var sel = "";
  223. if (areasVal.indexOf(list[i].text) > -1) {
  224. sel = " selected=selected";
  225. }
  226. $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
  227. }
  228. $("#" + tagId + "Area").html('<option value="">县/区</option>');
  229. form.render();
  230. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  231. func();
  232. }
  233. function AreasCitySelected(tagId, areasVal, form, value, func) {
  234. $("#" + tagId + "Area").html('<option value="">县/区</option>');
  235. var list = dists_data[value];
  236. for (var i = 0; i < list.length; i++) {
  237. var sel = "";
  238. if (areasVal.indexOf(list[i].text) > -1) {
  239. sel = " selected=selected";
  240. }
  241. $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
  242. }
  243. form.render();
  244. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  245. func();
  246. }
  247. function AreasAreaSelected(tagId, form) {
  248. form.render();
  249. $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
  250. }
  251. function movePrev(obj, tagId) {
  252. $(obj).parent().prev().insertAfter($(obj).parent());
  253. checkPics(tagId);
  254. }
  255. function moveNext(obj, tagId) {
  256. $(obj).parent().next().insertBefore($(obj).parent());
  257. checkPics(tagId);
  258. }
  259. function deletePic(obj, tagId) {
  260. $(obj).parent().remove();
  261. checkPics(tagId);
  262. }
  263. function checkPics(tagId) {
  264. var pics = "";
  265. var texts = "";
  266. $("#" + tagId + "Image div img").each(function (i) {
  267. pics += $(this).attr("src").replace(osshost, '') + "|";
  268. });
  269. $("#" + tagId + "Image div input").each(function (i) {
  270. texts += $(this).val() + "|";
  271. });
  272. if (pics == "") {
  273. $("#" + tagId).val("");
  274. } else {
  275. pics = pics.substring(0, pics.length - 1);
  276. texts = texts.substring(0, pics.length - 1);
  277. $("#" + tagId).val(pics + "#cut#" + texts);
  278. }
  279. }
  280. function checkBox(tagId) {
  281. var text = "";
  282. $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
  283. text += $(this).val() + ",";
  284. });
  285. $("#" + tagId).val(text);
  286. }
  287. function showBigPic(picpath) {
  288. parent.layer.open({
  289. type: 1,
  290. title: false,
  291. closeBtn: 0,
  292. shadeClose: true,
  293. area: ['auto', 'auto'],
  294. content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
  295. });
  296. }
  297. var tree;
  298. var form;
  299. function init_layui() {
  300. layui.config({
  301. base: '/layuiadmin/' //静态资源所在路径
  302. }).extend({
  303. index: 'lib/index' //主入口模块
  304. }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
  305. var $ = layui.$
  306. , element = layui.element
  307. , layer = layui.layer
  308. , layedit = layui.layedit
  309. , laydate = layui.laydate
  310. , croppers = layui.croppers
  311. , upload = layui.upload
  312. , transfer = layui.transfer
  313. , util = layui.util;
  314. tree = layui.tree;
  315. form = layui.form;
  316. form.on('select(tempid)', function (data) {
  317. app.showTemplateDetail(data.value);
  318. });
  319. //Hash地址的定位
  320. var layid = location.hash.replace(/^#test=/, '');
  321. element.tabChange('test', layid);
  322. element.on('tab(test)', function (elem) {
  323. location.hash = 'test=' + $(this).attr('lay-id');
  324. });
  325. //日期
  326. //上传文件
  327. //穿梭框
  328. //TreeView,比如权限管理
  329. //省市区
  330. });
  331. }
  332. //加载vue
  333. var app = new Vue({
  334. el: '#app',
  335. data() {
  336. return {
  337. itemList: @Html.Raw(ViewBag.ItemList),
  338. detailList: @Html.Raw(ViewBag.DetailList),
  339. tempList: [],
  340. TempId: 0,
  341. };
  342. },
  343. mounted() {
  344. this.showTemplate();
  345. init_layui();
  346. },
  347. methods: {
  348. showTemplate() {
  349. let that = this;
  350. $.ajax({
  351. url: "/Admin/ProductNorm/GetTemplate?r=" + Math.random(1),
  352. data: "MerchantId=@MerchantId",
  353. dataType: "json",
  354. success: function (data) {
  355. that.tempList = data;
  356. setTimeout(function () {
  357. form.render();
  358. }, 1000);
  359. }
  360. });
  361. },
  362. showTemplateDetail(id) {
  363. let that = this;
  364. $.ajax({
  365. url: "/Admin/ProductNorm/GetTemplateDetail?r=" + Math.random(1),
  366. data: "Id=" + id,
  367. dataType: "json",
  368. success: function (data) {
  369. that.itemList = JSON.parse(data.tempJsonData);
  370. that.showDetail();
  371. }
  372. });
  373. },
  374. add() {
  375. this.itemList.push({
  376. id: '0',
  377. name: '',
  378. vallist: [
  379. {
  380. id: '0',
  381. name: '',
  382. }
  383. ],
  384. });
  385. this.showDetail();
  386. },
  387. toup(index) {
  388. if (index > 0) {
  389. var sub = this.itemList[index - 1];
  390. this.itemList[index - 1] = this.itemList[index];
  391. this.itemList[index] = sub;
  392. this.showDetail();
  393. }
  394. },
  395. todown(index) {
  396. if (index < this.itemList.length - 1) {
  397. var sub = this.itemList[index + 1];
  398. this.itemList[index + 1] = this.itemList[index];
  399. this.itemList[index] = sub;
  400. this.showDetail();
  401. }
  402. },
  403. del(index) {
  404. if (this.itemList.length > 1) {
  405. this.itemList.splice(index, 1);
  406. this.showDetail();
  407. }
  408. },
  409. addsub(item) {
  410. item.vallist.push({
  411. id: '0',
  412. name: '',
  413. });
  414. this.showDetail();
  415. },
  416. toleftsub(item, index) {
  417. if (index > 0) {
  418. var sub = item.vallist[index - 1];
  419. item.vallist[index - 1] = item.vallist[index];
  420. item.vallist[index] = sub;
  421. this.showDetail();
  422. }
  423. },
  424. torightsub(item, index) {
  425. if (index < item.vallist.length - 1) {
  426. var sub = item.vallist[index + 1];
  427. item.vallist[index + 1] = item.vallist[index];
  428. item.vallist[index] = sub;
  429. this.showDetail();
  430. }
  431. },
  432. delsub(item, index) {
  433. if (item.vallist.length > 1) {
  434. item.vallist.splice(index, 1);
  435. this.showDetail();
  436. }
  437. },
  438. showDetail() {
  439. var array1 = [];
  440. var array2 = [];
  441. var array3 = [];
  442. var array4 = [];
  443. var array5 = [];
  444. for (var i = 0; i < this.itemList.length; i++) {
  445. var num = i + 1;
  446. for (var j = 0; j < this.itemList[i].vallist.length; j++) {
  447. var sub = {
  448. id: this.itemList[i].vallist[j].id,
  449. name: this.itemList[i].vallist[j].name,
  450. };
  451. if (num == 1) {
  452. array1.push(sub);
  453. } else if (num == 2) {
  454. array2.push(sub);
  455. } else if (num == 3) {
  456. array3.push(sub);
  457. } else if (num == 4) {
  458. array4.push(sub);
  459. } else if (num == 5) {
  460. array5.push(sub);
  461. }
  462. }
  463. }
  464. this.checkTitle();
  465. //this.detailList = [];
  466. for (var i = 0; i < array1.length; i++) {
  467. if (array2.length > 0) {
  468. for (var j = 0; j < array2.length; j++) {
  469. if (array3.length > 0) {
  470. for (var k = 0; k < array3.length; k++) {
  471. if (array4.length > 0) {
  472. for (var l = 0; l < array4.length; l++) {
  473. if (array5.length > 0) {
  474. for (var m = 0; m < array5.length; m++) {
  475. if (!this.isTitle(JSON.stringify([array1[i], array2[j], array3[k], array4[l], array5[m]]))) {
  476. this.detailList.push({
  477. title: [array1[i], array2[j], array3[k], array4[l], array5[m]],
  478. price: 0,
  479. integral: 0,
  480. userprice: 0,
  481. userintegral: 0,
  482. stock: 0,
  483. code: '',
  484. costprice: 0,
  485. startbuycount: 0,
  486. limitcount: 0,
  487. });
  488. }
  489. }
  490. } else {
  491. if (!this.isTitle(JSON.stringify([array1[i], array2[j], array3[k], array4[l]]))) {
  492. this.detailList.push({
  493. title: [array1[i], array2[j], array3[k], array4[l]],
  494. price: 0,
  495. integral: 0,
  496. userprice: 0,
  497. userintegral: 0,
  498. stock: 0,
  499. code: '',
  500. costprice: 0,
  501. startbuycount: 0,
  502. limitcount: 0,
  503. });
  504. }
  505. }
  506. }
  507. } else {
  508. if (!this.isTitle(JSON.stringify([array1[i], array2[j], array3[k]]))) {
  509. this.detailList.push({
  510. title: [array1[i], array2[j], array3[k]],
  511. price: 0,
  512. integral: 0,
  513. userprice: 0,
  514. userintegral: 0,
  515. stock: 0,
  516. code: '',
  517. costprice: 0,
  518. startbuycount: 0,
  519. limitcount: 0,
  520. });
  521. }
  522. }
  523. }
  524. } else {
  525. if (!this.isTitle(JSON.stringify([array1[i], array2[j]]))) {
  526. this.detailList.push({
  527. title: [array1[i], array2[j]],
  528. price: 0,
  529. integral: 0,
  530. userprice: 0,
  531. userintegral: 0,
  532. stock: 0,
  533. code: '',
  534. costprice: 0,
  535. startbuycount: 0,
  536. limitcount: 0,
  537. });
  538. }
  539. }
  540. }
  541. } else {
  542. if (!this.isTitle(JSON.stringify([array1[i]]))) {
  543. this.detailList.push({
  544. title: [array1[i]],
  545. price: 0,
  546. integral: 0,
  547. userprice: 0,
  548. userintegral: 0,
  549. stock: 0,
  550. code: '',
  551. costprice: 0,
  552. startbuycount: 0,
  553. limitcount: 0,
  554. });
  555. }
  556. }
  557. }
  558. this.$forceUpdate();
  559. },
  560. checkTitle() {
  561. var array1 = [];
  562. var array2 = [];
  563. var array3 = [];
  564. var array4 = [];
  565. var array5 = [];
  566. for (var i = 0; i < this.itemList.length; i++) {
  567. var num = i + 1;
  568. for (var j = 0; j < this.itemList[i].vallist.length; j++) {
  569. var sub = {
  570. id: this.itemList[i].vallist[j].id,
  571. name: this.itemList[i].vallist[j].name,
  572. };
  573. if (num == 1) {
  574. array1.push(sub);
  575. } else if (num == 2) {
  576. array2.push(sub);
  577. } else if (num == 3) {
  578. array3.push(sub);
  579. } else if (num == 4) {
  580. array4.push(sub);
  581. } else if (num == 5) {
  582. array5.push(sub);
  583. }
  584. }
  585. }
  586. var arr = [];
  587. for (var i = 0; i < array1.length; i++) {
  588. if (array2.length > 0) {
  589. for (var j = 0; j < array2.length; j++) {
  590. if (array3.length > 0) {
  591. for (var k = 0; k < array3.length; k++) {
  592. if (array4.length > 0) {
  593. for (var l = 0; l < array4.length; l++) {
  594. if (array5.length > 0) {
  595. for (var m = 0; m < array5.length; m++) {
  596. for (var num = 0; num < this.detailList.length; num++) {
  597. 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]]))) {
  598. arr.push(this.detailList[num]);
  599. }
  600. }
  601. }
  602. } else {
  603. for (var num = 0; num < this.detailList.length; num++) {
  604. 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]]))) {
  605. arr.push(this.detailList[num]);
  606. }
  607. }
  608. }
  609. }
  610. } else {
  611. for (var num = 0; num < this.detailList.length; num++) {
  612. 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]]))) {
  613. arr.push(this.detailList[num]);
  614. }
  615. }
  616. }
  617. }
  618. } else {
  619. for (var num = 0; num < this.detailList.length; num++) {
  620. if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i], array2[j]]) && !this.isTitle(JSON.stringify([array1[i], array2[j]]))) {
  621. arr.push(this.detailList[num]);
  622. }
  623. }
  624. }
  625. }
  626. } else {
  627. for (var num = 0; num < this.detailList.length; num++) {
  628. if (JSON.stringify(this.detailList[num].title) == JSON.stringify([array1[i]]) && !this.isTitle(JSON.stringify([array1[i]]))) {
  629. arr.push(this.detailList[num]);
  630. }
  631. }
  632. }
  633. }
  634. this.detailList = arr;
  635. },
  636. isTitle(title) {
  637. for (var num = 0; num < this.detailList.length; num++) {
  638. if (JSON.stringify(this.detailList[num].title) == title) {
  639. return true;
  640. }
  641. }
  642. return false;
  643. },
  644. }
  645. });
  646. </script>
  647. </body>
  648. </html>