Commit 9c5af3cf by 前端

修复bug

1 parent 8f2d1a3b
...@@ -45,13 +45,13 @@ export default { ...@@ -45,13 +45,13 @@ export default {
label: '', label: '',
prop: '', prop: '',
fixed: 'left', fixed: 'left',
// width:'120', width:'80',
addHtml: 'options' addHtml: 'options'
}, },
{ {
label: '员工姓名', label: '员工姓名',
prop: 'staffName', prop: 'staffName',
// width:'220', width:'220',
}, },
{ {
label: '企业微信', label: '企业微信',
......
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
}, },
'staffCloudIdListStr'(newVal, oldVal) { 'staffCloudIdListStr'(newVal, oldVal) {
this.basicForm.customerList = newVal == oldVal ? this.basicForm.customerList : [] this.basicForm.customerList = newVal == oldVal ? this.basicForm.customerList : []
} },
}, },
methods: { methods: {
getCustomerData(val) { getCustomerData(val) {
......
...@@ -329,8 +329,10 @@ export default { ...@@ -329,8 +329,10 @@ export default {
this.empErrorShow = false this.empErrorShow = false
}, },
'selectSenderList'(val) { 'selectSenderList'(val) {
if (val && val.length > 0) { if (val && val.staffCloudIdList) {
this.empErrorShowExpediter = false this.empErrorShowExpediter = false
}else{
this.basicForm.customerList = []
} }
}, },
'basicForm.customerList'(val) { 'basicForm.customerList'(val) {
...@@ -424,7 +426,7 @@ export default { ...@@ -424,7 +426,7 @@ export default {
return return
} }
} }
if (this.basicForm.managedType == 2 && !this.selectSenderList) { if (this.basicForm.managedType == 2 && this.selectSenderList && !this.selectSenderList.staffCloudIdList) {
this.empErrorShowExpediter = true this.empErrorShowExpediter = true
return return
} }
...@@ -537,6 +539,7 @@ export default { ...@@ -537,6 +539,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
margin-bottom: 16px; margin-bottom: 16px;
background: #ffffff; background: #ffffff;
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</el-tag> </el-tag>
</div> </div>
</div> </div>
<div v-show="empErrorShowCustomer" class="el-form-item__error">请选择客户</div> <div v-show="empErrorShowCustomer" class="el-form-item__error customer_err">请选择客户</div>
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
...@@ -145,7 +145,6 @@ ...@@ -145,7 +145,6 @@
<el-button @click="handleCancel('/wechatGroup/index')">取消</el-button> <el-button @click="handleCancel('/wechatGroup/index')">取消</el-button>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">提交</el-button> <el-button type="primary" v-loading="addLoading" @click="handleSubmit">提交</el-button>
</GLFooter> </GLFooter>
<SelectLabel ref="selectLabel" @tagSelected="handleSelect" :resetMerchantId="resetMerchantId" <SelectLabel ref="selectLabel" @tagSelected="handleSelect" :resetMerchantId="resetMerchantId"
:dialogVisible="dialogVisible"></SelectLabel> :dialogVisible="dialogVisible"></SelectLabel>
<SelectCrowd ref="selectCrowd" @crowdData="getCrowdData" :resetMerchantId="resetMerchantId" <SelectCrowd ref="selectCrowd" @crowdData="getCrowdData" :resetMerchantId="resetMerchantId"
...@@ -156,6 +155,8 @@ ...@@ -156,6 +155,8 @@
</div> </div>
</template> </template>
<script> <script>
import {utils} from "glsx-common";
const combineType = { const combineType = {
label: 2, label: 2,
crowd: 1 crowd: 1
...@@ -386,8 +387,10 @@ export default { ...@@ -386,8 +387,10 @@ export default {
} }
}, },
'selectSenderList'(val) { 'selectSenderList'(val) {
if (val && val.length > 0) { if (val && val.staffCloudIdList) {
this.empErrorShowExpediter = false this.empErrorShowExpediter = false
} else {
this.basicForm.customerList = []
} }
}, },
'basicForm.customerList'(val) { 'basicForm.customerList'(val) {
...@@ -401,9 +404,10 @@ export default { ...@@ -401,9 +404,10 @@ export default {
handleAddEmp() { handleAddEmp() {
this.$refs.selectEmpForm.init() this.$refs.selectEmpForm.init()
}, },
async handleSubmit() { handleSubmit: utils.debounce(async function () {
this.$refs.basicForm.validate(valid => { this.$refs.basicForm.validate(valid => {
if (valid) { if (valid) {
console.log(!this.selectSenderList)
if (this.basicForm.managedType == 1) { if (this.basicForm.managedType == 1) {
if (this.basicForm.selectType == '1' && !this.taggingList.length) { if (this.basicForm.selectType == '1' && !this.taggingList.length) {
this.$message({ this.$message({
...@@ -420,7 +424,7 @@ export default { ...@@ -420,7 +424,7 @@ export default {
return return
} }
} }
if (this.basicForm.managedType == 2 && !this.selectSenderList) { if (this.basicForm.managedType == 2 && this.selectSenderList && !this.selectSenderList.staffCloudIdList) {
this.empErrorShowExpediter = true this.empErrorShowExpediter = true
return return
} }
...@@ -495,11 +499,15 @@ export default { ...@@ -495,11 +499,15 @@ export default {
}) })
} }
}) })
}, }, 300)
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.customer_err {
margin-top: 45px;
}
.container { .container {
margin-bottom: 20px; margin-bottom: 20px;
background: #ffffff; background: #ffffff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!