|
@@ -7,6 +7,8 @@ var isApportion = 1; //1(未使用分摊金额,数值变动会自动计算商
|
|
|
//删除节点-保存对应删除的节点信息 -- 只有修改页面使用
|
|
|
var deleteArray = new Array();
|
|
|
|
|
|
+// 订单类型为正常订单、非赠品订单、店铺结算类型为:现结订单;需要输入流水号或者上传支付凭证
|
|
|
+var isShowPaymentVoucher = false;
|
|
|
/**
|
|
|
* 打开商品列表
|
|
|
*/
|
|
@@ -32,12 +34,8 @@ function add_customer() {
|
|
|
layer_show("客诉列表",url_path + "/admin/customer/to_add_customer_list","1000","500");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
$(function(){
|
|
|
|
|
|
-
|
|
|
-
|
|
|
$("#salesOrderStatus").change(function(){
|
|
|
var status = $(this).val();
|
|
|
if(status == 1){ //正常订单
|
|
@@ -45,14 +43,58 @@ $(function(){
|
|
|
$("#salesCustomer").hide();
|
|
|
$("#salesCustomerIdHtml").html("");
|
|
|
$("#salesCustomerId").val("");
|
|
|
+
|
|
|
}else{
|
|
|
$("#selectCustomer").show();
|
|
|
$("#salesCustomer").show();
|
|
|
$("#salesCustomerIdHtml").html("未选择客诉编号!");
|
|
|
}
|
|
|
+ renderPaymentVoucher();
|
|
|
+ })
|
|
|
+
|
|
|
+ // 赠品订单隐藏流水号布局
|
|
|
+ $("#salesOrderStatus").change(function(){
|
|
|
+ renderPaymentVoucher()
|
|
|
})
|
|
|
+
|
|
|
+ $('#salesStoreId').change(function () {
|
|
|
+ // 处理输入流水号或者上传支付凭证是否显示
|
|
|
+ // var storeId = $(this).val();
|
|
|
+ renderPaymentVoucher();
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
+function renderPaymentVoucher(storeId) {
|
|
|
+ var salesOrderStatus = $('#salesOrderStatus').val();
|
|
|
+ var salesGive = $('#salesGive').val();
|
|
|
+ if (storeId == null || storeId == '') {
|
|
|
+ storeId = $('#salesStoreId').val();
|
|
|
+ }
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ storeId : storeId,
|
|
|
+ },
|
|
|
+ url: url_path + "/admin/dealer/get_payment_voucher",
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ // 订单类型为正常订单、非赠品订单、店铺结算类型为:现结订单;需要输入流水号或者上传支付凭证
|
|
|
+ var isShowPaymentVoucherRow = salesOrderStatus == 1 && salesGive == 1 && data.returnMsg.paymentVoucher == 2;
|
|
|
+ if (data.returnMsg.paymentVoucher != null && isShowPaymentVoucherRow) {
|
|
|
+ $('#paymentVoucherRow').show();
|
|
|
+ isShowPaymentVoucher = true;
|
|
|
+ } else {
|
|
|
+ $('#paymentVoucherRow').hide();
|
|
|
+ isShowPaymentVoucher = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
var isSalesStore = true;
|
|
|
var isSalesAmountTest = false;
|
|
|
var isReq = false;
|
|
@@ -118,6 +160,16 @@ $(function(){
|
|
|
$("#give-sales-order-input").val("");
|
|
|
}
|
|
|
|
|
|
+ // 支付凭证数据
|
|
|
+ if (isShowPaymentVoucher) {
|
|
|
+ var salesPaymentNo = $('#salesPaymentNo').val();
|
|
|
+ var salesPaymentVoucher = $('#salesPaymentVoucher').val();
|
|
|
+ if ((salesPaymentNo == null || salesPaymentNo == '') && (salesPaymentVoucher == null || salesPaymentVoucher == '')) {
|
|
|
+ layer.msg("请填写支付流水号或者上传支付凭证", {icon: 5, time: 3000});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//检测颜色与店铺之间关系
|
|
|
if(!storeProductColor()){
|
|
|
vailErrorMsg_3($("#product_color"),"店铺与商品信息不匹配!");
|