耗材样式

This commit is contained in:
duan 2024-11-01 11:36:33 +08:00
parent 7605773087
commit 88d2816946
7 changed files with 111 additions and 89 deletions

View File

@ -109,7 +109,8 @@
}
const refs = getCurrentInstance()
let sumbit = () => {
if (!datas.form.conUnit) {
let conUnitdata = datas.form.conUnit.replace(/(^\s*)|(\s*$)/g, "")
if (!conUnitdata) {
refs.ctx.$refs.uToastRef.show({
type: 'default',
message: "单位不能为空"
@ -147,11 +148,8 @@
page {
background-color: #f9f9f9;
}
</style>
<style scoped lang="less">
.topTitle {
font-weight: 400;
font-size: 32rpx;
@ -198,6 +196,7 @@
.bottombutton {
margin-top: 84rpx;
padding: 0 24rpx;
>button {
width: 530rpx;
height: 80rpx;

View File

@ -3,7 +3,7 @@
<view>
<view>
<view>
供应商
<text style="color: red;">*</text> 供应商
</view>
<view>
<input type="text" placeholder="请输入供应商名称" v-model="datas.form.purveyorName" name="" id="">
@ -11,7 +11,7 @@
</view>
<view>
<view>
联系电话
<text style="color: red;">*</text> 联系电话
</view>
<view>
<input type="text" placeholder="请输入联系电话" v-model="datas.form.purveyorTelephone" name="" id="">
@ -19,7 +19,7 @@
</view>
<view>
<view>
地址
<text style="color: red;">*</text> 地址
</view>
<view>
<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
@ -39,6 +39,8 @@
<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>
@ -47,7 +49,8 @@
ref,
computed,
reactive,
onMounted
onMounted,
getCurrentInstance
} from 'vue';
import color from '@/commons/color.js';
import go from '@/commons/utils/go.js';
@ -59,10 +62,17 @@
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 => {
go.to('PAGES_SUPPLIER')
go.back()
})
}
</script>

View File

@ -192,6 +192,7 @@
show.value = false;
vdata.imgUrlList = [];
vdata.stockNumber = 1;
emits('affirm','')
})
}

View File

@ -46,12 +46,14 @@
</view>
<view>
<view class="">
所属商品: {{ filtersSproductId(item.productId)}}
所属商品: {{ 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>&nbsp;&nbsp;
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
<up-button shape="circle" type="primary" size="mini" color="#999"
@tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})" :plain="true"
text="查看记录"></up-button>&nbsp;&nbsp;
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true"
text="更多操作"></up-button>
</view>
</view>
</view>
@ -162,7 +164,9 @@
* 报损确认
*/
function affirm() {
console.log(2)
getList()
//
gettbConsTypeList()
}
let toggle = (d) => {
@ -238,13 +242,14 @@
function filtersSproductId(d) {
if (!d) return ''
const dataArr = d.split(',')
// const dataArr = d.split(',')
let str = ''
dataArr.forEach(ele => {
const startIndex = ele.indexOf('_')
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 = productName + ',' + str
// const productName = ele.slice(startIndex + 1, ele.length)
str = ele.name + ',' + str
})
return str
@ -257,10 +262,8 @@
page {
background-color: #f9f9f9;
}
</style>
<style scoped lang="less">
ul,
li {
list-style: none;

View File

@ -82,16 +82,19 @@
})
let profitPrice = computed(() => {
//
// if (datas.item.balance < 0) {
// let a = datas.item.balance * -1
// return formatDecimal((a - datas.form.balance) * datas.item.price)
// } else {
if (datas.form.balance == '-') {
return (0 - datas.item.balance) * datas.item.price
} else {
return (datas.form.balance - datas.item.balance) * datas.item.price
// }
}
})
let profitNumber = computed(() => {
//
if (datas.form.balance == '-') {
return 0 - datas.item.balance
} else {
return datas.form.balance - datas.item.balance
}
})
function toggle() {
@ -136,8 +139,6 @@
}
</style>
<style scoped lang="less">
.df() {
display: flex;
align-items: center;
@ -198,6 +199,7 @@
.bottombutton {
margin-top: 84rpx;
padding: 0 24rpx;
>button {
width: 530rpx;
height: 80rpx;

View File

@ -1,5 +1,6 @@
<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;">
@ -37,7 +38,7 @@
</view>
<view class="df">
<span>上次进货日期</span>
<span>{{dayjs(item.lastTransactAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
<span v-if="item.lastTransactAt">{{dayjs(item.lastTransactAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
</view>
<view class="df">
<span>地址</span>
@ -50,13 +51,16 @@
<view class="">
<up-button type="primary" shape="circle" size="mini"
@tap="toUrl('PAGES_EDIT_SUPPLIER',{item:JSON.stringify(item)})" :plain="true" text="编辑">
</up-button>&nbsp;&nbsp;&nbsp;&nbsp;<up-button size="mini" shape="circle" type="primary" @tap="deleteEvent(item.id)"
:plain="true" text="删除">
</up-button>&nbsp;&nbsp;&nbsp;&nbsp;<up-button size="mini" shape="circle" type="primary"
@tap="deleteEvent(item.id)" :plain="true" text="删除">
</up-button>&nbsp;&nbsp;&nbsp;&nbsp;<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;"> </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')"
@ -69,6 +73,9 @@
onMounted,
reactive
} from 'vue';
import {
onShow,
} from '@dcloudio/uni-app';
import dayjs from 'dayjs' //
import go from '@/commons/utils/go.js';
import {
@ -78,7 +85,7 @@
let datas = reactive({
list: []
})
onMounted(() => {
onShow(() => {
getList()
})
let deleteEvent = (id) => {

View File

@ -20,7 +20,7 @@
<view style="padding:32rpx 16rpx;">
<view @tap="getNewdata('addCountNumber')">
增加数量 <text
style="color: #76ACF0;font-weight: bold;">{{datas.countList?datas.countList.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')"
@ -29,7 +29,7 @@
入库
</view>
<view class="">
{{datas.countList?datas.countList.stockInNumber:''}}
{{datas.countList.stockInNumber?datas.countList.stockInNumber:0}}
</view>
</view>
<view @tap="getNewdata('addNumber')" style="font-size: 24rpx;width: 178rpx;text-align: center;">
@ -37,7 +37,7 @@
手动增加
</view>
<view class="">
{{datas.countList?datas.countList.addNumber:''}}
{{datas.countList.addNumber?datas.countList.addNumber:'0'}}
</view>
</view>
</view>
@ -45,7 +45,7 @@
<view style="padding:32rpx 16rpx;">
<view class="" @tap="getNewdata('subCountNumber')">
减少数量 <text
style="color: #52BDA4;font-weight: bold;">{{datas.countList?datas.countList.subCountNumber:0}}</text>
style="color: #52BDA4;font-weight: bold;">{{datas.countList.subCountNumber?datas.countList.subCountNumber:0}}</text>
</view>
<view class="df viewdf">
<view @tap="getNewdata('subNumber')"
@ -54,7 +54,7 @@
手动减少
</view>
<view class="">
{{datas.countList?datas.countList.subNumber:0}}
{{datas.countList.subNumber?datas.countList.subNumber:0}}
</view>
</view>
<view @tap="getNewdata('stockOutNumber')"
@ -63,7 +63,7 @@
出库
</view>
<view class="">
{{datas.countList?datas.countList.stockOutNumber:0}}
{{datas.countList.stockOutNumber?datas.countList.stockOutNumber:0}}
</view>
</view>
<view @tap="getNewdata('saleNumber')" style="font-size: 24rpx;width: 112rpx;text-align: center;">
@ -71,7 +71,7 @@
商品消耗
</view>
<view class="">
{{datas.countList?datas.countList.saleNumber:0}}
{{datas.countList.saleNumber?datas.countList.saleNumber:0}}
</view>
</view>
</view>
@ -91,7 +91,7 @@
<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>
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> {{ item.amount|0 }}</text>
</view>
<view style="font-size: 24rpx;color: #666666;">
剩余库存 {{item.balance}}