shish 2 жил өмнө
parent
commit
cbba33e356

+ 76 - 0
hdApp/src/admin/ghs/balanceChange.vue

@@ -0,0 +1,76 @@
+<template>
+<view class="app-content">
+		<block v-if="!$util.isEmpty(list.data)">
+			<t-table :headerBackgroundColor="'#F0F2F6'">
+				<t-tr header>
+					<t-th>日期</t-th>
+					<t-th><view style="width:230upx;">事项</view></t-th>
+					<t-th>变动</t-th>
+					<t-th>余额</t-th>
+				</t-tr>
+				<view v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+					<t-tr>
+						<t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
+						<t-td align="center" color="info"><view style="width:230upx;">{{ item.event }}</view></t-td>
+						<t-td align="center" color="info"><view >{{ item.amount }}</view></t-td>
+						<t-td align="center" color="info"><view >{{ parseFloat(item.balance) }}</view></t-td>
+					</t-tr>
+				</view>
+			</t-table>
+		</block>
+		<block v-else>
+			<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+		</block>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty"
+import { balanceChangeList } from '@/api/ghs'
+import list from '@/mixins/list'
+export default {
+	name: "debtChange",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins:[list],
+	data() {
+		return {
+		};
+	},
+	methods: {
+		async init(){
+			const res = await balanceChangeList({ page:this.list.page,ghsId:this.option.ghsId })
+			if (this.$util.isEmpty(res.data.list)){
+				this.completes(res)
+				return
+			}
+			let currentList = res.data.list
+			currentList.forEach(function(item,index,array){
+				array[index].amount = item.io == 0 ? '-'+parseFloat(item.amount) : '+'+parseFloat(item.amount)
+			});
+			res.data.list = currentList
+			this.completes(res)
+		},
+		goDetail(item){
+			if(item.capitalType == 65){
+				this.$util.pageTo({url: "/admin/clear/info?id="+item.relateId})
+			}
+		}
+	},
+	async onPullDownRefresh() {
+		this.resetList();
+		await this.init()
+		uni.stopPullDownRefresh();
+	},
+	async onReachBottom() {
+		if (!this.list.finished) {
+			await this.init()
+			uni.stopPullDownRefresh();;
+		} else {
+			uni.stopPullDownRefresh();
+		}
+	},
+	
+};
+</script>
+<style lang="scss" scoped></style>

+ 30 - 6
hdApp/src/admin/home/workbench.vue

@@ -203,7 +203,7 @@
           <block v-else>
           <block v-else>
             <view class="button_6 flex-col" @click="fillCg(ghsInfo)"><text class="text_13">录采购单</text></view>
             <view class="button_6 flex-col" @click="fillCg(ghsInfo)"><text class="text_13">录采购单</text></view>
           </block>
           </block>
-          <text style="position:absolute;left:725upx;top:0upx;color:#CCCCCC;" @click.stop="bpSj(ghsInfo)">x</text>
+          <text style="position:absolute;left:690upx;top:0upx;color:#CCCCCC;" @click.stop="getMore(ghsInfo)">更多</text>
         </view>
         </view>
     </view>
     </view>
 
 
@@ -221,6 +221,17 @@
   </view>
   </view>
 
 
   </block>
   </block>
+
+
+  <uni-popup ref="toShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
+			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+				<view style="width:100vw;margin-top:8upx;"><button @click="balanceChange()">余额变动记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">屏蔽此商家</button></view>
+				<view style="width:100vw;margin-top:30upx;"><button @click="closeToShow()">取消</button></view>
+			</view>
+		</uni-popup>
+
+
 </view>
 </view>
 </template>
 </template>
 <script>
 <script>
