611 lines
20 KiB
Plaintext
611 lines
20 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="H5XLXSJBGSX.aspx.cs"
|
|
Inherits="GThinking.N_XLXSBJ.H5XLXSJBGSX" %>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head id="Head1" runat="server">
|
|
<meta charset="UTF-8" />
|
|
<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="apple-mobile-web-app-capable" content="yes" />
|
|
<title>线缆销售价格表查询</title>
|
|
<link rel="stylesheet" href="images/index.css" />
|
|
<script type="text/javascript" src="images/vue.min.js"></script>
|
|
<script type="text/javascript" src="images/vant.min.js"></script>
|
|
<script src="images/index.js"></script>
|
|
|
|
<style type="text/css">
|
|
.van-tree-select {
|
|
height: 90% !important;
|
|
width: 100% !important;
|
|
}
|
|
.cate-list {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
.left-nav {
|
|
width: 40%;
|
|
height: 80vh;
|
|
overflow: scroll;
|
|
}
|
|
.nav-detail {
|
|
width: 100% !important;
|
|
}
|
|
.cate-body {
|
|
width: 100%;
|
|
height: 80vh;
|
|
overflow: scroll;
|
|
}
|
|
.van-sidebar-item {
|
|
text-align: center !important;
|
|
height: 120rpx !important;
|
|
line-height: 40rpx !important;
|
|
}
|
|
.van-button--mini {
|
|
--van-button-mini-font-size: 2px;
|
|
}
|
|
|
|
/* 强制按钮文本换行,防止溢出 */
|
|
.van-button {
|
|
white-space: normal !important;
|
|
word-wrap: break-word !important;
|
|
word-break: break-word !important;
|
|
overflow-wrap: break-word !important;
|
|
max-width: 100% !important;
|
|
height: auto !important;
|
|
min-height: 32px !important;
|
|
line-height: 1.3 !important;
|
|
padding: 6px 8px !important;
|
|
}
|
|
|
|
.van-button span {
|
|
white-space: normal !important;
|
|
word-wrap: break-word !important;
|
|
word-break: break-word !important;
|
|
overflow-wrap: break-word !important;
|
|
max-width: 100% !important;
|
|
display: block !important;
|
|
}
|
|
.condition {
|
|
font-size: 12px;
|
|
margin-left: 20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body style="background-color: #fff;">
|
|
<form id="form1" style="width: 100%" runat="server">
|
|
<asp:ScriptManager ID="ScriptManager1" runat="server">
|
|
</asp:ScriptManager>
|
|
<asp:HiddenField ID="txtGH" runat="server" />
|
|
<script type="text/javascript">
|
|
// 等待DOM完全加载后再执行初始化
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
|
|
if (browserRule.test(navigator.userAgent)) {
|
|
window.onpageshow = function (event) {
|
|
if (event.persisted) {
|
|
window.location.reload();
|
|
}
|
|
};
|
|
}
|
|
Vue.use(ELEMENT);
|
|
var app;
|
|
|
|
|
|
|
|
function RefreshPage() {
|
|
try {
|
|
app.Refresh();
|
|
} catch (err) {
|
|
alert(err);
|
|
}
|
|
}
|
|
function init() {
|
|
if(sessionStorage.getItem("JGBID")=="" || sessionStorage.getItem("JGBID")=="null" || !sessionStorage.getItem("JGBID"))
|
|
{
|
|
//获取价格表
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetMRJGBID",
|
|
false,
|
|
{
|
|
"-RefUmId": 100860098,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetJGB"
|
|
);
|
|
}
|
|
else
|
|
{
|
|
CallBackFun(sessionStorage.getItem("JGBID"),"GetJGB","");
|
|
}
|
|
}
|
|
function CallBackFun(result, userContext, methodName) {
|
|
if (userContext == "GetJGB") {
|
|
sessionStorage.setItem("JGBID",result);
|
|
app = new Vue({
|
|
el: "#app",
|
|
data: {
|
|
XHGGvalue: "",
|
|
selectedValue: result, // 选中的值
|
|
selectOptions: [],
|
|
JGBID: result,
|
|
JGBPopShow:false,
|
|
BZindex:0,
|
|
active: 0,
|
|
mainActiveIndex: 0,
|
|
XLItems: [],
|
|
DYindex: 0,
|
|
DYItems: [],
|
|
XXJGindex: 0,
|
|
XXJGItems: [],
|
|
XHindex: 0,
|
|
XHItems: [],
|
|
},
|
|
methods: {
|
|
onOpenFilter(){
|
|
app.JGBPopShow = true;
|
|
},
|
|
|
|
handleSelectChange(item) {
|
|
app.JGBID = item.value;
|
|
app.BZindex = app.selectOptions.findIndex(item => item.value === app.JGBID);
|
|
sessionStorage.setItem("JGBID",app.JGBID);
|
|
//获取产品系列
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetCPXL",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetXL"
|
|
);
|
|
const toast = vant.Toast.loading({
|
|
duration: 0, // 持续展示 toast
|
|
forbidClick: true,
|
|
message: "加载中...",
|
|
});
|
|
},
|
|
CPMLChange(index) {
|
|
app.mainActiveIndex = index;
|
|
//获取电压
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetDY",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
sCPYTID: app.XLItems[app.mainActiveIndex].value,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetDY"
|
|
);
|
|
const toast = vant.Toast.loading({
|
|
duration: 0, // 持续展示 toast
|
|
forbidClick: true,
|
|
message: "加载中...",
|
|
});
|
|
},
|
|
|
|
DYChange(index) {
|
|
app.DYindex = index;
|
|
//获取芯线结构
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetXXJG",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
sCPYTID: app.XLItems[app.mainActiveIndex].value,
|
|
sDY: app.DYItems[app.DYindex].text,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetXXJG"
|
|
);
|
|
const toast = vant.Toast.loading({
|
|
duration: 0, // 持续展示 toast
|
|
forbidClick: true,
|
|
message: "加载中...",
|
|
});
|
|
},
|
|
|
|
XXJGChange(index) {
|
|
app.XXJGindex = index;
|
|
//获取型号
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetXH",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
sCPYTID: app.XLItems[app.mainActiveIndex].value,
|
|
sDY: app.DYItems[app.DYindex].text,
|
|
sXXJG: app.XXJGItems[app.XXJGindex].text,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetXH"
|
|
);
|
|
const toast = vant.Toast.loading({
|
|
duration: 0, // 持续展示 toast
|
|
forbidClick: true,
|
|
message: "加载中...",
|
|
});
|
|
},
|
|
XHChange(index) {
|
|
const toast = vant.Toast.loading({
|
|
duration: 0, // 持续展示 toast
|
|
forbidClick: true,
|
|
message: "加载中...",
|
|
});
|
|
app.XHindex = index;
|
|
var XL = app.XLItems[app.mainActiveIndex].value;
|
|
var XLMC = app.XLItems[app.mainActiveIndex].text;
|
|
var DY = app.DYItems[app.DYindex].text;
|
|
var XXJG = app.XXJGItems[app.XXJGindex].text;
|
|
var XH = app.XHItems[app.XHindex].text;
|
|
sessionStorage.setItem(
|
|
"mainActiveIndex",
|
|
app.mainActiveIndex
|
|
);
|
|
window.location.href =
|
|
"H5XLXSJBGSXMX.aspx?XL=" +
|
|
XL +
|
|
"&XLMC=" +
|
|
encodeURIComponent(XLMC) +
|
|
"&DY=" +
|
|
encodeURIComponent(DY) +
|
|
"&XXJG=" +
|
|
encodeURIComponent(XXJG) +
|
|
"&XH=" +
|
|
encodeURIComponent(XH);
|
|
},
|
|
|
|
onSearch(val) {
|
|
const toast = vant.Toast.loading({
|
|
duration: 0, // 持续展示 toast
|
|
forbidClick: true,
|
|
message: "加载中...",
|
|
});
|
|
if (val == "") {
|
|
vant.Toast("请输入查询内容");
|
|
return;
|
|
}
|
|
app.XHGGvalue = val;
|
|
window.location.href =
|
|
"H5XLXSJBGSXMX.aspx?CXFA=" +
|
|
encodeURIComponent(app.XHGGvalue);
|
|
},
|
|
|
|
onCancel(val) {},
|
|
},
|
|
});
|
|
|
|
var divApp = document.getElementById("app");
|
|
divApp.style.display = "block";
|
|
// const toolbar = document.querySelector(".el-input__inner");
|
|
// toolbar.style.width = "98%";
|
|
|
|
//加载所选产品目录
|
|
const inheritmainActiveIndex =
|
|
sessionStorage.getItem("mainActiveIndex");
|
|
if (inheritmainActiveIndex) {
|
|
app.mainActiveIndex = inheritmainActiveIndex;
|
|
}
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetKXJGB",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
"-RefUmId": 100860098,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetKXJGB"
|
|
);
|
|
const toast = vant.Toast.loading({
|
|
duration: 0, // 持续展示 toast
|
|
forbidClick: true,
|
|
message: "加载中...",
|
|
});
|
|
|
|
}
|
|
else if (userContext == "GetKXJGB") {
|
|
if (result == []) {
|
|
vant.Toast.clear();
|
|
return;
|
|
}
|
|
app.selectOptions = result.map((item) => {
|
|
return {
|
|
value: item.value,
|
|
text: item.text,
|
|
};
|
|
});
|
|
app.BZindex = app.selectOptions.findIndex(item => item.value === app.JGBID);
|
|
//获取产品系列
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetCPXL",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetXL"
|
|
);
|
|
|
|
}
|
|
else if (userContext == "GetXL") {
|
|
if (result.Data == [] || result.Data == "") {
|
|
app.XHItems = [];
|
|
app.XLItems = [];
|
|
app.DYItems = [];
|
|
app.XXJGItems = [];
|
|
vant.Toast.clear();
|
|
return;
|
|
}
|
|
app.XLItems = result.Data;
|
|
//获取电压
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetDY",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
sCPYTID: app.XLItems[app.mainActiveIndex].value,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetDY"
|
|
);
|
|
} else if (userContext == "GetDY") {
|
|
if (result == [] || result == "") {
|
|
app.XHItems = [];
|
|
app.DYItems = [];
|
|
app.XXJGItems = [];
|
|
vant.Toast.clear();
|
|
return;
|
|
}
|
|
app.DYItems = result;
|
|
//获取芯线结构
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetXXJG",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
sCPYTID: app.XLItems[app.mainActiveIndex].value,
|
|
sDY: app.DYItems[app.DYindex].text,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetXXJG"
|
|
);
|
|
} else if (userContext == "GetXXJG") {
|
|
if (result == [] || result == "") {
|
|
app.XHItems = [];
|
|
app.XXJGItems = [];
|
|
vant.Toast.clear();
|
|
return;
|
|
}
|
|
app.XXJGItems = result;
|
|
//获取型号
|
|
GThinking.Web.AjaxServiceProxy.servicePath =
|
|
"S_XLXSBJ/102373000.ashx";
|
|
GThinking.Web.AjaxServiceProxy.invoke(
|
|
"GetXH",
|
|
false,
|
|
{
|
|
sJGBID: app.JGBID,
|
|
sCPYTID: app.XLItems[app.mainActiveIndex].value,
|
|
sDY: app.DYItems[app.DYindex].text,
|
|
sXXJG: app.XXJGItems[app.XXJGindex].text,
|
|
"-RefUmId": 100860094,
|
|
},
|
|
CallBackFun,
|
|
null,
|
|
"GetXH"
|
|
);
|
|
} else if (userContext == "GetXH") {
|
|
if (result == [] || result == "") {
|
|
app.XHItems = [];
|
|
vant.Toast.clear();
|
|
return;
|
|
}
|
|
app.XHItems = result;
|
|
vant.Toast.clear();
|
|
}
|
|
}
|
|
init();
|
|
});
|
|
</script>
|
|
</form>
|
|
<div style="padding-top: 20px"></div>
|
|
<div id="app" style="display: none;">
|
|
<div>
|
|
<van-search v-model="XHGGvalue" show-action placeholder="请输入型号 规格(中间用空格分隔)" @search="onSearch">
|
|
<template #action>
|
|
<div @click="onOpenFilter" v-if="selectOptions.length > 1">
|
|
<img src="images/pricelist.png" style="width: 20px; height: 20px; vertical-align: middle;">
|
|
<span style="color: #1989fa;">切换价格表</span>
|
|
</div>
|
|
</template>
|
|
</van-search>
|
|
</div>
|
|
<div>
|
|
|
|
<!-- <van-search
|
|
v-model="XHGGvalue"
|
|
placeholder="请输入型号 规格(中间用空格分隔)"
|
|
@search="onSearch"
|
|
>
|
|
<template #action>
|
|
|
|
<div @click="onOpenFilter">
|
|
<img src="image/pricelist.png" style="width: 16px; height: 16px; vertical-align: middle;">
|
|
<van-icon name="filter-o" color="#1989fa"></van-icon>
|
|
<span style="color: #1989fa;">切换</span>
|
|
</div>
|
|
</template>
|
|
</van-search> -->
|
|
</div>
|
|
<van-popup v-model:show="JGBPopShow" position="right" style="width: 60%; height: 100%; padding: 8px">
|
|
<div style="height: 100%; display: flex; flex-direction: column;">
|
|
<div style="font-size: 16px;font-weight: bold; margin-bottom: 12px; flex-shrink: 0;">销售价格表</div>
|
|
<div style="flex: 1; overflow-y: auto; padding-right: 4px;">
|
|
<div style="display: flex; width: 100%; flex-flow: wrap; gap: 8px;">
|
|
<van-button
|
|
@click="handleSelectChange(item)"
|
|
v-for="(item, index) in selectOptions"
|
|
size="mini"
|
|
:type="index==BZindex?'info':'default'"
|
|
style="margin: 0; text-align: center; font-size: 12px;"
|
|
>
|
|
{{item.value}}|{{item.text}}
|
|
</van-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</van-popup>
|
|
<!-- <div style="padding-bottom: 12px;">
|
|
<el-select style="width:100%;margin-left: 12px;margin-right: 12px;font-size: 12pt;z-index: 99;"
|
|
v-model="selectedValue"
|
|
placeholder="请选择价格表"
|
|
@change="handleSelectChange"
|
|
:disabled="selectOptions.length === 1"
|
|
>
|
|
<el-option style="width:100%;font-size: 12pt;z-index: 99;background-color:white;"
|
|
v-for="(item, index) in selectOptions"
|
|
:key="index"
|
|
:value="item.value"
|
|
:label="item.text"
|
|
/>
|
|
</el-select>
|
|
</div> -->
|
|
|
|
<div class="cate-list">
|
|
<div class="left-nav">
|
|
<van-sidebar
|
|
style="width: 100%"
|
|
v-model="mainActiveIndex"
|
|
@change="CPMLChange"
|
|
>
|
|
<van-sidebar-item
|
|
style="font-size: 12px"
|
|
v-for="(item, index) in XLItems"
|
|
:title="item.text"
|
|
/>
|
|
</van-sidebar>
|
|
</div>
|
|
|
|
<div class="cate-body">
|
|
<div style="margin-left: 20px; font-size: 16px">电压</div>
|
|
<div
|
|
style="
|
|
display: flex;
|
|
width: 100%;
|
|
flex-flow: wrap;
|
|
margin-left: 20px;
|
|
"
|
|
>
|
|
<van-button
|
|
@click="DYChange(index)"
|
|
v-for="(item, index) in DYItems"
|
|
style="margin-right: 5px"
|
|
size="mini"
|
|
:type="index==DYindex?'info':'default'"
|
|
><span style="font-size: 12px">{{ item.text }}</span></van-button
|
|
>
|
|
</div>
|
|
|
|
<div style="margin-top: 20px; margin-left: 20px; font-size: 16px">
|
|
芯线结构
|
|
</div>
|
|
<div
|
|
style="
|
|
display: flex;
|
|
width: 100%;
|
|
flex-flow: wrap;
|
|
margin-left: 20px;
|
|
"
|
|
>
|
|
<van-button
|
|
@click="XXJGChange(index)"
|
|
v-for="(item, index) in XXJGItems"
|
|
style="margin-right: 5px"
|
|
size="mini"
|
|
:type="index==XXJGindex?'info':'default'"
|
|
><span style="font-size: 12px">{{ item.text }}</span></van-button
|
|
>
|
|
</div>
|
|
|
|
<div style="margin-top: 20px; margin-left: 20px; font-size: 16px">
|
|
型号
|
|
</div>
|
|
<div
|
|
style="
|
|
display: flex;
|
|
width: 100%;
|
|
flex-flow: wrap;
|
|
margin-left: 20px;
|
|
"
|
|
>
|
|
<van-button
|
|
@click="XHChange(index)"
|
|
v-for="(item, index) in XHItems"
|
|
style="margin-right: 5px"
|
|
size="mini"
|
|
:type="index==XHItems?'info':'default'"
|
|
><span style="font-size: 12px">{{ item.text }}</span></van-button
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="padding-bottom: 20%">
|
|
<div>
|
|
<van-tabbar v-model="active">
|
|
<van-tabbar-item icon="search" url="H5XLXSJBGSX.aspx"
|
|
>筛选</van-tabbar-item
|
|
>
|
|
<van-tabbar-item icon="orders-o" url="H5XLXSJBGYX.aspx"
|
|
>已选</van-tabbar-item
|
|
>
|
|
<van-tabbar-item icon="manager-o" url="H5XLXSJBGCJ.aspx"
|
|
>查价单</van-tabbar-item
|
|
>
|
|
</van-tabbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|