This commit is contained in:
wangweidong 2026-04-07 17:20:04 +08:00
parent 4d12444a94
commit c35dfa59e7
5 changed files with 56 additions and 608 deletions

View File

@ -417,20 +417,6 @@
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/supplierindex/material",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/supplierindex/mtdetails",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/oldmanindex/paybill",
"style" :

View File

@ -1,302 +0,0 @@
<template>
<view>
<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
<view class="left-father" @click="uni.navigateBack()">
<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
<view style="font-size: 30rpx;">物料信息</view>
</view>
</view>
<view :style="{height:`${uni.getStorageSync('moveHeight') + 40}px`}"></view>
<view class="scr"></view>
<view class="scr" :style="{top:`${uni.getStorageSync('moveHeight')+40}px`}" style="position: fixed; left: 0;">
<view class="serch">
<image class="bacimg" src="https://www.focusnu.com/media/directive/index/search.png" />
<input type="text" v-model="value" @confirm="sousuo" placeholder="请输入物料名称"/>
<view class="right-img" v-if="value" @click="value='';sousuo()">
<image src="https://www.focusnu.com/media/directive/index/x.png" />
</view>
</view>
</view>
<view class="box" v-for="(v,i) in list" :key='i' :class="act==i?'act':''" @click="act=i">
<view class="cont">
<text class="tit">{{v.materialName}}</text>
<view class="bianj" @click.stop="uni.navigateTo({ url:`/pages/supplierindex/mtdetails?obj=${JSON.stringify(v)}&index=${i}`});act=i">
编辑
</view>
</view>
<view class="cont" style="margin-top: 23rpx;">
<text class="hui">品牌型号</text>
<text class="hui">规格型号</text>
<text class="hui">生产厂家</text>
</view>
<view class="cont" style="margin-top: 13rpx;">
<text class="hei">{{v.brandType}}</text>
<text class="hei">{{v.specificationModel}}</text>
<text class="hei">{{v.manufacturer}}</text>
</view>
<view class="xian"></view>
<view class="cont" >
<text class="hui">销售单位</text>
<text class="hui">销售单价</text>
</view>
<view class="cont" style="margin-top: 13rpx;">
<text class="hei" style="font-size: 30rpx;">{{v.salesUnit}}</text>
<text class="hei" style="font-size: 30rpx;">{{v.salesUnitPrice}}</text>
</view>
</view>
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;margin: 30rpx 0;">
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="list.length>0" />
<view style="height: 30rpx;"></view>
</view>
<view class="none" v-if="!list.length&&status=='nomore'">
<image style="width: 300rpx;height: 300rpx;"
src="https://www.focusnu.com/media/directive/index/none.png" mode="widthFix" lazy-load="false" />
<view class="">暂无物料信息</view>
</view>
<!-- <view class="fiedrightview">
+
</view> -->
</view>
</template>
<script setup lang="ts">
import {
reactive,
ref,
onMounted,
onUnmounted,
defineExpose
} from 'vue';
import {
onLoad,
onShow,
onPullDownRefresh,
onReachBottom
} from '@dcloudio/uni-app';
import {
getSuppliersWlInfo,
} from './api.js'
const status = ref('loadmore')
const list = ref([])
const value = ref('')
const id = ref('')
const pageNo = ref(1)
const act = ref(-1)
onLoad((e)=>{
id.value = e.id;
search()
})
const sousuo = ()=>{
act.value = -1;
list.value = [];
pageNo.value = 1;
search()
}
const search = ()=>{
let obj = {
pageSize:10,
pageNo:pageNo.value,
title:value.value,
suppliersId:id.value
}
getSuppliersWlInfo(obj).then(res=>{
list.value.push(...res.result.records)
status.value = (res.result.total == list.value.length ? 'nomore' : 'loadmore')
})
}
onReachBottom(()=>{
if(status.value=='loading'|| status.value=='nomore'){return}
status.value = 'loading';
pageNo.value++;
search()
})
const swih = (e,i)=>{
console.log(e.salesUnitPrice,i,111111111111)
list.value[i] = e;
console.log(list.value[i])
}
defineExpose({swih})
</script>
<style lang="scss" scoped>
.fiedrightview {
width: 100rpx;
height: 100rpx;
background: rgba(255, 255, 255, 0.86);
border-radius: 50%;
border: 1px solid #D9DADC;
display: flex;
justify-content: center;
// align-items: center;
position: relative;
font-size: 60rpx;
position: fixed;
right: 30rpx;
bottom: 90rpx;
line-height: 86rpx;
text {
min-width: 1.8vw;
height: 1.8vw;
border-radius: 0.8vw;
border: 2px solid #E81D1D;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5vw;
font-weight: 400;
font-size: 1.3vw;
color: #E81D1D;
position: absolute;
top: -0.8vw;
right: -0.8vw;
}
image {
width: 3.3vw;
height: 3.3vw;
}
}
.act{
border: 2px dashed #0083FA !important;
}
.box{
width: 700rpx;
min-height: 108rpx;
padding: 20rpx 35rpx;
background: #fff;
border-radius: 25rpx;
overflow: hidden;
margin: 24rpx auto ;
border: 2px solid #fff;
.xian{
width: 100%;
height: 1px;
background: #E5E5E5;
margin: 16rpx auto;
}
.cont{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.bianj{
width: 120rpx;
height: 56rpx;
border-radius: 28rpx;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(90deg, #E6F4FE,#CCE8FE,#CAE6FE);
color: #0083FA;
font-size: 31rpx;
}
.hei{
font-size: 26rpx;
color: #222;
font-weight: 500;
}
.hui{
font-size: 26rpx;
color: #646464;
}
}
.tit{
font-size: 36rpx;
color: #222222;
font-weight: 700;
}
}
.scr{
width: 100%;
height: 110rpx;
background: RGBA(247, 247, 247, 1);
z-index: 10;
padding-bottom: 10rpx;
}
.serch{
width: 700rpx;
height: 80rpx;
margin: 15rpx auto 0;
border: 1px solid rgba(229, 229, 229, 1);
display: flex;
align-items: center;
border-radius: 40rpx;
position: relative;
.right-img {
width: 50rpx;
height: 100%;
position: absolute;
top: 0;
right: 19rpx;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
image{
width: 40rpx;
height: 40rpx;
}
}
.bacimg{
width: 42rpx;
height: 42rpx;
margin: 0 38rpx;
}
}
.gray-font {
padding: 20rpx 60rpx;
padding-bottom: 35rpx;
color: #999999;
}
.title-back {
background-color: #F7F7F7;
width: 100%;
height: 70rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #cbd1d2;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.left-father {
display: flex;
align-items: center;
z-index: 1;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
}
}
.none {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
flex-direction: column;
color: #999;
}
</style>
<style>
page{
background: RGBA(247, 247, 247, 1);
}
</style>

View File

@ -1,237 +0,0 @@
<template>
<view>
<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
<view class="left-father" @click="uni.navigateBack()">
<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
<view style="font-size: 30rpx;">物料编辑</view>
</view>
</view>
<view :style="{height:`${uni.getStorageSync('moveHeight') + 40}px`}"></view>
<view class="box">
<view class="cont">
<view class="left">货品名称</view>
<view class="cot">{{obj.materialName}}</view>
</view>
<view class="cont">
<view class="left">规格型号</view>
<view class="cot">{{obj.specificationModel}}</view>
</view>
<view class="cont">
<view class="left">生产厂家</view>
<view class="cot">{{obj.manufacturer}}</view>
</view>
<view class="cont">
<view class="left">品牌型号</view>
<view class="cot">{{obj.brandType}}</view>
</view>
<view class="cont">
<view class="left">销售单价</view>
<view class="cot"><input type="digit" maxlength="8" placeholder="请输入销售单价" v-model="obj.salesUnitPrice"></view>
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png" />
</view>
<view class="cont">
<view class="left">销售单位</view>
<view class="cot"><input type="text" maxlength="5" placeholder="请输入销售单位" v-model="obj.salesUnit"></view>
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png" />
</view>
<!-- <view class="cont">
<view class="left">是否启用</view>
<view style="position: relative;" @click="flag=!flag" >
<view class="bottom-button-qiehuan guodu" :class="flag?'':'noact'">
<view class="blue-ball" :style="flag?'margin-left:30rpx':'margin-left:5rpx'">
</view>
</view>
</view>
</view> -->
<view class="queding" @click="config">
确定
</view>
</view>
</view>
</template>
<script setup lang="ts">
import {
reactive,
ref,
onMounted,
onUnmounted,
} from 'vue';
import {
onLoad,
onShow,
onPullDownRefresh,
onReachBottom
} from '@dcloudio/uni-app';
import {
editSuppliersWlInfo,
} from './api.js'
const obj = ref({})
const dex = ref(0)
onLoad((e)=>{
obj.value = JSON.parse(e.obj);
dex.value = e.index
})
const flag = ref(true)
const config =()=>{
if(obj.value.salesUnitPrice==''){
uni.showToast({
title:"请输入销售单价",
icon:'none'
})
return
}
if(obj.value.salesUnit==''){
uni.showToast({
title:"请输入销售单位",
icon:'none'
})
return
}
let hom = {
id:obj.value.id,
salesUnitPrice:obj.value.salesUnitPrice,
salesUnit:obj.value.salesUnit,
suppliersId:obj.value.suppliersId
}
editSuppliersWlInfo(hom).then(res=>{
if(res.success){
let pages = getCurrentPages(); //
let currentPage = pages[pages.length - 2]; //
if (currentPage ) {
currentPage.$vm.swih(obj.value, dex.value)
}
uni.showToast({
title:"修改成功",
icon:'none'
})
setTimeout(()=>{
uni.navigateBack()
},800)
}else{
uni.showToast({
title:res.message,
icon:'none'
})
}
})
}
</script>
<style lang="less" scoped>
.bottom-button-qiehuan {
width: 70rpx;
height: 42rpx;
background-color: #E1EFFC;
border-radius: 20rpx;
border: #CAE0F9 1rpx solid;
display: flex;
align-items: center;
position: relative;
.blue-ball {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
margin-left: 30rpx;
background-color: #0385FA;
position: relative;
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
}
.noact{
background-color:#f3f3f3;
.blue-ball {
background-color: #666;
}
}
.queding{
width: 320rpx;
height: 100rpx;
border-radius: 28rpx;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(180deg, #E6F4FE,#CCE8FE,#CAE6FE);
color: #0083FA;
font-size: 36rpx;
font-weight: 900;
margin: 80rpx auto 30rpx;
}
.box{
width: 700rpx;
padding: 15rpx;
margin: 40rpx auto;
background: #fff;
border-radius: 30rpx;
.cont{
width: 100%;
height: 110rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #E5E5E5;
font-size: 28rpx;
position: relative;
.one-left-imge {
width: 35rpx;
height: 35rpx;
position: absolute;
top: 50%;
right: 8rpx;
transform: translateY(-50%);
}
.left{
width: 200rpx;
color: #646464;
padding-left: 15rpx;
}
.cot{
color: #9E9E9E;
max-width: 400rpx;
input{
max-width: 400rpx;
color: #9E9E9E;
}
}
}
}
.title-back {
background-color: #F7F7F7;
width: 100%;
height: 70rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #cbd1d2;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.left-father {
display: flex;
align-items: center;
z-index: 1;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
}
}
</style>
<style>
page{
background: RGBA(247, 247, 247, 1);
}
</style>

View File

@ -1,13 +1,14 @@
<template>
<view>
<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
<view class="left-father" @click="uni.navigateBack()">
<view class="left-father" @click="uni.navigateBack();">
<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
<view style="font-size: 30rpx;">机构列表</view>
</view>
</view>
<view :style="{height:`${uni.getStorageSync('moveHeight') + 40}px`}"></view>
<image class="bacimg" src="https://www.focusnu.com/media/directive/bgyg.png" mode="aspectFill"></image>
<view class="box" v-for="(v,i) in list" :key='i' :class="act==i?'act':''" @click="act=i">
<view>
@ -15,11 +16,11 @@
</view>
<view class="cont" style="margin-top: 23rpx;">
<text class="hui">负责人</text>
<text class="hui">联系电话</text>
<text class="hui">{{v.orgLeader}}</text>
</view>
<view class="cont" style="margin-top: 13rpx;">
<text class="hei">{{v.orgLeader}}</text>
<text class="hei">{{v.orgLeaderPhone}}</text>
<text class="hui">联系电话</text>
<text class="hui">{{v.orgLeaderPhone}}</text>
</view>
<view class="cont">
<view v-if="v.izPz == 'N'" class="bianj" @click.stop="uni.navigateTo({ url:`orgMaterial?orgObj=${JSON.stringify(v)}`});">
@ -136,14 +137,16 @@
border: 2px dashed #0083FA !important;
}
.box{
width: 700rpx;
min-height: 108rpx;
padding: 20rpx 35rpx;
width: 703rpx;
min-height: 230rpx;
padding: 45rpx 35rpx;
background: #fff;
border-radius: 25rpx;
overflow: hidden;
margin: 24rpx auto ;
border: 2px solid #fff;
position: relative;
z-index: 30;
.xian{
width: 100%;
height: 1px;
@ -153,7 +156,6 @@
.cont{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.bianj{
width: 120rpx;
@ -173,13 +175,13 @@
}
.hui{
font-size: 26rpx;
color: #646464;
color: #979DA6;
}
}
.tit{
font-size: 36rpx;
color: #222222;
font-weight: 700;
font-size: 32rpx;
color: #63686F;
font-weight: bold;
}
}
.scr{
@ -229,46 +231,45 @@
color: #999999;
}
.title-back {
background-color: #F7F7F7;
width: 100%;
height: 70rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #cbd1d2;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.left-father {
display: flex;
align-items: center;
z-index: 1;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
.bacimg {
width: 100%;
height: 780rpx;
position: fixed;
top: 0;
left: 0;
z-index: 0;
}
}
.none {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.title-back {
background: rgba(255, 255, 255, 0);
width: 100%;
height: 70rpx;
display: flex;
align-items: center;
flex-direction: column;
color: #999;
justify-content: space-between;
align-items: flex-end;
padding-bottom: 20rpx;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
</style>
<style>
page{
background: RGBA(247, 247, 247, 1);
}
</style>
.left-father {
width: 150rpx;
height: 100%;
display: flex;
align-items: flex-end;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
}
}
</style>
<style>
page {
background: #F7F7F7;
}
</style>

View File

@ -1,6 +1,6 @@
// 全局请求封装
export const base_url = 'http://192.168.2.18:8081/opeapi/'
// export const base_url = 'https://www.focusnu.com/opeapi'
// export const base_url = 'http://192.168.2.18:8081/opeapi/'
export const base_url = 'https://www.focusnu.com/opeapi'
export const media_base_url = 'https://www.focusnu.com/media/'
// export const base_url = 'http://192.168.2.24:8081/opeapi'