Просмотр исходного кода

Merge branch 'release-20170915' into feature_release-tomysql

# Conflicts:
#	src/main/java/com/uas/platform/b2c/logistics/model/DistributorSeller.java
wangyc 8 лет назад
Родитель
Сommit
a73e320e11
31 измененных файлов с 1909 добавлено и 214 удалено
  1. 1 1
      src/main/java/com/uas/platform/b2c/common/base/api/FileUploadController.java
  2. 2 2
      src/main/java/com/uas/platform/b2c/common/base/api/UploadController.java
  3. 35 0
      src/main/java/com/uas/platform/b2c/common/base/constant/FileUrl.java
  4. 10 2
      src/main/java/com/uas/platform/b2c/common/base/service/FileService.java
  5. 8 0
      src/main/java/com/uas/platform/b2c/common/base/service/ImageService.java
  6. 71 48
      src/main/java/com/uas/platform/b2c/common/base/service/impl/DFSImageServiceImpl.java
  7. 32 4
      src/main/java/com/uas/platform/b2c/common/base/service/impl/FileServiceImpl.java
  8. 351 0
      src/main/java/com/uas/platform/b2c/core/utils/HttpUtils.java
  9. 9 0
      src/main/java/com/uas/platform/b2c/fa/settlement/dao/BillDao.java
  10. 2 1
      src/main/java/com/uas/platform/b2c/prod/product/brand/controller/BrandController.java
  11. 10 1
      src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/BrandSubmitServiceImpl.java
  12. 7 25
      src/main/java/com/uas/platform/b2c/prod/store/model/Qualification.java
  13. 25 6
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java
  14. 0 1
      src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java
  15. 9 0
      src/main/java/com/uas/platform/b2c/trade/order/controller/OrderController.java
  16. 7 0
      src/main/java/com/uas/platform/b2c/trade/order/service/OrderService.java
  17. 52 0
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java
  18. 1 0
      src/main/webapp/resources/css/user/user.css
  19. 5 0
      src/main/webapp/resources/js/common/query/order.js
  20. 212 1
      src/main/webapp/resources/js/prod/controllers/OrderEnsureCtrl.js
  21. 212 1
      src/main/webapp/resources/js/prod/controllers/OrderEnsureCtrlWithMultiCurrency.js
  22. 145 49
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_home_ctrl.js
  23. 217 43
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js
  24. 2 2
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_deliveryRule_ctrl.js
  25. 1 1
      src/main/webapp/resources/view/admin/audit_brand.html
  26. 2 2
      src/main/webapp/resources/view/admin/checkMoney/billInput.html
  27. 394 9
      src/main/webapp/resources/view/prod/modal/edit-invoice-modal.html
  28. 3 3
      src/main/webapp/resources/view/usercenter/billInput.html
  29. 16 5
      src/main/webapp/resources/view/usercenter/forstore/buyer_invoice.html
  30. 66 5
      src/main/webapp/resources/view/usercenter/forstore/order_pay.html
  31. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_component_batchapplylist.html

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/base/api/FileUploadController.java

