123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 |
- <template>
- <view>
- <view class="head">
- <view class="title u-line-1">{{ detail.storename || '' }}</view>
- <view class="content">
- <view class="left">
- <view class="tag-box">
- <view class="storetype">
- {{ detail.storetype }}
- </view>
- <view class="markettype">
- {{ detail.markettype }}
- </view>
- </view>
- <view class="row">
- <text class="iconfont icon-renyuan-hui" />
- <text>
- {{ detail.name }}
- </text>
- <text style="margin-left: 5px;">
- {{ detail.phonenumber }}
- </text>
- </view>
- <view class="row">
- <text class="iconfont icon-dizhi-hui1" />
- {{ getCity(detail) }}
- </view>
- <view class="row">
- 状态:<text style="color: #333333;">{{ detail.status }}</text>
- </view>
- </view>
- <view class="right">
- <u--image :src="detail.cover" :width="tovw(100)" :height="tovw(100)" radius="5">
- <template v-slot:loading>
- <u-loading-icon color="red"></u-loading-icon>
- </template>
- </u--image>
- </view>
- </view>
- </view>
- <u-tabs :scrollable="false" lineColor="#C30D23" :activeStyle="{ color: '#C30D23', fontWeight: 'bold' }" :list="tabs"
- @click="changeCurrent" :current="current" />
- <view v-show="current == 0">
- <displayCell :showList="showList" :detail="detail" />
- </view>
- <block v-if="detail.status != '审核'">
- <view style="height: 75px;" />
- <view class="footer">
- <view class="insert" :class="detail.status == '新建' ? '' : 'forbidden'"
- @click="detail.status == '新建' ? toEdit() : ''">
- 编辑门店信息
- </view>
- <view class="invite" @click="detail.status == '新建' ? submit() : revocation()">
- {{ detail.status == '新建' ? '提交门店信息' : '撤回' }}
- </view>
- </view>
- </block>
- <view v-else style="height: 30px;" />
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- current: 0,
- sa_storeid: 0,
- detail: {},
- tabs: [{ name: "门店详情" }, { name: "门店人员" }],
- showList: []
- }
- },
- onLoad(options) {
- console.log(options)
- this.sa_storeid = options.id;
- this.getDetail();
- uni.setNavigationBarTitle({
- title: '门店信息'
- });
- },
- onUnload() {
- delete this.$Http.uploadStoreDetail;
- },
- methods: {
- getDetail() {
- this.$Http.basic({
- "id": "20240410095402",
- "content": {
- "sa_storeid": this.sa_storeid
- }
- }).then(res => {
- console.log("店铺详情", res)
- if (this.cutoff(res.msg)) return;
- res.data.cover = res.data.attinfos.length ? this.getSpecifiedImage(res.data.attinfos[0], 'compressed') || uni.getStorageSync("site").logo : uni.getStorageSync("site").logo
- this.detail = res.data;
- this.showList = [{
- label: "门店名称",
- key: "storename"
- }, {
- label: "面积(m²)",
- key: "area"
- }, {
- label: "负责人",
- key: "name"
- }, {
- label: "负责人电话",
- key: "phonenumber",
- funName: "callPhone"
- }, {
- label: "负责人账号",
- key: "accountno"
- }, {
- label: "门店售前电话",
- key: "sale_phonenmber",
- funName: "callPhone"
- }, {
- label: "门店售后电话",
- key: "service_phonenmber",
- funName: "callPhone"
- }, {
- label: "门店类型",
- key: 'storetype'
- }, {
- label: "卖场类型",
- key: "markettype"
- }, {
- label: "门店地址",
- value: this.getCity(res.data)
- }, {
- label: "所属经销商",
- key: "enterprisename"
- },]
- })
- },
- toEdit() {
- this.$Http.uploadStoreDetail = this.getDetail.bind(this);
- uni.navigateTo({
- url: "/store/insert/store?title=编辑门店信息&data=" + JSON.stringify(this.detail)
- })
- },
- submit() {
- let that = this;
- uni.showModal({
- title: '提交门店信息',
- content: '是否确定提交门店信息?',
- success: function ({ confirm }) {
- if (confirm) that.$Http.basic({
- "id": "20240410110302",
- "content": {
- "sa_storeid": that.detail.sa_storeid
- }
- }).then(res => {
- console.log('提交门店信息', res)
- if (that.cutoff(res.msg, '提交成功!')) return;
- that.$Http.uploadStoreList && that.$Http.uploadStoreList();
- that.getDetail();
- })
- }
- });
- },
- revocation() {
- let that = this;
- uni.showModal({
- title: '提交门店信息',
- content: '是否确定撤回提交门店信息?',
- success: function ({ confirm }) {
- if (confirm) that.$Http.basic({
- "id": "20240410110802",
- "content": {
- "sa_storeid": that.detail.sa_storeid
- }
- }).then(res => {
- console.log('撤回提交门店信息', res)
- if (that.cutoff(res.msg, '撤回提交成功!')) return;
- that.$Http.uploadStoreList && that.$Http.uploadStoreList();
- that.getDetail();
- })
- }
- });
- },
- changeCurrent({ index }) {
- this.current = index;
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .head {
- width: 100vw;
- background: #FFFFFF;
- border-radius: 8px;
- padding: 10px;
- box-sizing: border-box;
- margin-bottom: 10px;
- .title {
- line-height: 24px;
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-weight: bold;
- font-size: 16px;
- color: #333333;
- }
- .content {
- position: relative;
- .left {
- width: 220px;
- .tag-box {
- display: flex;
- .storetype,
- .markettype {
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-size: 12px;
- color: #FFFFFF;
- height: 24px;
- line-height: 24px;
- padding: 0 4px;
- border-radius: 2px;
- margin-top: 5px;
- }
- .storetype {
- background: #095DE0;
- }
- .markettype {
- background: #FC9228;
- margin-left: 5px;
- }
- }
- .row {
- line-height: 17px;
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-size: 12px;
- color: #888888;
- margin-top: 5px;
- .iconfont {
- margin-right: 5px;
- font-size: 12px;
- }
- }
- }
- .right {
- position: absolute;
- right: 0;
- bottom: 0;
- }
- }
- }
- .footer {
- position: fixed;
- bottom: 0;
- display: flex;
- justify-content: space-between;
- width: 100vw;
- height: 65px;
- background: #FFFFFF;
- box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
- padding: 5px 10px;
- box-sizing: border-box;
- .insert {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 168px;
- height: 45px;
- background: #FFFFFF;
- border-radius: 5px;
- border: 1px solid #999999;
- font-family: PingFang SC, PingFang SC;
- font-size: 16px;
- color: #666666;
- box-sizing: border-box;
- }
- .invite {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 177px;
- height: 45px;
- background: #C30D23;
- border-radius: 5px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 16px;
- color: #FFFFFF;
- }
- .forbidden {
- opacity: .6;
- }
- }
- </style>
|