shish 4 лет назад
Родитель
Сommit
b1fc3d6814

+ 32 - 5
ghsApp/dist/build/mp-weixin/project.config.json

@@ -5,7 +5,38 @@
   },
   "setting": {
     "urlCheck": false,
-    "es6": true
+    "es6": true,
+    "enhance": true,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": false,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "lazyloadPlaceholderEnable": false,
+    "useMultiFrameRuntime": false,
+    "useApiHook": false,
+    "useApiHostProcess": false,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "enableEngineNative": false,
+    "useIsolateContext": true,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "showES6CompileOption": false
   },
   "compileType": "miniprogram",
   "libVersion": "",
@@ -13,19 +44,15 @@
   "projectname": "供应商",
   "condition": {
     "search": {
-      "current": -1,
       "list": []
     },
     "conversation": {
-      "current": -1,
       "list": []
     },
     "game": {
-      "current": -1,
       "list": []
     },
     "miniprogram": {
-      "current": -1,
       "list": []
     }
   }

+ 122 - 0
ghsApp/src/admin/cg/set.vue

@@ -0,0 +1,122 @@
+<template>
+  <div class="app-content">
+    <div>
+      <form @submit="formSubmit" @reset="formReset">
+        <div class="module-com input-line-wrap">
+
+          <tui-list-cell class="line-cell" :arrow="false">
+            <div class="tui-title">简约模式:</div>
+            <switch style="transform: scale(0.8,0.8)" :checked="cgModel == 0 ? false : true" @change="cgModelChange" /><text v-if="cgModel == 0">关闭</text><text v-else>开启</text>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :arrow="false" v-if="cgModel == 1">
+            <div class="tui-title">运费成本:</div>
+            <input v-model="form.cgPerCost" placeholder-class="phcolor" class="tui-input" name="cgPerCost" placeholder="每公斤的运费成本" />
+          </tui-list-cell>
+
+        </div>
+        <div class="confirm-btn">
+          <button class="admin-button-com big blue" formType="submit">保存</button>
+        </div>
+      </form>
+    </div>
+  </div>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import { currentShop,updateCgModel } from "@/api/shop";
+export default {
+  name: "cgSet",
+  components: {TuiListCell},
+  data() {
+    return {
+      form:{
+        cgPerCost:'',
+      },
+      hasLoad:false,
+      cgModel:0
+    };
+  },
+  onLoad() {
+  },
+  onShow() {
+
+  },
+  methods: {
+    cgModelChange(e){
+			let value = e.target.value
+            if(value){
+                this.cgModel = 1
+            }else{
+                this.cgModel = 0
+            }
+    },
+    init(){
+      if(this.hasLoad){
+        return false
+      }
+      currentShop().then(res=>{
+        if(res.code == 1){
+          this.hasLoad = true
+          this.form.cost = res.data.cgPerCost
+          this.cgModel = res.data.cgModel
+          this.$forceUpdate()
+        }
+      })
+    },
+    selectCustom(){
+      this.$util.pageTo({ url: '/admin/custom/selectCustom',query: {style:2}})
+    },
+    formSubmit() {
+      let that = this
+      if(that.cgModel == 1){
+        if(that.$util.isMoney(that.form.cgPerCost) == false){
+            that.$msg('请输入运费成本')
+            return false
+        }
+      }
+      updateCgModel({cgPerCost:that.form.cgPerCost,cgModel:that.cgModel}).then(res=>{
+          if(res.code == 1){
+            that.$msg(res.msg)
+            uni.navigateBack();
+          }
+      })
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 20px);
+  padding-top: 20px;
+}
+.prompt-text {
+  color: $fontColor3;
+  padding-left: 30px;
+  margin-bottom: 30px;
+}
+.module-com {
+  margin-bottom: 20px;
+  .member-wrap {
+    .member-det {
+      font-size: 24px;
+      margin-left: 20px;
+    }
+  }
+  .remark-wrap {
+    align-items: flex-start;
+    .remark {
+      height: 240px;
+    }
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60px);
+  margin: 60px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 4 - 0
ghsApp/src/api/shop/index.js

@@ -70,4 +70,8 @@ export const skCustom = data => {
 
 export const skCustomSet = data => {
 	return https.get('/shop/sk-custom-set', data)
+}
+
+export const updateCgModel = data => {
+	return https.get('/shop/update-cg-model', data)
 }

+ 8 - 2
ghsApp/src/pages.json

@@ -455,7 +455,7 @@
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "欠款",
+						"navigationBarTitleText": "欠款订单",
 						"enablePullDownRefresh": true
 					}
 				},
@@ -507,7 +507,7 @@
 		{
 			"root": "admin/clear",
 			"pages": [
-				{"path": "list","style": {"navigationBarTitleText": "结帐"}},
+				{"path": "list","style": {"navigationBarTitleText": "结帐記錄"}},
 				{"path": "info","style": {"navigationBarTitleText": "详情"}},
 				{"path": "customList","style": {"navigationBarTitleText": "历史帐单"}},
 				{"path": "customInfo","style": {"navigationBarTitleText": "详情"}}
@@ -541,6 +541,12 @@
 			"pages": [
 				{"path": "itemOrder","style": {"navigationBarTitleText": "订单列表"}}
 			]
+		},
+		{
+			"root": "admin/cg",
+			"pages": [
+				{"path": "set","style": {"navigationBarTitleText": "采购设置"}}
+			]
 		}
 	],
 	"globalStyle": {

+ 6 - 0
ghsApp/src/pagesPurchase/order.vue

@@ -9,6 +9,7 @@
 			</block>
 		</view>
 		<view class="app-footer open_btn">
+			<text class="cg-set" @click="pageTo({url: '/admin/cg/set'})">采购设置</text>
 			<view @click="addEvent" class="admin-button-com middle blue">新增采购</view>
 		</view>
 	</view>
@@ -235,5 +236,10 @@ export default {
 			}
 		}
 	}
