|
请参考这个
//function OrderDelete() {
// 删除订单/发货目录和明细
if(ActiveSheet.Range("G3").Value2 == OrderEntryItemsStr &&
ActiveSheet.Name != OrderEntryStr) {
var msg = "确定要删除订单吗,删除后将不可恢复!";
var nStyle = jsOKCancel + jsExclamation + jsDefaultButton2;
var tittle = "删除";
var ret = MsgBox(msg,nStyle,tittle);
if (ret == 1) {
let COrder = createOrder();
COrder.delete();
Application.DisplayAlerts = false;
ActiveSheet.Delete();
Application.DisplayAlerts = true;
}
}else if(ActiveSheet.Range("G3").Value2 == ShipmentItemsStr &&
ActiveSheet.Name != ShipmentEntryStr) {
var msg = "确定要删除发货单吗,删除后将不可恢复!";
var nStyle = jsOKCancel + jsExclamation + jsDefaultButton2;
var tittle = "删除";
var ret = MsgBox(msg,nStyle,tittle);
if (ret == 1) {
let CShipment = createShipment();
CShipment.delete();
Application.DisplayAlerts = false;
ActiveSheet.Delete();
Application.DisplayAlerts = true;
}
} else {
const msg = "基础信息工作表不能删除!";
var nStyle = 0;
const tittle = "删除";
MsgBox(msg,nStyle,tittle);
}
}
|
|