添加订单列表查询条件
This commit is contained in:
parent
f1885a11fb
commit
181d4c0f80
|
|
@ -25,35 +25,35 @@
|
||||||
:label="item.supplierName"
|
:label="item.supplierName"
|
||||||
:value="item.supplierId"
|
:value="item.supplierId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提交状态" prop="orderStatus">
|
<el-form-item label="提交状态" prop="orderStatus">
|
||||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择提交状态" style="width: 240px;">
|
<el-select v-model="queryParams.orderStatus" placeholder="请选择提交状态" style="width: 240px;">
|
||||||
<el-option label="待提交" :value="1"></el-option>
|
<el-option label="待提交" :value="1"></el-option>
|
||||||
<el-option label="已提交" :value="2"></el-option>
|
<el-option label="已提交" :value="2"></el-option>
|
||||||
<el-option label="已验货" :value="3"></el-option>
|
<el-option label="已验货" :value="3"></el-option>
|
||||||
<el-option label="已完成" :value="4"></el-option>
|
<el-option label="已完成" :value="4"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="审批状态" prop="approveStatus">
|
<!-- <el-form-item label="审批状态" prop="approveStatus">
|
||||||
<el-select v-model="queryParams.approveStatus" placeholder="请选择审批状态" style="width: 240px;">
|
<el-select v-model="queryParams.approveStatus" placeholder="请选择审批状态" style="width: 240px;">
|
||||||
<el-option label="待审批" :value="1"></el-option>
|
<el-option label="待审批" :value="1"></el-option>
|
||||||
<el-option label="审批中" :value="2"></el-option>
|
<el-option label="审批中" :value="2"></el-option>
|
||||||
<el-option label="审批同意" :value="3"></el-option>
|
<el-option label="审批同意" :value="3"></el-option>
|
||||||
<el-option label="审批拒绝" :value="4"></el-option>
|
<el-option label="审批拒绝" :value="4"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<!-- <el-form-item label="确认状态" prop="supplierConfirmStatus">
|
<!-- <el-form-item label="确认状态" prop="supplierConfirmStatus">
|
||||||
<el-select v-model="queryParams.supplierConfirmStatus" placeholder="请选择确认状态" style="width: 240px;">
|
<el-select v-model="queryParams.supplierConfirmStatus" placeholder="请选择确认状态" style="width: 240px;">
|
||||||
<el-option label="待确认" :value="1"></el-option>
|
<el-option label="待确认" :value="1"></el-option>
|
||||||
<el-option label="确认通过" :value="2"></el-option>
|
<el-option label="确认通过" :value="2"></el-option>
|
||||||
<el-option label="已拒绝" :value="3"></el-option>
|
<el-option label="已拒绝" :value="3"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="queryParams.areaId"
|
<el-cascader v-model="queryParams.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||||
:props="{
|
:props="{
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'label'
|
value:'id',label:'label'
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
:label="item.canteenName"
|
:label="item.canteenName"
|
||||||
:value="item.canteenId"
|
:value="item.canteenId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属档口" prop="stallId">
|
<el-form-item label="所属档口" prop="stallId">
|
||||||
<el-select v-model="queryParams.stallId" placeholder="请选择所属档口" style="width: 100%;" >
|
<el-select v-model="queryParams.stallId" placeholder="请选择所属档口" style="width: 100%;" >
|
||||||
|
|
@ -76,10 +76,10 @@
|
||||||
:label="item.stallName"
|
:label="item.stallName"
|
||||||
:value="item.stallId"
|
:value="item.stallId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -109,82 +109,82 @@
|
||||||
<el-table-column label="生产计划单号" align="center" prop="productPlanCodeList" :show-overflow-tooltip="true" width="180">
|
<el-table-column label="生产计划单号" align="center" prop="productPlanCodeList" :show-overflow-tooltip="true" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.productPlanCodeList">
|
<div v-if="scope.row.productPlanCodeList">
|
||||||
<div v-for="(item,index) in scope.row.productPlanCodeList" :key="index">{{ item }}</div>
|
<div v-for="(item,index) in scope.row.productPlanCodeList" :key="index">{{ item }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购计划单号" align="center" prop="purchasePlanCodeList" :show-overflow-tooltip="true" width="180">
|
<el-table-column label="采购计划单号" align="center" prop="purchasePlanCodeList" :show-overflow-tooltip="true" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.purchasePlanCodeList">
|
<div v-if="scope.row.purchasePlanCodeList">
|
||||||
<div v-for="(item,index) in scope.row.purchasePlanCodeList" :key="index">{{ item }}</div>
|
<div v-for="(item,index) in scope.row.purchasePlanCodeList" :key="index">{{ item }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购订单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" width="180"/>
|
<el-table-column label="采购订单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" width="180"/>
|
||||||
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true" width="180"/>
|
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true" width="180"/>
|
||||||
<el-table-column label="采购订单时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="160"/>
|
<el-table-column label="采购订单时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="160"/>
|
||||||
|
|
||||||
<el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
|
<el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.orderStatus==1">待提交</span>
|
<span v-if="scope.row.orderStatus==1">待提交</span>
|
||||||
<span v-if="scope.row.orderStatus==2">已提交</span>
|
<span v-if="scope.row.orderStatus==2">已提交</span>
|
||||||
<span v-if="scope.row.orderStatus==3">已验货</span>
|
<span v-if="scope.row.orderStatus==3">已验货</span>
|
||||||
<span v-if="scope.row.orderStatus==4">已完成</span>
|
<span v-if="scope.row.orderStatus==4">已完成</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
|
<!-- <el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.supplierConfirmStatus==1">待确认</span>
|
<span v-if="scope.row.supplierConfirmStatus==1">待确认</span>
|
||||||
<span v-if="scope.row.supplierConfirmStatus==2">确认通过</span>
|
<span v-if="scope.row.supplierConfirmStatus==2">确认通过</span>
|
||||||
<span v-if="scope.row.supplierConfirmStatus==3">已拒绝</span>
|
<span v-if="scope.row.supplierConfirmStatus==3">已拒绝</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="订单总金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="订单总金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="货品总数量" align="center" prop="totalNum" :show-overflow-tooltip="true" width="100"/>
|
<el-table-column label="货品总数量" align="center" prop="totalNum" :show-overflow-tooltip="true" width="100"/>
|
||||||
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="交货日期" align="center" prop="requestArrivalTime" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="交货日期" align="center" prop="requestArrivalTime" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="所属区域-食堂-档口" align="center" prop="" :show-overflow-tooltip="true" width="250">
|
<el-table-column label="所属区域-食堂-档口" align="center" prop="" :show-overflow-tooltip="true" width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.areaName }}-{{ scope.row.canteenName }}-{{ scope.row.stallName }}</span>
|
<span>{{ scope.row.areaName }}-{{ scope.row.canteenName }}-{{ scope.row.stallName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150"/>
|
<!-- <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="150"/> -->
|
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="150"/> -->
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.orderStatus==1||scope.row.orderStatus==2"
|
icon="el-icon-edit" v-if="scope.row.orderStatus==1||scope.row.orderStatus==2"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.orderStatus==3"
|
icon="el-icon-edit" v-if="scope.row.orderStatus==3"
|
||||||
@click="handleFinish(scope.row)"
|
@click="handleFinish(scope.row)"
|
||||||
>订单完成</el-button>
|
>订单完成</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.orderStatus!=1"
|
icon="el-icon-edit" v-if="scope.row.orderStatus!=1"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.orderStatus==2||scope.row.orderStatus==3"
|
icon="el-icon-edit" v-if="scope.row.orderStatus==2||scope.row.orderStatus==3"
|
||||||
@click="handlePurchaseInspection(scope.row)"
|
@click="handlePurchaseInspection(scope.row)"
|
||||||
>生成采购验货</el-button>
|
>生成采购验货</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete" v-if="scope.row.orderStatus==1"
|
icon="el-icon-delete" v-if="scope.row.orderStatus==1"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -205,7 +205,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -216,8 +216,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||||
import { supplierPageApi } from "@/api/foodManage/purchaseManage";
|
import { supplierPageApi } from "@/api/foodManage/purchaseManage";
|
||||||
import { purchaseOrderPageApi,getPurchaseOrderInfoApi,delPurchaseOrderApi,finishPurchaseOrderApi,addPurchaseInspectApi } from "@/api/foodManage/purchaseManage";
|
import { purchaseOrderPageApi,getPurchaseOrderInfoApi,delPurchaseOrderApi,finishPurchaseOrderApi,addPurchaseInspectApi } from "@/api/foodManage/purchaseManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -243,11 +243,11 @@ export default {
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
treeAreaOptions:[],//区域树
|
treeAreaOptions:[],//区域树
|
||||||
canteenOptions:[],//食堂下拉选
|
canteenOptions:[],//食堂下拉选
|
||||||
|
|
@ -294,7 +294,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getAreaTreeData();
|
this.getAreaTreeData();
|
||||||
this.getSupplierData();
|
this.getSupplierData();
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
@ -303,7 +303,7 @@ export default {
|
||||||
//区域树
|
//区域树
|
||||||
getAreaTreeData() {
|
getAreaTreeData() {
|
||||||
systemAreaTreeApi({}).then((response) => {
|
systemAreaTreeApi({}).then((response) => {
|
||||||
this.treeAreaOptions = response.data;
|
this.treeAreaOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAreaChange(e){
|
handleAreaChange(e){
|
||||||
|
|
@ -312,33 +312,33 @@ export default {
|
||||||
}
|
}
|
||||||
getCanteenByAreaApi(param).then((response) => {
|
getCanteenByAreaApi(param).then((response) => {
|
||||||
this.canteenOptions=response.rows||[]
|
this.canteenOptions=response.rows||[]
|
||||||
this.$set(this.queryParams,"canteenId",null)
|
this.$set(this.queryParams,"canteenId",null)
|
||||||
this.stallOptions = []
|
this.stallOptions = []
|
||||||
this.$set(this.queryParams,"stallId",null)
|
this.$set(this.queryParams,"stallId",null)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCanteenChange(e){
|
handleCanteenChange(e){
|
||||||
let param= {
|
let param= {
|
||||||
canteenId:e
|
canteenId:e
|
||||||
}
|
}
|
||||||
getStallByCanteenApi(param).then((response) => {
|
getStallByCanteenApi(param).then((response) => {
|
||||||
this.stallOptions=response.rows||[]
|
this.stallOptions=response.rows||[]
|
||||||
this.$set(this.queryParams,"stallId",null)
|
this.$set(this.queryParams,"stallId",null)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询供应商下拉结构 */
|
/** 查询供应商下拉结构 */
|
||||||
getSupplierData() {
|
getSupplierData() {
|
||||||
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
||||||
this.supplierOptions = response.rows||[];
|
this.supplierOptions = response.rows||[];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = this.defaultDateRange()
|
this.dateRange = this.defaultDateRange()
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -351,15 +351,15 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"orderGoodsCode": this.queryParams.orderGoodsCode,
|
"orderGoodsCode": this.queryParams.orderGoodsCode,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.queryParams.areaId,
|
||||||
"canteenId": this.queryParams.canteenId,
|
"canteenId": this.queryParams.canteenId,
|
||||||
"stallId": this.queryParams.stallId,
|
"stallId": this.queryParams.stallId,
|
||||||
"supplierId": this.queryParams.supplierId,
|
"supplierId": this.queryParams.supplierId,
|
||||||
"orderStatus": this.queryParams.orderStatus,
|
"orderStatus": this.queryParams.orderStatus,
|
||||||
// "supplierConfirmStatus": this.queryParams.supplierConfirmStatus,
|
// "supplierConfirmStatus": this.queryParams.supplierConfirmStatus,
|
||||||
// "approveStatus": this.queryParams.approveStatus
|
// "approveStatus": this.queryParams.approveStatus
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
|
|
@ -368,27 +368,28 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
param.startDateTime=undefined;
|
param.startDateTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endDateTime=undefined;
|
||||||
}
|
}
|
||||||
|
param.pageOrForm =2;
|
||||||
purchaseOrderPageApi(param).then(response => {
|
purchaseOrderPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$router.push({ path: "/foodManage/purchaseManage/orderEdit" });
|
this.$router.push({ path: "/foodManage/purchaseManage/orderEdit" });
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.$router.push({ path: "/foodManage/purchaseManage/orderDetail",query: {purchaseOrderRowData:JSON.stringify(row)} });
|
this.$router.push({ path: "/foodManage/purchaseManage/orderDetail",query: {purchaseOrderRowData:JSON.stringify(row)} });
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.$router.push({ path: "/foodManage/purchaseManage/orderEdit",query: {purchaseOrderRowData:JSON.stringify(row)} });
|
this.$router.push({ path: "/foodManage/purchaseManage/orderEdit",query: {purchaseOrderRowData:JSON.stringify(row)} });
|
||||||
},
|
},
|
||||||
//订单完成按钮
|
//订单完成按钮
|
||||||
handleFinish(row) {
|
handleFinish(row) {
|
||||||
this.$modal.confirm('是否确认该订单已完成?').then(function() {
|
this.$modal.confirm('是否确认该订单已完成?').then(function() {
|
||||||
return finishPurchaseOrderApi({orderGoodsId:row.orderGoodsId});
|
return finishPurchaseOrderApi({orderGoodsId:row.orderGoodsId});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
@ -405,7 +406,7 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {};
|
this.form = {};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|
@ -427,7 +428,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delPurchaseOrderApi({orderGoodsIds:[row.orderGoodsId]});
|
return delPurchaseOrderApi({orderGoodsIds:[row.orderGoodsId]});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
@ -440,51 +441,51 @@ export default {
|
||||||
getPurchaseOrderInfoApi({orderGoodsId:row.orderGoodsId}).then((response) => {
|
getPurchaseOrderInfoApi({orderGoodsId:row.orderGoodsId}).then((response) => {
|
||||||
var orderGoodsDetailList = response.data.orderGoodsDetailList;
|
var orderGoodsDetailList = response.data.orderGoodsDetailList;
|
||||||
var that = this
|
var that = this
|
||||||
this.$modal.confirm('是否确认生成采购验货?').then(function() {
|
this.$modal.confirm('是否确认生成采购验货?').then(function() {
|
||||||
var param = {
|
var param = {
|
||||||
status:1,
|
status:1,
|
||||||
relateOrderGoodsId:row.orderGoodsCode,
|
relateOrderGoodsId:row.orderGoodsCode,
|
||||||
deliveryDate:null,
|
deliveryDate:null,
|
||||||
areaId:row.areaId,
|
areaId:row.areaId,
|
||||||
deliveryWarehouseId:row.warehouseId,
|
deliveryWarehouseId:row.warehouseId,
|
||||||
deliverySupplierId:row.supplierId,
|
deliverySupplierId:row.supplierId,
|
||||||
deliveryMan:null,
|
deliveryMan:null,
|
||||||
deliveryPhone:null,
|
deliveryPhone:null,
|
||||||
inspectDate:that.formatDateTime(row.requestArrivalTime),
|
inspectDate:that.formatDateTime(row.requestArrivalTime),
|
||||||
inspector:null,
|
inspector:null,
|
||||||
inspectGoodsDetails: [],
|
inspectGoodsDetails: [],
|
||||||
deliveryTotalNum:0,
|
deliveryTotalNum:0,
|
||||||
inspectQualifiedNum:0,
|
inspectQualifiedNum:0,
|
||||||
contractAttachment:"",
|
contractAttachment:"",
|
||||||
remark:"采购订单生成采购验货",
|
remark:"采购订单生成采购验货",
|
||||||
}
|
}
|
||||||
orderGoodsDetailList.forEach(item=>{
|
orderGoodsDetailList.forEach(item=>{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
obj.unitPrice = Number(item.singlePrice)
|
obj.unitPrice = Number(item.singlePrice)
|
||||||
obj.deliveryNum = Number(item.orderNum)
|
obj.deliveryNum = Number(item.orderNum)
|
||||||
obj.qualifiedNum = Number(item.orderNum)
|
obj.qualifiedNum = Number(item.orderNum)
|
||||||
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
||||||
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
||||||
param.inspectGoodsDetails.push(obj)
|
param.inspectGoodsDetails.push(obj)
|
||||||
})
|
})
|
||||||
console.log(param)
|
console.log(param)
|
||||||
return addPurchaseInspectApi(param);//新增采购验货
|
return addPurchaseInspectApi(param);//新增采购验货
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$router.push({ path: "/foodManage/purchaseManage/inspectionEdit",query: {purchaseInspectionRowData:JSON.stringify(res.data)} });
|
this.$router.push({ path: "/foodManage/purchaseManage/inspectionEdit",query: {purchaseInspectionRowData:JSON.stringify(res.data)} });
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
||||||
const start = new Date((new Date().toLocaleDateString()));
|
const start = new Date((new Date().toLocaleDateString()));
|
||||||
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
||||||
this.start = parseInt(start.getTime() / 1000)
|
this.start = parseInt(start.getTime() / 1000)
|
||||||
this.end = parseInt(end.getTime() / 1000)
|
this.end = parseInt(end.getTime() / 1000)
|
||||||
return [start, end]
|
return [start, end]
|
||||||
},
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
// 格式化为 YYYY-MM-DD
|
// 格式化为 YYYY-MM-DD
|
||||||
|
|
@ -505,7 +506,7 @@ export default {
|
||||||
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue