You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
401 lines
9.2 KiB
401 lines
9.2 KiB
<template>
|
|
<!-- <view>
|
|
<view class="formBox">
|
|
<uni-forms ref="form" :modelValue="formData" labelWidth="85px">
|
|
<uni-forms-item label="店铺名称" name="name">
|
|
<uni-easyinput type="text" v-model="shopName" disabled />
|
|
</uni-forms-item>
|
|
</uni-forms>
|
|
<uni-card title="选择商品">
|
|
<u-grid :col="2" border>
|
|
<u-grid-item index="add" @tap.stop="scanCodeAdd">
|
|
<u-icon name="scan" size="36"></u-icon>
|
|
</u-grid-item>
|
|
<u-grid-item @tap.stop="goodsAdd">
|
|
<u-icon name="plus" size="28"></u-icon>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</uni-card>
|
|
</view>
|
|
<view class="tui-tabbar">
|
|
<u-button type="primary" :plain="true" shape="circle" @tap.stop="submit(ret)">保存</u-button>
|
|
</view>
|
|
</view> -->
|
|
<view class="page1">
|
|
<view class="content">
|
|
<view class="content-box">
|
|
<view class="content-list">
|
|
<view class="list-name">供应商</view>
|
|
<view class="list-val">
|
|
<input type="text" placeholder="请选择供应商" disabled
|
|
style="border-bottom: 1px solid #fff;text-align: center;" @tap="goPopleList('kh')">
|
|
<uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="content-list">
|
|
<view class="list-name">销售员</view>
|
|
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="value"
|
|
placeholder="请选择销售员" @change="categoryChange"></uni-data-select>
|
|
</view> -->
|
|
</view>
|
|
<view class="content-box">
|
|
<view class="shop-box" style="border-bottom: 1px solid #eee;margin-bottom: 20rpx;">
|
|
<u-grid :col="2" border>
|
|
<u-grid-item index="add" @tap.stop="scanCodeAdd">
|
|
<u-icon name="scan" size="36"></u-icon>
|
|
<text>扫一扫</text>
|
|
</u-grid-item>
|
|
<u-grid-item @tap.stop="goodsAdd">
|
|
<u-icon name="plus" size="28"></u-icon>
|
|
<text>添加商品</text>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</view>
|
|
<!-- <view class="shop-box">
|
|
<view class="content-list">
|
|
<view class="list-name">折扣类型</view>
|
|
<view class="list-val">
|
|
<radio-group @change="radioChange" style="display: flex;">
|
|
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items"
|
|
:key="item.value">
|
|
<view>
|
|
<radio :value="item.value" :checked="index === current" />
|
|
</view>
|
|
<view>{{item.name}}</view>
|
|
</label>
|
|
</radio-group>
|
|
</view>
|
|
</view>
|
|
</view> -->
|
|
<view class="shop-box" style="border-top:5px solid #eee;">
|
|
<view class="shop-name">
|
|
创意小众手提包(QS20121101001)
|
|
<uni-icons type="compose" size="16"></uni-icons>
|
|
</view>
|
|
<view class="shop-type">
|
|
<view class="shop-collapse" @tap="clickCollapse">
|
|
<text>黑色</text>
|
|
<text>均码</text>
|
|
<!-- <text style="color: red;">¥0.00</text> -->
|
|
<text>数量:2</text>
|
|
<!-- <uni-icons type="bottom" size="16" style="margin-left: 112rpx;line-height: 80rpx;"></uni-icons> -->
|
|
</view>
|
|
<!-- <view class="shop-collapse-item" v-if="isCollapse">
|
|
<view class="collapse-1">
|
|
<text>单价</text>
|
|
<input class="input" type="text" value='0'>
|
|
</view>
|
|
<view class="collapse-1">
|
|
<text>折扣(100%)</text>
|
|
<input class="input" type="text" value='0'>
|
|
</view>
|
|
<view class="collapse-1">
|
|
<text>折后价</text>
|
|
<input class="input" type="text" value='0'>
|
|
</view>
|
|
<view class="collapse-1">
|
|
<text>数量</text>
|
|
<input class="input" type="text" value='0'>
|
|
</view>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="content-box">
|
|
<!-- <view class="price-box-title">
|
|
<text>商品数量:5 </text>
|
|
<text style="text-align: left;padding-left: 40rpx;color: red;">金额:500.00</text>
|
|
</view> -->
|
|
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
|
|
<view class="price-box-list">
|
|
<view class="content-list">
|
|
<view class="list-name">实付金额</view>
|
|
<view class="list-val">
|
|
<input type="text" value="0">
|
|
</view>
|
|
</view>
|
|
<view class="content-list">
|
|
<view class="list-name">未付金额</view>
|
|
<view class="list-val">
|
|
<input type="text" value="0">
|
|
</view>
|
|
</view>
|
|
<view class="content-list">
|
|
<view class="list-name">欠款</view>
|
|
<view class="list-val">
|
|
<input type="text" value="0">
|
|
</view>
|
|
</view>
|
|
<view class="content-list">
|
|
<view class="list-name">其他费用</view>
|
|
<view class="list-val">
|
|
<input type="text" value="0">
|
|
</view>
|
|
</view>
|
|
<view class="content-list">
|
|
<view class="list-name">备注</view>
|
|
<view class="">
|
|
<textarea />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bottom-box">
|
|
<view class="bottom-left">
|
|
<text>合计:2</text>
|
|
<text style="color: #ffa200;">¥20.00</text>
|
|
</view>
|
|
<view class="bottom-right">
|
|
<button class="bottom-btn">入库</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
mapState
|
|
} from 'vuex';
|
|
export default {
|
|
computed: mapState(['shopName']),
|
|
data() {
|
|
return {
|
|
// 表单数据
|
|
formData: {
|
|
name: '',
|
|
manufacturer: '',
|
|
price: '',
|
|
single: ''
|
|
},
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
scanCodeAdd() {
|
|
uni.scanCode({
|
|
success: (res) => {
|
|
uni.showToast({
|
|
title: res.result,
|
|
icon: 'none'
|
|
})
|
|
},
|
|
fail: (res) => {
|
|
uni.showToast({
|
|
title: '扫描失败',
|
|
icon: 'none'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
goodsAdd() {
|
|
uni.navigateTo({
|
|
url:"/pages/inventory/goodsList?type=" + 'inventory'
|
|
})
|
|
},
|
|
/**
|
|
* 复写 binddata 方法,如果只是为了校验,无复杂自定义操作,可忽略此方法
|
|
* @param {String} name 字段名称
|
|
* @param {String} value 表单域的值
|
|
*/
|
|
// binddata(name,value){
|
|
// 通过 input 事件设置表单指定 name 的值
|
|
// this.$refs.form.setValue(name, value)
|
|
// },
|
|
// 触发提交表单
|
|
submit() {
|
|
this.$refs.form.validate().then(res => {
|
|
console.log('表单数据信息:', res);
|
|
}).catch(err => {
|
|
console.log('表单错误信息:', err);
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
page,.page1{
|
|
height: 100%;
|
|
}
|
|
.content {
|
|
border-top: 1px solid #eee;
|
|
overflow-y: scroll;
|
|
max-height: 100vh;
|
|
}
|
|
|
|
.content-box {
|
|
width: 100%;
|
|
height: auto;
|
|
background: #fff;
|
|
margin-bottom: 20rpx;
|
|
|
|
}
|
|
|
|
.content-list {
|
|
width: 95%;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
height: 80rpx;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.content-list:last-child {
|
|
border-bottom: none;
|
|
height: auto;
|
|
}
|
|
|
|
.list-name {
|
|
width: 200rpx;
|
|
text-align: left;
|
|
line-height: 40px;
|
|
height: 80rpx;
|
|
padding-left: 20rpx;
|
|
}
|
|
|
|
.list-val {
|
|
width: 560rpx;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
}
|
|
|
|
.list-val input {
|
|
width: 400rpx;
|
|
height: 60rpx;
|
|
display: inline-block;
|
|
line-height: 60rpx;
|
|
float: left;
|
|
margin-top: 10rpx;
|
|
padding-left: 20rpx;
|
|
border-bottom: 1px solid #088FEB;
|
|
}
|
|
|
|
.uni-data-select {
|
|
width: 80%;
|
|
text-align: center;
|
|
}
|
|
|
|
.uni-select {
|
|
border: none !important;
|
|
border-radius: 0 !important;
|
|
}
|
|
|
|
.uni-select__input-placeholder {
|
|
color: #6a6a6a;
|
|
font-size: 28rpx !important;
|
|
width: 400rpx;
|
|
}
|
|
|
|
.uni-select__input-box {
|
|
.uni-icons {
|
|
margin-left: 100rpx;
|
|
}
|
|
}
|
|
|
|
.shop-box {
|
|
width: 95%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.shop-name {
|
|
width: 100%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
border-top: 1px solid #eee;
|
|
border-bottom: 1px solid #eee;
|
|
font-size: 28rpx;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.shop-name {
|
|
.uni-icons {
|
|
color: #088FEB !important;
|
|
}
|
|
}
|
|
|
|
.shop-collapse {
|
|
border-radius: 1px solid #eee;
|
|
}
|
|
|
|
.shop-collapse text {
|
|
text-align: right;
|
|
padding-right: 40rpx;
|
|
border-right: 1px solid #eee;
|
|
}
|
|
|
|
.shop-collapse-item {
|
|
display: flex;
|
|
text-align: center;
|
|
background: #eee;
|
|
height: 110rpx;
|
|
|
|
.input {
|
|
border: 1px solid #eee;
|
|
background: #fff;
|
|
height: 60rpx;
|
|
}
|
|
}
|
|
|
|
.price-box-title {
|
|
width: 95%;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
text-align: center;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.price-box-title text {
|
|
flex: 1;
|
|
}
|
|
|
|
.uni-list-cell {
|
|
display: flex;
|
|
margin-right: 20rpx;
|
|
}
|
|
|
|
.bottom-box {
|
|
width: 100%;
|
|
position: absolute;
|
|
bottom: 0rpx;
|
|
display: flex;
|
|
background: #fff;
|
|
border-top: 1px solid #eee;
|
|
height: 110rpx;
|
|
}
|
|
|
|
.bottom-left {
|
|
flex: 1;
|
|
height: 110rpx;
|
|
line-height: 110rpx;
|
|
}
|
|
|
|
.bottom-right {
|
|
flex: 1;
|
|
height: 110rpx;
|
|
line-height: 110rpx;
|
|
}
|
|
|
|
.bottom-left text {
|
|
line-height: 84rpx;
|
|
display: inline-block;
|
|
padding-left: 20rpx;
|
|
}
|
|
|
|
.bottom-btn {
|
|
width: 320rpx;
|
|
background: linear-gradient(90deg, #60F3FF, #088FEB);
|
|
color: #fff;
|
|
border-radius: 50rpx;
|
|
height: 85rpx;
|
|
margin-top: 15rpx;
|
|
}
|
|
|
|
textarea {
|
|
margin: 20rpx;
|
|
border: 1px solid #eee;
|
|
height: 150rpx;
|
|
width: 500rpx;
|
|
}
|
|
</style>
|