| | |
| | | // å·¡æ£ä¸ä¼ |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // éè´å
¥åºå表 |
| | | export function listPage(query) { |
| | | return request({ |
| | | url: '/stockin/listPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/stockin/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //èªå®ä¹å
¥åºå表 |
| | | export function listPageByCustom(query) { |
| | | return request({ |
| | | url: '/stockin/listPageByCustom', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | 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) { |
| | | 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, |
| | | }); |
| | | } |
| | | |
| | |
| | | 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', |
| | |
| | | { |
| | | "name" : "润泰çç©", |
| | | "appid" : "__UNI__115F1B1", |
| | | "name" : "åå¥ç¹", |
| | | "appid" : "__UNI__E1C100D", |
| | | "description" : "", |
| | | "versionName" : "1.0.0", |
| | | "versionCode" : "100", |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "receiptManagement/procurement-edit", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å
¥åº", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "issueManagement/index", |
| | | "style": { |
| | | "navigationBarTitleText": "åºåºç®¡ç", |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | </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(''); |
| | |
| | | { |
| | | icon: '/static/images/icon/huikuandengji@2x.png', |
| | | label: 'åºå管ç', |
| | | }, |
| | | { |
| | | icon: '/static/images/icon/huikuandengji@2x.png', |
| | | label: 'äº§åæ«ç ', |
| | | } |
| | | ]); |
| | | |
| | |
| | | url: '/pages/inventoryManagement/stockManagement/index' |
| | | }); |
| | | break |
| | | case 'äº§åæ«ç ': |
| | | scanQRCode() |
| | | break |
| | | default: |
| | | uni.showToast({ |
| | | title: `ç¹å»äº${item.label}`, |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | //å¼å§æ«ç |
| | | 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) { |
| | |
| | | <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> |
| | |
| | | uni.showLoading({ |
| | | title: 'å é¤ä¸...' |
| | | }) |
| | | let params = [goods.id] |
| | | let params = {ids:[goods.id]} |
| | | stockmanagementDel(params).then(res => { |
| | | uni.hideLoading() |
| | | reloadPage() |
| | |
| | | <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"> |
| | | <view style="border: 1px solid #f5f5f5;border-radius: 4rpx;padding: 20rpx;"> |
| | | <text>{{ userName||'è¯·éæ©' }}</text> |
| | | </view> |
| | | </picker> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | |
| | | const pageTitle = ref('é¢ç¨äº§å') |
| | | const userList = ref([]) |
| | | const userName = ref('') |
| | | const inboundNum0 = ref(0) |
| | | const goods = ref({ |
| | | id: 0, |
| | | quantity: 0, |
| | |
| | | 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({ |
| | |
| | | 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> |
| | |
| | | box-sizing: border-box; |
| | | margin-bottom: 20rpx; |
| | | padding: 20rpx; |
| | | background-color: #f5f5f5; |
| | | |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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" /> |
| | |
| | | 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') |
| | |
| | | taxExclusiveTotalPrice: 0, |
| | | taxInclusiveTotalPrice: 0, |
| | | taxInclusiveUnitPrice: 0, |
| | | dollarPrice: 0, |
| | | taxRate: 0, |
| | | unit: "", |
| | | url: "", |
| | |
| | | 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({ |
| | |
| | | if (e.errMsg == 'chooseMedia:fail cancel') { |
| | | return |
| | | } |
| | | if (e.errMsg == 'user cancel') { |
| | | return |
| | | } |
| | | uni.showToast({ |
| | | title: "ä¸ä¼ 失败", |
| | | icon: 'none', |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | const delItem = (index)=>{ |
| | | console.log('xxxx') |
| | | goodsList.value.splice(index,1) |
| | | } |
| | | const UploadImage = (url, index) => { |
| | | uni.uploadFile({ |
| | |
| | | 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 { |
| | |
| | | <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> |
| | |
| | | <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.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> |
| | |
| | | |
| | | <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) |
| | |
| | | } |
| | | |
| | | // æå¼ç¼è¾/æ°å¢ |
| | | const openForm = (goods,type) => { |
| | | 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) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // å页ç¸å
³ |
| | |
| | | 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() |
| | | }) |
| | |
| | | color: #999; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .item-box{ |
| | | box-sizing: border-box; |
| | | margin: 20rpx; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æµ®å¨æé®æ ·å¼ |
| | | .fab-button { |
| | | position: fixed; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |