Ver código fonte

h5业务录入

qzyReal 3 anos atrás
pai
commit
8244594a7f

+ 1 - 0
app/pages/business-order/report.vue

@@ -138,6 +138,7 @@
 				})
 			},
 			confirmFn() {
+				console.log(this.form)
 				if (!this.form.nucleicReport) {
 					this.$common.toast('请上传核酸报告');
 					return;

+ 77 - 73
app/pages/index/index.vue

@@ -3,7 +3,7 @@
 		<view class="top-nav">
 			<view class="l">
 				<block v-if="isLogin">
-					<image class="user-img" src="../../static/user.png"></image>
+					<image class="user-img" src="../../static/user.png" @click="toAccount"></image>
 					<view class="l-r">
 						<text class="u-name">{{userName}}</text>
 						<text class="c-name" v-if="customerId!=='1'">{{companyName}}</text>
@@ -24,8 +24,7 @@
 			<text class="title">场站管理系统</text>
 		</view>
 		<view class="item-box">
-			<view class="item" hover-class="hover-class" 
-			v-for="(indexItem,index) in indexItemList" :key="index"
+			<view class="item" hover-class="hover-class" v-for="(indexItem,index) in indexItemList" :key="index"
 				@click="navTo(indexItem)" v-show="indexItem.show">
 				<image class="icon" :src="indexItem.icon"></image>
 				<view class="text">
@@ -51,7 +50,7 @@
 				isLogin: false, //是否登录状态
 				userName: '',
 				companyName: '',
-				customerId:'',
+				customerId: '',
 				qrcoderlc: '../../static/qrcode.png',
 				indexItemList: []
 			}
@@ -64,88 +63,93 @@
 			return true;
 		},
 		methods: {
-			setList(){
-				this.indexItemList=[
-			{
-					auth: false,
-					icon: '../../static/home-icon-01.png',
-					text: '企业注册',
-					url: '/pages/enterprise-reg/enterprise-reg',
-					show:uni.getStorageSync('info')?false:true
-				},
-				{
-					auth: true,
-					icon: '../../static/home-icon-02.png',
-					text: '业务录入',
-					url: '/pages/business-entering/business-entering',
-					show: uni.getStorageSync('perList').indexOf('tb-business-add')!==-1
-				},
-				{
-					auth: true,
-					icon: '../../static/home-icon-03.png',
-					text: '业务订单',
-					url: '/pages/business-order/business-order',
-					show:true
-				},
-				{
-					auth: true,
-					icon: '../../static/home-icon-04.png',
-					text: '企业管理',
-					url: '/pages/customer-management/customer-list',
-					show:true
-				},
-				{
-					auth: true,
-					icon: '../../static/home-icon-05.png',
-					text: '出入记录',
-					url: '/pages/inout-record/inout-record',
-					show:true
-				},
-				{
-					auth: true,
-					icon: '../../static/home-icon-07.jpg',
-					text: '申报信息录入',
-					url: '/pages/declare/add',
-					show:true
-				},
-				{
-					auth: true,
-					icon: '../../static/home-icon-06.jpg',
-					text: '消杀申报',
-					url: '/pages/disinfect/addDisinfect',
-					show:true
-				},
-				{
-					auth: true,
-					icon: '../../static/home-icon-06.jpg',
-					text: '账户充值',
-					url: '/pages/account/index',
-					show:true
-				},
-					
-					]
+			setList() {
+				this.indexItemList = [{
+						auth: false,
+						icon: '../../static/home-icon-01.png',
+						text: '企业注册',
+						url: '/pages/enterprise-reg/enterprise-reg',
+						show: uni.getStorageSync('info') ? false : true
+					},
+					{
+						auth: false,
+						icon: '../../static/home-icon-07.jpg',
+						text: '申报录入',
+						url: '/pages/declare/add',
+						show: true
+					},
+					{
+						auth: false,
+						icon: '../../static/home-icon-06.jpg',
+						text: '消杀申报',
+						url: '/pages/disinfect/addDisinfect',
+						show: true
+					},
+					{
+						auth: true,
+						icon: '../../static/home-icon-02.png',
+						text: '业务录入',
+						url: '/pages/business-entering/business-entering',
+						show: uni.getStorageSync('perList').indexOf('tb-business-add') !== -1
+					},
+					{
+						auth: true,
+						icon: '../../static/home-icon-03.png',
+						text: '业务订单',
+						url: '/pages/business-order/business-order',
+						show: true
+					},
+					{
+						auth: true,
+						icon: '../../static/home-icon-04.png',
+						text: '企业管理',
+						url: '/pages/customer-management/customer-list',
+						show: true
+					},
+					{
+						auth: true,
+						icon: '../../static/home-icon-05.png',
+						text: '出入记录',
+						url: '/pages/inout-record/inout-record',
+						show: true
+					},
+
+					// {
+					// 	auth: true,
+					// 	icon: '../../static/home-icon-06.jpg',
+					// 	text: '账户充值',
+					// 	url: '/pages/account/index',
+					// 	show:true
+					// },
+
+				]
+			},
+			toAccount() {
+				if (this.customerId !== '1') {
+					this.$common.to('/pages/account/index')
+				}
 			},
 			getStoreInfo() {
 				let info = uni.getStorageSync('info');
-				if(info){
-					this.isLogin=true;
-					this.userName=info.name;
-					this.customerId=info.customerId;
+				if (info) {
+					this.isLogin = true;
+					this.userName = info.name;
+					this.customerId = info.customerId;
 				}
 			},
-			toLogin(){
-			 this.$common.to('/pages/login/login')	
+			toLogin() {
+				this.$common.to('/pages/login/login')
 			},
-			exitFn(){
+			exitFn() {
 				uni.removeStorageSync('token')
 				uni.removeStorageSync('info')
-				this.isLogin=false;
+				this.isLogin = false;
 				this.setList();
 			},
 			navTo(item) {
 				let auth = item.auth;
 				let token = uni.getStorageSync('token');
-				if (!auth||token) {
+				if (!auth || token) {
 					this.$common.to(item.url)
 				} else {
 					this.$common.to('/pages/login/login')

+ 1 - 1
app/pages/wx/pay.vue

@@ -240,7 +240,7 @@
 					let selectCar = this.list.filter(obj => obj.id == carId).pop();
 					let carNo = selectCar.carNo;
 					if (!this.$common.isCarNo(carNo)) {
-						this.itemSelect = data.itemList.map(obj => obj.id&&obj.pay==0)
+						this.itemSelect = data.itemList.filter(obj=>obj.pay==0).map(obj => obj.id)
 						this.businessSelect =this.itemSelect.length==0?[]:[1]
 					}
 					this.list = [];

+ 1 - 0
sp-admin/sa-view/tb-declare/tb-declare-info.html

@@ -46,6 +46,7 @@
 						<sa-info name="商铺" br>{{m.shop}}</sa-info>
 						<sa-info name="生产批号" br>{{m.productionCode}}</sa-info>
 						<sa-info name="柜号" br>{{m.containerCode}}</sa-info>
+						<sa-info name="申报时间" br>{{m.createTime}}</sa-info>
 					</el-form>
 				</div>
 			</div>

+ 1 - 0
sp-admin/sa-view/tb-declare/tb-declare-list.html

@@ -56,6 +56,7 @@
 					<sa-td name="商铺" prop="shop" ></sa-td>
 					<sa-td name="生产批号" prop="productionCode" ></sa-td>
 					<sa-td name="柜号" prop="containerCode" ></sa-td>
+					<sa-td name="申报时间" prop="createTime" ></sa-td>
 					<el-table-column label="操作" fixed="right"  width="240px">
 						<template slot-scope="s">
 							<el-button class="c-btn" type="success" icon="el-icon" @click="print(s.row)">打印</el-button>

+ 1 - 1
sp-server/app.pid

@@ -1 +1 @@
-33632
+5728

+ 6 - 2
sp-server/src/main/java/com/pj/api/h5/ApiController.java

@@ -112,6 +112,12 @@ public class ApiController {
         return AjaxJson.getSuccessData(apiService.getPartCarByChannel(channel));
     }
 
+    @GetMapping(value = "getDeclareList")
+    public AjaxJson getDeclareList() {
+        SoMap so=SoMap.getRequestSoMap();
+        return AjaxJson.getSuccessData(apiService.getDeclareList(so.startPage()));
+    }
+
     @PostMapping(value = "addDeclare")
     public AjaxJson addDeclare(@RequestBody TbDeclare tbDeclare) {
         apiService.addDeclare(tbDeclare);
@@ -125,6 +131,4 @@ public class ApiController {
     }
 
 
-
-
 }

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

@@ -151,4 +151,8 @@ public class ApiService {
         tbDisinfect.setCode(nowStr + RandomUtil.randomNumbers(6)).setApplyTime(DateUtil.now());
         tbDisinfectService.save(tbDisinfect);
     }
+
+    public List<TbDeclare> getDeclareList(SoMap so) {
+        return tbDeclareService.getList(so);
+    }
 }

+ 3 - 1
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareMapper.xml

@@ -86,7 +86,7 @@
 	</sql>
 
     <!-- 查 - 根据id -->
-    <select id="getById" resultMap="model">
+    <select id="getById" resultType="com.pj.project.tb_declare.TbDeclare">
         <include refid="select_sql"></include>
         where id = #{id}
     </select>
@@ -122,6 +122,8 @@
             <if test=' this.has("productionCode") '>and production_code = #{productionCode}</if>
             <if test=' this.has("containerCode") '>and container_code = #{containerCode}</if>
             <if test=' this.has("bind") '>and business_id is null or business_id=''</if>
+            <if test=' this.has("declareNo") '>and (declare_no=#{declareNo} or business_id is null or business_id='')</if>
+
         </where>
         order by
         <choose>

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareService.java

@@ -45,7 +45,7 @@ public class TbDeclareService extends ServiceImpl<TbDeclareMapper, TbDeclare> im
 	}
 
 	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
-	List<TbDeclare> getList(SoMap so) {
+	public List<TbDeclare> getList(SoMap so) {
 		return tbDeclareMapper.getList(so);	
 	}