业务单据功能界面修改
							parent
							
								
									5f5f1d7293
								
							
						
					
					
						commit
						1b07355857
					
				@ -1,6 +1,6 @@
 | 
				
			||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>医院UDI自助管理平台</title><link rel=stylesheet href=https://unpkg.com/element-ui/lib/theme-chalk/index.css><link href=css/home.5235ad9e.css rel=prefetch><link href=js/home.1a94cfbc.js rel=prefetch><link href=css/app.ce169290.css rel=preload as=style><link href=css/chunk-vendors.072ae084.css rel=preload as=style><link href=js/app.16263ee5.js rel=preload as=script><link href=js/chunk-vendors.ac7bf19a.js rel=preload as=script><link href=css/chunk-vendors.072ae084.css rel=stylesheet><link href=css/app.ce169290.css rel=stylesheet></head><body><div id=app></div><script src=./tinymce4.7.5/tinymce.min.js></script><script src=https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js></script><script src=https://unpkg.zhimg.com/vuex@3.6.2/dist//vuex.min.js></script><script src=https://unpkg.zhimg.com/vue-router@3.0.1/dist/vue-router.min.js></script><script src=https://unpkg.zhimg.com/element-ui@2.15.7/lib/index.js></script><script>ga('create', 'UA-110990780-1', 'auto');
 | 
				
			||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>医院UDI自助管理平台</title><link rel=stylesheet href=https://unpkg.com/element-ui/lib/theme-chalk/index.css><link href=css/home.5235ad9e.css rel=prefetch><link href=js/home.1a94cfbc.js rel=prefetch><link href=css/app.cc490a0d.css rel=preload as=style><link href=css/chunk-vendors.072ae084.css rel=preload as=style><link href=js/app.76b56a5d.js rel=preload as=script><link href=js/chunk-vendors.ac7bf19a.js rel=preload as=script><link href=css/chunk-vendors.072ae084.css rel=stylesheet><link href=css/app.cc490a0d.css rel=stylesheet></head><body><div id=app></div><script src=./tinymce4.7.5/tinymce.min.js></script><script src=https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js></script><script src=https://unpkg.zhimg.com/vuex@3.6.2/dist//vuex.min.js></script><script src=https://unpkg.zhimg.com/vue-router@3.0.1/dist/vue-router.min.js></script><script src=https://unpkg.zhimg.com/element-ui@2.15.7/lib/index.js></script><script>ga('create', 'UA-110990780-1', 'auto');
 | 
				
			||||
    ga('send', 'pageview');
 | 
				
			||||
    window.addEventListener('hashchange', function () {
 | 
				
			||||
        ga('set', 'page', window.location.href);
 | 
				
			||||
        ga('send', 'pageview');
 | 
				
			||||
    });</script><script src=js/chunk-vendors.ac7bf19a.js></script><script src=js/app.16263ee5.js></script></body></html>
 | 
				
			||||
    });</script><script src=js/chunk-vendors.ac7bf19a.js></script><script src=js/app.76b56a5d.js></script></body></html>
 | 
				
			||||
 | 
				
			||||
@ -0,0 +1,356 @@
 | 
				
			||||
<template>
 | 
				
			||||
    <div>
 | 
				
			||||
        <el-card>
 | 
				
			||||
            <el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
 | 
				
			||||
                <el-row>
 | 
				
			||||
                    <el-form-item class="query-form-item">
 | 
				
			||||
                        <el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
 | 
				
			||||
                    </el-form-item>
 | 
				
			||||
                    <el-form-item class="query-form-item">
 | 
				
			||||
                        <el-input v-model="filterQuery.cpmctymc" placeholder="产品名称"></el-input>
 | 
				
			||||
                    </el-form-item>
 | 
				
			||||
                    <el-form-item class="query-form-item">
 | 
				
			||||
                        <el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
 | 
				
			||||
                    </el-form-item>
 | 
				
			||||
                    <el-form-item>
 | 
				
			||||
                        <el-button-group>
 | 
				
			||||
