初始上传

This commit is contained in:
2026-04-04 17:27:12 +08:00
parent 4d80d28eb4
commit b7e11774ee
11191 changed files with 1588469 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
<template>
<base-page>
<view class="stock-body">
<view class="content-wrap" @click="goodsShow = false">
<view class="title">{{ screen.document_id ? '编辑入库单' : '添加入库单' }}</view>
<view class="screen-warp form-content">
<view class="form-item">
<label class="form-label">
<text class="required">*</text>
入库单号
</label>
<view class="form-inline input">
<input type="text" v-model="screen.document_no" :disabled="screen.document_id != ''" placeholder="请输入入库单号" />
</view>
</view>
<view class="form-item">
<label class="form-label">
<text class="required">*</text>
入库时间
</label>
<view class="form-inline">
<uni-datetime-picker v-model="screen.time" type="timestamp" :clearIcon="false" @change="changeTime" />
</view>
</view>
<view class="form-item store-info">
<view class="form-label">当前门店</view>
<view class="form-inline">{{ globalStoreInfo.store_name }}</view>
</view>
<view class="form-item store-info">
<view class="form-label">当前操作人</view>
<view class="form-inline">{{ userInfo ? userInfo.username : '' }}</view>
</view>
</view>
<view class="tips text-color" v-if="globalStoreInfo.stock_config && globalStoreInfo.stock_config.is_audit == 1">
说明待审核状态下只有经办人允许修改只有变为已审核状态后才会使库存发生变化已审核状态的单据不允许再修改</view>
<view class="table-wrap">
<view class="table-head">
<view class="table-tr">
<view class="table-th" style="flex: 3;">产品名称/规格/编码</view>
<view class="table-th" style="flex: 1;">当前库存</view>
<view class="table-th" style="flex: 1;">单位</view>
<view class="table-th" style="flex: 2;">成本价</view>
<view class="table-th" style="flex: 2;">数量</view>
<view class="table-th" style="flex: 1;">总金额</view>
<view class="table-th" style="flex: 1;">操作</view>
</view>
</view>
<view class="table-body">
<view class="table-tr">
<view class="table-td select-goods-input" style="flex: 3;" @click.stop="goodsShow = true">
<input type="text" @confirm="getGoodsData($event, -1)" placeholder="请输入产品名称/规格/编码" v-model="params.search_text" />
<text class="iconfont icontuodong" @click="getGoodsData({ detail: null }, -1)"></text>
</view>
<view class="table-td" style="flex: 1;"></view>
<view class="table-td" style="flex: 1;"></view>
<view class="table-td" style="flex: 2;"></view>
<view class="table-td" style="flex: 2;"></view>
<view class="table-td" style="flex: 1;"></view>
<view class="table-td" style="flex: 1;"></view>
</view>
<block v-for="(item, index) in goodsList" :key="index">
<view class="table-tr" v-if="goodsIdArr.includes(item.sku_id)">
<view class="table-td goods-name" style="flex: 3;">{{ item.title }}</view>
<view class="table-td" style="flex: 1;">{{ item.real_stock || 0 }}</view>
<view class="table-td" style="flex: 1;">{{ item.unit || '件' }}</view>
<view class="table-td" style="flex: 2;">
<input type="number" v-model="item.goods_price" placeholder="请输入成本价" @input="calcTotalData" />
</view>
<view class="table-td" style="flex: 2;">
<input type="number" v-model="item.goods_num" placeholder="请输入数量" @input="calcTotalData" />
</view>
<view class="table-td" style="flex: 1;">
{{ (item.goods_num * item.goods_price || 0).toFixed(2) }}
</view>
<view class="table-td" style="flex: 1;">
<button type="default" class="delete" @click="delGoods(item.sku_id)">删除</button>
</view>
</view>
</block>
<view class="table-tr table-empty" v-if="!goodsIdArr.length">暂无数据请选择商品数据</view>
</view>
</view>
</view>
<view class="action-wrap">
<view class="table-total">合计{{ totalData.kindsNum }} 种产品合计金额{{ totalData.price.toFixed(2) }}</view>
<view class="btn-wrap">
<button type="default" class="remark default" @click="$refs.remarkPopup.open()">备注</button>
<button type="default" class="stockout-btn" @click="stockOutFn" :loading="isSubmit">入库</button>
<button type="default" class="default" @click="backFn">返回</button>
</view>
</view>
</view>
<stock-goods-dialog v-model="dialogVisible" :params="params" @selectGoods="selectGoods" />
<uni-popup ref="tipsPop" type="center">
<view class="confirm-pop">
<view class="title">单据保存后将处于"待审核"状态只有经办人可以编辑或删除等操作是否确认保存</view>
<view class="btn">
<button type="primary" class="default-btn btn save" @click="$refs.tipsPop.close()">取消</button>
<button type="primary" class="primary-btn btn" @click="save">确定</button>
</view>
</view>
</uni-popup>
<uni-popup ref="remarkPopup" type="center">
<view class="remark-wrap">
<view class="header">
<text class="title">备注</text>
<text class="iconfont iconguanbi1" @click="$refs.remarkPopup.close()"></text>
</view>
<view class="body">
<textarea v-model="remark" placeholder="填写备注信息" placeholder-class="placeholder-class" />
</view>
<view class="footer">
<button type="default" class="primary-btn" @click="remarkConfirm">确认</button>
</view>
</view>
</uni-popup>
</base-page>
</template>
<script>
import stockin from "./public/js/stockin"
import stockGoodsDialog from '@/components/stock-goods-dialog/stock-goods-dialog.vue';
export default {
components: {
stockGoodsDialog
},
mixins: [stockin]
};
</script>
<style lang="scss" scoped>
@import './public/css/editStock.scss';
</style>