liuguocan
2023-11-28 798305c450a490f216b7641bd3f31c30a97b7cb0
物品退回列表/详情
2个文件已删除
7个文件已修改
586 ■■■■■ 已修改文件
admin-web/public/static/config.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/retDetails/edit.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/retDetails/index.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/returnNote/detail.vue 189 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/returnNote/edit.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemret/returnNote/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemscr/scrappDetails/edit.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/departmentitem/itemscr/scrapping/edit.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/public/static/config.js
@@ -1,12 +1,21 @@
// 请求接口地址 如果没有配置自动获取当前网址路径
const VUE_APP_API_URL = process.env.VUE_APP_BASE_API || `${location.origin}`;
const VUE_APP_WS_URL =
  process.env.VUE_APP_WS_URL || (location.protocol === 'https' ? 'wss' : 'ws') + ':' + location.hostname;
const SettingIplatform = {
  // 服务器地址
  // 服务器地址
  httpUrl: VUE_APP_API_URL,
  // 上传路径
  ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//开发
  // 接口请求地址
  apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发
  // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发
  debug: false //调试开关  true时会输出请求日志
// 接口请求地址
  apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发
// apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 测试,
  // socket连接
  wsSocketUrl: VUE_APP_WS_URL,
  debug: true //调试开关  true时会输出请求日志
};
export default SettingIplatform;
admin-web/src/views/departmentitem/itemret/retDetails/edit.vue
File was deleted
admin-web/src/views/departmentitem/itemret/retDetails/index.vue
@@ -16,6 +16,8 @@
        </el-card>
      </el-container>
    </el-container>
    <!--详情-->
    <detail v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false"/>
  </div>