@@ -281,7 +292,8 @@ export default {
       loginStyle :0,
       loginStyle :0,
       backAction:'',
       backAction:'',
       countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
       countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
-      lookMoney:1
+      lookMoney:1,
+      currentGhs:{}
     };
     };
   },
   },
   computed: {
   computed: {
@@ -334,6 +346,13 @@ export default {
 
 
   },
   },
   methods: {
   methods: {
+		closeToShow(){
+			this.$refs.toShowMore.close()
+		},
+    getMore(info){
+			this.currentGhs = info
+			this.$refs.toShowMore.open('top')
+    },
     callUp (mobile) {
     callUp (mobile) {
       uni.makePhoneCall({ phoneNumber: mobile })
       uni.makePhoneCall({ phoneNumber: mobile })
     },
     },
@@ -353,7 +372,7 @@ export default {
     goMore(){
     goMore(){
       let that = this
       let that = this
       uni.showActionSheet({
       uni.showActionSheet({
-        itemList: ['已屏蔽列表', '改进建议','开关商城','申请批发店系统','修改密码','退出登录'],
+        itemList: ['已屏蔽商家', '改进建议','开关商城','申请批发店系统','修改密码','退出登录'],
         success: function (res) {
         success: function (res) {
           if(res.tapIndex == 0){
           if(res.tapIndex == 0){
             that.$util.pageTo({url: '/pagesPurchase/pb'})
             that.$util.pageTo({url: '/pagesPurchase/pb'})
@@ -409,16 +428,21 @@ export default {
       const { id } = item
       const { id } = item
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
     },
     },
-    bpSj(ghs){
+    balanceChange(){
+      this.closeToShow()
+      this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+this.currentGhs.id})
+    },
+    bpSj(){
       let that = this
       let that = this
-      that.$util.confirmModal({content:'确认删除此商家?',okText:'确认'},() => {
-        that.confirmPb(ghs)
+      that.$util.confirmModal({content:'确认屏蔽此商家?',okText:'确认'},() => {
+        that.confirmPb(that.currentGhs)
 			})
 			})
     },
     },
     confirmPb(ghs){
     confirmPb(ghs){
       let that = this
       let that = this
       changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
       changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
         if(res.code == 1){
         if(res.code == 1){
+          that.closeToShow()
           that.getGHSList()
           that.getGHSList()
         }
         }
       })
       })

+ 4 - 0
hdApp/src/api/ghs/index.js

@@ -52,4 +52,8 @@ export const bcGhs = data => {
 
 
 export const debtChangeList = data => {
 export const debtChangeList = data => {
 	return https.get('/ghs-debt-change/list', data)
 	return https.get('/ghs-debt-change/list', data)
+}
+
+export const balanceChangeList = data => {
+	return https.get('/ghs-balance-change/list', data)
 }
 }

+ 1 - 1
hdApp/src/ext.json

@@ -4,7 +4,7 @@
   "directCommit": false,
   "directCommit": false,
   "ext": {
   "ext": {
     "account": 12362,
     "account": 12362,
-    "apiHost": "http://api.shop.huaml.com",
+    "apiHost": "https://api.shop.huaml.com",
     "socketApiHost": "api.shop.huaml.com",
     "socketApiHost": "api.shop.huaml.com",
     "imgHost": "https://img.huaml.com",
     "imgHost": "https://img.huaml.com",
     "name":"花美玲"
     "name":"花美玲"

+ 2 - 1
hdApp/src/pages.json

@@ -167,7 +167,8 @@
 			"pages": [
 			"pages": [
 				{ "path": "shop", "style": {"navigationBarTitleText": "供货商"}},
 				{ "path": "shop", "style": {"navigationBarTitleText": "供货商"}},
 				{ "path": "addGhs", "style": {"navigationBarTitleText": "添加"}},
 				{ "path": "addGhs", "style": {"navigationBarTitleText": "添加"}},
-				{ "path": "debtChange", "style": {"navigationBarTitleText": "欠款变动明细"}}
+				{ "path": "debtChange", "style": {"navigationBarTitleText": "欠款变动明细"}},
+				{ "path": "balanceChange", "style": {"navigationBarTitleText": "余额变动明细"}}
 			]
 			]
 		},
 		},
 		{
 		{

+ 25 - 5
hdApp/src/pagesPurchase/order.vue

@@ -68,7 +68,7 @@
               <block v-else>
               <block v-else>
                 <view class="button_6 flex-col" @click="fillCg(ghsInfo)"><text class="text_13">录采购单</text></view>
                 <view class="button_6 flex-col" @click="fillCg(ghsInfo)"><text class="text_13">录采购单</text></view>
               </block>
               </block>
-              <text style="position:absolute;left:725upx;top:0upx;color:#CCCCCC;" @click.stop="bpSj(ghsInfo)">x</text>
+              <text style="position:absolute;left:690upx;top:0upx;color:#CCCCCC;" @click.stop="getMore(ghsInfo)">更多</text>
             </view>
             </view>
         </view>
         </view>
 
 
@@ -82,6 +82,14 @@
         <view @click="addGhs()" class="admin-button-com big blue">新增供货商</view>
         <view @click="addGhs()" class="admin-button-com big blue">新增供货商</view>
       </view>
       </view>
 
 
+      <uni-popup ref="toShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
+			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+				<view style="width:100vw;margin-top:8upx;"><button @click="balanceChange()">余额变动记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">屏蔽此商家</button></view>
+				<view style="width:100vw;margin-top:30upx;"><button @click="closeToShow()">取消</button></view>
+			</view>
+		</uni-popup>
+
   </view>
   </view>
 </template>
 </template>
 <script>
 <script>
@@ -95,9 +103,9 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
-
       supplierList: [],
       supplierList: [],
-      ad:[]
+      ad:[],
+      currentGhs:{}
     }
     }
   },
   },
   onPullDownRefresh() {
   onPullDownRefresh() {
@@ -109,6 +117,13 @@ export default {
     ...mapGetters({ dictInfo:"getDictionariesInfo" })
     ...mapGetters({ dictInfo:"getDictionariesInfo" })
   },
   },
   methods: {
   methods: {
+		closeToShow(){
+			this.$refs.toShowMore.close()
+		},
+    getMore(info){
+			this.currentGhs = info
+			this.$refs.toShowMore.open('top')
+    },
     callUp (mobile) {
     callUp (mobile) {
       uni.makePhoneCall({ phoneNumber: mobile })
       uni.makePhoneCall({ phoneNumber: mobile })
     },
     },
@@ -133,16 +148,21 @@ export default {
       const { id } = item
       const { id } = item
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
     },
     },
-    bpSj(ghs){
+    balanceChange(){
+      this.closeToShow()
+      this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+this.currentGhs.id})
+    },
+    bpSj(){
       let that = this
       let that = this
       that.$util.confirmModal({content:'确认删除此商家?',okText:'确认'},() => {
       that.$util.confirmModal({content:'确认删除此商家?',okText:'确认'},() => {
-        that.confirmPb(ghs)
+        that.confirmPb(that.currentGhs)
 			})
 			})
     },
     },
     confirmPb(ghs){
     confirmPb(ghs){
       let that = this
       let that = this
       changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
       changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
         if(res.code == 1){
         if(res.code == 1){
+          that.closeToShow()
           that.getGHSList()
           that.getGHSList()
         }
         }
       })
       })