MrShi
2025-01-24 803033cc4e734ac9eb3062f215b654b4ae9d02c4
Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
已修改8个文件
150 ■■■■■ 文件已修改
admin/src/views/stock/components/AssetSel.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/components/OutEdit.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/record.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/inventory/detail.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/inventory/index.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/login.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/wait.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/components/AssetSel.vue
@@ -55,6 +55,7 @@
        total: 0
      },
      isOut: false,
      warehouseId: false,
      list: [],
      selList: [],
      cateList: [],
@@ -79,7 +80,7 @@
      this.selList = val
    },
    getList(page) {
      const { pagination, searchForm, isOut } = this
      const { pagination, searchForm, isOut, warehouseId } = this
      this.listLoading = true
      if(page){pagination.page = page}
      console.log('isOut', isOut);
@@ -88,7 +89,7 @@
      fn({
        capacity: pagination.pageSize,
        page: pagination.page,
        model: {...searchForm,status: 0}
        model: {...searchForm,status: 0, warehouseId}
      }).then((res) => {
        this.listLoading = false
        this.list = res.records
admin/src/views/stock/components/OutEdit.vue
@@ -4,7 +4,7 @@
    <el-form :model="param" ref="form" :rules="rules">
      <div class="df_ac">
        <el-form-item class="w3" label="出库仓库" prop="warehouseId">
          <el-select :disabled="param.id" v-model="param.warehouseId" placeholder="请选择">
          <el-select :disabled="param.id" @change="changeStore" v-model="param.warehouseId" placeholder="请选择">
            <el-option v-for="op in storeList" :key="op.id" :label="op.name" :value="op.id"></el-option>
          </el-select>
        </el-form-item>
@@ -116,6 +116,9 @@
        }
      })
    },
    changeStore() {
      this.list = []
    },
    initData() {
      this.$set(this.param, 'doneDate', dayjs().format('YYYY-MM-DD'))
      getStoreList({ capacity: 9999, page: 1, model: {status: 0} }).then(res => {
@@ -139,10 +142,12 @@
    },
    handleOpenMaterial() {
      if(!this.param.warehouseId) return Message.warning('请先选择出库仓库')
      this.isShowSel = true
      this.$nextTick(() => {
        this.$refs.AssetSelRef.isShowModal = true
        this.$refs.AssetSelRef.isOut = true
        this.$refs.AssetSelRef.warehouseId = this.param.warehouseId
        this.$refs.AssetSelRef.getList()
        console.log('-----');
        
admin/src/views/stock/record.vue
@@ -142,7 +142,7 @@
        this.isShowOutDetail = true
        this.$nextTick(() => {
          this.$refs.OutDetailRef.visible = true
          this.$refs.OutDetailRef.getDetail(row.outInBoundId)
          this.$refs.OutDetailRef.getDetail(item.outInBoundId)
        })
      }
    },
h5/manifest.json
@@ -131,7 +131,7 @@
                    // "target" : "http://172.20.10.7:10010", // 代理服务器域名或IP地址
                    // "target" : "http://192.168.0.163:10010", // 代理服务器域名或IP地址
                    // "target" : "http://10.50.250.253:8088/gateway_interface", // 代理服务器域名或IP地址
                    "target" : "https://zhcg.fnwtzx.com/gateway_interface", // 代理服务器域名或IP地址
                    "target" : "https://dmtest.ahapp.net/gateway_interface", // 代理服务器域名或IP地址
                    "changeOrigin" : true, // 允许跨域 
                    "pathRewrite" : {
                        "^/gateway_interface" : ""
h5/pages/inventory/detail.vue
@@ -14,25 +14,25 @@
            <view class="head_wrap">
                <view class="search_wrap">
                    <image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
                    <input v-model="param.materialCode" @confirm="handleQuery" type="text" placeholder="搜索资产编码/资产名称"
                    <input v-model="param.materialCode" @confirm="handleQuery()" type="text" placeholder="搜索物料编码/物料名称"
                        placeholder-class="placeholder9" />
                </view>
            </view>
            <!--  -->
            <scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
                <view class="list">
                    <view class="item" v-for="item in list">
                        <view class="line">
                    <view class="item" v-for="item in list" @click="itemClick(item)">
                        <view class="head">
                            <view class="title">{{item.materialName}}</view>
                            <view class="status red" v-if="item.type == 1">盘亏</view>
                            <view class="status primaryColor" v-if="item.type == 2">盘盈</view>
                        </view>
                        <view class="line">资产编码:{{item.materialCode}}</view>
                        <view class="line">物料编码:{{ item.materialCode }}</view>
                        <view class="line">条码:{{item.materialQrcode}}</view>
                        <view class="line">规格型号:{{item.materialAttr}}</view>
                        <view class="line">
                        <view class="line" v-if="item.status == 0">
                            <view class="">账面数量:{{item.stock}}{{item.materialUnitName}}</view>
                            <view v-if="item.status == 0" @click="openEheck(item)" class="btn">执行盘点</view>
                            <view @click.stop="openEheck(item)" class="btn">执行盘点</view>
                        </view>
                        <view class="static" v-if="item.status == 1">
                            <view class="ite">
@@ -52,11 +52,11 @@
                </view>
            </scroll-view>
            <view class="footer_btn">
                <view @click="openQrcode" v-if="activeTab== 0" class="sweep">
                <view @click="openQrcode" v-if="activeTab == 0 && info.status == 1" class="sweep">
                    <image src="@/static/side/ic_saoma@2x.png" mode=""></image>
                    <view class="">扫码盘点</view>
                </view>
                <view @click="showTip = true" v-if="activeTab== 1" class="sweep sub_result">
                <view @click="showTip = true" v-if="activeTab == 1 && info.status == 1" class="sweep sub_result">
                    <view class="">提交盘点结果</view>
                </view>
            </view>
@@ -65,7 +65,7 @@
                <view class="modal_wrap">
                    <view class="modal_title">执行盘点</view>
                    <view class="title">{{modalForm.materialName}}</view>
                    <view class="item">资产编码:{{modalForm.materialCode}}</view>
                    <view class="item">物料编码:{{ modalForm.materialCode }}</view>
                    <view class="item">条码:{{modalForm.materialQrcode}}</view>
                    <view class="item">品牌:{{modalForm.materialBrand}}</view>
                    <view class="item">规格型号:{{modalForm.materialAttr}}</view>
@@ -82,10 +82,12 @@
                            <view class="la">盘点数量:</view>
                            <view class="val">
                                <view class="wrap">
                                    <template v-if="!modalForm.handleType">
                                    <image v-if="!modalForm.actStock" src="@/static/side/btn_jian_grey@2x.png" mode=""></image>
                                    <image v-else @click="changeAct(-1)" src="@/static/side/btn_jian@3x.png" mode=""></image>
                                    <input type="number" v-model="modalForm.actStock"></input>
                                    <image @click="changeAct(1)" src="@/static/side/btn_jia@3x.png" mode=""></image>
                                    </template>
                                    <input :disabled="Boolean(modalForm.handleType && modalForm.handleType == 'detail')" type="digit" v-model="modalForm.actStock"></input>
                                    <image v-if="!modalForm.handleType" @click="changeAct(1)" src="@/static/side/btn_jia@3x.png" mode=""></image>
                                </view>
                                <view class="unit">{{modalForm.materialUnitName}}</view>
                            </view>
@@ -93,10 +95,10 @@
                    </view>
                    <view class="remark">
                        <view class="la">备注:</view>
                        <textarea v-model="modalForm.remark" placeholder="请填写备注" :maxlength="-1" placeholder-class="placeholder9"
                        <textarea v-model="modalForm.remark" :disabled="Boolean(modalForm.handleType && modalForm.handleType == 'detail')" placeholder="请填写备注" :maxlength="-1" placeholder-class="placeholder9"
                            cols="30" rows="10"></textarea>
                    </view>
                    <view class="btns">
                    <view v-if="!modalForm.handleType" class="btns">
                        <view class="btn" @click="showModal = false">取消</view>
                        <view class="btn sub" @click="onSubmit">提交</view>
                    </view>
@@ -133,7 +135,7 @@
    } from '@/api'
    import {
        Html5Qrcode
    } from 'html5-qrcode';
} from 'html5-qrcode'
    export default {
        data() {
            return {
@@ -153,7 +155,7 @@
                html5Qrcode: null,
                isScaning: false,
            };
        }
        },
        onLoad(op) {
            this.id = op.id
@@ -161,11 +163,18 @@
            this.getList()
        },
        methods: {
            checkSub() {
                const {
                    modalForm
                } = this
                // let str = modalForm.unFinishAmount > 0 ? '还有三项物料'
        itemClick(item) {
            if(item.status == 1){
                this.showItem(item)
            }
        },
        showItem(item){
            this.showModal = true
            this.modalForm = {
                ...item,
                handleType: this.info.status != 1 ? 'detail' : ''
            }
            console.log('modalForm', this.modalForm);
            },
            getDetail() {
                const {
@@ -176,12 +185,12 @@
                })
            },
            handleQuery() {
        handleQuery(str) {
                this.list = []
                this.page = 1
                this.getList()
            this.getList(str)
            },
            getList() {
        getList(str) {
                const {
                    page,
                    activeTab,
@@ -192,7 +201,7 @@
                    capacity: 20,
                    page,
                    model: {
                        status: activeTab,
                    status: str || activeTab,
                        stocktakingId: id,
                        ...param
                    }
@@ -203,8 +212,6 @@
                        this.openEheck(this.list[0])
                        this.$set(this.param, 'materialQrcode', null)
                    }
                })
            },
            scrolltolower() {
@@ -260,10 +267,10 @@
                
            },
            openQrcode() {
                this.isScaning = true;
            this.isScaning = true
                Html5Qrcode.getCameras().then((devices) => {
                    if (devices && devices.length) {
                        this.html5Qrcode = new Html5Qrcode('reader');
                    this.html5Qrcode = new Html5Qrcode('reader')
                        this.html5Qrcode.start({
                                facingMode: 'environment'
                            }, {
@@ -275,22 +282,22 @@
                                if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
                                    this.stopScan()
                                    this.$set(this.param, 'materialQrcode', decodeText)
                                    this.handleQuery()
                                this.handleQuery('null')
                                }
                            },
                            (err) => {
                                // console.log(err);  //错误信息
                            }
                        );
                    )
                    }
                });
            })
            },
            stopScan() {
                console.log('停止扫码')
                this.isScaning = false;
            this.isScaning = false
                if (this.html5Qrcode) {
                    this.html5Qrcode.stop();
                this.html5Qrcode.stop()
                }
            }
        }
