|
@@ -2,11 +2,12 @@
|
|
|
<div>
|
|
|
<basic-container v-show="isShow">
|
|
|
<avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
|
|
|
- :table-loading="loading" @row-del="rowDel" @row-update="rowUpdate" :before-open="beforeOpen"
|
|
|
- :before-close="beforeClose" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
|
|
|
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @saveColumn="saveColumn"
|
|
|
- @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" :cell-style="cellStyle">
|
|
|
+ :table-loading="loading" @row-del="rowDel" @row-update="rowUpdate" :before-open="beforeOpen"
|
|
|
+ :before-close="beforeClose" @row-save="rowSave" @search-change="searchChange"
|
|
|
+ @search-reset="searchReset"
|
|
|
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @saveColumn="saveColumn"
|
|
|
+ @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" :cell-style="cellStyle">
|
|
|
<template slot="menuLeft" slot-scope="{size}">
|
|
|
<el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
|
|
|
<el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
|
|
@@ -16,7 +17,7 @@
|
|
|
<template slot-scope="scope" slot="orgOrderNo">
|
|
|
<span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
|
|
|
scope.row.orgOrderNo
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="corpIdSearch">
|
|
|
<crop-select v-model="search.corpId" corpType="GYS"></crop-select>
|
|
@@ -24,7 +25,7 @@
|
|
|
<template slot-scope="scope" slot="corpId">
|
|
|
<span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
|
|
|
scope.row.corpsName
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="salesCompanySearch">
|
|
|
<select-component v-model="search.salesCompany" :configuration="configuration"></select-component>
|
|
@@ -49,8 +50,11 @@
|
|
|
<!-- @click.stop="editOpen(scope.row,scope.index)"-->
|
|
|
<!-- >编辑-->
|
|
|
<!-- </el-button>-->
|
|
|
+ <el-button type="text" icon="el-icon-delete" size="small" :disabled="scope.row.deliveryStatus !== '录入'"
|
|
|
+ @click.stop="sendInGoods(scope.row, scope.index)">确认发货
|
|
|
+ </el-button>
|
|
|
<el-button type="text" icon="el-icon-delete" size="small" :disabled="scope.row.deliveryStatus === '已发货'"
|
|
|
- @click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
+ @click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -62,11 +66,12 @@
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/mainList.json";
|
|
|
-import { customerList, typeSave, deleteDetails } from "@/api/basicData/receipt"
|
|
|
+import {customerList, typeSave, deleteDetails, sendInGoods} from "@/api/basicData/receipt"
|
|
|
import detailPage from "./detailsPageEdit";
|
|
|
-import { defaultDate } from "@/util/date";
|
|
|
-import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
-import { getToken } from "@/util/auth";
|
|
|
+import {defaultDate} from "@/util/date";
|
|
|
+import {gainUser} from "@/api/basicData/customerInquiry";
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
+
|
|
|
export default {
|
|
|
name: "customerInformation",
|
|
|
components: {
|
|
@@ -121,7 +126,7 @@ export default {
|
|
|
})
|
|
|
this.getWorkDicts("procurement_method").then(res => {
|
|
|
this.findObject(this.option.column, "purchaseMode").dicData =
|
|
|
- res.data.data;
|
|
|
+ res.data.data;
|
|
|
});
|
|
|
let i = 0;
|
|
|
this.option.column.forEach(item => {
|
|
@@ -188,6 +193,19 @@ export default {
|
|
|
}
|
|
|
this.$refs.crud.getTableHeight()
|
|
|
},
|
|
|
+ //确认发货
|
|
|
+ sendInGoods(row) {
|
|
|
+ this.$confirm("是否确认发货?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ sendInGoods({id:row.id}).then(res => {
|
|
|
+ this.$message.success('发货成功')
|
|
|
+ this.onLoad(this.page, this.search)
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|
|
|
rowDel(row, index, done) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
@@ -202,7 +220,7 @@ export default {
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
this.page.currentPage = 1;
|
|
|
- this.onLoad(this.page, { parentId: 0 });
|
|
|
+ this.onLoad(this.page, {parentId: 0});
|
|
|
});
|
|
|
},
|
|
|
//修改时的修改按钮点击触发
|
|
@@ -370,7 +388,7 @@ export default {
|
|
|
//树桩列点击展开触发
|
|
|
treeLoad(tree, treeNode, resolve) {
|
|
|
const parentId = tree.id;
|
|
|
- customerList({ parentId: parentId }).then(res => {
|
|
|
+ customerList({parentId: parentId}).then(res => {
|
|
|
resolve(res.data.data.records);
|
|
|
});
|
|
|
},
|
|
@@ -408,8 +426,8 @@ export default {
|
|
|
* 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
*/
|
|
|
const inSave = await this.saveColumnData(
|
|
|
- this.getColumnName(23),
|
|
|
- this.option
|
|
|
+ this.getColumnName(23),
|
|
|
+ this.option
|
|
|
);
|
|
|
if (inSave) {
|
|
|
this.$message.success("保存成功");
|
|
@@ -423,8 +441,8 @@ export default {
|
|
|
async resetColumn() {
|
|
|
this.option = option;
|
|
|
const inSave = await this.delColumnData(
|
|
|
- this.getColumnName(23),
|
|
|
- option
|
|
|
+ this.getColumnName(23),
|
|
|
+ option
|
|
|
);
|
|
|
if (inSave) {
|
|
|
this.$nextTick(() => {
|