<!--                            <el-button-->
 | 
				
			||||
                            <!--                                type="primary"-->
 | 
				
			||||
                            <!--                                icon="el-icon-refresh"-->
 | 
				
			||||
                            <!--                                @click="onReset"-->
 | 
				
			||||
                            <!--                            ></el-button>-->
 | 
				
			||||
                            <el-button type="primary" icon="search" @click="onSubmit"
 | 
				
			||||
                            >查询
 | 
				
			||||
                            </el-button
 | 
				
			||||
                            >
 | 
				
			||||
                            <el-button type="primary" icon="search" @click="combine">确定</el-button>
 | 
				
			||||
                        </el-button-group>
 | 
				
			||||
                    </el-form-item>
 | 
				
			||||
                </el-row>
 | 
				
			||||
            </el-form>
 | 
				
			||||
 | 
				
			||||
            <el-table v-loading="loading" :data="list" style="width: 100%"
 | 
				
			||||
                      highlight-current-row="false"
 | 
				
			||||
                      ref="multipleTable">
 | 
				
			||||
                <el-table-column
 | 
				
			||||
                    type="selection"
 | 
				
			||||
                    width="55">
 | 
				
			||||
                </el-table-column>
 | 
				
			||||
                <el-table-column label="序号" type="index"></el-table-column>
 | 
				
			||||
                <el-table-column label="产品标识" prop="nameCode"></el-table-column>
 | 
				
			||||
                <el-table-column label="产品名称" prop="cpmctymc">
 | 
				
			||||
                </el-table-column>
 | 
				
			||||
                <el-table-column label="规格型号" prop="ggxh"></el-table-column>
 | 
				
			||||
                <el-table-column label="批次号" prop="batchNo"></el-table-column>
 | 
				
			||||
                <el-table-column label="生产日期" prop="productionDate"></el-table-column>
 | 
				
			||||
                <el-table-column label="失效日期" prop="expireDate"></el-table-column>
 | 
				
			||||
                <el-table-column label="入库数量" prop="inCount"></el-table-column>
 | 
				
			||||
                <el-table-column label="出库数量" prop="outCount"></el-table-column>
 | 
				
			||||
                <el-table-column label="结余数量" prop="reCount">
 | 
				
			||||
                    <template slot-scope="scope">
 | 
				
			||||
                        {{ (scope.row.inCount - scope.row.outCount) }}
 | 
				
			||||
                    </template>
 | 
				
			||||
                </el-table-column>
 | 
				
			||||
                <!--                <el-table-column label="操作" width="120" fixed="right">-->
 | 
				
			||||
                <!--                    <template slot-scope="scope">-->
 | 
				
			||||
                <!--                        <el-button-->
 | 
				
			||||
                <!--                            type="text"-->
 | 
				
			||||
                <!--                            size="small"-->
 | 
				
			||||
                <!--                            @click.native.stop="intentDetail(scope.row)"-->
 | 
				
			||||
                <!--                        >详情-->
 | 
				
			||||
                <!--                        </el-button-->
 | 
				
			||||
                <!--                        >-->
 | 
				
			||||
 | 
				
			||||
                <!--                        <el-button-->
 | 
				
			||||
                <!--                            type="text"-->
 | 
				
			||||
                <!--                            size="small"-->
 | 
				
			||||
                <!--                            @click.native.stop="deleteDialog(scope.row.id)"-->
 | 
				
			||||
                <!--                        >删除-->
 | 
				
			||||
                <!--                        </el-button-->
 | 
				
			||||
                <!--                        >-->
 | 
				
			||||
                <!--                    </template>-->
 | 
				
			||||
                <!--                </el-table-column>-->
 | 
				
			||||
            </el-table>
 | 
				
			||||
        </el-card>
 | 
				
			||||
 | 
				
			||||
        <el-dialog
 | 
				
			||||
            title="库存详情"
 | 
				
			||||
            :visible.sync="codeDetailVisible"
 | 
				
			||||
            width="85%"
 | 
				
			||||
            v-if="codeDetailVisible"
 | 
				
			||||
        >
 | 
				
			||||
            <codeDetail
 | 
				
			||||
                :idQuery="idQuery"
 | 
				
			||||
                v-on:closeDetailDialog="closeDetailDialog"
 | 
				
			||||
            ></codeDetail>
 | 
				
			||||
        </el-dialog>
 | 
				
			||||
        <el-pagination
 | 
				
			||||
            :page-size="filterQuery.limit"
 | 
				
			||||
            @current-change="handleCurrentChange"
 | 
				
			||||
            layout="prev, pager, next"
 | 
				
			||||
            :total="total"
 | 
				
			||||
        ></el-pagination>
 | 
				
			||||
    </div>
 | 
				
			||||