+	.cg-set{
+		margin-right:60rpx;
+		color:#3385ff;
+		font-size:28rpx;
+	}
 }
 </style>

+ 49 - 32
ghsApp/src/pagesPurchase/supplier.vue

@@ -14,24 +14,20 @@
             :key="index"
             @click="gotoDetails(item)"
           >
-            <image :src="item.avatar"></image>
             <view class="store_name">
+              <image :src="item.avatar"></image>
               <view class="store_title">{{item.name}}</view>
               <view class="accumulative"></view>
             </view>
+            <view class="cg-button">采购</view>
             <view class="store_btn">
-              <view class="btn_entrance">
-                采购
-              </view>
-              <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 class="btn_entrance" @click.stop="gotoDetailsEvent(item)" >
+                欠款订单
               </view>
               <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list',query: {ghsId: item.id}})">
-                结账
+                结账记录
               </view>
+              <view class="btn_entrance" @click.stop="pageTo({url:'/pagesPurchase/order'})">采购记录</view>
             </view>
           </view>
         </block>
@@ -45,7 +41,8 @@
     </scroll-view>
     <!-- 按钮 -->
 			<div class="app-footer">
-				<div class="admin-button-com middle blue" @click="add">添加供应商</div>
+        <text class="cg-set" @click="pageTo({url: '/admin/cg/set'})">采购设置</text>
+				<div class="admin-button-com middle blue add-ghs" @click="add">新增供应商</div>
 			</div>
   </view>
 </template>
