From 5392dc649209ff372ec276aa6cbf86b16b12a375 Mon Sep 17 00:00:00 2001
From: 周宾 <2802492122@qq.com>
Date: 星期五, 26 十二月 2025 16:41:16 +0800
Subject: [PATCH] 天津双奇点-仓储物流板块开发
---
src/pages/index.vue | 77 ++++
src/pages/inventoryManagement/receiptManagement/index.vue | 99 ++++
src/pages/components/GoodsDetailPopup.vue | 290 +++++++++++++++
src/api/inventoryManagement/receiptManagement.js | 95 +++-
src/pages.json | 7
src/pages/inventoryManagement/issueManagement/index.vue | 53 ++
src/pages/inventoryManagement/stockManagement/index.vue | 47 ++
src/pages/inventoryManagement/receiptManagement/edit.vue | 94 ++++
src/pages/inventoryManagement/receiptManagement/procurement-edit.vue | 274 ++++++++++++++
src/pages/inventoryManagement/issueManagement/edit.vue | 35 +
src/config.js | 4
src/manifest.json | 4
src/pages/inventoryManagement/dispatchLog/index.vue | 40 ++
13 files changed, 1,066 insertions(+), 53 deletions(-)
diff --git a/src/api/inventoryManagement/receiptManagement.js b/src/api/inventoryManagement/receiptManagement.js
index 84543ac..cb285e2 100644
--- a/src/api/inventoryManagement/receiptManagement.js
+++ b/src/api/inventoryManagement/receiptManagement.js
@@ -1,37 +1,92 @@
// 宸℃涓婁紶
-import request from '@/utils/request'
+import request from "@/utils/request";
// 閲囪喘鍏ュ簱鍒楄〃
export function listPage(query) {
- return request({
- url: '/stockin/listPage',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/stockin/listPage",
+ method: "get",
+ params: query,
+ });
}
//鑷畾涔夊叆搴撳垪琛�
export function listPageByCustom(query) {
- return request({
- url: '/stockin/listPageByCustom',
- method: 'get',
- params: query
- })
+ return request({
+ url: "/stockin/listPageByCustom",
+ method: "get",
+ params: query,
+ });
}
//鏂板鑷畾涔夊叆搴�
// 鑾峰彇鐢ㄦ埛淇℃伅
export function addCustom(query) {
return request({
- url: '/stockin/addCustom',
- method: 'post',
- data: query
- })
+ url: "/stockin/addCustom",
+ method: "post",
+ data: query,
+ });
}
// 鍒犻櫎鑷畾涔夊叆搴�
- export function deleteCustom(query) {
+export function deleteCustom(query) {
return request({
- url: '/stockin/deleteCustom',
- method: 'delete',
- data: query
- })
+ url: "/stockin/deleteCustom",
+ method: "delete",
+ data: query,
+ });
}
+
+//鍒犻櫎閲囪喘鍏ュ簱
+export function stockinDel(query) {
+ return request({
+ url: "/stockin/del",
+ method: "post",
+ data: query,
+ });
+}
+export function detailManagementByCustom(query) {
+ return request({
+ url: "/stockin/detailManagementByCustom",
+ method: "get",
+ params: query,
+ });
+}
+// 閲囪喘鍏ュ簱-璇︽儏
+export function stockinDetail(query) {
+ return request({
+ url: "/stockin/detail",
+ method: "get",
+ params: query,
+ });
+}
+
+export function ledgerListPage(query) {
+ return request({
+ url: "/purchase/ledger/listPage",
+ method: "get",
+ params: query,
+ });
+}
+
+export function productlist(query) {
+ return request({
+ url: "/stockin/productlist",
+ method: "get",
+ params: query,
+ });
+}
+export function stockinAdd(query) {
+ return request({
+ url: "/stockin/add",
+ method: "post",
+ data: query,
+ });
+}
+export function stockinUpdate(query) {
+ return request({
+ url: "/stockin/update",
+ method: "post",
+ data: query,
+ });
+}
+
diff --git a/src/config.js b/src/config.js
index 8374896..23cfd41 100644
--- a/src/config.js
+++ b/src/config.js
@@ -2,7 +2,9 @@
const config = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://localhost/prod-api',
- baseUrl: 'http://192.168.1.147:7003', // 澶╂触鍙屽鐐�
+ // baseUrl: 'http://192.168.1.147:7003', // 澶╂触鍙屽鐐�
+ baseUrl: 'http://114.132.189.42:9042', // 澶╂触鍙屽鐐�
+ imgUrl: 'http://114.132.189.42:9044',
// baseUrl: 'http://114.132.189.42:9066', // 瀹佸娑︽嘲
// baseUrl: 'http://114.132.189.42:9068', // 鏂扮枂娴峰窛寮�蹇�
// baseUrl: 'http://192.168.1.147:9036',
diff --git a/src/manifest.json b/src/manifest.json
index 3d35fe5..b147a0d 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,6 +1,6 @@
{
- "name" : "娑︽嘲鐢熺墿",
- "appid" : "__UNI__115F1B1",
+ "name" : "鍙屽鐐�",
+ "appid" : "__UNI__E1C100D",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
diff --git a/src/pages.json b/src/pages.json
index 2d2d953..d995922 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -631,6 +631,13 @@
}
},
{
+ "path": "receiptManagement/procurement-edit",
+ "style": {
+ "navigationBarTitleText": "閲囪喘鍏ュ簱",
+ "navigationStyle": "custom"
+ }
+ },
+ {
"path": "issueManagement/index",
"style": {
"navigationBarTitleText": "鍑哄簱绠$悊",
diff --git a/src/pages/components/GoodsDetailPopup.vue b/src/pages/components/GoodsDetailPopup.vue
new file mode 100644
index 0000000..ec0bece
--- /dev/null
+++ b/src/pages/components/GoodsDetailPopup.vue
@@ -0,0 +1,290 @@
+<template>
+ <uni-popup
+ ref="popupRef"
+ type="center"
+ :round="20"
+ @close="handleClose"
+ @open="handleOpen"
+ >
+ <view class="dispatch-modal">
+ <!-- 澶撮儴 -->
+ <view class="modal-header">
+ <text class="modal-title">浜у搧璇︽儏</text>
+ <view class="close-btn" @click="handleClose">
+ <up-icon name="close" size="20" color="#999"></up-icon>
+ </view>
+ </view>
+
+ <!-- 琛ㄥ崟鍐呭 -->
+ <view class="modal-content">
+ <up-form
+ :model="detailData"
+ ref="formRef"
+ :rules="rules"
+ labelWidth="120"
+ >
+ <!-- 椤圭洰鍩烘湰淇℃伅 -->
+ <view class="form-section">
+ <text class="section-title">浜у搧淇℃伅</text>
+ <up-form-item v-if="detailType == 2" label="浜у搧鍥剧墖" prop="url">
+ <image :src="baseUrl+detailData.url" class="detail-img"></image>
+ </up-form-item>
+ <up-form-item label="浜у搧鍚嶇О" prop="productCategory">
+ <up-input
+ v-model="detailData.productCategory"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ <up-form-item label="浜у搧楂樺害" prop="specificationModel">
+ <up-input
+ v-model="detailData.specificationModelUnit"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ <up-form-item label="鍗曚环锛堝厓锛�/浠�" prop="taxInclusiveUnitPrice">
+ <up-input
+ v-model="detailData.taxInclusiveUnitPrice"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ <up-form-item label="鍗曚环锛堢編鍏冿級/浠�" prop="dollarPrice">
+ <up-input
+ v-model="detailData.dollarPrice"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ </view>
+
+ <!-- 鏁伴噺淇℃伅 -->
+ <view class="form-section">
+ <text class="section-title">鏁伴噺淇℃伅</text>
+ <up-form-item label="鍏ュ簱鏁伴噺/浠�" prop="inboundNum">
+ <up-input
+ v-model="detailData.inboundNum"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ <!-- <up-form-item label="鍑哄簱鏁伴噺/浠�" prop="totalInboundNum">
+ <up-input
+ v-model="detailData.totalInboundNum"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ <up-form-item label="搴撳瓨鏁伴噺/浠�" prop="inboundNum0" required>
+ <up-input
+ v-model="detailData.inboundNum0"
+ disabled
+ placeholder=""
+ />
+ </up-form-item> -->
+ <up-form-item label="姣忎欢鏁伴噺/鏀�" prop="boxNum" required>
+ <up-input
+ v-model="detailData.boxNum"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ </view>
+ <!-- 鍏朵粬淇℃伅 -->
+ <view class="form-section">
+ <text class="section-title">鍏朵粬淇℃伅</text>
+ <up-form-item label="绾哥瑙勬牸" prop="cartonSpecifications">
+ <up-input
+ v-model="detailData.cartonSpecifications"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ <up-form-item label="鍏ュ簱浜�" prop="createBy">
+ <up-input
+ v-model="detailData.createBy"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ <up-form-item label="鍏ュ簱鏃堕棿" prop="inboundDate">
+ <up-input
+ v-model="detailData.inboundDate"
+ disabled
+ placeholder=""
+ />
+ </up-form-item>
+ </view>
+
+ </up-form>
+ </view>
+ </view>
+ </uni-popup>
+</template>
+
+<script setup>
+import { ref, reactive } from 'vue';
+import config from '@/config'
+const baseUrl = config.baseUrl
+const emit = defineEmits(['confirm']);
+
+// 寮圭獥鏄剧ず鐘舵��
+const popupRef = ref();
+
+// 琛ㄥ崟鏁版嵁
+const detailData = reactive({});
+
+// 琛ㄥ崟楠岃瘉瑙勫垯
+const rules = reactive({});
+
+const detailType = ref(0)
+// 鎵撳紑寮圭獥
+const open = async (rowData) => {
+ try {
+ // 濉厖琛ㄥ崟鏁版嵁
+ Object.assign(detailData, {
+ ...rowData,
+ specificationModelUnit: rowData.specificationModel + rowData.unit,
+ totalInboundNum: rowData.totalInboundNum||0
+ });
+ popupRef.value.open()
+ detailType.value = rowData.type
+ } catch (error) {
+ console.log(error)
+ uni.showToast({
+ title: '鍔犺浇鐢ㄦ埛鍒楄〃澶辫触',
+ icon: 'error'
+ });
+ }
+};
+
+
+// 寮圭獥鎵撳紑浜嬩欢
+const handleOpen = () => {
+ // 寮圭獥鎵撳紑鏃剁殑澶勭悊
+};
+
+// 鍏抽棴寮圭獥
+const handleClose = () => {
+ popupRef.value.close()
+ // 閲嶇疆琛ㄥ崟
+ for (const key in detailData) {
+ detailData[key] = undefined;
+ }
+};
+
+// 鏆撮湶鏂规硶
+defineExpose({
+ open
+});
+</script>
+
+<style scoped lang="scss">
+.dispatch-modal {
+ background: #ffffff;
+ border-radius: 20px;
+ max-height: 80vh;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ box-sizing: border-box;
+ padding-bottom: 20rpx;
+}
+
+.modal-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20px 20px 0 20px;
+ border-bottom: 1px solid #f0f0f0;
+ padding-bottom: 16px;
+ margin-bottom: 20px;
+}
+
+.modal-title {
+ font-size: 18px;
+ font-weight: 600;
+ color: #333;
+}
+
+.close-btn {
+ padding: 4px;
+
+ &:active {
+ opacity: 0.7;
+ }
+}
+
+.modal-content {
+ flex: 1;
+ padding: 0 20px;
+ overflow-y: auto;
+ .datetime-picker-value{
+ font-size: 14px;
+ border: 1px solid #e5e5e5;
+ box-sizing: border-box;
+ border-radius: 4px;
+ padding: 0 5px;
+ padding-left: 10px;
+ position: relative;
+ display: flex;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ flex: 1;
+ height: 35px;
+ }
+}
+
+.form-section {
+ margin-bottom: 24px;
+}
+
+.section-title {
+ display: block;
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ margin-bottom: 16px;
+ padding-left: 8px;
+ border-left: 3px solid #2979ff;
+}
+
+.modal-footer {
+ display: flex;
+ gap: 12px;
+ padding: 20px;
+ border-top: 1px solid #f0f0f0;
+ background: #fafafa;
+}
+.detail-img {
+ width: 200rpx;
+ height: 200rpx;
+ border-radius: 8rpx;
+ background-color: #f5f5f5;
+}
+
+// uView 缁勪欢鏍峰紡璋冩暣
+:deep(.up-form-item) {
+ margin-bottom: 20px;
+}
+
+:deep(.up-input) {
+ background: #f8f9fa;
+ border-radius: 8px;
+}
+
+:deep(.up-input--disabled) {
+ background: #f0f0f0;
+ color: #999;
+}
+
+:deep(.up-number-box) {
+ background: #f8f9fa;
+ border-radius: 8px;
+}
+</style>
\ No newline at end of file
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 47eee18..c71cd5e 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -209,14 +209,17 @@
</up-grid>
</view>
</view>
+ <GoodsDetailPopup ref="refGoodsDetailPopup"></GoodsDetailPopup>
</view>
</template>
<script setup>
import {ref, onMounted, nextTick, reactive} from 'vue';
import {userLoginFacotryList} from "@/api/login";
+import { stockinDetail, detailManagementByCustom } from '@/api/inventoryManagement/receiptManagement'
import modal from "@/plugins/modal";
import useUserStore from "@/store/modules/user";
+import GoodsDetailPopup from './components/GoodsDetailPopup.vue';
const userStore = useUserStore()
const factoryId = ref('');
@@ -259,6 +262,10 @@
{
icon: '/static/images/icon/huikuandengji@2x.png',
label: '搴撳瓨绠$悊',
+ },
+ {
+ icon: '/static/images/icon/huikuandengji@2x.png',
+ label: '浜у搧鎵爜',
}
]);
@@ -558,6 +565,9 @@
url: '/pages/inventoryManagement/stockManagement/index'
});
break
+ case '浜у搧鎵爜':
+ scanQRCode()
+ break
default:
uni.showToast({
title: `鐐瑰嚮浜�${item.label}`,
@@ -612,6 +622,73 @@
});
}
+
+//寮�濮嬫壂鐮�
+const scanQRCode = ()=>{
+ uni.scanCode({
+ onlyFromCamera:true,
+ scanType:['barCode','qrCode'],
+ success(res) {
+ searchDetail(res.result||'')
+ },
+ fail(res) {
+ uni.showToast({
+ title: res.errMsg||'鎵爜澶辫触',
+ icon: 'none',
+ duration: 1500
+ })
+ }
+ })
+}
+
+//璋堟鐩稿叧
+const refGoodsDetailPopup = ref(null)
+
+
+//鏌ョ湅璇︽儏
+const searchDetail = (barcode)=>{
+ if(!barcode||barcode.indexOf(',')==-1){
+ uni.showToast({
+ title:"璇锋壂鎻忔纭殑浜岀淮鐮�",
+ icon: 'none',
+ duration: 1500
+ })
+ return
+ }
+ let barcodeList = barcode.split(",")
+ let barcodeId = barcodeList[0]
+ let type = barcodeList[1]
+ let detailApi = null
+ if(type==1){
+ detailApi = stockinDetail
+ }else if(type==2){
+ detailApi = detailManagementByCustom
+ }
+
+ if(!detailApi){
+ uni.showToast({
+ title:"璇锋壂鎻忔纭殑浜岀淮鐮�",
+ icon: 'none',
+ duration: 1500
+ })
+ return
+ }
+ detailApi({id:barcodeId}).then((resp) => {
+ if(resp.code!=200||!resp.data)return
+ // barcodeDetail.value = resp.data
+ refGoodsDetailPopup.value.open({
+ type: type,
+ ...resp.data
+ })
+ }).catch(() => {
+ uni.showToast({
+ title: "鑾峰彇鏁版嵁澶辫触",
+ icon: 'none',
+ duration: 1500
+ });
+ })
+}
+
// 瀹氫箟鏂规硶
const click = (name) => {
if (uToastRef.value) {
diff --git a/src/pages/inventoryManagement/dispatchLog/index.vue b/src/pages/inventoryManagement/dispatchLog/index.vue
index 3213394..14a7ed1 100644
--- a/src/pages/inventoryManagement/dispatchLog/index.vue
+++ b/src/pages/inventoryManagement/dispatchLog/index.vue
@@ -8,7 +8,43 @@
<view v-if="contentList?.length !== 0" class="content">
<view v-if="tabCurrent === 0">
<block v-for="item in contentList" :key="item.id">
- <view class="item-box item-box0"></view>
+ <view class="item-box item-box0">
+ <view class="item">
+ <view class="label">鍑哄簱鏃ユ湡</view>
+ <view class="value">{{ item.createTime }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧鍚嶇О</view>
+ <view class="value">{{ item.productCategory }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧楂樺害</view>
+ <view class="value">{{ item.specificationModel }}{{ item.unit }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍑哄簱鏁伴噺/浠�</view>
+ <view class="value">{{ item.inboundNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">姣忎欢鏁伴噺/鏀�</view>
+ <view class="value">{{ item.boxNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍗曚环锛堝厓锛�/鏀�</view>
+ <view class="value">{{ item.taxInclusiveUnitPrice }}</view>
+ </view>
+ <view class="item">
+ <view class="label">绾哥瑙勬牸</view>
+ <view class="value">{{ item.cartonSpecifications }}cm</view>
+ </view>
+ <view class="item">
+ <view class="label">鍑哄簱浜�</view>
+ <view class="value">{{ item.createBy }}</view>
+ </view>
+ <view class="item" style="justify-content: flex-end;">
+ <button class="mini-btn" type="warn" size="mini" style="margin-left: 0;margin-right: 0;" @click="deleteGoods(item)">鍒犻櫎</button>
+ </view>
+ </view>
</block>
<uni-load-more :status="loadMoreStatus"></uni-load-more>
</view>
@@ -130,7 +166,7 @@
uni.showLoading({
title: '鍒犻櫎涓�...'
})
- let params = [goods.id]
+ let params = {ids:[goods.id]}
stockmanagementDel(params).then(res => {
uni.hideLoading()
reloadPage()
diff --git a/src/pages/inventoryManagement/issueManagement/edit.vue b/src/pages/inventoryManagement/issueManagement/edit.vue
index a98d6d8..b212925 100644
--- a/src/pages/inventoryManagement/issueManagement/edit.vue
+++ b/src/pages/inventoryManagement/issueManagement/edit.vue
@@ -9,14 +9,16 @@
<uni-easyinput v-model="productCategory" placeholder="" disabled />
</uni-forms-item>
<uni-forms-item label="鍑哄簱鏁伴噺/浠�" required>
- <uni-number-box v-model="goods.quantity" :min="0"></uni-number-box>
+ <uni-number-box v-model="goods.quantity" :min="0" :max="inboundNum0"></uni-number-box>
</uni-forms-item>
<uni-forms-item label="鍑哄簱鏃ユ湡" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="goods.time" />
</uni-forms-item>
<uni-forms-item label="鍑哄簱浜�" required>
<picker :range="userList" @change="swichUser" range-key="nickName">
- <text>{{ userName||'璇烽�夋嫨' }}</text>
+ <view style="border: 1px solid #f5f5f5;border-radius: 4rpx;padding: 20rpx;">
+ <text>{{ userName||'璇烽�夋嫨' }}</text>
+ </view>
</picker>
</uni-forms-item>
</uni-forms>
@@ -38,6 +40,7 @@
const pageTitle = ref('棰嗙敤浜у搧')
const userList = ref([])
const userName = ref('')
+const inboundNum0 = ref(0)
const goods = ref({
id: 0,
quantity: 0,
@@ -52,6 +55,30 @@
uni.navigateBack()
}
const submitForm = async () => {
+ if(!goods.value.quantity){
+ uni.showToast({
+ title:'璇锋坊鍔犲嚭搴撴暟閲�',
+ icon: 'none',
+ duration: 1500
+ })
+ return
+ }
+ if(!goods.value.time){
+ uni.showToast({
+ title:'璇烽�夋嫨鍑哄簱鏃ユ湡',
+ icon: 'none',
+ duration: 1500
+ })
+ return
+ }
+ if(!goods.value.userId){
+ uni.showToast({
+ title:'璇烽�夋嫨鍑哄簱浜�',
+ icon: 'none',
+ duration: 1500
+ })
+ return
+ }
let res = await stockout(goods.value)
if (res.code !== 200) {
uni.showToast({
@@ -83,6 +110,8 @@
let _goods = JSON.parse(props.goods)
goods.value.id = _goods.id
productCategory.value = _goods.productCategory
+ inboundNum0.value = _goods.inboundNum0
+ goods.value.type = _goods.purchaseContractNumber?1:3
initContacts()
})
</script>
@@ -99,7 +128,7 @@
box-sizing: border-box;
margin-bottom: 20rpx;
padding: 20rpx;
- background-color: #f5f5f5;
+
border-radius: 20rpx;
}
diff --git a/src/pages/inventoryManagement/issueManagement/index.vue b/src/pages/inventoryManagement/issueManagement/index.vue
index 73243c8..785bd92 100644
--- a/src/pages/inventoryManagement/issueManagement/index.vue
+++ b/src/pages/inventoryManagement/issueManagement/index.vue
@@ -7,7 +7,52 @@
<view v-if="contentList?.length !== 0" class="content">
<view v-if="tabCurrent === 0">
<block v-for="item in contentList" :key="item.id">
- <view class="item-box item-box0"></view>
+ <view class="item-box item-box0">
+ <view class="item">
+ <view class="label">鍏ュ簱鏃堕棿</view>
+ <view class="value">{{ item.inboundDate }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧鍚嶇О</view>
+ <view class="value">{{ item.productCategory }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧楂樺害</view>
+ <view class="value">{{ item.specificationModel }}{{ item.unit }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍏ュ簱鏁伴噺/浠�</view>
+ <view class="value">{{ item.inboundNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">搴撳瓨鏁伴噺/浠�</view>
+ <view class="value">{{ item.inboundNum0 }}</view>
+ </view>
+ <view class="item">
+ <view class="label">姣忎欢鏁伴噺/鏀�</view>
+ <view class="value">{{ item.boxNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍗曚环锛堝厓锛�/浠�</view>
+ <view class="value">{{ item.taxInclusiveUnitPrice }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍗曚环锛堢編鍏冿級/浠�</view>
+ <view class="value">{{ item.dollarPrice }}</view>
+ </view>
+ <view class="item">
+ <view class="label">绾哥瑙勬牸</view>
+ <view class="value">{{ item.cartonSpecifications }}cm</view>
+ </view>
+ <view class="item">
+ <view class="label">鍏ュ簱浜�</view>
+ <view class="value">{{ item.createBy }}</view>
+ </view>
+ <view class="item" style="justify-content: flex-end;">
+ <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
+ @click="openForm(item, 'edit')">棰嗙敤</button>
+ </view>
+ </view>
</block>
<uni-load-more :status="loadMoreStatus"></uni-load-more>
</view>
@@ -45,10 +90,14 @@
<view class="value">{{ item.boxNum }}</view>
</view>
<view class="item">
- <view class="label">鍗曚环锛堝厓锛�/鏀�</view>
+ <view class="label">鍗曚环锛堝厓锛�/浠�</view>
<view class="value">{{ item.taxInclusiveUnitPrice }}</view>
</view>
<view class="item">
+ <view class="label">鍗曚环锛堢編鍏冿級/浠�</view>
+ <view class="value">{{ item.dollarPrice }}</view>
+ </view>
+ <view class="item">
<view class="label">绾哥瑙勬牸</view>
<view class="value">{{ item.cartonSpecifications }}cm</view>
</view>
diff --git a/src/pages/inventoryManagement/receiptManagement/edit.vue b/src/pages/inventoryManagement/receiptManagement/edit.vue
index 4a2438d..2060ea8 100644
--- a/src/pages/inventoryManagement/receiptManagement/edit.vue
+++ b/src/pages/inventoryManagement/receiptManagement/edit.vue
@@ -2,15 +2,18 @@
<PageHeader :title="pageTitle" @back="goBack" />
<view class="account-detail">
<view class="box">
- <view v-if="type == 'add'">
+ <view v-if="type == 'add'" style="margin-bottom: 20rpx;">
<button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
@click="addItem">鏂板</button>
</view>
<view v-for="(item, index) in goodsList" class="form-box">
+ <button v-if="type == 'add'" class="mini-btn del-btn" type="warn" size="mini" style="margin-left: 0;margin-right: 0;"
+ @click="delItem(index)">鍒犻櫎</button>
<uni-forms :key="index" label-position="top" label-width="400rpx">
<uni-forms-item label="浜у搧鍥剧墖" required>
<view class="add-img">
- <image v-if="item.url" class="img" :src="baseUrl + item.url" mode="aspectFill" />
+ <image v-if="item.url" class="img" :src="baseUrl + item.url" mode="aspectFill"
+ @click="addImg(index)" />
<uni-icons v-else type="camera-filled" size="56" style="color: #8a8a8a"
@click="addImg(index)"></uni-icons>
</view>
@@ -33,8 +36,11 @@
<uni-forms-item label="姣忎欢鏁伴噺/鏀�" required>
<uni-number-box v-model="item.boxNum" :min="0"></uni-number-box>
</uni-forms-item>
- <uni-forms-item label="鍗曚环锛堝厓锛�/鏀�" required>
+ <uni-forms-item label="鍗曚环锛堝厓锛�/浠�" required>
<uni-number-box v-model="item.taxInclusiveUnitPrice" :min="0" :step="0.01"></uni-number-box>
+ </uni-forms-item>
+ <uni-forms-item label="鍗曚环锛堢編鍏冿級/浠�" required>
+ <uni-number-box v-model="item.dollarPrice" :min="0" :step="0.01"></uni-number-box>
</uni-forms-item>
<uni-forms-item label="鍏ュ簱鏃ユ湡" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="item.inboundDate" />
@@ -55,7 +61,7 @@
import { getToken } from "@/utils/auth";
import { addCustom } from '@/api/inventoryManagement/receiptManagement.js'
import config from '@/config'
-const baseUrl = config.baseUrl
+const baseUrl = config.imgUrl
const pageTitle = ref('鏂板鑷畾涔夊叆搴�')
const goodsList = ref([])
const type = ref('add')
@@ -73,6 +79,7 @@
taxExclusiveTotalPrice: 0,
taxInclusiveTotalPrice: 0,
taxInclusiveUnitPrice: 0,
+ dollarPrice: 0,
taxRate: 0,
unit: "",
url: "",
@@ -81,7 +88,64 @@
const goBack = () => {
uni.navigateBack()
}
+const showToast = (msg)=>{
+ uni.showToast({
+ title: msg,
+ icon: 'none',
+ duration: 1500
+ })
+}
const submitForm = async() => {
+ if (!goodsList.value.length) {
+ showToast('璇疯嚦灏戞坊鍔犱竴鏉′骇鍝佹暟鎹�')
+ return
+ }
+
+ // 楠岃瘉鑷畾涔夋坊鍔犵殑鏁版嵁蹇呭~瀛楁
+ for (let i = 0; i < goodsList.value.length; i++) {
+ const product = goodsList.value[i];
+ if (!product.productCategory || !product.specificationModel || !product.unit) {
+ showToast(`绗�${i + 1}琛屼骇鍝佹暟鎹湭濉啓瀹屾暣锛堜骇鍝併�佷骇鍝侀珮搴︺�侀珮搴﹀崟浣嶄负蹇呭~锛塦)
+ return
+ }
+ if (!product.url) {
+ showToast(`绗�${i + 1}琛屼骇鍝佹湭涓婁紶浜у搧鍥剧墖`)
+ return
+ }
+ if (!product.cartonSpecifications) {
+ showToast(`绗�${i + 1}琛屼骇鍝佹湭濉啓绾哥瑙勬牸`)
+ return
+ }
+ // if (!product.itemType) {
+ // proxy.$modal.msgError(`绗�${i + 1}琛岃閫夋嫨鐗╁搧绫诲瀷`)
+ // return
+ // }
+ const stock = Number(product?.inboundNum ?? 0);
+ if (!Number.isFinite(stock) || stock <= 0) {
+ showToast(`绗�${i + 1}琛屾湰娆″叆搴撴暟閲忛渶澶т簬0`)
+ return
+ }
+ const boxNum = Number(product?.boxNum ?? 0);
+ if (!Number.isFinite(boxNum) || boxNum <= 0) {
+ showToast(`绗�${i + 1}琛屾瘡浠舵暟閲�/鏀渶澶т簬0`)
+ return
+ }
+ const taxInclusiveUnitPrice = Number(product?.taxInclusiveUnitPrice ?? 0);
+ if (!Number.isFinite(taxInclusiveUnitPrice) || taxInclusiveUnitPrice <= 0) {
+ showToast(`绗�${i + 1}琛屽崟浠凤紙鍏冿級闇�澶т簬0`)
+ return
+ }
+ const dollarPrice = Number(product?.dollarPrice ?? 0);
+ if (!Number.isFinite(dollarPrice) || dollarPrice <= 0) {
+ showToast(`绗�${i + 1}琛屽崟浠凤紙缇庡厓锛夐渶澶т簬0`)
+ return
+ }
+ if (!product.inboundDate) {
+ showToast(`绗�${i + 1}琛岃閫夋嫨鍏ュ簱鏃ユ湡`)
+ return
+ }
+
+ }
let res = await addCustom(goodsList.value)
if(res.code !== 200){
uni.showToast({
@@ -128,6 +192,9 @@
if (e.errMsg == 'chooseMedia:fail cancel') {
return
}
+ if (e.errMsg == 'user cancel') {
+ return
+ }
uni.showToast({
title: "涓婁紶澶辫触",
icon: 'none',
@@ -135,6 +202,10 @@
})
}
})
+}
+const delItem = (index)=>{
+ console.log('xxxx')
+ goodsList.value.splice(index,1)
}
const UploadImage = (url, index) => {
uni.uploadFile({
@@ -194,8 +265,21 @@
box-sizing: border-box;
margin-bottom: 20rpx;
padding: 20rpx;
- background-color: #f5f5f5;
+ // background-color: #f5f5f5;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+ transition: box-shadow 0.3s ease;
border-radius: 20rpx;
+ position: relative;
+ .del-btn{
+ position: absolute;
+ right: 20rpx;
+ top: 40rpx;
+ z-index: 40;
+ }
+}
+
+.form-box:hover {
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.add-img {
diff --git a/src/pages/inventoryManagement/receiptManagement/index.vue b/src/pages/inventoryManagement/receiptManagement/index.vue
index 81a3a2c..5985e72 100644
--- a/src/pages/inventoryManagement/receiptManagement/index.vue
+++ b/src/pages/inventoryManagement/receiptManagement/index.vue
@@ -8,7 +8,50 @@
<view v-if="contentList?.length !== 0" class="content">
<view v-if="tabCurrent === 0">
<block v-for="item in contentList" :key="item.id">
- <view class="item-box item-box0"></view>
+ <view class="item-box item-box0">
+ <view class="item">
+ <view class="label">鍏ュ簱鏃堕棿</view>
+ <view class="value">{{ item.createTime }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧鍚嶇О</view>
+ <view class="value">{{ item.productCategory }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧楂樺害</view>
+ <view class="value">{{ item.specificationModel }}{{ item.unit }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍏ュ簱鏁伴噺/浠�</view>
+ <view class="value">{{ item.inboundNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">姣忎欢鏁伴噺/鏀�</view>
+ <view class="value">{{ item.boxNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍗曚环锛堝厓锛�/浠�</view>
+ <view class="value">{{ item.taxInclusiveUnitPrice }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍗曚环锛堢編鍏冿級/浠�</view>
+ <view class="value">{{ item.dollarPrice }}</view>
+ </view>
+ <view class="item">
+ <view class="label">绾哥瑙勬牸</view>
+ <view class="value">{{ item.cartonSpecifications }}cm</view>
+ </view>
+ <view class="item">
+ <view class="label">鍏ュ簱浜�</view>
+ <view class="value">{{ item.createBy }}</view>
+ </view>
+ <view class="item" style="justify-content: flex-end;">
+ <button class="mini-btn" type="warn" size="mini" style="margin-left: 0;margin-right: 20rpx;"
+ @click="deleteGoods(item)">鍒犻櫎</button>
+ <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
+ @click="openForm(item, 'edit')">缂栬緫</button>
+ </view>
+ </view>
</block>
<uni-load-more :status="loadMoreStatus"></uni-load-more>
</view>
@@ -42,8 +85,12 @@
<view class="value">{{ item.boxNum }}</view>
</view>
<view class="item">
- <view class="label">鍗曚环锛堝厓锛�/鏀�</view>
+ <view class="label">鍗曚环锛堝厓锛�/浠�</view>
<view class="value">{{ item.taxInclusiveUnitPrice }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍗曚环锛堢編鍏冿級/浠�</view>
+ <view class="value">{{ item.dollarPrice }}</view>
</view>
<view class="item">
<view class="label">绾哥瑙勬牸</view>
@@ -54,15 +101,17 @@
<view class="value">{{ item.createBy }}</view>
</view>
<view class="item" style="justify-content: flex-end;">
- <button class="mini-btn" type="warn" size="mini" style="margin-left: 0;margin-right: 20rpx;" @click="deleteGoods(item)">鍒犻櫎</button>
- <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;" @click="openForm(item,'edit')">缂栬緫</button>
+ <button class="mini-btn" type="warn" size="mini" style="margin-left: 0;margin-right: 20rpx;"
+ @click="deleteGoods(item)">鍒犻櫎</button>
+ <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
+ @click="openForm(item, 'edit')">缂栬緫</button>
</view>
</view>
</block>
<uni-load-more :status="loadMoreStatus"></uni-load-more>
</view>
</view>
- <view class="fab-button" @click="openForm({},'add')">
+ <view class="fab-button" @click="openForm({}, 'add')">
<up-icon name="plus" size="24" color="#ffffff"></up-icon>
</view>
<view v-if="contentList?.length === 0" class="no-data">
@@ -73,10 +122,10 @@
<script setup>
import { ref, reactive, computed } from 'vue'
-import { listPage, listPageByCustom,deleteCustom } from '@/api/inventoryManagement/receiptManagement.js'
+import { listPage, listPageByCustom, deleteCustom,stockinDel } from '@/api/inventoryManagement/receiptManagement.js'
import { onShow, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import config from '@/config'
-const baseUrl = config.baseUrl
+const baseUrl = config.imgUrl
// tab鐩稿叧
const tabItems = reactive(['閲囪喘鍏ュ簱', '鎴愬搧鍏ュ簱'])
const tabCurrent = ref(0)
@@ -94,10 +143,16 @@
}
// 鎵撳紑缂栬緫/鏂板
-const openForm = (goods,type) => {
- uni.navigateTo({
- url: '/pages/inventoryManagement/receiptManagement/edit?goods=' + JSON.stringify(goods)
- })
+const openForm = (goods) => {
+ if (tabCurrent.value === 0) {
+ uni.navigateTo({
+ url: '/pages/inventoryManagement/receiptManagement/procurement-edit?goods=' + JSON.stringify(goods)
+ })
+ } else {
+ uni.navigateTo({
+ url: '/pages/inventoryManagement/receiptManagement/edit?goods=' + JSON.stringify(goods)
+ })
+ }
}
// 鍒嗛〉鐩稿叧
@@ -132,7 +187,7 @@
contentList.value = []
getList()
}
-const deleteGoods = async (goods) => {
+const deleteGoods = async (goods) => {
uni.showModal({
title: '鎻愮ず',
content: '纭畾瑕佸垹闄よ鍟嗗搧鐨勫叆搴撳悧锛�',
@@ -141,8 +196,20 @@
uni.showLoading({
title: '鍒犻櫎涓�...'
})
- let params = [goods.id]
- deleteCustom(params).then(res => {
+ let params = {}
+ let deleteApi = ''
+ if(tabCurrent.value == 0){
+ deleteApi = stockinDel
+ params = {
+ ids:[goods.id],
+ type: 1
+ }
+ }else{
+ deleteApi = deleteCustom
+ params = [goods.id]
+ }
+
+ deleteApi(params).then(res => {
uni.hideLoading()
reloadPage()
})
@@ -195,7 +262,8 @@
color: #999;
font-size: 14px;
}
-.item-box{
+
+.item-box {
box-sizing: border-box;
margin: 20rpx;
padding: 20rpx;
@@ -219,6 +287,7 @@
}
}
}
+
// 娴姩鎸夐挳鏍峰紡
.fab-button {
position: fixed;
diff --git a/src/pages/inventoryManagement/receiptManagement/procurement-edit.vue b/src/pages/inventoryManagement/receiptManagement/procurement-edit.vue
new file mode 100644
index 0000000..d9c4976
--- /dev/null
+++ b/src/pages/inventoryManagement/receiptManagement/procurement-edit.vue
@@ -0,0 +1,274 @@
+<template>
+ <PageHeader :title="pageTitle" @back="goBack" />
+ <view class="account-detail">
+ <view class="box">
+ <view style="margin-bottom: 20rpx;">
+ <uni-data-select v-model="ledgerVlaue" :localdata="ledgerList" placeholder="璇烽�夋嫨閲囪喘璁㈠崟鍙�"
+ :disabled="type == 'edit'" @change="switchLedger"></uni-data-select>
+ </view>
+ <view v-for="(item, index) in goodsList" class="form-box" :key="index">
+ <checkbox-group v-if="type == 'add'" @change="switchCheck(index)">
+ <checkbox value="cb" style="transform:scale(0.7)" />
+ </checkbox-group>
+ <uni-forms :key="index" label-position="top" label-width="400rpx">
+ <!-- <uni-forms-item label="浜у搧鍥剧墖" required>
+ <view class="add-img">
+ <image v-if="item.url" class="img" :src="baseUrl + item.url" mode="aspectFill"
+ @click="addImg(index)" />
+ <uni-icons v-else type="camera-filled" size="56" style="color: #8a8a8a"
+ @click="addImg(index)"></uni-icons>
+ </view>
+ </uni-forms-item> -->
+ <uni-forms-item label="鍚嶇О" required>
+ <uni-easyinput v-model="item.productCategory" placeholder="璇疯緭鍏ュ悕绉�" disabled />
+ </uni-forms-item>
+ <uni-forms-item label="楂樺害" required>
+ <uni-easyinput v-model="item.specificationModel" type="number" placeholder="璇疯緭鍏ラ珮搴�" disabled />
+ </uni-forms-item>
+ <uni-forms-item label="楂樺害鍗曚綅" required>
+ <uni-easyinput v-model="item.unit" placeholder="璇疯緭鍏ラ珮搴﹀崟浣�" disabled />
+ </uni-forms-item>
+ <uni-forms-item label="绾哥瑙勬牸" required>
+ <uni-easyinput v-model="item.cartonSpecifications" placeholder="璇疯緭鍏ョ焊绠辫鏍�"
+ :disabled="type == 'edit'" />
+ </uni-forms-item>
+ <uni-forms-item label="寰呭叆搴撴暟閲�/浠�" required>
+ <uni-number-box v-model="item.quantity0" :min="0" disabled></uni-number-box>
+ </uni-forms-item>
+ <uni-forms-item label="鍏ュ簱鏁伴噺/浠�" required>
+ <uni-number-box v-model="item.quantityStock" :min="0" :max="item.quantity0"></uni-number-box>
+ </uni-forms-item>
+ <uni-forms-item label="姣忎欢鏁伴噺/鏀�" required>
+ <uni-number-box v-model="item.boxNum" :min="0" :disabled="type == 'edit'"></uni-number-box>
+ </uni-forms-item>
+ <uni-forms-item label="鍗曚环锛堝厓锛�/浠�" required>
+ <uni-number-box v-model="item.taxInclusiveUnitPrice" :min="0" :step="0.01"
+ disabled></uni-number-box>
+ </uni-forms-item>
+ <uni-forms-item label="鍗曚环锛堢編鍏冿級/浠�" required>
+ <uni-number-box v-model="item.dollarPrice" :min="0" :step="0.01"
+ :disabled="type == 'edit'"></uni-number-box>
+ </uni-forms-item>
+ </uni-forms>
+ </view>
+ <view style="display: flex;justify-content: flex-end;">
+ <button class="mini-btn" type="primary" size="mini"
+ style="margin-left: 0;margin-right: 0;margin-right: 20rpx;" @click="submitForm">纭畾</button>
+ <button class="mini-btn" size="mini" style="margin-left: 0;margin-right: 0;" @click="goBack">鍙栨秷</button>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script setup>
+import { onMounted, ref } from 'vue'
+import { ledgerListPage, productlist, stockinAdd, stockinUpdate } from '@/api/inventoryManagement/receiptManagement.js'
+import useUserStore from '@/store/modules/user'
+const userStore = useUserStore()
+const pageTitle = ref('鏂板鑷畾涔夊叆搴�')
+const goodsList = ref([])
+const type = ref('add')
+const props = defineProps(['goods'])
+const defaultGoods = {
+ boxNum: 0,
+ cartonSpecifications: "",
+ id: null,
+ inboundDate: "",
+ quantityStock: 0,
+ itemType: "",
+ productCategory: "",
+ specificationModel: "",
+ supplierName: "",
+ taxExclusiveTotalPrice: 0,
+ taxInclusiveTotalPrice: 0,
+ taxInclusiveUnitPrice: 0,
+ dollarPrice: 0,
+ taxRate: 0,
+ unit: "",
+ url: "",
+}
+const switchCheck = (index) => {
+ goodsList.value[index].checked = !goodsList.value[index].checked
+}
+const goBack = () => {
+ uni.navigateBack()
+}
+const submitForm = async () => {
+ let _list = []
+ goodsList.value.map(item => {
+ if (item.checked && type.value == 'add') {
+ item.inboundQuantity = item.quantityStock
+ item.unitPrice = item.taxInclusiveUnitPrice
+ _list.push(item)
+ }
+ if (type.value == 'edit') {
+ _list.push({ ...item, quantityStock: item.inboundNum })
+ }
+ })
+ if (_list.length === 0) {
+ uni.showToast({
+ title: '璇烽�夋嫨瑕佸叆搴撶殑浜у搧',
+ icon: 'none'
+ })
+ return
+ }
+ let pamaes = {
+ }
+ let supplierName = ''
+ ledgerList.value.map((item) => {
+ if (ledgerVlaue.value == item.value) {
+ supplierName = item.supplierName
+ }
+ })
+ if (type.value == 'add') {
+ pamaes = {
+ entryDate: getCurrentDate(),
+ purchaseContractNumber: ledgerVlaue.value,
+ inboundBatch: '',
+ inboundTime: formatDateTime(),
+ nickName: userStore.nickName,
+ remark: '',
+ supplierId: null,
+ supplierName: supplierName,
+ recorderName: userStore.name,
+ id: null,
+ details: _list
+ }
+ } else {
+ pamaes = {
+ id: _list[0].id,
+ quantityStock: _list[0].quantityStock
+ }
+ }
+ console.log('pamaes', pamaes)
+ let requiredApi = ''
+ if (type.value == 'add') {
+ requiredApi = stockinAdd
+ } else {
+ requiredApi = stockinUpdate
+ }
+ let res = await requiredApi(pamaes)
+ if (res.code !== 200) {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none'
+ })
+ return
+ }
+ uni.showToast({
+ title: '鏂板鎴愬姛',
+ icon: 'none'
+ })
+ goBack()
+}
+
+function getCurrentDate() {
+ return formatDateTime(new Date(), false);
+}
+function formatDateTime(date = new Date(), includeTime = true) {
+ const d = new Date(date);
+ const year = d.getFullYear();
+ const month = String(d.getMonth() + 1).padStart(2, '0');
+ const day = String(d.getDate()).padStart(2, '0');
+
+ if (!includeTime) {
+ return `${year}-${month}-${day}`;
+ }
+
+ const hours = String(d.getHours()).padStart(2, '0');
+ const minutes = String(d.getMinutes()).padStart(2, '0');
+ const seconds = String(d.getSeconds()).padStart(2, '0');
+
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+}
+
+//閲囪喘璁㈠崟鍙风浉鍏�
+
+const ledgerList = ref([])
+const ledgerVlaue = ref(0)
+const getLedgerList = async (_goods) => {
+ let res = await ledgerListPage({ current: -1, size: -1 })
+ if (res.code !== 200) return
+ ledgerList.value = res.data?.records || []
+ ledgerList.value = ledgerList.value.map(item => {
+ return {
+ text: item.purchaseContractNumber + '路' + item.supplierName,
+ value: item.purchaseContractNumber,
+ supplierName: item.supplierName
+ }
+ })
+ if (_goods.id) {
+ ledgerList.value.map(item => {
+ if (item.value == _goods.purchaseContractNumber) {
+ ledgerVlaue.value = _goods.purchaseContractNumber
+ switchLedger(_goods.purchaseContractNumber)
+ }
+
+ })
+ }
+}
+
+const switchLedger = (purchaseContractNumber) => {
+ getGoodsList(purchaseContractNumber)
+}
+const getGoodsList = async (purchaseContractNumber) => {
+ let res = await productlist({ purchaseContractNumber })
+ if (res.code !== 200) return
+ if (type.value == 'edit') {
+ goodsList.value.map((el) => {
+ res.data.map(item => {
+ if (el.id == item.recordId) {
+ el.quantity0 = item.quantity0
+ }
+ })
+ })
+ } else {
+ goodsList.value = res.data.map(item => {
+ return { ...defaultGoods, ...item }
+ })
+ }
+
+}
+onMounted(() => {
+ let _goods = JSON.parse(props.goods)
+ if (_goods.id) {
+ pageTitle.value = '缂栬緫鑷畾涔夊叆搴�'
+ type.value = 'edit'
+ goodsList.value.push({ ...defaultGoods, ..._goods })
+ }
+ getLedgerList(_goods)
+ userStore.getInfo()
+})
+</script>
+<style lang="scss" scoped>
+.box {
+ background-color: #fff;
+ box-sizing: border-box;
+ padding: 20rpx;
+ min-height: 80rpx;
+ padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
+}
+
+.form-box {
+ box-sizing: border-box;
+ margin-bottom: 20rpx;
+ padding: 20rpx;
+ // background-color: #f5f5f5;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+ transition: box-shadow 0.3s ease;
+ border-radius: 20rpx;
+}
+
+.form-box:hover {
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
+}
+
+.add-img {
+ .img {
+ background-color: #efefef;
+ border-radius: 10rpx;
+ width: 200rpx;
+ height: 200rpx;
+ }
+}
+</style>
\ No newline at end of file
diff --git a/src/pages/inventoryManagement/stockManagement/index.vue b/src/pages/inventoryManagement/stockManagement/index.vue
index 1adaca5..96f8001 100644
--- a/src/pages/inventoryManagement/stockManagement/index.vue
+++ b/src/pages/inventoryManagement/stockManagement/index.vue
@@ -7,7 +7,48 @@
<view v-if="contentList?.length !== 0" class="content">
<view v-if="tabCurrent === 0">
<block v-for="item in contentList" :key="item.id">
- <view class="item-box item-box0"></view>
+ <view class="item-box item-box0">
+ <view class="item">
+ <view class="label">鍏ュ簱鏃堕棿</view>
+ <view class="value">{{ item.inboundDate }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧鍚嶇О</view>
+ <view class="value">{{ item.productCategory }}</view>
+ </view>
+ <view class="item">
+ <view class="label">浜у搧楂樺害</view>
+ <view class="value">{{ item.specificationModel }}{{ item.unit }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍏ュ簱鏁伴噺/浠�</view>
+ <view class="value">{{ item.inboundNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">搴撳瓨鏁伴噺/浠�</view>
+ <view class="value">{{ item.inboundNum0 }}</view>
+ </view>
+ <view class="item">
+ <view class="label">姣忎欢鏁伴噺/鏀�</view>
+ <view class="value">{{ item.boxNum }}</view>
+ </view>
+ <view class="item">
+ <view class="label">鍗曚环锛堝厓锛�/鏀�</view>
+ <view class="value">{{ item.taxInclusiveUnitPrice }}</view>
+ </view>
+ <view class="item">
+ <view class="label">绾哥瑙勬牸</view>
+ <view class="value">{{ item.cartonSpecifications }}cm</view>
+ </view>
+ <view class="item">
+ <view class="label">鍏ュ簱浜�</view>
+ <view class="value">{{ item.createBy }}</view>
+ </view>
+ <!-- <view class="item" style="justify-content: flex-end;">
+ <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
+ @click="openForm(item, 'edit')">缂栬緫</button>
+ </view> -->
+ </view>
</block>
<uni-load-more :status="loadMoreStatus"></uni-load-more>
</view>
@@ -56,10 +97,10 @@
<view class="label">鍏ュ簱浜�</view>
<view class="value">{{ item.createBy }}</view>
</view>
- <view class="item" style="justify-content: flex-end;">
+ <!-- <view class="item" style="justify-content: flex-end;">
<button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
@click="openForm(item, 'edit')">缂栬緫</button>
- </view>
+ </view> -->
</view>
</block>
<uni-load-more :status="loadMoreStatus"></uni-load-more>
--
Gitblit v1.9.3