@@ -388,8 +395,19 @@
                font-size: 34rpx;
                color: #222222;
                margin-bottom: 10rpx;
            flex: 1;
            }
        .head{
            display: flex;
            // align-items: center;
            justify-content: space-between;
            color: #666666;
            .status{
                width: 76rpx;
                text-align: right;
                padding-top: 3rpx;
            }
        }
            .line {
                height: 60rpx;
                display: flex;
h5/pages/inventory/index.vue
@@ -8,6 +8,7 @@
            </view>
        </view>
        <!--  -->
        <scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
        <view class="list">
            <view class="item" @click="itemClick(item)" v-for="item in list">
                <image v-if="item.status == 0 || item.status == 1" class="img" src="@/static/side/ic_pandian@2x.png" mode="">
@@ -25,11 +26,12 @@
                    <view class="line">盘点仓库:{{item.warehouseName}}</view>
                    <view class="line">
                        <view class="">盘点人员:{{item.userName}}</view>
                        <view class="btn" v-if="item.status == 0" @click="startHandle(item)">开始盘点</view>
                            <view class="btn" v-if="item.status == 0 && item.timeFlag" @click="startHandle(item)">开始盘点</view>
                    </view>
                </view>
            </view>
        </view>
        </scroll-view>
    </view>
</template>
@@ -38,6 +40,7 @@
        getYwStocktaking,
        ywStocktakingBegin
    } from '@/api'
    import dayjs from 'dayjs';
    export default {
        data() {
            return {
@@ -64,11 +67,15 @@
                    }
                }).then(res => {
                    this.list = [...this.list, ...res.data.records]
                    let date = dayjs().format('YYYY-MM-DD')
                    this.list.forEach(item => {
                        item.timeFlag = new Date(item.planDate).getTime() <= new Date(date+' 23:59:59').getTime()
                    })
                    this.total = res.data.total
                })
            },
            itemClick(item) {
                if(item.status == 1){
                if (item.status != 0) {
                    uni.navigateTo({
                        url: '/pages/inventory/detail?id=' + item.id
                    })
@@ -112,15 +119,14 @@
<style lang="scss">
    .main_app {
        padding: 10rpx 30rpx 0;
        padding: 0rpx 30rpx 0;
        font-size: 28rpx;
    }
    .head_wrap {
        display: flex;
        align-items: center;
        margin-bottom: 40rpx;
        height: 110rpx;
        .search_wrap {
            display: flex;
            align-items: center;
@@ -141,15 +147,16 @@
        }
    }
    .scroll_Y{
        height: calc(100vh - 126rpx);
    }
    .list {
        height: calc(100vh - 136rpx);
        .item {
            display: flex;
            border-bottom: 1rpx solid #E5E5E5;
            padding-bottom: 28rpx;
            margin-bottom: 20rpx;
            .img {
                width: 80rpx;
                height: 80rpx;
@@ -163,7 +170,7 @@
                .head {
                    display: flex;
                    align-items: center;
                    // align-items: center;
                    justify-content: space-between;
                    margin-bottom: 12rpx;
@@ -171,10 +178,13 @@
                        font-weight: 600;
                        font-size: 34rpx;
                        color: #222222;
                        flex: 1;
                    }
                    .status {
                        color: $primaryColor;
                        width: 96rpx;
                        padding-top: 3rpx;
                    }
                    .green {
h5/pages/login.vue
@@ -46,6 +46,7 @@
                    phone: '',
                    code: ''
                },
                ywinfo: {},
                downTime: 0,
                code: ''
            }
@@ -53,6 +54,11 @@
        onLoad(option) {
            console.log('onLoad');
            // https://zhcg.fnwtzx.com/#/pages/login?type=0&ywid=ywid
            const ywinfo = uni.getStorageSync('ywinfo') || {}
            if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
                this.ywinfo = ywinfo
                uni.setStorageSync('ywinfo', {})
            }
            if (option.ywid || option.ywid == 0) {
                uni.setStorageSync('ywinfo', {
                    type: option.type,
@@ -84,11 +90,10 @@
                            getUserInfo().then(ress => {
                                that.$store.commit('setUserInfo', ress.data)
                            })
                            const ywinfo = uni.getStorageSync('ywinfo') || {}
                            const ywinfo = this.ywinfo
                            if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
                                getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
                                    if(res.data && res.data.id){
                                        uni.setStorageSync('ywinfo', {})
                                        uni.redirectTo({
                                            url: "/pages/polling/point?id=" + res.data.id
                                        })
@@ -141,12 +146,11 @@
                        this.showToast('登录成功')
                        getUserInfo().then(ress => {
                            this.setUserInfo(ress.data)
                            const ywinfo = uni.getStorageSync('ywinfo') || {}
                            const ywinfo = this.ywinfo
                            if (ywinfo.ywid && (ywinfo.type || ywinfo.type == 0)) {
                            getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
                                getRecordByUserPoint({pointCode: ywinfo.ywid}).then(res => {
                                    if(res.data && res.data.id){
                                        uni.setStorageSync('ywinfo', {})
                                        uni.redirectTo({
                                            url: "/pages/polling/point?id=" + res.data.id
                                        })
h5/pages/workOrder/wait.vue
@@ -115,8 +115,7 @@
                this.getList()
            },
            itemClick(item) {
                if (item.objType == 0) {
                    return
                if (item.objType == 0 && item.status == 1) {
                    uni.navigateTo({
                        url: `/pages/inventory/detail?id=${item.objId}`
                    })
@@ -125,7 +124,7 @@
                    uni.navigateTo({
                        url: `/pages/polling/detail?id=${item.objId}`
                    })
                } else {
                } else if(item.objType == 2) {
                    uni.navigateTo({
                        url: `/pages/workOrder/detail?id=${item.objId}`
                    })
@@ -244,6 +243,7 @@
            padding: 0;
            height: 100vh;
            overflow: hidden;
            background-color: #fff;
        }
        .tabs {
@@ -279,7 +279,7 @@
                    height: 6rpx;
                    background-color: #fff;
                    border-radius: 3rpx;
                    margin-top: 24rpx;
                    margin-top: 16rpx;
                }
            }