123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- </div>
- <div class="app-container">
- <el-table
- :row-style="changColor"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- :data="tableList"
- border
- >
- >
- <el-table-column align="center">
- <template slot="header" slot-scope="scope">
- 商品名称<span style="color: red">*</span>
- </template>
- <template slot-scope="scope">
- {{scope.row.project_name}}
- </template>
- </el-table-column>
- <el-table-column label="商品类型" align="center">
- <template slot-scope="scope">
- {{scope.row.project_type}}
- </template>
- </el-table-column>
- <el-table-column label="规格" align="center">
- <template slot-scope="scope">
- {{scope.row.second_specification_name}}
- </template>
- </el-table-column>
- <el-table-column label="调拨数量" align="center">
- <template slot-scope="scope">
- {{scope.row.count}}{{scope.row.sencond_unit}}
- </template>
- </el-table-column>
- <el-table-column label="调出仓库" align="center">
- <template slot-scope="scope">
- {{getHouseName(scope.row.storehouse_out_id)}}
- </template>
- </el-table-column>
- <el-table-column label="调入仓库" align="center">
- <template slot-scope="scope">
- {{getHouseName(scope.row.storehouse_in_id)}}
- </template>
- </el-table-column>
- <el-table-column label="库存总数" align="center">
- <template slot-scope="scope">
- {{scope.row.second_total}}
- </template>
- </el-table-column>
- <el-table-column label="制单人" align="center">
- <template slot-scope="scope">
- {{getDocName(warehouse.creater)}}
- </template>
- </el-table-column>
- <el-table-column label="审核人" align="center">
- <template slot-scope="scope">
- {{getDocName(warehouse.checker)}}
- </template>
- </el-table-column>
- <el-table-column label="审核时间" align="center">
- <template slot-scope="scope">
- <span v-if="warehouse.check_time >0">{{getTimes(warehouse.check_time)}}</span>
- </template>
- </el-table-column>
- <el-table-column label="备注" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.remake ? scope.row.remake : "" }}</span>
- </template>
- </el-table-column>
- </el-table>
-
- </div>
- </div>
- </template>
-
- <script>
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import {getSecondOrderDetailList} from "@/api/seconde";
- import { uParseTime } from "@/utils/tools";
- export default {
- components: {
- BreadCrumb,
- },
- data() {
- return {
- crumbs: [
- { path: false, name: "库房管理" },
- { path: "/stock/warehousequery", name: "调拨详情" },
- ],
- value1: "",
- total: 0,
- page: 1,
- limit: 10,
- tableData: [{}, {}],
- formInline: {
- user: "",
- region: "",
- },
- rules: {
- region: [
- { required: true, message: "请选择活动区域", trigger: "change" },
- ],
- },
- supplyList: [],
- check_id: 0,
- doctorList: [],
- houseList:[],
- warehouse:{},
- tableList:[],
- };
- },
-
- methods: {
-
- init() {},
-
-
- approval() {},
-
-
- examine() {},
-
-
- save() {},
-
-
- toAdd() {},
-
-
- toDelete() {},
-
-
- toDetails() {},
-
-
- handleSelectionChange() {},
-
-
- handleSizeChange(val) {
- this.limit = val;
- this.init();
- },
- handleCurrentChange(val) {
- this.page = val;
- this.init();
- },
-
-
- changColor({ rowIndex }) {
- if (rowIndex % 2 == 1) {
- return {
- backgroundColor: "#C4E1FF",
- color: "#303133",
- };
- } else {
- return {
- backgroundColor: "#ACD6FF",
- color: "#303133",
- };
- }
- },
- getTimes(time) {
- if (time === "") {
- return "";
- }
- return uParseTime(time, "{y}-{m}-{d}");
- },
- getlist() {
- var id = parseInt(this.$route.query.id)
- getSecondOrderDetailList(id).then((response) => {
- if (response.data.state == 1) {
- var list = response.data.data.list;
- this.tableList = list;
- this.houseList = response.data.data.houseList
- this.doctorList = response.data.data.doctorList
- var warehouse = response.data.data.warehouse
- this.warehouse = warehouse
- }
- });
- },
- getHouseName(id){
- var storehouse_name = ""
- for(let i=0;i<this.houseList.length;i++){
- if(id == this.houseList[i].id){
- storehouse_name = this.houseList[i].storehouse_name
- }
- }
- return storehouse_name
- },
- getDocName(id) {
- var user_name = "";
- for (let i = 0; i < this.doctorList.length; i++) {
- if (id == this.doctorList[i].admin_user_id) {
- user_name = this.doctorList[i].user_name;
- }
- }
- return user_name;
- }
- },
- created(){
- var now = new Date();
- var nowMonth = now.getMonth();
- var nowYear = now.getFullYear();
-
- var monthStartDate = new Date(nowYear, nowMonth, 1);
- this.start_time = this.getTimes(monthStartDate);
- this.end_time = this.getTimes(new Date());
-
- this.org_id = this.$store.getters.xt_user.org_id;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this.getlist();
- }
- };
- </script>
-
- <style rel="stylesheet/css" lang="scss" scoped>
- </style>
|