123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- </div>
- <div class="app-container">
- <div
- style="
- justify-content: space-between;
- margin: 0px 0 12px 0;
- display: flex;
- align-items: center;
- "
- >
- <div>
- <el-select
- v-model="type_name"
- style="width: 170px; margin-right: 10px"
- placeholder="请选择供应商类别"
- @change="changeTypeName"
- >
- <el-option
- v-for="item in sType"
- :key="item.id"
- :label="item.name"
- :value="item.value"
- >
- </el-option>
- </el-select>
-
- <el-button
- size="small"
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="search"
- >搜索</el-button
- >
- </div>
- <div>
- <el-button size="small" type="primary" @click="toAdd(1)"
- >新增</el-button
- >
- <addSupply ref="addSupply"></addSupply>
- </div>
- </div>
-
- <el-table
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- :data="tableList"
- :class="signAndWeighBoxPatients"
- border
- >
- <el-table-column prop="SupplierType" label="供应商类别" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.TypeName }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="SupplierCode" label="供应商编码" align="center">
- <template slot-scope="scope">
- {{ scope.row.SupplierCode }}
- </template>
- </el-table-column>
- <el-table-column prop="SupplierName" label="供应商名称" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.SupplierName }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="ConName" label="首要联系人" align="center">
- <template slot-scope="scope">
- {{ scope.row.ConName }}
- </template>
- </el-table-column>
- <el-table-column prop="VatRate" label="增值税税率(%)" align="center">
- <template slot-scope="scope">
- {{ scope.row.VatRate }}
- </template>
- </el-table-column>
- <el-table-column prop="BankAccount" label="银行账号" align="center">
- <template slot-scope="scope">
- {{ scope.row.BankAccount }}
- </template>
- </el-table-column>
- <el-table-column prop="Bank" label="开户银行" align="center">
- <template slot-scope="scope">
- {{ scope.row.Bank }}
- </template>
- </el-table-column>
-
- <el-table-column prop="Number" label="纳税人识别号" align="center">
- <template slot-scope="scope">
- {{ scope.row.Number }}
- </template>
- </el-table-column>
-
- <el-table-column prop="Phone" label="手机" align="center">
- <template slot-scope="scope">
- {{ scope.row.Phone }}
- </template>
- </el-table-column>
-
- <el-table-column label="操作" align="center" width="200px">
- <template slot-scope="scope">
- <el-button
- icon="el-icon-edit-outline"
- size="small"
- type="primary"
- @click="toClick(scope.row, 2)"
- >编辑
- </el-button>
- <el-button
- icon="el-icon-delete"
- size="small"
- type="danger"
- @click="toDelete(scope.row, scope.$index)"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100, 200, 500, 1000]"
- :page-size="10"
- background
- align="right"
- style="margin-top: 20px"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
- </div>
- </template>
-
- <script>
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import addSupply from "./components/addSupply.vue";
- import { getexporthistory, delsupplys, getsupplytype } from "@/api/supply";
- export default {
- name: "stockIn",
- created() {
- this.getsupplytype();
- // this.initSupplierData()
- this.org_id = this.$store.getters.xt_user.org_id;
-
- var start_time = window.sessionStorage.getItem("start_time");
- var end_time = window.sessionStorage.getItem("end_time");
-
- if (start_time != null) {
- this.start_time = start_time;
- }
- if (end_time != null) {
- this.end_time = end_time;
- }
- window.sessionStorage.removeItem("start_time");
- window.sessionStorage.removeItem("end_time");
- this.initData();
- },
- components: {
- BreadCrumb,
- addSupply,
- },
- data() {
- return {
- page: 1,
- limit: 10,
-
- type_name: 0,
- crumbs: [
- { path: false, name: "采购管理" },
- { path: "/supply/good/order/query", name: "供应商管理" },
- ],
- keywords: "",
- total: 0,
- multipleSelection: [],
- signAndWeighBoxPatients: "sign-and-weigh-box-patients",
- start_time: "",
- end_time: "",
- page: 1,
- limit: 10,
- goodType: [],
- goodInfo: [],
- org_id: 0,
- types: [],
- tableList: [],
- tyep_name: "",
- sType: [],
- };
- },
-
- methods: {
- initData() {
- let params = {
- limit: this.limit,
- page: this.page,
- ctype: this.type_name,
- };
- getexporthistory(params).then((res) => {
- if (res.data.state == 1) {
- this.tableList = res.data.data.list;
- this.total = res.data.data.total;
- }
- });
- },
-
- getsupplytype() {
- getsupplytype().then((res) => {
- if (res.data.state == 1) {
- this.sType = res.data.data.list;
- }
- console.log(res, "oo");
- });
- },
-
- toDelete(val, index) {
- delsupplys(val.ID)
- .then((res) => {
- if (res.data.code == 0) {
- this.$message.success(res.data.data.list);
- }
- })
- .then(() => {
- this.initData();
- })
- .catch((err) => {
- console.log(err);
- });
- },
-
- toAdd(val) {
- this.$refs.addSupply.show(1, val);
- },
- toClick(data, val) {
- this.$refs.addSupply.show(data, val);
- },
- changeTypeName() {
- this.initData();
- },
- startTimeChange() {},
- endTimeChange() {},
- search() {},
- handleSizeChange(val) {
- this.limit = val;
- this.initData();
- },
- handleCurrentChange(val) {
- this.page = val;
- this.initData();
- },
- },
- };
- </script>
-
- <style rel="stylesheet/css" lang="scss" scoped>
- .information {
- border: 1px #dcdfe6 solid;
- padding: 30px 20px 30px 20px;
-
- .border {
- border-bottom: 1px #dcdfe6 solid;
- margin: 0px 0 20px 0;
- }
- }
-
- .title {
- background: #409eff;
- height: 44px;
- line-height: 44px;
- padding: 0 0 0 10px;
- color: #fff;
- margin: 0 0 10px 0;
- }
-
- .edit_separater {
- border-top: 1px solid rgb(233, 233, 233);
- margin-top: 15px;
- margin-bottom: 15px;
- }
- </style>
-
- <style>
- .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
- font-size: 12px;
- }
-
- .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
- background: #6fb5fa;
- }
-
- .count {
- color: #bd2c00;
- }
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
- </style>
|