shish hace 3 años
padre
commit
c0cf172156
Se han modificado 3 ficheros con 94 adiciones y 22 borrados
  1. 3 1
      pt/src/cool/request/index.js
  2. 77 21
      pt/src/saas/shop/manage.vue
  3. 14 0
      pt/src/service/admin/index.js

+ 3 - 1
pt/src/cool/request/index.js

@@ -12,6 +12,7 @@ import imgStore from '@/service/img-store/index';
 import invite from '@/service/invite/index';
 import coupon from '@/service/coupon/index';
 import ad from '@/service/ad/index';
+import admin from '@/service/admin/index';
 import staff from '@/service/staff/index';
 import role from '@/service/role/index';
 import single from '@/service/single/index';
@@ -85,7 +86,8 @@ export function SET_SERVICE({ store }) {
 		cash,
 		ptYeChange,
 		ptAsset,
-		shopYeChange
+		shopYeChange,
+		admin
 	};
 	Vue.prototype.$service = modules;
 	store.$service = modules;

+ 77 - 21
pt/src/saas/shop/manage.vue

@@ -31,7 +31,33 @@
 					</el-popover>
 				</template>
 		</template>
+
+		<template #slot-add-pf-notice="{scope}">
+			<el-button type="text" @click="adNotice(scope.row,2)">加批发通知</el-button>
+		</template>
+
+		<template #slot-add-hd-notice="{scope}">
+			<el-button type="text" @click="adNotice(scope.row,1)">加零售通知</el-button>
+		</template>
+
+
+
     </x-crud>
+
+        <el-dialog :visible.sync="addNoticePop" :close-on-click-modal="false" width="500px" >
+          <el-form :model="addStaffForm" :rules="ruleForm" ref="adForm" label-width="80px" class="demo-form" >
+
+            <el-form-item label="openId" prop="openId" style="text-align: left;" >
+              <el-input placeholder="请输入openId" size="small" v-model="openId"></el-input>
+            </el-form-item>
+
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button size="small" @click="resetForm">取 消</el-button>
+            <el-button type="primary" size="small" @click="submitForm">确认</el-button>
+          </div>
+        </el-dialog>
+
 	</div>
 </template>
 
@@ -39,13 +65,39 @@
 export default {
 	data() {
 		return {
-			// x-crud
-			show: false
+			show: false,
+			openId:'',
+			adminId:0,
+			addNoticePop:false,
+			ruleForm:{},
+			addStaffForm:{},
+			ptStyle:0
 		};
 	},
 	mounted() {},
 	methods: {
-		// crud
+		adNotice(staff,ptStyle){
+			this.adminId = staff.adminId
+			this.ptStyle = ptStyle
+			this.addNoticePop = true
+		},
+		submitForm(){
+			let that = this
+			if(this.ptStyle == 0 || this.adminId == 0 || this.openId == ''){
+				this.$message.error('缺少参数');
+				return false;
+			}
+			that.$service.admin.updateOpenId({adminId:this.adminId,openId:this.openId,ptStyle:this.ptStyle}).then(res => {
+				that.$message.success('操作成功')
+				that.resetForm()
+			})
+		},
+		resetForm(){
+			this.openId=''
+			this.ptStyle = 0
+			this.adminId = 0
+			this.addNoticePop = false
+		},
 		onLoad({ ctx, app }) {
 			this.app = app;
 			ctx.service(this.$service.shopAdmin)
@@ -78,22 +130,10 @@ export default {
 							emptyText: '无'
 						},
 						{
-							prop: 'merchanId',
-							label: '商家ID',
-							align: 'center',
-							emptyText: '无'
-						},
-						{
-							prop: 'shopId',
-							label: '门店ID',
-							align: 'center',
-							emptyText: '无'
-						},
-						{
-							prop: 'remid',
+							prop: 'remind',
 							label: '收款提醒',
 							align: 'center',
-							emptyText: ''
+							emptyText: '-'
 						},
 						{
 							prop: 'super',
@@ -101,13 +141,19 @@ export default {
 							align: 'center',
 							emptyText: '无'
 						},
-            {
+            			{
 							prop: 'founder',
 							label: '创始人',
 							align: 'center',
 							emptyText: '无'
 						},
-            {
+            			{
+							prop: 'delStatus',
+							label: '删除',
+							align: 'center',
+							emptyText: '-'
+						},
+            			{
 							prop: 'addTime',
 							label: '添加时间',
 							align: 'center',
@@ -126,11 +172,21 @@ export default {
 						},
 						// 布局,请移步 `layout`
 						//layout: ['slot-column-option']
-						layout: []
+						layout: ['slot-add-pf-notice','slot-add-hd-notice']
 					}
 				})
+                .set('dict', {
+                  search: {
+                    keyWord: 'mobile',
+                  },
+                })
+                .set('search', {
+                  key: {
+                    placeholder: '请填写手机号',
+                  },
+                })
 				.set('layout', [
-					['slot-tabs'],
+					['slot-tabs'],['search-key'],
 					['flex1', 'refresh-btn'],
 					['data-table'],
 					['flex1', 'pagination']

+ 14 - 0
pt/src/service/admin/index.js

@@ -0,0 +1,14 @@
+import { BaseService, Service } from '@/cool';
+@Service('admin')
+export class AdminService extends BaseService {
+
+	updateOpenId(data) {
+		return this.request({
+			url: '/update-open-id',
+			method: 'POST',
+			data: data
+		});
+	}
+
+}
+export default new AdminService();