Skip to content

Commit

Permalink
修改馆员管理多个分馆时,册状态显示可用,修改删除功能,原来未设置时间戳。
Browse files Browse the repository at this point in the history
  • Loading branch information
renyh committed Apr 7, 2023
1 parent f4b416a commit f42ddae
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
4 changes: 4 additions & 0 deletions dp2weixin.service/SearchBiblioResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class SearchItemResult

public class BiblioItem
{

//序号
public string no = "";

Expand All @@ -87,6 +88,9 @@ public class BiblioItem
public string barcode { get; set; }//这个barcode值:如果有册条码号为册条码,没有值为@refID:
public string pureBarcode { get; set; }//册条码号

// 2023/4/7增加
public string Timestamp { get; set; }

public string state { get; set; } //状态
public string volume { get; set; } //卷册

Expand Down
14 changes: 10 additions & 4 deletions dp2weixin.service/dp2WeiXinService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8914,7 +8914,8 @@ public class Record
Record oldRecord = new Record();
oldRecord.RecPath = item.recPath;

//oldRecord.Timestamp = timestamp;

oldRecord.Timestamp = item.Timestamp;// 2023/4/7现在dp2端需要时间戳参数,原来的接口不需要时间戳也能删除,
entity.OldRecord = oldRecord;
}

Expand Down Expand Up @@ -9326,14 +9327,17 @@ public long GetItemInfo(string weixinId, //为了获取libraryCode

for (int i = 0; i < recordList.Count; i++)
{

string xml = recordList[i].Data;//result.Records[i].Data;
Record r= recordList[i];//result.Records[i].Data;
string xml = r.Data;
BiblioItem item = ParseItemXml(weixinId, loginInfo, lib, xml, containReservationInfo);
if (item == null)
continue;
item.biblioPath=biblioPath;
item.recPath = this.GetPurePath(recordList[i].RecPath);

// 2023/4/7 要加上时间戳,否则没法编辑和删除
item.Timestamp= r.Timestamp;


//=====
// 检查数据库是否为期刊库,如果是期库,取出期的照片
Expand Down Expand Up @@ -9508,7 +9512,9 @@ bool containReservationInfo //是否获取借书详情和预约详情
int index1 = item.location.IndexOf("/");
if (index1 > 0)
tempLibCode = item.location.Substring(0, index1);
if (activeUser.libraryCode != tempLibCode)

//2023/4/7 修改,有的工作人员管理多个馆
if (StringUtil.IsInList(tempLibCode, activeUser.libraryCode) == false)// != tempLibCode)
{
item.isGray = true;
item.location += "(非本馆-不可操作)";
Expand Down
7 changes: 4 additions & 3 deletions dp2weixinP2P/Scripts/weixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function gotoEditItem(biblioPath, biblioName) {
}

// 删除册
function deleteItem(worker,libId,biblioPath,itemPath,barcode) {
function deleteItem(worker, libId, biblioPath, itemPath, barcode, timestamp) {

var gnl = confirm("您确认要删除册[" + barcode + "]吗?");
if (gnl == false) {
Expand Down Expand Up @@ -161,7 +161,8 @@ function deleteItem(worker,libId,biblioPath,itemPath,barcode) {
alert(errorThrown);
},
{
recPath: itemPath
recPath: itemPath,
Timestamp: timestamp
}
);
}
Expand Down Expand Up @@ -574,7 +575,7 @@ function getItemHtml(libId,record,showDeleteButton) {
itemTables += "<tr>"
+ "<td class='label' colspan='2'>"
//+ "<button class='mui-btn' onclick='gotoEditItem(\"" + recPath + "\",\"" + biblioName + "\")'>编辑</button>"
+ "<button class='mui-btn' onclick='deleteItem(\"" + worker + "\",\"" + libId + "\",\"" + record.biblioPath + "\",\"" + record.recPath + "\",\"" + tempBarcode + "\")'>删除册</button>"
+ "<button class='mui-btn' onclick='deleteItem(\"" + worker + "\",\"" + libId + "\",\"" + record.biblioPath + "\",\"" + record.recPath + "\",\"" + tempBarcode + "\",\"" + record.Timestamp + "\")'>删除册</button>"
+ "</td > "
+ "</tr>";
}
Expand Down
2 changes: 1 addition & 1 deletion dp2weixinP2P/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script src='@Url.Content("~/Scripts/jquery-3.5.1.js?a=2")'></script>
<script src='@Url.Content("~/Scripts/jquery-ui-1.12.1.js?a=2")'></script>
<script src="@Url.Content("~/Scripts/knockout-2.2.0.js?a=2")"></script>
<script src="@Url.Content("~/Scripts/weixin.js?test=1")"></script>
<script src="@Url.Content("~/Scripts/weixin.js?test=2")"></script>
<script src="@Url.Content("~/Scripts/layer.js?a=2")"></script>

<link href="@Url.Content("~/Content/layer.css?a=2")" rel="stylesheet">
Expand Down
2 changes: 1 addition & 1 deletion dp2weixinP2P/Views/Shared/_LayoutEmpty.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script src='@Url.Content("~/Scripts/jquery-3.5.1.js?a=5")'></script>
<script src='@Url.Content("~/Scripts/jquery-ui-1.12.1.js?a=5")'></script>
<script src="@Url.Content("~/Scripts/knockout-2.2.0.js?a=5")"></script>
<script src="@Url.Content("~/Scripts/weixin.js?a=3")"></script>
<script src="@Url.Content("~/Scripts/weixin.js?a=2")"></script>
<script src="@Url.Content("~/Scripts/jweixin-1.0.0.js?a=5")"></script>
<script src="@Url.Content("~/Scripts/layer.js?a=5")"></script>

Expand Down
2 changes: 1 addition & 1 deletion dp2weixinP2P/Views/Shared/_LayoutManager.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<script src='@Url.Content("~/Scripts/jquery-ui-1.12.1.js?a=1")'></script>
<script src="@Url.Content("~/Scripts/knockout-2.2.0.js")"></script>
<script src="@Url.Content("~/Scripts/weixin.js?test=3")"></script>
<script src="@Url.Content("~/Scripts/weixin.js?test=2")"></script>
<script src="@Url.Content("~/Scripts/jweixin-1.0.0.js")"></script>

@RenderSection("style", required: false)
Expand Down

0 comments on commit f42ddae

Please sign in to comment.