|
@@ -3,10 +3,15 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
<el-col :span="24" class="one">
|
|
|
- <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @export="toExport">
|
|
|
+ <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @export="toExport" @sign="toSign">
|
|
|
<template #selfbtn>
|
|
|
<el-button type="primary" size="mini" @click="toAdd()">添加采购申请</el-button>
|
|
|
</template>
|
|
|
+ <template #options="{ item }">
|
|
|
+ <template v-if="item.prop == 'status_name'">
|
|
|
+ <el-option v-for="item in statusList" :key="item.label" :label="item.label" :value="item.label"></el-option>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</data-table>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -15,14 +20,13 @@
|
|
|
<template slot="info">
|
|
|
<file-1 :form="form" v-if="dialog.type == '1'" @toSave="toSave" :statusList="statusList"></file-1>
|
|
|
<info-1 :form="form" v-else-if="dialog.type == '2'"></info-1>
|
|
|
- <form-1 :form="form" v-else-if="dialog.type == '3'"></form-1>
|
|
|
</template>
|
|
|
</e-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-const { apply_status } = require('@common/src/layout/deploy/dict');
|
|
|
+const { buy_status } = require('@common/src/layout/deploy/dict');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const moment = require('moment');
|
|
|
export default {
|
|
@@ -31,7 +35,6 @@ export default {
|
|
|
components: {
|
|
|
file1: () => import('./parts/file-1.vue'),
|
|
|
info1: () => import('./parts/info-1.vue'),
|
|
|
- form1: () => import('./parts/form-1.vue'),
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
@@ -40,11 +43,12 @@ export default {
|
|
|
{ label: '订单编号', prop: 'order_num', filter: true },
|
|
|
{ label: '收货人', prop: 'receive_user_name', filter: true },
|
|
|
{ label: '供货单位', prop: 'mech_name', filter: true },
|
|
|
- { label: '货物状态', prop: 'status_name', filter: true },
|
|
|
+ { label: '货物状态', prop: 'status_name', filter: 'select' },
|
|
|
],
|
|
|
//操作项
|
|
|
opera: [
|
|
|
{ label: '详细信息', method: 'view' },
|
|
|
+ { label: '订单签收', method: 'sign', type: 'success', confirm: true, display: (i) => i.status == '1' },
|
|
|
{ label: '导出数据', method: 'export', type: 'success' },
|
|
|
],
|
|
|
//表格数据
|
|
@@ -65,6 +69,22 @@ export default {
|
|
|
{ name: '娃哈哈', num: '123', money: '344' },
|
|
|
],
|
|
|
},
|
|
|
+ {
|
|
|
+ order_num: 'Hgj4757945hdFueu',
|
|
|
+ receive_user_name: '胡图图2',
|
|
|
+ mech_name: '翻斗幼儿园-小豆班2',
|
|
|
+ status_name: '待供货单位确认',
|
|
|
+ status: '2',
|
|
|
+ user_name: '采购人员',
|
|
|
+ user_phone: '12345678901',
|
|
|
+ money: '3344',
|
|
|
+ receive_user_phone: '98765432109',
|
|
|
+ receive_address: '翻斗大街翻斗花园2号楼1001室2',
|
|
|
+ order: [
|
|
|
+ { name: '小洋人', num: '123', money: '3000' },
|
|
|
+ { name: '娃哈哈', num: '123', money: '344' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
],
|
|
|
// 列表数据总数
|
|
|
total: 0,
|
|
@@ -72,7 +92,7 @@ export default {
|
|
|
dialog: { title: '详细信息', show: false, type: '1' },
|
|
|
form: { order: [] },
|
|
|
// 状态
|
|
|
- statusList: apply_status,
|
|
|
+ statusList: buy_status,
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -90,13 +110,17 @@ export default {
|
|
|
async toExport({ data }) {
|
|
|
this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
|
|
|
},
|
|
|
+ // 订单签收
|
|
|
+ async toSign({ data }) {
|
|
|
+ console.log(data);
|
|
|
+ },
|
|
|
// 提交保存,创建/修改
|
|
|
async toSave({ data }) {
|
|
|
console.log(data);
|
|
|
},
|
|
|
// 添加
|
|
|
toAdd() {
|
|
|
- this.dialog = { title: '添加信息', show: true, type: '3', widths: '40%' };
|
|
|
+ this.$router.push({ path: '/menu/market_buy/detail' });
|
|
|
},
|
|
|
//关闭
|
|
|
toClose() {
|