From 52267147e624f3a0daef4870ba72f023ef9162a9 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期六, 07 十月 2023 12:46:29 +0800
Subject: [PATCH] 修改中国政府采购网爬虫规则
---
zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/Edit.cshtml | 158 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 108 insertions(+), 50 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/Edit.cshtml
index d8a351f..4c2a8d5 100644
--- a/zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/FiOrderrecievemoney/Edit.cshtml
@@ -11,6 +11,8 @@
List<SysCodeDtl> accounttype = ViewData["accounttype"] as List<SysCodeDtl>; //璐︽埛绫诲瀷
+ CooperatecustomCustomerDTO cooperatecustomCustomerDTO = ViewData["cooperatecustomCustomerDTO"] as CooperatecustomCustomerDTO; //瀹㈡埛
+
}
@{
Layout = null;
@@ -108,40 +110,56 @@
<label class="text-left col-sm-1 col-md-1 control-label"> @Model.YishouMoney.ToString("F2") </label>
<label class="text-left col-sm-1 col-md-1 control-label"> </label>
<label class="text-right col-sm-1 col-md-1 control-label">鏈敹娆撅紙鍏冿級</label>
- <label id="WeishouMoney" class="text-left col-sm-1 col-md-1 control-label"> @Model.WeishouMoney.ToString("F2") </label>
+ <label id="WeishouMoney1" class="text-left col-sm-1 col-md-1 control-label"> @Model.WeishouMoney.ToString("F2") </label>
+ <input type="hidden" id="WeishouMoney" name="WeishouMoney" value="@Model.WeishouMoney.ToString("F2")" />
<label class="text-left col-sm-1 col-md-1 control-label"> </label>
</div>
<div class="clearfix layer-area" style="padding-bottom:15px;">
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鏀舵閲戦锛堝厓锛�<i class="red">*</i></label>
<div class="col-sm-2 col-md-2" grouptype="Vdata">
- <input class="form-control" label="鏀舵閲戦锛堝厓锛�" name="Recievemoney" id="Recievemoney" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.WeishouMoney.ToString("F2")" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+ <input class="form-control" label="鏀舵閲戦锛堝厓锛�" name="Recievemoney" id="Recievemoney" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.WeishouMoney.ToString("F2")" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
</div>
+ </div>
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
<label class="text-right col-sm-1 col-md-1 control-label">鏀舵鏂瑰紡<i class="red">*</i></label>
- <div class="col-sm-2 col-md-2">
- <select id="PayType" class="form-control" name="PayType" data-placeholder="閫夋嫨 搴忓垪 ...">
- @foreach (var item in PayType)
- {
- @if (!item.CodeSn.Equals(Model.PayType))
- {
- <option value="@item.CodeSn" hassubinfo="true">
- @item.Comments
- </option>
- }
- else
- {
- <option value="@item.CodeSn" hassubinfo="true" selected="selected">
- @item.Comments
- </option>
- }
+ <div class="col-sm-10 col-md-10">
+ @for (int i = 0; i < PayType.Count; i++)
+ {
+ <input type="radio" name="PayType" id="PayType@(i)" value="@(PayType[i].CodeSn)" onclick="CheckedChanging(this.value)" truetype="radio">
+ <label for="PayType@(i)">@(PayType[i].Comments)</label>
+ }
- }
- }
+ <input type="radio" name="PayType" id="PayType2" value="03" onclick="CheckedChanging(this.value)" checked="checked" truetype="radio">
+ <label for="PayType2">棰勪粯娆�</label>
- </select>
+ (鍓╀綑棰勪粯娆撅細<span id="nowCustomMoney" class="moneystyle">锟((cooperatecustomCustomerDTO.Yufukuan??0).ToString("f2"))</span>锛屽墿浣欐巿淇★細<span id="nowCredit" class="moneystyle">锟(((cooperatecustomCustomerDTO.Shouxinedu??0) - (cooperatecustomCustomerDTO.Shenyushouxin??0)).ToString("f2"))</span>)
+
+
+ @*<select id="PayType" class="form-control" name="PayType" data-placeholder="閫夋嫨 搴忓垪 ...">
+ @foreach (var item in PayType)
+ {
+ @if (!item.CodeSn.Equals(Model.PayType))
+ {
+ <option value="@item.CodeSn" hassubinfo="true">
+ @item.Comments
+ </option>
+ }
+ else
+ {
+ <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+ @item.Comments
+ </option>
+ }
+
+ }
+ }
+
+ </select>*@
</div>
-
+ </div>
+ <div class="clearfix layer-area" style="padding-bottom:15px;">
<label class="text-right col-sm-1 col-md-1 control-label">鏀舵鏃ユ湡<i class="red">*</i></label>
<div class="col-sm-2 col-md-2">
<input id="PayTime" class="form-control" label="鏀舵鏃ユ湡" name="PayTime" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.PayTime.ToString("yyyy/MM/dd")" readonly="readonly">
@@ -153,10 +171,10 @@
</div>
- <div class="clearfix layer-area" style="padding-bottom:15px;">
+ <div class="clearfix layer-area" style="padding-bottom:15px;" id="AccountSubject">
- <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">璐︽埛鍚嶇О<i class="red">*</i></label>
- <div class="col-sm-2 col-md-2" grouptype="Vdata">
+ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label" id="AccountSubject1" >璐︽埛鍚嶇О<i class="red">*</i></label>
+ <div class="col-sm-2 col-md-2" grouptype="Vdata" id="AccountSubject2" >
<select id="AccountId" class="form-control" name="AccountId" data-placeholder="閫夋嫨 搴忓垪 ...">
<option value="" hassubinfo="true">璇烽�夋嫨</option>
@@ -164,7 +182,7 @@
</select>
</div>
-
+
<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">绉戠洰鍚嶇О<i class="red">*</i></label>
<div class="col-sm-2 col-md-2" grouptype="Vdata">
@@ -260,34 +278,33 @@
// 淇濆瓨宀椾綅淇℃伅
var savePosition = function () {
-
+ if ($("input[name='PayType']:checked").val()!= '03') {
+ if ($("#AccountId").val() == '') {
+ toastr.warning("鏀舵璐︽埛涓嶈兘涓虹┖");
+ return;
+ }
+ if ($("#SubjectId").val() == '') {
+ toastr.warning("鏀舵绉戠洰涓嶈兘涓虹┖");
+ return;
+ }
+ }
if ($("#Recievemoney").val() == '') {
toastr.warning("鏀舵閲戦涓嶈兘涓虹┖");
return;
}
- if ($("#PayType").val() == '') {
- toastr.warning("鏀舵鏂瑰紡涓嶈兘涓虹┖");
- return;
- }
+
if ($("#PayTime").val() == '') {
toastr.warning("鏀舵鏃ユ湡涓嶈兘涓虹┖");
return;
}
- if ($("#AccountId").val() == '') {
- toastr.warning("鏀舵璐︽埛涓嶈兘涓虹┖");
- return;
- }
- if ($("#SubjectId").val() == '') {
- toastr.warning("鏀舵绉戠洰涓嶈兘涓虹┖");
- return;
- }
+
if (parseFloat($("#Recievemoney").val()) < 0) {
toastr.warning("鏀舵閲戦涓嶈兘灏忎簬0");
return;
}
- if (parseFloat($("#Recievemoney").val()) > parseFloat($("#WeishouMoney").html().trim())) {
+ if (parseFloat($("#Recievemoney").val()) > parseFloat($("#WeishouMoney1").html().trim())) {
toastr.warning("鏈鏀舵閲戦澶т簬璁㈠崟鏈粯娆�!涓轰簡鎮ㄧ殑璐﹀姟姝g‘鎬ц閲嶆柊澶嶆煡锛�");
return;
@@ -333,12 +350,21 @@
}
});
}
-
-
-
- $("#PayType").change(function () {
-
- var PayType = $("#PayType").val();
+ function CheckedChanging(obj) {
+ var PayType = obj;
+ if (PayType == "03") {
+ $("#AccountSubject").hide();
+ } else {
+ $("#AccountSubject").show();
+ }
+ if (PayType == "04" || PayType == "05") {
+ $("#AccountSubject1").hide();
+ $("#AccountSubject2").hide();
+ } else {
+ $("#AccountSubject1").show();
+ $("#AccountSubject2").show();
+ }
+
$.ajax({
type: "GET",
url: "/FiAccountIncome/getAccount?Accounttype=" + PayType,
@@ -346,7 +372,7 @@
global: false,
data: "",
success: function (data) {
-
+
var city = $("#AccountId");
city.find('option').remove();
var aaa = '<option value="" hassubinfo="true">璇烽�夋嫨</option>';
@@ -354,7 +380,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
- var o = '<option value="' + data[i].Id + '" hassubinfo="true">' + data[i].Accountname + '</option>';
+ var o = '<option value="' + data[i].Id + '" hassubinfo="true" selected="selected" >' + data[i].Accountname + '</option>';
city.append(o);
}
}
@@ -365,9 +391,41 @@
parent.layer.msg('澶辫触', { icon: 5 });
}
});
- });
+ }
+ CheckedChanging(03);
- $("#PayType").trigger("change");
+ //$("#PayType").change(function () {
+
+ // var PayType = $("#PayType").val();
+ // $.ajax({
+ // type: "GET",
+ // url: "/FiAccountIncome/getAccount?Accounttype=" + PayType,
+ // dataType: "json",
+ // global: false,
+ // data: "",
+ // success: function (data) {
+
+ // var city = $("#AccountId");
+ // city.find('option').remove();
+ // var aaa = '<option value="" hassubinfo="true">璇烽�夋嫨</option>';
+ // city.append(aaa);
+ // if (data.length > 0) {
+ // for (var i = 0; i < data.length; i++) {
+
+ // var o = '<option value="' + data[i].Id + '" hassubinfo="true">' + data[i].Accountname + '</option>';
+ // city.append(o);
+ // }
+ // }
+ // },
+ // error: function () {
+
+
+ // parent.layer.msg('澶辫触', { icon: 5 });
+ // }
+ // });
+ //});
+
+ //$("#PayType").trigger("change");
function _pageAutoClose() {
--
Gitblit v1.9.1