123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
- <title>关键字检索</title>
- <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
- <style type="text/css">
- #panel {
- position: absolute;
- background-color: white;
- max-height: 90%;
- overflow-y: auto;
- top: 10px;
- right: 10px;
- width: 280px;
- }
- </style>
- <script id="map" type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key={key}"></script>
- <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
- </head>
- <body>
- <div id="container"></div>
- <div id="panel"></div>
- <script type="text/javascript" src="../script/lib/map/gaode.js"></script>
- </body>
- </html>
- </script>
- /*
- $('select').each(function() {
- if ($(this).attr('xm-value')) {
- formSelects.value($(this).attr('xm-select'), $(this).attr('xm-value'));
- }
- });
- */
- /*
- var obj = layui.skuTable.render({
- //规格类型 0统一规格 1多规格
- isAttributeValue: 0,
- //规格类型容器id
- isAttributeElemId: 'sku_spec_type',
- //规格表容器id
- specTableElemId: 'sku_spec_table',
- //sku表容器id
- skuTableElemId: 'sku_table',
- //规格拖拽排序
- sortable: false,
- //sku表相同属性值是否合并行
- rowspan: true,
- //请求成功返回状态码值
- requestSuccessCode: 200,
- //上传接口地址
- //接口要求返回格式参考 upload.json
- uploadUrl: './json/upload.json',
- //统一规格配置项
- singleSkuTableConfig: {
- thead: [
- {title: '商品编码', icon: 'layui-icon-cols'},
- {title: '销售价(元)', icon: 'layui-icon-cols'},
- {title: '采购价(元)', icon: 'layui-icon-cols'},
- {title: '成本价(元)', icon: 'layui-icon-cols'},
- ],
- tbody: [
- {type: 'input', field: 'code', value: '', verify: 'required', reqtext: '商品编码不能为空'},
- {type: 'input', field: 'price', value: '0', verify: 'required|number', reqtext: '销售价不能为空'},
- {type: 'input', field: 'buy_price', value: '0', verify: 'required|number', reqtext: '采购价不能为空'},
- {type: 'input', field: 'cost_price', value: '0', verify: 'required|number', reqtext: '成本价不能为空'},
- ]
- },
- //多规格配置项
- multipleSkuTableConfig: {
- thead: [
- {title: '图片', icon: ''},
- {title: '商品编码', icon: 'layui-icon-cols'},
- {title: '销售价(元)', icon: 'layui-icon-cols'},
- {title: '采购价(元)', icon: 'layui-icon-cols'},
- {title: '成本价(元)', icon: 'layui-icon-cols'},
- ],
- tbody: [
- {type: 'image', field: 'pic', value: '', verify: '', reqtext: ''},
- {type: 'input', field: 'code', value: '', verify: 'required', reqtext: '商品编码不能为空'},
- {type: 'input', field: 'price', value: '0', verify: 'required|number', reqtext: '销售价不能为空'},
- {type: 'input', field: 'buy_price', value: '0', verify: 'required|number', reqtext: '采购价不能为空'},
- {type: 'input', field: 'cost_price', value: '0', verify: 'required|number', reqtext: '成本价不能为空'},
- ]
- },
- //商品id 配合specDataUrl和skuDataUrl使用
- productId: '11',
- //规格数据, 一般从后台获取
- specData: [
- {
- id: "1",
- title: "颜色",
- child: [
- {id: "1", title: "红", checked: true},
- {id: "2", title: "黄", checked: false},
- {id: "3", title: "蓝", checked: false}
- ]
- }, {
- id: "2",
- title: "尺码",
- child: [
- {id: "4", title: "S", checked: true},
- {id: "5", title: "M", checked: true},
- {id: "6", title: "L", checked: false},
- {id: "7", title: "XL", checked: false}
- ]
- }, {
- id: "3",
- title: "款式",
- child: [
- {id: "8", title: "男款", checked: true},
- {id: "9", title: "女款", checked: true}
- ]
- }
- ],
- specData: [],
- //获取规格数据接口地址,如果为空或者不配置则使用 specData 参数配置
- //接口要求返回格式参考 specData.json
- // specDataUrl: './json/specData.json',
- //sku数据
- //新增的时候为空对象
- //编辑的时候可以从后台接收,会自动填充sku表,可以去掉注释看效果
- //多规格格式
- // skuData: {
- // "skus[1-4-8][picture]": "https://www.baidu.com/img/flexible/logo/pc/result.png",
- // "skus[1-4-8][price]": "100",
- // "skus[1-4-8][market_price]": "200",
- // "skus[1-4-8][cost_price]": "50",
- // "skus[1-4-8][stock]": "18",
- // "skus[1-4-8][status]": "0",
- // "skus[1-4-9][picture]": "",
- // "skus[1-4-9][price]": "0",
- // "skus[1-4-9][market_price]": "0",
- // "skus[1-4-9][cost_price]": "0",
- // "skus[1-4-9][stock]": "0",
- // "skus[1-4-9][status]": "1",
- // "skus[1-5-8][picture]": "",
- // "skus[1-5-8][price]": "0",
- // "skus[1-5-8][market_price]": "0",
- // "skus[1-5-8][cost_price]": "0",
- // "skus[1-5-8][stock]": "0",
- // "skus[1-5-8][status]": "1",
- // "skus[1-5-9][picture]": "",
- // "skus[1-5-9][price]": "0",
- // "skus[1-5-9][market_price]": "0",
- // "skus[1-5-9][cost_price]": "0",
- // "skus[1-5-9][stock]": "0",
- // "skus[1-5-9][status]": "1"
- // },
- //统一规格格式
- // skuData: {
- // 'price': '80',
- // 'market_price': '100',
- // 'cost_price': '60',
- // 'stock': '999',
- // 'status': '0',
- // }
- //获取SKU数据接口地址,如果为空或者不配置则使用skuData配置
- //接口要求返回格式参考 skuData.json
- // skuDataUrl: './json/skuData.json',
- });*/
- </script>
|