| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <template>
- <div class="delete_modal">
- <div class="modal_content">
- <p class="edit">编辑</p>
- <div class="content">
- <div class="dlr">
- <p style="width: 100px">DLR Code</p>
- <p>{{ dataObj.dlrCode }}</p>
- </div>
- <div class="area">
- <p style="width: 100px">所属区域</p>
- <p>{{ dataObj.localArea }}</p>
- </div>
- <div class="distributor">
- <p style="width: 100px">经销商店名</p>
- <p>{{ dataObj.dlrName }}</p>
- </div>
- <div class="plate">
- <p style="width: 100px">所属平台</p>
- <p>{{ dataObj.platformName}}</p>
- </div>
- <div class="account">
- <p style="width: 100px">平台账号</p>
- <input v-model="accountCode" @blur="checkVal()"/>
- </div>
- <div v-show="accountIsNumber" style="color: red;font-size: 12px;text-align:center;width: 66%;">平台账号不能为纯数字</div>
- <div class="isAttest">
- <p style="width: 100px">是否认证</p>
- <select v-model="selectValue">
- <!-- 原来列表展示什么,select默认展示 -->
- <option>{{ authorizationName === '是' ? "是" : "否" }}</option>
- <option>{{ authorizationName === '是' ? "否" : "是" }}</option>
- </select>
- </div>
- <div class="fans">
- <p style="width: 100px">粉丝数</p>
- <!-- <input v-model="fansNums" type="number"/> -->
- <p>{{fansNums}}</p>
- </div>
- </div>
- <div class="btn">
- <div class="current_button" @click="submit" style="margin: 0">确定</div>
- <div class="current_button" style="margin: 0" @click="hideModal">
- 取消
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- props: {
- dataObj: {
- type: Object,
- default: () => {
- return {};
- },
- },
- modalAccount: {
- type: String,
- default: ''
- },
- authorizationName: {
- type: String,
- default: ''
- },
- modalFanCount: {
- type: Number,
- default: 0
- },
- },
- data() {
- return {
- accountCode: this.modalAccount,
- fansNums: this.modalFanCount,
- selectValue: this.authorizationName,
- accountIsNumber:false
- };
- },
- methods: {
- checkVal(){
- if(this.dataObj.platformName === '今日头条'){
- this.accountIsNumber = /^\d+$/.test(this.accountCode);
- }else {
- return true
- }
- },
- submit: function () {
- let isAttesta = this.selectValue;
- // let fansNum = this.fansNums;
- let accountCode = this.accountCode;
- // console.log(isAttesta, fansNum, accountCode);
- if (!accountCode) {
- alert('平台账号不能为空');
- return
- }
- if (this.accountIsNumber) {
- alert('平台账号不能为纯数字');
- return
- }
- // if (fansNum < 0) {
- // alert('粉丝数必须大于等于0!');
- // return
- // }
- this.$emit("edit_data", isAttesta, accountCode);
- },
- hideModal: function () {
- this.$emit("hide_modal");
- },
- },
- mounted() {
- },
- };
- </script>
- <style scoped lang="less">
- .delete_modal {
- position: fixed;
- left: 0;
- top: 0;
- height: 100vh;
- width: 100vw;
- background-color: rgba(127, 127, 127, 0.7);
- display: flex;
- justify-content: center;
- align-items: center;
- text-align: left;
- .modal_content {
- width: 700px;
- height: 500px;
- background-color: #eee;
- transform: translateY(-50px);
- .edit {
- height: 40px;
- line-height: 40px;
- font-size: 20px;
- text-align: left;
- border-bottom: 1px solid #ccc;
- padding-left: 20px;
- }
- .content {
- padding-left: 220px;
- .dlr {
- display: flex;
- margin-top: 20px;
- p {
- font-size: 14px;
- height: 28px;
- line-height: 28px;
- }
- }
- .area {
- display: flex;
- margin-top: 15px;
- p {
- font-size: 14px;
- height: 28px;
- line-height: 28px;
- }
- }
- .distributor {
- margin-top: 15px;
- display: flex;
- height: 28px;
- line-height: 28px;
- p {
- font-size: 14px;
- }
- }
- .plate {
- margin-top: 15px;
- display: flex;
- height: 28px;
- line-height: 28px;
- p {
- font-size: 14px;
- }
- }
- .account {
- margin-top: 15px;
- display: flex;
- height: 28px;
- line-height: 28px;
- p {
- font-size: 14px;
- }
- }
- .isAttest {
- margin-top: 15px;
- display: flex;
- p {
- font-size: 14px;
- height: 28px;
- line-height: 28px;
- }
- select {
- border: 1px solid #ccc;
- width: 144px;
- height: 28px;
- font-size: 14px;
- option {
- color: #555;
- font-size: 14px;
- }
- }
- }
- .fans {
- margin-top: 15px;
- display: flex;
- height: 28px;
- line-height: 28px;
- p {
- font-size: 14px;
- }
- input {
- border: 1px solid #ccc;
- width: 144px;
- height: 28px;
- font-size: 14px;
- }
- }
- }
- .btn {
- margin: 0 auto;
- width: 150px;
- margin-top: 50px;
- display: flex;
- justify-content: space-between;
- }
- }
- }
- </style>
|