shish hai 1 ano
pai
achega
a3e41e6864

+ 2 - 1
hdApp/src/admin/home/apply.vue

@@ -79,7 +79,8 @@ export default {
             { name: "损耗", img: `${this.$constant.imgUrl}/ghs/home/kcyjs2.png`, url: "/admin/breakage/list",pf:1},
             { name: "拆散", img: `${this.$constant.imgUrl}/ghs/home/kcyjs2.png`, url: "/admin/part/list",pf:1},
             { name: "商城", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/admin/cg/mall",pf:1},
-            { name: "开关商城", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/pagesPurchase/open",pf:1}
+            { name: "开关商城", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/pagesPurchase/open",pf:1},
+            { name: "失信人员", img: `${this.$constant.imgUrl}/ghs/home/shop2.png`, url: "/admin/ll/list",pf:1},
           ]
         },
         {

+ 2 - 2
hdApp/src/admin/home/workbench.vue

@@ -307,10 +307,10 @@ export default {
         { name: "任务", img: `ghs/home/kcyjs2.png`, url: "/admin/work/list",pf:1 },
         { name: "买花", img: `ghs/home/icon_ghs2.png`, url: "/pagesPurchase/order",pf:1 },
         { name: "买花记录", img: `ghs/home/shop2.png`, url: "/pagesPurchase/shopping",pf:1 },
-        { name: "采购结账", img: `ghs/home/kcyjs2.png`, url: "/admin/clear/list",pf:1 },
         { name: "花束", img: `ghs/home/hcgl2.png`, url: "/admin/goods/list",pf:1 },
         { name: "绿植", img: `ghs/home/hcgl2.png`, url: "/admin/goods/lz",pf:1 },
-        { name: "绿植采购", img: `ghs/home/icon_caigou2.png`, url: "/admin/goods/plantCg",pf:1}
+        { name: "绿植采购", img: `ghs/home/icon_caigou2.png`, url: "/admin/goods/plantCg",pf:1},
+        { name: "失信人员", img: `ghs/home/kcyjs2.png`, url: "/admin/ll/list",pf:1 },
       ],
       totalData: [
         { name: "客户数", value: 0 },

+ 382 - 0
hdApp/src/admin/ll/add.vue

@@ -0,0 +1,382 @@
+<template>
+  <view class="app-content">
+    <form @submit="commitForm">
+      <view class="module-com input-line-wrap">
+
+        <tui-list-cell class="line-cell" :hover="false">
+          <view class="tui-title required">店名</view>
+          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请填写店名、姓名或公司名" maxlength="50" type="text" />
+        </tui-list-cell>
+
+        <tui-list-cell class="line-cell" :hover="false">
+          <view class="tui-title required">微信号</view>
+          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请填写对方微信号" maxlength="50" type="text" />
+        </tui-list-cell>
+
+        <tui-list-cell class="line-cell" :hover="false">
+          <view class="tui-title required">手机号</view>
+          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请填写对方手机号" maxlength="50" type="text" />
+        </tui-list-cell>
+
+        <tui-list-cell class="line-cell" :hover="false">
+          <view class="tui-title required">账单日期</view>
+          <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请选账单交易日期" maxlength="50" type="text" />
+        </tui-list-cell>
+
+        <tui-list-cell class="line-cell" :hover="false">
+          <view class="tui-title required">账单金额</view>
+          <input v-model="form.price" placeholder-class="phcolor" class="tui-input" name="price" placeholder="请填写对方赖账金额" maxlength="50" type="digit" />
+        </tui-list-cell>
+
+      </view>
+
+      <view class="module-com input-line-wrap goods-wrap">
+        <view class="module-tit">
+          <span>图片证据</span>
+          <span class="app-color-3">(微信聊天截图、销售单拍照等,最多5张)</span>
+        </view>
+        <view class="module-det">
+          <htz-image-upload :max="5" :compress="true" v-model="currentImgData" :headers="headers"
+           @uploadSuccess="imgUploadSuccess" @imgDelete="imgDeleteFn" :action="getLoginInfo.imgUploadApi">
+          </htz-image-upload>
+        </view>
+      </view>
+
+      <view class="module-com input-line-wrap summary-wrap">
+        <view class="module-tit">其他说明</view>
+        <view class="module-det" style="padding-bottom: 20upx">
+          <textarea v-model="form.briefContent" class="goods-summary" placeholder-class="phcolor" placeholder="补充说明" />
+        </view>
+      </view>
+
+      <view class="app-footer">
+        <button class="admin-button-com middle default" @click="goBack">取消</button>
+        <button class="admin-button-com middle blue" formType="submit">保存</button>
+      </view>
+
+    </form>
+  </view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import TuiListCell from "@/components/plugin/list-cell";
+import AppUploader from "@/components/app-uploader";
+const form = require("@/utils/formValidation.js");
+import { getClass } from "@/api/category";
+import { addGoodsData } from "@/api/goods"
+import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
+import productMins from "@/mixins/product";
+import {currentShop} from "@/api/shop"
+export default {
+  name: "add",
+  components: { TuiListCell, AppUploader,htzImageUpload },
+	mixins: [productMins],
+  data() {
+    return {
+      headers:{token:''},
+      status: 1,
+			selectJobType: "addGoodsSelectItem",
+      form: {
+        name: "",
+        price: "",
+        catIds: [],
+        autoRise: "1",
+        needSend: "0",
+        freightType: "0",
+        shopImg: [],
+        briefContent: "",
+        status:1,
+        cover:'',
+        setItemNum:0,
+        kindId:0,
+        kindName:'',
+        inTurn:0,
+        stock:0
+      },
+      categoryData:[],
+      currentImgData:[]
+    };
+  },
+  onLoad() {
+    const token = uni.getStorageSync('token')
+    this.headers.token = token
+  },
+  watch:{
+  },
+  methods: {
+    changeKind(){
+      this.pageTo({url:'/admin/goods/selectKind?style=2&flower=1'})
+    },
+    selectItem(){
+      this.pageTo({url:'/admin/goods/selectItem'})
+    },
+    goBack(){
+      uni.navigateBack({delta:1})
+    },
+    imgDeleteFn(res){
+      const index = res.index
+      this.form.shopImg.splice(index,1)
+    },
+    imgUploadSuccess(res) {
+      var _res = JSON.parse(res.data)
+      if(_res.code == 1){
+        this.currentImgData.push(_res.data.smallUrl)
+        this.form.shopImg.push(_res.data.shortUrl)
+      }
+    },
+    init() {
+      getClass({flower:1}).then(res => {
+        if(res.code && res.code == 1){
+          this.categoryData = res.data
+        }
+      })
+    },
+    confirmFn() {
+      let that = this
+      if (this.$util.isEmpty(this.form.catIds)) {
+        this.$msg("请选择分类");
+        return false;
+      }
+      if (this.$util.isEmpty(this.form.shopImg)) {
+        this.$msg("请上传图片");
+        return false;
+      }
+
+      if(!this.form.kindId || Number(this.form.kindId) == 0){
+        this.$msg('请选择品种')
+        return false
+      }
+      if (this.$util.isEmpty(this.form.kindName)) {
+        this.$msg("请选择品种哦")
+        return false
+      }
+
+      this.form.cover = this.form.shopImg[0]
+      const product = this.selectList.map(ele => {
+        let unitName = ele.bigUnit
+        let unitType = 0
+        let num = ele.bigCount
+        let count = ele.bigCount
+        if(Number(ele.smallCount)>0){
+          unitType = 1
+          unitName = ele.smallUnit
+          num=Number(ele.smallCount)
+          count = (ele.smallCount/ele.ratio).toFixed(2)
+        }
+	      return { id: ele.id, unitType:unitType,ptItemId:ele.itemId,bigName:ele.bigUnit,smallName:ele.smallUnit,unitName:unitName,cover:ele.shortCover,
+        name:ele.name,ratio:ele.ratio,num:num,count:count}
+      })
+      that.$util.confirmModal({content:'确认添加?'},() => {
+        uni.showLoading({mask:true})
+        let form = JSON.parse(JSON.stringify(this.form));
+        addGoodsData({ status: this.status, ...form,itemList:JSON.stringify(product) }).then(res => {
+          uni.hideLoading()
+          this.$msg("添加成功")
+          this.removeFromSaveDirect()
+          setTimeout(function(){
+            uni.navigateBack({})
+          },1500)
+        })
+      })
+    },
+    selCategoryFn(item) {
+      let index = this.form.catIds.findIndex(e => e == item.id);
+      if (index == -1) {
+        this.form.catIds.push(item.id);
+      } else {
+        this.form.catIds.splice(index, 1);
+      }
+    },
+    autoRiseChange(e) {
+      this.form.autoRise = e == "0" ? "1" : "0";
+    },
+    needSendChange(e) {
+      this.form.needSend = e == "0" ? "1" : "0";
+    },
+    freightChange(e) {
+      this.form.freightType = e.detail.value;
+    },
+    setItemNumChange(e){
+      this.form.setItemNum = e.detail.value;
+    },
+    commitForm(e) {
+      let rules = [
+        {
+          name: "name",
+          rule: ["required"],
+          msg: ["请输入名称"]
+        },
+        {
+          name: "price",
+          rule: ["required"],
+          msg: ["请输入价格"]
+        }
+      ];
+      let formData = e.detail.value;
+      let checkRes = form.validation(formData, rules);
+      if (!checkRes) {
+        setTimeout(() => {
+          this.confirmFn();
+        });
+      } else {
+        this.$msg(checkRes);
+      }
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 100upx);
+  padding-bottom: 100upx;
+}
+.module-com {
+  margin-bottom: 20upx;
+  background-color: #fff;
+  color: $fontColor2;
+  .module-tit {
+    padding: 20upx 30upx;
+    font-size: 28upx;
+  }
+  .module-det {
+    padding: 0 30upx;
+  }
+}
+.category-wrap {
+  align-items: flex-start;
+  padding-bottom: 0 !important;
+  .tui-input {
+    @include disFlex(center, flex-start);
+    flex-wrap: wrap;
+    .admin-button-com {
+      margin-right: 20upx;
+      margin-bottom: 20upx;
+      position: relative;
+      z-index: 9999;
+    }
+  }
+}
+.summary-wrap {
+  .goods-summary {
+    height: 200upx;
+  }
+}
+.app-footer {
+  justify-content: space-evenly;
+  z-index: 9999;
+  .admin-button-com {
+    width: 46%;
+    padding-top:30upx;
+    padding-bottom:30upx;
+  }
+}
+.commodity-view {
+  display: flex;
+  flex-direction: column;
+  .commodity-list {
+    padding: 25upx;
+    .commodity-item {
+      display: flex;
+      margin-bottom: 20upx;
+      .item-icon {
+        flex-shrink: 0;
+        width: 120upx;
+        height: 120upx;
+      }
+      .item-info {
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        flex: 1;
+        margin-left: 20upx;
+        .info-line {
+          margin-bottom: 20upx;
+          display: flex;
+          justify-content: space-between;
+          align-items: flex-end;
+          .item-name {
+            color: black;
+            font-size: 30upx;
+            font-weight: 700;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            width:360upx;
+          }
+          .item-price {
+            padding-right:30upx;
+            color: #333;
+            .price {
+              font-size: 28upx;
+            }
+          }
+          .item-type {
+            color: #999;
+            font-size: 24upx;
+          }
+          .item-count {
+            color: #666;
+            font-size: 24upx;
+          }
+        }
+      }
+    }
+  }
+  .summary-bar {
+    padding: 0 20upx;
+    height: 90upx;
+    display: flex;
+
+    align-items: center;
+    justify-content: space-between;
+    border-top: 1px solid #eeeeee;
+    .operate-view {
+      display: flex;
+
+      align-items: center;
+      color: #3385ff;
+      font-size: 26upx;
+      .iconfont {
+        margin-right: 20upx;
+        font-size: 40upx;
+      }
+    }
+    .describe-view {
+      display: flex;
+
+      align-items: center;
+      color: #333;
+      font-size: 24upx;
+      .price {
+        font-weight: bold;
+        font-size: 30upx;
+      }
+    }
+  }
+}
+.infoAEdit {
+  display: flex;
+  justify-content: space-between;
+  height: 60upx;
+  line-height: 80upx;
+  font-size: 28;
+  font-weight: 700;
+  color: #666;
+  padding: 0 20upx;
+  .iconfont {
+    margin-right: 15upx;
+    font-size: 30upx;
+  }
+  & > .editFlr {
+    position: relative;
+    color: #1890f3;
+    font-size: 26upx;
+    &:after {
+      content: "";
+      position: absolute;
+      left: 0;
+      top: 0;
+    }
+  }
+}
+</style>

+ 6 - 3
hdApp/src/admin/ll/list.vue

@@ -6,11 +6,11 @@
           <button class="admin-button-com big blue" style="margin-left:2%;" @click="">手机号</button>
           <button class="admin-button-com big" style="margin-left:20upx;" @click="">微信号</button>
           <button class="admin-button-com big" style="margin-left:20upx;" @click="">名 称</button>
-          <button class="admin-button-com big red" style="margin-right:2%;float: right;border: 1upx solid #3385FF;color:white;background-color:#3385FF;" @click="">新 增</button>
+          <button class="admin-button-com big red" style="margin-right:2%;float: right;border: 1upx solid #3385FF;color:white;background-color:#3385FF;" @click="add()">新 增</button>
         </view>
         <view style="width:100%;text-align: center;padding-bottom:30upx;margin-top:10upx;">
-          <input v-model="search" name="search" ref="searchRef" type="text"
-          style="border:1upx solid #CCCCCC;width:96%;border-radius: 10upx;height:90upx;margin:0 auto;text-align: left;padding-left:8upx;font-size:30upx;" />
+          <input v-model="search" name="search" ref="searchRef" type="text" placeholder="这里搜索" 
+          style="border:1upx solid #CCCCCC;width:96%;border-radius: 10upx;height:90upx;margin:0 auto;text-align: left;padding-left:15upx;font-size:32upx;" />
           <view style="width:100%;font-size:30upx;color:black;margin:15upx 0 5upx 2%;text-align: left;">失信人员 50人</view>
         </view>
       </view>
@@ -78,6 +78,9 @@
       this.getList()
     },
     methods: {
+      add(){
+        this.$util.pageTo({url:"/admin/ll/add"})
+      },
       init(){
       },
       getList() {

+ 2 - 1
hdApp/src/pages.json

@@ -27,7 +27,8 @@
 		{
 			"root": "admin/ll",
 			"pages": [
-				{"path": "list","style": {"navigationBarTitleText": "失信人员"}}
+				{"path": "list","style": {"navigationBarTitleText": "花卉行业"}},
+				{"path": "add","style": {"navigationBarTitleText": "新增"}}
 			]
 		},
 		{