This commit is contained in:
wangweidong 2025-12-05 16:13:49 +08:00
parent 6fc7b5c8b4
commit 45a2d71e98
10 changed files with 920 additions and 359 deletions

View File

@ -24,7 +24,7 @@
<image class="guodu" :style="qb?'transform: rotate(180deg);':''"
src="/static/index/procurement/zjt.png" mode="aspectFill"></image>
</view>
<view class="guodu" :class="qb?(moredex==1?'avt':''):'righ0'" @click="moredex=1; ">
<view class="guodu" :class="qb?(moredex==1?'avt':''):'righ0'" @click="moredex = moredex==1?0:1; ">
批量移除
</view>
<view class="guodu" :class="qb?(moredex==2?'avt':''):'righ0'" @click="moredex=2; ">

View File

@ -61,8 +61,6 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
import { queryMaterialInfo,queryQlwcLog} from '../api/api.js'
import defaultr from './default.vue'
const props = defineProps({
list: {
type: Array,

View File

@ -199,13 +199,13 @@
url: '/' + navurl.value
})
}
if (index == 7) {
navurl.value = 'pages/procurement/outbound?code=0'
if (index == 8) {
navurl.value = 'pages/procurement/retstock'
uni.navigateTo({
url: '/' + navurl.value
})
}
if (index == 8) {
if (index == 7) {
navurl.value = 'pages/procurement/outbound?code=1'
uni.navigateTo({
url: '/' + navurl.value

View File

@ -1,6 +1,6 @@
// 引入 request 文件
import request from '@/request/index.js'
// 查询仓库对应物料
export const queryInvoicingList = (params) => {
return request({
@ -8,21 +8,22 @@ export const queryInvoicingList = (params) => {
method: 'get',
data: params,
})
}
}
// 获取物料分类树(请购列表使用)
export const getMaterialTreeData = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getMaterialTreeData?nuId=`+params.nuId,
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getMaterialTreeData?nuId=` + params.nuId,
method: 'get',
data: params,
})
}
}
// (业务)获取物料分类树(购物车使用)
export const getGwcMaterialTreeData = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGwcMaterialTreeData?nuId=`+params.nuId,
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGwcMaterialTreeData?nuId=` + params
.nuId,
method: 'get',
data: params
})
@ -30,7 +31,8 @@ export const getGwcMaterialTreeData = (params) => {
// (业务)获取物料分类树(采购单使用)
export const getCgdMaterialTreeData = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getCgdMaterialTreeData?nuId=`+params.nuId,
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getCgdMaterialTreeData?nuId=` + params
.nuId,
method: 'get',
data: params,
})
@ -42,7 +44,7 @@ export const queryNuInfoByNuId = (params) => {
method: 'get',
data: params,
})
}
}
// 修改库房启用停用
export const updateKfstatus = (params) => {
@ -51,7 +53,7 @@ export const updateKfstatus = (params) => {
method: 'post',
data: params,
})
}
}
//获得采购单信息
export const queryCgdList = (params) => {
return request({
@ -59,7 +61,7 @@ export const queryCgdList = (params) => {
method: 'get',
data: params,
})
}
}
// 查询采购项目
export const queryCgdInfoList = (params) => {
@ -68,7 +70,7 @@ export const queryCgdInfoList = (params) => {
method: 'get',
data: params,
})
}
}
// 查询采购项目的详情
export const queryWlInfoByWlId = (params) => {
return request({
@ -76,21 +78,21 @@ export const queryWlInfoByWlId = (params) => {
method: 'get',
data: params,
})
}
}
export const addShoppingCartList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/addShoppingCartList`,
method: 'post',
data: params,
})
}
}
export const queryShoppingCartList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/queryShoppingCartList`,
method: 'get',
data: params,
})
}
}
export const generatedPurchaseOrder = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/generatedPurchaseOrder`,
@ -107,14 +109,14 @@ export const generatedPurchaseViewOrder = (params) => {
}
export const deleteQgInfoById = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/deleteQgInfoById?id=`+params,
method: 'DELETE'
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/deleteQgInfoById?id=` + params,
method: 'DELETE'
})
}
export const emptiedQgInfo = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/emptiedQgInfo`,
method: 'DELETE'
method: 'DELETE'
})
}
@ -126,7 +128,7 @@ export const voidedCgdMain = (params) => {
method: 'post',
data: params,
})
}
}
//修改库房物料是否启用
export const updateWarehouserEnabled = (params) => {
@ -135,7 +137,7 @@ export const updateWarehouserEnabled = (params) => {
method: 'post',
data: params,
})
}
}
//(业务)修改购物车请购信息
export const eddShoppingCartList = (params) => {
return request({
@ -143,7 +145,7 @@ export const eddShoppingCartList = (params) => {
method: 'post',
data: params,
})
}
}
//(业务)获取物料分类树可采购的物料数量(仓库列表使用)
@ -155,104 +157,139 @@ export const getTreeDataWlnum = (params) => {
})
}
// (业务)查询全部供应商信息
export const getGysList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGysList`,
method: 'get',
data: params,
})
}
//(业务)库存预警添加全部物料
export const addWaringAll = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/addWaringAll`,
method: 'post',
data: params,
})
}
export const getGysList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGysList`,
method: 'get',
data: params,
})
}
//(业务)库存预警添加全部物料
export const addWaringAll = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/addWaringAll`,
method: 'post',
data: params,
})
}
// (业务)获取物料分类树可采购的物料数量(购物车列表使用)
export const getGwcTreeDataWlnum = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGwcTreeDataWlnum`,
method: 'get',
data: params,
})
}
//(业务)获取物料分类树可采购的物料数量(采购单列表使用)
export const getCgdTreeDataWlnum = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getCgdTreeDataWlnum`,
method: 'get',
data: params,
})
}
export const getGwcTreeDataWlnum = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGwcTreeDataWlnum`,
method: 'get',
data: params,
})
}
//(业务)获取物料分类树可采购的物料数量(采购单列表使用)
export const getCgdTreeDataWlnum = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getCgdTreeDataWlnum`,
method: 'get',
data: params,
})
}
export const editIzNew = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editIzNew`,
method: 'post',
data: params,
})
}
//分享的前缀
export const getShareUrlByCode = (params) => {
return request({
url: `/sys/sysDepart/getShareUrlByCode`,
method: 'get',
data: params,
})
}
export const editIzNew = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editIzNew`,
method: 'post',
data: params,
})
}
//分享的前缀
export const getShareUrlByCode = (params) => {
return request({
url: `/sys/sysDepart/getShareUrlByCode`,
method: 'get',
data: params,
})
}
export const editShareInfo = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editShareInfo`,
method: 'post',
data: params,
})
}
export const editShareInfo = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editShareInfo`,
method: 'post',
data: params,
})
}
export const queryCgdWaringList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/queryCgdWaringList`,
method: 'get',
data: params,
})
}
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/queryCgdWaringList`,
method: 'get',
data: params,
})
}
export const thdList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thdList`,
method: 'get',
data: params,
})
}
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thdList`,
method: 'get',
data: params,
})
}
export const transRead = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/transRead`,
method: 'POST',
data: params,
})
}
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/transRead`,
method: 'POST',
data: params,
})
}
export const thdNuMaterialList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thdNuMaterialList`,
method: 'get',
data: params,
})
}
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thdNuMaterialList`,
method: 'get',
data: params,
})
}
export const addThc = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/addThc`,
method: 'POST',
data: params,
})
}
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/addThc`,
method: 'POST',
data: params,
})
}
export const thcList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thcList`,
method: 'get',
data: params,
})
}
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/thcList`,
method: 'get',
data: params,
})
}
export const removeWl = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/removeWl`,
method: 'POST',
data: params,
})
}
export const removeAll = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/removeAll`,
method: 'POST',
data: params,
})
}
export const submitThd = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/submitThd`,
method: 'POST',
data: params,
})
}
export const startServe = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/startServe`,
method: 'POST',
data: params,
})
}
export const finishServe = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/thd/finishServe`,
method: 'POST',
data: params,
})
}

View File

@ -0,0 +1,354 @@
<template>
<view>
<view class="mengban" @click="emit('fill')" v-if="show"> </view>
<view class="qinglingdetails" :class="show?'':'unclass'" :style="showbox?'z-index:220':'z-index:-2'">
<view class="tit">
<view>退货详情</view>
</view>
<view class="itemcan">
<text>请领区域:{{ uni.getStorageSync('nuName')}}</text>
<text>请领人:{{uni.getStorageSync('realname')}}</text>
<text>请领日期:{{times}}</text>
</view>
<view class="qlwl">
请领物料
</view>
<scroll-view scroll-y="true" class="wuliaolist">
<view class="list">
<view class="card" v-for="(v,i) in list" :key='i'>
<view class="speitem guodu" >
<image :src="v.materialInfo?.materialImg?serverUrl+v.materialInfo?.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill">
</image>
<view class="cardp">
<view v-if="v.materialInfo.categoryName">{{v.materialInfo.categoryName}}</view>
<view v-if="v.materialInfo.typeName">{{v.materialInfo.typeName}}</view>
</view>
</view>
<view class="msitem guodu" >
<view>
<view>{{v.materialInfo.materialName}}</view>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: </text>
<view>{{v.materialInfo.specificationModel}}</view>
</view>
<view>
<view>
<text>{{v.thNum?v.thNum:'--'}}</text>
<text>请领数量</text>
</view>
<view>
<text>{{v.materialInfo.materialUnits}}</text>
<text>请领单位</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="plsbuy-bottom">
<view class="quxiao" @click="emit('fill')">
取消
</view>
<view class="plsbuy-bottom-blue" @click="emit('config')">
入库退货单
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
import defaultr from '../components/default.vue'
const props = defineProps({
list: {
type: Array,
required: true
},
show: {
type: Boolean
},
thdt:{
type:Object
}
})
const times = ref('')
onMounted(()=>{
let now = new Date();
let year = now.getFullYear();
let month = (now.getMonth() + 1)<10?'0'+(now.getMonth() + 1):(now.getMonth() + 1);
let day = now.getDay()<10?'0'+now.getDay():now.getDay();
times.value = year+'.'+month+'.'+day
})
const wuobj = ref({})
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
const emit = defineEmits([ 'fill' ,'submit','config'])
const showbox = ref(false)
watch(()=>props.show,
()=>{
console.log(props.list)
if(props.show==true){
setTimeout(()=>{
showbox.value = true
},50)
}else{
showbox.value = false;
}
})
</script>
<style scoped lang="less">
.qinglingdetails{
width: 60vw;
height: 49vw;
background:rgba(255, 255, 255, 0.98);
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163,167,182,0.16);
border-radius: 1.6vw;
position: fixed;
top:8vw;
left: 20vw;
z-index: 200;
padding:1vw 1.4vw;
.wuliaolist{
width: 100%;
height: 27vw;
.list{
width: 100%;
height: 100%;
display: grid;
grid-template-columns: 1fr 1fr ;
padding-left: 0.6vw;
.card{
width: 27.5vw;
height: 13vw;
background: rgba(247, 247, 247, 0.5);
border-radius: 1.1vw;
position: relative;
overflow: hidden;
margin-bottom: 1.1vw;
padding: 1vw;
.msitem {
width: 11.5vw;
height: 100%;
position: absolute;
top:0;
left: 10vw;
>view {
margin-top: 0.25vw;
&:nth-child(3) {
width: 100%;
height: 3.4vw;
display: flex;
justify-content: space-between;
>view {
width: 50%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
margin-top:1vw;
white-space: nowrap;
&:nth-child(1){
padding-right: 1.7vw;
align-items: flex-start;
}
&:nth-child(2){
padding-left: 1.7vw;
align-items: flex-start;
}
&:nth-child(1)::after {
content: '';
position: absolute;
right: 0;
width: 100%;
height: 2.2vw;
border-right: 1px solid #C9C9C9;
top: 0.6vw;
}
text {
&:nth-child(1) {
font-weight: bold;
font-size: 1.7vw;
color: #555555;
}
&:nth-child(2) {
font-weight: 400;
font-size: 1.1vw;
color: #999999;
white-space: nowrap;
}
}
}
}
&:nth-child(2) {
display: flex;
justify-content: space-between;
flex-direction: column;
margin-top: 0.1vw;
view{
font-size: 1.4vw;
color: #888888;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
text {
font-weight: 400;
font-size: 1.1vw;
color: #777777;
margin-top: 0.25vw;
}
}
&:nth-child(1) {
view{
display: inline-block;
width: 10vw;
font-weight: bold;
font-size: 1.6vw;
color: #222222;
height: 3vw;
padding-top: 1.3vw;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
.speitem {
width: 10vw;
height: 100%;
display: inline-flex;
flex-direction: column;
position: absolute;
top:0;
left: 0;
.cardp {
width:8vw;
height: 4vw;
display: flex;
margin: 0 auto;
align-items: center;
justify-content: center;
flex-direction: column;
view {
min-width: 5.5vw;
height: 1.8vw;
border-radius: 0.9vw;
border: 1px solid #D2D2D2;
margin: 0.5vw 0 0 0.5vw;
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 1vw;
color: #555555;
padding: 0 0.25vw;
}
}
>image {
width: 8.5vw;
height: 7.5vw;
margin: 0.7vw auto 0.25vw;
}
}
}
}
}
.qlwl{
width: 100%;
height: 3vw;
font-weight: 400;
font-size: 1.4vw;
color: #555555;
}
.itemcan{
width: 100%;
height: 6.6vw;
display: flex;
justify-content: space-between;
align-items: center;
text{
font-weight: 400;
font-size: 1.4vw;
color: #888888;
}
}
.tit {
width: 100%;
height: 3.5vw;
line-height: 6vw;
font-weight: 400;
font-size: 1.6vw;
color: #333333;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #E5E5E5;
}
}
.mengban{
width: 100vw;
height: 100vh;
position: fixed;
z-index: 20;
top: 0;
left: 0;
background: RGBA(239, 240, 244, 0.55);
}
.hei0 {
height: 0 !important;
view{
height: 0 !important;
}
}
.unclass {
opacity: 0 !important;
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
.plsbuy-bottom {
width: 100%;
margin-top: 2vw;
height: 7vw;
display: flex;
justify-content: flex-end;
font-size: 35rpx;
padding-right: 1vw;
view{
display: flex;
justify-content: center;
align-items: center;
min-width: 9.1vw;
height: 3.8vw;
color: rgba(92, 121, 146, 1);
border-radius:1.9vw;
font-size: 1.8vw;
border: 1px solid #EDEDEF;
margin-left: 1vw;
padding: 0 2vw;
}
.quxiao{
background: #EDEDEF;
}
.plsbuy-bottom-blue {
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
border: 1px solid rgba(3,133,250,0.34);
color: #0385FA;
}
}
</style>

View File

@ -9,7 +9,7 @@
<view class="zuo">
<view class="carp">
<view class="zuoimg tp">
<image :src="objtake.materialInfo.materialImg?serverUrl+objtake.materialInfo.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"/>
<image :src="objtake.materialInfo?.materialImg?serverUrl+objtake.materialInfo?.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"/>
</view>
<view class="youcont">
<view>{{objtake.materialInfo.materialName}}</view>
@ -77,8 +77,7 @@
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
const props = defineProps({
objtake: {
type: Object,
required: true
type: Object
},
show: {
type: Boolean
@ -98,6 +97,7 @@
}else{
showbox.value = false;
isZero.value = false;
sx.value = false;
}
})
const sx = ref(false)

View File

@ -10,7 +10,7 @@
<image src="/static/index/procurement/zd.png" mode="aspectFill"></image>
</view>
<view class="speitem guodu" >
<image :src="v.materialInfo.materialImg?serverUrl+v.materialInfo.materialImg:'/static/index/procurement/k.png'"
<image :src="v.materialInfo?.materialImg?serverUrl+v.materialInfo?.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill">
</image>
<view class="cardp">
@ -42,7 +42,7 @@
<!-- <image v-if="v.isAdd!=1" :src="'/static/index/procurement/+.png'" mode="aspectFill"></image>
<image v-if="v.isAdd==1" :src="'/static/index/procurement/-.png'" mode="aspectFill"></image> -->
</view>
<view class="zkadd guodu" >
<view class="zkadd guodu" v-if="status<2">
<view @click.stop="comfig(v,index,1)" @touchend.stop>
添加物料
</view>
@ -50,11 +50,9 @@
</scroll-view>
</view>
</view>
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;">
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="InvoicingList.length>6" />
</view>
</scroll-view>
<taking :show="tuihuoshow" :objtake="tuihuoobj" @fill="tuihuoshow = false" @right="right"></taking>
</view>
</template>
@ -70,6 +68,7 @@
type: String
}
})
const carnum = ref(0)
const caigouobj = ref({})
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
const emit = defineEmits([ 'scrolltolower' ,'comfig'])

View File

@ -6,9 +6,9 @@
<view class="mhao" v-if="Material.length>0">{{Material.length}}</view>
</view>
<scroll-view scroll-x="true" class="kcscrol guodu" @scroll="onScroll" :class="Material.length==0?'fff':''"
scroll-with-animation :scroll-left="scrollleft" :style="qb?'width:calc(100% - 21.8vw)':'width:calc(100% - 10vw)' ">
scroll-with-animation :scroll-left="scrollleft" :style="qb?'width:calc(100% - 21.8vw)':status<2?'width:calc(100% - 9vw)':'width:calc(100% - 5vw)' ">
<view class="yjbox" v-for="(v,i) in Material" :key="i" >
<image :src="v.materialInfo.materialImg?serverUrl+v.materialInfo.materialImg:'/static/index/procurement/k.png'"
<image :src="v.materialInfo?.materialImg?serverUrl+v.materialInfo?.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill"></image>
<view>{{v.materialInfo.materialName}}</view>
<text class="ytj" v-if="v.thNum>=0">{{v.thNum}}</text>
@ -18,19 +18,19 @@
</view>
<defaultr cont="暂无数据" v-if="Material.length==0&&timeout" style="position: absolute;width: 10vw;height: 10vw;"></defaultr>
</scroll-view>
<view class="kjlt more guodu" :style="qb?'width:15vw':'' " @touchstart="ts" @touchmove="canmove">
<view class="kjlt more guodu" :style="qb?'width:15vw':'' " @touchstart="ts" @touchmove="canmove" v-if="status<2">
<view @click="zksq" class="righ0">
{{!qb?'更多':'收起'}}
<image class="guodu" :style="qb?'transform: rotate(180deg);':''"
src="/static/index/procurement/zjt.png" mode="aspectFill"></image>
</view>
<view class="guodu" :class="qb?(moredex==1?'avt':''):'righ0'" @click="moredex=1; ">
<view class="guodu" :class="qb?(moredex==1?'avt':''):'righ0'" @click="moredex = moredex==1?0:1; ">
批量移除
</view>
<view class="guodu" :class="qb?(moredex==2?'avt':''):'righ0'" @click="moredex=2; ">
清空列表
</view>
<view class="guodu" :class="qb?(moredex==3?'avt':''):'righ0'" @click="moredex=3;emit('submit')">
<view class="guodu" :class="qb?(moredex==3?'avt':''):'righ0'" @click="moredex=3;emit('submit')" v-if="status==1">
提交退货单
</view>
</view>
@ -47,6 +47,9 @@
Material:{
type:Array,
required: true,
},
status:{
type:String
}
});
const emit = defineEmits([ 'delall' ,'del','submit'])
@ -184,7 +187,7 @@
.more {
margin-left: 0.6vw;
position: relative;
background: RGBA(239, 240, 244, 1);
background: #F9F9F9;
.righ0 {
right: 0 !important;

View File

@ -3,7 +3,7 @@
<view class="serchs">
<view class="leftbtn">
<view class="ipt">
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.searchContent" @confirm="search()"/>
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.searchContent" @confirm="search()" />
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.searchContent"
@click="search(0)"></image>
</view>
@ -11,7 +11,7 @@
<image src="/static/index/procurement/sh.png" mode="aspectFill" class="sh"></image>
检索
</view>
</view>
<view class="rightbtn">
<view class="back" @click="uni.navigateBack()">
@ -22,8 +22,10 @@
</view>
<view class="t-box">
<view class="leftscr">
<scroll-view scroll-y="true" class="leftscrol" :scroll-top="cardtop" scroll-with-animation @scrolltolower="plsbuytolower">
<view class="card" v-for="(v,i) in tharrlist" :key="i" :class="i==cardindex?'act':''" @click="cardcon(v,i)">
<scroll-view scroll-y="true" class="leftscrol" :scroll-top="cardtop" scroll-with-animation
@scrolltolower="plsbuytolower">
<view class="card" v-for="(v,i) in tharrlist" :key="i" :class="i==cardindex?'act':''"
@click="cardcon(v,i)">
<view class="rad" v-if="v.izRead=='N'"></view>
<view class="hli">
<view class="lig">
@ -37,8 +39,7 @@
</view>
<view class="cont">
<view class="conle">
<image :src=" '/static/index/procurement/k.png'"
mode="aspectFill"/>
<image :src=" '/static/index/procurement/k.png'" mode="aspectFill" />
<text>退货</text>
</view>
<view class="ritcon">
@ -49,7 +50,7 @@
申请人{{v.fqrName}}
</view>
<view class="fwjd" v-if="v.status==0">
<view class="jx">开始服务</view>
<view class="jx" @click.stop="start(v,i)">开始服务</view>
<view>服务结束</view>
</view>
<view class="fwjd" v-if="v.status==1">
@ -58,11 +59,11 @@
</view>
<view class="fwjd" v-if="v.status==2">
<view>开始服务</view>
<view class="jx">服务结束</view>
<view class="jx" @click.stop="end(v,i)">服务结束</view>
</view>
<view class="fwjd" v-if="v.status==3">
<view>开始服务</view>
<view >服务结束</view>
<view>服务结束</view>
</view>
</view>
</view>
@ -74,142 +75,282 @@
</view>
<view class="rightscr">
<view class="thwl">
<thwl :Material="addMaterial" @delall="delall" @del="adddel" @submit="submit"></thwl>
<!-- -->
<thwl :Material="addMaterial" @delall="delall" @del="adddel" @submit="submit" :status="tharrlist[cardindex]?.status"></thwl>
<!-- -->
</view>
<view class="carditem">
<thitem :InvoicingList="cardarr" :status="'nomore'" @comfig="comfig"></thitem>
<thitem :InvoicingList="cardarr" :status="tharrlist[cardindex]?.status" @comfig="comfig"></thitem>
</view>
</view>
</view>
<tanchuang @back="tanshow = false" :show="tanshow" font="确定将该物料从本次请领清单中移除吗?" @right="del"></tanchuang>
<submits :show="subshow" :list="addMaterial" @fill="subshow = false" :thdt="tharrlist[cardindex]" @config="tijiao"></submits>
<view class="thdfed">
<image src="/static/index/procurement/thd.png" mode="aspectFill"></image>
<text v-if="carnum>0">{{carnum>99?'99+':carnum}}</text>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent} from 'vue';
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue';
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import { thdList , transRead ,thdNuMaterialList,addThc,thcList} from './api/lunpan.js'
const serverUrl = ref( uni.getStorageSync('serverUrl') + '/sys/common/static/')
import { thdList, transRead, thdNuMaterialList, addThc, thcList, removeWl, removeAll, submitThd ,startServe , finishServe} from './api/lunpan.js'
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
import thwl from './common/thwl.vue'
import thitem from './common/thitem.vue'
const form = reactive({
pageNo: 1,
pageSize: 10,
searchContent: '',
})
onMounted(()=>{
thlist()
})
const search = (e)=>{
if(e==0){form.searchContent = ''}
form.pageNo = 1;
tharrlist.value = [];
thlist()
}
const status = ref('loadmore')
const plsbuytolower = () =>{
if(status.value == 'loading' || status.value == 'nomore'){return}
status.value = 'loading';
form.pageNo++;
thlist();
}
const tharrlist = ref([])
const thlist = () =>{
thdList(form).then(res=>{
console.log(res)
tharrlist.value.push(...res.result.records);
status.value = res.result.total == tharrlist.value.length ? 'nomore' : 'loadmore';
if(form.pageNo == 1){
cardcon(tharrlist.value[cardindex.value],cardindex.value);
wuliao();
}
})
}
const cardindex = ref(0);
const cardtop = ref(0);
const cardarr = ref([])
const cardcon = (v,i) =>{
cardindex.value = i;
cardtop.value = Math.floor(i-1) * 154;
console.log(v)
thdNuMaterialList({nuId:v.nuId,id:v.id}).then(res=>{
console.log(res.result)
cardarr.value = res.result
})
if(v.izRead == 'N'){
transReads(v,i)
}
}
const addMaterial = ref([])
const transReads = (v,i) =>{
transRead({id:v.id})
v.izRead = 'Y'
}
const comfig =(e,v)=>{
let obj = {
pkId:tharrlist.value[cardindex.value].id,
kfId:v.kfId,
wlId:v.materialInfo.id,
thNum:e,
nuId:tharrlist.value[cardindex.value].nuId,
elderId:tharrlist.value[cardindex.value].elderId
}
addThc(obj).then(res=>{
if(res.success&&res.result.status=='success'){
uni.showToast({
icon:'success',
title:'提交成功'
})
setTimeout(()=>{
wuliao();
import tanchuang from './components/tanchuang.vue'
import submits from './common/submits.vue'
const form = reactive({
pageNo: 1,
pageSize: 10,
searchContent: '',
})
const tanshow = ref(false)
const subshow = ref(false)
const carnum = ref(0)
onMounted(() => {
thlist()
})
const submit = () => {
wuliao();
nextTick(() => {
subshow.value = true;
})
}
const tijiao = () => {
submitThd({ id: tharrlist.value[cardindex.value].id }).then(res => {
if (res.success) {
subshow.value = false;
th(tharrlist.value[cardindex.value],cardindex.value)
setTimeout(() => {
wuliao();
thlist();
},800)
}else{
uni.showToast({
icon:'none',
title:res.result.message
})
}
})
}
const wuliao = () =>{
let obj = {
pkId:tharrlist.value[cardindex.value].id
}
thcList(obj).then(res=>{
console.log(res)
addMaterial.value = res.result
})
}
}, 200)
} else {
uni.showToast({
icon: 'none',
title: res.message
})
}
})
}
const th = (v,i) =>{
let obj = {refreshDataKey:v.id}
thdList(obj).then(res => {
console.log(res)
tharrlist.value[i] = res.result.records[0]
})
}
const start = (v,i) =>{
startServe({id:v.id}).then(res=>{
if(res.success){
th(v,i)
}else{
uni.showToast({
icon: 'none',
title: res.message
})
}
})
}
const end = (v,i)=>{
finishServe({id:v.id}).then(res=>{
console.log(res)
if(res.success){
th(v,i)
}else{
uni.showToast({
icon: 'none',
title: res.message
})
}
})
}
const search = (e) => {
if (e == 0) { form.searchContent = '' }
form.pageNo = 1;
tharrlist.value = [];
thlist()
}
const status = ref('loadmore')
const plsbuytolower = () => {
if (status.value == 'loading' || status.value == 'nomore') { return }
status.value = 'loading';
form.pageNo++;
thlist();
}
const tharrlist = ref([])
const thlist = () => {
thdList(form).then(res => {
tharrlist.value.push(...res.result.records);
carnum.value = res.result.total;
status.value = res.result.total == tharrlist.value.length ? 'nomore' : 'loadmore';
if (form.pageNo == 1) {
cardcon(tharrlist.value[cardindex.value], cardindex.value);
wuliao();
}
})
}
const cardindex = ref(0);
const cardtop = ref(0);
const cardarr = ref([])
const cardcon = (v, i) => {
cardindex.value = i;
cardtop.value = Math.floor(i - 1) * 154;
console.log(v)
wuliao();
thdNuMaterialList({ nuId: v.nuId, id: v.id }).then(res => {
console.log(res.result)
cardarr.value = res.result
})
if (v.izRead == 'N') {
transReads(v, i)
}
}
const addMaterial = ref([])
const transReads = (v, i) => {
transRead({ id: v.id })
v.izRead = 'Y'
}
const comfig = (e, v) => {
let obj = {
pkId: tharrlist.value[cardindex.value].id,
kfId: v.kfId,
wlId: v.materialInfo.id,
thNum: e,
nuId: tharrlist.value[cardindex.value].nuId,
elderId: tharrlist.value[cardindex.value].elderId
}
addThc(obj).then(res => {
if (res.success && res.result.status == 'success') {
uni.showToast({
icon: 'success',
title: '提交成功'
})
setTimeout(() => {
wuliao();
thlist();
}, 800)
} else {
uni.showToast({
icon: 'none',
title: res.result.message
})
}
})
}
const wuliao = () => {
let obj = {
pkId: tharrlist.value[cardindex.value].id
}
thcList(obj).then(res => {
addMaterial.value = res.result
})
}
const delall = () => {
let obj = { pkId: tharrlist.value[cardindex.value].id }
removeAll(obj).then(res => {
if (res.success) {
wuliao();
thlist();
} else {
uni.showToast({
icon: 'none',
title: res.message
})
}
})
}
const objtake = ref({})
const adddel = (e) => {
objtake.value = e;
tanshow.value = true;
}
const del = () => {
let obj = {
pkId: tharrlist.value[cardindex.value].id,
wlId: objtake.value.materialInfo.id
}
removeWl(obj).then(res => {
if (res.success) {
wuliao();
thlist();
tanshow.value = false;
} else {
uni.showToast({
icon: 'none',
title: res.message
})
}
})
}
</script>
<style scoped lang="less">
.carditem{
width: 100%;
.thdfed{
width: 4.9vw;
height: 4.9vw;
background: rgba(255, 255, 255, 0.86);
border-radius: 50%;
border: 1px solid #D9DADC;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
right: 1vw;
bottom:4.3vw;
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;
}
}
.thwl{
.carditem {
width: 100%;
}
.thwl {
width: 100%;
height: 12vw;
}
.leftscrol{
.leftscrol {
width: 100%;
height: 100%;
.act{
.act {
border: 2px solid #0385FA !important;
background: rgba(255, 255, 255, 1) !important;
}
.card{
.card {
width: 30vw;
height: 13.6vw;
background: rgba(255, 255, 255, 0.6);
border-radius: 1.6vw;
padding:1vw 1.4vw;
padding: 1vw 1.4vw;
border: 2px solid rgba(255, 255, 255, 0.6);
margin-bottom: 0.8vw;
position: relative;
.rad{
.rad {
width: 1.2vw;
height: 1.2vw;
border-radius: 50%;
@ -218,20 +359,23 @@
top: 0;
background: rgba(255, 87, 87, 1);
}
.cont{
.cont {
width: 100%;
height: 10vw;
display: flex;
display: flex;
justify-content: space-between;
.ritcon{
.ritcon {
width: 19vw;
height: 100%;
.fwjd{
.fwjd {
width: 100%;
display: flex;
justify-content: space-between;
view{
view {
width: 8.1vw;
height: 3vw;
background: #EFF2F8;
@ -244,35 +388,41 @@
font-size: 1.3vw;
color: #B6B8BA;
}
.jx{
.jx {
background: linear-gradient(0deg, #F3FAFF, #E4F3FF, #CBE8FF);
color: #249BFA;
border: 1px solid #A8D4FF;
}
}
.rq{
.rq {
font-weight: 400;
font-size: 1.3vw;
color: #888888;
margin-bottom: 1vw;
text{
text {
font-size: 1.8vw;
font-weight: bolder;
color: rgba(85, 85, 85, 1);
}
}
}
.conle{
.conle {
width: 10vw;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
image{
image {
width: 6.3vw;
height: 6.3vw;
}
view{
view {
font-weight: bold;
font-size: 1.4vw;
color: #555555;
@ -280,20 +430,23 @@
}
}
}
.hli{
.hli {
width: 100%;
height: 2vw;
display: flex;
justify-content: space-between;
align-items: center;
.rig{
.rig {
width: 3.7vw;
height: 1.6vw;
position: relative;
display: flex;
justify-content: center;
align-items: center;
image{
image {
position: absolute;
width: 100%;
height: 100%;
@ -301,7 +454,8 @@
left: 0;
z-index: 1;
}
text{
text {
position: relative;
z-index: 2;
font-weight: 400;
@ -309,111 +463,74 @@
color: #FFFFFF;
}
}
.lig{
.lig {
font-weight: 400;
font-size: 1.2vw;
color: #666666;
display: flex;
justify-content: center;
align-items: center;
image{
image {
width: 1.7vw;
height: 1.7vw;
margin-right: 0.4vw;
}
}
}
}
}
.t-box{
.t-box {
width: 100%;
height: calc(100vh - 8vw);
display: flex;
justify-content: space-between;
margin-top: 1vw;
.rightscr{
.rightscr {
width: 65vw;
height: 100%;
background: #F9F9F9;
border-radius: 1.6vw;
overflow: hidden;
}
.leftscr{
.leftscr {
width: 30.4vw;
height: 100%;
}
}
.serchs {
width:96vw;
width: 96vw;
height: 3.3vw;
border-radius: 1.6vw;
display: flex;
align-items: center;
margin: 0.7vw 0 0;
justify-content: space-between;
.leftbtn {
width: 64vw;
height: 3.3vw;
border-radius: 1.6vw;
display: flex;
align-items: center;
margin: 0.7vw 0 0;
justify-content: space-between;
.leftbtn{
width: 64vw;
}
.rightbtn {
width: 30vw;
height: 3.3vw;
display: flex;
align-items: center;
justify-content: flex-end;
view {
width: 7.3vw;
height: 3.3vw;
display: flex;
align-items: center;
}
.rightbtn{
width: 30vw;
height: 3.3vw;
display: flex;
align-items: center;
justify-content: flex-end;
view{
width: 7.3vw;
height: 3.3vw;
border: 1px solid #D9DADC;
background: rgba(255, 255, 255, 1);
border-radius: 1.65vw;
font-weight: 400;
font-size: 1.4vw;
color: rgba(85, 85, 85, 1);
display: flex;
justify-content: center;
align-items: center;
margin-left:0.7vw;
color: #555555;
border: 1px solid #D9DADC;
image {
width: 1.5vw;
height: 1.3vw;
margin: 0 0.5vw 0 0;
}
}
}
.ipt {
display: flex;
align-items: center;
width: 27vw;
background: #E2E4E9;
border-radius: 1.65vw;
height: 3.3vw;
image {
width: 1.8vw;
height: 1.8vw;
margin:0 0.5vw;
}
input {
width: 25vw;
height: 3.3vw;
font-size: 1.4vw;
padding-left: 1.6vw;
}
}
.back{
width: 8vw;
height: 3.3vw;
border-radius: 1.6vw;
border: 1px solid #D9DADC;
background: rgba(255, 255, 255, 1);
border-radius: 1.65vw;
font-weight: 400;
@ -422,46 +539,99 @@
display: flex;
justify-content: center;
align-items: center;
margin-left:0.6vw;
border: 1px solid #D9DADC;
image {
width: 1.5vw !important;
height: 1.5vw !important;
margin: 0 0.5vw 0 0;
}
}
.rightbtn>view:active,.scr:active{
color: #1083F8;
background: linear-gradient(-45deg, rgba(223, 244, 252, 1), rgba(204, 228, 249, 0.43));
border: 1px solid #1083F8;
}
.scr {
border-radius: 1.65vw;
font-weight: 400;
font-size: 1.4vw;
display: flex;
justify-content: center;
align-items: center;
width: 7.3vw;
height: 3.3vw;
margin: 0 0 0 0.7vw;
background: rgba(255, 255, 255, 1);
border: 1px solid #D9DADC;
margin-left: 0.7vw;
color: #555555;
border: 1px solid #D9DADC;
image {
width: 1.5vw;
height: 1.3vw;
margin: 0 0.5vw 0 0;
}
}
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
.ipt {
display: flex;
align-items: center;
width: 27vw;
background: #E2E4E9;
border-radius: 1.65vw;
height: 3.3vw;
image {
width: 1.8vw;
height: 1.8vw;
margin: 0 0.5vw;
}
input {
width: 25vw;
height: 3.3vw;
font-size: 1.4vw;
padding-left: 1.6vw;
}
}
.back {
width: 8vw;
height: 3.3vw;
border-radius: 1.6vw;
background: rgba(255, 255, 255, 1);
border-radius: 1.65vw;
font-weight: 400;
font-size: 1.4vw;
color: rgba(85, 85, 85, 1);
display: flex;
justify-content: center;
align-items: center;
margin-left: 0.6vw;
border: 1px solid #D9DADC;
image {
width: 1.5vw !important;
height: 1.5vw !important;
margin: 0 0.5vw 0 0;
}
}
.rightbtn>view:active,
.scr:active {
color: #1083F8;
background: linear-gradient(-45deg, rgba(223, 244, 252, 1), rgba(204, 228, 249, 0.43));
border: 1px solid #1083F8;
}
.scr {
border-radius: 1.65vw;
font-weight: 400;
font-size: 1.4vw;
display: flex;
justify-content: center;
align-items: center;
width: 7.3vw;
height: 3.3vw;
margin: 0 0 0 0.7vw;
background: rgba(255, 255, 255, 1);
border: 1px solid #D9DADC;
color: #555555;
image {
width: 1.5vw;
height: 1.3vw;
margin: 0 0.5vw 0 0;
}
}
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>
<style>
page {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB