添加供应商物料信息
This commit is contained in:
parent
3ac1a2fefe
commit
cae2909023
14
pages.json
14
pages.json
|
|
@ -472,6 +472,20 @@
|
|||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/supplierindex/orgList",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/supplierindex/orgMaterial",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
|||
|
|
@ -119,3 +119,32 @@ export function editSuppliersWlInfo(data){
|
|||
data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// ---------------------杨君--------------------------
|
||||
//供应商获取合作的机构列表
|
||||
export function getSuppliersOrgInfoByOpenId(data){
|
||||
return request({
|
||||
url: `/api/suppliers/getSuppliersOrgInfoByOpenId`,
|
||||
method: 'get',
|
||||
data,
|
||||
})
|
||||
}
|
||||
//查询物料分类集合
|
||||
export function getSuppliersMaterialType(data){
|
||||
return request({
|
||||
url: `/api/suppliers/getSuppliersMaterialType`,
|
||||
method: 'get',
|
||||
data,
|
||||
})
|
||||
}
|
||||
//查询机构下的物料集合
|
||||
export function getSuppliersMaterialInfo(data){
|
||||
return request({
|
||||
url: `/api/suppliers/getSuppliersMaterialInfo`,
|
||||
method: 'get',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------杨君--------------------------
|
||||
|
|
@ -271,7 +271,7 @@
|
|||
})
|
||||
}
|
||||
|
||||
const buttonArray = ref(["物料管理", "敬请期待", "敬请期待"])
|
||||
const buttonArray = ref(["物料信息", "敬请期待", "敬请期待"])
|
||||
const statusarray = ["loading", "success", "fail"]
|
||||
const which = ref(0);
|
||||
|
||||
|
|
@ -489,7 +489,7 @@
|
|||
const clickButton = (item, index) => {
|
||||
if (index === 0) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/supplierindex/material?id='+item.suppliersId
|
||||
url:'/pages/supplierindex/orgList?id='+item.suppliersId
|
||||
})
|
||||
// getSupInfoByOpenId(item.orgCode).then(res => {
|
||||
// if (res.success) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,274 @@
|
|||
<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" v-for="(v,i) in list" :key='i' :class="act==i?'act':''" @click="act=i">
|
||||
<view>
|
||||
<text class="tit">{{v.comName}}</text>
|
||||
</view>
|
||||
<view class="cont" style="margin-top: 23rpx;">
|
||||
<text class="hui">负责人</text>
|
||||
<text class="hui">联系电话</text>
|
||||
</view>
|
||||
<view class="cont" style="margin-top: 13rpx;">
|
||||
<text class="hei">{{v.orgLeader}}</text>
|
||||
<text class="hei">{{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)}`});">
|
||||
编辑
|
||||
</view>
|
||||
<view v-if="v.izPz == 'Y'" class="bianj" @click.stop="uni.navigateTo({ url:`orgMaterial?orgObj=${JSON.stringify(v)}`});">
|
||||
详情
|
||||
</view>
|
||||
</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 == 0">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
defineExpose
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
onPullDownRefresh,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
getSuppliersWlInfo,
|
||||
getSuppliersOrgInfoByOpenId,
|
||||
} from './api.js'
|
||||
const status = ref('loadmore')
|
||||
const list = ref([])
|
||||
const value = ref('')
|
||||
const openId = uni.getStorageSync('openid')
|
||||
const id = ref('')
|
||||
const pageNo = ref(1)
|
||||
const act = ref(-1)
|
||||
onLoad((e)=>{
|
||||
id.value = e.id;
|
||||
search()
|
||||
})
|
||||
|
||||
const search = ()=>{
|
||||
let obj = {
|
||||
openId: openId
|
||||
}
|
||||
getSuppliersOrgInfoByOpenId(obj).then(res=>{
|
||||
console.log('---->',res)
|
||||
list.value.push(...res.result)
|
||||
// status.value = (res.result.total == list.value.length ? 'nomore' : 'loadmore')
|
||||
})
|
||||
}
|
||||
onReachBottom(()=>{
|
||||
if(status.value=='loading'|| status.value=='nomore'){return}
|
||||
status.value = 'loading';
|
||||
search()
|
||||
})
|
||||
const swih = (e,i)=>{
|
||||
list.value[i] = e;
|
||||
}
|
||||
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>
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
<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 v-for="(v,i) in materialTypeList" @click="checkMaterialType(v.materialTypeId)">{{v.typeName}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="queding" @click="handleYulan">
|
||||
预览
|
||||
</view>
|
||||
<view class="queding" @click="handleQueren">
|
||||
确定
|
||||
</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 { getSuppliersMaterialType, getSuppliersMaterialInfo } from './api.js'
|
||||
const orgObj = ref({});//机构信息
|
||||
const materialTypeList = ref([]);//物料分类集合
|
||||
const materialInfoList = ref([]);//物料信息集合
|
||||
const materialTypeId = ref('');//物料分类选中条件
|
||||
const openId = uni.getStorageSync('openid');//用户id
|
||||
onLoad((e)=>{
|
||||
orgObj.value = JSON.parse(e.orgObj);
|
||||
console.log('orgObj.value-->',orgObj.value);
|
||||
getMaterialType();//获取分类信息
|
||||
// getMaterialInfo();//获取物料信息
|
||||
})
|
||||
//获取分类信息
|
||||
const getMaterialType = ()=>{
|
||||
let obj = {
|
||||
orgCode: orgObj.value.orgCode,
|
||||
openId: openId
|
||||
}
|
||||
getSuppliersMaterialType(obj).then(res=>{
|
||||
console.log('1--->',res);
|
||||
materialTypeList.value = res.result
|
||||
})
|
||||
}
|
||||
//获取物料信息
|
||||
const getMaterialInfo = ()=>{
|
||||
let obj = {
|
||||
orgCode: orgObj.value.orgCode,
|
||||
materialTypeId: materialTypeId.value,
|
||||
openId: openId
|
||||
}
|
||||
console.log('getMaterialInfo-obj--->', obj);
|
||||
getSuppliersMaterialInfo(obj).then(res=>{
|
||||
console.log('2--->',res);
|
||||
// list.value.push(...res.result)
|
||||
})
|
||||
}
|
||||
//选中物料分类
|
||||
const checkMaterialType = (checkId)=>{
|
||||
console.log('checkId--->',checkId);
|
||||
materialTypeId.value = checkId;
|
||||
console.log('materialTypeId.value>',materialTypeId.value);
|
||||
getMaterialInfo();
|
||||
}
|
||||
//预览
|
||||
const handleYulan = ()=>{
|
||||
|
||||
}
|
||||
//确认
|
||||
const handleQueren = ()=>{
|
||||
|
||||
}
|
||||
</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>
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in New Issue