huangxw 1 일 전
부모
커밋
180708522a

+ 14 - 0
src/pages.json

@@ -412,6 +412,20 @@
                     "style": {
                         "navigationBarTitleText": "销售登记成功"
                     }
+                },
+                // 成品销售登记
+                {
+                    "path": "finished-product/sales-register/index",
+                    "style": {
+                        "navigationBarTitleText": "成品销售登记"
+                    }
+                },
+                // 销售登记记录清单
+                {
+                    "path": "finished-product/sales-record-list/index",
+                    "style": {
+                        "navigationBarTitleText": "销售登记记录清单"
+                    }
                 }
             ]
         },

+ 11 - 13
src/plant/models/warehouseCard/product-item.vue

@@ -37,20 +37,18 @@
             <span class="c-#666">存放库房:</span>
             <span class="c-#333 f-w-500">{{ getStorageRoomNames(item?.warehouses) || '-' }}</span>
         </view>
-        <view class="d-flex">
-            <view class="pd2-4-0 f-s-28 d-flex w-50%">
-                <view class="c-#666 w-s-no">入库量:</view>
-                <view class="d-flex flex-cln">
-                    <span class="c-#333 f-w-500 d-flex a-c">{{ item?.specn }}*{{ item?.capacity }}{{ item?.unit }}</span>
-                    <span class="c-#333 f-w-500 d-flex a-c" v-if="item?.restSpecn">{{ item?.restSpecn }}*1{{ item?.unit }}</span>
-                </view>
+        <view class="pd2-4-0 f-s-28 d-flex">
+            <view class="c-#666 w-s-no">入库量:</view>
+            <view>
+                <span class="c-#333 f-w-500 mr-30">{{ item?.specn }}*{{ item?.capacity }}{{ item?.unit }}</span>
+                <span class="c-#333 f-w-500" v-if="item?.restSpecn">{{ item?.restSpecn }}*1{{ item?.unit }}</span>
             </view>
-            <view class="pd2-4-0 f-s-28 d-flex w-50%">
-                <span class="c-primary w-s-no">剩余量:</span>
-                <view class="d-flex flex-cln">
-                    <span class="c-primary f-w-500">{{ item?.specn }}*{{ +item?.restAmount }}{{ item?.unit }}</span>
-                    <span class="c-primary f-w-500 d-flex a-c" v-if="+item?.restRestAmount">{{ item?.restSpecn }}*{{ item?.restRestAmount }}{{ item?.unit }}</span>
-                </view>
+        </view>
+        <view class="pd2-4-0 f-s-28 d-flex%">
+            <span class="c-primary w-s-no">剩余量:</span>
+            <view>
+                <span class="c-primary f-w-500 mr-30">{{ item?.specn }}*{{ +item?.restAmount }}{{ item?.unit }}</span>
+                <span class="c-primary f-w-500" v-if="+item?.restRestAmount">{{ item?.restSpecn }}*{{ item?.restRestAmount }}{{ item?.unit }}</span>
             </view>
         </view>
     </view>

+ 10 - 3
src/plant/storage/finished-product/list/model/finished-product-bottom.vue

@@ -18,7 +18,13 @@
                     <view class="f-s-28 c-#333">下载货位卡</view>
                     <view class="f-s-22 c-#999">库存结余清晰</view>
                 </view>
-                <view class="d-flex flex-cln a-c pt-24">
+                <view
+                    @click="
+                        clickBtnBall();
+                        $u.route({ url: '/plant/storage/finished-product/sales-record-list/index' });
+                    "
+                    class="d-flex flex-cln a-c pt-24"
+                >
                     <view>
                         <image class="w-68 h-68" src="https://yujin-szyy.oss-cn-chengdu.aliyuncs.com/szyy/images-plt/plant/storage/xsdjjlqd.png" mode="widthFix" />
                     </view>
@@ -29,8 +35,9 @@
                     class="flex1 d-flex flex-cln a-c pt-160 pr-30"
                     @click="
                         clickBtnBall();
