252 lines
13 KiB
Plaintext
252 lines
13 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="H5XLXSJBGYX.aspx.cs" Inherits="GThinking.N_XLXSBJ.H5XLXSJBGYX" %>
|
|
|
|
|
|
<!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>
|
|
<style type="text/css">
|
|
.add_btn{
|
|
text-align: center; /* 水平居中 */
|
|
width:100%;
|
|
position: fixed;
|
|
bottom:60px;
|
|
/*
|
|
position: fixed;
|
|
bottom:30px;
|
|
display: flex;
|
|
text-align: center;*/
|
|
}
|
|
.add_btn1{
|
|
margin-top: 30px;
|
|
width: 300px;
|
|
background: #14a1fd;
|
|
color: #fff;
|
|
border-radius: 70px;
|
|
}
|
|
</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();
|
|
}
|
|
};
|
|
}
|
|
|
|
var app;
|
|
|
|
|
|
function RefreshPage() {
|
|
try {
|
|
app.Refresh();
|
|
} catch (err) {
|
|
alert(err);
|
|
}
|
|
}
|
|
function init() {
|
|
//获取价格表
|
|
debugger;
|
|
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") {
|
|
app = new Vue({
|
|
el: '#app',
|
|
data: {
|
|
active:1,
|
|
JGBID:result,
|
|
value1:1,
|
|
ddxx:[],
|
|
deletedindex:-1,
|
|
},
|
|
methods: {
|
|
SLonChange(index)
|
|
{
|
|
if(app.ddxx[index].WXXLCJDMX_CJSL != '')
|
|
{
|
|
//调整已选查价单
|
|
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373000.ashx';
|
|
GThinking.Web.AjaxServiceProxy.invoke('UpdateYXCXDMXList', false, {
|
|
'sCJBH':app.ddxx[index].WXXLCJDMX_CJBH,
|
|
'dXH':app.ddxx[index].WXXLCJDMX_XH,
|
|
'dSL':app.ddxx[index].WXXLCJDMX_CJSL,
|
|
'-RefUmId': 100860098
|
|
},
|
|
CallBackFun, null, "UpdateYXCXDMXList");
|
|
}
|
|
|
|
},
|
|
Dodelete(index)
|
|
{
|
|
vant.Dialog.confirm({
|
|
title: '',
|
|
message: '您确定要删除所选记录?',
|
|
})
|
|
.then(() => {
|
|
try {
|
|
app.deletedindex = index;
|
|
var sCJBH = app.ddxx[index].WXXLCJDMX_CJBH;
|
|
var sCJXH = app.ddxx[index].WXXLCJDMX_XH;
|
|
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373000.ashx';
|
|
GThinking.Web.AjaxServiceProxy.invoke('DeleteWXXLCJDMXInfo', false, {
|
|
'sBH':sCJBH,
|
|
'fXH':sCJXH,
|
|
'-RefUmId': 100860098
|
|
},
|
|
CallBackFun, null, "Delete");
|
|
} catch (err) {
|
|
vant.Toast(err);
|
|
}
|
|
})
|
|
.catch(() => {
|
|
// on cancel
|
|
});
|
|
},
|
|
SCCJD(){
|
|
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373000.ashx';
|
|
GThinking.Web.AjaxServiceProxy.invoke('UpdateYXCXDZTList', false, {
|
|
'-RefUmId': 100860098
|
|
},
|
|
CallBackFun, null, "DoSCCJD");
|
|
},
|
|
},
|
|
})
|
|
var divApp = document.getElementById("app");
|
|
divApp.style.display = "block";
|
|
//获取产品系列
|
|
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373000.ashx';
|
|
GThinking.Web.AjaxServiceProxy.invoke('GetYXCJDMXList', false, {
|
|
'-RefUmId': 100860098
|
|
},
|
|
CallBackFun, null, "GetCPJG");
|
|
}
|
|
else if(userContext == "GetCPJG")
|
|
{
|
|
if(result.Success == true)
|
|
{
|
|
app.ddxx = result.wxxlcjdmxinfo;
|
|
console.log(app.ddxx);
|
|
}
|
|
}
|
|
else if(userContext == "Delete")
|
|
{
|
|
if(result.Success == true)
|
|
{
|
|
var arraylength = app.ddxx.length
|
|
var newArray = []
|
|
for(var i = 0;i < arraylength;i++)
|
|
{
|
|
if(i !== app.deletedindex){
|
|
newArray.push(app.ddxx[i])
|
|
}
|
|
}
|
|
app.ddxx = newArray;
|
|
vant.Toast('删除成功!');
|
|
}
|
|
}
|
|
else if(userContext == "DoSCCJD")
|
|
{
|
|
if(result.Success == true)
|
|
{
|
|
var BH = app.ddxx[0].WXXLCJDMX_CJBH;
|
|
var CJZJE = app.ddxx[0].WXXLCJD_CJZJE;
|
|
var CJSJ = app.ddxx[0].WXXLCJD_WXCJSJ;
|
|
app.ddxx = [];
|
|
window.location.href = "H5XLXSJBGCJMX.aspx?BH=" + BH + "&HSBZ=Y&CJZJE=" + CJZJE + "&CJSJ=" + encodeURIComponent(CJSJ);
|
|
}
|
|
}
|
|
}
|
|
init();
|
|
});
|
|
</script>
|
|
|
|
</form>
|
|
<div style="padding-top:20px">
|
|
</div>
|
|
<div id="app" style="display:none;">
|
|
<div style="padding-bottom:15%;">
|
|
<van-card
|
|
v-for="(item, index) in ddxx"
|
|
>
|
|
<template #price>
|
|
<div style="font-size: 13px;margin-bottom: 10px;display: flex;">
|
|
<span style="width: 50px;text-align: right;">型号:</span>
|
|
<span style="color: grey;">{{item.WXXLCJDMX_XLXHID}} {{item.WXXLCJDMX_DYDJID}}</span>
|
|
</div>
|
|
<div style="font-size: 13px;margin-bottom: 10px;display: flex;">
|
|
<span style="width: 50px;text-align: right;">规格:</span>
|
|
<span style="color: grey;">{{item.WXXLCJDMX_XLGGID}} {{item.WXXLCJDMX_XLBZID}}</span>
|
|
</div>
|
|
<div style="font-size: 13px;display: flex;text-align: center;">
|
|
<span style="width: 50px;text-align: right;">数量:</span>
|
|
<van-stepper style="margin-top:-10px ;" v-model="item.WXXLCJDMX_CJSL" input-width="70px" min="0" step="0.001" :decimal-length="3" @change="SLonChange(index)"></van-stepper>
|
|
<span style="color: grey;line-height:10px;">{{item.WXXLCJDMX_JLDW}}</span>
|
|
</div>
|
|
</template>
|
|
<template #footer>
|
|
<div style="margin-right: 5%;position: absolute;left:85%;margin-top:-55px;">
|
|
<van-button style="padding-left:5px;padding-right:0px;height: 25px;" type="danger" size="mini" color="rgb(250, 250, 250)" @click="Dodelete(index)"><van-icon color="rgb(255, 110, 105)" size="30" name="delete-o"/></van-button>
|
|
</div>
|
|
</template>
|
|
</van-card>
|
|
</div>
|
|
|
|
<div class="add_btn">
|
|
<button @click="SCCJD" :disabled = "ddxx == '' || ddxx == []" style="height:40px;" class="add_btn1">生成查价单</button>
|
|
</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>
|
|
|