耗材样式
This commit is contained in:
parent
7605773087
commit
88d2816946
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@
|
|||
show.value = false;
|
||||
vdata.imgUrlList = [];
|
||||
vdata.stockNumber = 1;
|
||||
emits('affirm','')
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<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>
|
||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||
</view>
|
||||
<view>
|
||||
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
||||
|
|
@ -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>
|
||||
<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>
|
||||
<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) => {
|
||||
|
|
@ -232,19 +236,20 @@
|
|||
}
|
||||
|
||||
function inputEvent(d) {
|
||||
datas.conName = d.detail.value.replace(/\s*/g,"");
|
||||
datas.conName = d.detail.value.replace(/\s*/g, "");
|
||||
getList()
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
return (datas.form.balance - datas.item.balance ) * datas.item.price
|
||||
// }
|
||||
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(() => {
|
||||
// 盈亏数量
|
||||
return datas.form.balance- datas.item.balance
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -1,62 +1,66 @@
|
|||
<template>
|
||||
<view class="supplier">
|
||||
<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}}
|
||||
<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>
|
||||
<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>
|
||||
<text style="font-size: 28rpx;font-weight: 400;" :style="{color:item.type==0?'#FD7B49':''}">
|
||||
{{ item.type == 0 ? '待支付' : '已完结' }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="color: #318AFE;">
|
||||
{{item.waitCount}}未付
|
||||
<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 class="df">
|
||||
<span>上次进货日期</span>
|
||||
<span>{{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;"> </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) => {
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue