同步代码
This commit is contained in:
222
pageConsumables/addConsumables.vue
Normal file
222
pageConsumables/addConsumables.vue
Normal file
@@ -0,0 +1,222 @@
|
||||
<template>
|
||||
<view class="topTitle">
|
||||
耗材信息
|
||||
</view>
|
||||
<view class="addConsumables">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
单位
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入单位" v-model="datas.form.conUnit" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
耗材名称
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入耗材名称" v-model="datas.form.conName" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
耗材价格
|
||||
</view>
|
||||
<view>
|
||||
<input class="uni-input" placeholder="请输入耗材价格" type="number" v-model="datas.form.price" >
|
||||
<!-- <up-input placeholder="请输入耗材价格" v-model="datas.form.price" type="digit"></up-input> -->
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
预警值
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入预警值" v-model="datas.form.conWarning" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view style="justify-content: space-between;">
|
||||
<view>
|
||||
耗材类型
|
||||
</view>
|
||||
<view style="width: 54%;" @tap="datas.showStatus = !datas.showStatus">
|
||||
{{datas.typelist[datas.nowStatusIndex]}}
|
||||
</view>
|
||||
<uni-icons type="bottom" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:datas.showStatus?statusHeight:0}" class="tranistion status overflow-hide">
|
||||
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in datas.typelist" :key="index">
|
||||
<view :class="{'color-main':datas.nowStatusIndex===index}">{{item}}</view>
|
||||
<uni-icons v-if="datas.nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
</view>
|
||||
<view :style="{height: '14px'}"></view>
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||
text="保存"></up-button>
|
||||
</view>
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
computed,
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import {
|
||||
tbConsTypeList,
|
||||
tbConsInfoAddlist
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
let datas = reactive({
|
||||
form: {
|
||||
conWarning: 999
|
||||
},
|
||||
showStatus: false,
|
||||
list: [],
|
||||
typelist: [],
|
||||
nowStatusIndex: 0
|
||||
})
|
||||
// const props = defineProps({
|
||||
// item: {
|
||||
// type: String
|
||||
// }
|
||||
// })
|
||||
onMounted(() => {
|
||||
gettbConsTypeList()
|
||||
})
|
||||
|
||||
let gettbConsTypeList = () => {
|
||||
datas.typelist = []
|
||||
tbConsTypeList({
|
||||
page: 0,
|
||||
size: 30,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
res.content.forEach(ele => {
|
||||
datas.typelist.push(ele.conTypeName)
|
||||
})
|
||||
})
|
||||
}
|
||||
const refs = getCurrentInstance()
|
||||
let sumbit = () => {
|
||||
let conUnitdata = datas.form.conUnit.replace(/(^\s*)|(\s*$)/g, "")
|
||||
if (!conUnitdata) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "单位不能为空"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!datas.form.price) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "价格不能为空"
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log(datas.list, 'tiaoshi1')
|
||||
console.log(datas.list[datas.nowStatusIndex], 'tiaoshi1')
|
||||
tbConsInfoAddlist([{
|
||||
...datas.form,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
conTypeId: datas.list[datas.nowStatusIndex].id
|
||||
}]).then(res => {
|
||||
// go.to('PAGES_SALES_CONSUMABLES')
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.typelist.length + 14 + 'px'
|
||||
})
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
datas.nowStatusIndex = i
|
||||
datas.showStatus = false
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.topTitle {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin: 32rpx 28rpx;
|
||||
}
|
||||
|
||||
.addConsumables {
|
||||
width: 694rpx;
|
||||
height: 640rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin: 32rpx;
|
||||
padding: 1rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
>view {
|
||||
width: 646rpx;
|
||||
height: 84rpx;
|
||||
background: #fcfcfc;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
margin-top: 32rpx;
|
||||
.df;
|
||||
|
||||
>view:first-child {
|
||||
width: 190rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// text-align: left;
|
||||
padding-left: 24rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
221
pageConsumables/addType.vue
Normal file
221
pageConsumables/addType.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<view class="addType">
|
||||
<view v-for="item in datas.list">
|
||||
<view class="">
|
||||
{{item.conTypeName}}<up-icon color="#64A7FE" name="edit-pen" @tap="showoneEvent(item)"></up-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
是否启用
|
||||
<up-switch checked="true" activeValue="1" size="20" inactiveValue="0"
|
||||
@change="switchChangeEvent($event,item)" :modelValue="item.status" style="transform:scale(0.7)" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 100rpx; padding: 0 28rpx;">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="datas.showtwo=true"
|
||||
:plain="true" text="添加"></up-button>
|
||||
</view>
|
||||
<!-- 新增类别 -->
|
||||
<up-popup :show="datas.showtwo" :round="18" mode="center" @close="close">
|
||||
<view class="zhezhaopops">
|
||||
<view class="">
|
||||
<span></span>
|
||||
<span>新增类别</span>
|
||||
<up-icon @tap="datas.showtwo=false" name="close-circle-fill"></up-icon>
|
||||
</view>
|
||||
<view style="margin-bottom: 28rpx;">
|
||||
耗材类型名称<input type="text" v-model="datas.conTypeName" />
|
||||
</view>
|
||||
<view class="">
|
||||
是否禁用
|
||||
<up-switch checked="true" activeValue="1" inactiveValue="0" @change="switchChange"
|
||||
:modelValue="datas.status" style="transform:scale(0.7)" />
|
||||
</view>
|
||||
<up-button text="确认" @tap="confirmtow" type="primary" class="buttomStyle" shape="circle"></up-button>
|
||||
</view>
|
||||
</up-popup>
|
||||
<!-- 编辑 -->
|
||||
<up-popup :show="datas.showone" :round="18" mode="center" @close="close">
|
||||
<view class="zhezhaopops">
|
||||
<view class="">
|
||||
<span></span>
|
||||
<span>编辑类别</span>
|
||||
<up-icon @tap="datas.showone=false" name="close-circle-fill"></up-icon>
|
||||
</view>
|
||||
<view style="margin-bottom: 28rpx;">
|
||||
耗材类型名称<input type="text" v-model="datas.conTypeName" />
|
||||
</view>
|
||||
<up-button text="确认" @tap="confirmone" type="primary" class="buttomStyle" shape="circle"></up-button>
|
||||
</view>
|
||||
</up-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
tbConsTypeList,
|
||||
tbConsType,
|
||||
edittbConsTypeput
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
showtwo: false,
|
||||
conTypeName: "",
|
||||
status: "0",
|
||||
showone: false,
|
||||
activeData: ""
|
||||
})
|
||||
onMounted(() => {
|
||||
gettbConsTypeList()
|
||||
})
|
||||
let showoneEvent = (d) => {
|
||||
datas.showone = true
|
||||
datas.conTypeName = d.conTypeName
|
||||
datas.activeData = d
|
||||
}
|
||||
let switchChange = (d) => {
|
||||
datas.status = d
|
||||
}
|
||||
let switchChangeEvent = (d, item) => {
|
||||
let obj = {
|
||||
...item
|
||||
}
|
||||
obj.status = d
|
||||
edittbConsTypeput(obj).then(res => {
|
||||
gettbConsTypeList()
|
||||
})
|
||||
}
|
||||
|
||||
function confirmtow() {
|
||||
tbConsType({
|
||||
conTypeName: datas.conTypeName,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
status: datas.status
|
||||
}).then(res => {
|
||||
datas.showtwo = false
|
||||
datas.conTypeName = ""
|
||||
datas.status = 0
|
||||
gettbConsTypeList()
|
||||
})
|
||||
}
|
||||
let confirmone = () => {
|
||||
edittbConsTypeput({
|
||||
...datas.activeData,
|
||||
conTypeName: datas.conTypeName
|
||||
}).then(res => {
|
||||
gettbConsTypeList()
|
||||
datas.showone = false
|
||||
})
|
||||
}
|
||||
let close = () => {
|
||||
datas.conName = ""
|
||||
datas.status = "0"
|
||||
}
|
||||
let gettbConsTypeList = () => {
|
||||
datas.typeLists = ['全部']
|
||||
tbConsTypeList({
|
||||
page: 0,
|
||||
size: 30,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.addType {
|
||||
padding: 0 28rpx;
|
||||
|
||||
>view {
|
||||
height: 104rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 32rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zhezhaopops {
|
||||
padding: 34rpx 32rpx;
|
||||
width: 594rpx;
|
||||
// height: 566rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
>view:first-child {
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
|
||||
>span:nth-child(2) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
>view:nth-child(2) {
|
||||
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-top: 64rpx;
|
||||
|
||||
>input {
|
||||
margin-top: 24rpx;
|
||||
width: 492rpx;
|
||||
height: 84rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
>view:nth-child(3) {
|
||||
margin-top: 48rpx;
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.buttomStyle {
|
||||
margin-top: 48rpx;
|
||||
width: 506rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
160
pageConsumables/addsupplier.vue
Normal file
160
pageConsumables/addsupplier.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<view class="warehouseEntry">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text> 供应商
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入供应商名称" v-model="datas.form.purveyorName" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text> 联系电话
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入联系电话" v-model="datas.form.purveyorTelephone" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text> 地址
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
备注
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入备注" v-model="datas.form.remark" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||
text="保存"></up-button>
|
||||
</view>
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
reactive,
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
tbShopPurveyorpost
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let datas = reactive({
|
||||
form: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
},
|
||||
})
|
||||
const currentInstance = getCurrentInstance()
|
||||
|
||||
function sumbit() {
|
||||
if (!datas.form.purveyorName || !datas.form.purveyorTelephone || !datas.form.address) {
|
||||
currentInstance.ctx.$refs.uToastRef.show({
|
||||
message: "请填写必填项",
|
||||
type: 'default',
|
||||
})
|
||||
return
|
||||
}
|
||||
tbShopPurveyorpost(datas.form).then(res => {
|
||||
currentInstance.ctx.$refs.uToastRef.show({
|
||||
message: "添加成功",
|
||||
type: 'default',
|
||||
})
|
||||
setTimeout(() => {
|
||||
// go.to('PAGES_SUPPLIER')pageConsumables/supplier
|
||||
// uni.redirectTo({url: '/pageConsumables/supplier'})
|
||||
go.back()
|
||||
// uni.redirectTo({url: '/pageConsumables/supplier'})
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.warehouseEntry {
|
||||
height: 540rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin: 28rpx;
|
||||
padding: 1rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
>view {
|
||||
height: 84rpx;
|
||||
background: #fcfcfc;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
margin-top: 32rpx;
|
||||
.df;
|
||||
|
||||
>view:first-child {
|
||||
width: 190rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// text-align: left;
|
||||
padding-left: 24rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
pageConsumables/bg.png
Normal file
BIN
pageConsumables/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
81
pageConsumables/billPayment.vue
Normal file
81
pageConsumables/billPayment.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<ul>
|
||||
<li v-for="item in datas.list" :key="item.id">
|
||||
<view class="">
|
||||
<span>{{item.payType}}</span>
|
||||
<span>{{item.paidAmount}}</span>
|
||||
</view>
|
||||
<view class="">
|
||||
<span>{{item.remark}}</span>
|
||||
<span>{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</span>
|
||||
</view>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import {
|
||||
tbShopPurveyorTransacttransactPayInfos
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: Number
|
||||
}
|
||||
})
|
||||
let datas = reactive({
|
||||
list: []
|
||||
})
|
||||
onMounted(() => {
|
||||
getlist()
|
||||
})
|
||||
let getlist = () => {
|
||||
tbShopPurveyorTransacttransactPayInfos({
|
||||
type: "",
|
||||
id: props.id
|
||||
}).then(res => {
|
||||
datas.list = res
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
padding: 0 28rpx;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-top: 32rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
li {
|
||||
height: 138rpx;
|
||||
background-color: #fff;
|
||||
padding: 24rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
margin: 12rpx 0;
|
||||
padding-bottom: 12rpx;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
108
pageConsumables/components/my-action-sheet.vue
Normal file
108
pageConsumables/components/my-action-sheet.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<view class="action-sheet" @tap="close" v-if="show">
|
||||
<view class="box">
|
||||
<slot name="title">
|
||||
|
||||
</slot>
|
||||
<view class="item" @tap.stop="itemClick(index)" v-for="(item,index) in props.list" :key="index">
|
||||
<button class="bg-fff btn" hover-class="btn-hover-class" :style="{color:index==0?'red':''}" :class="{'color-main':active==index}">{{item}}</button>
|
||||
</view>
|
||||
<view class="bock-gary"></view>
|
||||
<view class="cancel-btn" @tap="close">
|
||||
<button>取消</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
const props=defineProps({
|
||||
//那个按钮文字高亮
|
||||
active:{
|
||||
type:Number,
|
||||
default:-1
|
||||
},
|
||||
autoClose:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
title:{
|
||||
type:String,
|
||||
default:'耗材报损'
|
||||
},
|
||||
list:{
|
||||
type:Array,
|
||||
default:['编辑','删除']
|
||||
},
|
||||
show:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
})
|
||||
const emits=defineEmits(['itemClick','close'])
|
||||
let show=ref(false)
|
||||
function open(){
|
||||
show.value=true
|
||||
}
|
||||
function close(){
|
||||
show.value=false
|
||||
emits('close')
|
||||
}
|
||||
function itemClick(index){
|
||||
if(props.autoClose){
|
||||
close()
|
||||
}
|
||||
emits('itemClick',index)
|
||||
}
|
||||
defineExpose({
|
||||
open,close
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
$bg:rgb(240, 240, 240);
|
||||
.action-sheet{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
background-color: rgba(51,51,51,.5);
|
||||
z-index: 999;
|
||||
.box{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
/* #ifndef H5 */
|
||||
padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
|
||||
/* #endif */
|
||||
|
||||
.item{
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
border-bottom: 1px solid $bg;
|
||||
.btn{
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bock-gary{
|
||||
background-color: $bg;
|
||||
height: 20rpx;
|
||||
}
|
||||
.cancel-btn{
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.btn-hover-class{
|
||||
background-color: rgb(222, 222, 222);
|
||||
}
|
||||
</style>
|
||||
448
pageConsumables/components/my-date-pickerview.vue
Normal file
448
pageConsumables/components/my-date-pickerview.vue
Normal file
@@ -0,0 +1,448 @@
|
||||
<template>
|
||||
<view class="mask" v-if="show" @tap="close">
|
||||
<view class="box" @tap.stop="nullFunction">
|
||||
<view class="u-flex u-relative u-row-center u-p-30 top">
|
||||
<view class="font-bold u-font-32">筛选日期时间</view>
|
||||
<view class="close" @tap="close">
|
||||
<uni-icons type="closeempty" size="24"></uni-icons>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="u-p-30 u-flex u-flex-wrap gap-20 fastTime">
|
||||
<view class="item" v-for="(item,index) in fastTime" :key="index" @tap="changeTime(item.key)">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view> -->
|
||||
<picker-view :immediate-change="true" @pickend="pickend" :value="value" @change="bindChange"
|
||||
class="picker-view">
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in days" :key="index">{{item}}日</view>
|
||||
</picker-view-column>
|
||||
<!-- <picker-view-column>
|
||||
<view class="item" v-for="(item,index) in hours" :key="index">{{item}}时</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in minutes" :key="index">{{item}}分</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in seconds" :key="index">{{item}}秒</view>
|
||||
</picker-view-column> -->
|
||||
</picker-view>
|
||||
<view class="u-text-center color-999">至</view>
|
||||
<picker-view :immediate-change="true" :value="value1" @pickend="pickend1" @change="bindChange1"
|
||||
class="picker-view">
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in days1" :key="index">{{item}}日</view>
|
||||
</picker-view-column>
|
||||
<!-- <picker-view-column>
|
||||
<view class="item" v-for="(item,index) in hours" :key="index">{{item}}时</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in minutes" :key="index">{{item}}分</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in seconds" :key="index">{{item}}秒</view>
|
||||
</picker-view-column> -->
|
||||
</picker-view>
|
||||
|
||||
<!-- 站位 -->
|
||||
<view style="height: 80px;"></view>
|
||||
<view class="fixed_b">
|
||||
<my-button shape="circle" @tap="confirm">确定</my-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import myButton from "@/components/my-components/my-button.vue"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue';
|
||||
const $nowDate = new Date()
|
||||
const nowDate = {
|
||||
year: $nowDate.getFullYear(),
|
||||
month: $nowDate.getMonth() + 1,
|
||||
day: $nowDate.getDate(),
|
||||
hours: $nowDate.getHours(),
|
||||
minutes: $nowDate.getMinutes(),
|
||||
seconds: $nowDate.getSeconds()
|
||||
}
|
||||
const yearsLen = 30
|
||||
const years = new Array(yearsLen).fill(1).map((v, index) => {
|
||||
return nowDate.year - index
|
||||
}).reverse()
|
||||
const months = new Array(12).fill(1).map((v, index) => {
|
||||
return index + 1
|
||||
})
|
||||
const days = ref(new Array(getMonthArea($nowDate, 'end').getDate()).fill(1).map((v, index) => {
|
||||
return index + 1
|
||||
}))
|
||||
const days1 = ref(new Array(getMonthArea($nowDate, 'end').getDate()).fill(1).map((v, index) => {
|
||||
return index + 1
|
||||
}))
|
||||
const hours = new Array(24).fill(1).map((v, index) => {
|
||||
return index
|
||||
})
|
||||
const minutes = new Array(60).fill(1).map((v, index) => {
|
||||
return index
|
||||
})
|
||||
const seconds = new Array(60).fill(1).map((v, index) => {
|
||||
return index
|
||||
})
|
||||
const fastTime = reactive([{
|
||||
title: '今日',
|
||||
key: 'now'
|
||||
},
|
||||
{
|
||||
title: '昨日',
|
||||
key: 'prve'
|
||||
},
|
||||
{
|
||||
title: '本月',
|
||||
key: 'nowMonth'
|
||||
},
|
||||
{
|
||||
title: '上月',
|
||||
key: 'prveMonth'
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
|
||||
function setPrveDay() {
|
||||
|
||||
}
|
||||
|
||||
function setNowMoneth() {
|
||||
|
||||
}
|
||||
|
||||
function setprveMoneth() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function setDay(start, end) {
|
||||
value.value = [
|
||||
start.year,
|
||||
start.month,
|
||||
start.day,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
]
|
||||
value1.value = [
|
||||
end.year,
|
||||
end.month,
|
||||
end.day,
|
||||
23,
|
||||
59,
|
||||
59,
|
||||
]
|
||||
}
|
||||
|
||||
function changeTime(key) {
|
||||
const yearIndex = years.findIndex(v => v == nowDate.year)
|
||||
const prveyearIndex = years.findIndex(v => v == nowDate.year) - 1
|
||||
const nowMonthIndex = nowDate.month - 1
|
||||
const nowDayIndex = nowDate.day - 1
|
||||
const dataMap = {
|
||||
now: function() {
|
||||
return {
|
||||
start: {
|
||||
year: yearIndex,
|
||||
month: nowMonthIndex,
|
||||
day: nowDayIndex
|
||||
},
|
||||
end: {
|
||||
year: yearIndex,
|
||||
month: nowMonthIndex,
|
||||
day: nowDayIndex
|
||||
}
|
||||
}
|
||||
},
|
||||
prve: function() {
|
||||
const oneDay=1000*60*60*24
|
||||
const date=new Date(new Date(nowDate.year,nowDate.month,nowDate.day,0,0,0).getTime()-oneDay)
|
||||
return {
|
||||
start: {
|
||||
year:years.findIndex(v=>v==date.getFullYear()),
|
||||
month:date.getMonth()-1<0?11:date.getMonth()-1,
|
||||
day: date.getDate()-1
|
||||
},
|
||||
end: {
|
||||
year:years.findIndex(v=>v==date.getFullYear()),
|
||||
month:date.getMonth()-1<0?11:date.getMonth()-1,
|
||||
day: date.getDate()-1
|
||||
}
|
||||
}
|
||||
},
|
||||
nowMonth: function() {
|
||||
return {
|
||||
start: {
|
||||
year:yearIndex,
|
||||
month:nowMonthIndex,
|
||||
day: 0
|
||||
},
|
||||
end: {
|
||||
year:yearIndex,
|
||||
month:nowMonthIndex,
|
||||
day:new Date(nowDate.year, nowDate.month , 0).getDate() - 1
|
||||
}
|
||||
}
|
||||
},
|
||||
prveMonth: function() {
|
||||
const oneDay=1000*60*60*24
|
||||
const date=new Date(new Date(nowDate.year, nowDate.month-1,0,0,0).getTime()-oneDay)
|
||||
console.log(date.getMonth());
|
||||
return {
|
||||
start: {
|
||||
year:years.findIndex(v=>v==date.getFullYear()),
|
||||
month:date.getMonth(),
|
||||
day: 0
|
||||
},
|
||||
end: {
|
||||
year:years.findIndex(v=>v==date.getFullYear()),
|
||||
month:date.getMonth(),
|
||||
day: date.getDate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const data = dataMap[key]()
|
||||
setDay(data.start, data.end)
|
||||
changeDays(false,value.value)
|
||||
changeDays(true,value1.value)
|
||||
|
||||
console.log(value1.value);
|
||||
const start = returnDateString(value.value)
|
||||
const end = returnDateString(value1.value)
|
||||
|
||||
emits('confirm', {
|
||||
text: `${start}——${end}`,
|
||||
start,
|
||||
end
|
||||
})
|
||||
close()
|
||||
}
|
||||
let value = ref([
|
||||
years.length - 1,
|
||||
nowDate.month - 1,
|
||||
nowDate.day - 1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
])
|
||||
let value1 = ref([
|
||||
years.length - 1,
|
||||
nowDate.month - 1,
|
||||
nowDate.day - 1,
|
||||
23,
|
||||
59,
|
||||
59,
|
||||
])
|
||||
|
||||
let show = ref(false)
|
||||
const emits = defineEmits('close', 'open', 'confirm')
|
||||
|
||||
function toggle() {
|
||||
show.value = !show.value
|
||||
if (show.value) {
|
||||
emits('open', true)
|
||||
} else {
|
||||
emits('close', false)
|
||||
}
|
||||
}
|
||||
|
||||
function close() {
|
||||
show.value = false
|
||||
emits('close', false)
|
||||
}
|
||||
|
||||
function open() {
|
||||
show.value = true
|
||||
emits('open', true)
|
||||
}
|
||||
|
||||
function returnDateString(arr) {
|
||||
const year = years[arr[0]]
|
||||
const month = arr[1] + 1
|
||||
const day = arr[2] + 1
|
||||
const hour = ('0' + arr[3]).slice(-2)
|
||||
const min = ('0' + arr[4]).slice(-2)
|
||||
const sen = ('0' + arr[5]).slice(-2)
|
||||
return `${year}-${month}-${day} ${hour}:${min}:${sen}`
|
||||
}
|
||||
|
||||
|
||||
function confirm(e) {
|
||||
const start = returnDateString(value.value)
|
||||
const end = returnDateString(value1.value)
|
||||
console.log(start);
|
||||
console.log(end);
|
||||
emits('confirm', {
|
||||
text: `${start}——${end}`,
|
||||
start,
|
||||
end
|
||||
})
|
||||
close()
|
||||
}
|
||||
|
||||
function returnMonthStart(arr) {
|
||||
return new Date(years[arr[0]], months[arr[1]] - 1, 1).getDate();
|
||||
}
|
||||
|
||||
function returnMonthEnd(arr) {
|
||||
return new Date(years[arr[0]], months[arr[1]], 0).getDate();
|
||||
}
|
||||
|
||||
function changeDays(isDays1,arr){
|
||||
const end = returnMonthEnd(arr)
|
||||
if (end) {
|
||||
if(isDays1){
|
||||
days1.value= new Array(end).fill(1).map((v,
|
||||
index) => {
|
||||
return index + 1
|
||||
})
|
||||
}else{
|
||||
days.value= new Array(end).fill(1).map((v,
|
||||
index) => {
|
||||
return index + 1
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function bindChange(e) {
|
||||
value.value = e.detail.value
|
||||
changeDays(false, e.detail.value)
|
||||
}
|
||||
|
||||
function bindChange1(e) {
|
||||
value1.value = e.detail.value
|
||||
changeDays(true, e.detail.value)
|
||||
}
|
||||
|
||||
function getDayDate(date = new Date(), type) {
|
||||
const now = date
|
||||
if (type === 'start') {
|
||||
const startOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||
return startOfDay
|
||||
}
|
||||
if (type === 'end') {
|
||||
const endOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
|
||||
return endOfDay;
|
||||
}
|
||||
}
|
||||
|
||||
function getMonthArea(date = new Date(), type) {
|
||||
let now = date
|
||||
let currentMonthStart = new Date(now.getFullYear(), now.getMonth(), 1);
|
||||
let currentMonthEnd = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
|
||||
if (type === 'start') {
|
||||
return currentMonthStart
|
||||
}
|
||||
if (type === 'end') {
|
||||
return currentMonthEnd;
|
||||
}
|
||||
return {
|
||||
start: currentMonthStart,
|
||||
end: currentMonthEnd
|
||||
};
|
||||
}
|
||||
|
||||
function nullFunction() {
|
||||
|
||||
}
|
||||
|
||||
function pickend(e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
function pickend1(e) {
|
||||
console.log(e);
|
||||
}
|
||||
defineExpose({
|
||||
close,
|
||||
open,
|
||||
confirm,
|
||||
toggle
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fastTime {
|
||||
.item {
|
||||
background-color: rgb(247, 247, 247);
|
||||
padding: 6rpx 40rpx;
|
||||
border-radius: 6rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 30rpx;
|
||||
}
|
||||
|
||||
.mask {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
background-color: rgba(0, 0, 0, .7);
|
||||
|
||||
.box {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.fixed_b {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 30rpx;
|
||||
z-index: 100;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.picker-view {
|
||||
width: 750rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 34px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
368
pageConsumables/components/my-reportDamage.vue
Normal file
368
pageConsumables/components/my-reportDamage.vue
Normal file
@@ -0,0 +1,368 @@
|
||||
<template>
|
||||
<up-popup customStyle="overflow: hidden;" :show="show" round="20" mode="bottom" @close="close" @open="open">
|
||||
<view class="reportDamage">
|
||||
<view class="reportDamage_head">
|
||||
<view class="reportDamage_title">{{title}}</view>
|
||||
<up-icon name="close-circle-fill" color="#333" size="25" @tap="close"></up-icon>
|
||||
</view>
|
||||
<view class="reportDamage_content">
|
||||
<view class="reportDamage_cell">
|
||||
<view class="cell_lable">
|
||||
<up-image v-if="type=='product'" class="thumbnail" radius="10" :show-loading="true"
|
||||
:src="item.coverImg"></up-image>
|
||||
<view>{{item.name}}</view>
|
||||
</view>
|
||||
<view class="cell_value">
|
||||
<up-icon name="minus-circle" color="#999" size="25" @tap="minus"></up-icon>
|
||||
<view class="text">{{vdata.stockNumber}}</view>
|
||||
<up-icon name="plus-circle-fill" color="#318AFE" size="25" @tap="plus"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reportDamage_cell">
|
||||
<view class="cell_lable">商品单位</view>
|
||||
<view class="cell_value">
|
||||
<view>{{item.unit}}</view> <up-icon name="arrow-right" color="#999999" size="15"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reportDamage_cell">
|
||||
<view class="cell_lable">报损图片</view>
|
||||
<view class="cell_value file">
|
||||
<view class="file_img" v-for="(item,index) in vdata.imgUrlList">
|
||||
<up-image class="file_img_item" :show-loading="true" :src="item"></up-image>
|
||||
<view class="del" @tap="del(index)">
|
||||
<up-icon name="trash" color="#fff" size="25" @tap="plus"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="file" @tap="chooseAndUploadAvatar()">
|
||||
<up-icon name="camera-fill" color="#E5E5E5" size="35"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reportDamage_footer">
|
||||
<view class="reportDamage_btn" @tap="affirm">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
computed,
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
watch
|
||||
} from 'vue';
|
||||
import {
|
||||
$uploadFile
|
||||
} from '@/http/yskApi/file.js'
|
||||
// import { consumableBreakage , productBreakage } from '@/http/yskApi/breakage.js'
|
||||
import {
|
||||
tbConsInfoFlowfrmLoss
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
item: {
|
||||
type: Object,
|
||||
},
|
||||
|
||||
})
|
||||
const emits = defineEmits(['close', 'open', "affirm"])
|
||||
const vdata = reactive({
|
||||
stockNumber: 1,
|
||||
imgUrlList: [],
|
||||
})
|
||||
let show = ref(props.show)
|
||||
let type = ref(props.type)
|
||||
let consId = ref()
|
||||
watch(() => props.show, (newval) => {
|
||||
show.value = newval
|
||||
})
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
function close() {
|
||||
show.value = false;
|
||||
vdata.imgUrlList = [];
|
||||
vdata.stockNumber = 1;
|
||||
emits('close')
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开报损弹窗
|
||||
*/
|
||||
function open(d) {
|
||||
if(d){
|
||||
consId.value = d
|
||||
}
|
||||
show.value = true;
|
||||
emits('open')
|
||||
}
|
||||
|
||||
/**
|
||||
* 报损数量减少
|
||||
*/
|
||||
function minus() {
|
||||
if (vdata.stockNumber <= 1) {
|
||||
return;
|
||||
}
|
||||
vdata.stockNumber--;
|
||||
}
|
||||
|
||||
/**
|
||||
* 报损数量增加
|
||||
*/
|
||||
function plus() {
|
||||
vdata.stockNumber++;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除报损图片
|
||||
*/
|
||||
function del(index) {
|
||||
vdata.imgUrlList.splice(index, 1)
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传报损图片
|
||||
*/
|
||||
function chooseAndUploadAvatar() {
|
||||
if (vdata.imgUrlList.length >= 6) {
|
||||
uni.showToast({
|
||||
title: '最多只可以上传六张',
|
||||
icon: 'none'
|
||||
})
|
||||
return;
|
||||
}
|
||||
// 选择图片
|
||||
uni.chooseImage({
|
||||
count: 1, // 默认为1,只选择一张图片
|
||||
sizeType: ['original', 'compressed'], // 图片质量,原图或压缩
|
||||
sourceType: ['album', 'camera'], // 图片来源,相册或相机
|
||||
success: (res) => {
|
||||
let file = res.tempFiles[0];
|
||||
console.log(res)
|
||||
$uploadFile(file).then(res => {
|
||||
console.log(res);
|
||||
vdata.imgUrlList.push(res.data[0])
|
||||
|
||||
}).catch(res => {
|
||||
console.log(res);
|
||||
if (res.errMsg) {
|
||||
uni.showToast({
|
||||
title: '图片大小超出限制',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
fail: chooseImageError => {
|
||||
// 选择图片失败处理逻辑
|
||||
console.log('choose image fail:', chooseImageError);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认
|
||||
*/
|
||||
function affirm() {
|
||||
let params = {
|
||||
coverImg: vdata.imgUrlList,
|
||||
consId: consId.value,
|
||||
amount: vdata.stockNumber,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}
|
||||
tbConsInfoFlowfrmLoss(params).then((res) => {
|
||||
show.value = false;
|
||||
vdata.imgUrlList = [];
|
||||
vdata.stockNumber = 1;
|
||||
emits('affirm','')
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
close,
|
||||
open,
|
||||
affirm
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mask {
|
||||
background-color: rgba(51, 51, 51, .5);
|
||||
}
|
||||
|
||||
::v-deep .u-popup__content {
|
||||
// background-color: transparent;
|
||||
|
||||
}
|
||||
|
||||
.reportDamage {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.reportDamage_head {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
background: #F4F4F4;
|
||||
|
||||
.reportDamage_title {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.reportDamage_content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
|
||||
.reportDamage_cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
|
||||
.cell_lable {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
.thumbnail {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-image,
|
||||
.u-image__loading,
|
||||
.u-image__image {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
::v-deep uni-image {
|
||||
width: 112rpx !important;
|
||||
height: 112rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cell_value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.text {
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.file {
|
||||
padding: 30rpx;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
box-sizing: border-box;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.file_img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.del {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.file_img_item {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
|
||||
}
|
||||
|
||||
::v-deep .u-image,
|
||||
.u-image__loading,
|
||||
.u-image__image {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
::v-deep uni-image {
|
||||
width: 120rpx !important;
|
||||
height: 120rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cell_value.file {
|
||||
// flex-direction: row-reverse;
|
||||
// justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.reportDamage_cell:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.reportDamage_footer {
|
||||
background-color: #fff;
|
||||
padding: 32rpx;
|
||||
padding-bottom: 68rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.reportDamage_btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background: #318AFE;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
212
pageConsumables/editConsumables.vue
Normal file
212
pageConsumables/editConsumables.vue
Normal file
@@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<view class="topTitle">
|
||||
耗材信息
|
||||
</view>
|
||||
<view class="addConsumables">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
单位
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入单位" v-model="datas.form.conUnit" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
耗材名称
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入耗材名称" v-model="datas.form.conName" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
耗材价格
|
||||
</view>
|
||||
<view>
|
||||
<input class="uni-input" placeholder="请输入耗材价格" type="number" v-model="datas.form.price">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
预警值
|
||||
</view>
|
||||
<view>
|
||||
<input type="number" placeholder="请输入预警值" v-model="datas.form.conWarning" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<!-- <li style="justify-content: space-between;">
|
||||
<view>
|
||||
耗材类型
|
||||
</view>
|
||||
<view style="width: 54%;" @tap="datas.showStatus = !datas.showStatus">
|
||||
{{datas.typelist[datas.nowStatusIndex]}}
|
||||
</view>
|
||||
<uni-icons type="bottom" size="16"></uni-icons>
|
||||
</li> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view :style="{height:datas.showStatus?statusHeight:0}" class="tranistion status overflow-hide">
|
||||
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in datas.typelist" :key="index">
|
||||
<view :class="{'color-main':datas.nowStatusIndex===index}">{{item}}</view>
|
||||
<uni-icons v-if="datas.nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
</view>
|
||||
<view :style="{height: '14px'}"></view>
|
||||
</view> -->
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||
text="保存"></up-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
computed,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
import {
|
||||
tbConsTypeList,
|
||||
tbConsTypeput
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
let datas = reactive({
|
||||
form: {
|
||||
conWarning: 999
|
||||
},
|
||||
showStatus: false,
|
||||
list: [],
|
||||
typelist: [],
|
||||
nowStatusIndex: 0
|
||||
})
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
let obj = JSON.parse(props.item)
|
||||
datas.form = obj
|
||||
|
||||
gettbConsTypeList()
|
||||
})
|
||||
|
||||
let gettbConsTypeList = () => {
|
||||
datas.typelist = []
|
||||
tbConsTypeList({
|
||||
page: 0,
|
||||
size: 30,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
res.content.forEach(ele => {
|
||||
datas.typelist.push(ele.conTypeName)
|
||||
})
|
||||
})
|
||||
}
|
||||
let sumbit = () => {
|
||||
tbConsTypeput([{
|
||||
...datas.form,
|
||||
status: datas.form.status * 1,
|
||||
isCheck: datas.form.isCheck * 1,
|
||||
conWarning: datas.form.conWarning * 1,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
conTypeId: datas.list[datas.nowStatusIndex].id,
|
||||
id: datas.form.id
|
||||
}]).then(res => {
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.typelist.length + 14 + 'px'
|
||||
})
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
datas.nowStatusIndex = i
|
||||
datas.showStatus = false
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.topTitle {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin: 32rpx 28rpx;
|
||||
}
|
||||
|
||||
.addConsumables {
|
||||
width: 694rpx;
|
||||
height: 540rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin: 32rpx;
|
||||
padding: 1rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
>view {
|
||||
width: 646rpx;
|
||||
height: 84rpx;
|
||||
background: #fcfcfc;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
margin-top: 32rpx;
|
||||
.df;
|
||||
|
||||
>view:first-child {
|
||||
width: 190rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// text-align: left;
|
||||
padding-left: 24rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
148
pageConsumables/editsupplier.vue
Normal file
148
pageConsumables/editsupplier.vue
Normal file
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<view class="warehouseEntry">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
供应商
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入供应商名称" v-model="datas.form.purveyorName" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
联系电话
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入联系电话" v-model="datas.form.purveyorTelephone" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
地址
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
备注
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入备注" v-model="datas.form.remark" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||
text="保存"></up-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
reactive,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
tbShopPurveyorput
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let datas = reactive({
|
||||
form: {},
|
||||
})
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
datas.form = JSON.parse(props.item)
|
||||
})
|
||||
|
||||
function sumbit() {
|
||||
tbShopPurveyorput({
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
|
||||
...datas.form
|
||||
}).then(res => {
|
||||
// go.to('PAGES_SUPPLIER')
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.warehouseEntry {
|
||||
height: 540rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin: 28rpx;
|
||||
padding: 1rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
>view {
|
||||
height: 84rpx;
|
||||
background: #fcfcfc;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
margin-top: 32rpx;
|
||||
.df;
|
||||
|
||||
>view:first-child {
|
||||
width: 190rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// text-align: left;
|
||||
padding-left: 24rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
491
pageConsumables/index.vue
Normal file
491
pageConsumables/index.vue
Normal file
@@ -0,0 +1,491 @@
|
||||
<template>
|
||||
<view class="ConsumablesTop">
|
||||
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||
</view>
|
||||
<view>
|
||||
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
||||
</view>
|
||||
<view @tap="toUrl('PAGES_ADD_TYPE') ">
|
||||
新增类别
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide">
|
||||
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in datas.typeLists" :key="index">
|
||||
<view :class="{'color-main':nowStatusIndex===index}">{{item}}</view>
|
||||
<uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
</view>
|
||||
<view :style="{height: '14px'}"></view>
|
||||
</view>
|
||||
|
||||
<view class="ConsumablesConent" v-if="datas.list.length">
|
||||
<view v-for="(item,index) in datas.list" :key="index">
|
||||
<view>
|
||||
{{item.conName}}
|
||||
<view> {{item.conTypeName}} </view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<view style="color: #333333;">
|
||||
{{item.conUnit}}
|
||||
</view>
|
||||
<view>
|
||||
耗材单位
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="color: #318AFE;">
|
||||
{{item.stockNumber-item.stockConsume}}
|
||||
</view>
|
||||
<view>
|
||||
剩余库存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="background-color: #fff;" @tap="show=true;showData = filtersSproductId(item.product)">
|
||||
所属商品:
|
||||
{{ filtersSproductId(item.product).length>7?filtersSproductId(item.product).substring(0,6)+'...':filtersSproductId(item.product)}}
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button shape="circle" type="primary" size="mini" color="#999"
|
||||
@tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})" :plain="true"
|
||||
text="查看记录"></up-button>
|
||||
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true"
|
||||
text="更多操作"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="background-color: rgba(0,0,0,0); height: 200rpx;"></view>
|
||||
</view>
|
||||
<view v-else style="text-align: center;">
|
||||
<image src="./bg.png" style="width: 325rpx;height: 335rpx;" mode=""></image>
|
||||
<view style="font-size: 28rpx;color: #999;">暂无数据</view>
|
||||
</view>
|
||||
<view class="ConsumablesBottom">
|
||||
<view @tap="toUrl('PAGES_ADD_CONSUMABLES')">
|
||||
新增耗材
|
||||
</view>
|
||||
<view @tap="toUrl('PAGES_SUPPLIER')">
|
||||
供应商管理
|
||||
</view>
|
||||
</view>
|
||||
<my-action-sheet @itemClick="sheetClick" ref="refMoreSheet" :list="actionSheet.list"></my-action-sheet>
|
||||
<my-reportDamage ref="reportDamage" title="耗材报损" :item="report.data" @affirm="affirm"></my-reportDamage>
|
||||
|
||||
<up-popup :show="show" :round="18" mode="center" >
|
||||
<view class="zhezhaopop">
|
||||
<view class="">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<up-icon @tap="show=false" name="close-circle-fill"></up-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
{{showData}}
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import myActionSheet from './components/my-action-sheet';
|
||||
import myReportDamage from './components/my-reportDamage';
|
||||
import color from '@/commons/color.js';
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
hasPermission
|
||||
} from '@/commons/utils/hasPermission.js';
|
||||
import {
|
||||
viewConInfoFlowget,
|
||||
tbConsType,
|
||||
tbConsTypeList
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let reportDamage = ref(null)
|
||||
let refMoreSheet = ref(null)
|
||||
let show = ref(false)
|
||||
let showData = ref()
|
||||
const report = reactive({
|
||||
data: {
|
||||
// thumbnail: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/20240918/a17a62b7b55a4b65a2a2542050672b34.png',
|
||||
name: "美式咖啡",
|
||||
// title: "商品报损",
|
||||
unit: "杯",
|
||||
},
|
||||
})
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
conName: "",
|
||||
showtwo: false,
|
||||
status: '0',
|
||||
// 类型列表
|
||||
typeList: [],
|
||||
// 类型列表渲染数组
|
||||
typeLists: ['全部'],
|
||||
title: '耗材类型'
|
||||
})
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.typeLists.length + 14 + 'px'
|
||||
})
|
||||
|
||||
const actionSheet = reactive({
|
||||
list: ['报损', '编辑', '清点', '入库', '出库', ],
|
||||
activeId: null,
|
||||
active: ""
|
||||
})
|
||||
let showStatus = ref(false)
|
||||
let nowStatusIndex = ref(0)
|
||||
onShow(() => {
|
||||
getList()
|
||||
// 获取分类列表
|
||||
gettbConsTypeList()
|
||||
})
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
nowStatusIndex.value = i
|
||||
showStatus.value = false
|
||||
if (i == 0) {
|
||||
datas.title = '全部'
|
||||
getList()
|
||||
} else {
|
||||
datas.title = datas.typeList[i - 1].conTypeName
|
||||
getList(datas.typeList[i - 1].id)
|
||||
}
|
||||
}
|
||||
let gettbConsTypeList = () => {
|
||||
datas.typeLists = ['全部']
|
||||
tbConsTypeList({
|
||||
page: 0,
|
||||
size: 30,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
datas.typeList = res.content
|
||||
res.content.forEach(ele => {
|
||||
datas.typeLists.push(ele.conTypeName)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 报损确认
|
||||
*/
|
||||
function affirm() {
|
||||
getList()
|
||||
// 获取分类列表
|
||||
gettbConsTypeList()
|
||||
}
|
||||
|
||||
let toggle = (d) => {
|
||||
refMoreSheet.value.open()
|
||||
actionSheet.active = d
|
||||
actionSheet.activeId = d.id
|
||||
report.data.consId = d.id
|
||||
}
|
||||
|
||||
let sheetClick = (index) => {
|
||||
if (index == 0) {
|
||||
// 权限
|
||||
hasPermission('允许提交报损').then(ele => {
|
||||
if (ele) {
|
||||
//打开报损弹窗
|
||||
reportDamage.value.open(actionSheet.activeId);
|
||||
report.data.name = actionSheet.active.conName
|
||||
report.data.unit = actionSheet.active.conUnit
|
||||
}
|
||||
})
|
||||
} else if (index == 1) {
|
||||
toUrl('PAGES_EDIT_CONSUMABLES', {
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
})
|
||||
} else if (index == 2) {
|
||||
hasPermission('允许耗材盘点').then(ele => {
|
||||
if (ele) {
|
||||
toUrl('PAGES_SALES_INVENTORYCHECK', {
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (index == 3) {
|
||||
hasPermission('允许耗材入库').then(ele => {
|
||||
if (ele) {
|
||||
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
|
||||
consId: actionSheet.activeId,
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (index == 4) {
|
||||
hasPermission('允许耗材出库').then(ele => {
|
||||
if (ele) {
|
||||
toUrl('PAGES_SALES_OUTBOUND', {
|
||||
consId: actionSheet.activeId,
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// async function viewpermission(d) {
|
||||
// let res = await hasPermission(d)
|
||||
// return res
|
||||
// }
|
||||
async function getList(d = "") {
|
||||
viewConInfoFlowget({
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
conName: datas.conName,
|
||||
conTypeId: d,
|
||||
size: 100,
|
||||
page: 0
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
})
|
||||
}
|
||||
|
||||
function inputEvent(d) {
|
||||
datas.conName = d.detail.value.replace(/\s*/g, "");
|
||||
getList()
|
||||
}
|
||||
|
||||
function filtersSproductId(d) {
|
||||
if (!d) return ''
|
||||
// const dataArr = d.split(',')
|
||||
let str = ''
|
||||
d.forEach(ele => {
|
||||
// str += ele.name
|
||||
// const startIndex = ele.indexOf('_')
|
||||
// const productId = ele.slice(0, startIndex)
|
||||
// const productName = ele.slice(startIndex + 1, ele.length)
|
||||
str = ele.name + ',' + str
|
||||
})
|
||||
return str
|
||||
}
|
||||
let toUrl = (url, d) => {
|
||||
go.to(url, d)
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ConsumablesTop {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding-bottom: 22rpx;
|
||||
background-color: #fff;
|
||||
|
||||
>view:first-child,
|
||||
>view:last-child {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
color: #318AFE;
|
||||
}
|
||||
|
||||
>view:nth-child(2) {
|
||||
width: 414rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
background: #F9F9F9;
|
||||
border-radius: 32rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.ConsumablesConent {
|
||||
min-height: 80vh;
|
||||
background-color: #f9f9f9;
|
||||
padding-top: 1rpx;
|
||||
|
||||
>view {
|
||||
width: 694rpx;
|
||||
height: 332rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
padding: 32rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 32rpx auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
>view:first-child {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
.df;
|
||||
|
||||
>view {
|
||||
// width: 90rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
background: #EBF4FC;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
text-align: center;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #318AFE;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
>view:nth-child(2) {
|
||||
width: 662rpx;
|
||||
height: 128rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
.df;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
|
||||
>view:last-child {
|
||||
.df;
|
||||
|
||||
>button {
|
||||
width: 128rpx;
|
||||
height: 48rpx;
|
||||
background: #FFFFFF;
|
||||
// border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
}
|
||||
|
||||
>button:last-child {
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ConsumablesBottom {
|
||||
.df;
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
>view {
|
||||
width: 346rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border: 2rpx solid #318AFE;
|
||||
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
>view:first-child {
|
||||
border-radius: 56rpx 0rpx 0rpx 56rpx;
|
||||
color: #318AFE;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
border-radius: 0 56rpx 56rpx 0;
|
||||
background-color: #318AFE;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
padding: 15px;
|
||||
background-color: #fff;
|
||||
margin: 0 auto;
|
||||
|
||||
>view {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
width: 660rpx;
|
||||
border-top: 10rpx solid #f9f9f9;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.operate {
|
||||
>view {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
width: 660rpx;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.zhezhaopop {
|
||||
padding: 34rpx 32rpx;
|
||||
width: 594rpx;
|
||||
|
||||
>view:first-child {
|
||||
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
|
||||
>span:nth-child(2) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
212
pageConsumables/inventoryCheck.vue
Normal file
212
pageConsumables/inventoryCheck.vue
Normal file
@@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<view class="warehouseEntry">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
账存数量
|
||||
</view>
|
||||
<view>
|
||||
{{datas.item.balance}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
实际数量
|
||||
</view>
|
||||
<view>
|
||||
<input type="number" v-model="datas.form.balance" placeholder="输入数量" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
单价
|
||||
</view>
|
||||
<view>
|
||||
{{datas.item.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
盈亏数量
|
||||
</view>
|
||||
<view>
|
||||
{{profitNumber}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
总盈亏
|
||||
</view>
|
||||
<view>
|
||||
{{profitPrice}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="toggle" :plain="true"
|
||||
text="保存"></up-button>
|
||||
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
||||
text="取消"></up-button> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import color from '@/commons/color.js';
|
||||
import {
|
||||
tbConsInfotbConCheck
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let showStatus = ref(false)
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: ''
|
||||
}
|
||||
})
|
||||
let datas = reactive({
|
||||
item: "",
|
||||
form: {}
|
||||
})
|
||||
onMounted(() => {
|
||||
datas.item = JSON.parse(props.item)
|
||||
datas.form = {
|
||||
...datas.item
|
||||
}
|
||||
})
|
||||
let profitPrice = computed(() => {
|
||||
// 如果剩余数量为负数
|
||||
if (datas.form.balance == '-') {
|
||||
return (0 - datas.item.balance) * datas.item.price
|
||||
} else {
|
||||
return ((datas.form.balance - datas.item.balance) * datas.item.price).toFixed(2);
|
||||
}
|
||||
})
|
||||
let profitNumber = computed(() => {
|
||||
// 盈亏数量
|
||||
if (datas.form.balance == '-') {
|
||||
return 0 - datas.item.balance
|
||||
} else {
|
||||
return datas.form.balance - datas.item.balance
|
||||
}
|
||||
})
|
||||
|
||||
function toggle() {
|
||||
if(!datas.form.balance){
|
||||
return
|
||||
}
|
||||
tbConsInfotbConCheck({
|
||||
stockNumber: datas.form.balance,
|
||||
conInfoId: datas.form.id,
|
||||
lpNum: profitNumber._value
|
||||
}).then(res => {
|
||||
// go.to('PAGES_SALES_CONSUMABLES')
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 保留小数n位,不进行四舍五入
|
||||
* num你传递过来的数字,
|
||||
* decimal你保留的几位,默认保留小数后两位
|
||||
* isInt 是否保留0
|
||||
*/
|
||||
function formatDecimal(num = 0, decimal = 2, isInt = false) {
|
||||
num = num.toFixed(3).toString();
|
||||
const index = num.indexOf(".");
|
||||
if (index !== -1) {
|
||||
num = num.substring(0, decimal + index + 1);
|
||||
} else {
|
||||
num = num.substring(0);
|
||||
}
|
||||
//截取后保留两位小数
|
||||
if (isInt) {
|
||||
return parseFloat(num);
|
||||
} else {
|
||||
return parseFloat(num).toFixed(decimal);
|
||||
}
|
||||
}
|
||||
|
||||
function showStatusToggle() {
|
||||
showStatus.value = !showStatus.value
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.warehouseEntry {
|
||||
width: 694rpx;
|
||||
height: 650rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin: 32rpx;
|
||||
padding: 1rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
>view {
|
||||
width: 646rpx;
|
||||
height: 84rpx;
|
||||
background: #fcfcfc;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
margin-top: 32rpx;
|
||||
.df;
|
||||
|
||||
>view:first-child {
|
||||
width: 190rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// text-align: left;
|
||||
padding-left: 24rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
291
pageConsumables/outbound.vue
Normal file
291
pageConsumables/outbound.vue
Normal file
@@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<view class="warehouseEntry">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
耗材名称
|
||||
</view>
|
||||
<view>
|
||||
{{datas.item.conName}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
现有库存
|
||||
</view>
|
||||
<view>
|
||||
{{datas.item.stockNumber-datas.item.stockConsume}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text>出库数量
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text>单价
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view style="justify-content: space-between;">
|
||||
<view>
|
||||
单位
|
||||
</view>
|
||||
<picker @change="changeNowStatusIndexs" :range="datas.unitList">
|
||||
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">
|
||||
{{datas.form.list.unit}}
|
||||
</view>
|
||||
</picker>
|
||||
<!-- defaultUnit -->
|
||||
<uni-icons type="bottom" size="16"></uni-icons>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
应付金额
|
||||
</view>
|
||||
<view>
|
||||
{{datas.form.list.stockNumber*datas.form.list.price|0}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
实付金额
|
||||
</view>
|
||||
<view>
|
||||
<input placeholder="请输入现有库存" type="text" v-model="datas.form.actualPayment" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <li>
|
||||
<view>
|
||||
总价值
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入总价值(元)" name="" id="">
|
||||
</view>
|
||||
</li> -->
|
||||
<view style="justify-content: space-between;align-items: center;">
|
||||
<view>
|
||||
供应商
|
||||
</view>
|
||||
<picker @change="changeNowStatusIndex" :value="nowStatusIndex" :range="datas.status">
|
||||
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">{{datas.status[nowStatusIndex]}}</view>
|
||||
</picker>
|
||||
<uni-icons type="bottom" size="16"></uni-icons>
|
||||
<view style="color: #318AFE;width: 80rpx;text-align: center;" @tap="toggle">
|
||||
新增
|
||||
</view>
|
||||
<!-- <up-button type="text" style="color: #318AFE;" @tap="toggle" :plain="true"
|
||||
text="新增"></up-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide">
|
||||
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in datas.status" :key="index">
|
||||
<view :class="{'color-main':nowStatusIndex===index}">{{item}}</view>
|
||||
<uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
</view>
|
||||
<view :style="{height: '14px'}"></view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||
text="保存"></up-button>
|
||||
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
||||
text="取消"></up-button> -->
|
||||
</view>
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
reactive,
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow,
|
||||
} from '@dcloudio/uni-app';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
tbConsInfostockInOut,
|
||||
tbConsInfoList,
|
||||
tbShopPurveyor
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let showStatus = ref(false)
|
||||
const refs = getCurrentInstance()
|
||||
let datas = reactive({
|
||||
// 供应商列表
|
||||
list: [],
|
||||
// 供应商渲染数组
|
||||
status: [],
|
||||
unitList:[],
|
||||
form: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
type: "out",
|
||||
list: {},
|
||||
actualPayment: 0
|
||||
},
|
||||
item: ""
|
||||
})
|
||||
const props = defineProps({
|
||||
consId: {
|
||||
type: String
|
||||
},
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
datas.item = JSON.parse(props.item)
|
||||
datas.form = Object.assign(datas.form, datas.item)
|
||||
// 单位列表
|
||||
datas.unitList = [ datas.form.conUnit,datas.form.conUnitTwo]
|
||||
datas.form.list.unit=datas.form.defaultUnit
|
||||
})
|
||||
onShow(() => {
|
||||
getList()
|
||||
})
|
||||
function toggle() {
|
||||
go.to('PAGES_ADD_SUPPLIER')
|
||||
}
|
||||
|
||||
function getList() {
|
||||
tbShopPurveyor({
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
page: 0,
|
||||
size: 100,
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
res.content.forEach(ele => {
|
||||
datas.status.push(ele.purveyorName)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function showStatusToggle() {
|
||||
showStatus.value = !showStatus.value
|
||||
}
|
||||
let nowStatusIndex = ref(0)
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
nowStatusIndex.value = i.detail.value
|
||||
showStatus.value = false
|
||||
}
|
||||
function changeNowStatusIndexs(i) {
|
||||
datas.form.list.unit = datas.unitList[i.detail.value]
|
||||
}
|
||||
function sumbit() {
|
||||
|
||||
if (!datas.form.list.stockNumber) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请输入必填项",
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!datas.form.list.price) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请输入必填项",
|
||||
})
|
||||
return
|
||||
}
|
||||
datas.form.list.conInfoId = props.consId
|
||||
datas.form.list = [datas.form.list]
|
||||
|
||||
|
||||
tbConsInfostockInOut({
|
||||
...datas.form,
|
||||
// 供应商id
|
||||
supplierId: datas.list[nowStatusIndex.value].id,
|
||||
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
|
||||
}).then(res => {
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
// 获取供应商
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.status.length + 14 + 'px'
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.warehouseEntry {
|
||||
width: 694rpx;
|
||||
// height: 640rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin: 32rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
>view {
|
||||
width: 646rpx;
|
||||
height: 84rpx;
|
||||
background: #fcfcfc;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
margin-top: 32rpx;
|
||||
.df;
|
||||
|
||||
>view:first-child {
|
||||
width: 190rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// text-align: left;
|
||||
padding-left: 24rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
424
pageConsumables/paymentSettlement.vue
Normal file
424
pageConsumables/paymentSettlement.vue
Normal file
@@ -0,0 +1,424 @@
|
||||
<template>
|
||||
<view class="time-wrapper">
|
||||
<view v-for="(v, i) in timeList" :key="i" class="timelistbox">
|
||||
<view class="time-item" @tap="changeTime(v.value)" :class="{ 'time-selected':v.value==selected }">
|
||||
{{v.label}}
|
||||
</view>
|
||||
<view class="xian" v-if="v.value==selected "> </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="paymentSettlement">
|
||||
<view :style="{color:datas.activeType==0?'#318AFE':''}" @tap="switchType(0)">全部</view>
|
||||
<view :style="{color:datas.activeType==1?'#318AFE':''}" @tap="switchType(1)">进货</view>
|
||||
<view :style="{color:datas.activeType==2?'#318AFE':''}" @tap="switchType(2)">退货</view>
|
||||
<view :style="{color:datas.activeType==3?'#318AFE':''}" @tap="switchType(3)">未支付</view>
|
||||
<view :style="{color:datas.activeType==4?'#318AFE':''}" @tap="switchType(4)">已付款</view>
|
||||
</view>
|
||||
<view class="supplier">
|
||||
<view v-for="item in datas.list" :key="item.id">
|
||||
<view style="position: relative;">
|
||||
|
||||
<view>
|
||||
<view style="font-weight: 500;font-size: 28rpx;color: #333333;">
|
||||
{{item.totalAmount}}
|
||||
</view>
|
||||
<view style="font-weight: 400;font-size: 24rpx;color: #666666;">
|
||||
应付金额(元)
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="font-weight: 500;font-size: 28rpx;color: #333333;">
|
||||
{{item.paidAmount}}
|
||||
</view>
|
||||
<view style="font-weight: 400;font-size: 24rpx;color: #666666;">
|
||||
已付金额(元)
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="font-weight: 500;font-size: 28rpx;color: #F02C45;">
|
||||
{{item.waitAmount}}
|
||||
</view>
|
||||
<view style="font-weight: 400;font-size: 24rpx;color: #666666;">
|
||||
待支付金额(元)
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.status==0"
|
||||
style="position: absolute;left: 0;top: 0;width: 88rpx;line-height: 36rpx;background: #FF895C;border-radius: 8rpx 0rpx 8rpx 0rpx;font-weight: 400;font-size: 20rpx; color: #FFFFFF; ">
|
||||
待付款
|
||||
</view>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>创建日期</span>
|
||||
<span>{{dayjs(item.createdAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>类型</span>
|
||||
<span>{{typeFilter(item.type)}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>付款时间</span>
|
||||
<span>{{dayjs(item.updatedAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||
</view>
|
||||
<view>
|
||||
|
||||
<!-- <up-button shape="circle" type="primary" size="mini" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})"
|
||||
:plain="true" text="查看记录"></up-button>
|
||||
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
|
||||
|
||||
-->
|
||||
|
||||
<up-button type="primary" size="mini" shape="circle" style="background-color: #318AFE;color: #fff;" @tap="datas.PopUp=true;datas.form.id=item.id"
|
||||
:plain="true" text="付款"></up-button>
|
||||
<up-button type="primary" size="mini" shape="circle" style="width: 200rpx;" @tap="toUrl(item.id)" :plain="true" text="账单付款记录">
|
||||
</up-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 取号遮罩层 -->
|
||||
<up-popup :show="datas.PopUp" :round="18" mode="center" @close="close">
|
||||
<view class="zhezhaopops">
|
||||
<view class="">
|
||||
<span></span>
|
||||
<span>付款</span>
|
||||
<up-icon @tap="datas.PopUp=false" name="close-circle-fill"></up-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
付款金额<input type="text" placeholder="请输入付款金额" v-model="datas.form.paidAmount" />
|
||||
</view>
|
||||
<view class="">
|
||||
付款方式<input type="text" placeholder="请输入付款方式" v-model="datas.form.payType" />
|
||||
</view>
|
||||
<view class="">
|
||||
备注<input type="text" v-model="datas.form.remark" />
|
||||
</view>
|
||||
<up-button text="确认" @tap="confirmtow()" type="primary" class="buttomStyle"
|
||||
shape="circle"></up-button>
|
||||
</view>
|
||||
</up-popup>
|
||||
|
||||
|
||||
|
||||
|
||||
<datePickerview @confirm="datePickerConfirm" ref="datePicker"></datePickerview>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
getCurrentInstance,
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import {
|
||||
tbShopPurveyorTransactinfo,
|
||||
tbShopPurveyorpayTransact
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import datePickerview from './components/my-date-pickerview.vue'
|
||||
const timeList = [{
|
||||
label: '今天',
|
||||
value: 'today'
|
||||
},
|
||||
{
|
||||
label: '昨天',
|
||||
value: 'yesterday'
|
||||
},
|
||||
{
|
||||
label: '本周',
|
||||
value: 'circumference'
|
||||
}, {
|
||||
label: '本月',
|
||||
value: 'moon'
|
||||
},
|
||||
{
|
||||
label: '自定义',
|
||||
value: 'custom'
|
||||
}
|
||||
]
|
||||
let selected = ref('today')
|
||||
let datas = reactive({
|
||||
activeType: 0,
|
||||
list: [],
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
type: "",
|
||||
status: "",
|
||||
PopUp: false,
|
||||
form: {}
|
||||
})
|
||||
const currentInstance = getCurrentInstance()
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: Number
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
getlist()
|
||||
})
|
||||
let confirmtow = (id) => {
|
||||
tbShopPurveyorpayTransact({
|
||||
id,
|
||||
...datas.form
|
||||
}).then(() => {
|
||||
datas.PopUp = false
|
||||
getlist()
|
||||
})
|
||||
}
|
||||
let close = () => {
|
||||
datas.form = {}
|
||||
}
|
||||
let typeFilter = (t) => {
|
||||
const m = {
|
||||
purveyor: '进货单',
|
||||
reject: '退货单',
|
||||
cons_in: '耗材入库',
|
||||
cons_out: '耗材出库'
|
||||
}
|
||||
return m[t]
|
||||
}
|
||||
|
||||
function toUrl(id) {
|
||||
go.to('PAGES_BILL_PAYMENT', {
|
||||
id
|
||||
})
|
||||
}
|
||||
let switchType = (a) => {
|
||||
datas.activeType = a
|
||||
if (a == 0) {
|
||||
datas.type = ''
|
||||
datas.status = ''
|
||||
} else if (a == 1) {
|
||||
datas.type = 'purveyor'
|
||||
datas.status = ''
|
||||
} else if (a == 2) {
|
||||
datas.type = 'reject'
|
||||
datas.status = ''
|
||||
} else if (a == 3) {
|
||||
datas.type = ''
|
||||
datas.status = '0'
|
||||
} else if (a == 4) {
|
||||
datas.type = ''
|
||||
datas.status = '1'
|
||||
}
|
||||
getlist()
|
||||
}
|
||||
|
||||
function datePickerConfirm(e) {
|
||||
getlist(e.start, e.end)
|
||||
}
|
||||
|
||||
function getlist(start, end) {
|
||||
if (selected.value == 'today') {
|
||||
datas.startTime = dayjs().format('YYYY-MM-DD') + ' 00:00:00'
|
||||
datas.endTime = dayjs().format('YYYY-MM-DD') + ' 23:59:59'
|
||||
} else if (selected.value == 'yesterday') {
|
||||
datas.startTime = formatTime() + ' 00:00:00'
|
||||
datas.endTime = formatTime() + ' 23:59:59'
|
||||
} else if (selected.value == 'circumference') {
|
||||
datas.startTime = dayjs().add(-7, 'day').format('YYYY-MM-DD 00:00:00')
|
||||
datas.endTime = dayjs().format('YYYY-MM-DD 23:59:59')
|
||||
} else if (selected.value == 'moon') {
|
||||
datas.startTime = dayjs().add(-30, 'day').format('YYYY-MM-DD 00:00:00')
|
||||
datas.endTime = dayjs().format('YYYY-MM-DD 23:59:59')
|
||||
} else if (selected.value == 'custom') {
|
||||
datas.startTime = start
|
||||
datas.endTime = end
|
||||
}
|
||||
tbShopPurveyorTransactinfo({
|
||||
// shopId: uni.getStorageSync('shopId'),
|
||||
size: 20,
|
||||
createAt: [datas.startTime, datas.endTime],
|
||||
page: 0,
|
||||
sort: "id",
|
||||
type: datas.type,
|
||||
status: datas.status,
|
||||
purveyorId: props.id
|
||||
}).then((res) => {
|
||||
datas.list = res.content
|
||||
})
|
||||
}
|
||||
// 获取当前时间
|
||||
function getdate() {
|
||||
const dt = new Date();
|
||||
const y = dt.getFullYear();
|
||||
const m = (dt.getMonth() + 1 + "").padStart(2, "0");
|
||||
const d = (dt.getDate() + "").padStart(2, "0");
|
||||
const hh = (dt.getHours() + "").padStart(2, "0");
|
||||
const mm = (dt.getMinutes() + "").padStart(2, "0");
|
||||
const ss = (dt.getSeconds() + "").padStart(2, "0");
|
||||
return `${y}-${m}-${d}`;
|
||||
}
|
||||
// 获取昨天时间
|
||||
const formatTime = () => {
|
||||
let strDate = getdate()
|
||||
let dateFormat = new Date(strDate);
|
||||
dateFormat = dateFormat.setDate(dateFormat.getDate() - 1);
|
||||
dateFormat = new Date(dateFormat);
|
||||
let y = dateFormat.getFullYear()
|
||||
let m = (dateFormat.getMonth() + 1).toString().padStart(2, '0')
|
||||
let d = dateFormat.getDate().toString().padStart(2, '0')
|
||||
return `${y}-${m}-${d}`
|
||||
}
|
||||
|
||||
function changeTime(e) {
|
||||
selected.value = e
|
||||
if (e == 'custom') {
|
||||
currentInstance.ctx.$refs.datePicker.toggle()
|
||||
} else {
|
||||
getlist()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.time-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
background-color: #fff;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.timelistbox {
|
||||
position: relative;
|
||||
|
||||
.time-item {
|
||||
width: 90rpx;
|
||||
text-align: center;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.xian {
|
||||
width: 40rpx;
|
||||
height: 3rpx;
|
||||
background-color: #459DFF;
|
||||
position: absolute;
|
||||
left: 26rpx;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.time-selected {
|
||||
color: #459DFF;
|
||||
}
|
||||
}
|
||||
|
||||
.supplier {
|
||||
>view {
|
||||
width: 694rpx;
|
||||
height: 550rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 32rpx;
|
||||
|
||||
|
||||
>view:nth-child(1) {
|
||||
width: 646rpx;
|
||||
height: 160rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
>view:nth-child(2),
|
||||
>view:nth-child(3),
|
||||
>view:nth-child(4) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
>view:nth-child(5) {
|
||||
border-top: 2rpx solid #E5E5E5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
margin-top: 32rpx;
|
||||
padding-top: 22rpx;
|
||||
|
||||
>button {
|
||||
width: 112rpx;
|
||||
height: 48rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #3189FD;
|
||||
margin: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.zhezhaopops {
|
||||
padding: 34rpx 32rpx;
|
||||
width: 594rpx;
|
||||
height: 900rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
>view:first-child {
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
|
||||
>span:nth-child(2) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
>view:nth-child(2),
|
||||
>view:nth-child(3),
|
||||
>view:nth-child(4) {
|
||||
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-top: 64rpx;
|
||||
|
||||
>input {
|
||||
margin-top: 24rpx;
|
||||
width: 492rpx;
|
||||
height: 84rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.buttomStyle {
|
||||
margin-top: 48rpx;
|
||||
width: 506rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.paymentSettlement {
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
BIN
pageConsumables/profile.png
Normal file
BIN
pageConsumables/profile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
199
pageConsumables/supplier.vue
Normal file
199
pageConsumables/supplier.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<view class="supplier">
|
||||
<template v-if="datas.list.length>0">
|
||||
<view v-for="item in datas.list" :key="item.id">
|
||||
<view class="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<image src="./profile.png" style="width: 64rpx;height: 64rpx;" mode=""></image>
|
||||
<view style="margin-left: 16rpx;">
|
||||
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||
{{item.purveyorName}}
|
||||
</view>
|
||||
<text style="color: #999;">{{item.purveyorTelephone}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<text style="font-size: 28rpx;font-weight: 400;" :style="{color:item.type==0?'#FD7B49':''}">
|
||||
{{ item.type == 0 ? '待支付' : '已完结' }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
<view :style="{color:item.waitAmount>0?' #F02C45;':''}">
|
||||
{{item.waitAmount}}
|
||||
</view>
|
||||
<view class="">
|
||||
剩余支付金额
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="color: #318AFE;">
|
||||
{{item.waitCount}}未付
|
||||
</view>
|
||||
<view class="">
|
||||
待付款笔数
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>上次进货日期</span>
|
||||
<span v-if="item.lastTransactAt">{{dayjs(item.lastTransactAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>地址</span>
|
||||
<span>{{item.address}}</span>
|
||||
</view>
|
||||
<view class="df">
|
||||
<span>备注</span>
|
||||
<span>{{item.remark}}</span>
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button type="primary" shape="circle" size="mini"
|
||||
@tap="toUrl('PAGES_EDIT_SUPPLIER',{item:JSON.stringify(item)})" :plain="true" text="编辑">
|
||||
</up-button> <up-button size="mini" shape="circle" type="primary"
|
||||
@tap="deleteEvent(item.id)" :plain="true" text="删除">
|
||||
</up-button> <up-button size="mini" shape="circle" type="primary"
|
||||
style="background-color: #318AFE;color: #fff;"
|
||||
@tap="toUrl('PAGES_PAYMENT_SETTLEMENT',{id:item.id})" :plain="true" text="结款记录"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 200rpx;background-color: #f9f9f9;"> </view>
|
||||
</template>
|
||||
<view v-else style="text-align: center;background-color: #f9f9f9;">暂无数据</view>
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="toUrl('PAGES_ADD_SUPPLIER')"
|
||||
:plain="true" text="添加供应商"></up-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow,
|
||||
} from '@dcloudio/uni-app';
|
||||
import dayjs from 'dayjs' //时间格式库
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
tbShopPurveyorTransact,
|
||||
tbShopPurveyordelete
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let datas = reactive({
|
||||
list: []
|
||||
})
|
||||
onShow(() => {
|
||||
getList()
|
||||
})
|
||||
let deleteEvent = (id) => {
|
||||
tbShopPurveyordelete([id]).then(() => {
|
||||
getList()
|
||||
})
|
||||
}
|
||||
let toUrl = (url, d) => {
|
||||
go.to(url, d)
|
||||
}
|
||||
let getList = () => {
|
||||
tbShopPurveyorTransact({
|
||||
page: 0,
|
||||
size: 20,
|
||||
sort: 'id',
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
// ul,
|
||||
// li {
|
||||
// list-style: none;
|
||||
// padding: 0;
|
||||
// }
|
||||
|
||||
.bottombutton {
|
||||
// margin-top: 84rpx;
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 90%;
|
||||
|
||||
>button {
|
||||
// width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.supplier {
|
||||
padding: 28rpx;
|
||||
|
||||
>view {
|
||||
width: 694rpx;
|
||||
// height: 604rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 32rpx;
|
||||
|
||||
>view:first-child {
|
||||
.df;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
>view:nth-child(2) {
|
||||
width: 646rpx;
|
||||
height: 142rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
>view:nth-child(3),
|
||||
>view:nth-child(4),
|
||||
>view:nth-child(5) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
>view:nth-child(6) {
|
||||
border-top: 2rpx solid #E5E5E5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
margin-top: 32rpx;
|
||||
padding-top: 32rpx;
|
||||
|
||||
>button {
|
||||
width: 112rpx;
|
||||
height: 48rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #3189FD;
|
||||
margin: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
BIN
pageConsumables/time.png
Normal file
BIN
pageConsumables/time.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 501 B |
312
pageConsumables/viewrecords.vue
Normal file
312
pageConsumables/viewrecords.vue
Normal file
@@ -0,0 +1,312 @@
|
||||
<template>
|
||||
<!-- <view class="viewrecordsType">
|
||||
<view style="display: flex;align-items: center;" @tap="popPu">
|
||||
筛选时间<up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon>
|
||||
</view>
|
||||
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||
{{datas.statusTitle}} <up-icon style="transform: rotate(90deg);" name="play-right-fill" size="12"></up-icon>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<view style="position: fixed;right: 50rpx;top: 80vh;background-color: #fff;border-radius: 50%;width: 65rpx;height: 65rpx;display: flex;align-items: center;justify-content: center;">
|
||||
<image src="./time.png" style="width: 50rpx;height: 50rpx;" @tap="popPu"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide">
|
||||
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
|
||||
v-for="(item,index) in datas.status" :key="index">
|
||||
<view :class="{'color-main':nowStatusIndex===index}">{{item.conTypeName}}</view>
|
||||
<uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
|
||||
</view>
|
||||
<view :style="{height: '14px'}"></view>
|
||||
</view>
|
||||
<view class="viewrecordsTop">
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view @tap="getNewdata('addCountNumber')">
|
||||
增加数量 <text
|
||||
style="color: #76ACF0;font-weight: bold;">{{datas.countList.addCountNumber?datas.countList.addCountNumber:'0'}}</text>
|
||||
</view>
|
||||
<view class="df viewdf">
|
||||
<view @tap="getNewdata('stockInNumber')"
|
||||
style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
入库
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.stockInNumber?datas.countList.stockInNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="getNewdata('addNumber')" style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
手动增加
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.addNumber?datas.countList.addNumber:'0'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view class="" @tap="getNewdata('subCountNumber')">
|
||||
减少数量 <text
|
||||
style="color: #52BDA4;font-weight: bold;">{{datas.countList.subCountNumber?datas.countList.subCountNumber:0}}</text>
|
||||
</view>
|
||||
<view class="df viewdf">
|
||||
<view @tap="getNewdata('subNumber')"
|
||||
style="font-size: 24rpx;border-right: 1px solid #999; width: 112rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
手动减少
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.subNumber?datas.countList.subNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="getNewdata('stockOutNumber')"
|
||||
style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
出库
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.stockOutNumber?datas.countList.stockOutNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="getNewdata('saleNumber')" style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
||||
<view style="color: #999999;">
|
||||
商品消耗
|
||||
</view>
|
||||
<view class="">
|
||||
{{datas.countList.saleNumber?datas.countList.saleNumber:0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="viewrecords">
|
||||
<view v-for="item in datas.list" :key="item.id">
|
||||
<view class="">
|
||||
<view class="">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
<view class="">
|
||||
{{item.operator}} {{item.bizName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
库存 {{ inventory(item.balance,item.bizType,item.amount)}} <text
|
||||
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> → {{ item.amount|0 }}</text>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
剩余库存 {{item.balance}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view :style="{color:item.bizType=='+'?'#1bca72':'red'}" style="font-weight: 400;">
|
||||
{{ item.bizType }}{{ item.amount|0 }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
变动库存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<datePickerview @confirm="datePickerConfirm" ref="datePicker"></datePickerview>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
reactive,
|
||||
ref,
|
||||
computed,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import datePickerview from './components/my-date-pickerview.vue'
|
||||
import color from '@/commons/color.js';
|
||||
import {
|
||||
tbConsInfoFlowstock,
|
||||
tbConsInfoFlowcount,
|
||||
tbConsTypes
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let props = defineProps({
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
countList: null,
|
||||
// 类型
|
||||
status: [],
|
||||
statusTitle: "类型"
|
||||
})
|
||||
let showStatus = ref(false)
|
||||
onMounted(() => {
|
||||
let items = JSON.parse(props.item)
|
||||
getlist()
|
||||
})
|
||||
const refs = getCurrentInstance()
|
||||
let popPu = () => {
|
||||
refs.ctx.$refs.datePicker.toggle()
|
||||
}
|
||||
|
||||
function datePickerConfirm(e) {
|
||||
getlist("", e.start, e.end)
|
||||
}
|
||||
|
||||
function inventory(a, b, c) {
|
||||
let data = 0
|
||||
if (b == '-') {
|
||||
data = a + c
|
||||
} else {
|
||||
data = a - c
|
||||
}
|
||||
return data
|
||||
}
|
||||
let nowStatusIndex = ref(0)
|
||||
let columnName = ref('')
|
||||
let getNewdata = (d) => {
|
||||
columnName.value = d
|
||||
getlist()
|
||||
}
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
nowStatusIndex.value = i
|
||||
showStatus.value = false
|
||||
datas.statusTitle = datas.status[i].conTypeName
|
||||
getlist(datas.status[i].id)
|
||||
}
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.status.length + 14 + 'px'
|
||||
})
|
||||
let getlist = (conTypeId = "", start, end, ) => {
|
||||
let ids = JSON.parse(props.item)
|
||||
// 列表
|
||||
tbConsInfoFlowstock({
|
||||
page: 0,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
size: 30,
|
||||
consId: ids.id,
|
||||
column: columnName.value,
|
||||
conTypeId,
|
||||
|
||||
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
})
|
||||
// 顶部数据
|
||||
tbConsInfoFlowcount({
|
||||
page: 0,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
size: 30,
|
||||
sort: "createTime,desc",
|
||||
conTypeId,
|
||||
startTime: start,
|
||||
endTime: end,
|
||||
consId: JSON.parse(props.item).id,
|
||||
}).then(res => {
|
||||
datas.countList = res
|
||||
})
|
||||
|
||||
// 获取顶部类型/
|
||||
tbConsTypes({
|
||||
page: 0,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
size: 100,
|
||||
}).then(res => {
|
||||
datas.status = res.content
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.viewrecordsType {
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.viewrecordsTop {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// justify-content: space-between;
|
||||
margin-top: 32rpx;
|
||||
margin-left: 32rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
|
||||
.viewdf {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
>view {
|
||||
background-color: #fff;
|
||||
width: 336rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
margin-left: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.viewrecords {
|
||||
padding: 0 28rpx;
|
||||
|
||||
>view {
|
||||
margin-top: 32rpx;
|
||||
width: 694rpx;
|
||||
height: 284rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
padding: 32rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view:first-child {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
>view:last-child {
|
||||
width: 622rpx;
|
||||
height: 156rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
margin: 24rpx 16rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.df {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
309
pageConsumables/warehouseEntry.vue
Normal file
309
pageConsumables/warehouseEntry.vue
Normal file
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<view class="warehouseEntry">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
耗材名称
|
||||
</view>
|
||||
<view>
|
||||
{{datas.item.conName}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
现有库存
|
||||
</view>
|
||||
<view>
|
||||
{{datas.item.stockNumber-datas.item.stockConsume}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text> 入库数量
|
||||
</view>
|
||||
<view>
|
||||
<input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text style="color: red;">*</text>单价
|
||||
</view>
|
||||
<view>
|
||||
<input type="number" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view style="justify-content: space-between;">
|
||||
<view>
|
||||
单位
|
||||
</view>
|
||||
<picker @change="changeNowStatusIndexs" :range="datas.unitList">
|
||||
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">
|
||||
{{datas.form.list.unit}}
|
||||
</view>
|
||||
</picker>
|
||||
<!-- defaultUnit -->
|
||||
<uni-icons type="bottom" size="16"></uni-icons>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
应付金额
|
||||
</view>
|
||||
<view>
|
||||
{{datas.form.list.stockNumber*datas.form.list.price|0}}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
实付金额
|
||||
</view>
|
||||
<view>
|
||||
<input placeholder="请输入现有库存" type="text" v-model="datas.form.actualPayment" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view>
|
||||
<view>
|
||||
总价值
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入总价值(元)" name="" id="">
|
||||
</view>
|
||||
</view> -->
|
||||
<view style="justify-content: space-between;align-items: center;">
|
||||
<view>
|
||||
供应商
|
||||
</view>
|
||||
<picker @change="changeNowStatusIndex" :value="nowStatusIndex" :range="datas.status">
|
||||
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">{{datas.status[nowStatusIndex]}}
|
||||
</view>
|
||||
</picker>
|
||||
<uni-icons type="bottom" size="16"></uni-icons>
|
||||
<view style="color: #318AFE;width: 80rpx;text-align: center;" @tap="toggle">
|
||||
新增
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view class="bottombutton">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;width: 100%!important;" @tap="sumbit"
|
||||
:plain="true" text="保存"></up-button>
|
||||
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
||||
text="取消"></up-button> -->
|
||||
</view>
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
reactive,
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import {
|
||||
onShow,
|
||||
} from '@dcloudio/uni-app';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
tbConsInfostockInOut,
|
||||
tbConsInfoList,
|
||||
tbShopPurveyor
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
let showStatus = ref(false)
|
||||
let datas = reactive({
|
||||
// 供应商列表
|
||||
list: [],
|
||||
// 供应商渲染数组
|
||||
status: [],
|
||||
// 单位列表
|
||||
unitList: [],
|
||||
form: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
type: "in",
|
||||
list: {},
|
||||
actualPayment: 0
|
||||
},
|
||||
item: ""
|
||||
})
|
||||
const props = defineProps({
|
||||
consId: {
|
||||
type: String
|
||||
},
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
datas.item = JSON.parse(props.item)
|
||||
datas.form = Object.assign(datas.form, datas.item)
|
||||
// 单位列表
|
||||
datas.unitList = [ datas.form.conUnit,datas.form.conUnitTwo]
|
||||
datas.form.list.unit=datas.form.defaultUnit
|
||||
})
|
||||
onShow(() => {
|
||||
getList()
|
||||
})
|
||||
const refs = getCurrentInstance()
|
||||
|
||||
function toggle() {
|
||||
go.to('PAGES_ADD_SUPPLIER')
|
||||
}
|
||||
|
||||
function getList() {
|
||||
tbShopPurveyor({
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
page: 0,
|
||||
size: 100,
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
res.content.forEach(ele => {
|
||||
datas.status.push(ele.purveyorName)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function showStatusToggle() {
|
||||
showStatus.value = !showStatus.value
|
||||
}
|
||||
let nowStatusIndex = ref(0)
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
nowStatusIndex.value = i.detail.value
|
||||
showStatus.value = false
|
||||
}
|
||||
|
||||
function changeNowStatusIndexs(i) {
|
||||
datas.form.list.unit = datas.unitList[i.detail.value]
|
||||
}
|
||||
|
||||
function sumbit() {
|
||||
if (!datas.form.list.stockNumber) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请输入必填项",
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!datas.form.list.price) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请输入必填项",
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!datas.list[nowStatusIndex.value]) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "供应商不能为空",
|
||||
})
|
||||
return
|
||||
}
|
||||
datas.form.list.conInfoId = datas.item.id
|
||||
datas.form.list = [datas.form.list]
|
||||
tbConsInfostockInOut({
|
||||
...datas.form,
|
||||
// 供应商id
|
||||
supplierId: datas.list[nowStatusIndex.value].id,
|
||||
accountsPayable: datas.form.list[0].stockNumber * datas.form.list[0].price,
|
||||
}).then(res => {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "保存成功",
|
||||
})
|
||||
setTimeout(() => {
|
||||
go.back()
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
// 获取供应商
|
||||
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.status.length + 14 + 'px'
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
/* .u-button {
|
||||
width: 64rpx!important;
|
||||
} */
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.status {
|
||||
margin: 0 32rpx;
|
||||
position: absolute;
|
||||
// top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.warehouseEntry {
|
||||
width: 694rpx;
|
||||
// height: 640rpx;
|
||||
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin: 32rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
>view {
|
||||
>view {
|
||||
width: 646rpx;
|
||||
height: 84rpx;
|
||||
background: #fcfcfc;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
margin-top: 32rpx;
|
||||
.df;
|
||||
|
||||
>view:first-child {
|
||||
width: 190rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
// text-align: left;
|
||||
padding-left: 24rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 8rpx 0rpx 0rpx 8rpx;
|
||||
border: 2rpx solid #F9F9F9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottombutton {
|
||||
margin-top: 84rpx;
|
||||
padding: 0 24rpx;
|
||||
|
||||
>button {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user