From 09da100729793848bc01b51f7b05ca3f1e7ec64f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 20 六月 2024 14:05:35 +0800
Subject: [PATCH] 提交一把
---
company/src/components/business/OperaCompanyWindow.vue | 84 ++++++++++++++++++++++++++++++++----------
1 files changed, 64 insertions(+), 20 deletions(-)
diff --git a/company/src/components/business/OperaCompanyWindow.vue b/company/src/components/business/OperaCompanyWindow.vue
index dc1baad..ba49305 100644
--- a/company/src/components/business/OperaCompanyWindow.vue
+++ b/company/src/components/business/OperaCompanyWindow.vue
@@ -23,10 +23,10 @@
<el-button type="primary" style="flex-shrink: 0; margin-left: 15px;" v-else>{{num}}s</el-button>
</div>
</el-form-item>
- <el-form-item label="楠岃瘉鐮�" prop="captche" v-if="form.type !== 1">
+ <el-form-item label="楠岃瘉鐮�" prop="captche" v-if="!form.id">
<el-input v-model="form.captche" placeholder="璇疯緭鍏�" v-trim/>
</el-form-item>
- <el-form-item label="鍏徃璐﹀彿" prop="username" v-if="form.type !== 1">
+ <el-form-item label="鍏徃璐﹀彿" prop="username" v-if="!form.id">
<el-input v-model="form.username" placeholder="璇疯緭鍏�" v-trim/>
</el-form-item>
<el-form-item label="璁よ瘉閭" prop="email" >
@@ -68,9 +68,9 @@
<!-- </div>-->
<!-- </el-form-item>-->
</el-form>
- <el-button type="primary" style="margin-bottom: 15px;" @click="add" v-if="form.type !== 1">娣诲姞</el-button>
+ <el-button type="primary" style="margin-bottom: 15px;" @click="add" v-if="!form.id">娣诲姞</el-button>
<el-table
- v-if="form.type !== 1"
+ v-if="!form.id"
:data="form.solutionList"
border
style="width: 100%">
@@ -86,12 +86,26 @@
align="center"
label="淇濋櫓鏂规">
<template slot-scope="scope">
- <el-select v-model="scope.row.solution" value-key="id" placeholder="璇烽�夋嫨" change="changeSolution($event,scope.$index)">
+ <el-select v-model="scope.row.solution.id" @change="changeSolution($event, scope.$index)" placeholder="璇烽�夋嫨">
<el-option
v-for="item in programme"
:key="item.id"
:label="item.name"
- :value="item">
+ :value="item.id">
+ </el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ label="濮旀墭鍟嗘埛">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.shopId" :disabled="scope.row.solution.type ==1" clearable value-key="id" placeholder="璇烽�夋嫨" >
+ <el-option
+ v-for="item in shops"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
</el-option>
</el-select>
</template>
@@ -100,8 +114,8 @@
align="center"
label="鍔犲噺淇濆姛鑳�">
<template slot-scope="{row}">
- <el-checkbox :true-label="1" :false-label="0" v-model="row.canAdd">鍔犱繚</el-checkbox>
- <el-checkbox :true-label="1" :false-label="0" v-model="row.canReduce">鍑忎繚</el-checkbox>
+ <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canAdd">鍔犱繚</el-checkbox>
+ <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canReduce">鍑忎繚</el-checkbox>
</template>
</el-table-column>
<el-table-column
@@ -122,11 +136,19 @@
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { all } from '@/api/business/solutions'
import { sendSms } from '@/api/business/smsEmail'
+import { pageAll as shopList } from '@/api/business/company'
export default {
name: 'OperaCompanyWindow',
extends: BaseOpera,
components: { GlobalWindow, UploadAvatarImage },
data () {
+ var idcardImgList = (rule, value, callback) => {
+ if (value.length === 0) {
+ callback(new Error('璇蜂笂浼犳硶浜鸿韩浠借瘉'));
+ } else {
+ callback();
+ }
+ };
return {
// 琛ㄥ崟鏁版嵁
initParam:{
@@ -155,12 +177,14 @@
},
solutionList: [
{
- solution: null,
- canAdd: 0,
- canReduce: 0
+ solution: { id: null, baseId: null,type:0 },
+ canAdd: 1,
+ shopId:null,
+ canReduce: 1
}
],
type: '0',
+ actionType: '0',
file: {
imgurl: '',
imgurlfull: ''
@@ -208,7 +232,7 @@
{ required: true, message: '璇蜂笂浼犺惀涓氭墽鐓�' }
],
idcardImgList: [
- { required: true, message: '璇蜂笂浼犳硶浜鸿韩浠借瘉' }
+ { required: true, validator: idcardImgList }
],
signImg: [
{ required: true, message: '璇蜂笂浼犵數瀛愮绔�' }
@@ -217,8 +241,8 @@
{ required: true, message: '璇疯緭鍏ュ叕鍙歌处鍙�' }
]
},
-
- programme: []
+ programme: [],
+ shops:[]
}
},
created () {
@@ -238,9 +262,21 @@
}
},
methods: {
- changeSolution(row,index){
- this.form.solutionList[index].solution=row
- // console.log(this.form.solutionList)
+ changeSolution(e,index){
+ let baseId = ''
+ this.programme.forEach(item => {
+ if (item.id === e) {
+ baseId = item.baseId
+ this.form.solutionList[index].solution.type = item.type
+ if(item.type == 1){
+ this.form.solutionList[index].shopId =item.shopId
+ }
+ }
+ })
+
+ this.form.solutionList[index].solution.baseId = baseId
+
+ // this.form.solutionList[index].solution=row
},
send () {
if (!this.form.phone) {
@@ -288,6 +324,11 @@
.then(res => {
this.programme = res
})
+ shopList({ type: 1, status: 0 })
+ .then(res => {
+ console.log(res)
+ this.shops = res
+ })
},
dele (index) {
if (this.form.solutionList.length === 1) {
@@ -298,10 +339,11 @@
},
add () {
this.form.solutionList.push({
- solutionId:null,
+ solutionId: null,
solution: {},
- canAdd: '',
- canReduce: ''
+ shopId: null,
+ canAdd: 1,
+ canReduce: 1
})
},
handleRemove (file, fileList) {
@@ -323,6 +365,7 @@
name: ''
}
this.form.idcardImgList[0] = { fileurl: data.imgurl, name: data.name }
+ this.$forceUpdate()
},
// 韬唤璇佺収鐗�2
result2 (data) {
@@ -331,6 +374,7 @@
name: ''
}
this.form.idcardImgList[1] = { fileurl: data.imgurl, name: data.name }
+ this.$forceUpdate()
},
// 鐢靛瓙绛剧珷
result3 (data) {
--
Gitblit v1.9.3