</template>
@@ -23,12 +25,11 @@
import MyTableV2 from "@/components/myTable/myTableV2";
import MyButton from "@/components/myButton/myButton";
import SettingIplatform from '@/utils/settingIplatform';
import * as finsystenant from '@/api/baseSetting/finsystenant'
import {getBaseUrl} from '@/utils/base';
import detail from '@/views/departmentitem/itemret/returnNote/detail'
export default {
  name: "index",
  components: {MyButton, MyTableV2},
  components: {MyButton, MyTableV2,detail},
  data() {
    return {
      // 搜索框
@@ -36,26 +37,9 @@
        {
          type: 'text',
          dataIndex: 'name',
          label: '单号',
          label: '退回单号',
          placeholder: '请输入',
          defaultValue: ''
        },
        {
          type: 'select',
          dataIndex: 'status',
          label: '类型',
          placeholder: '请选择',
          defaultValue: '1',
          options: [
            {
              label: '启用',
              value: '1'
            },
            {
              label: '禁用',
              value: '0'
            }
          ]
        },
        {
          type: 'text',
@@ -63,6 +47,31 @@
          label: '物品名称',
          placeholder: '请输入',
          defaultValue: ''
        },
        {
          type: 'select',
          dataIndex: 'name',
          label: '规格型号',
          placeholder: '请输入',
          defaultValue: '',
          options:[]
        },
        {
          type: 'cascader',
          dataIndex: 'agencyId',
          label: '机构',
          placeholder: '请选择',
          optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
          defaultValue: '',
          options: [],
        },
        {
          type: 'select',
          dataIndex: 'name',
          label: '部门',
          placeholder: '请输入',
          defaultValue: '',
          options:[]
        },
        {
          type: 'text',
@@ -84,7 +93,6 @@
      editSetting: {
        title: '',
        id: '',
        orgId: '',
        show: false,
      },
      // 表格数据
@@ -146,8 +154,7 @@
  methods: {
    showAudit(row) {
      this.editSetting.id = row.id;
      this.editSetting.info = JSON.stringify(row);
      this.editSetting.title = '编辑';
      this.editSetting.title = '详情';
      this.editSetting.show = true;
    },
    // 查询table列表
admin-web/src/views/departmentitem/itemret/returnNote/detail.vue
@@ -1,79 +1,111 @@
<template>
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'">
  <win-lg class="stock-detail" :title="setting.title" @close="close" :width="'800px'" :loading="loading">
    <el-row :gutter="20">
      <el-col :span="8">
        <span>退回单号:</span>
        <span>{{ detail.businessFormCode }}</span>
      </el-col>
      <el-col :span="8">
        <span>退回仓库:</span>
        <span>{{ detail.warehouseName }}</span>
        <span>SL2023001</span>
      </el-col>
      <el-col :span="8">
        <span>所属机构:</span>
        <span>{{ detail.agencyName }}</span>
        <span>河南省邮政分公司</span>
      </el-col>
      <el-col :span="8">
        <span>部门:</span>
        <span>金融业务部</span>
      </el-col>
    </el-row>
    <el-row :gutter="20" style="margin-top: 20px">
      <el-col :span="8">
        <span>创建人:</span>
        <span>{{ detail.operatorName }}</span>
        <span>退回人:</span>
        <span>张爱生</span>
      </el-col>
      <el-col :span="8">
        <span>退回时间:</span>
        <span>{{ detail.dealTime | formatTime }}</span>
        <span>2023-08-08 10:23:12</span>
      </el-col>
    </el-row>
    <el-row v-if="detail.procureDoc" :gutter="20" style="margin-top: 20px">
    <el-row :gutter="20" style="margin-top: 20px">
      <el-col class="img-row" :span="24">
        <span>退回手续:</span>
        <div class="img-box"></div>
        <span>报废手续:</span>
        <div class="img-box" v-for="(item, index) in fileList" :key="index" @click="handlePreview(item)">
          <img class="img" :src="getUrl(item.path)" alt="" />
        </div>
      </el-col>
    </el-row>
    <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.fromOutputGoods" :key="goodsIndex">
    <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex">
      <el-row :gutter="20">
        <el-col :span="8">
        <el-col :span="6">
          <span>物品分类:</span>
          <span>{{ goodsItem.categoryName }}</span>
          <span>{{ goodsItem.baseCategoryName }}</span>
        </el-col>
        <el-col :span="8">
        <el-col :span="6">
          <span>物品名称:</span>
          <span>{{ goodsItem.goodsName }}</span>
          <span>{{ goodsItem.goodsTemplateName }}</span>
        </el-col>
        <el-col :span="6">
          <span>物品类别:</span>
          <span>{{ goodsItem.supplier }}</span>
        </el-col>
        <el-col :span="6">
          <span>分发单号:</span>
          <span>{{ goodsItem.supplier }}</span>
        </el-col>
      </el-row>
      <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px">
        <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center">
          <template slot-scope="scope">
            {{ scope.row.baseGoodsModelsName }}
          </template>
        </el-table-column>
        <el-table-column label="单位" align="center">
          <template slot-scope="scope">
            {{ scope.row.unit }}
          </template>
        </el-table-column>
        <el-table-column prop="counts" label="退回数量" align="center">
          <template slot-scope="scope">
            {{ scope.row.counts }}
          </template>
        </el-table-column>
        <el-table-column prop="counts" label="金额" align="center">
          <template slot-scope="scope">
            {{ scope.row.price * scope.row.counts | formatPrice}}
          </template>
        </el-table-column>
      </el-table>
      <div>
        <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px">
          <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center">
            <template slot-scope="scope">
              {{ scope.row.baseGoodsModelsName }}
            </template>
          </el-table-column>
          <el-table-column label="单位" align="center">
            <template slot-scope="scope">
              {{ scope.row.unit }}
            </template>
          </el-table-column>
          <el-table-column label="使用人" align="center" v-if="goodsItem.type===1">
            <template slot-scope="scope">
              {{ scope.row.unit }}
            </template>
          </el-table-column>
          <el-table-column prop="price" label="退回数量" align="center">
            <template slot-scope="scope">
              {{ scope.row.counts }}
            </template>
          </el-table-column>
          <el-table-column prop="counts" label="再用数量" align="center">
            <template slot-scope="scope">
              {{ scope.row.counts }}
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
  </win-md>
    <div id="uploadPreviewImages" style="display: none">
      <span v-for="(src, index) in fileList" :key="index">
        <img
          v-if="checkImg(src.name)"
          class="v-img"
          :src="src.url"
          :alt="src.name"
          style="width: 100px; height: 100px"
        />
      </span>
    </div>
  </win-lg>
</template>
<script>
import { outputDetail } from '@/api/stock/accessStock';
import winMd from '@/components/win/win-md';
import { procureDetail } from '@/api/stock/procure/purchaseOrder';
import winLg from '@/components/win/win-lg';
import * as DateFormatter from '@/utils/DateFormatter';
import { getDownUrl } from '@/utils/base';
import Viewer from 'viewerjs';
import 'viewerjs/dist/viewer.css';
let viewer = null;
export default {
  components: { winMd },
  components: { winLg },
  props: {
    setting: {
      type: Object,
@@ -82,21 +114,26 @@
  },
  data() {
    return {
      loading:false,
      fileList: [],
      detail: {
        categoryName: '',
        baseCategoryName: '',
        businessFormCode: '',
        goodsName: '',
        goodsTemplateName: '',
        procureDoc: '',
        agencyId: '',
        agencyName: '',
        states: '',
        createName: '',
        fromOutputGoods: [],
        time: '',
        procureGoods: [{}, {}],
        fileKey: Math.random(),
      },
    };
  },
  filters: {
    formatTime(time) {
      if (!time) return;
      if (!time) return '-';
      return DateFormatter.LongToDateTime(time);
    },
    formatPrice(price) {
@@ -104,17 +141,65 @@
    }
  },
  created() {
    outputDetail({ id: this.setting.id }).then((res) => {
    procureDetail({ id: this.setting.id }).then((res) => {
      this.detail = res;
      this.fileList = this.detail.procureDoc ? JSON.parse(this.detail.procureDoc) : [];
      this.$nextTick(() => {
        this.initPreviewImg();
      });
    });
  },
  methods: {
    initPreviewImg() {
      if (viewer != null) {
        viewer.destroy();
      }
      const ViewerDom = document.querySelector('#uploadPreviewImages');
      viewer = new Viewer(ViewerDom, {});
    },
    handlePreview(file) {
      if (!this.checkImg(file.name)) {
        return false;
      }
      let index = 0;
      for (let i = 0; i < this.fileList.length; i++) {
        const f = this.fileList[i];
        if (this.checkImg(f.name)) {
          if (file.id == f.id) {
            break;
          }
          index++;
        }
      }
      // this.fileList.forEach((f, i) => {
      //   if (file.uid == f.uid) {
      //     index = i
      //   }
      // })
      // document.querySelector('#uploadPreviewImages').children[0].click()
      viewer.view(index);
    },
    checkImg(name) {
      const suffix = name.substring(name.lastIndexOf('.'), name.length);
      const imgArray = ['.jpg', '.jpeg', '.png', '.bmp'];
      if (imgArray.indexOf(suffix) < 0) {
        return false;
      }
      return true;
    },
    getUrl(path) {
      if (path.substr(0, 7).toLowerCase() == 'http://' || path.substr(0, 8).toLowerCase() == 'https://') {
        return path;
      } else {
        return getDownUrl() + path;
      }
    },
    close() {
      this.$emit('close')
      this.$emit('close');
    },
  },
};
</script>
<style lang="scss" scoped>
@import url(../../../../styles/store.scss);
//@import url(../../../../styles/store.scss);
</style>
admin-web/src/views/departmentitem/itemret/returnNote/edit.vue
@@ -29,7 +29,7 @@
        </el-row>
        <el-row :gutter="24" class="headerHeight">
          <el-col :span="24">
            <el-form-item label="退回手续" prop="procureDoc">
            <el-form-item label="退回审批手续" prop="procureDoc">
              <upload ref="uploadRef" :settings="uploadSettings" @on-change="uploadChange"></upload>
            </el-form-item>
          </el-col>
@@ -89,39 +89,59 @@
              </el-form-item>
            </el-col>
          </el-row>
          <el-table :data="goodsItem.models" :stripe="true">
            <el-table-column prop="baseGoodsModelsId" label="规格型号" align="center">
              <template slot-scope="scope">
                {{ getGoodsModelsName(scope.row.baseGoodsModelsId) }}
              </template>
            </el-table-column>
            <el-table-column label="单位" align="center">
              <template slot-scope="scope">
                {{ scope.row.unit }}
              </template>
            </el-table-column>
            <el-table-column prop="price" label="现有库存" align="center">
              <template slot-scope="scope">
                {{ scope.row.worehouseCount }}
              </template>
            </el-table-column>
            <el-table-column prop="counts" label="退回数量" align="center">
              <template slot-scope="scope">
                <el-form-item
                  label-width="0"
                  style="margin-bottom: 0"
                  :prop="`goods[${goodsIndex}].models[${scope.$index}].counts`"
                  :rules="rules.counts"
                >
                  <el-input
                    type="number"
                    v-model="scope.row.counts"
                    @change="countsChange($event, goodsIndex, scope.$index)"
                  ></el-input>
          <div class="card3" v-for="(mItem, mIndex) in goodsItem.models" :key="mIndex">
            <el-row :gutter="24" type="flex" align="middle" style="height: 50px">
              <el-col :span="8">
                <el-form-item label="规格型号:" prop="baseGoodsModelsId" style="margin-bottom: 0">
                  {{ getGoodsModelsName(mItem.baseGoodsModelsId) }}
                </el-form-item>
              </template>
            </el-table-column>
          </el-table>
              </el-col>
              <el-col :span="6">
                <el-form-item label="单位:" prop="baseGoodsModelsId" style="margin-bottom: 0" label-width="80">
                  50
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="物品类别:" prop="baseGoodsModelsId" style="margin-bottom: 0" label-width="80">
                  A类
                </el-form-item>
              </el-col>
            </el-row>
            <el-table :data="mItem.models" :stripe="true">
              <!-- A类商品显示 -->
              <el-table-column prop="price" label="使用人" align="center" v-if="goodsItem.models.type===1">
                <template slot-scope="scope">
                  {{ scope.row.worehouseCount }}
                </template>
              </el-table-column>
              <el-table-column prop="price" label="分发数量" align="center">
                <template slot-scope="scope">
                  {{ scope.row.worehouseCount }}
                </template>
              </el-table-column>
              <el-table-column prop="price" label="可退数量" align="center">
                <template slot-scope="scope">
                  {{ scope.row.worehouseCount }}
                </template>
              </el-table-column>
              <el-table-column prop="counts" label="退回数量" align="center">
                <template slot-scope="scope">
                  <el-form-item
                    label-width="0"
                    style="margin-bottom: 0"
                    :prop="`goods[${goodsIndex}].models[${scope.$index}].counts`"
                    :rules="rules.counts"
                  >
                    <el-input
                      type="number"
                      v-model="scope.row.counts"
                      @change="countsChange($event, goodsIndex, scope.$index)"
                    ></el-input>
                  </el-form-item>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <div class="btn-group">
            <el-button
              v-if="formData.goods.length > 1"
@@ -433,4 +453,8 @@
    }
  }
}
.card3 {
  border-radius: 2px;
  background: #ffffff;
}
</style>
admin-web/src/views/departmentitem/itemret/returnNote/index.vue
@@ -23,12 +23,7 @@
                          <span class="value">{{ item.businessFormCode }}</span>
                        </div>
                        <div class="card-header-right">
                            <el-button site="form" type="success" size="mini" @click="handleExport(item)"
                              >导出退回单</el-button
                            >
                          <el-button name="查看详情" site="form" type="info" size="mini" @click="handleDetail(item)"
                            >查看详情</el-button
                          >
                          <el-button name="查看详情" site="form" type="info" size="mini" @click="handleDetail(item)">查看详情</el-button>
                        </div>
                      </div>
                      <div class="one-hed">
admin-web/src/views/departmentitem/itemscr/scrappDetails/edit.vue
File was deleted
admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue
@@ -13,7 +13,7 @@
              <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/>
            </el-col>
          </el-row>
          <!--添加/编辑弹窗-->
          <!--详情-->
          <detail v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false"/>
        </el-card>
      </el-container>
admin-web/src/views/departmentitem/itemscr/scrapping/edit.vue
@@ -470,4 +470,8 @@
    }
  }
}
.card3 {
  border-radius: 2px;
  background: #ffffff;
}
</style>