-                        $u.route({ url: '/plant/storage/finished-product/add/index' });
-                    ">
+                        $u.route({ url: '/plant/storage/finished-product/sales-register/index' });
+                    "
+                >
                     <view>
                         <image class="w-68 h-68" src="https://yujin-szyy.oss-cn-chengdu.aliyuncs.com/szyy/images-plt/plant/storage/xsdj_addbz.png" mode="widthFix" />
                     </view>

+ 3 - 0
src/plant/storage/finished-product/sales-record-list/index.vue

@@ -0,0 +1,3 @@
+<template>
+    <view>xx</view>
+</template>

+ 97 - 0
src/plant/storage/finished-product/sales-register/index.vue

@@ -0,0 +1,97 @@
+<template>
+    <z-paging ref="paging" bgColor="#f7f7f7" safe-area-inset-bottom scroll-with-animation>
+        <template #top>
+            <ut-navbar :title="'销售登记'" :fixed="false" border></ut-navbar>
+        </template>
+        <up-form class="p-rtv bg-#fff" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
+            <view class="pd-24 bg-#fff mb-10">
+                <view class="h-1" id="inputStorageIdpppp"></view>
+                <up-form-item borderBottom label="选择包装对象" prop="inputStorageId" required>
+                    <view class="flex1">
+                        <up-button v-if="!form.inputStorageId" @click="selectStorage" type="primary" plain>
+                            <image class="w-36 h-36 mr-10" src="https://yujin-szyy.oss-cn-chengdu.aliyuncs.com/szyy/images-plt/common/select_push_icon.png" mode="widthFix" />
+                            <span>请选择您要包装的对象</span>
+                        </up-button>
+                    </view>
+                </up-form-item>
+                <view class="h-1" id="storageUseAmountpppp"></view>
+                <up-form-item borderBottom label="本次包装用量" prop="storageUseAmount" required>
+                    <up-input v-model="form.storageUseAmount" placeholder="请输入本次包装用量" border="none" clearable></up-input>
+                    <template #right>
+                        <span class="f-s-30 f-w-5 c-#333">{{ form?.storageUseUnit || 'kg' }}</span>
+                    </template>
+                </up-form-item>
+            </view>
+        </up-form>
+    </z-paging>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+import { formItemBtnStyle } from '@/assets/styles/uview-plus';
+import NP from 'number-precision';
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_pack_ref_type, pt_pack_spec_unit, pt_expire_date_unit } = toRefs<any>(proxy?.useDict('pt_pack_ref_type', 'pt_pack_spec_unit', 'pt_expire_date_unit'));
+const upFormRef = ref();
+const paging = ref();
+const form = ref({
+   
+});
+
+const rules = reactive<Record<string, any>>({
+   
+});
+
+const submit = () => {
+    uni.$u.debounce(async () => {
+        try {
+            await upFormRef.value?.validate();
+        } catch (error: any) {
+            const firstErrorField = error && error[0].field + 'pppp';
+            paging.value?.scrollIntoViewById(firstErrorField, 30, true);
+            return;
+        }
+
+        try {
+           
+        } catch (e) {
+            console.error('销售登记失败:', e);
+        }
+    }, 500, true);
+};
+// 点击随机生成服务端生成唯一的批号
+const generateBatchCode = async () => {
+    uni.showLoading({
+        title: '生成中...',
+    });
+    const res = await useClientRequest.post('/plt-api/app/plantationTask/getBatchCode', {
+        plType: 'Z',
+        linkType: 'I',
+    });
+    if (res && res.code === 200) {
+        uni.hideLoading();
+        form.value.packSn = res.data;
+        uni.showToast({
+            title: '批号生成成功',
+            icon: 'success',
+        });
+    }
+};
+// 去选择包装对象页选择包装对象,选择后返回并赋值
+const selectStorage = () => {
+    uni.$on('selectStorageObject', (data: any) => {
+      
+    });
+};
+const deleteStorage = () => {
+  
+};
+onLoad((options: any) => {});
+</script>
+<style lang="scss" scoped>
+.close-icon {
+    position: absolute;
+    top: 0;
+    right: 0;
+    z-index: 1;
+}
+</style>