|
|
@@ -5,13 +5,14 @@
|
|
|
class="order_list"
|
|
|
scroll-view
|
|
|
>
|
|
|
+ <block>
|
|
|
<!-- 供货商列表 -->
|
|
|
- <!-- <block v-if="!$util.isEmpty(supplierList)"> -->
|
|
|
- <!-- <view
|
|
|
+ <block v-if="!$util.isEmpty(supplierList)">
|
|
|
+ <view
|
|
|
class="list_item"
|
|
|
v-for="(item, index) in supplierList"
|
|
|
:key="index"
|
|
|
- @click="enter(item)"
|
|
|
+ @click="gotoDetails"
|
|
|
>
|
|
|
<image :src="item.avatar"></image>
|
|
|
<view class="store_name">
|
|
|
@@ -19,70 +20,42 @@
|
|
|
<view class="accumulative">欠款: {{item.debtAmount}}</view>
|
|
|
</view>
|
|
|
<view class="store_btn">
|
|
|
- <view class="btn_entrance" v-if="Number(item.debtAmount) > 0" @click.stop="settleAccounts(item)" >
|
|
|
+ <view class="btn_entrance" v-if="Number(item.debtAmount) > 0" @click.stop="gotoDetailsEvent(item)" >
|
|
|
结账
|
|
|
</view>
|
|
|
<view class="btn_entrance btn_forbid" v-else @click.stop="" >
|
|
|
结账
|
|
|
</view>
|
|
|
- <view class="btn_entrance" @click.stop="enter(item)" >
|
|
|
- 采购
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
- <view class="list_item" v-for="(item, index) in 8" :key="index">
|
|
|
- <image src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3015225555,4165558783&fm=26&gp=0.jpg"></image>
|
|
|
- <view class="store_name">
|
|
|
- <view class="store_title">明星花卉</view>
|
|
|
- <view class="accumulative">欠款: 5800</view>
|
|
|
- </view>
|
|
|
- <view class="store_btn">
|
|
|
- <view class="btn_entrance">
|
|
|
- 结账
|
|
|
- </view>
|
|
|
- <view class="btn_entrance">
|
|
|
+ <view class="btn_entrance" @click.stop="gotoDetails" >
|
|
|
采购
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- </block> -->
|
|
|
- <!-- <block v-else> -->
|
|
|
- <!-- <AppWrapperEmpty
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <AppWrapperEmpty
|
|
|
title="暂无数据"
|
|
|
:is-empty="$util.isEmpty(supplierList)"
|
|
|
- /> -->
|
|
|
- <!-- </block> -->
|
|
|
+ />
|
|
|
+ </block>
|
|
|
+ </block>
|
|
|
</scroll-view>
|
|
|
<!-- 按钮 -->
|
|
|
<div class="app-footer">
|
|
|
- <div class="admin-button-com middle blue">添加供货商</div>
|
|
|
+ <div class="admin-button-com middle blue" @click="add">添加</div>
|
|
|
</div>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-import { ghsList, purchaseList } from "@/api/purchase/index";
|
|
|
+import { getList } from "@/api/ghs";
|
|
|
export default {
|
|
|
components: {
|
|
|
AppWrapperEmpty,
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- tabs: [
|
|
|
- {
|
|
|
- name: "供货商",
|
|
|
- key: "",
|
|
|
- },
|
|
|
- {
|
|
|
- name: "采购记录",
|
|
|
- key: "1",
|
|
|
- },
|
|
|
- {
|
|
|
- name: "111",
|
|
|
- key: "1",
|
|
|
- },
|
|
|
- ],
|
|
|
list: {
|
|
|
data: []
|
|
|
},
|
|
|
@@ -96,32 +69,34 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- enter (item) {
|
|
|
- const { id } = item
|
|
|
- uni.navigateTo({url:`/pagesPurchase/ghsProduct?id=${id}`, type: 2 })
|
|
|
- // this.pageTo({ url: `/pagesPurchase/ghsProduct?id=${id}`, type: 2 })
|
|
|
+ init() {
|
|
|
+ this.getGHSList()
|
|
|
},
|
|
|
- // init() {
|
|
|
- // this.getGHSList()
|
|
|
- // },
|
|
|
getGHSList () {
|
|
|
- return ghsList().then(res => {
|
|
|
+ return getList().then(res => {
|
|
|
this.supplierList = res.data.list
|
|
|
console.log(this.supplierList, 111)
|
|
|
}).catch(err => { console.log(err) })
|
|
|
},
|
|
|
- // 结账
|
|
|
- settleAccounts (item) {
|
|
|
+ gotoDetailsEvent(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesArrears/details?id=${item.id}`,
|
|
|
+ success: result => {},
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 采购记录详情
|
|
|
+ gotoDetails () {
|
|
|
this.pageTo({
|
|
|
- url: '/pagesPurchase/gathering?id='+item.id,
|
|
|
+ url: '/pagesPurchase/add',
|
|
|
+ type:2
|
|
|
})
|
|
|
},
|
|
|
- // 采购记录详情
|
|
|
- gotoDetails (val) {
|
|
|
- console.log(val)
|
|
|
+ // 添加供货商
|
|
|
+ add() {
|
|
|
this.pageTo({
|
|
|
- url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id,
|
|
|
- type:2
|
|
|
+ url: '/pagesPurchase/suppAdd'
|
|
|
})
|
|
|
}
|
|
|
}
|