shish 1 год назад
Родитель
Сommit
f92c8df73e

+ 25 - 115
hdApp/src/admin/ll/add.vue

@@ -5,27 +5,32 @@
 
         <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" />
+          <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" />
+          <view class="tui-title">手机号</view>
+          <input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" 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" />
+          <view class="tui-title">微信号</view>
+          <input v-model="form.wx" placeholder-class="phcolor" class="tui-input" name="wx" 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" />
+          <view class="tui-title">身份证号</view>
+          <input v-model="form.no" placeholder-class="phcolor" class="tui-input" name="no" 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" />
+          <view class="tui-title required">欠款日期</view>
+          <input v-model="form.date" placeholder-class="phcolor" class="tui-input" name="date" 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.amount" placeholder-class="phcolor" class="tui-input" name="amount" placeholder="对方欠款金额" maxlength="50" type="digit" />
         </tui-list-cell>
 
       </view>
@@ -62,38 +67,23 @@ 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],
+	mixins: [],
   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
+        wx:"",
+        mobile:"",
+        amount: "",
+        date:"",
+        no:""
       },
-      categoryData:[],
       currentImgData:[]
     };
   },
@@ -101,15 +91,7 @@ export default {
     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})
     },
@@ -125,102 +107,30 @@ export default {
       }
     },
     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:'确认添加?'},() => {
+
+      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 => {
+        addGoodsData({...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);
-      }
+      this.confirmFn()
     }
   }
 };

+ 10 - 30
hdApp/src/admin/ll/components/item.vue → hdApp/src/admin/ll/components/user.vue

@@ -1,30 +1,26 @@
 <template>
-    <view  @click="pageTo({url:'/admin/work/detail',query: {id: item.id}})">
+    <view  @click="pageTo({url:'/admin/ll/detail?id='+item.id})">
         <view class="order-top_box" style="position:relative;">
           <image style="width:130upx;position:absolute;top:110upx;right:25upx;border-radius:10upx;" mode="widthFix" :src="item.cover"></image>
-          <view class="tit">{{ item.sn||'' }}</view>
+          <view class="tit">{{ item.name }}</view>
           <view style="color:#666666;">待完成</view>
         </view>
         <view class="order-list_info">
             <view class="order-info_box">
-                <view>单号:</view>
-                <view>{{ item.orderSn }}</view>
+                <view>手机号码:</view>
+                <view>{{ item.mobile }}</view>
             </view>
             <view class="order-info_box">
-                <view>日期:</view>
-                <view>{{ item.addTime?item.addTime.substr(5,11):'' }}</view>
+                <view>微信号码:</view>
+                <view>{{ item.wx }}</view>
             </view>
             <view class="order-info_box">
-                <view>来源:</view>
-                <view>门店</view>
+                <view>失信次数:</view>
+                <view>{{ item.breakNum }}</view>
             </view>
             <view class="order-info_box">
-                <view>数量:</view>
-                <view>{{ item.num }}</view>
-            </view>
-            <view class="order-info_box">
-                <view>备注:</view>
-                <view style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:420upx;">{{ item.remark||'' }}</view>
+                <view>失信金额:</view>
+                <view>{{ item.breakAmount }}</view>
             </view>
         </view>
         <view class="list-bottom">
@@ -55,17 +51,6 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.admin-button-com {
-  width: 140upx;
-  height: 60upx;
-  padding: 0;
-  line-height: 60upx;
-  text-align: center;
-  font-size: 26upx;
-  &.active {
-    border: 1upx solid #ccc;
-  }
-}
 .list-top,
 .list-bottom {
     padding: 15upx 30upx;
@@ -79,11 +64,6 @@ export default {
     & > view {
         @include disFlex(center, flex-end);
     }
-    .list-button {
-        .admin-button-com {
-            margin-left: 20upx;
-        }
-    }
 }
 .order-top_box {
   display: flex;

+ 373 - 0
hdApp/src/admin/ll/detail.vue

@@ -0,0 +1,373 @@
+<template>
+	<view class="app-content">
+		<view class="info-content_box">
+			<view class="title">
+				制单信息
+			</view>
+			<view class="bills-info_box content-box">
+				<view class="order-info_box">
+					<view>制单日期:</view>
+					<view>{{ detailInfo.addTime.substr(5,11) }}</view>
+				</view>
+				<view class="order-info_box">
+					<view>制单编号:</view>
+					<view>{{ detailInfo.orderSn }}</view>
+					<view class="price">
+						<button @click="copy(detailInfo.orderSn)" class="admin-button-com default">复制</button>
+					</view>
+				</view>
+				<view class="order-info_box" v-if="detailInfo.status==1">
+					<view>制作人员:</view>
+					<view>{{detailInfo.finishStaffName}}</view>
+				</view>
+				<view class="order-info_box">
+					<view>制单状态:</view>
+					<view>{{ detailInfo.status==0?'待完成':detailInfo.status==1?'已完成':detailInfo.status==2?'已取消':'待完成' }}</view>
+				</view>
+				<view class="order-info_box" v-if="Number(detailInfo.orderPrice)>0">
+					<view>订单金额:</view>
+					<view>{{ detailInfo.orderPrice ? parseFloat(detailInfo.orderPrice) : 0 }}</view>
+				</view>
+			</view>
+			<view class="flex-space title" v-if="!$util.isEmpty(goodsInfo)"> 作品 </view>
+			<view class="module-com content-box" v-if="!$util.isEmpty(goodsInfo)">
+				<view class="commodity-view">
+					<view class="commodity-list">
+						<view class="commodity-item" >
+							<image class="item-icon" :src="goodsInfo.cover" @click="pageTo({url:'/admin/goods/detail',query:{id: goodsInfo.id}})" ></image>
+							<view class="item-info">
+								<view class="info-line">
+									<text class="item-name">{{ goodsInfo.name }}</text>
+									<text class="item-price">
+										<text class="unit"></text>
+										<text class="price">
+											<text>{{ detailInfo.num }}份</text>
+										</text>
+									</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="flex-space title"> 使用花材 </view>
+			<view class="module-com content-box">
+				<view class="commodity-view">
+					<view class="commodity-list">
+						<view v-for="(s, idx) in workItem" :key="idx" class="commodity-item" >
+							<image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.itemId}})" ></image>
+							<view class="item-info">
+								<view class="info-line">
+									<text class="item-name">{{ s.name }}</text>
+									<text class="item-price">
+										<text class="unit"></text>
+										<text class="price">
+											<text>{{s.num}}{{s.unitName}}</text>
+											<text></text>
+										</text>
+									</text>
+								</view>
+								<view class="info-line">
+									<text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="summary-bar">
+						<view class="operate-view" ></view>
+						<view class="describe-view">
+							<text>
+								<text> </text>
+							</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="detailInfo.remark!=''" class="content-box price-detail">
+				<div class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">备注</div>
+						<div>{{ detailInfo.remark }}</div>
+					</tui-list-cell>
+				</div>
+			</view>
+		</view>
+		<div class="app-footer">
+			<button class="admin-button-com bule" v-if="detailInfo.status == 1" @click="printWork(detailInfo)">打印</button>
+			<button class="admin-button-com default" v-else>打印</button>
+			<button class="admin-button-com bule" v-if="detailInfo.status == 0" @click="cancelFn(detailInfo)">取消</button>
+			<button class="admin-button-com default" v-else>取消</button>
+		</div>
+	</view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import TuiListCell from "@/components/plugin/list-cell";
+import { fullInfo,cancelWork,print } from "@/api/work/index";
+export default {
+	name: "detail",
+	components: { TuiListCell },
+	mixins: [],
+	data() {
+		return {
+			detailInfo: {addTime:''},
+			workItem:[],
+			goodsInfo:[]
+		};
+	},
+	onPullDownRefresh() {
+		this.init().then(res => {
+			uni.stopPullDownRefresh()
+		})
+	},
+	onShow() {
+
+	},
+	computed: {
+		...mapGetters({ loginInfo: "getLoginInfo" }),
+	},
+	methods: {
+		printWork(item){
+			print({id:item.id}).then(res=>{
+				if(res.code == 1){
+					this.$msg(res.msg)
+				}
+			})
+		},
+		cancelFn(item){
+			let that = this
+			that.$util.confirmModal({content:'确认取消?'},() => {
+				cancelWork({id:item.id}).then(res=>{
+					if(res.code == 1){
+						item.status = 2
+						that.$msg('取消成功')
+					}
+				})
+			})
+		},
+		copy(val) {
+			const self = this;
+			uni.setClipboardData({
+				data: val,
+				success: function() {
+					self.$msg("复制成功");
+				}
+			});
+		},
+		async init() {
+			const res = await fullInfo({ id: this.option.id })
+			this.detailInfo = res.data.info;
+			this.workItem = res.data.item
+			this.goodsInfo = res.data.goods
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.info-content_box {
+	padding: 0 20upx 100upx;
+	& > .title {
+		color: #666666;
+		font-size: 28upx;
+		font-weight: 600;
+		padding: 30upx 3upx;
+	}
+	& .address-des_bx {
+		display: flex;
+		padding: 20upx 10upx 30upx 20upx;
+		& > view:nth-child(1) {
+			flex: 1;
+			margin-top: 10upx;
+			& > view:nth-child(1) {
+				color: #333333;
+				font-size: 32upx;
+				font-weight: bold;
+			}
+			& > view:nth-child(2) {
+				color: #666666;
+				font-size: 28upx;
+				font-weight: 400;
+				margin-top: 20upx;
+			}
+		}
+		& > view:nth-child(2) {
+			display: flex;
+			& .icondianhua1 {
+				font-size: 50upx;
+				color: #3385ff;
+				margin-left: 0upx;
+			}
+		}
+	}
+	.bills-info_box {
+		padding: 30upx 20upx 30upx;
+		& > .order-info_box {
+			display: flex;
+			align-items: center;
+			font-size: 26upx;
+			font-weight: 400;
+			margin-bottom: 5upx;
+			& > view:nth-child(1) {
+				color: #999999;
+				width: 135upx;
+				text-align: right;
+			}
+			& > view:nth-child(2) {
+				color: #333333;
+			}
+			& > .price {
+				flex: 1;
+				font-size: 30upx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				& .iconxiangyou {
+					color: #999999;
+					font-size: 25upx;
+					margin-left: 12upx;
+				}
+			}
+		}
+	}
+	.content-box {
+		background-color: #ffffff;
+		border-radius: 10upx;
+	}
+	.commodity-view {
+		display: flex;
+		flex-direction: column;
+		.commodity-list {
+			padding: 20upx;
+			.commodity-item {
+				display: flex;
+				margin-bottom: 20upx;
+				.item-icon {
+					flex-shrink: 0;
+					width: 140upx;
+					height: 140upx;
+				}
+				.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 {
+							color: #333;
+							font-size: 22upx;
+							.price {
+								font-size: 25upx;
+							}
+						}
+						.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: 1upx 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: 28upx;
+				}
+			}
+		}
+	}
+	.shipping-address {
+		display: flex;
+		align-items: center;
+		margin-top: 20upx;
+		& > view:nth-child(1) {
+			color: #999999;
+			font-size: 28upx;
+			font-weight: 400;
+			display: inline-block;
+			padding: 30upx 0 30upx 20upx;
+			flex: 1;
+			& > text {
+				color: #333333;
+				font-weight: 600;
+			}
+		}
+		& > view:nth-child(2) {
+			font-size: 60upx;
+			color: #d6e7ff;
+			margin-right: 10upx;
+		}
+	}
+	.price-detail {
+		margin-top: 20upx;
+		margin-bottom: 20upx;
+	}
+	.detail-price_box {
+		color: #333333;
+		font-size: 22upx;
+		text-align: right;
+		flex: 1;
+		font-weight: 600;
+		&.red {
+			color: #ff2842;
+		}
+	}
+}
+.app-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	& .admin-button-com {
+		padding: 0;
+		margin-right:30upx;
+		width: 180upx;
+		height: 80upx;
+		line-height: 80upx;
+		font-size:30upx;
+		text-align: center;
+	}
+}
+</style>

+ 8 - 7
hdApp/src/admin/ll/list.vue

@@ -4,8 +4,9 @@
       <view style="background-color: white;">
         <view style="width:100%;">
           <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" style="margin-left:10upx;" @click="">微信号</button>
+          <button class="admin-button-com big" style="margin-left:10upx;" @click="">身份证</button>
+          <button class="admin-button-com big" style="margin-left:10upx;" @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;">
@@ -17,7 +18,7 @@
       <div class="list-wrap">
         <block v-if="!$util.isEmpty(list.data)">
           <div class="list" v-for="(item, index) in list.data" :key="index">
-            <llItem :item="item"></llItem>
+            <llUser :item="item"></llUser>
           </div>
         </block>
         <block v-else>
@@ -32,10 +33,10 @@
   import ModalModule from "@/components/plugin/modal";
   import { list } from "@/mixins";
   import { mapGetters } from "vuex";
-  import { getWorkList} from "@/api/work";
+  import { getUserList} from "@/api/ll";
   import AppSearchModule from "@/components/module/app-search";
   import DropShopSelect from "@/components/module/shopSelect";
-  import llItem from "./components/item";
+  import llUser from "./components/user";
   import DateSelect from "@/components/module/dateSelect";
   export default {
     name: "list",
@@ -44,7 +45,7 @@
       ModalModule,
       AppSearchModule,
       DropShopSelect,
-      llItem,
+      llUser,
       DateSelect,
       NotLogin
     },
@@ -84,7 +85,7 @@
       init(){
       },
       getList() {
-        return getWorkList({}).then((res) => {
+        return getUserList({}).then((res) => {
           this.completes(res);
           if (this.$util.isEmpty(res.data)){
             return false

+ 5 - 0
hdApp/src/api/ll/index.js

@@ -0,0 +1,5 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+export const getUserList = data => {
+	return https.post('/ll-user/list', data)
+}

+ 2 - 1
hdApp/src/pages.json

@@ -28,7 +28,8 @@
 			"root": "admin/ll",
 			"pages": [
 				{"path": "list","style": {"navigationBarTitleText": "花卉行业"}},
-				{"path": "add","style": {"navigationBarTitleText": "新增"}}
+				{"path": "add","style": {"navigationBarTitleText": "新增"}},
+				{"path": "detail","style": {"navigationBarTitleText": "明细"}}
 			]
 		},
 		{