Ver Fonte

经办模块

Tang há 2 anos atrás
pai
commit
d9d3b25b43

+ 9 - 9
package-lock.json

@@ -947,7 +947,7 @@
     },
     },
     "async-validator": {
     "async-validator": {
       "version": "1.8.5",
       "version": "1.8.5",
-      "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
+      "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
       "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
       "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
       "requires": {
       "requires": {
         "babel-runtime": "6.x"
         "babel-runtime": "6.x"
@@ -4443,7 +4443,7 @@
     },
     },
     "deepmerge": {
     "deepmerge": {
       "version": "1.5.2",
       "version": "1.5.2",
-      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
+      "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz",
       "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
       "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
     },
     },
     "default-user-agent": {
     "default-user-agent": {
@@ -4811,9 +4811,9 @@
       "dev": true
       "dev": true
     },
     },
     "element-ui": {
     "element-ui": {
-      "version": "2.15.6",
-      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.6.tgz",
-      "integrity": "sha512-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==",
+      "version": "2.15.14",
+      "resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz",
+      "integrity": "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==",
       "requires": {
       "requires": {
         "async-validator": "~1.8.1",
         "async-validator": "~1.8.1",
         "babel-helper-vue-jsx-merge-props": "^2.0.0",
         "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -9836,8 +9836,8 @@
     },
     },
     "normalize-wheel": {
     "normalize-wheel": {
       "version": "1.0.1",
       "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
-      "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
+      "resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
     },
     },
     "npm-conf": {
     "npm-conf": {
       "version": "1.1.3",
       "version": "1.1.3",
@@ -13689,7 +13689,7 @@
     },
     },
     "resize-observer-polyfill": {
     "resize-observer-polyfill": {
       "version": "1.5.1",
       "version": "1.5.1",
-      "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+      "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
       "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
       "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
     },
     },
     "resolve": {
     "resolve": {
@@ -15367,7 +15367,7 @@
     },
     },
     "throttle-debounce": {
     "throttle-debounce": {
       "version": "1.1.0",
       "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+      "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
       "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
       "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
     },
     },
     "through": {
     "through": {

+ 1 - 1
package.json

@@ -25,7 +25,7 @@
     "axios": "^0.26.1",
     "axios": "^0.26.1",
     "compression-webpack-plugin": "^1.1.12",
     "compression-webpack-plugin": "^1.1.12",
     "docx-preview": "^0.1.15",
     "docx-preview": "^0.1.15",
-    "element-ui": "^2.15.6",
+    "element-ui": "^2.15.14",
     "image-conversion": "^2.1.1",
     "image-conversion": "^2.1.1",
     "js-base64": "^3.7.2",
     "js-base64": "^3.7.2",
     "jsencrypt": "^3.2.1",
     "jsencrypt": "^3.2.1",

+ 135 - 38
src/apis/order.js

@@ -1,6 +1,6 @@
 import request from '@/axios'
 import request from '@/axios'
 export default {
 export default {
-  //查询订单列表
+	//查询订单列表
 	getorderlists(data) {
 	getorderlists(data) {
 		return request({
 		return request({
 			url: '/order/list',
 			url: '/order/list',
@@ -9,10 +9,10 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  /**
-	 * @param {Object} data
-	 * 查询订单商品退款列表
-	 */
+	/**
+	   * @param {Object} data
+	   * 查询订单商品退款列表
+	   */
 	orderRefundList(data) {
 	orderRefundList(data) {
 		return request({
 		return request({
 			url: '/order/refund/list',
 			url: '/order/refund/list',
@@ -21,7 +21,7 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  
+
 	refundSmallOrder(data) {
 	refundSmallOrder(data) {
 		return request({
 		return request({
 			url: '/order/refund',
 			url: '/order/refund',
@@ -30,30 +30,30 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  eddOrder(data) {
+	eddOrder(data) {
 		return request({
 		return request({
 			url: '/order/edit',
 			url: '/order/edit',
 			method: 'post',
 			method: 'post',
 			data: data
 			data: data
 		})
 		})
 	},
 	},
-  
-  orderPayStatus(data) {
+
+	orderPayStatus(data) {
 		return request({
 		return request({
-			url: '/order/'+data,
+			url: '/order/' + data,
 			method: 'get'
 			method: 'get'
 		})
 		})
 	},
 	},
 
 
-  orderResumePCOrder(data) {
+	orderResumePCOrder(data) {
 		return request({
 		return request({
 			url: '/order/resumePCOrder',
 			url: '/order/resumePCOrder',
 			method: 'post',
 			method: 'post',
-      data
+			data
 		})
 		})
 	},
 	},
 
 
-  orderInvoiceList(data) {
+	orderInvoiceList(data) {
 		return request({
 		return request({
 			url: '/order/invoice/list',
 			url: '/order/invoice/list',
 			method: 'get',
 			method: 'get',
@@ -61,7 +61,7 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  orderInvoiceCancel(data) {
+	orderInvoiceCancel(data) {
 		return request({
 		return request({
 			url: '/order/invoice/cancel',
 			url: '/order/invoice/cancel',
 			method: 'post',
 			method: 'post',
@@ -69,7 +69,7 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  orderInvoiceCanInvoiceList(data) {
+	orderInvoiceCanInvoiceList(data) {
 		return request({
 		return request({
 			url: '/order/invoice/canInvoiceList',
 			url: '/order/invoice/canInvoiceList',
 			method: 'get',
 			method: 'get',
@@ -77,7 +77,7 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  orderInvoice(data) {
+	orderInvoice(data) {
 		return request({
 		return request({
 			url: '/order/invoice',
 			url: '/order/invoice',
 			method: 'post',
 			method: 'post',
@@ -85,7 +85,7 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  orderUserEduList(data) {
+	orderUserEduList(data) {
 		return request({
 		return request({
 			url: '/order/userEduList',
 			url: '/order/userEduList',
 			method: 'get',
 			method: 'get',
@@ -93,7 +93,7 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  
+
 	orderInfo(data) {
 	orderInfo(data) {
 		return request({
 		return request({
 			url: '/order/info',
 			url: '/order/info',
@@ -102,51 +102,148 @@ export default {
 		})
 		})
 	},
 	},
 
 
-  orderDetail(data) {
+	orderDetail(data) {
 		return request({
 		return request({
-			url: '/order/detail/'+data,
+			url: '/order/detail/' + data,
 			method: 'get'
 			method: 'get'
 		})
 		})
 	},
 	},
 
 
-  orderGoodsList(data) {
+	orderGoodsList(data) {
 		return request({
 		return request({
 			url: '/order/goods/list',
 			url: '/order/goods/list',
 			method: 'get',
 			method: 'get',
-      params:data,
+			params: data,
 		})
 		})
 	},
 	},
 
 
-  orderUserAllBusinessList(data) {
+	orderUserAllBusinessList(data) {
 		return request({
 		return request({
 			url: '/order/userAllBusinessList',
 			url: '/order/userAllBusinessList',
 			method: 'get',
 			method: 'get',
 			params: data
 			params: data
 		})
 		})
 	},
 	},
-  
-  
-	prderhandle(data) {
+
+
+	orderhandle(data) {
+		return request({
+			url: '/order/handle',
+			method: 'post',
+			data: data
+		})
+	},
+	orderhandleinputOrder(data) {
+		return request({
+			url: '/order/handle/inputOrder',
+			method: 'post',
+			data: data
+		})
+	},
+	orderhandlelist(data) {
+		return request({
+			url: '/order/handle/list',
+			method: 'get',
+			params: data
+		})
+	},
+	orderhandlegoodsList(data) {
+		return request({
+			url: '/order/handle/goodsList',
+			method: 'get',
+			params: data
+		})
+	},
+	orderhandledetail(data) {
+		return request({
+			url: '/order/handle/detail',
+			method: 'get',
+			params: data
+		})
+	},
+	/**
+	 * 
+	 * @param {经办订单继续支付} data 
+	 * @returns 
+	 */
+	orderhandleresumePay(data) {
+		return request({
+			url: '/order/handle/resumePay',
+			method: 'post',
+			data: data
+		})
+	},
+	orderhandlecloseOrder(data) {
+		return request({
+			url: '/order/handle/closeOrder',
+			method: 'post',
+			data: data
+		})
+	},
+
+	//经办名单解析
+	userhandleanalysis(data) {
+		return request({
+			url: '/user/handle/analysis',
+			method: 'post',
+			data: data
+		})
+	},
+	//批量删除用户经办名单
+	userhandledelete(data) {
+		return request({
+			url: '/user/handle/delete',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改用户经办名单
+	userhandleedit(data) {
+		return request({
+			url: '/user/handle/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//用户经办名单列表
+	userhandlelist(data) {
+		return request({
+			url: '/user/handle/list',
+			method: 'get',
+			params: data
+		})
+	},
+	//新增用户经办名单
+	userhandlesave(data) {
+		return request({
+			url: '/user/handle/save',
+			method: 'post',
+			data: data
+		})
+	},
+	//新增订单发票
+	orderinvoice(data) {
+		return request({
+			url: '/order/invoice',
+			method: 'post',
+			data: data
+		})
+	},
+	//经办订单退款申请
+	orderhandlerefundapply(data) {
 		return request({
 		return request({
-			url: '/prder/handle',
+			url: '/order/handle/refund/apply',
 			method: 'post',
 			method: 'post',
 			data: data
 			data: data
 		})
 		})
 	},
 	},
-	prderhandleinputOrder(data) {
+	//修改拒绝经办录单
+	orderhandleupdateRefuseBo(data) {
 		return request({
 		return request({
-			url: '/prder/handle/inputOrder',
+			url: '/order/handle/updateRefuseBo',
 			method: 'post',
 			method: 'post',
 			data: data
 			data: data
 		})
 		})
 	},
 	},
-	prderhandlelist(data) {
-		  return request({
-			  url: '/prder/handle/list',
-			  method: 'get',
-			  params: data
-		  })
-	  },
-  
-  
+	
 }
 }

BIN
src/assets/dgzz.png


BIN
src/assets/wxpay.png


+ 21 - 5
src/common/tools.js

@@ -30,6 +30,22 @@ export default {
 
 
 	},
 	},
 
 
+	exportData(msg) {
+		if (!msg) {
+			this.$message.warning("地址获取错误,请联系开发人员处理")
+			return
+		}
+		var baseUrl = process.env.BASE_IMG_URL + '/'
+		let url =
+			baseUrl + msg;
+		let link = document.createElement("a");
+		let fileName = "导入模板" + ".xlsx";
+		document.body.appendChild(link);
+		link.href = url;
+		link.download = fileName;
+		link.click();
+		link.remove();
+	},
 	isLogin() {
 	isLogin() {
 		if (localStorage.getItem('user_account')) {
 		if (localStorage.getItem('user_account')) {
 			return true;
 			return true;
@@ -53,7 +69,7 @@ export default {
 		sessionStorage.removeItem('uuid')
 		sessionStorage.removeItem('uuid')
 		store.state.userInfo = null
 		store.state.userInfo = null
 
 
-		if (router.currentRoute.path != '/home'&&isJ) {
+		if (router.currentRoute.path != '/home' && isJ) {
 			router.replace({
 			router.replace({
 				path: '/home'
 				path: '/home'
 			})
 			})
@@ -187,8 +203,8 @@ export default {
 
 
 
 
 	imageToBase64(url, quality = 0.8) {
 	imageToBase64(url, quality = 0.8) {
-		console.log(url,'1')
-		return new Promise((resolve,reject) => {
+		console.log(url, '1')
+		return new Promise((resolve, reject) => {
 			var image = new Image();
 			var image = new Image();
 			// 解决跨域 Canvas 污染问题,
 			// 解决跨域 Canvas 污染问题,
 			image.setAttribute("crossorigin", "anonymous");
 			image.setAttribute("crossorigin", "anonymous");
@@ -199,14 +215,14 @@ export default {
 				var context = canvas.getContext("2d");
 				var context = canvas.getContext("2d");
 				context.drawImage(image, 0, 0, image.width, image.height);
 				context.drawImage(image, 0, 0, image.width, image.height);
 				var url = canvas.toDataURL("image/jpeg", quality); //将图片格式转为base64
 				var url = canvas.toDataURL("image/jpeg", quality); //将图片格式转为base64
-				console.log(url,'2')
+				console.log(url, '2')
 				console.log("success")
 				console.log("success")
 				resolve(url)
 				resolve(url)
 			};
 			};
 			image.onerror = function () {
 			image.onerror = function () {
 				console.log("error")
 				console.log("error")
 				resolve(false)
 				resolve(false)
-			};  
+			};
 			image.src = url + "?time=" + Date.now();
 			image.src = url + "?time=" + Date.now();
 		})
 		})
 
 

+ 5 - 2
src/components/search.vue

@@ -12,8 +12,11 @@
         :key="index"
         :key="index"
         :label="item.label || ''"
         :label="item.label || ''"
       >
       >
+        <template v-if="item.scope === 'slot'">
+          <slot :name="item.slotName" :scope="item"></slot>
+        </template>
         <el-select
         <el-select
-          v-if="item.scope == 'select'"
+          v-else-if="item.scope == 'select'"
           v-model="formData[item.prop]"
           v-model="formData[item.prop]"
           :placeholder="item.placeholder"
           :placeholder="item.placeholder"
           clearable
           clearable
@@ -37,7 +40,7 @@
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
         <el-button type="primary" @click="search">查询</el-button>
         <el-button type="primary" @click="search">查询</el-button>
-        <el-button type="primary" @click="init">重置</el-button>
+        <el-button @click="init">重置</el-button>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
   </div>
   </div>

+ 402 - 43
src/pages/person-center/handle-order/index.vue

@@ -6,7 +6,6 @@
         <el-button :size="size" type="warning" @click="addOrder"
         <el-button :size="size" type="warning" @click="addOrder"
           >新增</el-button
           >新增</el-button
         >
         >
-        <el-button :size="size" type="primary">批量删除</el-button>
       </div>
       </div>
     </div>
     </div>
     <el-divider></el-divider>
     <el-divider></el-divider>
@@ -15,23 +14,230 @@
       :formData.sync="formData"
       :formData.sync="formData"
       @search="search"
       @search="search"
       @init="init"
       @init="init"
-    ></search>
-    <order-box ref="orderBox" />
+    >
+      <template slot="edu">
+        <!-- 教育类型 -->
+        <el-select
+          v-model="formData['educationTypeId']"
+          placeholder="教育类型"
+          @change="formData.businessId = ''"
+          style="margin-right:6px;"
+        >
+          <el-option
+            v-for="(items, indexs) in educationType"
+            :key="indexs"
+            :label="items.educationName"
+            :value="items.id"
+          ></el-option>
+        </el-select>
+        <!-- 业务层次 -->
+        <el-select
+          v-model="formData['businessId']"
+          placeholder="培训项目"
+          :disabled="!formData.educationTypeId"
+        >
+          <el-option
+            v-for="(items, indexs) in businessList(formData['educationTypeId'])"
+            :key="indexs"
+            :label="items.projectName + '-' + items.businessName"
+            :value="items.id"
+          ></el-option> </el-select
+      ></template>
+    </search>
+    <el-table
+      v-loading="loading"
+      ref="table"
+      size="small"
+      :data="tableData"
+      style="width: 100%"
+      border
+      :header-cell-style="{
+        'background-color': '#eee',
+        color: '#333',
+        fontSize: '14px'
+      }"
+    >
+      <el-table-column align="center" type="index" width="50" label="序号">
+      </el-table-column>
+      <el-table-column align="center" label="订单状态" width="100">
+        <template slot-scope="scope">{{
+          getPayStatus(scope.row.payStatus)
+        }}</template>
+      </el-table-column>
+      <el-table-column label="订单信息" width="300" header-align="center">
+        <template slot-scope="scope">
+          <p>
+            创建时间:{{ $tools.timestampToTime(scope.row.createTime, false) }}
+          </p>
+          <p>
+            通过时间:{{ $tools.timestampToTime(scope.row.payTime, false) }}
+          </p>
+          <p>订单编号:{{ scope.row.handleOrderSn | "-" }}</p>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品信息" width="240" header-align="center">
+        <template slot-scope="scope">
+          <p>
+            商品类型:{{
+              scope.row.goodsType == 1
+                ? "课程"
+                : scope.row.goodsType == 2
+                ? "题库"
+                : "-"
+            }}
+          </p>
+          <p>教育类型:{{ scope.row.educationName }}</p>
+          <p>
+            培训项目:{{
+              scope.row.projectName + " - " + scope.row.businessName
+            }}
+          </p>
+          <p>订购人数:{{ scope.row.userNum || 0 }}位</p>
+          <p>订购数量:{{ scope.row.goodsNum || 0 }}个</p>
+        </template>
+      </el-table-column>
+      <el-table-column label="订单金额" width="200" header-align="center">
+        <template slot-scope="scope">
+          <p>下单金额:¥{{ scope.row.orderPrice | formatPrice }}</p>
+          <p>退款金额:¥{{ scope.row.goodsRefund | formatPrice }}</p>
+          <p>实际金额:¥{{ scope.row.payPrice | formatPrice }}</p>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="发票状态" width="120px">
+        <template slot-scope="scope">
+          <span v-if="scope.row.invoiceStatus == 1">待审核</span>
+          <span v-if="scope.row.invoiceStatus == 2">已开票</span>
+          <span v-if="scope.row.invoiceStatus == 3">不通过</span>
+          <span v-if="scope.row.invoiceUrl"
+            >({{ scope.row.invoiceUrl.split(",").length }}张)
+          </span>
+          <div v-if="scope.row.invoiceUrl">
+            <el-button
+              type="text"
+              @click="downinvoice(scope.row.invoiceUrl.split(','))"
+              >下载</el-button
+            >
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="发票备注" prop="handleRemark">
+        <template slot-scope="scope">
+          <div v-if="scope.row.invoiceStatus == 3">
+            {{ scope.row.invoiceReason }}
+          </div>
+          <div v-if="scope.row.invoiceStatus == 2 && scope.row.handleRemark">
+            <p>
+              <span
+                v-if="
+                  scope.row.invoiceMode && scope.row.invoiceMode.includes(2)
+                "
+                >邮件接收</span
+              ><span
+                v-if="
+                  scope.row.invoiceMode && scope.row.invoiceMode.includes(3)
+                "
+                >纸质快递</span
+              >
+            </p>
+            <p>{{ scope.row.handleRemark }}</p>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="160" fixed="right">
+        <template slot-scope="scope">
+          <el-button type="text" :size="size" @click="infoData(scope.row)"
+            >详情</el-button
+          >
+          <el-button
+            type="text"
+            :size="size"
+            :disabled="scope.row.payStatus != -2"
+            @click="publictransferFunc(scope.row.handleOrderSn)"
+            >修改</el-button
+          >
+          <el-button
+            :disabled="scope.row.payStatus != 0"
+            type="text"
+            :size="size"
+            @click="func(scope.row, 3)"
+            >支付</el-button
+          >
+          <el-button
+            type="text"
+            :size="size"
+            @click="refundFunc(scope.row)"
+            :disabled="
+              !(
+                (scope.row.payStatus == 1 || scope.row.payPrice == -2) &&
+                scope.row.goodsRefund < scope.row.payPrice
+              )
+            "
+            >退款</el-button
+          >
+          <el-button
+            type="text"
+            :size="size"
+            @click="invoice(scope.row)"
+            :disabled="
+              !(
+                scope.row.payStatus == 1 &&
+                scope.row.invoiceStatus != 2 &&
+                scope.row.invoiceStatus != 1 &&
+                scope.row.payPrice > 0
+              )
+            "
+            >发票</el-button
+          >
+          <el-button
+            type="text"
+            :size="size"
+            :disabled="!(scope.row.payStatus == 0 || scope.row.payStatus == -2)"
+            @click="closeOrder(scope.row.handleOrderSn)"
+            >关闭</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="text-align:center;">
+      <el-pagination
+        @current-change="handleCurrentChange"
+        :current-page="formData.pageNum"
+        :page-size="formData.pageSize"
+        layout="total,  prev, pager, next, jumper"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
+    <order-box ref="orderBox" @backFunc="infoData" />
+    <invoice ref="invoice" @backFunc="search()" />
+    <refundFunc ref="refundFunc" @backFunc="search()" />
+    <public-transfer ref="publicTransfer" @backFunc="backFuncTransfer" />
+    <order-detail ref="orderDetail" />
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import { mapGetters } from "vuex";
+import orderDetail from "./orderDetail.vue";
+import invoice from "./invoice.vue";
+import publicTransfer from "./order/step-2/publicTransfer.vue";
 import orderBox from "./order/index.vue";
 import orderBox from "./order/index.vue";
+import refundFunc from "./refundFunc.vue";
 export default {
 export default {
-  components: { orderBox },
+  components: { orderBox, publicTransfer, orderDetail, invoice, refundFunc },
   data() {
   data() {
     return {
     return {
+      loading: false,
       size: "small",
       size: "small",
-      formData: {},
+      formData: {
+        pageNum: 1,
+        pageSize: 10,
+        businessId: ""
+      },
       formSet: [
       formSet: [
         {
         {
           prop: "goodsType",
           prop: "goodsType",
-          placeholder: "请选择商品类型",
+          placeholder: "商品类型",
           scope: "select",
           scope: "select",
           options: [
           options: [
             {
             {
@@ -45,8 +251,12 @@ export default {
           ]
           ]
         },
         },
         {
         {
-          prop: "payStauts",
-          placeholder: "请选择订单状态",
+          scope: "slot",
+          slotName: "edu"
+        },
+        {
+          prop: "payStatus",
+          placeholder: "订单状态",
           scope: "select",
           scope: "select",
           options: [
           options: [
             {
             {
@@ -71,53 +281,202 @@ export default {
             }
             }
           ]
           ]
         },
         },
-        // {
-        //   prop: "goodsType",
-        //   placeholder: "请选择退款状态",
-        //   scope: "select",
-        //   options: [
-        //     {
-        //       label: "课程",
-        //       value: 1
-        //     },
-        //     {
-        //       label: "题库",
-        //       value: 2
-        //     }
-        //   ]
-        // },
-        // {
-        //   prop: "goodsType",
-        //   placeholder: "请选择发票状态",
-        //   scope: "select",
-        //   options: [
-        //     {
-        //       label: "课程",
-        //       value: 1
-        //     },
-        //     {
-        //       label: "题库",
-        //       value: 2
-        //     }
-        //   ]
-        // },
+        {
+          prop: "refundStatus",
+          placeholder: "退款状态",
+          scope: "select",
+          options: [
+            {
+              label: "待审核",
+              value: 0
+            },
+            {
+              label: "已退款",
+              value: 1
+            },
+            {
+              label: "不通过",
+              value: 2
+            }
+          ]
+        },
+        {
+          prop: "invoiceStatus",
+          placeholder: "发票状态",
+          scope: "select",
+          options: [
+            {
+              label: "待审核",
+              value: 1
+            },
+            {
+              label: "已开票",
+              value: 2
+            },
+            {
+              label: "不通过",
+              value: 3
+            }
+          ]
+        },
+        {
+          prop: "handleOrderSn",
+          placeholder: "输入订单号"
+        },
         {
         {
           prop: "searchKey",
           prop: "searchKey",
           placeholder: "输入姓名/身份证号/商品名称"
           placeholder: "输入姓名/身份证号/商品名称"
         }
         }
-      ]
+      ],
+      tableData: [],
+      total: 0
     };
     };
   },
   },
+  computed: {
+    ...mapGetters(["educationType", "businessList_t"]),
+    businessList: function() {
+      return function(k) {
+        if (this.businessList_t && this.businessList_t.length > 0) {
+          return this.businessList_t.filter(i => i.educationId == k) || [];
+        } else {
+          return [];
+        }
+      };
+    }
+  },
+  mounted() {
+    this.search();
+  },
   methods: {
   methods: {
+    refundFunc(row) {
+      this.$refs.refundFunc.openBoxs(row.handleOrderSn);
+    },
+    invoice(row) {
+      this.$refs.invoice.openBoxs(row.handleOrderSn);
+    },
+    infoData(row) {
+      this.$refs.orderDetail.openBoxs(row.handleOrderSn);
+    },
+    handleCurrentChange(e) {
+      this.formData.pageNum = e;
+      this.search();
+    },
+    publictransferFunc(handleOrderSn) {
+      this.$refs.publicTransfer.openBoxs(handleOrderSn);
+    },
+    backFuncTransfer() {
+      this.search();
+    },
+    getPayStatus(i) {
+      var str = "";
+      switch (i) {
+        case 0:
+          str = "待支付";
+          break;
+        case 1:
+          str = "已支付";
+          break;
+        case -1:
+          str = "已关闭";
+          break;
+        case 2:
+          str = "审核中";
+          break;
+        case -2:
+          str = "不通过";
+          break;
+
+        default:
+          break;
+      }
+      return str;
+    },
     addOrder() {
     addOrder() {
-        this.$refs.orderBox.openBoxs()
+      this.$refs.orderBox.openBoxs();
+    },
+    closeOrder(sn) {
+      this.$confirm("是否关闭该订单?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.$request
+            .orderhandlecloseOrder({ handleOrderSn: sn })
+            .then(res => {
+              this.$message.success("关闭成功");
+              this.search();
+            })
+            .catch(err => {
+              this.$message.error(err.msg);
+            });
+        })
+        .catch(err => {});
     },
     },
     search() {
     search() {
-      console.log(1);
+      this.loading = true;
+      this.$request
+        .orderhandlelist(this.formData)
+        .then(res => {
+          this.tableData = res.rows || [];
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     },
     init() {
     init() {
-      this.formData = {};
-      console.log(2);
+      this.formData = {
+        businessId: "",
+        pageNum: 1,
+        pageSize: 10
+      };
+      this.search();
+    },
+    func(row, index) {
+      if (index == 3) {
+        this.$refs.orderBox.openBoxs(2, row);
+      }
+    },
+    downinvoice(ary) {
+      for (let i = 0; i < ary.length; i++) {
+        this.download(this.$tools.splitImgHost(ary[i]));
+      }
+    },
+    //下载
+    download(url, fileName = "") {
+      let xhr = new XMLHttpRequest();
+      xhr.open("get", url, true);
+      xhr.setRequestHeader("Content-Type", `application/pdf`);
+      xhr.responseType = "blob";
+      let that = this;
+      xhr.onload = function() {
+        if (this.status == 200) {
+          //接受二进制文件流
+          var blob = this.response;
+          that.downloadExportFile(blob, fileName);
+        }
+      };
+      xhr.send();
+    },
+
+    downloadExportFile(blob, tagFileName) {
+      let downloadElement = document.createElement("a");
+      let href = "";
+      if (typeof blob == "string") {
+        downloadElement.target = "_blank";
+      } else {
+        href = window.URL.createObjectURL(blob); //创建下载的链接
+      }
+      downloadElement.href = href;
+      downloadElement.download = tagFileName;
+      //下载后文件名
+      document.body.appendChild(downloadElement);
+      downloadElement.click(); //点击下载
+      document.body.removeChild(downloadElement); //下载完成移除元素
+      if (typeof blob != "string") {
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+      }
     }
     }
   }
   }
 };
 };

+ 342 - 0
src/pages/person-center/handle-order/invoice.vue

@@ -0,0 +1,342 @@
+<template>
+  <div id="">
+    <el-dialog
+      :visible.sync="visible"
+      width="800px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      @closed="close"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          发票申请
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible = false"
+          />
+        </div>
+      </div>
+      <div>
+        <el-form
+          :model="formData"
+          :rules="rules"
+          ref="formData"
+          label-width="100px"
+          class="demo-ruleForm"
+        >
+          <el-form-item label="发票类型" prop="type">
+            <el-radio-group
+              v-model="formData.type"
+              @change="formData.subject = ''"
+            >
+              <el-radio :label="1">普票</el-radio>
+              <el-radio :label="2">专票</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="发票主体" prop="subject">
+            <el-radio-group v-model="formData.subject" @change="changeQy">
+              <el-radio :label="2">企业</el-radio>
+              <el-radio :label="1" v-if="formData.type == 2 ? false : true"
+                >个人</el-radio
+              >
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item
+            :label="formData.subject == 1 ? '姓名' : '企业全称'"
+            prop="invoiceTitle"
+          >
+            <el-input v-model="formData.invoiceTitle"></el-input>
+          </el-form-item>
+          <el-form-item
+            :label="formData.subject == 1 ? '身份证号' : '纳税人号'"
+            prop="taxRegistryNumber"
+          >
+            <el-input v-model="formData.taxRegistryNumber"></el-input>
+          </el-form-item>
+          <el-form-item label="开票备注" prop="openRemark">
+            <el-input
+              v-model="formData.openRemark"
+              type="textarea"
+              :rows="2"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="收票方式" prop="invoiceMode">
+            <el-checkbox-group v-model="formData.invoiceMode" :max="2" @change="changeInvoiceMode">
+              <el-checkbox :label="1" disabled>在线下载</el-checkbox>
+              <el-checkbox :label="2">邮件接收</el-checkbox>
+              <el-checkbox :label="3">纸质快递</el-checkbox>
+            </el-checkbox-group>
+          </el-form-item>
+          <el-form-item
+            label="收票邮箱"
+            prop="email"
+            v-if="formData.invoiceMode.includes(2)"
+          >
+            <el-input v-model="formData.email"></el-input>
+          </el-form-item>
+          <el-form-item
+            label="收票姓名"
+            prop="consignee"
+            v-if="formData.invoiceMode.includes(3)"
+          >
+            <el-input v-model="formData.consignee"></el-input>
+          </el-form-item>
+          <el-form-item
+            label="收票电话"
+            prop="collectionTelephone"
+            v-if="formData.invoiceMode.includes(3)"
+          >
+            <el-input v-model="formData.collectionTelephone"></el-input>
+          </el-form-item>
+
+          <el-form-item
+            label="收票地址"
+            prop="shippingAddress"
+            v-if="formData.invoiceMode.includes(3)"
+          >
+            <el-input
+              v-model="formData.shippingAddress"
+            ></el-input> </el-form-item
+        ></el-form>
+        <el-divider></el-divider>
+        <el-main style="padding:0px 14px;">
+          <h2>
+            <span>订单详情</span>
+            <el-button type="text">查看</el-button>
+          </h2>
+          <ul class="ul_">
+            <li>
+              商品类型:<span>{{
+                orderInfo.goodsType == 1
+                  ? "课程"
+                  : orderInfo.goodsType == 2
+                  ? "题库"
+                  : ""
+              }}</span>
+              教育类型:<span>{{ orderInfo.educationName }}</span
+              >项目类型:<span
+                >{{ orderInfo.projectName }}-{{ orderInfo.businessName }}</span
+              >
+            </li>
+            <li>
+              订购人数:<span>{{ orderInfo.userNum || 0 }}位</span
+              >订购数量:<span>{{ orderInfo.goodsNum || 0 }}个</span>
+            </li>
+            <li>
+              下单金额:<span>¥{{ orderInfo.orderPrice | formatPrice }}</span
+              >退款金额:<span
+                >¥{{ orderInfo.goodsRefund | formatPrice }}</span
+              >
+              实际金额:<span style="color:red;"
+                >¥{{ orderInfo.payPrice | formatPrice }}</span
+              >
+            </li>
+          </ul>
+        </el-main>
+        <p style="padding-left:20px;margin-top:20px;">
+          本次申请开票金额:<span
+            style="color:red;font-size:16px;"
+            v-if="orderInfo.payPrice - orderInfo.goodsRefund > 0"
+            >¥{{
+              (orderInfo.payPrice - orderInfo.goodsRefund) | formatPrice
+            }}</span
+          ><span v-else style="color:red;font-size:16px;">¥0.00</span>
+        </p>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="submitForm" type="primary">提交</el-button>
+      </div></el-dialog
+    >
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      visible: false,
+      handleOrderSn: "",
+      orderInfo: {},
+      formData: {
+        invoiceType: 2,
+        type: "",
+        subject: "",
+        invoiceTitle: "",
+        taxRegistryNumber: "",
+        openRemark: "",
+        invoiceMode: [1],
+        email: "",
+        consignee: "",
+        collectionTelephone: "",
+        shippingAddress: ""
+      },
+      rules: {
+        type: [
+          { required: true, message: "请选择发票类型", trigger: "change" }
+        ],
+        subject: [
+          { required: true, message: "请选择发票主体", trigger: "change" }
+        ],
+        invoiceTitle: [{ required: true, message: "请输入", trigger: "blur" }],
+        taxRegistryNumber: [
+          { required: true, message: "请输入", trigger: "blur" }
+        ],
+        openRemark: [
+          { required: false, message: "请输入开票备注", trigger: "blur" }
+        ],
+        email: [{ required: true, message: "请输入收票邮箱", trigger: "blur" }],
+        consignee: [
+          { required: true, message: "请输入收票姓名", trigger: "blur" }
+        ],
+        collectionTelephone: [
+          { required: true, message: "请输入收票电话", trigger: "blur" }
+        ],
+        shippingAddress: [
+          { required: true, message: "请输入收票地址", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  methods: {
+    openBoxs(sn) {
+      this.visible = true;
+      this.orderInfo = {};
+      this.formData = {
+        invoiceType: 2,
+        type: "",
+        subject: "",
+        invoiceTitle: "",
+        taxRegistryNumber: "",
+        openRemark: "",
+        invoiceMode: [1],
+        email: "",
+        consignee: "",
+        collectionTelephone: "",
+        shippingAddress: ""
+      };
+      this.handleOrderSn = sn;
+      this.getOrderDetail();
+      this.$nextTick(() => {
+        this.$refs.formData.clearValidate();
+      });
+    },
+    changeInvoiceMode(){
+        this.formData.email = ""
+        this.formData.consignee = ""
+        this.formData.collectionTelephone = ""
+        this.formData.shippingAddress = ""
+    },
+    getOrderDetail() {
+      this.$request
+        .orderhandledetail({ handleOrderSn: this.handleOrderSn })
+        .then(res => {
+          this.orderInfo = res.data;
+        });
+    },
+    changeQy() {
+      this.formData.invoiceTitle = "";
+      this.formData.taxRegistryNumber = "";
+    },
+    close() {},
+    submitForm() {
+      this.$refs["formData"].validate(valid => {
+        if (valid) {
+          this.$confirm("确定提交吗?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(() => {
+              let obj = JSON.parse(JSON.stringify(this.formData));
+              obj.invoiceMode = obj.invoiceMode.join();
+              obj.orderSn = this.handleOrderSn;
+              obj.amount =
+                this.orderInfo.payPrice - this.orderInfo.goodsRefund >= 0
+                  ? parseFloat(this.orderInfo.payPrice - this.orderInfo.goodsRefund)
+                  : 0;
+              this.$request
+                .orderinvoice(obj)
+                .then(res => {
+                  this.$message.success("提交成功");
+                  this.visible = false;
+                  this.$emit("backFunc");
+                })
+                .catch(err => {
+                  this.$message.error(err.msg);
+                });
+            })
+            .catch(() => {});
+          console.log(this.formData, "formData");
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.ul_ {
+  background-color: #f9fafb;
+  padding: 20px;
+  li {
+    margin-bottom: 20px;
+    &:last-child {
+      margin-bottom: 0px;
+    }
+    span {
+      color: #000;
+      margin-right: 20px;
+    }
+  }
+}
+/deep/ .el-dialog {
+  margin-top: 3vh !important;
+  border-radius: 8px !important;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+</style>

+ 83 - 13
src/pages/person-center/handle-order/order/index.vue

@@ -1,11 +1,12 @@
 <template>
 <template>
   <div id="">
   <div id="">
     <el-dialog
     <el-dialog
+      v-if="visible"
       :visible.sync="visible"
       :visible.sync="visible"
-      width="1000px"
+      width="1400px"
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
-      @closed="close"
+      @close="close"
       :lock-scroll="true"
       :lock-scroll="true"
       :fullscreen="fullscreen"
       :fullscreen="fullscreen"
     >
     >
@@ -19,43 +20,111 @@
           <img
           <img
             src="@/assets/img/Close@2x.png"
             src="@/assets/img/Close@2x.png"
             alt=""
             alt=""
-            @click="visible = false"
+            @click="close()"
           />
           />
         </div>
         </div>
       </div>
       </div>
       <div>
       <div>
-        <el-steps :active="0" finish-status="success" simple>
-          <el-step title="添加学员"></el-step>
-          <el-step title="选择商品"></el-step>
+        <el-steps :active="active" finish-status="success" simple>
+          <el-step title="选择类别"></el-step>
+          <el-step title="商品匹配"></el-step>
           <el-step title="支付选择"></el-step>
           <el-step title="支付选择"></el-step>
           <el-step title="完成"></el-step>
           <el-step title="完成"></el-step>
         </el-steps>
         </el-steps>
         <el-divider></el-divider>
         <el-divider></el-divider>
-        <step-1></step-1>
-        <step-2></step-2>
+        <step-0
+          v-show="active == 0"
+          @backData="backData"
+          :apiData.sync="apiData"
+        ></step-0>
+        <step-1
+          v-show="active == 1"
+          @backData="backData2"
+          @backPage="backPage"
+          :apiData.sync="apiData"
+        ></step-1>
+        <step-2 ref="step2" v-show="active == 2" @backFunc="backData3"></step-2>
+        <step-4 v-show="active == 4" ref="step4" @backFunc="backData4"></step-4>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import step0 from "./step-0.vue";
 import step1 from "./step-1/index.vue";
 import step1 from "./step-1/index.vue";
-import step2 from "./step-2.vue";
+import step2 from "./step-2/index.vue";
+import step4 from "./step-4.vue";
 export default {
 export default {
-  components: { step1, step2 },
+  components: { step0, step1, step2, step4 },
   data() {
   data() {
     return {
     return {
       title: "新增",
       title: "新增",
       visible: false,
       visible: false,
-      fullscreen: false
+      fullscreen: false,
+      active: 0,
+      apiData: {
+        goodsType: "",
+        educationTypeId: "",
+        projectId: "",
+        businessId: "",
+        inputFrom: 1,
+        payType: 1,
+        userGoodsList: []
+      }
     };
     };
   },
   },
   methods: {
   methods: {
-    openBoxs() {
+    backData3(index, status) {
+      if (index == 1) {
+        this.$confirm("订单过期,已自动关闭", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          showCancelButton: false,
+          type: "warning"
+        })
+          .then(() => {
+            this.$parent.search();
+            this.visible = false;
+          })
+          .catch(() => {});
+      }
+      if (index == 3) {
+        this.$refs.step4.openBoxs(status);
+        this.active = 4;
+      }
+    },
+    backData4() {
+      this.$emit("backFunc", { handleOrderSn: this.$refs.step2.handleOrderSn });
+      this.close()
+    },
+    openBoxs(index, row) {
+      this.fullscreen = false
       this.visible = true;
       this.visible = true;
+      this.active = 0;
+      if (index == 2) {
+        this.active = index;
+        this.$nextTick(() => {
+          this.$refs.step2.comeFunc(row.handleOrderSn);
+        });
+      }
     },
     },
     close() {
     close() {
-      this.visible = false;
+      clearInterval(this.$refs.step2.updateWxImg)
+      this.visible = false
+      this.active = 0;
+      this.$parent.search()
+    },
+    backData() {
+      this.active++;
+    },
+    backData2(data) {
+      this.active++;
+      this.$refs.step2.comeFunc(data);
+    },
+    backPage() {
+      this.apiData.userGoodsList = [];
+      this.active--;
     }
     }
   }
   }
 };
 };
@@ -63,6 +132,7 @@ export default {
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 /deep/ .el-dialog {
 /deep/ .el-dialog {
+  margin-top: 3vh !important;
   border-radius: 8px !important;
   border-radius: 8px !important;
   .el-dialog__header {
   .el-dialog__header {
     padding: 0;
     padding: 0;

+ 135 - 0
src/pages/person-center/handle-order/order/step-0.vue

@@ -0,0 +1,135 @@
+<template>
+  <div id="edu_id">
+    <el-select
+      v-model="apiData.goodsType"
+      placeholder="商品类型"
+      @change="changeType"
+    >
+      <el-option
+        v-for="item in goodsTypeOptions"
+        :key="item.value"
+        :label="item.label"
+        :value="item.value"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      :disabled="apiData.goodsType ? false : true"
+      v-model="apiData.educationTypeId"
+      placeholder="教育类型"
+      @change="changeEdu"
+    >
+      <el-option
+        v-for="item in educationType"
+        :key="item.id"
+        :label="item.educationName"
+        :value="item.id"
+      >
+      </el-option>
+    </el-select>
+    <el-select
+      :disabled="apiData.educationTypeId ? false : true"
+      v-model="apiData.businessId"
+      placeholder="培训项目"
+    >
+      <el-option
+        v-for="item in computedList(apiData.educationTypeId)"
+        :key="item.id"
+        :label="item.projectName + ' - ' + item.businessName"
+        :value="item.id"
+      >
+      </el-option>
+    </el-select>
+    <el-button type="warning" @click="next" size="small" :loading="loading"
+      >下一步</el-button
+    >
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  props: {
+    apiData: {
+      type: Object,
+      default: () => {
+        return {};
+      }
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      goodsTypeOptions: [
+        { label: "课程", value: 1 },
+        { label: "题库", value: 2 }
+      ]
+    };
+  },
+  computed: {
+    ...mapGetters(["educationType", "businessList_t"]),
+    computedList: function() {
+      return function(id) {
+        if (this.businessList_t && this.businessList_t.length > 0) {
+          return this.businessList_t.filter(item => item.educationId == id);
+        } else {
+          return [];
+        }
+      };
+    }
+  },
+  methods: {
+    changeType() {
+      this.apiData.educationTypeId = "";
+      this.apiData.businessId = "";
+    },
+    changeEdu() {
+      this.apiData.businessId = "";
+    },
+    next() {
+      if (
+        this.apiData.goodsType &&
+        this.apiData.educationTypeId &&
+        this.apiData.businessId
+      ) {
+        this.loading = true;
+        this.$request
+          .goodsList({
+            goodsType: this.apiData.goodsType,
+            educationTypeId: this.apiData.educationTypeId,
+            businessId: this.apiData.businessId
+          })
+          .then(res => {
+            if (res.total > 0) {
+              let item = this.businessList_t.find(
+                i => i.id == this.apiData.businessId
+              );
+              this.apiData.projectId = item.projectId;
+              this.$emit("backData");
+            } else {
+              this.$message.warning("当前选中类别暂无商品");
+              return;
+            }
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      } else {
+        this.$message.error("请选择类别");
+        return;
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+#edu_id {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .el-select {
+    margin-bottom: 10px;
+  }
+}
+</style>

+ 258 - 0
src/pages/person-center/handle-order/order/step-1/goodsCheckBox.vue

@@ -0,0 +1,258 @@
+<template>
+  <div id="">
+    <el-dialog
+      :visible.sync="visible"
+      width="800px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      @closed="close"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          选择商品<span style="color:#999;font-size:14px;">(可以多选)</span>
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible = false"
+          />
+        </div>
+      </div>
+      <div>
+        <search
+          :formSet="formSet"
+          :formData.sync="formData"
+          @search="getGoodsList()"
+          @init="init"
+        ></search>
+        <el-container style="height: 500px; border: 1px solid #eee">
+          <el-aside width="200px" v-loading="loading_aside">
+            <div
+              class="aside_div"
+              :class="item.id == formData.subjectId ? 'active' : ''"
+              v-for="(item, index) in subjectList"
+              :key="index"
+              @click="activeSuj(item.id)"
+            >
+              {{ item.subjectName }}
+            </div>
+          </el-aside>
+          <el-main
+            v-loading="loading"
+            style="background-color:rgb(242, 242, 242)"
+          >
+            <el-empty
+              description="暂无商品"
+              v-if="goodsList.length === 0"
+            ></el-empty>
+            <el-checkbox-group v-model="checkList">
+              <el-checkbox
+                class="goodsLi"
+                v-for="(item, index) in goodsList"
+                :key="index"
+                :label="item.goodsId"
+                @change="checkListInfoFunc($event, item)"
+                >{{ item.goodsName }} -
+                <span style="color:red;" v-if="item.standPrice > 0"
+                  >¥{{ item.standPrice | formatPrice }}</span
+                ><span v-else style="color:red;">免费</span>
+              </el-checkbox>
+            </el-checkbox-group>
+          </el-main></el-container
+        >
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="submitForm">确定</el-button>
+      </div></el-dialog
+    >
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      visible: false,
+      index: -1,
+      formSet: [
+        {
+          prop: "goodsName",
+          placeholder: "输入商品名称"
+        }
+      ],
+      formData: {},
+      subjectList: [],
+      goodsList: [],
+      loading_aside: false,
+      loading: false,
+      checkList: [],
+      checkListInfo: []
+    };
+  },
+  methods: {
+    checkListInfoFunc(status, row) {
+      if (status) {
+        let ary = {
+          goodsId: row.goodsId,
+          goodsName: row.goodsName,
+          year: row.year,
+          subjectNames: row.subjectNames,
+          standPrice: row.standPrice
+        };
+        this.checkListInfo.push(ary);
+      } else {
+        this.checkListInfo = this.checkListInfo.filter(
+          i => i.goodsId != row.goodsId
+        );
+      }
+    },
+    openBoxs(index, row, apiData) {
+      this.subjectList = [];
+      this.goodsList = [];
+      this.formData = {
+        goodsType: apiData.goodsType,
+        goodsName: "",
+        educationTypeId: apiData.educationTypeId,
+        projectId: apiData.projectId,
+        businessId: apiData.businessId,
+        subjectId: "",
+        showStatus: 1,
+        goodsStatus: 1
+      };
+      this.index = index;
+      if (row && row.length > 0) {
+        this.checkList = row.map(i => i.goodsId);
+        this.checkListInfo = row.map(i => {
+          return {
+            goodsId: i.goodsId,
+            goodsName: i.goodsName,
+            year: i.year,
+            subjectNames: i.subjectNames,
+            standPrice: i.standPrice
+          };
+        });
+      } else {
+        this.checkList = [];
+        this.checkListInfo = [];
+      }
+      this.getSubjectApi();
+      this.visible = true;
+    },
+    getSubjectApi() {
+      this.loading_aside = true;
+      this.subjectList = [];
+      this.$request
+        .subjectList({
+          educationId: this.formData.educationTypeId,
+          projectId: this.formData.projectId,
+          businessId: this.formData.businessId,
+          status: 1
+        })
+        .then(res => {
+          this.subjectList = [{ id: "", subjectName: "全部" }].concat(res.rows);
+          this.formData.subjectId = "";
+          this.getGoodsList();
+        })
+        .finally(() => {
+          this.loading_aside = false;
+        });
+    },
+    getGoodsList() {
+      this.goodsList = [];
+      this.loading = true;
+      this.$request
+        .goodsList(this.formData)
+        .then(res => {
+          this.goodsList = res.rows || [];
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    activeSuj(id) {
+      this.formData.subjectId = id;
+      this.getGoodsList();
+    },
+    submitForm() {
+      this.$emit("backGoodsData", this.index, this.checkListInfo);
+      this.visible = false;
+    },
+    close() {},
+    init() {
+      this.formData.goodsName = "";
+      this.getGoodsList();
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.el-aside {
+  border-right: 1px solid #eee;
+}
+.aside_div {
+  user-select: none;
+  cursor: pointer;
+  text-align: center;
+  height: 40px;
+  line-height: 40px;
+  border-bottom: 1px solid #eee;
+  &:hover {
+    background-color: rgb(242, 242, 242);
+    color: #007aff;
+  }
+}
+.active {
+  background-color: rgb(242, 242, 242);
+  color: #007aff;
+}
+.goodsLi {
+  display: block;
+  margin-bottom: 10px;
+}
+/deep/ .el-dialog {
+  border-radius: 8px !important;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+</style>

+ 500 - 89
src/pages/person-center/handle-order/order/step-1/index.vue

@@ -1,73 +1,184 @@
 <template>
 <template>
   <div id="">
   <div id="">
-    <search
-      :formSet="formSet"
-      :formData.sync="formData"
-      @search="search"
-      @init="init"
-    ></search>
+    <header class="header_t_0">
+      <span
+        >教育类型:<i>{{ getEduName(apiData.educationTypeId) }}</i></span
+      >
+      <span
+        >培训项目:<i>{{ getBusName(apiData.businessId) }}</i></span
+      >
+      <span
+        >人数:<i>{{ apiData.userGoodsList.length || 0 }}位</i></span
+      >
+      <span
+        >数量:<i>{{ getTotal(apiData.userGoodsList) }}个</i></span
+      >
+      <span
+        >总金额:<i
+          >¥{{ getTotalPrice(apiData.userGoodsList) | formatPrice }}</i
+        ></span
+      >
+    </header>
     <header class="header_t">
     <header class="header_t">
-      <h2>学员列表x条</h2>
+      <div>
+        <el-input
+          v-model="searchData.searchKey"
+          :size="size"
+          placeholder="输入姓名/身份证号"
+          style="margin-right:10px;"
+        ></el-input>
+        <el-button :size="size" @click="searchData.searchKey = ''"
+          >重置</el-button
+        >
+      </div>
       <div>
       <div>
         <el-button :size="size" type="primary" @click="studentPage(-1)"
         <el-button :size="size" type="primary" @click="studentPage(-1)"
-          >新增</el-button
+          >新增学员</el-button
+        >
+        <el-button :size="size" type="primary" @click="importStudentFunc"
+          >导入学员</el-button
+        >
+        <el-button :size="size" type="primary" @click="goodsCheckBox(-1)"
+          >匹配商品</el-button
+        >
+        <el-button :size="size" type="primary" @click="del(-1)"
+          >批量删除</el-button
+        >
+        <el-button :size="size" type="primary" @click="backFunc"
+          >上一步</el-button
+        >
+        <el-button :size="size" type="warning" @click="submit"
+          >提交支付</el-button
         >
         >
-        <el-button :size="size" type="primary">导入学员</el-button>
-        <el-button :size="size" type="primary">批量删除</el-button>
-        <el-button :size="size" type="warning">下一步</el-button>
       </div>
       </div>
     </header>
     </header>
     <el-main>
     <el-main>
-      <el-table
-        :size="size"
-        :data="tableData"
-        style="width: 100%"
-        border
-        :header-cell-style="{
-          'background-color': '#eee',
-          color: '#333',
-          fontSize: '14px'
-        }"
-      >
-        <el-table-column align="center" type="selection" width="55">
-        </el-table-column>
-        <el-table-column align="center" type="index" width="50" label="序号">
-        </el-table-column>
-        <el-table-column
-          v-for="(item, index) in tableSet"
-          :key="index"
-          align="center"
-          :label="item.label"
-          :prop="item.prop"
-          :width="item.width"
+      <el-form :model="apiData" :rules="rules" ref="ruleForm">
+        <el-table
+          max-height="520px"
+          ref="table"
+          :size="size"
+          :data="
+            apiData.userGoodsList.filter(
+              data =>
+                !searchData.searchKey ||
+                data.realname
+                  .toLowerCase()
+                  .includes(searchData.searchKey.toLowerCase()) ||
+                data.idCard
+                  .toLowerCase()
+                  .includes(searchData.searchKey.toLowerCase())
+            )
+          "
+          style="width: 100%"
+          border
+          :header-cell-style="{
+            'background-color': '#eee',
+            color: '#333',
+            fontSize: '14px'
+          }"
         >
         >
-          <template slot-scope="scope">
-            <span>{{ scope.row[item.prop] }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column align="center" type="index" label="操作" width="120">
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              :size="size"
-              @click="studentPage(scope.$index, scope.row)"
-              >修改</el-button
-            >
-            <el-button type="text" :size="size" @click="del(scope.$index)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
+          <el-table-column align="center" type="selection" width="55">
+          </el-table-column>
+          <el-table-column align="center" type="index" width="50" label="序号">
+          </el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableSet"
+            :key="index"
+            align="center"
+            :label="item.label"
+            :prop="item.prop"
+            :width="item.width"
+          >
+            <template slot-scope="scope">
+              <el-form-item
+                v-if="item.scope == 'input'"
+                :prop="'userGoodsList.' + scope.$index + '.' + item.prop"
+                :rules="rules[item.prop]"
+              >
+                <el-input v-model="scope.row[item.prop]"></el-input>
+              </el-form-item>
+
+              <el-select
+                style="margin-bottom:22px;"
+                v-else-if="item.scope == 'select'"
+                v-model="scope.row[item.prop]"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="(items, indexs) in item.options"
+                  :key="indexs"
+                  :label="items.label"
+                  :value="items.value"
+                >
+                </el-option>
+              </el-select>
+              <div v-else-if="item.scope == 'goods'">
+                <div
+                  v-for="(items, indexs) in scope.row.goodsList"
+                  :key="indexs"
+                >
+                  {{
+                    items.year +
+                      "/" +
+                      items.subjectNames +
+                      "/" +
+                      items.goodsName +
+                      "/"
+                  }}
+                  <span v-if="items.standPrice > 0"
+                    >¥{{ items.standPrice | formatPrice }}</span
+                  ><span v-else>免费</span>
+                </div>
+              </div>
+              <div v-else-if="item.scope == 'price'" style="color:red;">
+                ¥{{ getPrice(scope.row.goodsList) | formatPrice }}
+              </div>
+              <span v-else>{{ scope.row[item.prop] }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="操作"
+            width="160"
+            fixed="right"
+          >
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                :size="size"
+                @click="goodsCheckBox(scope.$index, scope.row.goodsList)"
+                >匹配商品</el-button
+              >
+              <el-button type="text" :size="size" @click="del(scope.$index)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form>
     </el-main>
     </el-main>
     <student-page ref="studentPage" @backStudentData="backStudentData" />
     <student-page ref="studentPage" @backStudentData="backStudentData" />
+    <goodsCheckBox ref="goodsCheckBox" @backGoodsData="backGoodsData" />
+    <import-student ref="importStudent" @backFunc="backStudentFunc" />
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import { mapGetters } from "vuex";
 import studentPage from "./studentPage.vue";
 import studentPage from "./studentPage.vue";
+import goodsCheckBox from "./goodsCheckBox.vue";
+import importStudent from "../../../handle-rollCall/importStudent.vue";
 export default {
 export default {
-  components: { studentPage },
+  components: { studentPage, goodsCheckBox, importStudent },
+  props: {
+    apiData: {
+      type: Object,
+      default: () => {
+        return {};
+      }
+    }
+  },
   data() {
   data() {
     const edu_level = () => {
     const edu_level = () => {
       let ary = this.$store.state.dictList["edu_level"].map(i => {
       let ary = this.$store.state.dictList["edu_level"].map(i => {
@@ -78,76 +189,363 @@ export default {
       });
       });
       return ary;
       return ary;
     };
     };
+    const validateTel = (rule, value, callback) => {
+      var reg = /^1[34578][0-9]{9}$/;
+      if (!reg.test(value)) {
+        return callback(new Error("请输入正确手机号码"));
+      } else if (this.checkTel == value) {
+        return callback(new Error("当前手机号码已被创建"));
+      } else {
+        callback();
+      }
+    };
+    const validateIdcard = (rule, value, callback) => {
+      let _IDRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+      let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
+      if (!_IDRe18.test(value) && !_IDre15.test(value)) {
+        return callback(new Error("请输入正确身份证号码"));
+      } else {
+        callback();
+      }
+    };
     return {
     return {
+      rules: {
+        realname: [{ required: true, message: "请输入姓名", trigger: "blur" }],
+        idCard: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateIdcard
+          }
+        ],
+        telphone: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateTel
+          }
+        ]
+      },
       size: "small",
       size: "small",
-      formSet: [
-        {
-          prop: "goodsType",
-          placeholder: "学历",
-          scope: "select",
-          options: edu_level()
-        },
-        {
-          prop: "searchKey",
-          placeholder: "输入姓名/身份证号/商品名称"
-        }
-      ],
-      formData: {},
+      searchData: {},
+      checkTel: "",
       tableSet: [
       tableSet: [
         {
         {
           label: "姓名",
           label: "姓名",
-          prop: "name"
+          prop: "realname",
+          scope: "input",
+          width: "120px"
         },
         },
         {
         {
-          label: "性别",
-          prop: "sex"
+          label: "身份证号",
+          prop: "idCard",
+          scope: "input",
+          width: "200px"
         },
         },
         {
         {
-          label: "身份证号",
-          prop: "idCard"
+          label: "手机号码",
+          prop: "telphone",
+          scope: "input",
+          width: "150px"
         },
         },
         {
         {
           label: "学历",
           label: "学历",
-          prop: "edu"
+          prop: "eduLevel",
+          scope: "select",
+          options: edu_level(),
+          width: "140px"
         },
         },
         {
         {
           label: "所属公司",
           label: "所属公司",
-          prop: "company"
+          prop: "companyName",
+          scope: "input",
+          width: "220px"
+        },
+        {
+          label: "年份/科目/商品/价格",
+          scope: "goods",
+          width: "350px"
+        },
+        {
+          label: "金额",
+          scope: "price",
+          width: "180px"
+        }
+      ]
+    };
+  },
+  computed: {
+    ...mapGetters(["educationType", "businessList_t"]),
+    getEduName: function() {
+      return function(id) {
+        if (this.educationType && this.educationType.length > 0) {
+          let ary = this.educationType.find(i => i.id == id) || {};
+          return ary.educationName;
+        } else {
+          return "";
+        }
+      };
+    },
+    getBusName: function() {
+      return function(id) {
+        if (this.businessList_t && this.businessList_t.length > 0) {
+          let ary = this.businessList_t.find(i => i.id == id) || {};
+          return ary.projectName + " - " + ary.businessName;
+        } else {
+          return "";
+        }
+      };
+    },
+    getPrice: function() {
+      return function(list) {
+        if (list && list.length > 0) {
+          let num = 0;
+          list.forEach(i => (num += i.standPrice));
+          return num || 0;
+        } else {
+          return 0;
         }
         }
-      ],
-      tableData: [{
-        name:"tang"
-      },{
-        name:"lian"
-      },{
-        name:"feng"
-      }]
+      };
+    },
+    getTotal: function() {
+      return function(list) {
+        if (list && list.length > 0) {
+          let num = 0;
+          list.forEach(i => (num += (i.goodsList && i.goodsList.length) || 0));
+          return num || 0;
+        } else {
+          return 0;
+        }
+      };
+    },
+    getTotalPrice: function() {
+      return function(list) {
+        if (list && list.length > 0) {
+          let num = 0;
+          list.forEach(i => {
+            i.goodsList &&
+              i.goodsList.forEach(k => {
+                num += k.standPrice || 0;
+              });
+          });
+          return num || 0;
+        } else {
+          return 0;
+        }
+      };
+    }
+  },
+  mounted() {
+    const apiData = {
+      goodsType: 1,
+      educationTypeId: 107,
+      projectId: 3665,
+      businessId: 34355,
+      inputFrom: 1,
+      payType: 1,
+      userGoodsList: [
+        {
+          realname: "唐",
+          sex: "男",
+          idCard: "445224199901043000",
+          telphone: "13602712680",
+          eduLevel: "小学",
+          companyName: "中正",
+          goodsList: [
+            {
+              goodsId: 303723,
+              goodsName: "2023年一级建造师-选修1",
+              year: 2023,
+              subjectNames: "市政,必修,矿业,建筑,机电,水利水电,公路",
+              standPrice: 3433523
+            },
+            {
+              goodsId: 303724,
+              goodsName: "2023年一级建造师-选修2",
+              year: 2023,
+              subjectNames: "市政,必修,矿业,建筑,机电,水利水电,公路",
+              standPrice: 34424
+            }
+          ]
+        },
+        {
+          realname: "连",
+          sex: "男",
+          idCard: "445224199901013055",
+          telphone: "13602711111",
+          eduLevel: "初中",
+          companyName: "中正",
+          goodsList: [
+            {
+              goodsId: 303723,
+              goodsName: "2023年一级建造师-选修1",
+              year: 2023,
+              subjectNames: "市政,必修,矿业,建筑,机电,水利水电,公路",
+              standPrice: 3433523
+            }
+          ]
+        },
+        {
+          realname: "锋",
+          sex: "男",
+          idCard: "445224199901013056",
+          telphone: "13602711112",
+          eduLevel: "初中",
+          companyName: "中正",
+          goodsList: [
+            {
+              goodsId: 303723,
+              goodsName: "2023年一级建造师-选修1",
+              year: 2023,
+              subjectNames: "市政,必修,矿业,建筑,机电,水利水电,公路",
+              standPrice: 3433523
+            },
+            {
+              goodsId: 303722,
+              goodsName: "2023年一级建造师-必修",
+              year: 2023,
+              subjectNames: "市政,必修,矿业,建筑,机电,水利水电,公路",
+              standPrice: 15641651
+            }
+          ]
+        }
+      ]
     };
     };
   },
   },
   methods: {
   methods: {
+    submit() {
+      if (this.apiData.userGoodsList.length == 0) {
+        this.$message.warning("请新增学员数据");
+        return;
+      }
+      let status = this.apiData.userGoodsList.every(i => {
+        return i.goodsList && i.goodsList.length > 0;
+      });
+      if (!status) {
+        this.$message.warning("请为学员匹配商品");
+        return;
+      }
+      this.checkTel = "";
+      this.$refs["ruleForm"].validate(valid => {
+        if (valid) {
+          let ary = JSON.parse(JSON.stringify(this.apiData));
+          ary.userGoodsList.forEach(i => {
+            i.user = {
+              realname: i.realname,
+              sex: i.sex,
+              idCard: i.idCard,
+              companyName: i.companyName,
+              telphone: i.telphone,
+              eduLevel: i.eduLevel
+            };
+            delete i.realname;
+            delete i.sex;
+            delete i.idCard;
+            delete i.companyName;
+            delete i.telphone;
+            delete i.eduLevel;
+          });
+          this.$request
+            .orderhandle(ary)
+            .then(res => {
+              this.checkTel = "";
+              this.$emit("backData", res.data);
+            })
+            .catch(err => {
+              if (err.code == 439) {
+                this.checkTel = err.msg;
+                this.$refs["ruleForm"].validate();
+              }
+            });
+        } else {
+          return false;
+        }
+      });
+    },
     //学员编辑
     //学员编辑
     studentPage(index, row) {
     studentPage(index, row) {
-      console.log(index);
       this.$refs.studentPage.openBoxs(index, row);
       this.$refs.studentPage.openBoxs(index, row);
     },
     },
-    backStudentData(index, row) {
-      if (index == -1) {
-        this.tableData.push(row);
-      } else {
-        this.tableData.splice(index, 1, row);
+    //匹配商品
+    goodsCheckBox(index, row) {
+      if (index == -1 && this.$refs.table.selection.length == 0) {
+        this.$message.error("请勾选需要匹配商品的学员");
+        return;
       }
       }
+      this.$refs.goodsCheckBox.openBoxs(index, row, this.apiData);
     },
     },
-    del(index) {
-      this.$confirm("确定删除吗", "提示", {
+    backFunc() {
+      this.$confirm("返回上一步将导致当前页数据丢失,是否继续?", "提示", {
         confirmButtonText: "确定",
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         cancelButtonText: "取消",
         type: "warning"
         type: "warning"
       })
       })
         .then(() => {
         .then(() => {
-          this.tableData.splice(index, 1);
+          this.$emit("backPage");
         })
         })
         .catch(() => {});
         .catch(() => {});
     },
     },
+    importStudentFunc() {
+      this.$refs.importStudent.openBoxs(true);
+    },
+    backStudentFunc(row) {
+      this.apiData.userGoodsList.push(...row);
+    },
+    backStudentData(index, row) {
+      if (index == -1) {
+        this.apiData.userGoodsList.push(row);
+      } else {
+        this.apiData.userGoodsList.splice(index, 1, row);
+      }
+    },
+    del(index) {
+      if (index == -1) {
+        if (this.$refs.table.selection.length > 0) {
+          this.$confirm("确定批量删除吗", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(() => {
+              this.$refs.table.selection.forEach(i => {
+                this.apiData.userGoodsList = this.apiData.userGoodsList.filter(
+                  item => {
+                    return item != i;
+                  }
+                );
+              });
+              this.$refs.table.clearSelection();
+              this.$message.success("操作成功");
+            })
+            .catch(() => {});
+        } else {
+          this.$message.error("请选择需要删除的数据");
+          return;
+        }
+      } else {
+        this.$confirm("确定删除吗", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            this.apiData.userGoodsList.splice(index, 1);
+            this.$message.success("操作成功");
+          })
+          .catch(() => {});
+      }
+    },
+    backGoodsData(index, ary) {
+      if (index == -1) {
+        this.$refs.table.selection.forEach((i, k) => {
+          i.goodsList = ary;
+        });
+        this.$refs.table.clearSelection();
+      } else {
+        this.$set(this.apiData.userGoodsList[index], "goodsList", ary);
+      }
+      this.$message.success("操作成功");
+    },
     search() {},
     search() {},
     init() {}
     init() {}
   }
   }
@@ -155,6 +553,19 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.header_t_0 {
+  display: flex;
+  align-items: center;
+  margin-bottom: 14px;
+  span {
+    margin-right: 14px;
+    color: #999;
+    i {
+      font-style: normal;
+      color: #000;
+    }
+  }
+}
 .header_t {
 .header_t {
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;

+ 32 - 3
src/pages/person-center/handle-order/order/step-1/studentPage.vue

@@ -79,6 +79,23 @@
 <script>
 <script>
 export default {
 export default {
   data() {
   data() {
+    const validateTel = (rule, value, callback) => {
+      var reg = /^1[34578][0-9]{9}$/;
+      if (!reg.test(value)) {
+        return callback(new Error("请输入正确手机号码"));
+      } else {
+        callback();
+      }
+    };
+    const validateIdcard = (rule, value, callback) => {
+      let _IDRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+      let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
+      if (!_IDRe18.test(value) && !_IDre15.test(value)) {
+        return callback(new Error("请输入正确身份证号码"));
+      } else {
+        callback();
+      }
+    };
     return {
     return {
       index: -1,
       index: -1,
       visible: false,
       visible: false,
@@ -94,10 +111,22 @@ export default {
         realname: [{ required: true, message: "请输入姓名", trigger: "blur" }],
         realname: [{ required: true, message: "请输入姓名", trigger: "blur" }],
         sex: [{ required: true, message: "请选择性别", trigger: "change" }],
         sex: [{ required: true, message: "请选择性别", trigger: "change" }],
         idCard: [
         idCard: [
-          { required: true, message: "请输入身份证号", trigger: "blur" }
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateIdcard
+          }
+        ],
+        telphone: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateTel
+          }
+        ],
+        eduLevel: [
+          { required: true, message: "请选择学历", trigger: "change" }
         ],
         ],
-        telphone: [{ required: true, message: "请输入手机号码", trigger: "blur" }],
-        eduLevel: [{ required: true, message: "请选择学历", trigger: "change" }],
         companyName: [
         companyName: [
           { required: true, message: "请输入所属公司", trigger: "blur" }
           { required: true, message: "请输入所属公司", trigger: "blur" }
         ]
         ]

+ 0 - 16
src/pages/person-center/handle-order/order/step-2.vue

@@ -1,16 +0,0 @@
-<template>
-  <div id="">
-    step2
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {};
-  },
-  methods: {}
-};
-</script>
-
-<style lang="scss" scoped></style>

+ 283 - 0
src/pages/person-center/handle-order/order/step-2/index.vue

@@ -0,0 +1,283 @@
+<template>
+  <div id="">
+    <el-main v-loading="loading" style="padding:0px 14px;">
+      <h2>
+        <span style="font-size:16px;">订单详情</span>
+        <el-button type="text">查看</el-button>
+      </h2>
+      <ul class="ul_">
+        <li>
+          商品类型:<span>{{
+            orderInfo.goodsType == 1
+              ? "课程"
+              : orderInfo.goodsType == 2
+              ? "题库"
+              : ""
+          }}</span>
+        </li>
+        <li>
+          教育类型:<span>{{ orderInfo.educationName }}</span
+          >项目类型:<span
+            >{{ orderInfo.projectName }}-{{ orderInfo.businessName }}</span
+          >订购人数:<span>{{ orderInfo.userNum || 0 }}位</span>订购数量:<span
+            >{{ orderInfo.goodsNum || 0 }}个</span
+          >
+        </li>
+        <li>
+          订购金额:<span style="color:red;"
+            >¥{{ orderInfo.orderPrice | formatPrice }}</span
+          >
+        </li>
+      </ul>
+    </el-main>
+    <el-divider></el-divider>
+    <el-main style="padding:0px 14px;">
+      <h2 style="margin-bottom:14px;">
+        <span style="font-size:16px;">支付方式</span
+        ><span style="font-size:14px;color:#7f7f7f;font-weight:400;"
+          >(订单在<el-statistic
+            v-if="orderInfo.overTime"
+            @finish="orderHilarity"
+            format="DD天HH小时mm分ss秒"
+            :value="orderInfo.overTime * 1000"
+            time-indices
+          >
+          </el-statistic
+          >后将自动关闭,请尽快完成支付)</span
+        >
+      </h2>
+      <div class="pay_box">
+        <div class="li li_l">
+          <img
+            v-if="!imgData.urlBase64"
+            src="@/assets/qrcode.png"
+            alt=""
+            @click="updateImg"
+          />
+          <img v-else :src="imgData.urlBase64" alt="" />
+          <div class="p_r">
+            <div style="color:#333;font-weight:bold;font-size:16px;">
+              在线支付<el-tag
+                type="warning"
+                effect="dark"
+                size="mini"
+                style="margin-left:6px;"
+              >
+                推荐
+              </el-tag>
+            </div>
+            <div class="wx_a">
+              <img src="@/assets/wxpay.png" alt="" />
+            </div>
+            <div>
+              <span style="font-size:16px;">应付金额:</span
+              ><span style="color:red;font-size:20px;font-weight:bold;">
+                <span style="font-size:14px;">¥</span
+                >{{ orderInfo.payPrice | formatPrice }}</span
+              >
+            </div>
+            <div style="font-size:16px;">
+              支付码有效时间<el-statistic
+                v-if="imgData.overTime"
+                @finish="hilarity"
+                format="mm分ss秒"
+                :value="imgData.overTime * 1000"
+                time-indices
+              >
+              </el-statistic>
+            </div>
+          </div>
+        </div>
+        <div class="fgx"></div>
+        <div class="li li_2">
+          <div class="li_2_s">
+            <div class="top_zz">
+              <img src="@/assets/dgzz.png" alt="" />
+              <div class="zz_r">
+                <h2>对公转账</h2>
+                <p>
+                  请在订单关闭前,完成对公转账并且提交公司信
+                  息及付款回执。(到账后 1 个工作日内开通)
+                </p>
+              </div>
+            </div>
+            <el-button @click="publictransferFunc">选择对公转账</el-button>
+          </div>
+        </div>
+      </div>
+    </el-main>
+    <public-transfer
+      ref="publicTransfer"
+      @backFunc="backFuncTransfer"
+    />
+  </div>
+</template>
+
+<script>
+import publicTransfer from "./publicTransfer.vue";
+export default {
+  components: { publicTransfer },
+  data() {
+    return {
+      orderInfo: {},
+      imgData: {},
+      loading: false,
+      handleOrderSn: "",
+      updateWxImg: null
+    };
+  },
+  mounted() {},
+  methods: {
+    //订单过期
+    orderHilarity() {
+      //1过期2已支付
+      this.$emit("backFunc", 1);
+    },
+    //更新wx二维码
+    updateImg() {
+      this.getWxPayData();
+    },
+    //wx过期
+    hilarity() {
+      this.imgData.urlBase64 = "";
+    },
+    backFuncTransfer() {
+      this.getOrderData();
+    },
+    publictransferFunc() {
+      this.$refs.publicTransfer.openBoxs(this.handleOrderSn);
+    },
+    comeFunc(data) {
+      this.handleOrderSn = data;
+      this.getOrderData();
+    },
+    getOrderData(status) {
+      this.loading = status ? false : true;
+      this.$request
+        .orderhandledetail({ handleOrderSn: this.handleOrderSn })
+        .then(res => {
+          this.orderInfo = res.data;
+          if (res.data.payStatus == 0) {
+            if (status) return;
+            this.getWxPayData();
+            this.updateWxImg = setInterval(() => {
+              this.getOrderData(true);
+            }, 1500);
+          } else {
+            clearInterval(this.updateWxImg);
+            this.$emit("backFunc", 3, res.data.payStatus);
+            this.$refs.publicTransfer.visible = false
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    getWxPayData() {
+      this.$request
+        .orderhandleresumePay({
+          payType: 1,
+          handleOrderSn: this.handleOrderSn
+        })
+        .then(res => {
+          this.imgData = res.data || {};
+        })
+        .catch(() => {
+          this.imgData = {};
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.ul_ {
+  background-color: #f9fafb;
+  padding: 20px;
+  li {
+    margin-bottom: 20px;
+    &:last-child {
+      margin-bottom: 0px;
+    }
+    span {
+      color: #000;
+      margin-right: 20px;
+    }
+  }
+}
+.pay_box {
+  display: flex;
+  .li {
+    flex: 1;
+    display: flex;
+    &:first-child {
+      display: flex;
+      & > img {
+        width: 145px;
+        height: 145px;
+        padding: 4px;
+        border: 1px solid #eee;
+        border-radius: 8px;
+        margin-right: 20px;
+      }
+      & > .p_r {
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+      }
+    }
+  }
+  .li_2 {
+    justify-content: center;
+  }
+  .li_2_s {
+    width: 366px;
+    & > .top_zz {
+      display: flex;
+      margin-bottom: 30px;
+      & > img {
+        margin-right: 10px;
+        width: 52px;
+        height: 52px;
+        background-color: #eee;
+      }
+      & > .zz_r {
+        flex: 1;
+        & > h2 {
+          font-size: 16px;
+          color: #333;
+          margin-bottom: 4px;
+        }
+        & > p {
+          line-height: 24px;
+        }
+      }
+    }
+    & > .el-button {
+      width: 100%;
+    }
+  }
+  .fgx {
+    margin: 0px 20px;
+    width: 1px;
+    background-color: #eee;
+  }
+}
+.wx_a {
+  & > img {
+    width: 113.4px;
+    height: 36px;
+  }
+}
+/deep/ .el-statistic {
+  width: auto;
+  display: inline-block;
+  .con {
+    & > .number {
+      font-size: 14px;
+      color: #007aff;
+    }
+  }
+}
+</style>

+ 371 - 0
src/pages/person-center/handle-order/order/step-2/publicTransfer.vue

@@ -0,0 +1,371 @@
+<template>
+  <div id="">
+    <el-dialog
+      :visible.sync="visible"
+      width="1000px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      @closed="close"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          对公转账
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible = false"
+          />
+        </div>
+      </div>
+      <div class="box">
+        <div class="box_l">
+          <h2>第一步:对公转账</h2>
+          <el-main>
+            <h2>汇款信息</h2>
+            <p><span>企业全称:</span> {{ orderInfo.recCompanyName }}</p>
+            <p><span>开户银行:</span> {{ orderInfo.recCompanyBank }}</p>
+            <p><span>银行账户:</span> {{ orderInfo.recCompanyAccount }}</p>
+            <p>
+              <span>转账备注:</span>
+              {{
+                orderInfo.recCompanyAccount &&
+                  orderInfo.recCompanyAccount.slice(0, 6)
+              }}(打款时请备注此信息)
+            </p>
+            <p>
+              <span>转账金额:</span
+              ><i style="font-style:normal;color:red;font-weight:bold;">
+                ¥{{ orderInfo.payPrice | formatPrice }}</i
+              >
+            </p>
+            <el-button size="mini" style="margin-top:24px;" @click="copy"
+              >复制汇款信息</el-button
+            >
+          </el-main>
+        </div>
+        <div class="box_r">
+          <h2>第二步:填写公司信息及上传付款回执</h2>
+          <el-form
+            :disabled="!changeStatus"
+            size="small"
+            label-position="top"
+            :model="ruleForm"
+            :rules="rules"
+            ref="ruleForm"
+            label-width="100px"
+            class="demo-ruleForm"
+          >
+            <el-form-item label="企业全称" prop="companyName">
+              <el-input v-model="ruleForm.companyName"></el-input>
+            </el-form-item>
+            <el-form-item label="联系电话" prop="companyTel">
+              <el-input v-model="ruleForm.companyTel"></el-input>
+            </el-form-item>
+            <el-form-item label="备注" prop="companyRemark">
+              <el-input v-model="ruleForm.companyRemark"></el-input>
+            </el-form-item>
+            <el-form-item label="请上传转账凭证" prop="companyPayImg">
+              <el-image
+                v-if="ruleForm.companyPayImg"
+                style="width: 100px; height: 100px"
+                :src="ruleForm.companyPayImg"
+                :preview-src-list="[ruleForm.companyPayImg]"
+              >
+              </el-image>
+              <label for="uplose" class="label_img" v-else>
+                <p style="font-size:16px;color:#007aff;">+点击上传</p>
+                <p style="color:#aaa;">
+                  请上传转账凭证图片或是截图,支持png、jpg
+                </p>
+              </label>
+              <el-button
+                v-if="ruleForm.companyPayImg && changeStatus"
+                type="danger"
+                size="mini"
+                @click="delImg"
+                >删除</el-button
+              >
+              <input
+                ref="file"
+                type="file"
+                style="display: none"
+                id="uplose"
+                multiple
+                @change="getImgFile"
+              /> </el-form-item
+          ></el-form>
+        </div>
+      </div>
+      <p v-if="orderInfo.payStatus == -2">
+        <span style="font-size:14px;color:#2f4378;">审核意见:</span>
+        <span style="color:red;">{{ orderInfo.checkReason }}</span>
+      </p>
+      <div slot="footer" class="dialog-footer" v-if="changeStatus">
+        <el-button @click="submitForm" type="primary">提交</el-button>
+      </div></el-dialog
+    >
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      handleOrderSn: "",
+      visible: false,
+      ruleForm: {
+        companyName: "",
+        companyPayImg: "",
+        companyTel: "",
+        companyPayImg: ""
+      },
+      rules: {
+        companyName: [
+          { required: true, message: "请输入企业全称", trigger: "blur" }
+        ],
+        companyTel: [
+          { required: true, message: "请输入联系电话", trigger: "blur" }
+        ],
+        companyPayImg: [
+          {
+            required: true,
+            message: "请上传转账凭证",
+            trigger: ["change", "blur"]
+          }
+        ]
+      },
+      fileList: [],
+      orderInfo: {},
+      changeStatus: true
+    };
+  },
+  methods: {
+    /**
+     * 上传发票照片
+     */
+    getImgFile(e) {
+      var self = this;
+      var file = e.target.files[0];
+      if (file === undefined) {
+        self.$set(self.ruleForm, "companyPayImg", "");
+        return;
+      }
+      if (file.size > 1 * 1024 * 1024) {
+        self.$message.error("图片不得大于1MB");
+        return;
+      }
+      var type = e.target.files[0].name
+        .toLowerCase()
+        .split(".")
+        .splice(-1);
+      if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
+        self.$message.error("上传格式需为:.jpg/.png/.jpeg");
+        e.target.value = "";
+        return;
+      }
+      this.$upload.upload(file, 0).then(res => {
+        self.ruleForm.companyPayImg = self.$tools.splitImgHost(res);
+        this.$refs["ruleForm"].validateField("companyPayImg");
+      });
+    },
+    openBoxs(sn, status = true) {
+      this.changeStatus = status;
+      this.handleOrderSn = sn;
+      this.ruleForm = {
+        companyName: "",
+        companyTel: "",
+        companyRemark: "",
+        companyPayImg: ""
+      };
+      this.visible = true;
+      this.getOrderData();
+    },
+    getOrderData() {
+      this.$request
+        .orderhandledetail({ handleOrderSn: this.handleOrderSn })
+        .then(res => {
+          this.orderInfo = res.data;
+          this.ruleForm = {
+            companyName: res.data.companyName,
+            companyTel: res.data.companyTel,
+            companyRemark: res.data.companyRemark,
+            companyPayImg: res.data.companyPayImg
+          };
+        });
+    },
+    submitForm() {
+      this.$refs["ruleForm"].validate(valid => {
+        if (valid) {
+          if (this.orderInfo.payStatus == -2) {
+            this.$request
+              .orderhandleupdateRefuseBo({
+                handleOrderSn: this.handleOrderSn,
+                ...this.ruleForm
+              })
+              .then(res => {
+                this.$message.success("提交成功");
+                this.$emit("backFunc");
+                this.visible = false;
+              })
+              .catch(err => {
+                this.$message.error(err.msg);
+              });
+          } else {
+            this.$request
+              .orderhandleresumePay({
+                payType: 2,
+                handleOrderSn: this.handleOrderSn,
+                ...this.ruleForm
+              })
+              .then(res => {
+                this.$message.success("提交成功");
+                this.$emit("backFunc");
+                this.visible = false;
+              })
+              .catch(err => {
+                this.$message.error(err.msg);
+              });
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    close() {},
+    delImg() {
+      this.ruleForm.companyPayImg = "";
+      this.$refs["ruleForm"].validateField("companyPayImg");
+    },
+    copy() {
+      let func = text => {
+        var textArea = document.createElement("textarea");
+        textArea.value = text;
+        document.body.appendChild(textArea);
+        textArea.select();
+        document.execCommand("copy");
+        document.body.removeChild(textArea);
+      };
+      func(
+        `企业全称:${this.orderInfo.recCompanyName},开户银行:${
+          this.orderInfo.recCompanyBank
+        },银行账号:${this.orderInfo.recCompanyAccount},转账备注:${this
+          .orderInfo.recCompanyAccount &&
+          this.orderInfo.recCompanyAccount.slice(
+            0,
+            6
+          )}(打款时请备注此信息),转账金额:¥${this.orderInfo.payPrice && this.orderInfo.payPrice.toLocaleString(
+          "zh-CN",
+          (undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
+        )}`
+      );
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.box {
+  display: flex;
+  justify-content: space-around;
+  .box_l {
+    & > h2 {
+      font-size: 16px;
+      color: #333;
+      font-weight: 400;
+      margin-bottom: 40px;
+    }
+    .el-main {
+      background-color: #f9fafb;
+      padding: 40px;
+      & > h2 {
+        font-size: 16px;
+        color: #333;
+        margin-bottom: 16px;
+      }
+      & > p {
+        margin-bottom: 14px;
+        color: #000;
+        & > span {
+          color: #7f7f7f;
+        }
+      }
+    }
+    width: 40%;
+  }
+  .box_r {
+    h2 {
+      font-size: 16px;
+      color: #333;
+      font-weight: 400;
+      margin-bottom: 40px;
+    }
+    width: 40%;
+  }
+}
+/deep/ .el-dialog {
+  border-radius: 8px !important;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/ .el-form--label-top {
+  padding: 0px;
+}
+.label_img {
+  user-select: none;
+  cursor: pointer;
+  width: 100%;
+  height: 80px;
+  display: inline-block;
+  line-height: 38px;
+  text-align: center;
+  border: 1px dashed #999;
+  border-radius: 8px;
+  font-size: 32px;
+  transition: all 0.2s;
+  &:hover {
+    border-color: #007aff;
+  }
+}
+</style>

+ 54 - 0
src/pages/person-center/handle-order/order/step-4.vue

@@ -0,0 +1,54 @@
+<template>
+  <div id="">
+    <el-result icon="success" :title="changeStatusText(status)">
+      <template slot="extra">
+        <el-button type="primary" size="medium" @click="jumpOrderInfo">订单详细</el-button>
+      </template>
+    </el-result>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      status: null
+    };
+  },
+  methods: {
+    changeStatusText(status){
+      var str = ""
+      switch (status) {
+        case 0:
+          str = "待支付"
+          break;
+        case 1:
+          str = "已支付"
+          break;
+        case -1:
+          str = "已关闭"
+          break;
+        case 2:
+          str = "对公支付提交审核中"
+          break;
+        case -2:
+          str = "对公支付审核不通过"
+          break;
+      
+        default:
+          break;
+      }
+      return str
+    },
+    openBoxs(status) {
+      this.status = status || null;
+      console.log(status);
+    },
+    jumpOrderInfo(){
+      this.$emit("backFunc")
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 341 - 0
src/pages/person-center/handle-order/orderDetail.vue

@@ -0,0 +1,341 @@
+<template>
+  <div id="">
+    <el-dialog
+      :visible.sync="visible"
+      width="1200px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      @closed="close"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          详情
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible = false"
+          />
+        </div>
+      </div>
+
+      <p style="font-size:14px;color:#333;">
+        订单编号:<span style="margin-right:14px;color:#007aff;">{{
+          orderInfo.handleOrderSn
+        }}</span
+        >订单状态:<span style="margin-right:14px;color:#007aff;">{{
+          getPayStatus(orderInfo.payStatus)
+        }}</span>
+      </p>
+      <el-main v-loading="loading" style="padding:20px 0px;">
+        <el-descriptions class="margin-top" :column="3" border>
+          <el-descriptions-item label="创建时间">
+            {{ $tools.timestampToTime(orderInfo.createTime, false) }}
+          </el-descriptions-item>
+          <el-descriptions-item label="通过时间">
+            {{ $tools.timestampToTime(orderInfo.payTime, false) }}
+          </el-descriptions-item>
+          <el-descriptions-item label="商品类型">
+            {{
+              orderInfo.goodsType == 1
+                ? "课程"
+                : orderInfo.goodsType == 2
+                ? "题库"
+                : ""
+            }}
+          </el-descriptions-item>
+          <el-descriptions-item label="教育类型">
+            {{ orderInfo.educationName }}
+          </el-descriptions-item>
+          <el-descriptions-item label="培训项目">
+            {{ orderInfo.projectName + " - " + orderInfo.businessName }}
+          </el-descriptions-item>
+          <el-descriptions-item label="订购人数">
+            {{ orderInfo.userNum || 0 }}位
+          </el-descriptions-item>
+          <el-descriptions-item label="订购数量">
+            {{ orderInfo.goodsNum || 0 }}个
+          </el-descriptions-item>
+          <el-descriptions-item label="下单金额">
+            ¥{{ orderInfo.orderPrice | formatPrice }}
+          </el-descriptions-item>
+          <el-descriptions-item label="退款金额">
+            ¥{{ orderInfo.goodsRefund | formatPrice }}
+          </el-descriptions-item>
+          <el-descriptions-item label="实际金额">
+            ¥{{ orderInfo.payPrice | formatPrice }}
+          </el-descriptions-item>
+          <el-descriptions-item label="支付方式">
+            {{ orderInfo.payType == 1 ? "微信" : "对公转账" }}
+          </el-descriptions-item>
+          <el-descriptions-item label="转账凭证">
+            <el-button
+              type="text"
+              v-if="
+                (orderInfo.payStatus == 1 ||
+                  orderInfo.payStatus == 2 ||
+                  orderInfo.payStatus == -2) &&
+                  orderInfo.payType == 2
+              "
+              @click="openZZ(orderInfo.handleOrderSn)"
+              >查看</el-button
+            >
+          </el-descriptions-item>
+          <el-descriptions-item label="发票状态">
+            {{ showInvoice(orderInfo.invoiceStatus) }}
+            <span v-if="orderInfo.invoiceUrl"
+              >({{ orderInfo.invoiceUrl.split(",").length }}张)<el-button
+                type="text"
+                @click="downinvoice(orderInfo.invoiceUrl.split(','))"
+                >下载</el-button
+              >
+            </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="下单备注">
+            {{ orderInfo.companyRemark }}
+          </el-descriptions-item>
+          <el-descriptions-item label="审核意见">
+            {{ orderInfo.checkReason }}
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-main>
+      <el-divider></el-divider>
+      <el-main style="padding:20px 0px;">
+        <el-table
+          max-height="400px"
+          ref="table"
+          size="small"
+          :data="tableData"
+          style="width: 100%"
+          border
+          :header-cell-style="{
+            'background-color': '#eee',
+            color: '#333',
+            fontSize: '14px'
+          }"
+        >
+          <el-table-column align="center" type="index" width="50" label="序号">
+          </el-table-column>
+          <el-table-column
+            align="center"
+            v-for="(item, index) in tableSet"
+            :key="index"
+            :label="item.label"
+            :prop="item.prop"
+          >
+            <template slot-scope="scope">
+              <span v-if="item.scope == 'progress'">
+                {{ scope.row.stuAllNum + scope.row.recordNum }} /
+                {{ scope.row.secAllNum + scope.row.examNum }}
+              </span>
+              <div v-else-if="item.scope == 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs"
+                  ><span v-if="items.value == scope.row[item.prop]">{{
+                    items.label
+                  }}</span></span
+                >
+              </div>
+              <span v-else-if="item.scope == 'price'">
+                ¥{{ scope.row[item.prop] | formatPrice }}
+              </span>
+              <span v-else>{{ scope.row[item.prop] }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-main>
+    </el-dialog>
+    <public-transfer ref="publicTransfer" />
+  </div>
+</template>
+
+<script>
+import publicTransfer from "./order/step-2/publicTransfer.vue";
+export default {
+  components: { publicTransfer },
+  data() {
+    return {
+      loading: false,
+      visible: false,
+      orderInfo: {},
+      tableData: [],
+      tableSet: [
+        { label: "姓名", prop: "realname" },
+        { label: "年份", prop: "year" },
+        { label: "科目", prop: "subjectNames" },
+        { label: "商品", prop: "goodsName" },
+        { label: "金额", prop: "goodsRealPrice", scope: "price" },
+        { label: "学习进度", scope: "progress" },
+        {
+          label: "退款状态",
+          prop: "refundStatus",
+          scope: "isOptions",
+          options: [
+            { label: "待审核", value: 0 },
+            { label: "已退款", value: 1 },
+            { label: "不通过", value: 2 }
+          ]
+        },
+        { label: "退款原因", prop: "refundReason" },
+        { label: "审核意见", prop: "periodReason" }
+      ]
+    };
+  },
+  methods: {
+    openBoxs(sn) {
+      this.orderInfo = {};
+      this.tableData = [];
+      this.visible = true;
+      this.loading = true;
+      this.$request
+        .orderhandledetail({ handleOrderSn: sn })
+        .then(res => {
+          this.orderInfo = res.data;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+      this.$request.orderhandlegoodsList({ handleOrderSn: sn }).then(res => {
+        this.tableData = res.rows || [];
+      });
+    },
+    close() {
+      this.loading = false;
+    },
+    openZZ(sn) {
+      this.$refs.publicTransfer.openBoxs(sn, false);
+    },
+    showInvoice(i) {
+      var str = "";
+      switch (i) {
+        case 1:
+          str = "待审核";
+          break;
+        case 2:
+          str = "已开票";
+          break;
+        case 3:
+          str = "不通过";
+          break;
+        default:
+          break;
+      }
+      return str;
+    },
+    downinvoice(ary) {
+      for (let i = 0; i < ary.length; i++) {
+        this.download(this.$tools.splitImgHost(ary[i]));
+      }
+    },
+    //下载
+    download(url, fileName = "") {
+      let xhr = new XMLHttpRequest();
+      xhr.open("get", url, true);
+      xhr.setRequestHeader("Content-Type", `application/pdf`);
+      xhr.responseType = "blob";
+      let that = this;
+      xhr.onload = function() {
+        if (this.status == 200) {
+          //接受二进制文件流
+          var blob = this.response;
+          that.downloadExportFile(blob, fileName);
+        }
+      };
+      xhr.send();
+    },
+
+    downloadExportFile(blob, tagFileName) {
+      let downloadElement = document.createElement("a");
+      let href = "";
+      if (typeof blob == "string") {
+        downloadElement.target = "_blank";
+      } else {
+        href = window.URL.createObjectURL(blob); //创建下载的链接
+      }
+      downloadElement.href = href;
+      downloadElement.download = tagFileName;
+      //下载后文件名
+      document.body.appendChild(downloadElement);
+      downloadElement.click(); //点击下载
+      document.body.removeChild(downloadElement); //下载完成移除元素
+      if (typeof blob != "string") {
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+      }
+    },
+    getPayStatus(i) {
+      var str = "";
+      switch (i) {
+        case 0:
+          str = "待支付";
+          break;
+        case 1:
+          str = "已支付";
+          break;
+        case -1:
+          str = "已关闭";
+          break;
+        case 2:
+          str = "审核中";
+          break;
+        case -2:
+          str = "不通过";
+          break;
+        default:
+          break;
+      }
+      return str;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+/deep/ .el-divider--horizontal {
+  margin: 14px 0px;
+}
+/deep/ .el-dialog {
+  margin-top: 3vh !important;
+  border-radius: 8px !important;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+</style>

+ 322 - 0
src/pages/person-center/handle-order/refundFunc.vue

@@ -0,0 +1,322 @@
+<template>
+  <div id="">
+    <el-dialog
+      :visible.sync="visible"
+      width="1200px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      @closed="close"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          退款关闭
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible = false"
+          />
+        </div>
+      </div>
+      <div class="top">
+        商品类型:<span>{{
+          orderInfo.goodsType == 1
+            ? "课程"
+            : orderInfo.goodsType == 2
+            ? "题库"
+            : ""
+        }}</span
+        >教育类型:<span>{{ orderInfo.educationName }}</span
+        >培训项目:<span>{{
+          orderInfo.projectName + " - " + orderInfo.businessName
+        }}</span>
+      </div>
+      <el-table
+        max-height="600px"
+        ref="table"
+        size="small"
+        :data="tableData"
+        style="width: 100%"
+        @selection-change="selectionChange"
+        border
+        :header-cell-style="{
+          'background-color': '#eee',
+          color: '#333',
+          fontSize: '14px'
+        }"
+      >
+        <el-table-column align="center" type="selection" width="55" :selectable="selectable">
+        </el-table-column>
+        <el-table-column align="center" type="index" width="50" label="序号">
+        </el-table-column>
+        <el-table-column
+          align="center"
+          v-for="(item, index) in tableSet"
+          :key="index"
+          :label="item.label"
+          :prop="item.prop"
+        >
+          <template slot-scope="scope">
+            <span v-if="item.scope == 'progress'">
+              {{ scope.row.stuAllNum + scope.row.recordNum }} /
+              {{ scope.row.secAllNum + scope.row.examNum }}
+            </span>
+
+            <div v-else-if="item.scope == 'isOptions'">
+              <span v-for="(items, indexs) in item.options" :key="indexs"
+                ><span v-if="items.value == scope.row[item.prop]">{{
+                  items.label
+                }}</span></span
+              >
+            </div>
+            <span v-else-if="item.scope == 'price'">
+              ¥{{ scope.row[item.prop] | formatPrice }}
+            </span>
+            <span v-else>{{ scope.row[item.prop] }}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-divider></el-divider>
+      <div class="fot_box">
+        <el-button type="text" @click="orderDetail">订单详情</el-button>
+        <p>订单金额:¥{{ orderInfo.orderPrice | formatPrice }}</p>
+        <p>已退金额:¥{{ orderInfo.goodsRefund | formatPrice }}</p>
+        <p>实际金额:¥{{ orderInfo.payPrice | formatPrice }}</p>
+        <p>本次关闭学员:{{ activeData.length || 0 }}个</p>
+        <p style="font-weight:bold;">
+          本次退款金额:<strong style="color:red;"
+            >¥{{ getPrice(activeData) | formatPrice }}</strong
+          >
+        </p>
+      </div>
+
+      <el-form
+        label-position="top"
+        :model="formData"
+        :rules="rules"
+        ref="formData"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="收款信息:" prop="payee">
+          <el-input
+            :readonly="orderInfo.payType == 1"
+            v-model="formData.payee"
+            placeholder="输入企业全称"
+          ></el-input> </el-form-item
+        ><el-form-item prop="payeeBank" v-if="orderInfo.payType == 2">
+          <el-input
+            v-model="formData.payeeBank"
+            placeholder="输入开户银行"
+          ></el-input> </el-form-item
+        ><el-form-item prop="payeeBankAccount" v-if="orderInfo.payType == 2">
+          <el-input
+            v-model="formData.payeeBankAccount"
+            placeholder="输入银行账号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="退款原因:" prop="refundReason">
+          <el-input
+            placeholder="输入退款原因"
+            type="textarea"
+            v-model="formData.refundReason"
+          ></el-input> </el-form-item
+      ></el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="submitForm" type="primary">提交</el-button>
+      </div>
+    </el-dialog>
+    <order-detail ref="orderDetail" />
+  </div>
+</template>
+
+<script>
+import orderDetail from "./orderDetail.vue";
+export default {
+  components: { orderDetail },
+  data() {
+    return {
+      visible: false,
+      orderInfo: {},
+      tableData: [],
+      activeData: [],
+      tableSet: [
+        { label: "姓名", prop: "realname" },
+        { label: "年份", prop: "year" },
+        { label: "科目", prop: "subjectNames" },
+        { label: "商品", prop: "goodsName" },
+        { label: "金额", prop: "goodsRealPrice", scope: "price" },
+        { label: "学习进度", scope: "progress" },
+        {
+          label: "退款状态",
+          prop: "refundStatus",
+          scope: "isOptions",
+          options: [
+            { label: "待审核", value: 0 },
+            { label: "已退款", value: 1 },
+            { label: "不通过", value: 2 }
+          ]
+        },
+        { label: "退款原因", prop: "refundReason" },
+        { label: "审核意见", prop: "periodReason" }
+      ],
+      formData: {},
+      rules: {
+        payee: [{ required: true, message: "请输入收款人", trigger: "blur" }],
+        payeeBank: [
+          { required: true, message: "请输入收款银行", trigger: "blur" }
+        ],
+        payeeBankAccount: [
+          { required: true, message: "请输入收款账号", trigger: "blur" }
+        ],
+        refundRamick: [
+          { required: true, message: "请输入退款原因", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  computed: {
+    getPrice: function() {
+      return function(ary) {
+        if (ary && ary.length > 0) {
+          let sum = 0;
+          ary.forEach(i => {
+            sum += i.goodsRealPrice;
+          });
+          return sum;
+        } else {
+          return 0;
+        }
+      };
+    }
+  },
+  methods: {
+    orderDetail() {
+      this.$refs.orderDetail.openBoxs(this.orderInfo.handleOrderSn);
+    },
+    openBoxs(sn) {
+      this.activeData = [];
+      this.formData = {};
+      this.orderInfo = {};
+      this.tableData = [];
+      this.visible = true;
+      this.$request.orderhandledetail({ handleOrderSn: sn }).then(res => {
+        if (res.data.payType == 1) {
+          this.formData.payee = "原路退回";
+        }
+        this.orderInfo = res.data;
+      });
+      this.$request.orderhandlegoodsList({ handleOrderSn: sn }).then(res => {
+        this.tableData = res.rows || [];
+      });
+    },
+    selectionChange(row) {
+      this.activeData = row;
+    },
+    selectable(row){
+      if(row.refundStatus == 0 || row.refundStatus == 1){
+        return false
+      }else{
+        return true
+      }
+    },
+    submitForm() {
+      this.$refs["formData"].validate(valid => {
+        if (valid) {
+          if (this.activeData.length == 0) {
+            this.$message.error("请勾选订单");
+            return;
+          }
+          let obj = {
+            orderGoodsIds: this.activeData.map(i => i.orderGoodsId),
+            refundPrice: this.getPrice(this.activeData) || 0,
+            handleOrderSn: this.orderInfo.handleOrderSn,
+            ...this.formData
+          };
+          this.$request
+            .orderhandlerefundapply(obj)
+            .then(res => {
+              this.$message.success("提交成功");
+              this.visible = false;
+              this.$parent.search();
+            })
+            .catch(err => {
+              this.$message.error(err.msg);
+            });
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    close() {}
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+/deep/ .el-divider--horizontal {
+  margin: 14px 0px;
+}
+/deep/ .el-dialog {
+  margin-top: 3vh !important;
+  border-radius: 8px !important;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+.top {
+  margin-bottom: 14px;
+  span {
+    font-weight: bold;
+    margin-right: 14px;
+  }
+}
+.fot_box {
+  p {
+    margin-bottom: 8px;
+  }
+}
+/deep/ .el-form-item__label {
+  font-weight: bold;
+}
+</style>

+ 536 - 0
src/pages/person-center/handle-rollCall/importStudent.vue

@@ -0,0 +1,536 @@
+<template>
+  <div id="">
+    <el-dialog
+      :visible.sync="visible"
+      width="400px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      @closed="close"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          导入学员
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible = false"
+          />
+        </div>
+      </div>
+      <div>
+        <template v-if="status">
+          <div style="text-align:center;">
+            <el-button
+              style="margin-bottom:20px;"
+              type="primary"
+              @click="openCheckStudent"
+              >经办名单</el-button
+            >
+            <p>说明:数据来源于“个人中心 - 经办订单 - 经办名单”</p>
+          </div>
+          <el-divider></el-divider>
+        </template>
+        <div style="text-align:center;">
+          <el-button
+            style="margin-bottom:20px;"
+            type="primary"
+            @click="clickInputFile"
+            ><input
+              ref="input_file"
+              style="display:none;"
+              type="file"
+              required
+              @change="setImage"
+            />导入数据</el-button
+          >
+
+          <div style="text-align:center;">
+            <el-button type="text" @click="downModule">下载导入模板</el-button>
+          </div>
+        </div>
+      </div></el-dialog
+    >
+    <el-dialog
+      :visible.sync="visible2"
+      width="1000px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      @closed="close2"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          导入学员
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible2 = false"
+          />
+        </div>
+      </div>
+      <div>
+        <div
+          style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;"
+        >
+          <div>
+            全部<span style="color:#007aff;font-weight:bold;margin:0px 6px;">{{
+              tableData.length || 0
+            }}</span
+            >条
+          </div>
+          <el-button size="mini" @click="clickInputFile" type="primary"
+            >继续导入</el-button
+          >
+        </div>
+        <el-form
+          :model="{ tableData: tableData }"
+          :rules="rules"
+          ref="ruleForm"
+        >
+          <el-table
+            max-height="520px"
+            ref="table"
+            size="small"
+            :data="tableData"
+            style="width: 100%"
+            border
+            :header-cell-style="{
+              'background-color': '#eee',
+              color: '#333',
+              fontSize: '14px'
+            }"
+          >
+            <el-table-column
+              align="center"
+              type="index"
+              width="50"
+              label="序号"
+            >
+            </el-table-column>
+            <el-table-column
+              v-for="(item, index) in tableSet"
+              :key="index"
+              align="center"
+              :label="item.label"
+              :prop="item.prop"
+              :width="item.width"
+            >
+              <template slot-scope="scope">
+                <el-form-item
+                  v-if="item.scope == 'input'"
+                  :prop="'tableData.' + scope.$index + '.' + item.prop"
+                  :rules="rules[item.prop]"
+                >
+                  <el-input v-model="scope.row[item.prop]"></el-input>
+                </el-form-item>
+                <el-form-item
+                  v-else-if="item.scope == 'select'"
+                  :prop="'tableData.' + scope.$index + '.' + item.prop"
+                  :rules="rules[item.prop]"
+                >
+                  <el-select
+                    v-model="scope.row[item.prop]"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="(items, indexs) in item.options"
+                      :key="indexs"
+                      :label="items.label"
+                      :value="items.value"
+                    >
+                    </el-option> </el-select
+                ></el-form-item>
+                <span v-else>{{ scope.row[item.prop] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              width="100"
+              fixed="right"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="del(scope.$index)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="submitForm2" type="primary">确定导入</el-button>
+      </div></el-dialog
+    >
+    <el-dialog
+      :visible.sync="visible3"
+      width="1000px"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      @closed="close3"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          经办名单
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/img/Close@2x.png"
+            alt=""
+            @click="visible3 = false"
+          />
+        </div>
+      </div>
+      <div>
+        <el-table
+          max-height="520px"
+          ref="table_3"
+          size="small"
+          :data="tableData_3"
+          style="width: 100%"
+          border
+          :header-cell-style="{
+            'background-color': '#eee',
+            color: '#333',
+            fontSize: '14px'
+          }"
+        >
+          <el-table-column align="center" type="selection" width="55">
+          </el-table-column>
+          <el-table-column align="center" type="index" width="50" label="序号">
+          </el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableSet"
+            :key="index"
+            align="center"
+            :label="item.label"
+            :prop="item.prop"
+            :width="item.width"
+          >
+            <template slot-scope="scope">
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="text-align:center;">
+          <el-pagination
+            @current-change="handleCurrentChange"
+            :current-page="formData.pageNum"
+            :page-size="formData.pageSize"
+            layout="total,  prev, pager, next, jumper"
+            :total="total"
+          >
+          </el-pagination>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="submitForm3" type="primary">确定</el-button>
+      </div></el-dialog
+    >
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    const edu_level = () => {
+      let ary = this.$store.state.dictList["edu_level"].map(i => {
+        return {
+          label: i,
+          value: i
+        };
+      });
+      return ary;
+    };
+    const sys_user_sex = () => {
+      let ary = this.$store.state.dictList["sys_user_sex"].map(i => {
+        return {
+          label: i,
+          value: i
+        };
+      });
+      return ary;
+    };
+    const validateTel = (rule, value, callback) => {
+      var reg = /^1[34578][0-9]{9}$/;
+      if (!reg.test(value)) {
+        return callback(new Error("请输入正确手机号码"));
+      } else {
+        callback();
+      }
+    };
+    const validateIdcard = (rule, value, callback) => {
+      let _IDRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+      let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
+      if (!_IDRe18.test(value) && !_IDre15.test(value)) {
+        return callback(new Error("请输入正确身份证号码"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      visible: false,
+      visible2: false,
+      visible3: false,
+      status: false,
+      rules: {
+        realname: [{ required: true, message: "请输入姓名", trigger: "blur" }],
+        sex: [{ required: true, message: "请选择性别", trigger: "change" }],
+        eduLevel: [
+          { required: true, message: "请选择学历", trigger: "change" }
+        ],
+        idCard: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateIdcard
+          }
+        ],
+        telphone: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validateTel
+          }
+        ]
+      },
+      tableData: [],
+      loading: false,
+      tableData_3: [],
+      total: 0,
+      formData: {
+        pageSize: 10,
+        pageNum: 1
+      },
+      tableSet: [
+        {
+          label: "姓名",
+          prop: "realname",
+          scope: "input",
+          width: "120px"
+        },
+        {
+          label: "性别",
+          prop: "sex",
+          scope: "select",
+          options: sys_user_sex(),
+          width: "140px"
+        },
+        {
+          label: "身份证号",
+          prop: "idCard",
+          scope: "input",
+          width: "200px"
+        },
+        {
+          label: "手机号码",
+          prop: "telphone",
+          scope: "input",
+          width: "150px"
+        },
+        {
+          label: "学历",
+          prop: "eduLevel",
+          scope: "select",
+          options: edu_level(),
+          width: "140px"
+        },
+        {
+          label: "所属公司",
+          prop: "companyName",
+          scope: "input",
+          width: "220px"
+        }
+      ]
+    };
+  },
+  methods: {
+    openCheckStudent() {
+      this.tableData_3 = [];
+      this.total = 0;
+      this.visible3 = true;
+      this.search();
+    },
+    search() {
+      this.loading = true;
+      this.$request
+        .userhandlelist(this.formData)
+        .then(res => {
+          this.tableData_3 = res.rows || [];
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    handleCurrentChange(e) {
+      this.formData.pageNum = e;
+      this.search();
+    },
+    clickInputFile() {
+      this.$refs.input_file.click();
+    },
+    setImage(e) {
+      let file = e.target.files[0];
+      if (file === undefined) {
+        e.target.value = "";
+        return;
+      }
+      if (file.size > 10 * 1024 * 1024) {
+        this.$message.error("文件不得大于10MB");
+        return;
+      }
+      var type = file.name
+        .toLowerCase()
+        .split(".")
+        .splice(-1);
+      if (type[0] != "xlsx" && type[0] != "xls") {
+        this.$message.error("上传格式需为:.xlsx/.xls");
+        e.target.value = "";
+        return;
+      }
+      let formData = new FormData();
+      formData.append("file", file);
+      this.$request
+        .userhandleanalysis(formData)
+        .then(res => {
+          if (res.data && res.data.length > 0) {
+            res.data.forEach(i => {
+              delete i.userId;
+            });
+            if (!this.visible2) {
+              this.tableData = [];
+              this.visible2 = true;
+            }
+            this.tableData.push(...res.data);
+          }
+        })
+        .catch(err => {
+          this.$message.error(err.msg);
+        })
+        .finally(() => {
+          e.target.value = "";
+        });
+    },
+    openBoxs(status) {
+      this.status = status;
+      this.visible = true;
+    },
+    downModule() {
+      this.$tools.exportData("oss/images/file/dangan/upload/批量导入名单.xlsx");
+    },
+    close() {},
+    close2() {
+      this.tableData = [];
+    },
+    close3() {},
+    del(k) {
+      this.tableData.splice(k, 1);
+    },
+    submitForm3() {
+      if (this.$refs.table_3.selection.length > 0) {
+        let ary = this.$refs.table_3.selection.map(i => {
+          return {
+            realname: i.realname,
+            sex: i.sex,
+            eduLevel: i.eduLevel,
+            companyName: i.companyName,
+            telphone: i.telphone,
+            idCard: i.idCard
+          };
+        });
+        this.visible = false;
+        this.visible3 = false;
+        this.$message.success("操作成功");
+        this.$emit("backFunc", ary);
+      } else {
+        this.$message.error("请勾选学员名单");
+        return;
+      }
+    },
+    submitForm2() {
+      this.$refs["ruleForm"].validate(valid => {
+        if (valid) {
+          if (this.status) {
+            let obj = JSON.parse(JSON.stringify(this.tableData));
+            this.visible2 = false;
+            this.visible = false;
+            this.$message.success("操作成功");
+            this.$emit("backFunc", obj);
+          } else {
+            this.$request
+              .userhandlesave(this.tableData)
+              .then(res => {
+                this.visible2 = false;
+                this.visible = false;
+                this.$message.success("操作成功");
+                this.$emit("backFunc");
+              })
+              .catch(() => {
+                this.$message.error("提交失败");
+              })
+              .finally(() => {
+                this.search();
+              });
+            // api
+          }
+        } else {
+          return false;
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+/deep/ .el-dialog {
+  border-radius: 8px !important;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+/deep/.el-button {
+  border-radius: 8px;
+}
+</style>

+ 216 - 6
src/pages/person-center/handle-rollCall/index.vue

@@ -1,21 +1,231 @@
 <template>
 <template>
   <div id="">
   <div id="">
-经办名单
+    <div class="header">
+      <h2>经办名单</h2>
+      <div>
+        <el-button :size="size" type="primary" @click="studentPage(-1)"
+          >新增</el-button
+        >
+        <el-button :size="size" type="primary" @click="importStudent"
+          >导入学员</el-button
+        >
+        <el-button :size="size" type="primary" @click="delPl"
+          >批量删除</el-button
+        >
+      </div>
+    </div>
+    <el-divider></el-divider>
+    <search
+      :formSet="formSet"
+      :formData.sync="formData"
+      @search="search"
+      @init="init"
+    ></search>
+    <el-table
+      v-loading="loading"
+      ref="table"
+      size="small"
+      :data="tableData"
+      style="width: 100%"
+      border
+      :header-cell-style="{
+        'background-color': '#eee',
+        color: '#333',
+        fontSize: '14px'
+      }"
+    >
+      <el-table-column align="center" type="selection" width="55">
+      </el-table-column>
+      <el-table-column align="center" type="index" width="50" label="序号">
+      </el-table-column>
+      <el-table-column
+        align="center"
+        v-for="(item, index) in tableSet"
+        :key="index"
+        :label="item.label"
+        :prop="item.prop"
+      >
+        <template slot-scope="scope">
+          <span>{{ scope.row[item.prop] }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="160" fixed="right">
+        <template slot-scope="scope">
+          <el-button
+            type="text"
+            :size="size"
+            @click="studentPage(scope.$index, scope.row)"
+            >修改</el-button
+          >
+          <el-button type="text" :size="size" @click="del([scope.row.id])"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="text-align:center;">
+      <el-pagination
+        @current-change="handleCurrentChange"
+        :current-page="formData.pageNum"
+        :page-size="formData.pageSize"
+        layout="total,  prev, pager, next, jumper"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
+    <student-page ref="studentPage" @backStudentData="backStudentData" />
+    <import-student ref="importStudent" @backFunc="init()" />
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import importStudent from "./importStudent.vue";
+import studentPage from "../handle-order/order/step-1/studentPage.vue";
 export default {
 export default {
-  data () {
+  components: { studentPage, importStudent },
+  data() {
+    const edu_level = () => {
+      let ary = this.$store.state.dictList["edu_level"].map(i => {
+        return {
+          label: i,
+          value: i
+        };
+      });
+      return ary;
+    };
     return {
     return {
-    }
+      loading: false,
+      size: "small",
+      formData: {
+        pageNum: 1,
+        pageSize: 10
+      },
+      formSet: [
+        {
+          prop: "edu",
+          placeholder: "学历",
+          scope: "select",
+          options: edu_level()
+        },
+        {
+          prop: "keyWord",
+          placeholder: "输入姓名/身份证号/手机号码"
+        }
+      ],
+      tableData: [],
+      tableSet: [
+        { label: "姓名", prop: "realname" },
+        { label: "性别", prop: "sex" },
+        { label: "身份证号", prop: "idCard" },
+        { label: "手机号码", prop: "telphone" },
+        { label: "学历", prop: "eduLevel" },
+        { label: "所属公司", prop: "companyName" }
+      ],
+      total: 0
+    };
+  },
+  mounted() {
+    this.search();
   },
   },
   methods: {
   methods: {
-
+    importStudent() {
+      this.$refs.importStudent.openBoxs();
+    },
+    //学员编辑
+    studentPage(index, row) {
+      this.$refs.studentPage.openBoxs(index, row);
+    },
+    backStudentData(index, row) {
+      if (index == -1) {
+        this.$request
+          .userhandlesave([row])
+          .then(res => {
+            this.$message.success("操作成功");
+          })
+          .catch(() => {
+            this.$message.error("提交失败");
+          })
+          .finally(() => {
+            this.search();
+          });
+      } else {
+        this.$request
+          .userhandleedit(row)
+          .then(res => {
+            this.$message.success("操作成功");
+          })
+          .catch(() => {
+            this.$message.error("提交失败");
+          })
+          .finally(() => {
+            this.search();
+          });
+      }
+    },
+    delPl() {
+      if (this.$refs.table.selection.length > 0) {
+        let ary = this.$refs.table.selection.map(i => i.id);
+        this.del(ary);
+      } else {
+        this.$message.error("请选择学员");
+        return;
+      }
+      console.log();
+    },
+    del(id) {
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.$request
+            .userhandledelete(id)
+            .then(res => {
+              this.$message.success("操作成功");
+              this.search();
+            })
+            .catch(() => {
+              this.$message.error("删除失败");
+            });
+        })
+        .catch(err => {});
+    },
+    search() {
+      this.loading = true;
+      this.$request
+        .userhandlelist(this.formData)
+        .then(res => {
+          this.tableData = res.rows || [];
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.formData = {
+        pageNum: 1,
+        pageSize: 10
+      };
+      this.search();
+    },
+    handleCurrentChange(e) {
+      this.formData.pageNum = e;
+      this.search();
+    }
   }
   }
-}
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-
+.header {
+  margin-top: 10px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  & > h2 {
+    font-size: 18px;
+  }
+}
 </style>
 </style>

+ 2 - 2
src/pages/person-center/my-bank/bank-detail/index.vue

@@ -124,12 +124,12 @@
                       />
                       />
                       <div>
                       <div>
                         <p>{{ tab.examInfo ? tab.examInfo.doNum : "-" }}</p>
                         <p>{{ tab.examInfo ? tab.examInfo.doNum : "-" }}</p>
-                        <p>已完成数</p>
+                        <p>已完成数</p>
                       </div>
                       </div>
                       <div class="line"></div>
                       <div class="line"></div>
                       <div>
                       <div>
                         <p>{{ tab.examInfo ? tab.examInfo.totalNum : "-" }}</p>
                         <p>{{ tab.examInfo ? tab.examInfo.totalNum : "-" }}</p>
-                        <p>总数</p>
+                        <p>总数</p>
                       </div>
                       </div>
                       <div class="line"></div>
                       <div class="line"></div>
                       <div>
                       <div>

+ 1 - 1
src/pages/person-center/my-examination/index/index.vue

@@ -225,7 +225,7 @@
                   <div class="title">报考学员信息</div>
                   <div class="title">报考学员信息</div>
                   <div class="desc-list">
                   <div class="desc-list">
                     <div class="desc-list__item">
                     <div class="desc-list__item">
-                      姓名:<span class="note">{{ item.goodsName }}</span>
+                      姓名:<span class="note">{{ item.realname }}</span>
                     </div>
                     </div>
                     <div class="desc-list__item">
                     <div class="desc-list__item">
                       身份证:<span class="note">{{ item.idCard }}</span>
                       身份证:<span class="note">{{ item.idCard }}</span>

+ 24 - 7
src/store/index.js

@@ -31,6 +31,8 @@ export default new Vuex.Store({
     mobile: null,//移动端设置
     mobile: null,//移动端设置
     sysTime: 0,
     sysTime: 0,
     businessItem: null,
     businessItem: null,
+    educationType: null,
+    businessList_t: null,
     businessList: [],
     businessList: [],
     packPageStatus: true,
     packPageStatus: true,
     isDesktop: !navigator.userAgent.match(
     isDesktop: !navigator.userAgent.match(
@@ -39,6 +41,22 @@ export default new Vuex.Store({
   },
   },
 
 
   getters: {
   getters: {
+    educationType(state) {
+      if (!state.educationType) {
+        common.educationTypeList({ status: 1 }).then(res => {
+          state.educationType = res.rows
+        })
+      }
+      return state.educationType
+    },
+    businessList_t(state) {
+      if (!state.businessList_t) {
+        common.businessList({ status: 1 }).then(res => {
+          state.businessList_t = res.rows
+        })
+      }
+      return state.businessList_t
+    },
     businessList: state => state.businessList,
     businessList: state => state.businessList,
     businessItem: state => state.businessItem,
     businessItem: state => state.businessItem,
     sysTime: state => state.sysTime,
     sysTime: state => state.sysTime,
@@ -68,7 +86,6 @@ export default new Vuex.Store({
       state.businessList = list
       state.businessList = list
     },
     },
     setBusinessItem(state, item) {
     setBusinessItem(state, item) {
-      console.log(item)
       state.businessItem = item
       state.businessItem = item
     },
     },
     commonSystemTime(state, time) {
     commonSystemTime(state, time) {
@@ -139,11 +156,11 @@ export default new Vuex.Store({
         }
         }
         axios.get(process.env.BASE_URL + '/app/common/findTenantId?hostPc=' + urls)
         axios.get(process.env.BASE_URL + '/app/common/findTenantId?hostPc=' + urls)
           .then(function (response) {
           .then(function (response) {
-              let favicon = document.querySelector('link[rel="icon"]')
-              favicon = document.createElement('link')
-              favicon.rel = 'icon'
-              favicon.href = response.data.data == '867735392558919680'?'/static/favicon.ico':'/static/favicons.ico'
-              document.head.appendChild(favicon)
+            let favicon = document.querySelector('link[rel="icon"]')
+            favicon = document.createElement('link')
+            favicon.rel = 'icon'
+            favicon.href = response.data.data == '867735392558919680' ? '/static/favicon.ico' : '/static/favicons.ico'
+            document.head.appendChild(favicon)
             commit('setTENANT_NANE', response.data.data)
             commit('setTENANT_NANE', response.data.data)
             resolve()
             resolve()
           })
           })
@@ -223,7 +240,7 @@ export default new Vuex.Store({
      */
      */
     getCommonBaseDictList(context) {
     getCommonBaseDictList(context) {
       return new Promise(resolve => {
       return new Promise(resolve => {
-        common.dictList().then(res => {
+        common.dictList({status:1}).then(res => {
           if (res.code === 200) {
           if (res.code === 200) {
             let dictList = {};
             let dictList = {};
             let list = res.data;
             let list = res.data;