Bläddra i källkod

PC接单功能

qzyReal 3 år sedan
förälder
incheckning
a5d69953ed

+ 29 - 17
sp-admin/sa-view/tb-partner/tb-business-item-list.html

@@ -21,22 +21,23 @@
 				<!-- ------------- 检索参数 ------------- -->
 				<div class="c-title">检索参数</div>
 				<el-form ref="form" :model='p' @submit.native.prevent>
-<!--					<div class="c-item">-->
-<!--						<label class="c-label">业务类型:</label>-->
-<!--						<el-select v-model="p.businessType">-->
-<!--							<el-option label="消杀业务" value="1"></el-option>-->
-<!--							<el-option label="核酸业务" value="3"></el-option>-->
-<!--							<el-option label="整车业务" value="2"></el-option>-->
-<!--						</el-select>-->
-<!--					</div>-->
+
 					<sa-item type="text" name="项目名称" v-model="p.itemName"></sa-item>
 					<sa-item type="text" name="越南车" v-model="p.cardNo"></sa-item>
 					<sa-item type="text" name="中国车" v-model="p.chinaCarNo"></sa-item>
 					<sa-item type="text" name="货物" v-model="p.goodsName"></sa-item>
+					<div class="c-item">
+						<label class="c-label">业务项:</label>
+						<el-select v-model="p.goodsId" placeholder="请选择" filterable>
+							<el-option v-for="item in goodsList" :key="item.id" :label="item.name" :value="item.id">
+							</el-option>
+						</el-select>
+					</div>
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
-					<el-button style="display: inline;" type="info" icon="el-icon-refresh" @click="sa.f5()">刷新</el-button>
+					<el-button style="display: inline;" type="info" icon="el-icon-refresh" @click="sa.f5()">刷新
+					</el-button>
 					<el-button type="warning" icon="el-icon-download" @click="exportFn()">导出</el-button>
-					
+
 					<br>
 				</el-form>
 				<!-- ------------- 快捷按钮 ------------- -->
@@ -46,18 +47,18 @@
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList">
 					<sa-td name="单号" prop="no" width="160"></sa-td>
-					<sa-td name="货物" prop="goodsName"></sa-td>
+					<sa-td name="业务项" prop="goodsName" width="120"></sa-td>
+					<sa-td name="收费类型" prop="itemTypeName" width="120"></sa-td>
+					<sa-td name="收费项" prop="itemName" width="140"></sa-td>
 					<sa-td name="越南车" prop="cardNo"></sa-td>
 					<sa-td name="中国车" prop="chinaCarNo"></sa-td>
 					<sa-td name="作业公司" prop="pickCustomerName"></sa-td>
-					<sa-td name="车型" prop="itemName" width="120"></sa-td>
-					<sa-td name="类型" prop="itemTypeName" width="120"></sa-td>
 					<sa-td name="计费标准" prop="unit">
 						<template slot-scope="s">
 							{{s.row.itemPrice}}{{s.row.unit}}
 						</template>
 					</sa-td>
-				<!-- 	<sa-td name="状态" prop="status" type="enum" :jv="{0: '未完成', 1: '已完成'}"></sa-td>
+					<!-- 	<sa-td name="状态" prop="status" type="enum" :jv="{0: '未完成', 1: '已完成'}"></sa-td>
 					<sa-td name="作业时间" prop="operateTime"></sa-td> -->
 					<sa-td name="创建时间" prop="createTime" width="160"></sa-td>
 					<sa-td name="接单时间" prop="pickTime" width="160"></sa-td>
@@ -111,6 +112,7 @@
 						cardNo: '',
 						chinaCarNo: '',
 						businessType: '',
+						goodsId: '',
 						goodsName: '',
 						pageNo: 1, // 当前页 
 						pageSize: 10, // 页大小 
@@ -118,7 +120,9 @@
 					},
 					dataCount: 0,
 					dataList: [], // 数据集合 
+					goodsList:[],
 					currentCustomerId: '1',
+					itemTypeList: [],
 					confirm: {
 						visible: false,
 						form: {
@@ -135,6 +139,13 @@
 					dataTime: [],
 				},
 				methods: {
+					getGoods: function() {
+						sa.ajax('/TbGoods/all', sa.removeNull(this.p), function(res) {
+							let list=[{id:'',name:'全部'}];
+							list=list.concat(res.data)
+							this.goodsList =list ; // 数据
+						}.bind(this));
+					},
 					exportFn() {
 						Object.assign(this.emodel, {
 							visible: true,
@@ -144,11 +155,11 @@
 						if (this.dataTime.length != 0) {
 							this.emodel.form.beginTime = this.dataTime[0];
 							this.emodel.form.endTime = this.dataTime[1];
-						} else{
+						} else {
 							sa.msg("请选择日期范围");
 							return;
 						}
-						sa.ajax('/TbBusinessItem/export/items', this.emodel.form,  function(resp) {
+						sa.ajax('/TbBusinessItem/export/items', this.emodel.form, function(resp) {
 							window.open(resp.data);
 							this.emodel.visible = false;
 						}.bind(this));
@@ -215,7 +226,8 @@
 					},
 				},
 				created: function() {
-					this.getCustomer()
+					this.getCustomer();
+					this.getGoods();
 					this.f5();
 					sa.onInputEnter();
 				}

+ 21 - 8
sp-admin/sa-view/tb-partner/tb-business-pick-list.html

@@ -23,7 +23,16 @@
 				<el-form ref="form" :model='p' @submit.native.prevent>
 					<sa-item type="text" name="项目名称" v-model="p.itemName"></sa-item>
 					<sa-item type="text" name="越南车" v-model="p.cardNo"></sa-item>
+					<sa-item type="text" name="中国车" v-model="p.chinaCarNo"></sa-item>
 					<sa-item type="text" name="货物" v-model="p.goodsName"></sa-item>
+					<div class="c-item">
+						<label class="c-label">业务项:</label>
+						<el-select v-model="p.goodsId" placeholder="请选择" filterable>
+							<el-option v-for="item in goodsList" :key="item.id"
+									   :label="item.name" :value="item.id">
+							</el-option>
+						</el-select>
+					</div>
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
 					<el-button style="display: inline;" type="info" icon="el-icon-refresh" @click="sa.f5()">刷新
 					</el-button>
@@ -36,20 +45,16 @@
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList">
 					<sa-td name="单号" prop="no" width="160"></sa-td>
-					<sa-td name="货物" prop="goodsName"></sa-td>
+					<sa-td name="业务项" prop="goodsName" width="120"></sa-td>
+					<sa-td name="收费项" prop="itemName" width="120"></sa-td>
 					<sa-td name="越南车" prop="cardNo"></sa-td>
 					<sa-td name="中国车" prop="chinaCarNo"></sa-td>
-					<sa-td name="作业公司" prop="pickCustomerName"></sa-td>
-					<sa-td name="车型" prop="itemName" width="120"></sa-td>
-					<sa-td name="类型" prop="itemTypeName" width="120"></sa-td>
 					<sa-td name="计费标准" prop="unit">
 						<template slot-scope="s">
 							{{s.row.itemPrice}}{{s.row.unit}}
 						</template>
 					</sa-td>
 					<sa-td name="创建时间" prop="createTime" width="160"></sa-td>
-					<sa-td name="接单时间" prop="pickTime" width="160"></sa-td>
-					<sa-td name="确认时间" prop="confirmTime" width="160"></sa-td>
 					<el-table-column label="操作" fixed="right" width="200px">
 						<template slot-scope="s">
 							<el-button v-if="s.row.pick==0" class="c-btn" type="success" icon="el-icon-edit"
@@ -84,7 +89,7 @@
 						itemName: '', // 项目名称
 						cardNo: '',
 						chinaCarNo: '',
-						businessType: '',
+						goodsId: '',
 						goodsName: '',
 						pageNo: 1, // 当前页 
 						pageSize: 10, // 页大小 
@@ -93,6 +98,7 @@
 					dataCount: 0,
 					dataList: [], // 数据集合 
 					currentCustomerId: '1',
+					goodsList:[],
 					confirm: {
 						visible: false,
 						form: {
@@ -143,6 +149,13 @@
 							sa.alert(resp.msg, this.f5);
 						}.bind(this));
 					},
+					getGoods: function() {
+						sa.ajax('/TbGoods/all', sa.removeNull(this.p), function(res) {
+							let list=[{id:'',name:'全部'}];
+							list=list.concat(res.data)
+							this.goodsList =list ; // 数据
+						}.bind(this));
+					},
 					getCustomer() {
 						sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
 							this.currentCustomerId = resp.data;
@@ -189,7 +202,7 @@
 					},
 				},
 				created: function() {
-					this.getCustomer()
+					this.getGoods()
 					this.f5();
 					sa.onInputEnter();
 				}

+ 1 - 0
sp-server/pom.xml

@@ -154,6 +154,7 @@
 
 	<!-- 构建配置 -->
 	<build>
+		<finalName>server</finalName>
 		<!-- 配置资源目录  -->
 		<resources>
 			<resource>

+ 2 - 0
sp-server/src/main/java/com/pj/project/tb_business_item/TbBusinessItemMapper.xml

@@ -57,6 +57,7 @@
         select a.*,b.goods_name,b.card_no,b.china_car_no,b.business_type
         from tb_business_item a,tb_business b where a.business_id=b.id
         <if test=' this.has("id") '>and a.id = #{id}</if>
+        <if test=' this.has("goodsId") '>and b.goods_id = #{goodsId}</if>
         <if test=' this.has("businessId") '>and a.business_id = #{businessId}</if>
         <if test=' this.has("pickCustomerId") '>and a.pick_customer_id = #{pickCustomerId}</if>
         <if test=' this.has("itemCode") '>and a.item_code = #{itemCode}</if>
@@ -72,6 +73,7 @@
         </if>
         <if test=' this.has("cardNo") '>and b.card_no like concat('%',#{cardNo},'%')</if>
         <if test=' this.has("chinaCarNo") '>and b.china_car_no like concat('%',#{chinaCarNo},'%')</if>
+        <if test=' this.has("itemTypeId") '>and a.item_type_id = #{itemTypeId}</if>
         <if test=' this.has("businessType") '>and b.business_type = #{businessType}</if>
         <if test=' this.has("goodsName") '>and b.goods_name like concat('%',#{goodsName},'%')</if>
         <if test="typeList !=null and typeList.size>0">

+ 7 - 0
sp-server/src/main/java/com/pj/project/tb_goods/TbGoodsController.java

@@ -97,6 +97,13 @@ public class TbGoodsController {
         list=  list.stream().filter(tbGoods -> StrUtil.splitTrim(tbCostomer.getBusinessType(),",").contains(tbGoods.getId())).collect(Collectors.toList());
         return AjaxJson.getPageData(so.getDataCount(), list);
     }
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    @RequestMapping("all")
+    public AjaxJson getAll() {
+        return AjaxJson.getSuccessData( tbGoodsService.list());
+    }
 
 
     /**