@@ -49,7 +49,7 @@ public class FileUploadController {
 		for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
 			MultipartFile mf = entity.getValue();
 			try {
-				String path = fileService.save(mf.getOriginalFilename(), mf.getBytes());
+				String path = fileService.save(mf);
 				Map<String, Object> map = new HashMap<String, Object>();
 				map.put("path", path);
 				map.put("fileName", mf.getOriginalFilename());

+ 2 - 2
src/main/java/com/uas/platform/b2c/common/base/api/UploadController.java

@@ -43,9 +43,9 @@ public class UploadController {
         for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
             MultipartFile mf = entity.getValue();
             try {
-                IPicture picture = imageService.save(mf.getOriginalFilename(), mf.getBytes());
+                IPicture picture = imageService.uploadFile(mf);
                 pictures.add(picture);
-            } catch (IOException e) {
+            } catch (Exception e) {
                 e.printStackTrace();
             }
         }

+ 35 - 0
src/main/java/com/uas/platform/b2c/common/base/constant/FileUrl.java

@@ -0,0 +1,35 @@
+package com.uas.platform.b2c.common.base.constant;
+
+/**
+ * 文件服务器的基本链接
+ *
+ * @author yuj 2017-10-12 14:53
+ */
+public class FileUrl {
+
+    /**
+     * 文件上传
+     */
+    public final static String FILE_UPLOAD = "http://10.10.100.200:9999/file/upload";
+
+
+    /**
+     * 文件下载
+     */
+    public final static String FILE_DOWNLOAD = "http://10.10.100.200:9999/file/download";
+
+    /**
+     * 文件删除
+     */
+    public final static String FILE_DELETE = "http://10.10.100.200:9999/file/delete";
+
+    /**
+     * 文件信息
+     */
+    public final static String FILE_INFO = "http://10.10.100.200:9999/file/info";
+
+    /**
+     * 文件额外属性
+     */
+    public final static String FILE_METADATA = "http://10.10.100.200:9999/file/metadata";
+}

+ 10 - 2
src/main/java/com/uas/platform/b2c/common/base/service/FileService.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.common.base.service;
 
 import com.uas.platform.b2c.common.base.model.FileUpload;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 文件上传
@@ -18,10 +19,17 @@ public interface FileService {
 
     /**
      * 保存文件
-     * @param fileName 文件名
-     * @param fileBytes 文件字节数组
+     * @param mf 需要上传的文件
      * @return 文件路径
      */
+    public String save(MultipartFile mf);
+
+    /**
+     * 用户上传文件
+     * @param fileName 文件名
+     * @param fileBytes 字节数组
+     * @return String
+     */
     public String save(String fileName, byte[] fileBytes);
 
 }

+ 8 - 0
src/main/java/com/uas/platform/b2c/common/base/service/ImageService.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.common.base.service;
 
 import com.uas.platform.b2c.common.base.model.IPicture;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.io.File;
 import java.util.List;
@@ -38,4 +39,11 @@ public interface ImageService {
 	 */
 	public IPicture save(String fileName, byte[] fileBytes);
 
+	/**
+	 * 保存图片
+	 * @param mf MultipartFile 文件的信息
+	 * @return
+	 * @throws Exception
+	 */
+    IPicture uploadFile(MultipartFile mf) throws Exception;
 }

+ 71 - 48
src/main/java/com/uas/platform/b2c/common/base/service/impl/DFSImageServiceImpl.java

@@ -1,61 +1,84 @@
 package com.uas.platform.b2c.common.base.service.impl;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.FilenameUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
+import com.alibaba.fastjson.JSONObject;
 import com.uas.dfs.service.FileClient;
+import com.uas.platform.b2c.common.base.constant.FileUrl;
 import com.uas.platform.b2c.common.base.dao.DBPictureRepository;
 import com.uas.platform.b2c.common.base.model.DBPicture;
 import com.uas.platform.b2c.common.base.model.IPicture;
 import com.uas.platform.b2c.common.base.service.ImageService;
+import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.b2c.core.utils.HttpUtils;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 @Service
 public class DFSImageServiceImpl implements ImageService {
 
-	@Autowired
-	private FileClient fileClient;
-
-	@Autowired
-	private DBPictureRepository pictureRepository;
-
-	@Override
-	public List<DBPicture> save(List<File> files) {
-		List<DBPicture> pictures = new ArrayList<DBPicture>();
-		for (File file : files) {
-			try {
-				String fileUrl = fileClient.uploadImage(FileUtils.readFileToByteArray(file), file.length(),
-						FilenameUtils.getExtension(file.getName()), null);
-				pictures.add(new DBPicture(file.getName(), fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(file)));
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-		}
-		return pictureRepository.save(pictures);
-	}
-
-	@Override
-	public DBPicture save(File file) {
-		try {
-			String fileUrl = fileClient.uploadImage(FileUtils.readFileToByteArray(file), file.length(),
-					FilenameUtils.getExtension(file.getName()), null);
-			return pictureRepository.save(new DBPicture(file.getName(), fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(file)));
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-		return null;
-	}
-
-	@Override
-	public IPicture save(String fileName, byte[] fileBytes) {
-		String fileUrl = fileClient.uploadImage(fileBytes, fileBytes.length, FilenameUtils.getExtension(fileName), null);
-		return pictureRepository.save(new DBPicture(fileName, fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(fileBytes)));
-	}
+    @Autowired
+    private FileClient fileClient;
+
+    @Autowired
+    private DBPictureRepository pictureRepository;
+
+    @Override
+    public List<DBPicture> save(List<File> files) {
+        List<DBPicture> pictures = new ArrayList<DBPicture>();
+        for (File file : files) {
+            try {
+                HttpUtils.Response response = HttpUtils.upload(FileUrl.FILE_UPLOAD, file, null);
+                if (response.getStatusCode() == 200) {
+                    JSONObject obj = FastjsonUtils.parseObject(response.getResponseText());
+                    String fileUrl = (String) obj.get("path");
+                    pictures.add(new DBPicture(file.getName(), fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(file)));
+                } else {
+                    throw new IllegalStateException(response.getResponseText());
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return pictureRepository.save(pictures);
+    }
+
+    @Override
+    public DBPicture save(File file) {
+        try {
+            String fileUrl = fileClient.uploadImage(FileUtils.readFileToByteArray(file), file.length(),
+                    FilenameUtils.getExtension(file.getName()), null);
+            return pictureRepository.save(new DBPicture(file.getName(), fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(file)));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    @Override
+    public IPicture save(String fileName, byte[] fileBytes) {
+        String fileUrl = fileClient.uploadImage(fileBytes, fileBytes.length, FilenameUtils.getExtension(fileName), null);
+        return pictureRepository.save(new DBPicture(fileName, fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(fileBytes)));
+    }
+
+    @Override
+    public IPicture uploadFile(MultipartFile mf) throws Exception {
+        HttpUtils.Response response = HttpUtils.upload(FileUrl.FILE_UPLOAD, mf, null);
+        if (response.getStatusCode() == 200) {
+            JSONObject obj = FastjsonUtils.parseObject(response.getResponseText());
+
+            String fileName = mf.getOriginalFilename();
+            String fileUrl = (String) obj.get("path");
+            return pictureRepository.save(new DBPicture(fileName, fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(mf.getBytes())));
+        } else {
+            throw new IllegalStateException(response.getResponseText());
+        }
+    }
 
 }

+ 32 - 4
src/main/java/com/uas/platform/b2c/common/base/service/impl/FileServiceImpl.java

@@ -1,12 +1,17 @@
 package com.uas.platform.b2c.common.base.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.uas.dfs.service.FileClient;
+import com.uas.platform.b2c.common.base.constant.FileUrl;
 import com.uas.platform.b2c.common.base.model.FileUpload;
 import com.uas.platform.b2c.common.base.service.FileService;
+import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.b2c.core.utils.HttpUtils;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import org.apache.commons.io.FilenameUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.commons.CommonsMultipartFile;
 
 @Service
@@ -20,8 +25,32 @@ public class FileServiceImpl implements FileService {
 		CommonsMultipartFile file = fileUpload.getFile();
 		try {
 			// 上传到文件系统
-			return fileClient.upload(file.getBytes(), file.getSize(),
-					FilenameUtils.getExtension(file.getOriginalFilename()), null);
+			HttpUtils.Response response = HttpUtils.upload(FileUrl.FILE_UPLOAD, file, null);
+			if (response.getStatusCode() == 200) {
+				JSONObject obj = FastjsonUtils.parseObject(response.getResponseText());
+				String fileUrl = (String) obj.get("path");
+				return fileUrl;
+			} else {
+				throw new IllegalStateException(response.getResponseText());
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw new IllegalOperatorException("附件上传失败");
+		}
+	}
+
+	@Override
+	public String save(MultipartFile mf) {
+		try {
+            HttpUtils.Response response = HttpUtils.upload(FileUrl.FILE_UPLOAD, mf, null);
+            if (response.getStatusCode() == 200) {
+                JSONObject obj = FastjsonUtils.parseObject(response.getResponseText());
+
+                String fileUrl = (String) obj.get("path");
+                return fileUrl;
+            }else {
+                throw new IllegalStateException(response.getResponseText());
+            }
 		} catch (Exception e) {
 			e.printStackTrace();
 			throw new IllegalOperatorException("附件上传失败");
@@ -31,8 +60,7 @@ public class FileServiceImpl implements FileService {
 	@Override
 	public String save(String fileName, byte[] fileBytes) {
 		try {
-			String path = fileClient.upload(fileBytes, fileBytes.length, FilenameUtils.getExtension(fileName), null);
-			return path;
+            return fileClient.upload(fileBytes, fileBytes.length, FilenameUtils.getExtension(fileName), null);
 		} catch (Exception e) {
 			e.printStackTrace();
 			throw new IllegalOperatorException("附件上传失败");

+ 351 - 0
src/main/java/com/uas/platform/b2c/core/utils/HttpUtils.java

@@ -0,0 +1,351 @@
+package com.uas.platform.b2c.core.utils;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.http.Consts;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.entity.mime.content.FileBody;
+import org.apache.http.entity.mime.content.InputStreamBody;
+import org.apache.http.entity.mime.content.StringBody;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.*;
+import java.util.Map.Entry;
+
+public class HttpUtils {
+
+	/**
+	 * 发起POST、PUT请求
+	 * 
+	 * @param params
+	 * @return
+	 * @throws Exception
+	 */
+	public static Response get(String url, Map<String, Object> params) throws Exception {
+		CloseableHttpClient httpClient = HttpClients.createDefault();
+		HttpEntityEnclosingRequestBase request = null;
+		CloseableHttpResponse response = null;
+		try {
+			StringBuilder buf = new StringBuilder(url);
+			if (params != null && !params.isEmpty()) {
+				if (url.indexOf("?") == -1)
+					buf.append("?");
+				else if (!url.endsWith("&"))
+					buf.append("&");
+				Set<Entry<String, Object>> entrys = params.entrySet();
+				for (Entry<String, Object> entry : entrys) {
+					buf.append(entry.getKey()).append("=").append(URLEncoder.encode(String.valueOf(entry.getValue()), "UTF-8")).append("&");
+				}
+			}
+			request = new HttpPost(buf.toString());
+			response = httpClient.execute(request);
+			return Response.getResponse(response);
+		} finally {
+			request.releaseConnection();
+			try {
+				httpClient.close();
+			} catch (IOException e) {
+			}
+			if (response != null) {
+				try {
+					response.close();
+				} catch (IOException e) {
+				}
+			}
+		}
+	}
+
+	/**
+	 * 发起POST、PUT请求
+	 *
+	 * @param datas
+	 * @return
+	 * @throws Exception
+	 */
+	public static Response post(String url, Collection<?> datas) throws Exception {
+		CloseableHttpClient httpClient = HttpClients.createDefault();
+		HttpEntityEnclosingRequestBase request = new HttpPost(url);
+		CloseableHttpResponse response = null;
+		try {
+			if (datas != null && !datas.isEmpty()) {
+				request.setEntity(new StringEntity(FastjsonUtils.toJson(datas), ContentType.create("text/plain", Consts.UTF_8)));
+			}
+			response = httpClient.execute(request);
+			return Response.getResponse(response);
+		} finally {
+			request.releaseConnection();
+			try {
+				httpClient.close();
+			} catch (IOException e) {
+			}
+			if (response != null) {
+				try {
+					response.close();
+				} catch (IOException e) {
+				}
+			}
+		}
+	}
+
+	/**
+	 * 发起POST、PUT请求
+	 *
+	 * @param params
+	 * @return
+	 * @throws Exception
+	 */
+	public static Response post(String url, Map<String, String> params) throws Exception {
+		CloseableHttpClient httpClient = HttpClients.createDefault();
+		HttpEntityEnclosingRequestBase request = new HttpPost(url);
+		CloseableHttpResponse response = null;
+		try {
+			List<NameValuePair> nvps = new ArrayList<NameValuePair>();
+			if (params != null && !params.isEmpty()) {
+				Set<Entry<String, String>> entrys = params.entrySet();
+				for (Entry<String, String> entry : entrys) {
+					nvps.add(new BasicNameValuePair(entry.getKey(), URLEncoder.encode(entry.getValue(), "UTF-8")));
+				}
+			}
+			request.setEntity(new UrlEncodedFormEntity(nvps));
+			response = httpClient.execute(request);
+			return Response.getResponse(response);
+		} finally {
+			request.releaseConnection();
+			try {
+				httpClient.close();
+			} catch (IOException e) {
+			}
+			if (response != null) {
+				try {
+					response.close();
+				} catch (IOException e) {
+				}
+			}
+		}
+	}
+
+	/**
+	 * http上传文件
+	 * 
+	 * @param url
+	 *            请求地址
+	 * @param filePath
+	 *            附件路径
+	 * @param params
+	 *            参数
+	 * @return
+	 * @throws Exception
+	 * @throws IOException
+	 * @throws IllegalStateException
+	 */
+	public static Response upload(String url, String filePath, Map<String, String> params) throws IllegalStateException, IOException,
+			Exception {
+		CloseableHttpClient httpClient = null;
+		CloseableHttpResponse response = null;
+		try {
+			httpClient = HttpClients.createDefault();
+			HttpPost httpPost = new HttpPost(url);
+			FileBody fileBody = new FileBody(new File(filePath));
+			MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+			builder.addPart("file", fileBody);
+			if (params != null) {
+				for (String paramKey : params.keySet()) {
+					StringBody body = new StringBody(params.get(paramKey), ContentType.create("text/plain", Consts.UTF_8));
+					builder.addPart(paramKey, body);
+				}
+			}
+			HttpEntity reqEntity = builder.build();
+			httpPost.setEntity(reqEntity);
+			response = httpClient.execute(httpPost);
+			return Response.getResponse(response);
+		} finally {
+			try {
+				if (response != null) {
+					response.close();
+				}
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			try {
+				if (httpClient != null) {
+					httpClient.close();
+				}
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
+
+	/**
+	 * http上传文件
+	 *
+	 * @param url
+	 *            请求地址
+	 * @param file
+	 *            文件
+	 * @param params
+	 *            参数
+	 * @return
+	 * @throws Exception
+	 * @throws IOException
+	 * @throws IllegalStateException
+	 */
+	public static Response upload(String url, File file, Map<String, String> params) throws IllegalStateException, IOException,
+			Exception {
+		CloseableHttpClient httpClient = null;
+		CloseableHttpResponse response = null;
+		try {
+			httpClient = HttpClients.createDefault();
+			HttpPost httpPost = new HttpPost(url);
+			FileBody fileBody = new FileBody(file);
+			MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+			builder.addPart("file", fileBody);
+			if (params != null) {
+				for (String paramKey : params.keySet()) {
+					StringBody body = new StringBody(params.get(paramKey), ContentType.create("text/plain", Consts.UTF_8));
+					builder.addPart(paramKey, body);
+				}
+			}
+			HttpEntity reqEntity = builder.build();
+			httpPost.setEntity(reqEntity);
+			response = httpClient.execute(httpPost);
+			return Response.getResponse(response);
+		} finally {
+			try {
+				if (response != null) {
+					response.close();
+				}
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			try {
+				if (httpClient != null) {
+					httpClient.close();
+				}
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
+	/**
+	 * http上传文件
+	 *
+	 * @param url
+	 *            请求地址
+	 * @param multipartFile
+	 *            附件路径
+	 * @param params
+	 *            参数
+	 * @return
+	 * @throws Exception
+	 * @throws IOException
+	 * @throws IllegalStateException
+	 */
+	public static Response upload(String url, MultipartFile multipartFile, Map<String, String> params) throws IllegalStateException, IOException,
+			Exception {
+		CloseableHttpClient httpClient = null;
+		CloseableHttpResponse response = null;
+		try {
+			httpClient = HttpClients.createDefault();
+			HttpPost httpPost = new HttpPost(url);
+			InputStreamBody streamBody = new InputStreamBody(multipartFile.getInputStream(),
+				multipartFile.getOriginalFilename());
+			MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+			builder.addPart("file", streamBody);
+			if (params != null) {
+				for (String paramKey : params.keySet()) {
+					StringBody body = new StringBody(params.get(paramKey), ContentType.create("text/plain", Consts.UTF_8));
+					builder.addPart(paramKey, body);
+				}
+			}
+			HttpEntity reqEntity = builder.build();
+			httpPost.setEntity(reqEntity);
+			response = httpClient.execute(httpPost);
+			return Response.getResponse(response);
+		} finally {
+			try {
+				if (response != null) {
+					response.close();
+				}
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			try {
+				if (httpClient != null) {
+					httpClient.close();
+				}
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
+	/**
+	 * 下载
+	 * 
+	 * @param url
+	 * @return
+	 * @throws ClientProtocolException
+	 * @throws IOException
+	 */
+	public static InputStream download(String url) throws ClientProtocolException, IOException {
+		CloseableHttpClient httpClient = HttpClients.createDefault();
+		HttpGet httpGet = new HttpGet(url);
+		CloseableHttpResponse response = httpClient.execute(httpGet);
+		return response.getEntity().getContent();
+	}
+
+	public static class Response {
+		private int statusCode;
+		private String responseText;
+
+		public int getStatusCode() {
+			return statusCode;
+		}
+
+		public void setStatusCode(int statusCode) {
+			this.statusCode = statusCode;
+		}
+
+		public String getResponseText() {
+			return responseText;
+		}
+
+		public void setResponseText(String responseText) {
+			this.responseText = responseText;
+		}
+
+		public Response() {
+		}
+
+		public Response(HttpResponse response) throws IllegalStateException, IOException, Exception {
+			this.statusCode = response.getStatusLine().getStatusCode();
+			this.responseText = IOUtils.toString(response.getEntity().getContent());
+		}
+
+		public static Response getResponse(HttpResponse response) throws IllegalStateException, IOException, Exception {
+			if (response != null)
+				return new Response(response);
+			return null;
+		}
+	}
+}

+ 9 - 0
src/main/java/com/uas/platform/b2c/fa/settlement/dao/BillDao.java

@@ -36,6 +36,15 @@ public interface BillDao extends JpaSpecificationExecutor<Bill>, JpaRepository<B
      */
 	public List<Bill> getBillByUseruuAndDissociative(Long useruu, Integer dissociative);
 
+	/**
+	 * 根据个人UU号和是否个人用户获取指定类型发票
+	 * @param useruu
+	 * @param dissociative
+	 * @param kind
+	 * @return
+	 */
+	public List<Bill> getBillByUseruuAndDissociativeAndKind(Long useruu, Integer dissociative, Integer kind);
+
     /**
      * 根据个人UU号和企业UU号和发票类型(增值税专用 和 增值税普通)获取发票列表
      *

+ 2 - 1
src/main/java/com/uas/platform/b2c/prod/product/brand/controller/BrandController.java

@@ -40,7 +40,8 @@ public class BrandController {
 	 */
 	@RequestMapping(value = "/nameExist", method = RequestMethod.GET)
 	public List<BrandInfo> nameExist(Long id, String nameCn, String nameEn) {
-		return brandService.nameExsit(id, nameCn, nameEn);
+		List<BrandInfo> bs = brandService.nameExsit(id, nameCn, nameEn);
+		return bs;
 	}
 
 	/**

+ 10 - 1
src/main/java/com/uas/platform/b2c/prod/product/brand/service/impl/BrandSubmitServiceImpl.java

@@ -12,6 +12,10 @@ import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.ServiceCode;
 import com.uas.platform.core.model.Status;
+import com.uas.platform.core.persistence.criteria.CriterionExpression;
+import com.uas.platform.core.persistence.criteria.LogicalExpression;
+import com.uas.platform.core.persistence.criteria.PredicateUtils;
+import com.uas.platform.core.persistence.criteria.SimpleExpression;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -222,7 +226,12 @@ public class BrandSubmitServiceImpl implements BrandSubmitService {
 	@Override
 	public Page<BrandSubmit> findAllBrand(final PageInfo pageInfo, String keyword) {
 		if (StringUtils.hasText(keyword)) {
-			pageInfo.filter("nameEn", keyword, true);
+			SimpleExpression nameEn = new SimpleExpression("nameEn", keyword, CriterionExpression.Operator.LIKE);
+			SimpleExpression nameCn = new SimpleExpression("nameCn", keyword, CriterionExpression.Operator.LIKE);
+			SimpleExpression userName = new SimpleExpression("userModify.userName", keyword, CriterionExpression.Operator.LIKE);
+			SimpleExpression[] simpleExpressions = new SimpleExpression[]{nameEn, nameCn, userName};
+			LogicalExpression logicalExpression = PredicateUtils.or(simpleExpressions);
+			pageInfo.expression(logicalExpression);
 		}
 		return brandSubmitDao.findAll(new Specification<BrandSubmit>() {
 			@Override

+ 7 - 25
src/main/java/com/uas/platform/b2c/prod/store/model/Qualification.java

@@ -38,10 +38,10 @@ public class Qualification {
 	private Long uploaderUU;
 
 	/**
-	 * 店铺的UUID,在正式开店时,设置
+	 * 店铺的Id
 	 */
-	@Column(name = "qu_store_uuid")
-	private String storeUuid;
+	@Column(name = "qu_store_id")
+	private Long storeId;
 
 	/**
 	 * 证明编号
@@ -104,13 +104,6 @@ public class Qualification {
 	@Column(name = "qu_certification")
 	private Certification certification;
 
-	/**
-	 * 店铺的Id
-	 */
-	@Deprecated
-	@Column(name = "qu_store_id")
-	private String uuid;
-
 	/**
 	 * 序号
 	 */
@@ -200,15 +193,12 @@ public class Qualification {
 		this.remark = remark;
 	}
 
-	@Deprecated
-	public String getUuid() {
-		return uuid;
+	public Long getStoreId() {
+		return storeId;
 	}
 
-	@Deprecated
-	public Qualification setUuid(String uuid) {
-		this.uuid = uuid;
-		return this;
+	public void setStoreId(Long storeId) {
+		this.storeId = storeId;
 	}
 
 	@Deprecated
@@ -230,14 +220,6 @@ public class Qualification {
 		this.uploaderUU = uploaderUU;
 	}
 
-	public String getStoreUuid() {
-		return storeUuid;
-	}
-
-	public void setStoreUuid(String storeUuid) {
-		this.storeUuid = storeUuid;
-	}
-
 	public String getSerialNumber() {
 		return serialNumber;
 	}

+ 25 - 6
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreApplyServiceImpl.java

@@ -7,16 +7,12 @@ import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.UuidUtils;
 import com.uas.platform.b2c.prod.store.dao.StoreApplyDao;
 import com.uas.platform.b2c.prod.store.dao.StoreBrandInfoDao;
-import com.uas.platform.b2c.prod.store.model.EnterpriseSimple;
-import com.uas.platform.b2c.prod.store.model.Qualification;
-import com.uas.platform.b2c.prod.store.model.StoreApply;
-import com.uas.platform.b2c.prod.store.model.StoreBrandInfo;
-import com.uas.platform.b2c.prod.store.model.StoreIn;
-import com.uas.platform.b2c.prod.store.model.StoreType;
+import com.uas.platform.b2c.prod.store.model.*;
 import com.uas.platform.b2c.prod.store.service.StoreApplyService;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
+import com.uas.platform.core.exception.IllegalStatusException;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.persistence.criteria.CriterionExpression;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
@@ -33,6 +29,7 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import java.util.Date;
+import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -71,6 +68,28 @@ public class StoreApplyServiceImpl implements StoreApplyService {
 				&& StoreType.ORIGINAL_FACTORY != storeApply.getType()) {
 			return new ResultMap(CodeType.ERROR_STATE, "请选择正确的的店铺类型");
 		}
+		// 处理并验证资质证明信息
+		List<Qualification> qualificationList = storeApply.getQualifications();
+		if (CollectionUtils.isEmpty(qualificationList)) {
+			throw new IllegalStatusException("请上传营业执照信息");
+		}
+		boolean reasonable = false;
+		Iterator<Qualification> iterator = qualificationList.iterator();
+		while (iterator.hasNext()) {
+			Qualification qualification = iterator.next();
+			if (StringUtils.isEmpty(qualification.getResourceUrl())) {
+				iterator.remove();
+				continue;
+			}
+			if (QualificationType.BUSINESS_LICENSE == qualification.getType()) {
+				reasonable = true;
+			}
+		}
+		storeApply.setQualifications(qualificationList);
+		// 验证是否上传营业执照信息
+		if (!reasonable) {
+			throw new IllegalStatusException("请上传营业执照信息");
+		}
 
 		User user  = SystemSession.getUser();
 		if (user == null || user.getEnterprise() == null) {

+ 0 - 1
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java

@@ -122,7 +122,6 @@ public class StoreInServiceImpl implements StoreInService {
 		List<Qualification> qualifications = storeApply.getQualifications();
 		Set<Qualification> qualificationsSet = new HashSet<>();
 		for (Qualification qualification : qualifications) {
-			qualification.setStoreUuid(store.getUuid());
 			qualificationsSet.add(qualification);
 		}
 		store.setQualifications(qualificationsSet);

+ 9 - 0
src/main/java/com/uas/platform/b2c/trade/order/controller/OrderController.java

@@ -892,4 +892,13 @@ public class OrderController {
 		String orderid = StringUtilB2C.decodeValue(enOrderid);
 		return orderService.getStatusByOrid(orderid);
 	}
+
+	/**
+	 * 根据店铺uuid验证是否包含寄售店铺
+	 * @return
+	 */
+	@RequestMapping(value = "/consignment", method = RequestMethod.POST)
+	public ResultMap checkConsignment(@RequestBody List<String> uuidArray){
+		return orderService.checkConsignment(uuidArray);
+	}
 }

+ 7 - 0
src/main/java/com/uas/platform/b2c/trade/order/service/OrderService.java

@@ -605,4 +605,11 @@ public interface OrderService {
 	 * @return
 	 */
 	Order updateByDetail(Order order);
+
+	/**
+	 * 根据uuid来判断是否包含寄售店铺
+	 * @param uuidArray
+	 * @return
+	 */
+	ResultMap checkConsignment(List<String> uuidArray);
 }

+ 52 - 0
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -813,6 +813,7 @@ public class OrderServiceImpl implements OrderService {
             or.setSellCompanyArea(enterprise.getEnArea());
             or.setSellCompanyAddress(enterprise.getEnAddress());
             or.setOrderDetails(newOrderDetails);
+            updateOrderBill(or);
             or.setOrderid(createNumberService.generateOrderNumber(EncodingRulesConstant.ORDER, "trade$order", 8));
             orders.add(or);
         }
@@ -826,6 +827,45 @@ public class OrderServiceImpl implements OrderService {
         return ResultMap.success(orderList);
     }
 
+    /**
+     * 调整订单的发票类型
+     * 寄售类型,若选择普票(没有专票信息,修改为不开票。有则修改成专票)
+     * @param order
+     */
+    public void updateOrderBill(Order order){
+        if (sysConf.getStoreid().equals(order.getStoreid())){ //如果是寄售类型的订单
+            if (order.getInvoiceid() != null && order.getInvoicetype() == Type.Bill_NoDeduct.value()){ //发票为普票
+                //将普票类型修改为专票
+                List<Bill> billOne;
+                if (SystemSession.getUser().getEnterprise() != null){
+                    billOne = billDao.getBillByUseruuAndEnuuAndKind(SystemSession.getUser().getUserUU(),
+                            SystemSession.getUser().getEnterprise().getUu(), Type.Bill_Deduct.value());
+                }else {
+                    billOne = billDao.getBillByUseruuAndDissociativeAndKind(SystemSession.getUser().getUserUU(),
+                            Type.PERSONAL.value(), Type.Bill_Deduct.value());
+                }
+                if (CollectionUtils.isEmpty(billOne)){
+                    //没有专票信息,则修改成暂不开票
+                    order.setInvoicetype(Type.Bill_No.value());
+                    order.setInvoiceid(null);
+                    order.setInvoicetitle(null);
+                    order.setInvoiceAddress(null);
+                    order.setVatBillStatus(Status.NEEDNO_BILL.value()); // 不需要开票
+                    Set<OrderDetail> orderDetails = order.getOrderDetails();
+                    for (OrderDetail orderDetail : orderDetails) {
+                        orderDetail.setBillStatus(Status.NEEDNO_BILL.value());
+                    }
+                }else {
+                    Bill bill = billOne.get(0);
+                    order.setInvoicetype(Type.Bill_Deduct.value());
+                    order.setInvoiceid(bill.getId());
+                    order.setInvoicetitle(bill.getHead());
+                    order.setInvoiceAddress(FastjsonUtils.toJson(bill));
+                }
+            }
+        }
+    }
+
     /**
      * <h1>将orderInfos的信息封装进Order的List集合中,便于操作。</h1>
      *
@@ -3100,4 +3140,16 @@ public class OrderServiceImpl implements OrderService {
         order.setCmpQty(cmps.size());// 型号数量
         return order;
     }
+
+    @Override
+    public ResultMap checkConsignment(List<String> uuidArray) {
+        Boolean bool = false;
+        for (String uuid : uuidArray){
+            if (sysConf.getStoreid().equals(uuid)){
+                bool = true;
+                break;
+            }
+        }
+        return ResultMap.success(bool);
+    }
 }

+ 1 - 0
src/main/webapp/resources/css/user/user.css

@@ -1034,6 +1034,7 @@ body {
 
 .oder_list dl .line01 img {
     margin-right: 5px;
+    margin-bottom: 5px;
     vertical-align: middle;
 }
 

+ 5 - 0
src/main/webapp/resources/js/common/query/order.js

@@ -76,6 +76,11 @@ define([ 'ngResource' ], function() {
                 method : 'PUT',
                 isArray : false
             },
+            //判断是否包含寄售类型产品
+            checkConsignment: {
+                url : 'trade/order/consignment',
+                method : 'POST'
+            },
             /**
              * 平台查看
              */

+ 212 - 1
src/main/webapp/resources/js/prod/controllers/OrderEnsureCtrl.js

@@ -1147,7 +1147,7 @@ define([ 'app/app' ], function(app) {
 	app.register.controller('BillInputCtrl', ['$scope', '$http', 'BaseService', 'Bill', 'toaster', '$stateParams', '$state', 'invoiceInfo', '$upload', '$modalInstance', function($scope, $http, BaseService, Bill, toaster, $stateParams, $state, invoiceInfo, $upload, $modalInstance) {
 		//BaseService.scrollBackToTop();
 		
-		$scope.bill = {};
+		/*$scope.bill = {};
 		$scope.bill.address = {};
 		$scope.bill.is_agree = true;
 		$scope.bill.kind = 1206;
@@ -1234,6 +1234,217 @@ define([ 'app/app' ], function(app) {
 		
 		$scope.exit = function() {
 			$modalInstance.dismiss();
+		}*/
+
+		$scope.bill = {};
+		$scope.invoiceType = Number(invoiceInfo.split("-")[0]);
+		if(invoiceInfo.split("-").length == 2) {
+			$scope.invoiceId = Number(invoiceInfo.split("-")[1]);
+		}
+		$scope.isSpecial = true; //专票,等于true为不存在
+		$scope.isNormal = true; //普票,等于true为不存在
+		// 获取发票信息方法	1205为增值税专用发票	1206为增值税普通发票	1207为不开发票
+
+		$scope.setType = function() {
+			switch($scope.invoiceType) {
+				case 1206:
+					$scope.bill.kind = 1206;
+					$scope.isNormal = true;
+					$scope.isSpecial = false; break;
+				case 1205:
+					$scope.bill.kind = 1205;
+					$scope.isNormal = false;
+					$scope.isSpecial = true; break;
+				default:
+					$scope.isNormal = true;
+					$scope.isSpecial = true;
+			}
+		};
+
+		$scope.setType();
+
+		$scope.getData = function() {
+			if($scope.invoiceId) {
+				Bill.getBillById({id: $scope.invoiceId}, function(data) {
+					$scope.bill = data;
+					if($scope.bill.kind == 1205) {
+						$scope.isNormal = false;
+					}else {
+						$scope.isSpecial = false;
+					}
+					$http.get('static/js/prod/data/city.json').success(function(data) {
+						$scope.division = data;
+						if($scope.bill.area){
+							$scope.bill.address = {};
+							//拼装下拉选择框
+							var arr = $scope.bill.area.split(',');
+							$scope.bill.address.province = arr[0];
+							$scope.bill.address.city = arr[1];
+							$scope.bill.address.district = arr[2];
+						}
+					}).error(function(e) {
+						toaster.pop('error', '系统错误 ' + '加载城市信息失败, 请重新加载界面!');
+					});
+					$scope.bill.is_agree = true;
+				}, function(response) {
+					toaster.pop('error', '获取指定的发票信息失败');
+				});
+			}else {
+				$http.get('static/js/prod/data/city.json').success(function(data) {
+					$scope.division = data;
+				}).error(function(e) {
+					toaster.pop('error', '系统错误 ' + '加载城市信息失败');
+				});
+			}
+		};
+		$scope.getData();
+
+		$scope.bill.address = {};
+
+		//保存发票信息
+		$scope.saveBill = function(flag) {
+			var dataValidFlag = $scope.checkValidFrom();
+			if (!flag && dataValidFlag && $scope.bill.is_agree) {
+				if (!$scope.isAdd) { //修改
+					doSave('修改发票信息');
+				} else { // 新增
+					doSave('添加发票');
+				}
+			} else if (flag || !dataValidFlag) {
+				toaster.pop('error', '请填写正确的发票信息');
+			} else {
+				toaster.pop('error', '请勾选并阅读《发票须知》');
+			}
+		};
+		var doSave = function (message) {
+			$scope.bill.area = $scope.bill.address.province + "," + $scope.bill.address.city + "," + $scope.bill.address.district;
+			var file = null;
+			if($scope.bill.billInfo&&$scope.bill.billInfo[0]) {
+				file = $scope.bill.billInfo[0];
+			}
+			$upload.upload({
+				url: 'trade/bill/save',
+				file: file,
+				method: 'POST',
+				data: {
+					bill: $scope.bill
+				}
+			}).success(function(data){
+				toaster.pop('success', message + '成功');
+				$modalInstance.close(data);
+			}).error(function(data){
+				toaster.pop('error', message + '失败');
+			});
+		}
+
+		$scope.isDoUpload = false;
+		//上传发票许可证
+		$scope.onUploadPermission = function () {
+			$scope.isDoUpload = true;
+			if (event.target.files[0].size < 3*1024*1024) {
+				$scope.bill.attachUrl = event.target.files[0].name;
+			} else {
+				$scope.bill.attachUrl = '';
+			}
+		}
+
+		//判断中文字符串的长度
+		var getRealStringLen = function (str) {
+			var realLength = 0, len = str.length, charCode = -1;
+			for (var i = 0; i < len; i++) {
+				charCode = str.charCodeAt(i);
+				if (charCode >= 0 && charCode <= 128) realLength += 1;
+				else realLength += 2;
+			}
+			return realLength;
+		}
+
+		$scope.validForm = {
+			validBillHead: true,
+			validBillName: true,
+			validBankName: true,
+			validDetailAddress: true,
+			validCompanyAddress: true
+		}
+
+		$scope.initFormFlag = function () {
+			$scope.initFlag = {
+				initBillHead: true,
+				initBillName: true,
+				initBankName: true,
+				initDetailAddress: true,
+				initCompanyAddress: true,
+				initCompanyPhone: true,
+				initCompanyTaxNum: true,
+				initBankAccount: true,
+				initTelephone: true
+			}
+		}
+
+		$scope.initFormFlag();
+
+		$scope.checkValidFrom = function () {
+			var flag = true
+			angular.forEach($scope.validForm, function (item) {
+				if (!item) {
+					flag = false;
+				}
+			})
+			return flag;
+		}
+		$scope.checkValidFrom();
+		//发票抬头check
+		$scope.checkBillHead = function () {
+			var len = getRealStringLen($scope.bill.head);
+			if (len > 100) {
+				$scope.validForm.validBillHead = false;
+			} else {
+				$scope.validForm.validBillHead = true;
+			}
+		}
+
+		//收票人check
+		$scope.checkBillName = function () {
+			var len = getRealStringLen($scope.bill.name);
+			if (len > 20) {
+				$scope.validForm.validBillName = false;
+			} else {
+				$scope.validForm.validBillName = true;
+			}
+		}
+
+		//开户银行Check
+		$scope.checkBankName = function () {
+			var len = getRealStringLen($scope.bill.bankName);
+			if (len > 60) {
+				$scope.validForm.validBankName = false;
+			} else {
+				$scope.validForm.validBankName = true;
+			}
+		}
+
+		//详细地址Check
+		$scope.checkDetailAddress = function () {
+			var len = getRealStringLen($scope.bill.detailAddress);
+			if (len > 60) {
+				$scope.validForm.validDetailAddress = false;
+			} else {
+				$scope.validForm.validDetailAddress = true;
+			}
+		}
+
+		//单位地址check
+		$scope.checkCompanyAddress = function () {
+			var len = getRealStringLen($scope.bill.companyAddress);
+			if (len > 100) {
+				$scope.validForm.validCompanyAddress = false;
+			} else {
+				$scope.validForm.validCompanyAddress = true;
+			}
+		}
+
+		$scope.exitEdit = function () {
+			$modalInstance.dismiss();
 		}
 		
 	}]);

+ 212 - 1
src/main/webapp/resources/js/prod/controllers/OrderEnsureCtrlWithMultiCurrency.js

@@ -1057,7 +1057,7 @@ define([ 'app/app' ], function(app) {
 	app.register.controller('BillInputCtrl', ['$scope', '$http', 'BaseService', 'Bill', 'toaster', '$stateParams', '$state', 'invoiceInfo', '$upload', '$modalInstance', function($scope, $http, BaseService, Bill, toaster, $stateParams, $state, invoiceInfo, $upload, $modalInstance) {
 		//BaseService.scrollBackToTop();
 		
-		$scope.bill = {};
+		/*$scope.bill = {};
 		$scope.bill.address = {};
 		$scope.bill.is_agree = true;
 		$scope.bill.kind = 1206;
@@ -1144,6 +1144,217 @@ define([ 'app/app' ], function(app) {
 		
 		$scope.exit = function() {
 			$modalInstance.dismiss();
+		}*/
+
+		$scope.bill = {};
+		$scope.invoiceType = Number(invoiceInfo.split("-")[0]);
+		if(invoiceInfo.split("-").length == 2) {
+			$scope.invoiceId = Number(invoiceInfo.split("-")[1]);
+		}
+		$scope.isSpecial = true; //专票,等于true为不存在
+		$scope.isNormal = true; //普票,等于true为不存在
+		// 获取发票信息方法	1205为增值税专用发票	1206为增值税普通发票	1207为不开发票
+
+		$scope.setType = function() {
+			switch($scope.invoiceType) {
+				case 1206:
+					$scope.bill.kind = 1206;
+					$scope.isNormal = true;
+					$scope.isSpecial = false; break;
+				case 1205:
+					$scope.bill.kind = 1205;
+					$scope.isNormal = false;
+					$scope.isSpecial = true; break;
+				default:
+					$scope.isNormal = true;
+					$scope.isSpecial = true;
+			}
+		};
+
+		$scope.setType();
+
+		$scope.getData = function() {
+			if($scope.invoiceId) {
+				Bill.getBillById({id: $scope.invoiceId}, function(data) {
+					$scope.bill = data;
+					if($scope.bill.kind == 1205) {
+						$scope.isNormal = false;
+					}else {
+						$scope.isSpecial = false;
+					}
+					$http.get('static/js/prod/data/city.json').success(function(data) {
+						$scope.division = data;
+						if($scope.bill.area){
+							$scope.bill.address = {};
+							//拼装下拉选择框
+							var arr = $scope.bill.area.split(',');
+							$scope.bill.address.province = arr[0];
+							$scope.bill.address.city = arr[1];
+							$scope.bill.address.district = arr[2];
+						}
+					}).error(function(e) {
+						toaster.pop('error', '系统错误 ' + '加载城市信息失败, 请重新加载界面!');
+					});
+					$scope.bill.is_agree = true;
+				}, function(response) {
+					toaster.pop('error', '获取指定的发票信息失败');
+				});
+			}else {
+				$http.get('static/js/prod/data/city.json').success(function(data) {
+					$scope.division = data;
+				}).error(function(e) {
+					toaster.pop('error', '系统错误 ' + '加载城市信息失败');
+				});
+			}
+		};
+		$scope.getData();
+
+		$scope.bill.address = {};
+
+		//保存发票信息
+		$scope.saveBill = function(flag) {
+			var dataValidFlag = $scope.checkValidFrom();
+			if (!flag && dataValidFlag && $scope.bill.is_agree) {
+				if (!$scope.isAdd) { //修改
+					doSave('修改发票信息');
+				} else { // 新增
+					doSave('添加发票');
+				}
+			} else if (flag || !dataValidFlag) {
+				toaster.pop('error', '请填写正确的发票信息');
+			} else {
+				toaster.pop('error', '请勾选并阅读《发票须知》');
+			}
+		};
+		var doSave = function (message) {
+			$scope.bill.area = $scope.bill.address.province + "," + $scope.bill.address.city + "," + $scope.bill.address.district;
+			var file = null;
+			if($scope.bill.billInfo&&$scope.bill.billInfo[0]) {
+				file = $scope.bill.billInfo[0];
+			}
+			$upload.upload({
+				url: 'trade/bill/save',
+				file: file,
+				method: 'POST',
+				data: {
+					bill: $scope.bill
+				}
+			}).success(function(data){
+				toaster.pop('success', message + '成功');
+				$modalInstance.close(data);
+			}).error(function(data){
+				toaster.pop('error', message + '失败');
+			});
+		}
+
+		$scope.isDoUpload = false;
+		//上传发票许可证
+		$scope.onUploadPermission = function () {
+			$scope.isDoUpload = true;
+			if (event.target.files[0].size < 3*1024*1024) {
+				$scope.bill.attachUrl = event.target.files[0].name;
+			} else {
+				$scope.bill.attachUrl = '';
+			}
+		}
+
+		//判断中文字符串的长度
+		var getRealStringLen = function (str) {
+			var realLength = 0, len = str.length, charCode = -1;
+			for (var i = 0; i < len; i++) {
+				charCode = str.charCodeAt(i);
+				if (charCode >= 0 && charCode <= 128) realLength += 1;
+				else realLength += 2;
+			}
+			return realLength;
+		}
+
+		$scope.validForm = {
+			validBillHead: true,
+			validBillName: true,
+			validBankName: true,
+			validDetailAddress: true,
+			validCompanyAddress: true
+		}
+
+		$scope.initFormFlag = function () {
+			$scope.initFlag = {
+				initBillHead: true,
+				initBillName: true,
+				initBankName: true,
+				initDetailAddress: true,
+				initCompanyAddress: true,
+				initCompanyPhone: true,
+				initCompanyTaxNum: true,
+				initBankAccount: true,
+				initTelephone: true
+			}
+		}
+
+		$scope.initFormFlag();
+
+		$scope.checkValidFrom = function () {
+			var flag = true
+			angular.forEach($scope.validForm, function (item) {
+				if (!item) {
+					flag = false;
+				}
+			})
+			return flag;
+		}
+		$scope.checkValidFrom();
+		//发票抬头check
+		$scope.checkBillHead = function () {
+			var len = getRealStringLen($scope.bill.head);
+			if (len > 100) {
+				$scope.validForm.validBillHead = false;
+			} else {
+				$scope.validForm.validBillHead = true;
+			}
+		}
+
+		//收票人check
+		$scope.checkBillName = function () {
+			var len = getRealStringLen($scope.bill.name);
+			if (len > 20) {
+				$scope.validForm.validBillName = false;
+			} else {
+				$scope.validForm.validBillName = true;
+			}
+		}
+
+		//开户银行Check
+		$scope.checkBankName = function () {
+			var len = getRealStringLen($scope.bill.bankName);
+			if (len > 60) {
+				$scope.validForm.validBankName = false;
+			} else {
+				$scope.validForm.validBankName = true;
+			}
+		}
+
+		//详细地址Check
+		$scope.checkDetailAddress = function () {
+			var len = getRealStringLen($scope.bill.detailAddress);
+			if (len > 60) {
+				$scope.validForm.validDetailAddress = false;
+			} else {
+				$scope.validForm.validDetailAddress = true;
+			}
+		}
+
+		//单位地址check
+		$scope.checkCompanyAddress = function () {
+			var len = getRealStringLen($scope.bill.companyAddress);
+			if (len > 100) {
+				$scope.validForm.validCompanyAddress = false;
+			} else {
+				$scope.validForm.validCompanyAddress = true;
+			}
+		}
+
+		$scope.exitEdit = function () {
+			$modalInstance.dismiss();
 		}
 		
 	}]);

+ 145 - 49
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_home_ctrl.js

@@ -96,6 +96,13 @@ define(['app/app', 'calendar'], function(app) {
                     },
                     addr : function(){
                         return angular.copy(addr);
+                    },
+                    isModify : function () {
+                        if (addr){
+                            return true;
+                        }else {
+                            return false;
+                        }
                     }
                 }
             }).result.then(function(address){
@@ -194,12 +201,13 @@ define(['app/app', 'calendar'], function(app) {
     }]);
 
     //地址编辑模态框
-    app.register.controller('editAddrHomeCtrl', ['$scope', 'isSetTop', 'addr', '$modalInstance', 'toaster', '$http', 'ShippingAddress', function($scope, isSetTop, addr, $modalInstance, toaster, $http, ShippingAddress){
+    app.register.controller('editAddrHomeCtrl', ['$scope', 'isSetTop', 'isModify', 'addr', '$modalInstance', 'toaster', '$http', 'ShippingAddress', function($scope, isSetTop, isModify, addr, $modalInstance, toaster, $http, ShippingAddress){
         if (addr){
             $scope.isSetTop = addr.num == 1;
         }else {
             $scope.isSetTop = isSetTop;
         }
+        $scope.isModify = isModify;
         //验证数据
         $scope.checkeds = {};
 
@@ -207,7 +215,7 @@ define(['app/app', 'calendar'], function(app) {
             var size;
             if(num == 1) {
                 if ($scope.address.name){
-                    size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+                    size = $scope.address.name.replace(/[^\x00-\xff]/g,'**').length;
                     if (size > 20) {
                         console.log(size);
                         $scope.userError = true;
@@ -217,7 +225,7 @@ define(['app/app', 'calendar'], function(app) {
                 }
             } else if(num == 2) {
                 if ($scope.address.tel){
-                    size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+                    size = $scope.address.tel.replace(/[^\x00-\xff]/g,'**').length;
                     if (size < 8 || size > 11) {
                         $scope.telError = true;
                         return;
@@ -232,7 +240,7 @@ define(['app/app', 'calendar'], function(app) {
                 }
             } else if(num == 3) {
                 if ($scope.address.detailAddress){
-                    size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+                    size = $scope.address.detailAddress.replace(/[^\x00-\xff]/g,'**').length;
                     if (size > 60) {
                         $scope.addrError = true;
                         return;
@@ -303,18 +311,16 @@ define(['app/app', 'calendar'], function(app) {
 
     // 发票编辑模态框
     app.register.controller('BillInputCtrl', ['$scope', '$http', 'BaseService', 'Bill', 'toaster', '$stateParams', '$state', 'invoiceInfo', '$upload', '$modalInstance', function($scope, $http, BaseService, Bill, toaster, $stateParams, $state, invoiceInfo, $upload, $modalInstance) {
-        //BaseService.scrollBackToTop();
 
-        $scope.bill = {};
-        $scope.bill.address = {};
-        $scope.bill.is_agree = true;
-        $scope.bill.kind = 1206;
-        $scope.isNormal = true;
-        $scope.isSpecial = true;
+       $scope.bill = {};
         $scope.invoiceType = Number(invoiceInfo.split("-")[0]);
         if(invoiceInfo.split("-").length == 2) {
             $scope.invoiceId = Number(invoiceInfo.split("-")[1]);
         }
+        $scope.isSpecial = true; //专票,等于true为不存在
+        $scope.isNormal = true; //普票,等于true为不存在
+        // 获取发票信息方法	1205为增值税专用发票	1206为增值税普通发票	1207为不开发票
+
         $scope.setType = function() {
             switch($scope.invoiceType) {
                 case 1206:
@@ -333,39 +339,6 @@ define(['app/app', 'calendar'], function(app) {
 
         $scope.setType();
 
-        $scope.linkmanLen = function(num) {
-            var size;
-            if (num == 1){
-                size = document.getElementById("mpbillname").value.length;
-            }else if (num == 2){
-                size = document.getElementById("mzbillname").value.length;
-            }
-            console.log(size);
-            if (size > 10) {
-                $scope.linkError = true;
-                console.log($scope.linkError);
-                return;
-            }
-            $scope.linkError = false;
-            console.log($scope.linkError);
-        }
-        $scope.addressLen = function(num) {
-            var size;
-            if (num == 1){
-                size = document.getElementById("mpaddress").value.length;
-            }else if (num == 2){
-                size = document.getElementById("mzaddress").value.length;
-            }
-            console.log(size);
-            if (size > 30) {
-                $scope.addressError = true;
-                console.log($scope.addressError);
-                return;
-            }
-            $scope.addressError = false;
-            console.log($scope.addressError);
-        }
-
         $scope.getData = function() {
             if($scope.invoiceId) {
                 Bill.getBillById({id: $scope.invoiceId}, function(data) {
@@ -402,7 +375,24 @@ define(['app/app', 'calendar'], function(app) {
         };
         $scope.getData();
 
-        $scope.saveBill = function() {
+        $scope.bill.address = {};
+
+        //保存发票信息
+        $scope.saveBill = function(flag) {
+            var dataValidFlag = $scope.checkValidFrom();
+            if (!flag && dataValidFlag && $scope.bill.is_agree) {
+                if (!$scope.isAdd) { //修改
+                    doSave('修改发票信息');
+                } else { // 新增
+                    doSave('添加发票');
+                }
+            } else if (flag || !dataValidFlag) {
+                toaster.pop('error', '请填写正确的发票信息');
+            } else {
+                toaster.pop('error', '请勾选并阅读《发票须知》');
+            }
+        };
+        var doSave = function (message) {
             $scope.bill.area = $scope.bill.address.province + "," + $scope.bill.address.city + "," + $scope.bill.address.district;
             var file = null;
             if($scope.bill.billInfo&&$scope.bill.billInfo[0]) {
@@ -416,14 +406,120 @@ define(['app/app', 'calendar'], function(app) {
                     bill: $scope.bill
                 }
             }).success(function(data){
-                toaster.pop('success', '保存发票信息成功');
+                toaster.pop('success', message + '成功');
                 $modalInstance.close(data);
             }).error(function(data){
-                toaster.pop('error', '保存发票信息失败');
+                toaster.pop('error', message + '失败');
             });
-        };
+        }
+
+        $scope.isDoUpload = false;
+        //上传发票许可证
+        $scope.onUploadPermission = function () {
+            $scope.isDoUpload = true;
+            if (event.target.files[0].size < 3*1024*1024) {
+                $scope.bill.attachUrl = event.target.files[0].name;
+            } else {
+                $scope.bill.attachUrl = '';
+            }
+        }
+
+        //判断中文字符串的长度
+        var getRealStringLen = function (str) {
+            var realLength = 0, len = str.length, charCode = -1;
+            for (var i = 0; i < len; i++) {
+                charCode = str.charCodeAt(i);
+                if (charCode >= 0 && charCode <= 128) realLength += 1;
+                else realLength += 2;
+            }
+            return realLength;
+        }
+
+        $scope.validForm = {
+            validBillHead: true,
+            validBillName: true,
+            validBankName: true,
+            validDetailAddress: true,
+            validCompanyAddress: true
+        }
+
+        $scope.initFormFlag = function () {
+            $scope.initFlag = {
+                initBillHead: true,
+                initBillName: true,
+                initBankName: true,
+                initDetailAddress: true,
+                initCompanyAddress: true,
+                initCompanyPhone: true,
+                initCompanyTaxNum: true,
+                initBankAccount: true,
+                initTelephone: true
+            }
+        }
+
+        $scope.initFormFlag();
+
+        $scope.checkValidFrom = function () {
+            var flag = true
+            angular.forEach($scope.validForm, function (item) {
+                if (!item) {
+                    flag = false;
+                }
+            })
+            return flag;
+        }
+        $scope.checkValidFrom();
+        //发票抬头check
+        $scope.checkBillHead = function () {
+            var len = getRealStringLen($scope.bill.head);
+            if (len > 100) {
+                $scope.validForm.validBillHead = false;
+            } else {
+                $scope.validForm.validBillHead = true;
+            }
+        }
+
+        //收票人check
+        $scope.checkBillName = function () {
+            var len = getRealStringLen($scope.bill.name);
+            if (len > 20) {
+                $scope.validForm.validBillName = false;
+            } else {
+                $scope.validForm.validBillName = true;
+            }
+        }
+
+        //开户银行Check
+        $scope.checkBankName = function () {
+            var len = getRealStringLen($scope.bill.bankName);
+            if (len > 60) {
+                $scope.validForm.validBankName = false;
+            } else {
+                $scope.validForm.validBankName = true;
+            }
+        }
+
+        //详细地址Check
+        $scope.checkDetailAddress = function () {
+            var len = getRealStringLen($scope.bill.detailAddress);
+            if (len > 60) {
+                $scope.validForm.validDetailAddress = false;
+            } else {
+                $scope.validForm.validDetailAddress = true;
+            }
+        }
+
+        //单位地址check
+        $scope.checkCompanyAddress = function () {
+            var len = getRealStringLen($scope.bill.companyAddress);
+            if (len > 100) {
+                $scope.validForm.validCompanyAddress = false;
+            } else {
+                $scope.validForm.validCompanyAddress = true;
+            }
+        }
 
-        $scope.exit = function() {
+        $scope.exitEdit = function () {
             $modalInstance.dismiss();
         }
 

+ 217 - 43
src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js

@@ -446,8 +446,45 @@ define(['app/app'], function(app) {
 			});
 			return value;
 		};
+		//检查是否选择了寄售商品,选择了发票却没有完善专票信息
+		var checkBill = function () {
+			if($scope.order.invoicetype != '1207') {
+				if($scope.hideNormal){
+					var bill = getSpecial();
+					if(!bill.id) {
+						return false;
+					}
+				}
+			}
+			return true;
+		};
+
+		var getSpecial = function () {
+			var billSpecial = {};
+			angular.forEach($scope.bills, function (bill) {
+				if (bill.kind == '1205'){
+					billSpecial = bill;
+				}
+			});
+			return billSpecial;
+		};
+
+		$scope.cancelFrame = function () {
+			$scope.showBillFrame = false;
+		};
+
+		$scope.perfectLater = function () {
+			$scope.showBillFrame = false;
+			$scope.imperfect = true;
+		};
+
+		$scope.goToBillPage = function () {
+			$scope.showBillFrame = false;
+			window.open("user#/invoice", '_self');
+		};
 
 		//确认付款
+		$scope.imperfect = false;//暂不完善
 		$scope.confirmPay = function() {
 			if($scope.order.status == 502 || $scope.order.status == 503) {
 				var arr = [];
@@ -481,6 +518,14 @@ define(['app/app'], function(app) {
 				return ;
 			}
 			orderInfos.push(orderInfo);
+			if(!$scope.imperfect){
+				var validBill = checkBill();
+				if (!validBill){
+					// toaster.pop('info', '请完善专票信息');
+					$scope.showBillFrame = true;
+					return ;
+				}
+			}
 
 			Order.ensure({orderid: enIdFilter($scope.order.orderid)}, orderInfos, function(data){
 				if(data.code == 1) {
@@ -661,10 +706,23 @@ define(['app/app'], function(app) {
 
 			//获取地址的信息
 			$scope.loadShippingAddress();
+			checkStoreType();
 			//发票的信息
 			getBillInfo();
 		};
 
+		var checkStoreType = function () {
+			var uuidArray = [];
+			angular.forEach($scope.storeArray, function (store) {
+				uuidArray.push(store.uuid);
+			});
+			Order.checkConsignment({}, uuidArray, function (data) {
+				if (data){
+					$scope.hideNormal = data.data;
+				}
+			})
+		};
+
 		/**********************************************************************
 		 * 地址信息管理
 		 **********************************************************************/
@@ -917,44 +975,13 @@ define(['app/app'], function(app) {
 
 	// 发票编辑模态框
 	app.register.controller('BillInputCtrl', ['$scope', '$http', 'BaseService', 'Bill', 'toaster', '$stateParams', '$state', 'invoice', '$upload', '$modalInstance', '$q', function($scope, $http, BaseService, Bill, toaster, $stateParams, $state, invoice, $upload, $modalInstance, $q) {
-		//BaseService.scrollBackToTop();
 
-		$scope.bill = {};
-		$scope.bill.address = {};
-		$scope.bill.is_agree = true;
-		$scope.bill.kind = 1206;
-		$scope.isNormal = true;
-		$scope.isSpecial = true;
 		$scope.invoiceType = invoice.kind;
-		$scope.setType = function() {
-			switch($scope.invoiceType) {
-				case 1206:
-					$scope.bill.kind = 1206;
-					$scope.isNormal = true;
-					$scope.isSpecial = false; break;
-				case 1205:
-					$scope.bill.kind = 1205;
-					$scope.isNormal = false;
-					$scope.isSpecial = true; break;
-				default:
-					$scope.isNormal = true;
-					$scope.isSpecial = true;
-			}
-		};
-
-		$scope.setType();
-
-		//获取城市信息的数据
-		var getCityData = function () {
-			return $http.get('static/js/prod/data/city.json').success(function(data) {
-				$scope.division = data;
-			}).error(function(reponse) {
-				toaster.pop('error', '系统错误 ' + '加载城市信息失败,' + reponse.data);
-			});
-		};
+		$scope.isSpecial = true; //专票,等于true为不存在
+		$scope.isNormal = true; //普票,等于true为不存在
+		// 获取发票信息方法	1205为增值税专用发票	1206为增值税普通发票	1207为不开发票
 
-		//等获取城市信息之后,做拆分
-		$q.all([getCityData().$promise]).then(function() {
+		var getInvoiceInfo = function() {
 			if(invoice&&invoice.kind) {
 				$scope.bill = invoice;
 				if($scope.bill.kind == 1205) {
@@ -971,12 +998,53 @@ define(['app/app'], function(app) {
 					$scope.bill.address.province = arr[0];
 					$scope.bill.address.city = arr[1];
 					$scope.bill.address.district = arr[2];
+					// console.log($scope.bill.address)
+				}
+				if ($scope.bill.name) {
+					$scope.bill.is_agree = true;
+				} else {
+					$scope.bill.is_agree = false;
 				}
 			}
-			$scope.bill.is_agree = true;
-		});
+		};
+		getInvoiceInfo();
+		// $scope.bill = {};
+		// 获取省市区地理信息
+		var getGeoInfo = function () {
+			$http.get('static/js/prod/data/city.json').success(function(data) {
+				$scope.division = data;
+				if($scope.bill.area){
+					$scope.bill.address = {};
+					//拼装下拉选择框
+					var arr = $scope.bill.area.split(',');
+					$scope.bill.address.province = arr[0];
+					$scope.bill.address.city = arr[1];
+					$scope.bill.address.district = arr[2];
+				}
+			}).error(function(e) {
+				toaster.pop('error', '系统错误 ' + '加载城市信息失败, 请重新加载界面!');
+			});
+		};
+		getGeoInfo();
 
-		$scope.saveBill = function() {
+		$scope.bill.address = {};
+
+		//保存发票信息
+		$scope.saveBill = function(flag) {
+			var dataValidFlag = $scope.checkValidFrom();
+			if (!flag && dataValidFlag && $scope.bill.is_agree) {
+				if (!$scope.isAdd) { //修改
+					doSave('修改发票信息');
+				} else { // 新增
+					doSave('添加发票');
+				}
+			} else if (flag || !dataValidFlag) {
+				toaster.pop('error', '请填写正确的发票信息');
+			} else {
+				toaster.pop('error', '请勾选并阅读《发票须知》');
+			}
+		};
+		var doSave = function (message) {
 			$scope.bill.area = $scope.bill.address.province + "," + $scope.bill.address.city + "," + $scope.bill.address.district;
 			var file = null;
 			if($scope.bill.billInfo&&$scope.bill.billInfo[0]) {
@@ -990,14 +1058,120 @@ define(['app/app'], function(app) {
 					bill: $scope.bill
 				}
 			}).success(function(data){
-				toaster.pop('success', '保存发票信息成功');
+				toaster.pop('success', message + '成功');
 				$modalInstance.close(data);
-			}).error(function(res){
-				toaster.pop('error', '保存发票信息失败,' + res.data);
+			}).error(function(data){
+				toaster.pop('error', message + '失败');
 			});
-		};
+		}
+
+		$scope.isDoUpload = false;
+		//上传发票许可证
+		$scope.onUploadPermission = function () {
+			$scope.isDoUpload = true;
+			if (event.target.files[0].size < 3*1024*1024) {
+				$scope.bill.attachUrl = event.target.files[0].name;
+			} else {
+				$scope.bill.attachUrl = '';
+			}
+		}
+
+		//判断中文字符串的长度
+		var getRealStringLen = function (str) {
+			var realLength = 0, len = str.length, charCode = -1;
+			for (var i = 0; i < len; i++) {
+				charCode = str.charCodeAt(i);
+				if (charCode >= 0 && charCode <= 128) realLength += 1;
+				else realLength += 2;
+			}
+			return realLength;
+		}
+
+		$scope.validForm = {
+			validBillHead: true,
+			validBillName: true,
+			validBankName: true,
+			validDetailAddress: true,
+			validCompanyAddress: true
+		}
+
+		$scope.initFormFlag = function () {
+			$scope.initFlag = {
+				initBillHead: true,
+				initBillName: true,
+				initBankName: true,
+				initDetailAddress: true,
+				initCompanyAddress: true,
+				initCompanyPhone: true,
+				initCompanyTaxNum: true,
+				initBankAccount: true,
+				initTelephone: true
+			}
+		}
+
+		$scope.initFormFlag();
+
+		$scope.checkValidFrom = function () {
+			var flag = true
+			angular.forEach($scope.validForm, function (item) {
+				if (!item) {
+					flag = false;
+				}
+			})
+			return flag;
+		}
+		$scope.checkValidFrom();
+		//发票抬头check
+		$scope.checkBillHead = function () {
+			var len = getRealStringLen($scope.bill.head);
+			if (len > 100) {
+				$scope.validForm.validBillHead = false;
+			} else {
+				$scope.validForm.validBillHead = true;
+			}
+		}
+
+		//收票人check
+		$scope.checkBillName = function () {
+			var len = getRealStringLen($scope.bill.name);
+			if (len > 20) {
+				$scope.validForm.validBillName = false;
+			} else {
+				$scope.validForm.validBillName = true;
+			}
+		}
+
+		//开户银行Check
+		$scope.checkBankName = function () {
+			var len = getRealStringLen($scope.bill.bankName);
+			if (len > 60) {
+				$scope.validForm.validBankName = false;
+			} else {
+				$scope.validForm.validBankName = true;
+			}
+		}
+
+		//详细地址Check
+		$scope.checkDetailAddress = function () {
+			var len = getRealStringLen($scope.bill.detailAddress);
+			if (len > 60) {
+				$scope.validForm.validDetailAddress = false;
+			} else {
+				$scope.validForm.validDetailAddress = true;
+			}
+		}
+
+		//单位地址check
+		$scope.checkCompanyAddress = function () {
+			var len = getRealStringLen($scope.bill.companyAddress);
+			if (len > 100) {
+				$scope.validForm.validCompanyAddress = false;
+			} else {
+				$scope.validForm.validCompanyAddress = true;
+			}
+		}
 
-		$scope.exit = function() {
+		$scope.exitEdit = function () {
 			$modalInstance.dismiss();
 		}
 

+ 2 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_deliveryRule_ctrl.js

@@ -53,12 +53,12 @@ define([ 'app/app' ], function(app) {
                 $scope.modifyRule = data;
                 $scope.isModify = true;
                 $scope.isActive = $scope.modifyRule.active == 1;
+                $scope.fareArray = [];
                 if ($scope.modifyRule.fareType == 2){
                     $scope.fareArray = angular.fromJson($scope.modifyRule.fares);
                 }
                 $scope.currencySymbol = $scope.modifyRule.currencyName == "RMB" ? "¥" : "$";
-                if (!$scope.fareArray){
-                    $scope.fareArray = [];
+                if ($scope.fareArray.length == 0){
                     var firstFare = {
                         start : "0",
                         end : "",

+ 1 - 1
src/main/webapp/resources/view/admin/audit_brand.html

@@ -20,7 +20,7 @@
 				<div class="col-sm-6">
 					<div class="input-group" style="float: right">
 						<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="keyword" 
-							ng-search="onSearch()" placeholder="按品牌名搜索">
+							ng-search="onSearch()" placeholder="按品牌名/提交人搜索">
 						<div class="input-group-btn">
 							<button ng-click="onSearch()" class="btn btn-primary" type="button">搜索</button>
 						</div>

+ 2 - 2
src/main/webapp/resources/view/admin/checkMoney/billInput.html

@@ -212,7 +212,7 @@ a:HOVER {
 					                     <label class="checkbox-inline text-inverse">
 					                     		<input type="checkbox" checked="true" name="is_agree" ng-model="bill.is_agree" required="required" /> 我已阅读并同意 
 					                     </label>
-					                     <a href="help/nav/19">《发票须知》</a>
+					                     <a href="/help/helpList/19">《发票须知》</a>
 				                     </div>
 				               </div>
 				               <div class="text-center span8 text-center">
@@ -330,7 +330,7 @@ a:HOVER {
 				                       <label class="check-inline text-inverse">
 				                       		<input checked="true" type="checkbox" ng-model="bill.is_agree" name="is_agree" required=""> 我已阅读并同意
 				                       </label>
-				                       	<a href="help/nav/19">《发票须知》</a>
+				                       	<a href="/help/helpList/19">《发票须知》</a>
 				                   </div>
 				               </div>
 				               <div class="text-center span8">

+ 394 - 9
src/main/webapp/resources/view/prod/modal/edit-invoice-modal.html

@@ -1,4 +1,4 @@
-<style type="text/css">
+<!--<style type="text/css">
     .content-header {
         font-size: 24px;
         border-bottom: 1px dashed rgb(129,184,233);
@@ -102,10 +102,10 @@
         background:url("static/img/user/images/xiala.png") right no-repeat ;
         background-position-x: 150px;
     }
-</style>
-<div id="bill-info">
+</style>-->
+<!--<div id="bill-info">
       <div class="row">
-          <h2 class="content-header">新增开票资料</h2>
+          <h2 class="content-header" ng-bind="bill.head?'修改开票资料':'新增开票资料'">修改开票资料</h2>
       </div>
       <div class="row">
           <label class="col-md-3 normal-control-label"><b class="text-inverse">*</b>发票类型:</label>
@@ -201,7 +201,7 @@
                             <label for="check-mpy"></label>
                              <span>我已阅读并同意</span>
                      </label>
-                     <a href="help/helpList/19" class="base-line" target="_blank" style=" position: relative;top: -3px;">《发票须知》</a>
+                     <a href="/help/helpList/205" class="base-line" target="_blank" style=" position: relative;top: -3px;">《发票须知》</a>
                     </div>
               </div>
               <div class="col-md-offset-3">
@@ -315,12 +315,12 @@
                   </div>
                   <div class="text-inverse error col-md-3" ng-show="(bill.bankAccount||form.account.$touched)&&(form.account.$invalid)">输入正确的银行卡账号</div>
               </div>
-              <!--<div class="form-group" ng-show="bill.generalTaxpayerCertUrl">
+              &lt;!&ndash;<div class="form-group" ng-show="bill.generalTaxpayerCertUrl">
                   <label for="generalTaxpayerCert" class="col-md-3 control-label">一般纳税人认定证书:</label>
                   <div class="col-md-5">
                       <input type="file" id="generalTaxpayerCert" name="generalTaxpayerCert" class="form-control" ng-file-select ng-model="generalTaxpayerCertFile" ng-multiple="false" accept="image/*,application/pdf,*.pdf">
                   </div>
-              </div>-->
+              </div>&ndash;&gt;
               <div class="form-group" ng-show="bill.attachUrl&&!billInfoRevise">
                   <label class="col-md-3 control-label" for="exampleInputFile">开票资料:</label>
                   <div class="col-md-5 height-34">
@@ -341,7 +341,7 @@
                           <label for="check-mzy"></label>
                           <span>我已阅读并同意</span>
                       </label>
-                      <a href="help/helpList/19">《发票须知》</a>
+                      <a href="/help/helpList/205">《发票须知》</a>
                   </div>
               </div>
               <div class="col-md-offset-3">
@@ -350,4 +350,389 @@
                   <input type="button" ng-if="invoiceId" value="取消修改" class="btn btn-default" ng-click="exit()">
               </div>
       </form>
-</div>
+</div>-->
+
+<style>
+    /*新增普票样式*/
+    .content-title {
+        font-size: 19px;
+    }
+
+    td > .simple-select {
+        display: inline;
+    }
+    .normal-control-label {
+        margin-bottom: 0;
+        text-align: right;
+        padding-top: 7px;
+        padding-right: 23px;
+    }
+
+    #bill-info label {
+        font-size: 14px;
+        line-height: 1.429;
+        font-weight: normal;
+    }
+    #bill-info span.disable {
+        color: rgb(153, 153, 153);
+    }
+    .base-line {
+        vertical-align: -webkit-baseline-middle;
+    }
+
+    #bill-info .row {
+        margin-left: 0px;
+        margin-right: 0px;
+    }
+
+    #bill-info {
+        font-size: 15px;
+        margin-bottom: 1em;
+    }
+
+    .error {
+        padding-top: 7px;
+        line-height: 1.5;
+    }
+
+    div.radio {
+        margin-top: 0px;
+        margin-bottom: 0;
+        height: 27px;
+        line-height: 27px;
+        padding-top: 6px;
+        padding-left: 0;
+    }
+
+    .padding-top-5 {
+        padding-top: 5px;
+    }
+
+    label.padding-left-0 {
+        padding-left: 0px;
+    }
+
+    .checkbox .col-md-3 {
+        padding-right: 0px;
+    }
+
+    div.upload {
+        margin-left: 15px;
+        width: 370px;
+    }
+
+    #bill-info,  #bill-info input, #bill-info select{
+        font-size: 14px !important;
+    }
+
+    .height-34 {
+        height: 34px;
+        line-height: 26px;
+    }
+
+    .a-background {
+        color: red;
+    }
+
+    .address .checkbox .col-md-3{
+        width: 20%;
+    }
+    #bill-info .form-control {
+        color: #000;
+        font-size: 14px;
+    }
+    #bill-info .format-error {
+        color: red;
+        height: 30px;
+        line-height: 30px;
+    }
+
+    #bill-info select {
+        opacity: 1;
+    }
+    #bill-info .content-header{
+        font-size: 14px;
+        color: rgb(80, 120, 203);
+        font-weight: bold;
+        line-height: 1.429;
+        padding: 10px 0 10px 40px;
+    }
+    .select-adder{
+        background:url("static/img/user/images/xiala.png") right no-repeat ;
+        background-position-x: 150px;
+    }
+    .form-btn .btn {
+        background: #5078cb;
+        border-color: #3b88c3;
+        width: 60px;
+        height: 26px;
+        line-height: 13px;
+        color: #fff;
+        border-radius: 0;
+        text-align: center;
+        vertical-align: middle;
+        white-space: nowrap;
+    }
+    .form-btn .btn:first-child{
+        background: #c8c6c6;
+        border: 1px solid #c8c6c6;
+    }
+    .form-area {
+        background: #f5f8fe;
+        margin: 0 15px;
+    }
+    .form-area .row {
+        padding-top: 15px;
+    }
+    .form-area .address .row {
+        padding-top: 0px;
+    }
+    .form-area form {
+        padding-top: 15px;
+    }
+    .form-bottom {
+        background: #fff;
+        text-align: center;
+        vertical-align: middle;
+        padding-top: 20px;
+        padding-bottom: 3px;
+    }
+    .ticket_record_list dl dt span {
+        font-weight: normal;
+    }
+    /*radio*/
+    #bill-info .radioLabel {
+        line-height: 20px;
+        cursor: pointer;
+        color: #666;
+    }
+    #bill-info .radio-inline {
+        padding-left: 0;
+        margin: 0 26px;
+    }
+    #bill-info .radioLabel label{
+        width: 12px;
+        height: 12px;
+        background: url(static/img/icon/check-rule.png);
+        background-position: 0 0px;
+        vertical-align: middle;
+        margin-bottom: 0 !important;
+        margin-right: 0px !important;
+        padding: 0;
+        min-height: 12px;
+        left: -7px;
+    }
+    #bill-info .radioLabel input[type="radio"]:checked + label {
+        background-position: -15px -12px;
+    }
+    #bill-info .radioLabel input[type="radio"]:checked + label{
+        color: #5078cb;
+    }
+    #bill-info .radioLabel input[type="radio"]{
+        display: none;
+    }
+    #bill-info .form-area .input-file-default {
+        width: 75px;
+    }
+    .ticket_record_list dl dd:hover {
+        background: #f1f5ff;
+    }
+    #bill-info .select-file-box input {
+        display: none;
+    }
+    #bill-info .select-file-box span {
+        width: 74px;
+        display: block;
+        text-align: center;
+        height: 22px;
+        line-height: 22px;
+        background: #ff8522;
+        font-size: 12px;
+        color: #fff;
+        margin-top: 5px;
+        position: relative;
+        left: -22px;
+        border-radius: 2px;
+    }
+    .cursor-not-allowed {
+        cursor: not-allowed!important;
+    }
+    .ticket_record_list .ticket_data dd {
+        border-left: #dae5fd 1px solid;
+        border-bottom: #dae5fd 1px solid!important;
+        border-right: #dae5fd 1px solid;
+    }
+    #bill-info .form-input-line {
+        height: 34px;
+        width: 331px;
+        display: inline-block;
+        margin: 0 15px;
+        float: left;
+    }
+    #bill-info .form-input-line input[type='text'],#bill-info .form-input-line select {
+        border-radius: 2px;
+        border: 1px solid #eef4ff;
+    }
+    #bill-info .file-line {
+        width: 247px;
+    }
+    #bill-info .address .form-input-line {
+        margin: 0 10px 0 0;
+    }
+    #bill-info .address .form-input-line:first-child {
+        margin-left: 15px;
+    }
+    #bill-info .control-label{
+        position: relative;
+        top: 7px;
+    }
+    #bill-info .normal-control-label {
+        position: relative;
+        top: 5px;
+    }
+    .bg-fff8ee {
+        background: #fff8ee;
+    }
+    .bg-fff {
+        -webkit-box-shadow: 0 0 0px 1000px white inset!important;
+    }
+    input:-webkit-autofill,
+    input:-webkit-autofill:hover,
+    input:-webkit-autofill:focus,
+    input:-webkit-autofill:active {
+        -webkit-transition-delay: 99999s;
+        -webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
+        /* -webkit-box-shadow: 0 0 0px 1000px white inset;*/
+    }
+    .modal-lg {
+        width: 914px;
+    }
+</style>
+
+<div id="bill-info">
+    <div class="row">
+        <h2 class="content-header ng-binding" ng-bind="bill.head?'修改开票资料':'新增开票资料'">修改开票资料</h2>
+    </div>
+    <div class="form-area">
+        <form class="form-horizontal" novalidate="novalidate" name="form">
+            <div class="form-group">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>发票抬头:</label>
+                <div class="form-input-line">
+                    <input type="text" class="form-control" ng-class="{'bg-fff8ee': !initFlag.initBillHead&&(form.billHead.$invalid || !validForm.validBillHead)}" ng-model="bill.head" ng-focus="form.billHead.$touched = false;" ng-blur="form.billHead.$touched = true;initFlag.initBillHead = false;checkBillHead()" name="billHead" required="required" placeholder="请输入发票抬头">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.billHead.$touched&&(form.billHead.$invalid || !validForm.validBillHead)" ng-bind="form.billHead.$error.required?'请填写发票抬头':'请勿超过50个字'"></div>
+            </div>
+            <div class="form-group" ng-if="invoiceType == 1205">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>单位地址:</label>
+                <div class="form-input-line">
+                    <input type="text" class="form-control" ng-class="{'bg-fff8ee': !initFlag.initCompanyAddress&&(form.companyAddr.$invalid || !validForm.validCompanyAddress)}" ng-model="bill.companyAddress" ng-focus="form.companyAddr.$touched = false;" ng-blur="form.companyAddr.$touched = true;initFlag.initCompanyAddress = false; checkCompanyAddress()" name="companyAddr" required="required" placeholder="请输入单位地址">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.companyAddr.$touched&&(form.companyAddr.$invalid || !validForm.validCompanyAddress)" ng-bind="form.companyAddr.$error.required?'请填写单位地址':'请勿超过50个字'"></div>
+            </div>
+            <div class="form-group"  ng-if="invoiceType == 1205">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>单位电话:</label>
+                <div class="form-input-line">
+                    <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initCompanyPhone&&form.companyPhone.$error.required, 'bg-fff':!form.companyPhone.$invalid}" ng-focus="form.companyPhone.$touched = false" ng-blur="form.companyPhone.$touched = true;initFlag.initCompanyPhone=false;" placeholder="区号和号码使用 '-' 隔开" name="companyPhone" ng-model="bill.companyPhone" ng-pattern="/^0\d{2,3}-[1-9]\d{6,7}$/" ng-maxlength="20" required="required">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.companyPhone.$touched&&form.companyPhone.$invalid" ng-bind="form.companyPhone.$error.required?'请填写单位电话':form.companyPhone.$error.maxlength?'请勿超过20个字符':'请填写正确的电话号码,用-隔开'"></div>
+            </div>
+            <div class="form-group"  ng-if="invoiceType == 1205">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>税务登记号:</label>
+                <div class="form-input-line">
+                    <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initCompanyTaxNum&&form.companyTaxNum.$error.required, 'bg-fff':!form.companyTaxNum.$invalid}" ng-model="bill.companyTaxNumber" ng-focus="form.companyTaxNum.$touched = false" ng-blur="form.companyTaxNum.$touched = true; initFlag.initCompanyTaxNum = false;" name="companyTaxNum" required="true" ng-maxlength="20" ng-minlength="15" ng-pattern="/^[0-9a-zA-Z]+$/" placeholder="请输入税务登记号">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.companyTaxNum.$touched&&(form.companyTaxNum.$invalid)" ng-bind="form.companyTaxNum.$error.required?'请填写税务登记号':'请填写15-20位数字或字母'"></div>
+            </div>
+            <div class="form-group"  ng-if="invoiceType == 1205">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>开户银行:</label>
+                <div class="form-input-line">
+                    <input type="text" class="form-control" ng-class="{'bg-fff8ee': !initFlag.initBankName&&(form.bankName.$invalid || !validForm.validBankName)}" ng-model="bill.bankName" ng-focus="form.bankName.$touched = false;" ng-blur="form.bankName.$touched = true;initFlag.initBankName = false; checkBankName()" name="bankName" required="required" placeholder="请输入开户银行">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.bankName.$touched&&(form.bankName.$invalid || !validForm.validBankName)" ng-bind="form.bankName.$error.required?'请填写开户银行':'请勿超过30个字'"></div>
+            </div>
+            <div class="form-group"  ng-if="invoiceType == 1205">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>开户银行账户:</label>
+                <div class="form-input-line">
+                    <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initBankAccount&&form.account.$error.required}" ng-model="bill.bankAccount" name="account" ng-focus="form.account.$touched = false" ng-blur="form.account.$touched = true; initFlag.initBankAccount=false" ng-pattern="/^[0-9]*$/" required ng-maxlength="30" placeholder="请输入开户银行账号">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.account.$touched&&(form.account.$invalid)" ng-bind="form.account.$error.required?'请填写开户银行账号':'请填写30位以内的数字'"></div>
+            </div>
+            <div class="form-group"  ng-if="invoiceType == 1205">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>上传开户许可证:{{form.permissionUpload}}</label>
+                <div class="form-input-line file-line">
+                    <input type="text" name="permission" required class="form-control" ng-model="bill.attachUrl" readonly style="background: #fff">
+                </div>
+                <div class="col-md-1">
+                    <label class="select-file-box">
+                        <span>选择文件</span>
+                        <input class="input-file-default" type="file" ng-file-select ng-model="bill.billInfo" ng-change="onUploadPermission()" ng-multiple="false" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,application/pdf,*.pdf">
+                    </label></div>
+                <div class="text-inverse error col-md-3" ng-show="isDoUpload&&(form.permission.$error.required)">请勿超过3M</div>
+            </div>
+            <div class="form-group">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>收票人:</label>
+                <div class="form-input-line">
+                    <input id="mzbillname" ng-class="{'bg-fff8ee': !initFlag.initBillName&&(form.billName.$invalid || !validForm.validBillName)}" type="text" class="form-control" ng-focus="form.billName.$touched = false; " ng-blur="form.billName.$touched = true;initFlag.initBillName = false; checkBillName()" ng-model="bill.name" name="billName" required="required" placeholder="请输入收票人">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.billName.$touched&&(form.billName.$invalid || !validForm.validBillName)" ng-bind="form.billName.$error.required?'请填写收票人姓名':'请勿超过10个字'"></div>
+            </div>
+            <div class="form-group">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>联系电话:</label>
+                <div class="form-input-line">
+                    <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initTelephone&&form.billTel.$error.required, 'bg-fff':!form.billTel.$invalid||!form.billTel.$touched}" ng-model="bill.telephone" ng-focus="form.billTel.$touched = false" ng-blur="form.billTel.$touched = true; initFlag.initTelephone=false;" name="billTel"
+                           ng-pattern="/^[0-9]*$/" ng-minlength="8" ng-maxlength="11" required="required" placeholder="请输入联系电话">
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.billTel.$touched&&form.billTel.$invalid" ng-bind="form.billTel.$error.required?'请填写联系电话':'请输入8-11位数字'"></div>
+            </div>
+            <div class="form-group address">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>所在地区:</label>
+                <div class="row checkbox">
+                    <div class="form-input-line" style="width: 160px">
+                        <select required="required" class="select-adder form-control"
+                                ng-model="bill.address.province" name="province"
+                                ng-options="key as key for (key,value) in division"
+                                ng-change="bill.address.city='';bill.address.district='';">
+                            <option value="">省</option>
+                        </select>
+                    </div>
+                    <div class="form-input-line" style="width: 160px">
+                        <select class="select-adder form-control" ng-model="bill.address.city" name="city"
+                                ng-options="key as key for (key,value) in division[bill.address.province]"
+                                ng-change="bill.address.district='';" required="required">
+                            <option value="">市</option>
+                        </select>
+                    </div>
+                    <div class="form-input-line" style="width: 160px">
+                        <select class="select-adder form-control" ng-model="bill.address.district" name="district"
+                                ng-options="value as value for value in division[bill.address.province][bill.address.city]" required="required">
+                            <option value="">区</option>
+                        </select>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-md-2 control-label"><b class="text-inverse">*</b>详细地址:</label>
+                <div class="form-input-line" style="width: 502px">
+                    <input id="mzaddress" type="text" class="form-control" ng-class="{'bg-fff8ee': !initFlag.initDetailAddress&&(form.billDetail.$invalid|| !validForm.validDetailAddress)}" required="required" name="billDetail" ng-model="bill.detailAddress" title="建议您填写详细发件地址,如街道名,门牌号,楼层和房间号等信息"
+                           placeholder="建议您填写详细发件地址,如街道名,门牌号,楼层和房间号等信息" ng-focus="form.billDetail.$touched = false; " ng-blur="form.billDetail.$touched = true;initFlag.initDetailAddress = false; checkDetailAddress()" >
+                </div>
+                <div class="text-inverse error col-md-3" ng-show="form.billDetail.$touched&&(form.billDetail.$invalid|| !validForm.validDetailAddress)" ng-bind="form.billDetail.$error.required?'请填写详细地址':'请勿超过30个字'"></div>
+            </div>
+            <div class="form-bottom">
+                <div class="form-group">
+                    <label class="check-active checkbox-inline text-inverse">
+                        <input checked="true" type="checkbox" ng-model="bill.is_agree" name="is_agree" id="check-mzy">
+                        <label for="check-mzy" style="position: relative;bottom: 2px;"></label>
+                        <span style="color: #333;">我已阅读并同意</span>
+                    </label>
+                    <a href="/help/helpList/19" target="_blank" style="color: #5078cb; font-size: 14px; position: relative;top: 2px;">《发票须知》</a>
+                </div>
+                <div class="form-btn">
+                    <input type="button" value="取消" class="btn" ng-click="exitEdit()">
+                    <input type="submit" value="保存" class="btn"
+                           ng-click="saveBill(form.$invalid)">
+                </div>
+            </div>
+        </form>
+    </div>
+</div>

+ 3 - 3
src/main/webapp/resources/view/usercenter/billInput.html

@@ -82,7 +82,7 @@ h2 {
 </style>
 <div id="bill-info">
   <div class="row">
-      <h2 class="content-header">新增开票资料</h2>
+      <h2 class="content-header" ng-bind="bill.head?'修改开票资料':'新增开票资料'">新增开票资料</h2>
   </div>
    <div class="row">
        <label class="col-md-3 normal-control-label"><b class="text-inverse">*</b>发票类型:</label>
@@ -157,7 +157,7 @@ h2 {
                      <label class="checkbox-inline text-inverse">
                             <input type="checkbox" checked="true" name="is_agree" ng-model="bill.is_agree" required="required" /> 我已阅读并同意
                      </label>
-                     <a href="help#/nav/19" class="base-line" target="_blank">《发票须知》</a>
+                     <a href="/help/helpList/19" class="base-line" target="_blank">《发票须知》</a>
                  </div>
            </div>
            <div class="col-md-offset-3">
@@ -274,7 +274,7 @@ h2 {
                    <label class="check-inline text-inverse">
                         <input checked="true" type="checkbox" ng-model="bill.is_agree" name="is_agree" required=""> 我已阅读并同意
                    </label>
-                    <a href="help#/nav/19">《发票须知》</a>
+                    <a href="/help/helpList/19">《发票须知》</a>
                </div>
            </div>
            <div class="col-md-offset-3">

+ 16 - 5
src/main/webapp/resources/view/usercenter/forstore/buyer_invoice.html

@@ -435,6 +435,17 @@
     .bg-fff8ee {
         background: #fff8ee;
     }
+    .bg-fff {
+        -webkit-box-shadow: 0 0 0px 1000px white inset!important;
+    }
+    input:-webkit-autofill,
+    input:-webkit-autofill:hover,
+    input:-webkit-autofill:focus,
+    input:-webkit-autofill:active {
+        -webkit-transition-delay: 99999s;
+        -webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
+       /* -webkit-box-shadow: 0 0 0px 1000px white inset;*/
+    }
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr u_c_invoice">
@@ -542,14 +553,14 @@
                     <div class="form-group"  ng-if="billType == 1205">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>单位电话:</label>
                         <div class="form-input-line">
-                            <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initCompanyPhone&&form.companyPhone.$error.required}" ng-focus="form.companyPhone.$touched = false" ng-blur="form.companyPhone.$touched = true;initFlag.initCompanyPhone=false;" placeholder="区号和号码使用 '-' 隔开" name="companyPhone" ng-model="bill.companyPhone" ng-pattern="/^0\d{2,3}-[1-9]\d{6,7}$/" ng-maxlength="20" required="required">
+                            <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initCompanyPhone&&form.companyPhone.$error.required, 'bg-fff':!form.companyPhone.$invalid}" ng-focus="form.companyPhone.$touched = false" ng-blur="form.companyPhone.$touched = true;initFlag.initCompanyPhone=false;" placeholder="区号和号码使用 '-' 隔开" name="companyPhone" ng-model="bill.companyPhone" ng-pattern="/^0\d{2,3}-[1-9]\d{6,7}$/" ng-maxlength="20" required="required">
                         </div>
                         <div class="text-inverse error col-md-3" ng-show="form.companyPhone.$touched&&form.companyPhone.$invalid" ng-bind="form.companyPhone.$error.required?'请填写单位电话':form.companyPhone.$error.maxlength?'请勿超过20个字符':'请填写正确的电话号码,用-隔开'"></div>
                     </div>
                     <div class="form-group"  ng-if="billType == 1205">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>税务登记号:</label>
                         <div class="form-input-line">
-                            <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initCompanyTaxNum&&form.companyTaxNum.$error.required}" ng-model="bill.companyTaxNumber" ng-focus="form.companyTaxNum.$touched = false" ng-blur="form.companyTaxNum.$touched = true; initFlag.initCompanyTaxNum = false;" name="companyTaxNum" required="true" ng-maxlength="20" ng-minlength="15" ng-pattern="/^[0-9a-zA-Z]+$/" placeholder="请输入税务登记号">
+                            <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initCompanyTaxNum&&form.companyTaxNum.$error.required, 'bg-fff':!form.companyTaxNum.$invalid}" ng-model="bill.companyTaxNumber" ng-focus="form.companyTaxNum.$touched = false" ng-blur="form.companyTaxNum.$touched = true; initFlag.initCompanyTaxNum = false;" name="companyTaxNum" required="true" ng-maxlength="20" ng-minlength="15" ng-pattern="/^[0-9a-zA-Z]+$/" placeholder="请输入税务登记号">
                         </div>
                         <div class="text-inverse error col-md-3" ng-show="form.companyTaxNum.$touched&&(form.companyTaxNum.$invalid)" ng-bind="form.companyTaxNum.$error.required?'请填写税务登记号':'请填写15-20位数字或字母'"></div>
                     </div>
@@ -589,8 +600,8 @@
                     <div class="form-group">
                         <label class="col-md-2 control-label"><b class="text-inverse">*</b>联系电话:</label>
                         <div class="form-input-line">
-                            <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initTelephone&&form.billTel.$error.required}" ng-model="bill.telephone" ng-focus="form.billTel.$touched = false" ng-blur="form.billTel.$touched = true; initFlag.initTelephone=false;" name="billTel"
-                                   ng-pattern="/^[0-9]*$/" ng-maxlength="11" ng-minlength="8" required="required" placeholder="请输入联系电话">
+                            <input type="text" class="form-control" ng-class="{'bg-fff8ee':!initFlag.initTelephone&&form.billTel.$error.required, 'bg-fff':!form.billTel.$invalid||!form.billTel.$touched}" ng-model="bill.telephone" ng-focus="form.billTel.$touched = false" ng-blur="form.billTel.$touched = true; initFlag.initTelephone=false;" name="billTel"
+                                   ng-pattern="/^[0-9]*$/" ng-minlength="8" ng-maxlength="11" required="required" placeholder="请输入联系电话">
                         </div>
                         <div class="text-inverse error col-md-3" ng-show="form.billTel.$touched&&form.billTel.$invalid" ng-bind="form.billTel.$error.required?'请填写联系电话':'请输入8-11位数字'"></div>
                     </div>
@@ -635,7 +646,7 @@
                                     <label for="check-mzy" style="position: relative;bottom: 2px;"></label>
                                     <span style="color: #333;">我已阅读并同意</span>
                                 </label>
-                                <a href="help#/nav/19" target="_blank" style="color: #5078cb; font-size: 14px; position: relative;top: 2px;">《发票须知》</a>
+                                <a href="/help/helpList/19" target="_blank" style="color: #5078cb; font-size: 14px; position: relative;top: 2px;">《发票须知》</a>
                         </div>
                         <div class="form-btn">
                             <input type="button" value="取消" class="btn" ng-click="setChangeBillStatusFlag(false)">

+ 66 - 5
src/main/webapp/resources/view/usercenter/forstore/order_pay.html

@@ -1,4 +1,49 @@
 <style type="text/css">
+	.buyer-contact {
+		position:fixed;
+		top:50%;
+		left:50%;
+		transform:translate(-50%,-50%);
+		z-index: 2;
+		min-height: 155px;
+		opacity: 1;
+		background-color: white;
+		width: 350px;
+		border: 1px solid #E7E5E2;
+		-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+		box-shadow: 0 5px 15px rgba(0,0,0,.5);
+	}
+
+	.buyer-contact .contact-title {
+		height: 26px;
+		background-color: #5078cb;
+		text-align: right;
+		padding-right: 15px;
+		line-height: 26px;
+		color: white;
+	}
+
+	.buyer-contact .company-name{
+		margin:30px;
+	}
+	.buyer-contact .company-name p{
+		font-size:14px;
+		line-height: 25px;
+		padding-bottom:10px;
+	}
+	.buyer-contact .company-name p:last-child{
+		text-align: center;
+	}
+	.buyer-contact .company-name a{
+		color:#5078cb;
+	}
+	.buyer-contact .company-name i{
+		font-size:20px;
+	}
+	.buyer-contact .contact-title a,.buyer-contact .contact-title a:hover {
+		color: white !important;
+	}
+
 	.payment a {
 		text-decoration:none;
 	}
@@ -45,10 +90,16 @@
 	.payment .bill-radio span{
 		margin-right: 10px;
 	}
+	.payment .bill-radio b{
+		margin-left: 100px;
+		font-size:14px;
+		color: #ef2324;
+	}
 	.payment .bill-radio span:hover{
 		cursor: pointer;
 		color: #5078cb;
 	}
+
 	.payment .bill-radio input {
 		display: none;
 	}
@@ -569,7 +620,7 @@
 					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1207'"/>
 					<label></label><em>暂不开票</em>
 				</span>
-				<span  ng-click="selectBill('1206')">
+				<span  ng-click="selectBill('1206')" ng-hide="storeArray.length == 1 && hideNormal">
 					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1206'"/>
 					<label></label><em>增值税普通发票</em>
 				</span>
@@ -577,6 +628,7 @@
 					<input type="radio"  name="bill" ng-checked="order.invoicetype == '1205'"/>
 					<label></label><em>增值税专用发票</em>
 				</span>
+				<b ng-if="order.invoicetype == '1206' && hideNormal">因存在部分寄售产品,寄售产品默认仅提供增值税专票</b>
 			</p>
 			<div class="pay_oder_xq_list no-need-bill f14" ng-if="order.invoicetype=='1207'">
 			</div>
@@ -587,7 +639,7 @@
 				<p><em>发票类型:</em><span ng-bind="order.invoicetype | billTypeFilter "></span></p>
 				<p><em>收票人:</em><span ng-bind="bill.name || '空'"></span></p>
 				<p><em>收票人电话:</em><span ng-bind="bill.telephone || '空'"></span></p>
-				<p><em>座机:</em><span ng-bind="bill.landlineNumber || '空'"></span></p>
+				<p><em>座机:</em><span ng-bind="bill.companyPhone || '空'"></span></p>
 				<p><em>收票人地址:</em><span>{{bill.area}}, {{bill.detailAddress}}</span></p>
 				<p ng-if="order.invoicetype == '1205'"><em>公司地址:</em><span ng-bind="bill.companyAddress || '空'"></span></p>
 				<p ng-if="order.invoicetype == '1205'"><em>税务登记号:</em><span ng-bind="bill.companyTaxNumber || '空'"></span></p>
@@ -718,7 +770,7 @@
 						</dd>
 						<dd class="line60" ng-class="{'none-border': deliveryList ? deliveryList[details[0].storeid].method==1303 : order.deliverytype=1303}">
 							<span class="style01" style="width: 60%; padding-left: 40px;" ng-class="{'line35': order.status!=501}">配送方式:
-								<select ng-if="order.status == 501" class="select" ng-model="deliveryList[details[0].storeid]" style="opacity: 1;"
+								<select ng-if="order.status == 501 && ruleMap[details[0].storeid].length != 0" class="select" ng-model="deliveryList[details[0].storeid]" style="opacity: 1;"
 										ng-options="rule as deliveryMethod[rule.method] for rule in ruleMap[details[0].storeid]"
 										ng-change="changeFare(details)">
 									<!--ng-options="rule.method as deliveryMethod[rule.method] for rule in ruleMap[details[0].storeid]"-->
@@ -730,8 +782,8 @@
 								</em>
 								<i ng-if="order.status == 501">
 									<i style="margin-left: 0px;" ng-if="deliveryList[details[0].storeid]" ng-bind="deliveryList[details[0].storeid].ruleName"></i>
-									<i style="margin-left: 0px;" ng-if="!payment.address">请选择收货地址</i>
-									<i style="margin-left: 0px;" ng-if="payment.address && ruleMap[details[0].storeid].length == 0">当前地址不支持配送,请与卖家协商处理</i>
+									<i style="color: #ef2324; margin-left: 0px;" ng-if="!payment.address">请选择收货地址</i>
+									<i style="color: #ef2324; margin-left: 0px; " ng-if="payment.address && ruleMap[details[0].storeid].length == 0">当前地址不支持配送,请与卖家协商处理</i>
 								</i>
 								<i ng-if="order.status != 501">
 									<i style="margin-left: 0px;" ng-if="deliveryList" ng-bind="deliveryList[details[0].storeid].ruleName"></i>
@@ -836,4 +888,13 @@
 			</div>
 		</div>
 	</div>
+	<div class="buyer-contact" ng-if="showBillFrame">
+		<div class="contact-title">
+			<a ng-click="cancelFrame()"><i style="font-size: 20px" class="fa fa-close fa-lg" aria-hidden="true"></i></a>
+		</div>
+		<div class="company-name">
+			<p>您还未填写&nbsp;<a ng-click="goToBillPage()">增值税专票信息</a>&nbsp;,请进行完善,否则无法开具寄售产品发票</p>
+			<P><button class="btn" ng-click="perfectLater()" style="background: #5078cb;border-radius:0px;color:#fff;">暂不完善</button>&nbsp;<a ng-click="goToBillPage()" class="send">立刻完善&nbsp;<i class="fa fa-arrow-right"></i></a></P>
+		</div>
+	</div>
 </div>

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_component_batchapplylist.html

@@ -47,12 +47,12 @@
             <div class="row">
                 <div class="col-xs-12">
                     <div class="screen" style="padding: 7px 0;">
-                        <div class="screen_time fl">
+                       <!-- <div class="screen_time fl">
                             <span>申请时间</span>
                             <input type="text" value="2016-05-01" class="timeStart">
                             -
                             <input type="text" value="2016-05-31" class="timeEnd">
-                        </div>
+                        </div>-->
                         <div class="sreach fr">
                             <input type="search" class="form-control"
                                    ng-model="keyword" ng-search="onSearch()" placeholder="请输入申请单号查询">