keqiaoling 3 veckor sedan
förälder
incheckning
403b79ea31
6 ändrade filer med 168 tillägg och 16 borttagningar
  1. 22 0
      api/trade/shoe-style.js
  2. 1 0
      config.js
  3. 9 0
      pages.json
  4. 1 1
      pages/mine/info/edit.vue
  5. 10 15
      pages/trade/shoe-style/ShoeStyleView.vue
  6. 125 0
      pages/trade/shoe-style/outRep.vue

+ 22 - 0
api/trade/shoe-style.js

@@ -49,6 +49,28 @@ export function queryByIds(ids) {
 	})
 };
 
+/* 表单参数 */
+export const QUOTATION_FROM = {
+	remark: null, // 备注
+	fob: null, // 价格
+	createBy: null, // 创建人
+	createTime: null // 创建时间
+}
+
+/**
+ * 添加
+ * @permi trade:quotation:add
+ * @param {QUOTATION_FROM} data 数据
+ * @returns {Object} {data}
+ */
+
+export function addOutRep(data) {
+	return request({
+		url: '/trade/style/inout/add',
+		method: 'post',
+		data: data
+	})
+};
 
 /**
  * jsd

+ 1 - 0
config.js

@@ -9,6 +9,7 @@ module.exports = {
 	},
  // 单点登录
 	VITE_SSO_LOGIN:true,
+	// VITE_SSO_LOGIN:false,
 	// baseUrl: 'http://localhost:8083',
 	// if (window.location.host.indexOf('localhost') > -1) {
 		// baseUrl: 'http://localhost:8083',

+ 9 - 0
pages.json

@@ -91,6 +91,15 @@
 				"softinputMode": "adjustResize"
 			}
 		}
+	},{
+		"path": "pages/trade/shoe-style/outRep",
+		"style": {
+			"navigationBarTitleText": "样鞋借出",
+			"enablePullDownRefresh": false,
+			"app-plus": {
+				"softinputMode": "adjustResize"
+			}
+		}
 	}, {
 		"path": "pages/trade/shoe-style/index",
 		"style": {

+ 1 - 1
pages/mine/info/edit.vue

@@ -68,7 +68,7 @@
         }
       }
     },
-    onLoad() {
+    onLoad( ) {
       this.getUser()
     },
     onReady() {

+ 10 - 15
pages/trade/shoe-style/ShoeStyleView.vue

@@ -21,48 +21,43 @@
 					</template>
 				</uni-list-item>
 			</uni-list> -->
-			<uni-grid :column="2" :highlight="true" :showBorder="false" :square="false" style="height: auto;">
+		<uni-grid :column="2" :highlight="true" :showBorder="false" :square="false" style="height: auto;">
 				<uni-grid-item v-for="(item, index) in pics" :index="index" :key="index">
 					<view class="grid-item-box" style="background-color: #fff;">
-						<image class="slot-image img" :src="item" mode="widthFix" @click="ViewImage(index)"></image>
+						<img class="slot-image img" :src="item" mode="widthFix" @click="ViewImage(index)" />
 					</view>
 				</uni-grid-item>
 			</uni-grid>
-
 			<uni-list>
 				<uni-list-item title="款号" :rightText="data.styleNum" />
 				<uni-list-item title="颜色" :rightText="data.version + '-' +data.color" />
+				<uni-list-item title="数量" :rightText="data.qty" />
 				<uni-list-item title="尺码" :rightText="data.size" />
 				<uni-list-item title="码段" :rightText="data.outsoleSegment" />
-				<uni-list-item class="fob" title="FOB价" :rightText="data.fob" />
+				<uni-list-item v-if="checkRole(['SalesManager','SalesMan'])" class="fob" title="FOB价" :rightText="data.fob" />
 				<uni-list-item title="备注" :rightText="data.remark" />
 			</uni-list>
 		</uni-section>
 		<view style="height: 30rpx;"></view>
-
 		<uni-list>
 			<uni-list-item title="面料" :rightText="data.upper" />
 			<uni-list-item title="内里" :rightText="data.insole" />
 			<uni-list-item title="面衬" :rightText="data.lining" />
 			<uni-list-item title="楦头" :rightText="data.lastNumber" />
-
 		</uni-list>
 		<view style="height: 30rpx;"></view>
-
 		<uni-list>
-
 			<uni-list-item title="大底" :rightText="data.outsole" />
 			<uni-list-item title="大底编号" :rightText="data.outsoleNumber" />
 			<uni-list-item title="大底厂家" :rightText="data.outsoleFactory" />
 			<uni-list-item title="日期" :rightText="formatDate(data.createTime)" />
 		</uni-list>
 		<view style="height: 30rpx;"></view>
-
 		<uni-list  v-if="checkRole(['SalesManager'])">
 			<uni-list-item class="outPrice" title="大底价格参考" :rightText="data.outsolePrice" />
 			<uni-list-item class="outPrice" title="材料价格参考" :rightText="data.referPrice" />
 		</uni-list>
-
+<view style="height: 60px;"></view>
 		<!-- 	<uni-section title="鞋底图片" type="line">
 			<uni-grid :column="1" :highlight="true" :showBorder="false" :square="false" style="height: auto;">
 				<uni-grid-item style="padding: 8px;">
@@ -71,9 +66,9 @@
 			</uni-grid>
 		</uni-section> -->
 
-		<!-- 	<view style="margin-top: 10px;text-align: center;">
-			<button class="bottom" size="mini" type="primary" @click="onBackward">返回样品页</button>
-		</view> -->
+			<view v-if="checkRole(['shoeStyleMan'])" style="margin-top: 10px;text-align: center;">
+			<button   style="position: fixed; bottom: 20px; right: 15px; left: 15px;padding: 8px 0;font-size: 14px;z-index: 999;" class="bottom" size="mini" type="primary" @click="onBackward">借出</button>
+		</view>
 	</view>
 </template>
 
@@ -139,8 +134,8 @@
 		},
 		methods: {
 			onBackward() {
-				wx.switchTab({
-					url: './index'
+				wx.navigateTo({
+					url: '/pages/trade/shoe-style/outRep?styleNum='+this.data.styleNum+'&&version='+this.data.version
 				})
 			},
 			ViewImage(idx) {

+ 125 - 0
pages/trade/shoe-style/outRep.vue

@@ -0,0 +1,125 @@
+<template>
+	<view class="container">
+		<view class="example">
+			<uni-forms ref="form" :model="dataForm" labelWidth="80px">
+				<uni-forms-item label="借出数量" name="qty">
+					<uni-data-checkbox v-model="dataForm.qty" :localdata="numData" />
+				</uni-forms-item>
+				<uni-forms-item label="借出人" name="borRetBy">
+					<uni-easyinput v-model="dataForm.borRetBy" placeholder="请输入借出人" />
+				</uni-forms-item>
+				<uni-forms-item label="客人" name="custName">
+					<uni-easyinput v-model="dataForm.custName" placeholder="请输入客人" />
+				</uni-forms-item>
+				<uni-forms-item label="时间" name="borRetTime">
+					<uni-datetime-picker type="date" :clear-icon="false" v-model="dataForm.borRetTime" />
+				</uni-forms-item>
+				<uni-forms-item label="备注" name="remark">
+					<uni-easyinput v-model="dataForm.remark" placeholder="是否会归还" />
+				</uni-forms-item>
+			</uni-forms>
+			<button type="primary" @click="submit">提交</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		addOutRep
+	} from "@/api/trade/shoe-style.js"
+	import {
+		updateUserProfile
+	} from "@/api/system/user"
+
+	export default {
+		data() {
+			return {
+				dataForm: {
+					type: 0,
+					styleNum: '',
+					version: '',
+					qty: 0.5,
+					borRetBy: "",
+					custName: "",
+					borRetTime: new Date(),
+					remark: ""
+				},
+				numData: [{
+					text: '1只',
+					value: 0.5
+				}, {
+					text: '1双',
+					value: 1
+				}],
+				rules: {
+					nickName: {
+						rules: [{
+							required: true,
+							errorMessage: '用户昵称不能为空'
+						}]
+					},
+				
+				}
+			}
+		},
+		onLoad(options) {
+			console.log(options,'options')
+			if(options){
+				this.dataForm.version=options.version
+				this.dataForm.styleNum=options.styleNum
+			}
+			// this.getUser()
+		},
+		onReady() {
+			this.$refs.form.setRules(this.rules)
+		},
+		methods: {
+			
+			submit(ref) {
+				this.$refs.form.validate().then(res => {
+					// this.dataForm.qty=Number(this.dataForm.qty)
+					addOutRep(this.dataForm).then(response => {
+						this.$modal.confirm('操作成功','',false).then(() => {
+							uni.navigateBack()
+						})
+					})
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #ffffff;
+	}
+
+	.example {
+		padding: 15px;
+		background-color: #fff;
+	}
+
+	.segmented-control {
+		margin-bottom: 15px;
+	}
+
+	.button-group {
+		margin-top: 15px;
+		display: flex;
+		justify-content: space-around;
+	}
+
+	.form-item {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+
+	.button {
+		display: flex;
+		align-items: center;
+		height: 35px;
+		line-height: 35px;
+		margin-left: 10px;
+	}
+</style>