ll
liukangdong
2025-01-24 4e06cb82c09cc0b1c79fc6952656220538797963
ll
已修改8个文件
103 ■■■■ 文件已修改
admin/src/views/stock/components/AssetSel.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/components/InEdit.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/components/OutEdit.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/components/config.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/record.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/login.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/utils/config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/stock/components/AssetSel.vue
@@ -1,5 +1,5 @@
<template>
  <GlobalWindow title="选择物料" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close"
  <GlobalWindow title="选择物料" :visible.sync="isShowModal" :confirm-working="isLoading" width="1000px" @close="close"
    @confirm="confirm">
    <el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
      <el-form-item prop="code" label="物料信息">
@@ -10,7 +10,8 @@
          :options="cateList" :props="{
            label: 'name',
            value: 'id',
            children: 'childCategoryList'
            children: 'childCategoryList',
            checkStrictly: true
          }"></el-cascader>
      </el-form-item>
      <span>
@@ -87,7 +88,7 @@
      fn({
        capacity: pagination.pageSize,
        page: pagination.page,
        model: {...searchForm}
        model: {...searchForm,status: 0}
      }).then((res) => {
        this.listLoading = false
        this.list = res.records
@@ -120,6 +121,10 @@
    changeSel(e) {
      if (e && e.length == 2) {
        this.$set(this.searchForm, 'cateId', e[1])
        this.$set(this.searchForm, 'parentCateId', '')
      }else if((e && e.length == 1)){
        this.$set(this.searchForm, 'parentCateId', e[0])
        this.$set(this.searchForm, 'cateId', '')
      } else {
        this.$set(this.searchForm, 'cateId', '')
      }
admin/src/views/stock/components/InEdit.vue
@@ -1,5 +1,5 @@
<template>
  <GlobalWindow title="新建入库单" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close"
  <GlobalWindow title="新建入库单" :visible.sync="isShowModal" :confirm-working="isLoading" width="1000px" @close="close"
    @confirm="confirm">
    <el-form :model="param" ref="form" :rules="rules">
      <div class="df_ac">
@@ -37,13 +37,13 @@
      <el-table-column prop="qrcode" label="条形码" show-overflow-tooltip min-width="70px"></el-table-column>
      <el-table-column prop="brand" label="品牌" show-overflow-tooltip min-width="70px"></el-table-column>
      <el-table-column prop="unitName" label="单位" show-overflow-tooltip min-width="70px"></el-table-column>
      <el-table-column prop="dealUserName" label="入库数量" min-width="90px">
      <el-table-column prop="dealUserName" label="入库数量" min-width="100px">
        <template v-slot="{ row }">
          <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 11)" v-model="row.stock"
          <el-input oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" v-model="row.stock"
            class="w100"></el-input>
        </template>
      </el-table-column>
      <el-table-column prop="maxStock" label="库存数量" show-overflow-tooltip min-width="80px"></el-table-column>
      <!-- <el-table-column prop="maxStock" label="库存数量" show-overflow-tooltip min-width="80px"></el-table-column> -->
      <el-table-column label="操作" min-width="60px">
        <template v-slot="scope">
          <span @click="handleDel(scope)" class="red pointer">删除</span>
@@ -62,6 +62,7 @@
import { ywOutinboundCreate } from '@/api/store/index'
import { StoreTypeOps, rules } from './config'
import { Message } from 'element-ui'
import dayjs from 'dayjs'
export default {
  name: 'OperaCategoryWindow',
  components: { GlobalWindow, AssetSel },
@@ -69,7 +70,7 @@
    return {
      // 表单数据
      param: {
        createUserName: this.$store.state.userInfo.username,
        createUserName: this.$store.state.userInfo.realname || this.$store.state.userInfo.username,
        creator: this.$store.state.userInfo.id,
        inOut: 0
      },
@@ -118,9 +119,9 @@
      })
    },
    initData() {
      getStoreList({ capacity: 9999, page: 1, model: {} }).then(res => {
      this.$set(this.param, 'doneDate', dayjs().format('YYYY-MM-DD'))
      getStoreList({ capacity: 9999, page: 1, model: {status: 0} }).then(res => {
        this.storeList = res.records || []
      })
    },
    changeSel(val) {
@@ -130,6 +131,7 @@
        if(index == -1){
          item.materialId = item.id
          item.multifile = null
          item.createDate = null
          this.list.push(item)
        }
      })
admin/src/views/stock/components/OutEdit.vue
@@ -1,5 +1,5 @@
<template>
  <GlobalWindow title="新建出库单" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close"
  <GlobalWindow title="新建出库单" :visible.sync="isShowModal" :confirm-working="isLoading" width="1000px" @close="close"
    @confirm="confirm">
    <el-form :model="param" ref="form" :rules="rules">
      <div class="df_ac">
@@ -39,7 +39,7 @@
      <el-table-column prop="unitName" label="单位" show-overflow-tooltip min-width="70px"></el-table-column>
      <el-table-column prop="dealUserName" label="出库数量" min-width="90px">
        <template v-slot="{ row }">
          <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 11)" v-model="row.stock"
          <el-input oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" v-model="row.stock"
            class="w100"></el-input>
        </template>
      </el-table-column>
@@ -62,6 +62,7 @@
import { ywOutinboundCreate } from '@/api/store/index'
import { StoreTypeOps, rules } from './config'
import { Message } from 'element-ui'
import dayjs from 'dayjs'
export default {
  name: 'OperaCategoryWindow',
  components: { GlobalWindow, AssetSel },
@@ -69,7 +70,7 @@
    return {
      // 表单数据
      param: {
        createUserName: this.$store.state.userInfo.username,
        createUserName: this.$store.state.userInfo.realname || this.$store.state.userInfo.username,
        creator: this.$store.state.userInfo.id,
        inOut: 1
      },
@@ -116,7 +117,8 @@
      })
    },
    initData() {
      getStoreList({ capacity: 9999, page: 1, model: {} }).then(res => {
      this.$set(this.param, 'doneDate', dayjs().format('YYYY-MM-DD'))
      getStoreList({ capacity: 9999, page: 1, model: {status: 0} }).then(res => {
        this.storeList = res.records || []
      })
    },
@@ -126,6 +128,7 @@
        if(this.list.indexOf(item.id) === -1){
          item.materialId = item.id
          item.stock = null
          item.createDate = null
          this.list.push(item)
        }
      })
