Procházet zdrojové kódy

Merge branch 'dev' of http://47.101.143.145:8090/77975466/pco into dev

# Conflicts:
#	sp-admin/sa-view/tb-disinfect/print.html
qzyReal před 3 roky
rodič
revize
a0ce5fbab8

+ 1 - 1
app/common/js/common.js

@@ -69,7 +69,7 @@ export default {
 	// 正则验证是否为手机号
 	isPhone (str) {
 		str = str + '';
-		if((/^1[34578]\d{9}$/.test(str))){ 
+		if((/^1[345678]\d{9}$/.test(str))){ 
 			return true; 
 		} 
 		return false;

+ 11 - 11
app/pages/declare/add.vue

@@ -83,7 +83,7 @@
 				</view>
 			</view>
 			<view class="item">
-				<view class="l">生产商注册号:</view>
+				<view class="l" style="flex: 7;">生产商注册号:</view>
 				<view class="r">
 					<u-input placeholder="生产商出注册号" @input="handler()" v-model="form.producerCode" />
 				</view>
@@ -101,7 +101,7 @@
 				</view>
 			</view>
 			<view class="item">
-				<view class="l" style="flex: 7;">运输车辆:</view>
+				<view class="l">运输车辆:</view>
 				<view class="r">
 					<u--textarea @input="handler()" v-model="form.chinaCarNo" placeholder="运输车车牌,多个请用逗号隔开">
 					</u--textarea>
@@ -147,7 +147,7 @@
 				</view>
 			</view>
 			<view class="item">
-				<view class="l"><text style="color: red;">*</text>生产批号:</view>
+				<view class="l">生产批号:</view>
 				<view class="r">
 					<u-input placeholder="生产批号" @input="handler()" v-model="form.productionCode" />
 				</view>
@@ -159,7 +159,7 @@
 				</view>
 			</view>
 			<view class="item">
-				<view class="l">越南车牌:</view>
+				<view class="l"><text style="color: red;">*</text>越南车牌:</view>
 				<view class="r">
 					<u-input placeholder="越南车牌" @input="handler()" v-model="form.carNo" />
 				</view>
@@ -182,8 +182,8 @@
 					declarePeople: '',
 					declarePhone: '',
 					goodsName: '',
-					grossWeight: 0,
-					num: 0,
+					grossWeight: '',
+					num: '',
 					productionDate: '',
 					expirationDate: '',
 					productionMode: '',
@@ -272,7 +272,7 @@
 					this.$common.toast('请填写申报人');
 					return;
 				}
-				if (!this.form.declarePhone) {
+				if (this.$common.isPhone(this.form.declarePhone)&&!this.form.declarePhone) {
 					this.$common.toast('请填写申报电话');
 					return;
 				}
@@ -280,14 +280,14 @@
 					this.$common.toast('请填写产品');
 					return;
 				}
-				if (!this.form.productionCode) {
-					this.$common.toast('请填写生产批号');
-					return;
-				}
 				if (!this.form.grossWeight || this.form.grossWeight <= 0) {
 					this.$common.toast('请填写毛重');
 					return;
 				}
+				if (!this.form.carNo) {
+					this.$common.toast('请填写越南车牌');
+					return;
+				}
 				this.$api.addDeclare(this.$common.removeNull(this.form)).then(resp => {
 					this.cleanStore();
 					this.$common.to('/pages/declare/addDeclareSuccess')

+ 2 - 2
app/pages/disinfect/addDisinfect.vue

@@ -188,8 +188,8 @@
 					declarePeople: '',
 					declarePhone: '',
 					goodsName: '',
-					grossWeight: 0,
-					num: 0,
+					grossWeight: '',
+					num: '',
 					origin: '',
 					unit: '',
 					pack: '',

+ 2 - 2
sp-admin/sa-view/tb-disinfect/print.html

@@ -141,8 +141,8 @@ $(function(){
 			$("#applyUnitAndPeople").html("申请人单位、姓名:" + data.data.applyUnit + ", " + data.data.declarePeople);
 			$("#declarePhone").html("联系方式:" + data.data.declarePhone);
 			$("#applyTime").html("申请时间:" + data.data.applyTime);
-			$("#acceptPeople").html("受理人姓名:" + data.data.acceptPeople);
-			$("#acceptTime").html("受理时间:" + data.data.acceptTime);
+			$("#acceptPeople").html("受理人姓名:");
+			$("#acceptTime").html("受理时间:");
 			$("#myPrintArea").printArea();
 		}
 	});

+ 1 - 1
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -143,7 +143,7 @@ public class ApiService {
 
     public void addDisinfect(TbDisinfect tbDisinfect) {
         String nowStr = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
-        tbDisinfect.setCode(nowStr + RandomUtil.randomNumbers(6)).setApplyTime(DateUtil.today());
+        tbDisinfect.setCode(nowStr + RandomUtil.randomNumbers(6)).setApplyTime(DateUtil.now());
         tbDisinfectService.save(tbDisinfect);
     }
 }

+ 4 - 2
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -126,7 +126,8 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         }
         TbBusiness tbBusiness = tbBusinessService.getById(businessId);
         if (tbBusiness!=null){
-            tbBusiness.setChinaPartMoney(tbBusiness.getChinaPartMoney().add(partConfig.getBasePrice()));
+            tbBusiness.setChinaPartMoney(tbBusiness.getChinaPartMoney().add(partConfig.getBasePrice()))
+            .setTotalMoney(tbBusiness.getTotalMoney().add(partConfig.getBasePrice()));
             tbBusinessService.updateById(tbBusiness);
         }
 
@@ -163,7 +164,8 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         this.removeById(id);
         TbBusiness tbBusiness = tbBusinessService.getById(db.getBusinessId());
         if (tbBusiness!=null){
-            tbBusiness.setChinaPartMoney(tbBusiness.getChinaPartMoney().subtract(partConfig.getBasePrice()));
+            tbBusiness.setChinaPartMoney(tbBusiness.getChinaPartMoney().subtract(partConfig.getBasePrice()))
+            .setTotalMoney(tbBusiness.getTotalMoney().subtract(partConfig.getBasePrice()));
             tbBusinessService.updateById(tbBusiness);
         }
     }