@@ -140,32 +137,43 @@ export default {
     }
   }
   .order_list {
-    // height: 200upx;
     height: 100%;
     background: #f0f2f6;
     padding: 0 0 20upx;
     .list_item {
       margin: 20upx 0 0;
-      // padding-left: 20upx;
       position: relative;
-      height: 180upx;
+      height: 200upx;
       width: 100vw;
       background: #fff;
       display: flex;
       align-items: center;
-      & > image {
-        margin-left: 30upx;
-        width: 120upx;
-        height: 120upx;
-        border-radius: 60upx;
+      .cg-button{
+          display: inline-block;
+          font-size: 28upx;
+          color: white;
+          border: 1px solid #3385FF;
+          border-radius: 80px;
+          padding: 12upx 32upx;
+          position: absolute;
+          top:70rpx;
+          right:60rpx;
+          background: #3385FF;
       }
       & > .store_name {
         margin-left: 30upx;
-        width: 280rpx;
+        width: 700rpx;
         display: block;
+        image{
+          width:48upx;
+          height:48upx;
+          border-radius:60upx;
+          float:left;
+        }
         & > .store_title {
           margin-bottom: 58upx;
-          width: 500rpx;
+          margin-left:10rpx;
+          width: 400rpx;
           white-space: nowrap;
           text-overflow: ellipsis;
           overflow: hidden;
@@ -173,6 +181,7 @@ export default {
           font-size: 35upx;
           font-weight: 700;
           color: #333;
+          display:inline-block;
         }
         & > .accumulative {
           font-size: 26upx;
@@ -181,20 +190,15 @@ export default {
       }
       & > .store_btn {
         position: absolute;
-        top:100upx;
-        left: 135upx;
+        top:120upx;
+        left: 0upx;
         & > .btn_entrance {
           display: inline-block;
-          font-size: 28upx;
-          color: #3385ff;
-          border: 1px solid #3385ff;
-          border-radius: 10px;
-          padding: 10upx 35upx;
-          margin-left: 45upx;
-        }
-        & > .btn_forbid {
-          border: 1px solid #999;
+          font-size: 25upx;
           color: #999;
+          padding: 10upx 20upx;
+          margin-left: 20upx;
+          text-decoration:underline;
         }
       }
     }
@@ -204,4 +208,17 @@ export default {
     background-color: #f0f2f6;
   }
 }
+.app-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+  .cg-set{
+    margin-right:60rpx;
+    color:#3385ff;
+    font-size:28rpx;
+  }
+  .add-ghs{
+    margin-right:20rpx;
+  }
+}
 </style>

+ 2 - 2
hdApp/src/pages.json

@@ -791,7 +791,7 @@
 				{
 					"path": "gathering",
 					"style": {
-						"navigationBarTitleText": "欠款明细",
+						"navigationBarTitleText": "欠款订单",
 						"enablePullDownRefresh": true
 					}
 				},
@@ -983,7 +983,7 @@
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "帐单"
+						"navigationBarTitleText": "结帐记录"
 					}
 				},
 				{

+ 35 - 30
hdApp/src/pagesPurchase/order.vue

@@ -15,23 +15,21 @@
             :key="index"
             @click="enter(item)"
           >
-            <image :src="item.avatar"></image>
             <view class="store_name">
+              <image :src="item.avatar"></image>
               <view class="store_title">{{item.name}}</view>
               <view class="accumulative"></view>
             </view>
+            <view class="cg-button">采购</view>
             <view class="store_btn">
-              <view class="btn_entrance" @click.stop="enter(item)" >
-                采购
-              </view>
-              <view class="btn_entrance" v-if="Number(item.debtAmount) > 0" @click.stop="settleAccounts(item)" >
-                结账
+              <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list',query: {ghsId: item.id}})">
+                结账记录
               </view>
-              <view class="btn_entrance btn_forbid" v-else @click.stop="" >
-                结账
+              <view class="btn_entrance" @click.stop="settleAccounts(item)" >
+                欠款订单
               </view>
-              <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list',query: {ghsId: item.id}})">
-                账单
+              <view class="btn_entrance" @click.stop="pageTo({url:'/pagesPurchase/shopping'})" >
+                采购记录
               </view>
             </view>
           </view>
@@ -146,32 +144,43 @@ export default {
     }
   }
   .order_list {
-    // height: 200upx;
     height: 100%;
     background: #f0f2f6;
     padding: 0 0 20upx;
     .list_item {
       margin: 20upx 0 0;
-      // padding-left: 20upx;
       position: relative;
       height: 180upx;
       width: 100vw;
       background: #fff;
       display: flex;
       align-items: center;
-      & > image {
-        margin-left: 30upx;
-        width: 120upx;
-        height: 120upx;
-        border-radius: 60upx;
+      .cg-button{
+          display: inline-block;
+          font-size: 28upx;
+          color: white;
+          border: 1px solid #3385FF;
+          border-radius: 80px;
+          padding: 12upx 32upx;
+          position: absolute;
+          top:60rpx;
+          right:70rpx;
+          background: #3385FF;
       }
       & > .store_name {
         margin-left: 30upx;
-        width: 280rpx;
+        width: 700rpx;
         display: block;
+        image{
+          width:48upx;
+          height:48upx;
+          border-radius:60upx;
+          float:left;
+        }
         & > .store_title {
           margin-bottom: 58upx;
-          width: 500rpx;
+          margin-left:10rpx;
+          width: 400rpx;
           white-space: nowrap;
           text-overflow: ellipsis;
           overflow: hidden;
@@ -179,6 +188,7 @@ export default {
           font-size: 35upx;
           font-weight: 700;
           color: #333;
+          display:inline-block;
         }
         & > .accumulative {
           font-size: 26upx;
@@ -187,20 +197,15 @@ export default {
       }
       & > .store_btn {
         position: absolute;
-        top:100upx;
-        left: 135upx;
+        top:120upx;
+        left: 0upx;
         & > .btn_entrance {
           display: inline-block;
-          font-size: 28upx;
-          color: #3385ff;
-          border: 1px solid #3385ff;
-          border-radius: 10px;
-          padding: 10upx 35upx;
-          margin-left: 45upx;
-        }
-        & > .btn_forbid {
-          border: 1px solid #999;
+          font-size: 25upx;
           color: #999;
+          padding: 10upx 20upx;
+          margin-left: 20upx;
+          text-decoration:underline;
         }
       }
     }