shish 3 лет назад
Родитель
Сommit
c6603dea49

+ 4 - 2
ghsApp/src/admin/staff/list.vue

@@ -153,10 +153,12 @@ export default {
 			tabIndex: 0,
 			tabs: [
 				{
-					name: '员工列表'
+					name: '员工列表',
+					value: 0
 				},
 				{
-					name: '角色管理'
+					name: '角色管理',
+					value: 2
 				}
 			],
 			// 删除弹窗操作

+ 3 - 0
ghsApp/src/pages.json

@@ -325,7 +325,10 @@
 				{ "path": "details", "style": { "navigationBarTitleText": "确认订单" } },
 				{ "path": "components/pageSuccess", "style": { "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black" } },
 				{ "path": "order", "style": { "navigationBarTitleText": "采购订单", "enablePullDownRefresh": true } },
+				{ "path": "wcOrder", "style": { "navigationBarTitleText": "外采", "enablePullDownRefresh": true } },
        			{ "path": "supplier", "style": { "navigationBarTitleText": "供货商", "enablePullDownRefresh": true } },
+				{ "path": "jdSupplier", "style": { "navigationBarTitleText": "供货商", "enablePullDownRefresh": true } },
+				{ "path": "localSupplier", "style": { "navigationBarTitleText": "外采供货商", "enablePullDownRefresh": true } },
         		{ "path": "suppAdd", "style": { "navigationBarTitleText": "添加供货商", "enablePullDownRefresh": true } },
 				{ "path": "info", "style": { "navigationBarTitleText": "订单详情", "enablePullDownRefresh": true } },
 				{ "path": "refundList", "style": { "navigationBarTitleText": "记录", "enablePullDownRefresh": true } },

+ 338 - 0
ghsApp/src/pagesPurchase/jdSupplier.vue

@@ -0,0 +1,338 @@
+<template>
+<view class="app-content">
+    <view class="input-wrap_box">
+      <view>
+        <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
+      </view>
+      <view style="padding:0 10upx 0 20upx;" >
+				<button class="admin-button-com middle blue" @click="addGhs()">添加供货商</button>
+			</view>
+    </view>
+  <view class="order-page">
+    <view class="order_list" >
+    <block>
+        <block v-if="!$util.isEmpty(supplierList)">
+          <view class="list_item" v-for="(item, index) in supplierList" :key="index" @click="goToCg(item)" >
+
+            <view class="store_name">
+              <image :src="item.avatar"></image>
+              <view class="store_title">{{item.name}}</view>
+              <view class="accumulative"></view>
+            </view>
+            <view class="store_btn">
+              <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list?ghsId'+item.id})"> 结账记录 </view>
+              <view class="btn_entrance" @click.stop="getDebtList()"> 欠款变动明细 </view>
+              <view class="btn_entrance" @click.stop="pageTo({url:'/pagesPurchase/order?ghsId='+item.id})">采购记录</view>
+              <view class="cg-button">采购</view>
+            </view>
+
+            <view class="box_6 flex-row" @click.stop="goToDebtList(item)" v-if="Number(item.debtAmount)>0">
+              <view class="show_clear_area flex-row justify-between">
+                <image class="icon_2" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps2pvfa1l5i34w5vqj2k7b3kejml3i3nmrba1421bf-caa2-491b-8773-af413df7e96d.png" />
+                <text class="waite_clear_order">待结订单&nbsp;{{item.debtNum}}笔&nbsp;¥{{item.debtAmount?parseFloat(item.debtAmount):0}}</text>
+              </view>
+              <view class="image-text_9 flex-row justify-between">
+                <text class="text-group_4">查看明细</text>
+                <image class="icon_3" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps83ag7scu3a8bfq22ciodg5hiu0x9cesxjbfb4c9ca-ee3f-45ec-a6d7-6f166e13d6e6.png" />
+              </view>
+            </view>
+
+          </view>
+        </block>
+        <block v-else>
+          <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(supplierList)" />
+        </block>
+      </block>
+    </view>
+  </view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { getList } from "@/api/ghs";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+  components: { AppWrapperEmpty, AppSearchModule },
+  data () {
+    return {
+      list: {
+        data: []
+      },
+      supplierList: [],
+      tabIndex: 0
+    }
+  },
+	onShow(){
+		uni.removeStorageSync('newGhs')
+    this.getGHSList('')
+	},
+  onPullDownRefresh() {
+    this.getGHSList().then(res => {
+      uni.stopPullDownRefresh();
+    }) 
+  },
+  methods: {
+		addGhs(){
+			this.pageTo({url:'/pagesPurchase/suppAdd?location=0'})
+		},
+    getDebtList(){
+      this.$msg('开发中')
+    },
+    settleAccounts (item) {
+      //this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
+    },
+    init() {
+      this.getGHSList('')
+    },
+    searchFn(e) {
+      this.getGHSList(e)
+    },
+    getGHSList (name) {
+      return getList({ pageSize:300, name:name,location:0 }).then(res => {
+        this.supplierList = res.data.list
+      })
+    },
+    goToDebtList(item) {
+      this.pageTo({url: '/pagesGys/details?id='+item.id})
+		},
+    goToCg (item) {
+      this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name,type:2})
+      //this.pageTo({url: '/pagesPurchase/bookProduct?ghsId='+item.id+'&ghsName='+item.name,type:2})
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.input-wrap_box {
+  background-color: #fff;
+  position: fixed;
+  top: 0;
+  z-index: 10;
+  /* 手机mobile屏幕小于1000px */
+  @media screen and (max-width: 1100px) {
+    width: 100%;
+  }
+  /* 收银台cashier屏幕大于1000px */
+  @media screen and (min-width:1100px) {
+    width: 40%;
+  }   
+  height: 100upx;
+  display: flex;
+  align-items: center;
+  padding: 0 30upx;
+  & > view:nth-child(1) {
+    flex: 1;
+  }
+}
+.order-page {
+  margin-top:100upx;
+  padding-bottom:100upx;
+  .tabs {
+    height: 80upx;
+    line-height: 80upx;
+    & > view {
+      // padding: 0 80upx;
+      width: 50%;
+      text-align: center;
+      font-size: 28upx;
+      color: #666;
+      display: inline-block;
+    }
+    & > .active {
+      position: relative;
+      color: #3385ff;
+      font-weight: 700;
+    }
+    & > .active::after {
+      content: "";
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 70upx;
+      height: 6upx;
+      background: #3385ff;
+    }
+  }
+  .order_list {
+    height: 100%;
+    background-color: #ece5e5;
+    padding: 0 0 20upx;
+
+  .flex-col {
+    display: flex;
+    flex-direction: column;
+  }
+  .flex-row {
+    display: flex;
+    flex-direction: row;
+  }
+  .justify-start {
+      display: flex;
+      justify-content: flex-start;
+    }
+  .justify-center {
+      display: flex;
+      justify-content: center;
+  }
+    
+  .justify-end {
+      display: flex;
+      justify-content: flex-end;
+  }
+  .justify-evenly {
+      display: flex;
+      justify-content: space-evenly;
+  }
+  .justify-around {
+      display: flex;
+      justify-content: space-around;
+  }
+  .justify-between {
+      display: flex;
+      justify-content: space-between;
+  }
+  .align-start {
+      display: flex;
+      align-items: flex-start;
+  }
+  .align-center {
+      display: flex;
+      align-items: center;
+  }
+  .align-end {
+      display: flex;
+      align-items: flex-end;
+  }
+
+    .list_item {
+      margin: 20upx 0 0;
+      position: relative;
+      height: 280upx;
+      padding-bottom:60upx;
+      width: 100vw;
+      background: #fff;
+      display: flex;
+      align-items: center;
+      & > .store_name {
+        margin-left: 30upx;
+        width: 700upx;
+        display: block;
+        image{
+          width:48upx;
+          height:48upx;
+          border-radius:60upx;
+          float:left;
+        }
+        & > .store_title {
+          margin-bottom: 58upx;
+          margin-left:10upx;
+          width: 400upx;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+          overflow: hidden;
+          word-break: break-all;
+          font-size: 36upx;
+          font-weight: 700;
+          color: #333;
+          display:inline-block;
+        }
+        & > .accumulative {
+          font-size: 26upx;
+          color: #999;
+        }
+      }
+      & > .store_btn {
+        position: absolute;
+        top:130upx;
+        left: 0upx;
+        & > .btn_entrance {
+          display: inline-block;
+          font-size: 30upx;
+          color: #666666;
+          padding: 10upx 20upx;
+          margin-left: 20upx;
+          text-decoration:underline;
+        }
+        .cg-button{
+            display: inline-block;
+            font-size: 28upx;
+            color: white;
+            border: 1upx solid #3385FF;
+            border-radius: 80upx;
+            padding: 18upx 32upx;
+            background: #3385FF;
+            position: absolute;
+            top:-80upx;
+            right:-110upx;
+        }
+      }
+      .box_6 {
+        background-color: rgb(248, 242, 242);
+        width: 750upx;
+        height:85upx;
+        position:absolute;
+        top:197upx;
+        .show_clear_area {
+          width: 247upx;
+          height: 29upx;
+          margin: 26upx 0 0 30upx;
+          .icon_2 {
+            width: 22upx;
+            height: 26upx;
+            margin-top: 2upx;
+          }
+          .waite_clear_order {
+            width: 214upx;
+            height: 29upx;
+            overflow-wrap: break-word;
+            color: rgba(255, 40, 66, 1);
+            font-size: 30upx;
+            text-align: left;
+            white-space: nowrap;
+            line-height: 29upx;
+          }
+        }
+        .image-text_9 {
+          width: 134upx;
+          height: 27upx;
+          margin: 26upx 29upx 0 310upx;
+          .text-group_4 {
+            width: 111upx;
+            height: 27upx;
+            overflow-wrap: break-word;
+            color: rgba(255, 40, 66, 1);
+            font-size: 30upx;
+            text-align: left;
+            white-space: nowrap;
+            line-height: 27upx;
+          }
+          .icon_3 {
+            width: 14upx;
+            height: 24upx;
+            margin-top: 2upx;
+          }
+        }
+      }
+
+    }
+  }
+  .pay_list {
+    padding-top: 20upx;
+    background-color: #f0f2f6;
+  }
+}
+.app-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+  .cg-set{
+    margin-right:60upx;
+    color:#3385ff;
+    font-size:30upx;
+  }
+  .add-ghs{
+    margin-right:30upx;
+  }
+}
+</style>

+ 338 - 0
ghsApp/src/pagesPurchase/localSupplier.vue

@@ -0,0 +1,338 @@
+<template>
+<view class="app-content">
+    <view class="input-wrap_box">
+      <view>
+        <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
+      </view>
+      <view style="padding:0 10upx 0 20upx;" >
+				<button class="admin-button-com middle blue" @click="addGhs()">添加供货商</button>
+			</view>
+    </view>
+  <view class="order-page">
+    <view class="order_list" >
+    <block>
+        <block v-if="!$util.isEmpty(supplierList)">
+          <view class="list_item" v-for="(item, index) in supplierList" :key="index" @click="goToCg(item)" >
+
+            <view class="store_name">
+              <image :src="item.avatar"></image>
+              <view class="store_title">{{item.name}}</view>
+              <view class="accumulative"></view>
+            </view>
+            <view class="store_btn">
+              <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list?ghsId'+item.id})"> 结账记录 </view>
+              <view class="btn_entrance" @click.stop="getDebtList()"> 欠款变动明细 </view>
+              <view class="btn_entrance" @click.stop="pageTo({url:'/pagesPurchase/order?ghsId='+item.id})">采购记录</view>
+              <view class="cg-button">采购</view>
+            </view>
+
+            <view class="box_6 flex-row" @click.stop="goToDebtList(item)" v-if="Number(item.debtAmount)>0">
+              <view class="show_clear_area flex-row justify-between">
+                <image class="icon_2" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps2pvfa1l5i34w5vqj2k7b3kejml3i3nmrba1421bf-caa2-491b-8773-af413df7e96d.png" />
+                <text class="waite_clear_order">待结订单&nbsp;{{item.debtNum}}笔&nbsp;¥{{item.debtAmount?parseFloat(item.debtAmount):0}}</text>
+              </view>
+              <view class="image-text_9 flex-row justify-between">
+                <text class="text-group_4">查看明细</text>
+                <image class="icon_3" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps83ag7scu3a8bfq22ciodg5hiu0x9cesxjbfb4c9ca-ee3f-45ec-a6d7-6f166e13d6e6.png" />
+              </view>
+            </view>
+
+          </view>
+        </block>
+        <block v-else>
+          <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(supplierList)" />
+        </block>
+      </block>
+    </view>
+  </view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { getList } from "@/api/ghs";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+  components: { AppWrapperEmpty, AppSearchModule },
+  data () {
+    return {
+      list: {
+        data: []
+      },
+      supplierList: [],
+      tabIndex: 0
+    }
+  },
+	onShow(){
+		uni.removeStorageSync('newGhs');
+    this.getGHSList('')
+	},
+  onPullDownRefresh() {
+    this.getGHSList().then(res => {
+      uni.stopPullDownRefresh();
+    }) 
+  },
+  methods: {
+		addGhs(){
+			this.pageTo({url:'/pagesPurchase/suppAdd?location=1'})
+		},
+    getDebtList(){
+      this.$msg('开发中')
+    },
+    settleAccounts (item) {
+      //this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
+    },
+    init() {
+      this.getGHSList('')
+    },
+    searchFn(e) {
+      this.getGHSList(e)
+    },
+    getGHSList (name) {
+      return getList({ pageSize:300, name:name,location:1 }).then(res => {
+        this.supplierList = res.data.list
+      })
+    },
+    goToDebtList(item) {
+      this.pageTo({url: '/pagesGys/details?id='+item.id})
+		},
+    goToCg (item) {
+      this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name,type:2})
+      //this.pageTo({url: '/pagesPurchase/bookProduct?ghsId='+item.id+'&ghsName='+item.name,type:2})
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.input-wrap_box {
+  background-color: #fff;
+  position: fixed;
+  top: 0;
+  z-index: 10;
+  /* 手机mobile屏幕小于1000px */
+  @media screen and (max-width: 1100px) {
+    width: 100%;
+  }
+  /* 收银台cashier屏幕大于1000px */
+  @media screen and (min-width:1100px) {
+    width: 40%;
+  }   
+  height: 100upx;
+  display: flex;
+  align-items: center;
+  padding: 0 30upx;
+  & > view:nth-child(1) {
+    flex: 1;
+  }
+}
+.order-page {
+  margin-top:100upx;
+  padding-bottom:100upx;
+  .tabs {
+    height: 80upx;
+    line-height: 80upx;
+    & > view {
+      // padding: 0 80upx;
+      width: 50%;
+      text-align: center;
+      font-size: 28upx;
+      color: #666;
+      display: inline-block;
+    }
+    & > .active {
+      position: relative;
+      color: #3385ff;
+      font-weight: 700;
+    }
+    & > .active::after {
+      content: "";
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 70upx;
+      height: 6upx;
+      background: #3385ff;
+    }
+  }
+  .order_list {
+    height: 100%;
+    background-color: #ece5e5;
+    padding: 0 0 20upx;
+
+  .flex-col {
+    display: flex;
+    flex-direction: column;
+  }
+  .flex-row {
+    display: flex;
+    flex-direction: row;
+  }
+  .justify-start {
+      display: flex;
+      justify-content: flex-start;
+    }
+  .justify-center {
+      display: flex;
+      justify-content: center;
+  }
+    
+  .justify-end {
+      display: flex;
+      justify-content: flex-end;
+  }
+  .justify-evenly {
+      display: flex;
+      justify-content: space-evenly;
+  }
+  .justify-around {
+      display: flex;
+      justify-content: space-around;
+  }
+  .justify-between {
+      display: flex;
+      justify-content: space-between;
+  }
+  .align-start {
+      display: flex;
+      align-items: flex-start;
+  }
+  .align-center {
+      display: flex;
+      align-items: center;
+  }
+  .align-end {
+      display: flex;
+      align-items: flex-end;
+  }
+
+    .list_item {
+      margin: 20upx 0 0;
+      position: relative;
+      height: 280upx;
+      padding-bottom:60upx;
+      width: 100vw;
+      background: #fff;
+      display: flex;
+      align-items: center;
+      & > .store_name {
+        margin-left: 30upx;
+        width: 700upx;
+        display: block;
+        image{
+          width:48upx;
+          height:48upx;
+          border-radius:60upx;
+          float:left;
+        }
+        & > .store_title {
+          margin-bottom: 58upx;
+          margin-left:10upx;
+          width: 400upx;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+          overflow: hidden;
+          word-break: break-all;
+          font-size: 36upx;
+          font-weight: 700;
+          color: #333;
+          display:inline-block;
+        }
+        & > .accumulative {
+          font-size: 26upx;
+          color: #999;
+        }
+      }
+      & > .store_btn {
+        position: absolute;
+        top:130upx;
+        left: 0upx;
+        & > .btn_entrance {
+          display: inline-block;
+          font-size: 30upx;
+          color: #666666;
+          padding: 10upx 20upx;
+          margin-left: 20upx;
+          text-decoration:underline;
+        }
+        .cg-button{
+            display: inline-block;
+            font-size: 28upx;
+            color: white;
+            border: 1upx solid #3385FF;
+            border-radius: 80upx;
+            padding: 18upx 32upx;
+            background: #3385FF;
+            position: absolute;
+            top:-80upx;
+            right:-110upx;
+        }
+      }
+      .box_6 {
+        background-color: rgb(248, 242, 242);
+        width: 750upx;
+        height:85upx;
+        position:absolute;
+        top:197upx;
+        .show_clear_area {
+          width: 247upx;
+          height: 29upx;
+          margin: 26upx 0 0 30upx;
+          .icon_2 {
+            width: 22upx;
+            height: 26upx;
+            margin-top: 2upx;
+          }
+          .waite_clear_order {
+            width: 214upx;
+            height: 29upx;
+            overflow-wrap: break-word;
+            color: rgba(255, 40, 66, 1);
+            font-size: 30upx;
+            text-align: left;
+            white-space: nowrap;
+            line-height: 29upx;
+          }
+        }
+        .image-text_9 {
+          width: 134upx;
+          height: 27upx;
+          margin: 26upx 29upx 0 310upx;
+          .text-group_4 {
+            width: 111upx;
+            height: 27upx;
+            overflow-wrap: break-word;
+            color: rgba(255, 40, 66, 1);
+            font-size: 30upx;
+            text-align: left;
+            white-space: nowrap;
+            line-height: 27upx;
+          }
+          .icon_3 {
+            width: 14upx;
+            height: 24upx;
+            margin-top: 2upx;
+          }
+        }
+      }
+
+    }
+  }
+  .pay_list {
+    padding-top: 20upx;
+    background-color: #f0f2f6;
+  }
+}
+.app-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+  .cg-set{
+    margin-right:60upx;
+    color:#3385ff;
+    font-size:30upx;
+  }
+  .add-ghs{
+    margin-right:30upx;
+  }
+}
+</style>

+ 7 - 11
ghsApp/src/pagesPurchase/order.vue

@@ -13,7 +13,6 @@
 			</block>
 		</view>
 		<view class="app-footer open_btn">
-			<view @click="addGhs" class="admin-button-com big blue" style="margin-right:90upx;">新增供货商</view>
 			<view @click="addEvent" class="admin-button-com big blue">新增采购</view>
 		</view>
 	</view>
@@ -39,22 +38,22 @@ export default {
 				{
 					name: "全部",
 					key: "",
-					value: ""
+					value: "0"
 				},
 				{
 					name: "待入库",
 					key: "3",
-					value: ""
+					value: "0"
 				},
 				{
 					name: "已入库",
 					key: "4",
-					value: ""
+					value: "0"
 				},
 				{
 					name: "已取消",
 					key: "5",
-					value: ""
+					value: "0"
 				}
 			]
 		};
@@ -84,14 +83,11 @@ export default {
 	methods: {
 		init(){
 
-		},
-		addGhs(){
-			this.pageTo({url:'/pagesPurchase/suppAdd'})
 		},
 		getCgList() {
 			let ghsId = this.option.ghsId || 0
 			let status = this.tabs[this.tabIndex].key
-			let options = { page: this.list.page, status: status, ghsId:ghsId }
+			let options = { page: this.list.page, status: status, ghsId:ghsId,location:0 }
 			return getPurchaseListApi(options) .then(res => {
 					this.completes(res);
 			})
@@ -106,7 +102,7 @@ export default {
 			this.getCgList();
 		},
 		addEvent() {
-			uni.navigateTo({ url: `/pagesPurchase/supplier` })
+			uni.navigateTo({ url: `/pagesPurchase/jdSupplier` })
 		},
 		gotoDetails(item) {
 			uni.navigateTo({ url: `/pagesPurchase/info?orderSn=${item.orderSn}` })
@@ -121,7 +117,7 @@ export default {
 	flex-direction: column;
 	background-color: #f9fbfc;
 	.order-list {
-		padding-top:60upx;
+		padding-top:120upx;
 		padding-bottom:100upx;
 		flex: 1;
 		.allot-item {

+ 22 - 56
ghsApp/src/pagesPurchase/suppAdd.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="app-content">
       <form @submit="formSubmit">
-        <!-- 名称 -->
         <div class="module-com input-line-wrap">
           <tui-list-cell class="line-cell" :hover="false">
             <div class="tui-title required">名称</div>
@@ -14,45 +13,22 @@
               name="username"
             />
           </tui-list-cell>
-        
-        <!-- 手机号 -->
-        <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title required">手机号</div>
-            <input
-              v-model="form.mobile"
-              class="tui-input"
-              placeholder="请填写手机号"
-              maxlength="50"
-              type="number"
-              name="phone"
-            />
-          </tui-list-cell>
-          <!-- 确认手机号 -->
-        <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title required">确认手机号</div>
-            <input
-              v-model="form.confirmMobile"
-              class="tui-input"
-              placeholder="请确认手机号"
-              maxlength="50"
-              type="number"
-              name="requirePhone"
-            />
-          </tui-list-cell>
-          <!-- 地址 -->
-        <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title">地址</div>
-            <input
-              v-model="form.address"
-              class="tui-input"
-              placeholder="选填"
-              maxlength="50"
-              type="text"
-            />
-          </tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title required">所在地</view>
+					<radio-group class="tui-input" @change="locationChange">
+						<label class="list" for="jdLink">
+							<radio id="jdLink" value="0" :checked="form.location == 0" style="transform:scale(0.7,0.7)" />
+							<span class="checkbox-text">基地</span>
+						</label>
+						<label class="list" for="localLink">
+							<radio id="localLink" value="1" :checked="form.location == 1" style="transform:scale(0.7,0.7)" />
+							<span class="checkbox-text">本地(外采)</span>
+						</label>
+					</radio-group>
+				</tui-list-cell>
+
         </div>
-        
-        <!-- 提交 -->
         <div class="confirm-btn">
           <button class="admin-button-com big blue" formType="submit">确认</button>
         </div>
@@ -71,40 +47,30 @@ export default {
   data() {
     return {
       form: {
-        mobile: '',
-        confirmMobile: '',
         name: '',
-        address: ''
+        location:0
       }
     }
   },
   methods: {
+		locationChange(e){
+			this.form.location = e.detail.value
+		},
     init(){
-
+      if(this.option.location){
+        this.form.location = this.option.location
+      }
     },
     formSubmit(e) {
-      // 表单规则
       let rules = [
         {
           name: "username",
           rule: ["required"],
           msg: ["请填写名称"]
-        },
-        {
-          name: "phone",
-          rule: ["required"],
-          msg: ["请填写手机号"]
-        },
-        {
-          name: "requirePhone",
-          rule: ["required"],
-          msg: ["请确认手机号"]
         }
       ];
-      // 进行表单检查
       let formData = e.detail.value;
       let checkRes = form.validation(formData, rules);
-      // 验证通过!
       if (!checkRes) {
         this.confirmFn();
       } else {

+ 82 - 75
ghsApp/src/pagesPurchase/supplier.vue

@@ -4,8 +4,14 @@
       <view>
         <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/>
       </view>
+      <view style="padding:0 10upx 0 20upx;" >
+				<button class="admin-button-com middle blue" @click="addGhs()">添加</button>
+			</view>
     </view>
   <view class="order-page">
+		<view class="tabs">
+			<Tabs :isFixed="true" :tabs="tabs" :currentTab="tabIndex" @change="changeTabEvent" itemWidth="33%"></Tabs>
+		</view>
     <view class="order_list" >
     <block>
         <block v-if="!$util.isEmpty(supplierList)">
@@ -45,18 +51,36 @@
 </view>
 </template>
 <script>
+import Tabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import { getList } from "@/api/ghs";
 import AppSearchModule from "@/components/module/app-search";
 export default {
-  components: { AppWrapperEmpty, AppSearchModule },
+  components: { AppWrapperEmpty, AppSearchModule,Tabs },
   data () {
     return {
       list: {
         data: []
       },
       supplierList: [],
-      tabIndex: 0
+			tabIndex: 0,
+			tabs: [
+				{
+					name: "全部",
+					key: "",
+					value: "0"
+				},
+				{
+					name: "基地",
+					key: "0",
+					value: "0"
+				},
+				{
+					name: "本地",
+					key: "1",
+					value: "0"
+				}
+			]
     }
   },
 	onShow(){
@@ -68,6 +92,17 @@ export default {
     }) 
   },
   methods: {
+		changeTabEvent(info) {
+			const { index } = info;
+			if (this.tabIndex == index) {
+				return false;
+			} 
+			this.tabIndex = index;
+      this.getGHSList('')
+		},
+		addGhs(){
+			this.pageTo({url:'/pagesPurchase/suppAdd'})
+		},
     getDebtList(){
       this.$msg('开发中')
     },
@@ -81,7 +116,8 @@ export default {
       this.getGHSList(e)
     },
     getGHSList (name) {
-      return getList({ pageSize:300, name:name }).then(res => {
+      let location = this.tabs[this.tabIndex].key
+      return getList({ pageSize:300, name:name,location:location }).then(res => {
         this.supplierList = res.data.list
       })
     },
@@ -120,84 +156,55 @@ export default {
 .order-page {
   margin-top:100upx;
   padding-bottom:100upx;
-  .tabs {
-    height: 80upx;
-    line-height: 80upx;
-    & > view {
-      // padding: 0 80upx;
-      width: 50%;
-      text-align: center;
-      font-size: 28upx;
-      color: #666;
-      display: inline-block;
-    }
-    & > .active {
-      position: relative;
-      color: #3385ff;
-      font-weight: 700;
-    }
-    & > .active::after {
-      content: "";
-      position: absolute;
-      bottom: 0;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 70upx;
-      height: 6upx;
-      background: #3385ff;
-    }
-  }
   .order_list {
     height: 100%;
     background-color: #ece5e5;
-    padding: 0 0 20upx;
-
-  .flex-col {
-    display: flex;
-    flex-direction: column;
-  }
-  .flex-row {
-    display: flex;
-    flex-direction: row;
-  }
-  .justify-start {
+    padding:90upx 0 20upx;
+    .flex-col {
       display: flex;
-      justify-content: flex-start;
+      flex-direction: column;
     }
-  .justify-center {
-      display: flex;
-      justify-content: center;
-  }
-    
-  .justify-end {
-      display: flex;
-      justify-content: flex-end;
-  }
-  .justify-evenly {
-      display: flex;
-      justify-content: space-evenly;
-  }
-  .justify-around {
-      display: flex;
-      justify-content: space-around;
-  }
-  .justify-between {
+    .flex-row {
       display: flex;
-      justify-content: space-between;
-  }
-  .align-start {
-      display: flex;
-      align-items: flex-start;
-  }
-  .align-center {
-      display: flex;
-      align-items: center;
-  }
-  .align-end {
-      display: flex;
-      align-items: flex-end;
-  }
-
+      flex-direction: row;
+    }
+    .justify-start {
+        display: flex;
+        justify-content: flex-start;
+      }
+    .justify-center {
+        display: flex;
+        justify-content: center;
+    }
+      
+    .justify-end {
+        display: flex;
+        justify-content: flex-end;
+    }
+    .justify-evenly {
+        display: flex;
+        justify-content: space-evenly;
+    }
+    .justify-around {
+        display: flex;
+        justify-content: space-around;
+    }
+    .justify-between {
+        display: flex;
+        justify-content: space-between;
+    }
+    .align-start {
+        display: flex;
+        align-items: flex-start;
+    }
+    .align-center {
+        display: flex;
+        align-items: center;
+    }
+    .align-end {
+        display: flex;
+        align-items: flex-end;
+    }
     .list_item {
       margin: 20upx 0 0;
       position: relative;

+ 202 - 0
ghsApp/src/pagesPurchase/wcOrder.vue

@@ -0,0 +1,202 @@
+<template>
+<view class="app-content">
+	<view class="order-page">
+		<view class="tabs">
+			<Tabs :isFixed="true" :tabs="tabs" :currentTab="tabIndex" @change="changeTabEvent" itemWidth="25%"></Tabs>
+		</view>
+		<view scroll-y class="order-list">
+			<block v-if="!$util.isEmpty(list.data)">
+				<OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetails(item)"></OrderItem>
+			</block>
+			<block v-else>
+				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+		</view>
+		<view class="app-footer open_btn">
+			<view @click="addEvent" class="admin-button-com big blue">新增采购</view>
+		</view>
+	</view>
+</view>
+</template>
+<script>
+import Tabs from "@/components/plugin/tabs";
+import OrderItem from "./orderItem";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { list } from "@/mixins";
+import { getPurchaseListApi } from "@/api/purchase/index";
+export default {
+	components: {
+		Tabs,
+		OrderItem,
+		AppWrapperEmpty
+	},
+	mixins: [list],
+	data() {
+		return {
+			tabIndex: 0,
+			tabs: [
+				{
+					name: "全部",
+					key: "",
+					value: "0"
+				},
+				{
+					name: "待入库",
+					key: "3",
+					value: "0"
+				},
+				{
+					name: "已入库",
+					key: "4",
+					value: "0"
+				},
+				{
+					name: "已取消",
+					key: "5",
+					value: "0"
+				}
+			]
+		};
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getCgList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onReachBottom() {
+		if (!this.list.finished) {
+		this.getCgList().then((res) => {
+			uni.stopPullDownRefresh();
+		});
+		} else {
+		uni.stopPullDownRefresh();
+		}
+	},
+	onShow(){
+		this.resetList()
+		this.getCgList()
+	},
+	onLoad(){
+		this.getCgList()
+	},
+	methods: {
+		init(){
+
+		},
+		getCgList() {
+			let ghsId = this.option.ghsId || 0
+			let status = this.tabs[this.tabIndex].key
+			let options = { page: this.list.page, status: status, ghsId:ghsId,location:1 }
+			return getPurchaseListApi(options) .then(res => {
+					this.completes(res);
+			})
+		},
+		changeTabEvent(info) {
+			const { index } = info;
+			if (this.tabIndex == index) {
+				return false;
+			} 
+			this.tabIndex = index;
+			this.resetList();
+			this.getCgList();
+		},
+		addEvent() {
+			uni.navigateTo({ url: `/pagesPurchase/localSupplier` })
+		},
+		gotoDetails(item) {
+			uni.navigateTo({ url: `/pagesPurchase/info?orderSn=${item.orderSn}` })
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.order-page {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	background-color: #f9fbfc;
+	.order-list {
+		padding-top:120upx;
+		padding-bottom:100upx;
+		flex: 1;
+		.allot-item {
+			margin-bottom: 1upx;
+			padding: 30upx;
+			display: flex;
+			align-items: center;
+			box-shadow: 0upx 1upx 0upx 0upx #eeeeee;
+			background-color: #fff;
+			.info {
+				flex: 1;
+				margin-right: 20upx;
+				.info-order {
+					font-size: 32upx;
+					font-weight: 600;
+					color: #333333;
+				}
+				.info-name {
+					margin: 40upx 0 20upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+				.info-time {
+					margin-right: 30upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+			}
+			.status {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				flex-shrink: 0;
+				width: 100upx;
+				color: #cccccc;
+				.status-name {
+					margin-top: 10upx;
+					font-size: 24upx;
+				}
+				.iconfont {
+					font-size: 46upx;
+				}
+				&.primary {
+					color: #3385ff;
+				}
+				&.gray {
+					color: #cccccc;
+				}
+				&.warn {
+					color: #ffaf1d;
+				}
+			}
+		}
+	}
+	.bar-view {
+		flex-shrink: 0;
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		padding: 0 30upx;
+		width: 100%;
+		height: 100upx;
+
+		box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+
+		.btn-view {
+			display: flex;
+			.admin-button-com {
+				margin: 0 10upx;
+				width: 140upx;
+			}
+		}
+	}
+	.cg-set{
+		margin-right:60upx;
+		color:#3385ff;
+		font-size:30upx;
+	}
+}
+</style>