admin/src/views/stock/components/config.js
@@ -1,15 +1,15 @@
export const StoreTypeOps = [
  { name: '采购入库', id: 0, type: 0 },
  { name: '领用退回', id: 1, type: 0 },
  { name: '调整入库', id: 2, type: 0 },
  { name: '其他入库', id: 3, type: 0 },
  { name: '盘盈入库', id: 4, type: 0 },
  { name: '库存调整', id: 2, type: 0 },
  { name: '其它入库', id: 3, type: 0 },
  // { name: '盘盈入库', id: 4, type: 0 },
  { name: '领用出库', id: 5, type: 1 },
  { name: '仓库出库', id: 6, type: 1 },
  { name: '仓库出单', id: 6, type: 1 },
  { name: '调整出库', id: 7, type: 1 },
  { name: '采购出库', id: 8, type: 1 },
  { name: '其他出库', id: 9, type: 1 },
  { name: '盘出出库', id: 10, type: 1 },
  { name: '其它出库', id: 9, type: 1 },
  // { name: '盘出出库', id: 10, type: 1 },
]
export const rules = {
  warehouseId: [{ required: true, message: '请选择', trigger: 'blur' }],
admin/src/views/stock/record.vue
@@ -20,13 +20,13 @@
      </el-table-column>
      <el-table-column prop="param1" label="类型" min-width="70" show-overflow-tooltip>
        <template v-slot="{ row }">
          <span v-if="row.type || row.type == 0">{{ StoreTypeOps[row.type] }}</span>
          <span v-if="row.type || row.type == 0">{{ StoreTypeOps[row.type].name }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="warehouseName" label="仓库" min-width="90" show-overflow-tooltip />
      <el-table-column prop="code" label="单据编号" min-width="120" show-overflow-tooltip>
      <el-table-column prop="code" label="单据编号" min-width="140">
        <template v-slot="{ row }">
          <span class="primaryColor">{{ row.code }}</span>
          <span class="primaryColor pointer" @click='detailClick(row)'>{{ row.code }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="createUserName" label="创建人" min-width="80" show-overflow-tooltip />
@@ -35,14 +35,21 @@
    <div class="mt20">
      <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
    </div>
    <!--  -->
    <OutDetail v-if="isShowOutDetail" ref="OutDetailRef" />
    <InDetail v-if="isShowInDetail" ref="InDetailRef" />
  </div>
</template>
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import InDetail from './components/InDetail'
import OutDetail from './components/OutDetail.vue'
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
dayjs.extend(duration)
import { ywOutinboundRecord, ywOutinboundRecordEx } from '@/api'
import { fetchList as getStoreList } from '@/api/ywWarehouse'
@@ -50,11 +57,15 @@
export default {
  components: {
    Pagination,
    QueryForm
    QueryForm,
    InDetail,
    OutDetail
  },
  data() {
    return {
      loading: false,
      isShowInDetail: false,
      isShowOutDetail: false,
      pagination: {
        pageSize: 10,
        page: 1,
@@ -119,6 +130,22 @@
        }
      })
    },
    detailClick(item) {
      const index = item.code.indexOf('RK')
      if(index > -1){
        this.isShowInDetail = true
        this.$nextTick(() => {
          this.$refs.InDetailRef.visible = true
          this.$refs.InDetailRef.getDetail(item.outInBoundId)
        })
      }else{
        this.isShowOutDetail = true
        this.$nextTick(() => {
          this.$refs.OutDetailRef.visible = true
          this.$refs.OutDetailRef.getDetail(row.outInBoundId)
        })
      }
    },
    handleEx() {
      this.$dialog.exportConfirm('确认导出吗?')
        .then(() => {
@@ -162,12 +189,15 @@
        filters.createDateStart = null
        filters.createDateEnd = null
      }
      if(page){
        pagination.page = page
      }
      ywOutinboundRecord({
        model: {
          ...filters
        },
        capacity: pagination.pageSize,
        page: page || pagination.page,
        page: pagination.page,
      }).then(res => {
        this.loading = false
        this.list = res.records || []
h5/manifest.json
@@ -86,7 +86,7 @@
    "quickapp" : {},
    /* 小程序特有相关 */
    "mp-weixin" : {
        "appid" : "wxcd2b89fd2ff065f8",
        "appid" : "wx4d7c10bdec51942b",
        "setting" : {
            "urlCheck" : false,
            "es6" : true,
@@ -121,7 +121,7 @@
        },
        // "base" : "/h5/"
        "devServer" : {
                        "open": false,
            "open" : false,
            "port" : 8090,
            "historyApiFallback" : true,
            "disableHostCheck" : true,
h5/pages/login.vue
@@ -105,8 +105,10 @@
                    }
                })
            } else {
                let url = 'https://zhcg.fnwtzx.com/yunwei_h5'
                const appID = 'wx95ac1efb67f0330d'
                // let url = 'https://zhcg.fnwtzx.com/yunwei_h5'
                // const appID = 'wx95ac1efb67f0330d'
                let url = 'https://dmtest.ahapp.net/yunwei_h5'
                const appID = 'wx4d7c10bdec51942b'
                let uri = encodeURIComponent(url)
                let authURL =
                    `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base#wechat_redirect`
h5/utils/config.js
@@ -1,6 +1,7 @@
 // export const baseUrl = 'gateway_interface/'
// export const baseUrl = 'http://192.168.0.173/gateway_interface/'
export const baseUrl = 'https://zhcg.fnwtzx.com/gateway_interface/'
// export const baseUrl = 'https://zhcg.fnwtzx.com/gateway_interface/'
export const baseUrl = 'https://dmtest.ahapp.net/gateway_interface/'
export const uploadAvatar = `${baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`
export const uploadUrl = `${baseUrl}visitsAdmin/cloudService/public/uploadBatch`