17 changed files with 1768 additions and 118 deletions
@ -0,0 +1,114 @@ |
|||
package com.ruoyi.purchase.domain.Vo; |
|||
|
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
import com.ruoyi.purchase.domain.PurchaseQuote; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* @author Lenovo |
|||
* @Description BOM信息Vo |
|||
*/ |
|||
|
|||
public class PurchaseQuoteVo extends PurchaseQuote { |
|||
private static final long serialVersionUID = 1L; |
|||
/** 申请人姓名 */ |
|||
private String applyUserName; |
|||
/** 任务ID */ |
|||
private String taskId; |
|||
/** 任务名称 */ |
|||
private String taskName; |
|||
/** 办理时间 */ |
|||
private Date doneTime; |
|||
/** 创建人 */ |
|||
private String createUserName; |
|||
/** 流程实例状态 1 激活 2 挂起 */ |
|||
private String suspendState; |
|||
/** 待办用户id */ |
|||
private String todoUserId; |
|||
/** 流程实例类型名称 */ |
|||
private String instanceTypeName; |
|||
|
|||
|
|||
|
|||
public String getApplyUserName() { |
|||
return applyUserName; |
|||
} |
|||
|
|||
public void setApplyUserName(String applyUserName) { |
|||
this.applyUserName = applyUserName; |
|||
} |
|||
|
|||
public String getTaskId() { |
|||
return taskId; |
|||
} |
|||
|
|||
public void setTaskId(String taskId) { |
|||
this.taskId = taskId; |
|||
} |
|||
|
|||
public String getTaskName() { |
|||
return taskName; |
|||
} |
|||
|
|||
public void setTaskName(String taskName) { |
|||
this.taskName = taskName; |
|||
} |
|||
|
|||
public Date getDoneTime() { |
|||
return doneTime; |
|||
} |
|||
|
|||
public void setDoneTime(Date doneTime) { |
|||
this.doneTime = doneTime; |
|||
} |
|||
|
|||
public String getCreateUserName() { |
|||
return createUserName; |
|||
} |
|||
|
|||
public void setCreateUserName(String createUserName) { |
|||
this.createUserName = createUserName; |
|||
} |
|||
|
|||
public String getSuspendState() { |
|||
return suspendState; |
|||
} |
|||
|
|||
public void setSuspendState(String suspendState) { |
|||
this.suspendState = suspendState; |
|||
} |
|||
|
|||
public String getTodoUserId() { |
|||
return todoUserId; |
|||
} |
|||
|
|||
public void setTodoUserId(String todoUserId) { |
|||
this.todoUserId = todoUserId; |
|||
} |
|||
|
|||
public String getInstanceTypeName() { |
|||
return instanceTypeName; |
|||
} |
|||
|
|||
public void setInstanceTypeName(String instanceTypeName) { |
|||
this.instanceTypeName = instanceTypeName; |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "PurchaseQuoteVo{" + |
|||
"applyUserName='" + applyUserName + '\'' + |
|||
", taskId='" + taskId + '\'' + |
|||
", taskName='" + taskName + '\'' + |
|||
", doneTime=" + doneTime + |
|||
", createUserName='" + createUserName + '\'' + |
|||
", suspendState='" + suspendState + '\'' + |
|||
", todoUserId='" + todoUserId + '\'' + |
|||
", instanceTypeName='" + instanceTypeName + '\'' + |
|||
"} " + super.toString(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,329 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('采购经理审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<th:block th:include="include :: bootstrap-editable-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-purchaseQuote-cgjl-audit" th:object="${formData}"> |
|||
<input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input name="taskName" th:field="*{taskName}" type="hidden"> |
|||
<input name="instanceId" th:field="*{instanceId}" type="hidden"> |
|||
<input name="instanceType" th:field="*{instanceType}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUser" th:field="*{applyUser}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label" >采购报价单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="purchaseQuoteCode_edit" name="purchaseQuoteCode" th:field="*{purchaseQuoteCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierName" th:field="*{supplierName}" class="form-control"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">定价日期:</label> |
|||
<div class="input-group date"> |
|||
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注说明:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" class="form-control" th:field="*{remark}"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">附件:</label> |
|||
<div class="col-sm-8"> |
|||
<el-upload |
|||
:action="fileUploadUrl" |
|||
:on-success="uploadSuccess" |
|||
:on-preview="handlePictureCardPreview" |
|||
:on-remove="uploadRemove" |
|||
:file-list="fileList" |
|||
:limit="5" |
|||
list-type="picture" |
|||
accept=".jpg,.png" |
|||
multiple> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div> |
|||
</el-upload> |
|||
<el-dialog :visible.sync="dialogVisible"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
<input id="fileIdStr" type="text" name="fileIdStr" hidden> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">税率:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group"> |
|||
<input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="cgjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_cgjlVerifyApproved" id="cgjlVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
<input id="purchaseQuoteChildList_cgjl" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" /> |
|||
</form> |
|||
<div class="container"> |
|||
<div class="form-row"> |
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<span>选择报价信息</span> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-sub-table-purchaseQuoteChild"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|||
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; |
|||
var prefix = ctx + "purchase/purchaseQuote"; |
|||
var purchaseQuote = [[${formData}]]; |
|||
new Vue({ |
|||
el: '#app', |
|||
data: function() { |
|||
return { |
|||
fileList: [], |
|||
fileUploadUrl: ctx + "common/uploadSingleFile", |
|||
fileDeleteUrl: ctx + "common/deleteFile", |
|||
fileIdList:[], |
|||
dialogImageUrl: '', |
|||
dialogVisible: false |
|||
} |
|||
}, |
|||
methods: { |
|||
handlePictureCardPreview(file) { |
|||
this.dialogImageUrl = file.url; |
|||
this.dialogVisible = true; |
|||
}, |
|||
uploadSuccess(response, file, fileList) { |
|||
console.log(response); |
|||
if(response.code == web_status.SUCCESS){ |
|||
var attachFileId = response.data.id; |
|||
file.attachFileId = attachFileId; |
|||
this.fileIdList.push(attachFileId); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
$.modal.msgSuccess("上传成功"); |
|||
}else{ |
|||
$.modal.alertError(response.msg); |
|||
} |
|||
}, |
|||
uploadRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
var attachFileId = file.attachFileId; |
|||
$.ajax({ |
|||
type: "get", |
|||
url: this.fileDeleteUrl, |
|||
data: {id:attachFileId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
} |
|||
$.modal.msgSuccess("删除附件成功。"); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertError("删除附件失败。"); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
} |
|||
}); |
|||
$("#form-purchaseQuote-cgjl-audit").validate({focusCleanup: true}); |
|||
$(function() { |
|||
var options = { |
|||
id:'bootstrap-sub-table-purchaseQuoteChild', |
|||
url: ctx + "purchase/purchaseQuoteChild/list", |
|||
pagination: false, |
|||
queryParams: function(params) { |
|||
var temp = { |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
sortName: params.sort, |
|||
sortOrder: params.order, |
|||
purchaseQuoteCode: purchaseQuote.purchaseQuoteCode, |
|||
delFlag: 0 |
|||
} |
|||
return temp; |
|||
}, |
|||
sidePagination: "client", |
|||
model: "物料报价信息", |
|||
columns: [ |
|||
{checkbox: true}, |
|||
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, |
|||
{title: '料号',field: 'materialCode',align: 'center'}, |
|||
{title: '物料名称',field: 'materialName',align: 'center'}, |
|||
{title: '图片',field: 'photoUrl', |
|||
formatter: function(value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{title: '物料类型',field: 'materialType',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ title: '描述',field: 'describe',align: 'center'}, |
|||
{title: '品牌',field: 'brand',align: 'center'}, |
|||
{ title: '单位',field: 'unit',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|||
} |
|||
}, |
|||
{title: '半成品类型',field: 'processMethod',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{title:'最新报价',field: 'materialSole',align: 'center',}, |
|||
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, |
|||
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, |
|||
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, |
|||
{title: '录入人',field: 'createBy',align: 'center',visible: false}, |
|||
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, |
|||
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, |
|||
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, |
|||
{title: '备注',field: 'remark',align: 'center'}, |
|||
], |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
function doSubmit(index, layero,uniqueId){ |
|||
console.log(uniqueId); |
|||
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|||
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|||
console.log("rowData: "+rowData); |
|||
$("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('insertRow', { |
|||
index:1, |
|||
row: { |
|||
materialId:rowData.id, |
|||
materialCode: rowData.materialNo, |
|||
materialName: rowData.materialName, |
|||
materialType: rowData.materialType, |
|||
describe: rowData.describe, |
|||
brand: rowData.brand, |
|||
unit: rowData.unit, |
|||
processMethod: rowData.processMethod, |
|||
photoUrl: rowData.photoUrl, |
|||
materialSole: '', |
|||
materialNum: 1, |
|||
materialRmb: "", |
|||
materialNoRmb: "", |
|||
materialNoRmbSum: "", |
|||
materialRmbSum: "", |
|||
remark: "" |
|||
} |
|||
}) |
|||
layer.close(index); |
|||
} |
|||
function insertRow() { |
|||
var url = ctx + "erp/material/select"; |
|||
var options = { |
|||
title: '选择料号', |
|||
url: url, |
|||
callBack: doSubmit |
|||
}; |
|||
$.modal.openOptions(options); |
|||
} |
|||
/* 删除指定表格行 */ |
|||
function removeRow(materialCode){ |
|||
$("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('remove', { |
|||
field: 'materialCode', |
|||
values: materialCode |
|||
}) |
|||
} |
|||
function submitHandler() { |
|||
var taskId = [[${taskId}]]; |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData'); |
|||
$('input[name="purchaseQuoteChildLists"]').val(JSON.stringify(tableData)); |
|||
var formData = $("#form-purchaseQuote-cgjl-audit").serialize(); |
|||
$.operate.save(prefix + "/complete/" + taskId,formData); |
|||
} |
|||
} |
|||
$("input[name='pricingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,335 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('采购主管审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<th:block th:include="include :: bootstrap-editable-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-purchaseQuote-cgzg-audit" th:object="${formData}"> |
|||
<input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input name="taskName" th:field="*{taskName}" type="hidden"> |
|||
<input name="instanceId" th:field="*{instanceId}" type="hidden"> |
|||
<input name="instanceType" th:field="*{instanceType}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUser" th:field="*{applyUser}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label" >采购报价单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="purchaseQuoteCode_edit" name="purchaseQuoteCode" th:field="*{purchaseQuoteCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierName" th:field="*{supplierName}" class="form-control"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">定价日期:</label> |
|||
<div class="input-group date"> |
|||
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注说明:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" class="form-control" th:field="*{remark}"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">附件:</label> |
|||
<div class="col-sm-8"> |
|||
<el-upload |
|||
:action="fileUploadUrl" |
|||
:on-success="uploadSuccess" |
|||
:on-preview="handlePictureCardPreview" |
|||
:on-remove="uploadRemove" |
|||
:file-list="fileList" |
|||
:limit="5" |
|||
list-type="picture" |
|||
accept=".jpg,.png" |
|||
multiple> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div> |
|||
</el-upload> |
|||
<el-dialog :visible.sync="dialogVisible"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
<input id="fileIdStr" type="text" name="fileIdStr" hidden> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">税率:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group"> |
|||
<input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="cgzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_cgzgVerifyApproved" id="cgzgVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
<input id="purchaseQuoteChildList_cgzg" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" /> |
|||
</form> |
|||
<div class="container"> |
|||
<div class="form-row"> |
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<span>选择报价信息</span> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-sub-table-purchaseQuoteChild"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|||
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; |
|||
var prefix = ctx + "purchase/purchaseQuote"; |
|||
var purchaseQuote = [[${formData}]]; |
|||
new Vue({ |
|||
el: '#app', |
|||
data: function() { |
|||
return { |
|||
fileList: [], |
|||
fileUploadUrl: ctx + "common/uploadSingleFile", |
|||
fileDeleteUrl: ctx + "common/deleteFile", |
|||
fileIdList:[], |
|||
dialogImageUrl: '', |
|||
dialogVisible: false |
|||
} |
|||
}, |
|||
methods: { |
|||
handlePictureCardPreview(file) { |
|||
this.dialogImageUrl = file.url; |
|||
this.dialogVisible = true; |
|||
}, |
|||
uploadSuccess(response, file, fileList) { |
|||
console.log(response); |
|||
if(response.code == web_status.SUCCESS){ |
|||
var attachFileId = response.data.id; |
|||
file.attachFileId = attachFileId; |
|||
this.fileIdList.push(attachFileId); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
$.modal.msgSuccess("上传成功"); |
|||
}else{ |
|||
$.modal.alertError(response.msg); |
|||
} |
|||
}, |
|||
uploadRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
var attachFileId = file.attachFileId; |
|||
$.ajax({ |
|||
type: "get", |
|||
url: this.fileDeleteUrl, |
|||
data: {id:attachFileId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
} |
|||
$.modal.msgSuccess("删除附件成功。"); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertError("删除附件失败。"); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
} |
|||
}); |
|||
$("#form-purchaseQuote-cgzg-audit").validate({focusCleanup: true}); |
|||
$(function() { |
|||
var options = { |
|||
id:'bootstrap-sub-table-purchaseQuoteChild', |
|||
url: ctx + "purchase/purchaseQuoteChild/list", |
|||
pagination: false, |
|||
queryParams: function(params) { |
|||
var temp = { |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
sortName: params.sort, |
|||
sortOrder: params.order, |
|||
purchaseQuoteCode: purchaseQuote.purchaseQuoteCode, |
|||
delFlag: 0 |
|||
} |
|||
return temp; |
|||
}, |
|||
sidePagination: "client", |
|||
model: "物料报价信息", |
|||
columns: [ |
|||
{checkbox: true}, |
|||
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, |
|||
{title: '料号',field: 'materialCode',align: 'center'}, |
|||
{title: '物料名称',field: 'materialName',align: 'center'}, |
|||
{title: '图片',field: 'photoUrl', |
|||
formatter: function(value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{title: '物料类型',field: 'materialType',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ title: '描述',field: 'describe',align: 'center'}, |
|||
{title: '品牌',field: 'brand',align: 'center'}, |
|||
{ title: '单位',field: 'unit',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|||
} |
|||
}, |
|||
{title: '半成品类型',field: 'processMethod',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{title:'最新报价',field: 'materialSole',align: 'center',}, |
|||
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, |
|||
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center'}, |
|||
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, |
|||
{title: '录入人',field: 'createBy',align: 'center',visible: false}, |
|||
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, |
|||
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, |
|||
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, |
|||
{title: '备注',field: 'remark',align: 'center'}, |
|||
], |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
function doSubmit(index, layero,uniqueId){ |
|||
console.log(uniqueId); |
|||
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|||
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|||
console.log("rowData: "+rowData); |
|||
$("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('insertRow', { |
|||
index:1, |
|||
row: { |
|||
materialId:rowData.id, |
|||
materialCode: rowData.materialNo, |
|||
materialName: rowData.materialName, |
|||
materialType: rowData.materialType, |
|||
describe: rowData.describe, |
|||
brand: rowData.brand, |
|||
unit: rowData.unit, |
|||
processMethod: rowData.processMethod, |
|||
photoUrl: rowData.photoUrl, |
|||
materialSole: '', |
|||
materialNum: 1, |
|||
materialRmb: "", |
|||
materialNoRmb: "", |
|||
materialNoRmbSum: "", |
|||
materialRmbSum: "", |
|||
remark: "" |
|||
} |
|||
}) |
|||
layer.close(index); |
|||
} |
|||
function insertRow() { |
|||
var url = ctx + "erp/material/select"; |
|||
var options = { |
|||
title: '选择料号', |
|||
url: url, |
|||
callBack: doSubmit |
|||
}; |
|||
$.modal.openOptions(options); |
|||
} |
|||
/* 删除指定表格行 */ |
|||
function removeRow(materialCode){ |
|||
$("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('remove', { |
|||
field: 'materialCode', |
|||
values: materialCode |
|||
}) |
|||
} |
|||
function submitHandler() { |
|||
var taskId = [[${taskId}]]; |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData'); |
|||
if (tableData.length === 0) { |
|||
$.modal.alertWarning("子表数据不能为空!"); |
|||
} else { |
|||
// 将子表数据添加到FormData中 |
|||
$('input[name="purchaseQuoteChildLists"]').val(JSON.stringify(tableData)); |
|||
var formData = $("#form-purchaseQuote-cgzg-audit").serialize(); |
|||
// 发送请求 |
|||
$.operate.save(prefix + "/complete/" + taskId, formData) |
|||
} |
|||
} |
|||
} |
|||
$("input[name='pricingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,318 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('驳回申请')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<th:block th:include="include :: bootstrap-editable-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-purchaseQuote-modify" th:object="${formData}"> |
|||
<input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input name="taskName" th:field="*{taskName}" type="hidden"> |
|||
<input name="instanceId" th:field="*{instanceId}" type="hidden"> |
|||
<input name="instanceType" th:field="*{instanceType}" type="hidden"> |
|||
<!--驳回调整允许更新内容--> |
|||
<input type="hidden" name="saveEntity" value="true" /> |
|||
<input type="hidden" name="p_B_reApply" class="form-control m-b" /> |
|||
<div class="form-group" hidden="hidden"> |
|||
<label class="col-sm-3 control-label" >采购报价单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="purchaseQuoteCode_edit" name="purchaseQuoteCode" th:field="*{purchaseQuoteCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="supplierName" th:field="*{supplierName}" class="form-control"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">定价日期:</label> |
|||
<div class="input-group date"> |
|||
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注说明:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" class="form-control" th:field="*{remark}"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">附件:</label> |
|||
<div class="col-sm-8"> |
|||
<el-upload |
|||
:action="fileUploadUrl" |
|||
:on-success="uploadSuccess" |
|||
:on-preview="handlePictureCardPreview" |
|||
:on-remove="uploadRemove" |
|||
:file-list="fileList" |
|||
:limit="5" |
|||
list-type="picture" |
|||
accept=".jpg,.png" |
|||
multiple> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div> |
|||
</el-upload> |
|||
<el-dialog :visible.sync="dialogVisible"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
<input id="fileIdStr" type="text" name="fileIdStr" hidden> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">税率:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group"> |
|||
<input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="reApply" name="reApply" class="form-control m-b"> |
|||
<option value="true">重新申请</option> |
|||
<option value="false">结束流程</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<input id="purchaseQuoteChildList_modify" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" /> |
|||
</form> |
|||
<div class="container"> |
|||
<div class="form-row"> |
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<span>选择报价信息</span> |
|||
<a class="btn btn-success" onclick="insertRow()"> |
|||
<i class="fa fa-plus"></i> 添加物料 |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-sub-table-purchaseQuoteChild"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js"/> |
|||
<th:block th:include="include :: datetimepicker-js"/> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|||
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; |
|||
var prefix = ctx + "purchase/purchaseQuote"; |
|||
var purchaseQuote = [[${formData}]]; |
|||
new Vue({ |
|||
el: '#app', |
|||
data: function() { |
|||
return { |
|||
fileList: [], |
|||
fileUploadUrl: ctx + "common/uploadSingleFile", |
|||
fileDeleteUrl: ctx + "common/deleteFile", |
|||
fileIdList:[], |
|||
dialogImageUrl: '', |
|||
dialogVisible: false |
|||
} |
|||
}, |
|||
methods: { |
|||
handlePictureCardPreview(file) { |
|||
this.dialogImageUrl = file.url; |
|||
this.dialogVisible = true; |
|||
}, |
|||
uploadSuccess(response, file, fileList) { |
|||
console.log(response); |
|||
if(response.code == web_status.SUCCESS){ |
|||
var attachFileId = response.data.id; |
|||
file.attachFileId = attachFileId; |
|||
this.fileIdList.push(attachFileId); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
$.modal.msgSuccess("上传成功"); |
|||
}else{ |
|||
$.modal.alertError(response.msg); |
|||
} |
|||
}, |
|||
uploadRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
var attachFileId = file.attachFileId; |
|||
$.ajax({ |
|||
type: "get", |
|||
url: this.fileDeleteUrl, |
|||
data: {id:attachFileId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
} |
|||
$.modal.msgSuccess("删除附件成功。"); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertError("删除附件失败。"); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
} |
|||
}); |
|||
$("#form-purchaseQuote-modify").validate({focusCleanup: true}); |
|||
$(function() { |
|||
var options = { |
|||
id:'bootstrap-sub-table-purchaseQuoteChild', |
|||
url: ctx + "purchase/purchaseQuoteChild/list", |
|||
pagination: false, |
|||
queryParams: function(params) { |
|||
var temp = { |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
sortName: params.sort, |
|||
sortOrder: params.order, |
|||
purchaseQuoteCode: purchaseQuote.purchaseQuoteCode, |
|||
delFlag: 0 |
|||
} |
|||
return temp; |
|||
}, |
|||
sidePagination: "client", |
|||
model: "物料报价信息", |
|||
columns: [ |
|||
{checkbox: true}, |
|||
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, |
|||
{title: '料号',field: 'materialCode',align: 'center'}, |
|||
{title: '物料名称',field: 'materialName',align: 'center'}, |
|||
{title: '图片',field: 'photoUrl', |
|||
formatter: function(value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{title: '物料类型',field: 'materialType',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ title: '描述',field: 'describe',align: 'center'}, |
|||
{title: '品牌',field: 'brand',align: 'center'}, |
|||
{ title: '单位',field: 'unit',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|||
} |
|||
}, |
|||
{title: '半成品类型',field: 'processMethod',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{title:'最新报价',field: 'materialSole',align: 'center',}, |
|||
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, |
|||
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: true,}, |
|||
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',editable: true,}, |
|||
{title: '录入人',field: 'createBy',align: 'center',visible: false}, |
|||
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, |
|||
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, |
|||
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, |
|||
{title: '备注',field: 'remark',align: 'center'}, |
|||
{title: '操作', align: 'center', |
|||
formatter: function (value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialCode + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
return actions.join(''); |
|||
} |
|||
} |
|||
], |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
function doSubmit(index, layero,uniqueId){ |
|||
console.log(uniqueId); |
|||
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|||
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|||
console.log("rowData: "+rowData); |
|||
$("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('insertRow', { |
|||
index:1, |
|||
row: { |
|||
materialId:rowData.id, |
|||
materialCode: rowData.materialNo, |
|||
materialName: rowData.materialName, |
|||
materialType: rowData.materialType, |
|||
describe: rowData.describe, |
|||
brand: rowData.brand, |
|||
unit: rowData.unit, |
|||
processMethod: rowData.processMethod, |
|||
photoUrl: rowData.photoUrl, |
|||
materialSole: '', |
|||
materialNum: 1, |
|||
materialRmb: "", |
|||
materialNoRmb: "", |
|||
materialNoRmbSum: "", |
|||
materialRmbSum: "", |
|||
remark: "" |
|||
} |
|||
}) |
|||
layer.close(index); |
|||
} |
|||
function insertRow() { |
|||
var url = ctx + "erp/material/select"; |
|||
var options = { |
|||
title: '选择料号', |
|||
url: url, |
|||
callBack: doSubmit |
|||
}; |
|||
$.modal.openOptions(options); |
|||
} |
|||
/* 删除指定表格行 */ |
|||
function removeRow(materialCode){ |
|||
$("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('remove', { |
|||
field: 'materialCode', |
|||
values: materialCode |
|||
}) |
|||
} |
|||
$("input[name='pricingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$("#p_B_reApply").val($("#reApply").val()); |
|||
var taskId = [[${taskId}]]; |
|||
var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData'); |
|||
if (tableData.length === 0) { |
|||
$.modal.alertWarning("子表数据不能为空!"); |
|||
} else { |
|||
// 将子表数据添加到FormData中 |
|||
$("#purchaseQuoteChildList_modify").val(JSON.stringify(tableData)); |
|||
var formData = $("#form-purchaseQuote-modify").serialize(); |
|||
// 发送请求 |
|||
$.operate.save(prefix + "/complete/" + taskId, formData) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue