|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="supplier-container">
|
|
|
- <uni-swipe-action ref="slide">
|
|
|
+ <!-- <uni-swipe-action ref="slide">
|
|
|
<view class="supplier-info" @click="gotoSupplierDetail(item)" v-for="(item,index) in dataList" :key="item.id">
|
|
|
<uni-swipe-action-item :right-options="options"
|
|
|
@click="bindClick($event,item)" :show="isOpened" @change="change">
|
|
@@ -17,8 +17,22 @@
|
|
|
</view>
|
|
|
</uni-swipe-action-item>
|
|
|
</view>
|
|
|
- </uni-swipe-action>
|
|
|
- <u-button type="primary" class="commit-button" @click="jumpPage">增加供应商</u-button>
|
|
|
+ </uni-swipe-action> -->
|
|
|
+ <view class="supplier-info" @click="gotoSupplierDetail(item)" v-for="(item,index) in dataList" :key="item.id">
|
|
|
+ <view class="supplier-title">
|
|
|
+ <view class="supplier-title-text">
|
|
|
+ {{item.name || '-'}}
|
|
|
+ </view>
|
|
|
+ <view class="supplier-title-contacts">
|
|
|
+ {{item.contactName || '-'}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="supplier-tel">
|
|
|
+ {{item.contactPhone || '-'}}
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <u-button type="primary" class="commit-button" @click="jumpPage">增加合作者</u-button>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -68,50 +82,45 @@
|
|
|
this.getSupplierListData();
|
|
|
},
|
|
|
methods: {
|
|
|
- //跳转供应商
|
|
|
+ //跳转合作者
|
|
|
jumpPage(){
|
|
|
uni.navigateTo({
|
|
|
url:`/pages/index/supplierAdd?stationCode=${this.param.stationCode}&stationName=${this.param.stationName}`
|
|
|
})
|
|
|
},
|
|
|
- bindClick(e,item) {
|
|
|
- if(e.content.text==='删除'){
|
|
|
- let _that = this
|
|
|
- uni.showModal({
|
|
|
- title: `确认删除吗?`,
|
|
|
- content: '',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- _that.$http.supplierDel({id:item.id,stationCode:_that.param.stationCode})
|
|
|
- .then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- _that.getSupplierListData()
|
|
|
- }else{
|
|
|
- _that.$utils.msg(res.msg);
|
|
|
- }
|
|
|
+ // bindClick(e,item) {
|
|
|
+ // if(e.content.text==='删除'){
|
|
|
+ // let _that = this
|
|
|
+ // uni.showModal({
|
|
|
+ // title: `确认删除吗?`,
|
|
|
+ // content: '',
|
|
|
+ // success: function(res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // _that.$http.supplierDel({id:item.id,stationCode:_that.param.stationCode})
|
|
|
+ // .then(res => {
|
|
|
+ // if (res.code === 200) {
|
|
|
+ // _that.getSupplierListData()
|
|
|
+ // }else{
|
|
|
+ // _that.$utils.msg(res.msg);
|
|
|
+ // }
|
|
|
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- } else if (res.cancel) {
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }else{
|
|
|
- uni.navigateTo({
|
|
|
- url:'/pages/index/supplierAdd?item='+encodeURIComponent(JSON.stringify(item))
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- change(e) {
|
|
|
- // console.log(e, '改变事件')
|
|
|
- },
|
|
|
-
|
|
|
- //删除供应商
|
|
|
- delSupplier() {
|
|
|
-
|
|
|
- },
|
|
|
+ // }).catch(err => {
|
|
|
+ // console.error(err)
|
|
|
+ // })
|
|
|
+ // } else if (res.cancel) {
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }else{
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url:'/pages/index/supplierAdd?item='+encodeURIComponent(JSON.stringify(item))
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // change(e) {
|
|
|
+ // // console.log(e, '改变事件')
|
|
|
+ // },
|
|
|
//跳转详情页
|
|
|
gotoSupplierDetail(item) {
|
|
|
uni.navigateTo({
|