|
|
@@ -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']
|