Merge remote-tracking branch 'origin/dev_ksck' into dev_ksck

演示数据2.0
wangwei 11 months ago
commit 5e52b074c7

@ -1,180 +1,61 @@
<template>
<div>
<el-form :model="formData" :rules="formRules" ref="dataForm" label-width="120px" disabled>
<el-row type="flex" justify="end" v-if="editType == 1">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button
v-show="!this.sysApprovalFlowConfig"
type="primary"
@click.native="saveOrder('3')"
:loading="loading"
>审核通过
</el-button
>
<el-button
v-show="!this.sysApprovalFlowConfig"
type="primary"
@click.native="saveOrder('4')"
:loading="loading"
>审核拒绝
</el-button
>
<el-button
v-show="this.sysApprovalFlowConfig"
type="primary"
@click.native="showApprovalFlowDetail()"
>审核过程
</el-button>
</el-button-group>
</el-row>
<el-card style="margin-top: -5px;">
<el-row>
<el-col :span="11">
<el-form-item label="采购单号:" prop="billNo">
<el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="创建时间:" prop="createTime">
<el-date-picker
:disabled="true"
v-model="formData.createTime"
type="datetime"
placeholder="选择日期"
style="width: 90%"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: -10px">
<el-col :span="11">
<el-form-item label="紧急程度:" prop="emergency">
<el-select v-model="formData.emergency" :disabled="true" placeholder="请选择紧急程度" style="width: 90%"
clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="到货截止:" prop="arrivalTime">
<el-date-picker
:disabled="true"
v-model="formData.arrivalTime"
type="datetime"
placeholder="选择日期"
style="width: 90%"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="采购仓库:" prop="locStorageCode">
<el-select v-model="formData.invName" placeholder="采购仓库信息" style="width: 90%"
:disabled="true" clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="审核说明:" prop="billNo">
<el-input v-model="formData.auditRemark" style="width: 90%" auto-complete="off" type="textarea"
autosize></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="采购说明:" prop="billNo">
<el-input v-model="formData.remark" style="width: 90%" :disabled="true" auto-complete="off"
type="textarea" autosize></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="11">-->
<!-- <el-form-item>-->
<!-- <el-checkbox v-model="formData.autoPurchase"></el-checkbox>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row v-show="formData.autoPurchase">
<el-col :span="11">
<el-form-item label="入库仓库:" prop="locStorageCode">
<el-select v-model="formData.targetSubInv" placeholder="入库仓库信息" style="width: 90%"
@change="targetInvChange" clearable>
<el-option
v-for="item in tarSubList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="入库单据类型:" class="query-form-item" prop="targetBillAction">
<el-select v-model="formData.targetBillAction" placeholder="请选择单据类型" style="width: 90%">
<el-option
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border
highlight-current-row max-height="300" height="300" ref="multipleTable">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="价格" prop="price" show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column width="150" label="采购数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.count"
placeholder="请输入数量" style="width: 80%"
type='number'
@change="tableCountChange(scope.row)"
:disabled="scope.row.index !== selectedIndex"
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template>
</el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="供应商" prop="supName"></el-table-column>
</el-table>
</el-card>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row >
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
<el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
<el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
<el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
<el-table-column label="紧急程度" prop="emergency" width="120">
<template slot-scope="scope" >
<el-select v-model="scope.row.emergency" :disabled="true" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
<el-table-column label="单据状态" prop="status" width="120">
<template slot-scope="scope" >
<el-tag :type="(scope.row.status == 0? 1:scope.row.status ) | statusFilterType" v-if="scope.row.approvalFlowId == null" >
{{ statusMap[(scope.row.status == 0? 1:scope.row.status ) ] }}
</el-tag>
<el-tag :type="(scope.row.flowStatus == 0? 1:scope.row.flowStatus ) | statusFilterType" v-if="scope.row.approvalFlowId != null">
{{ statusMap[(scope.row.flowStatus == 0? 1:scope.row.flowStatus ) ] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime" width="160"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="showDialog(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="采购订单详情"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<purOrderDetailDialog
:closeDialog="closeDialog"
:idQuery="this.row"
></purOrderDetailDialog>
</el-dialog>
</div>
</template>
<script>
import purOrderDetailDialog from "@/views/purchase/purOrder/purOrderDetailDialog.vue";
import {orderByBillNo} from "@/api/purchase/purOrder.js"
export default {
@ -201,21 +82,49 @@ export default {
data() {
return {
formData:{},
row:{},
statusMap: {
1: "草稿",
2: "审核中",
3: "通过",
4: "拒绝"
},
loading: false,
newSpDistributionVisible: false,
codeArray: [],
list: [],
total: 0,
filterQuery: {
limit: 1,
page: 10,
// status: 12,
// billNo:null
}
}
}
,
methods: {}
methods: {
closeDialog(){
this.newSpDistributionVisible = false
},
showDialog(row){
//
this.row = row
this.row.formData = row
this.newSpDistributionVisible = true
},
}
,
filters: {
statusFilterType(status) {
const statusMap = {
1: "info",
2: "warning",
3: "success",
4: "danger"
};
return statusMap[status];
}
,
},
created() {
/**
* 如果采购订单号外键 不为 触发 获取 订单 明细
@ -225,8 +134,7 @@ export default {
orderByBillNo(this.rowData.purOrderBillNo)
.then((response) => {
if (response.code == 20000) {
this.formData = response.data;
this.codeArray = response.data.items || [];
this.list = response.data.list ;
} else {
this.$message.error(response.message);
}
@ -237,7 +145,7 @@ export default {
});
}
},
components: {}
components: {purOrderDetailDialog}
}
</script>

Loading…
Cancel
Save