This commit is contained in:
Teng 2025-11-19 10:03:15 +08:00
parent 0dcbf8424f
commit fab9abe1ca
3 changed files with 111 additions and 52 deletions

View File

@ -2091,7 +2091,7 @@
directiveName: '' // directiveName directiveName: '' // directiveName
})) }))
})) }))
console.log("wtf",res.result.serviceList) console.log("wtf",res)
res.result.serviceList.forEach((res : any) => { res.result.serviceList.forEach((res : any) => {
timearr.value[res.positioning].children[res.positioningLong] = res; timearr.value[res.positioning].children[res.positioningLong] = res;
}) })

View File

@ -157,4 +157,13 @@ export const getGysList = () => {
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGysList`, url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGysList`,
method: 'get' method: 'get'
}) })
} }
//改价
export const editPrice = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editPrice`,
method: 'post',
data: params,
})
}

View File

@ -39,7 +39,7 @@
<view style="width: 100%;margin-top: 50rpx;font-size: 30rpx;"> <view style="width: 100%;margin-top: 50rpx;font-size: 30rpx;">
采购单价: 采购单价:
<text style="color: #888888;"> <text style="color: #888888;">
1.50 {{ gaijia }}
</text> </text>
</view> </view>
@ -47,17 +47,17 @@
<view style="font-size: 30rpx;margin-bottom: 10rpx;"> <view style="font-size: 30rpx;margin-bottom: 10rpx;">
到货单价 到货单价
</view> </view>
<view class="gray-input"> <view class="gray-input" style="width: 410rpx;">
¥1500.00 ¥ {{ gaijia }}
</view> </view>
</view> </view>
<view style="position: absolute;right: 30rpx;bottom: 30rpx;"> <view style="position: absolute;right: 30rpx;bottom: 30rpx;">
<view style="display: flex;"> <view style="display: flex;">
<view <view @click="opengaijia=false"
style="width: 160rpx;height: 75rpx;background-color: #ebeced;color: #888888;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;"> style="width: 160rpx;height: 75rpx;background-color: #ebeced;color: #888888;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;">
取消 取消
</view> </view>
<view <view @click="dogaijia"
style="width: 160rpx;height: 75rpx;;color: #0385FA;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;border: 1rpx solid #0385FA;background: linear-gradient(to bottom,#E9F4FF,#CAE0F9);margin: 0 40rpx;"> style="width: 160rpx;height: 75rpx;;color: #0385FA;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;border: 1rpx solid #0385FA;background: linear-gradient(to bottom,#E9F4FF,#CAE0F9);margin: 0 40rpx;">
确定 确定
</view> </view>
@ -66,50 +66,50 @@
</view> </view>
<view class="jianhuo-jianpan" style="right: -40rpx;bottom: 150rpx;"> <view class="jianhuo-jianpan" style="right: -40rpx;bottom: 150rpx;">
<view style="display: flex;width: 480rpx;"> <view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('1')">
1 1
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('2')">
2 2
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('3')">
3 3
</view> </view>
</view> </view>
<view style="display: flex;width: 480rpx;"> <view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('4')">
4 4
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('5')">
5 5
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('6')">
6 6
</view> </view>
</view> </view>
<view style="display: flex;width: 480rpx;"> <view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('7')">
7 7
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('8')">
8 8
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('9')">
9 9
</view> </view>
</view> </view>
<view style="display: flex;width: 480rpx;"> <view style="display: flex;width: 480rpx;">
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('AC')">
AC AC
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('0')">
0 0
</view> </view>
<view class="gray-button-jianpan"> <view class="gray-button-jianpan" @click="press('.')">
. .
</view> </view>
</view> </view>
@ -378,7 +378,6 @@
</view> </view>
</view> </view>
<view class="photowall-other-one" v-if="topbuttontarget==1"> <view class="photowall-other-one" v-if="topbuttontarget==1">
<view <view
style="width: 100%;height: 70%;display: flex;flex-direction: column;justify-content: center;align-items: center;background-color:#fafdff ;border: 1rpx solid #78B1EB;border-radius: 30rpx;"> style="width: 100%;height: 70%;display: flex;flex-direction: column;justify-content: center;align-items: center;background-color:#fafdff ;border: 1rpx solid #78B1EB;border-radius: 30rpx;">
<image style="width: 70rpx;height: 70rpx;margin-bottom: 5rpx;" <image style="width: 70rpx;height: 70rpx;margin-bottom: 5rpx;"
@ -641,10 +640,10 @@
随行单 随行单
</view> </view>
</view> </view>
<view :class="lefttarget==1?`contain-right-button`: `contain-right-button-bad`" <view :class="!Number(plsbuy[lefttarget]?.status)?`contain-right-button`: `contain-right-button-bad`"
style="border-color: #D9DADC;box-shadow: 0 1rpx 3rpx #D9DADC;"> style="border-color: #D9DADC;box-shadow: 0 1rpx 3rpx #D9DADC;" @click="bebad">
<image class="buttont-img" <image class="buttont-img"
:src="`/static/index/warehouse/procurement/picking/bebad${lefttarget==1?``:`target`}.png`" /> :src="`/static/index/warehouse/procurement/picking/bebad${!Number(plsbuy[lefttarget]?.status)?``:`target`}.png`" />
<view class="button-font"> <view class="button-font">
作废 作废
</view> </view>
@ -1077,7 +1076,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps, onUnmounted } from 'vue'; import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps, onUnmounted } from 'vue';
import { queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getCgrLis, getGysList, upload } from './api/lunpan.js' import { queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getCgrLis, getGysList, upload, editPrice } from './api/lunpan.js'
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app" import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import calendar from '@/component/public/calendar.vue' import calendar from '@/component/public/calendar.vue'
import superpicker from '@/component/public/superpicker.vue' import superpicker from '@/component/public/superpicker.vue'
@ -1088,6 +1087,52 @@
const opengaijia = ref(false); const opengaijia = ref(false);
const openjianhuo = ref(false); const openjianhuo = ref(false);
const opendata = ref(false); const opendata = ref(false);
const gaijia = ref("");
//
const dogaijia = () => {
// console.log("????",showvalue.value.id,gaijia.value)
editPrice({ id: showvalue.value.id, arrivalPrice: gaijia.value }).then((res) => {
// console.log("", showvalue.value.id,gaijia.value)
// console.log("res", res)
if (res.code == 200) {
showvalue.value.arrivalPrice = gaijia.value;
opengaijia.value = false;
}
})
}
//
function press(k : string) {
if (k === 'AC') {
gaijia.value = ''
return
}
//
if (k === '.') {
if (!gaijia.value.includes('.')) {
gaijia.value = gaijia.value === '' ? '0.' : gaijia.value + '.'
}
return
}
//
if (/^\d$/.test(k)) {
//
if (gaijia.value.includes('.')) {
const [i, d] = gaijia.value.split('.')
if ((d || '').length < 2) gaijia.value += k
return
}
// 4
let intPart = gaijia.value
if (intPart === '0') intPart = '' // 01
if (intPart.length < 4) gaijia.value = intPart + k
}
}
// //
const gysclick = (res : any) => { const gysclick = (res : any) => {
console.log("///", res); console.log("///", res);
@ -1107,6 +1152,7 @@
const opengaijiaclick = () => { const opengaijiaclick = () => {
opengaijia.value = true; opengaijia.value = true;
gaijia.value = (showvalue.value.arrivalPrice ? showvalue.value.arrivalPrice : showvalue.value.procurementPrice).toString()
donghuaopo.value = false; donghuaopo.value = false;
setTimeout(() => { setTimeout(() => {
donghuaopo.value = true; donghuaopo.value = true;
@ -1242,6 +1288,7 @@
const opencgr = ref(false); const opencgr = ref(false);
const opengys = ref(false); const opengys = ref(false);
const cgrlist = ref([]); const cgrlist = ref([]);
const gyslist = ref([]); const gyslist = ref([]);
@ -1315,7 +1362,7 @@
queryCgdList(plzinfo).then((res : any) => { queryCgdList(plzinfo).then((res : any) => {
plsbuy.value.push(...res.result.records) plsbuy.value.push(...res.result.records)
alltotal.value = res.result.total alltotal.value = res.result.total
// console.log("zzzz", res.result.total) console.log("请购单数据呢???", res)
if (res.result.records.length) { if (res.result.records.length) {
form.cgdId = plsbuy.value[0].id form.cgdId = plsbuy.value[0].id
queryInvo(); queryInvo();
@ -1361,13 +1408,7 @@
// console.log("!!!!",form) // console.log("!!!!",form)
queryCgdInfoList(form).then(res => { queryCgdInfoList(form).then(res => {
InvoicingList.value = [] InvoicingList.value = []
console.log("数据呢", res.result.records) // console.log("", res.result.records)
if (res.result.records.length == 1) {
InvoicingList.value.push(...res.result.records);
InvoicingList.value.push(...res.result.records);
InvoicingList.value.push(...res.result.records);
InvoicingList.value.push(...res.result.records);
}
InvoicingList.value.push(...res.result.records); InvoicingList.value.push(...res.result.records);
if (form.pageNo) { if (form.pageNo) {
clickmiddle(0); clickmiddle(0);
@ -1452,21 +1493,21 @@
} }
const moreindex = ref(-1); const moreindex = ref(-1);
const zuofeiindex = ref(-1); const zuofeiindex = ref(-1);
const openmore = (index : number) => { // const openmore = (index : number) => {
zuofeiindex.value = index; // zuofeiindex.value = index;
if (plsbuy.value[index].cgdType == '9') { // if (plsbuy.value[index].cgdType == '9') {
setTimeout(() => { // setTimeout(() => {
uni.showToast({ // uni.showToast({
title: '该采购单已作废', // title: '',
icon: 'error', // // icon: 'error', //
duration: 2000 // duration: 2000
}) // })
}, 300) // }, 300)
} else { // } else {
moreindex.value = index; // moreindex.value = index;
} // }
} // }
const shareShow = ref(false); const shareShow = ref(false);
const deletedownisopacity = ref(false) const deletedownisopacity = ref(false)
const share = () => { const share = () => {
@ -1497,13 +1538,20 @@
const badshow = ref(false); const badshow = ref(false);
const donghuacs = ref(false) const donghuacs = ref(false)
const bebad = () => { const bebad = () => {
badshow.value = true; // console.log("ceshi",Number(plsbuy.value[lefttarget.value]?.status))
moreindex.value = -1; // console.log("right?",plsbuy.value[lefttarget.value])
donghuacs.value = false; if (!Number(plsbuy.value[lefttarget.value]?.status) && plsbuy.value.length) {
setTimeout(() => donghuacs.value = true, 50) badshow.value = true;
moreindex.value = -1;
donghuacs.value = false;
setTimeout(() => donghuacs.value = true, 50)
}
// return
} }
const zuofei = () => { const zuofei = () => {
voidedCgdMain({ id: plsbuy.value[zuofeiindex.value].id }).then((res : any) => { voidedCgdMain({ id: plsbuy.value[lefttarget.value].id }).then((res : any) => {
// console.log("res", res) // console.log("res", res)
if (res.success) { if (res.success) {
uni.showToast({ uni.showToast({
@ -1989,6 +2037,7 @@
color: #888888; color: #888888;
text-align: center; text-align: center;
font-size: 25rpx; font-size: 25rpx;
overflow: hidden;
} }
.middle-heng-father { .middle-heng-father {
@ -2909,10 +2958,11 @@
// width: 100rpx; // width: 100rpx;
padding: 0 30rpx; padding: 0 30rpx;
letter-spacing: 10rpx; letter-spacing: 10rpx;
height: 100rpx; height: 100rpx;
border: 1rpx solid #CBCFD0; border: 1rpx solid #CBCFD0;
display: flex; display: flex;
justify-content: center; justify-content: flex-end;
align-items: center; align-items: center;
padding-left: 40rpx; padding-left: 40rpx;
margin-right: 10rpx; margin-right: 10rpx;