</template>
 | 
				
			||||
 | 
				
			||||
<script>
 | 
				
			||||
import {
 | 
				
			||||
    filterProducts,
 | 
				
			||||
    filterDetailProducts,
 | 
				
			||||
    deleteProducts,
 | 
				
			||||
} from "../../api/inventory/InvProducts";
 | 
				
			||||
import draggable from "vuedraggable";
 | 
				
			||||
import codeDetail from "./InvProductsDetail";
 | 
				
			||||
import store from "../../store";
 | 
				
			||||
import {getBussinessType} from "../../api/basic/bussinessType";
 | 
				
			||||
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
 | 
				
			||||
import {getStockOrderDetailInstrumentById} from "@/api/warehouse/stockOrder";
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
export default {
 | 
				
			||||
    name: "DialogInvProduct",
 | 
				
			||||
    props: {
 | 
				
			||||
        data: {
 | 
				
			||||
            type: Object,
 | 
				
			||||
            required: true,
 | 
				
			||||
        },
 | 
				
			||||
        closeDialog: {
 | 
				
			||||
            type: Function,
 | 
				
			||||
            required: true,
 | 
				
			||||
        },
 | 
				
			||||
    },
 | 
				
			||||
    data() {
 | 
				
			||||
        return {
 | 
				
			||||
            filterQuery: {
 | 
				
			||||
                cpmctymc: null,
 | 
				
			||||
                nameCode: null,
 | 
				
			||||
                relIdFk: null,
 | 
				
			||||
                batchNo: null,
 | 
				
			||||
                page: 1,
 | 
				
			||||
                limit: 20,
 | 
				
			||||
                customerId: null,
 | 
				
			||||
                supId: null,
 | 
				
			||||
                unitFk: null,
 | 
				
			||||
                invStorageCode: null,
 | 
				
			||||
            },
 | 
				
			||||
            detailQuery: {
 | 
				
			||||
                code: null,
 | 
				
			||||
                productIdFk: null,
 | 
				
			||||
                page: 1,
 | 
				
			||||
                limit: 20,
 | 
				
			||||
            },
 | 
				
			||||
            list: [],
 | 
				
			||||
            codeDetailVisible: false,
 | 
				
			||||
            total: 0,
 | 
				
			||||
            loading: true,
 | 
				
			||||
            index: null,
 | 
				
			||||
            dialogTableVisible: false,
 | 
				
			||||
            formLoading: false,
 | 
				
			||||
            dialogVisible: false,
 | 
				
			||||
            deleteLoading: false,
 | 
				
			||||
            busTypes: [],
 | 
				
			||||
            idQuery: null,
 | 
				
			||||
            showSup: false,
 | 
				
			||||
            fromOptions: [],
 | 
				
			||||
        };
 | 
				
			||||
    },
 | 
				
			||||
    components: {
 | 
				
			||||
        draggable,
 | 
				
			||||
        codeDetail,
 | 
				
			||||
    },
 | 
				
			||||
    methods: {
 | 
				
			||||
        onReset() {
 | 
				
			||||
            this.$router.push({
 | 
				
			||||
                path: "",
 | 
				
			||||
            });
 | 
				
			||||
            this.filterQuery = {
 | 
				
			||||
                cpmctymc: null,
 | 
				
			||||
                nameCode: null,
 | 
				
			||||
                relIdFk: null,
 | 
				
			||||
                batchNo: null,
 | 
				
			||||
                customerId: null,
 | 
				
			||||
                unitFk: null,
 | 
				
			||||
                supId: null,
 | 
				
			||||
                page: 1,
 | 
				
			||||
                limit: 20,
 | 
				
			||||
            };
 | 
				
			||||
            this.getList();
 | 
				
			||||
        },
 | 
				
			||||
        onSubmit() {
 | 
				
			||||
            this.loading = true;
 | 
				
			||||
            this.getList();
 | 
				
			||||
        },
 | 
				
			||||
        handleSizeChange(val) {
 | 
				
			||||
            this.filterQuery.limit = val;
 | 
				
			||||
            this.getList();
 | 
				
			||||
        },
 | 
				
			||||
        handleCurrentChange(val) {
 | 
				
			||||
            this.filterQuery.page = val;
 | 
				
			||||
            this.getList();
 | 
				
			||||
        },
 | 
				
			||||
        handleUnitClick(row) {
 | 
				
			||||
            this.curIndex = row.id;
 | 
				
			||||
            this.dialogTableVisible = true;
 | 
				
			||||
        },
 | 
				
			||||
        closeDetailDialog(val) {
 | 
				
			||||
            this.codeDetailVisible = false;
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
        getList() {
 | 
				
			||||
            this.loading = true;
 | 
				
			||||
            this.filterQuery.customerId = store.getters.customerId;
 | 
				
			||||
            filterProducts(this.filterQuery)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    console.log(response)
 | 
				
			||||
                    this.showSup = response.data.showSup;
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.list = response.data.list || [];
 | 
				
			||||
                    this.total = response.data.total || 0;
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.list = [];
 | 
				
			||||
                    this.total = 0;
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
        deleteOrders(data) {
 | 
				
			||||
            this.loading = true;
 | 
				
			||||
            let query = {
 | 
				
			||||
                id: data,
 | 
				
			||||
            }
 | 
				
			||||
            deleteProducts(query)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    if (response.code == 20000) {
 | 
				
			||||
                        this.getList();
 | 
				
			||||
                        this.$message({
 | 
				
			||||
                            type: "success",
 | 
				
			||||
                            message: "删除成功!",
 | 
				
			||||
                        });
 | 
				
			||||
                    } else {
 | 
				
			||||
                        this.$message.error(response.message);
 | 
				
			||||
                    }
 | 
				
			||||
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
        deleteDialog(rowId) {
 | 
				
			||||
            this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
 | 
				
			||||
                confirmButtonText: "确定",
 | 
				
			||||
                cancelButtonText: "取消",
 | 
				
			||||
                type: "warning",
 | 
				
			||||
            })
 | 
				
			||||
                .then(() => {
 | 
				
			||||
                    this.deleteOrders(rowId);
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
        findMethod(query) {
 | 
				
			||||
            console.log(query);
 | 
				
			||||
            this.fromOptions = [];
 | 
				
			||||
            let cQuery = {
 | 
				
			||||
                key: query,
 | 
				
			||||
            };
 | 
				
			||||
            getBasicUnitMaintains(cQuery)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.fromOptions = response.data.page.list || [];
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
        intentDetail(row) {
 | 
				
			||||
 | 
				
			||||
            this.idQuery = row;
 | 
				
			||||
            // this.idQuery.supId = null;
 | 
				
			||||
            this.idQuery.customerId = null;
 | 
				
			||||
            this.codeDetailVisible = true;
 | 
				
			||||
        },
 | 
				
			||||
        getBusType() {
 | 
				
			||||
            let query = {
 | 
				
			||||
                enabled: true,
 | 
				
			||||
            };
 | 
				
			||||
            getBussinessType(query)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    this.busTypes = response.data.list || [];
 | 
				
			||||
                    this.filterQuery.billAction = this.busTypes[0].action;
 | 
				
			||||
                    // this.getList();
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
        getActionName(action) {
 | 
				
			||||
            for (let i = 0; i < this.busTypes.length; i++) {
 | 
				
			||||
                if (this.busTypes[i].action === action) {
 | 
				
			||||
                    return this.busTypes[i].name;
 | 
				
			||||
                }
 | 
				
			||||
            }
 | 
				
			||||
        },
 | 
				
			||||
        combine() {
 | 
				
			||||
            let selection = this.$refs.multipleTable.selection;
 | 
				
			||||
            if (selection.length < 1) {
 | 
				
			||||
                this.$message.error('未选择产品');
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            let ids = [];
 | 
				
			||||
            selection.forEach((obj, index) => {
 | 
				
			||||
                let data = {
 | 
				
			||||
                    relId: obj.relIdFk,
 | 
				
			||||
                    batchNo: obj.batchNo,
 | 
				
			||||
                    productDate: obj.productionDate,
 | 
				
			||||
                    expireDate: obj.expireDate,
 | 
				
			||||
                }
 | 
				
			||||
                ids.push(data);
 | 
				
			||||
            });
 | 
				
			||||
 | 
				
			||||
            this.loading = true;
 | 
				
			||||
            let tQuery = {
 | 
				
			||||
                datas: ids,
 | 
				
			||||
                stockOrderLists: this.data.stockOrderLists,
 | 
				
			||||
            };
 | 
				
			||||
            getStockOrderDetailInstrumentById(tQuery).then((response) => {
 | 
				
			||||
                this.loading = false;
 | 
				
			||||
                if (response.code === 20000) {
 | 
				
			||||
                    this.closeDialog(response.data);
 | 
				
			||||
                } else {
 | 
				
			||||
                    this.$message.error(response.message);
 | 
				
			||||
                }
 | 
				
			||||
            }).catch(() => {
 | 
				
			||||
                this.loading = false;
 | 
				
			||||
            });
 | 
				
			||||
        },
 | 
				
			||||
    },
 | 
				
			||||
    filters: {
 | 
				
			||||
        statusFilterType(status) {
 | 
				
			||||
            const statusMap = {
 | 
				
			||||
                false: "success",
 | 
				
			||||
                true: "danger",
 | 
				
			||||
            };
 | 
				
			||||
            return statusMap[status];
 | 
				
			||||
        },
 | 
				
			||||
    },
 | 
				
			||||
    mounted() {
 | 
				
			||||
        document.body.ondrop = function (event) {
 | 
				
			||||
            event.preventDefault();
 | 
				
			||||
            event.stopPropagation();
 | 
				
			||||
        };
 | 
				
			||||
    },
 | 
				
			||||
    created() {
 | 
				
			||||
        this.getBusType();
 | 
				
			||||
        let query = this.$route.query;
 | 
				
			||||
        this.filterQuery.invStorageCode = this.data.formData.locStorageCode;
 | 
				
			||||
        this.filterQuery = Object.assign(this.filterQuery, query);
 | 
				
			||||
        this.filterQuery.limit = parseInt(this.filterQuery.limit);
 | 
				
			||||
        // 加载表格数据
 | 
				
			||||
        this.getList();
 | 
				
			||||
    },
 | 
				
			||||
};
 | 
				
			||||
</script>
 | 
				
			||||
 | 
				
			||||
<style type="text/scss" lang="scss">
 | 
				
			||||
</style>
 | 
				
			||||
					Loading…
					
					
				
		Reference in New Issue