|
@@ -98,6 +98,25 @@
|
|
|
}
|
|
|
|
|
|
}, {
|
|
|
+ field: 'studyReport',
|
|
|
+ title: '可研报告',
|
|
|
+ formatter:function(value, row , index){
|
|
|
+ if (value){
|
|
|
+ var valueArray = value.split("|");
|
|
|
+ var labelArray = [];
|
|
|
+ for(var i =0 ; i<valueArray.length; i++){
|
|
|
+ if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
|
|
|
+ {
|
|
|
+ labelArray[i] = "<a href=\""+valueArray[i]+"\" url=\""+valueArray[i]+"\" target=\"_blank\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>"
|
|
|
+ }else{
|
|
|
+ labelArray[i] = '<img onclick="jp.showPic(\''+valueArray[i]+'\')"'+' height="50px" src="'+valueArray[i]+'">';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return labelArray.join(" ");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }, {
|
|
|
field: 'drawings',
|
|
|
title: '图纸',
|
|
|
formatter:function(value, row , index){
|
|
@@ -173,6 +192,44 @@
|
|
|
return labelArray.join(" ");
|
|
|
}
|
|
|
}
|
|
|
+ }, {
|
|
|
+ field: 'civilPrefabricate',
|
|
|
+ title: '土建预制化审批单',
|
|
|
+ formatter:function(value, row , index){
|
|
|
+ console.log(value);
|
|
|
+ if (value){
|
|
|
+ var valueArray = value.split("|");
|
|
|
+ var labelArray = [];
|
|
|
+ for(var i =0 ; i<valueArray.length; i++){
|
|
|
+ if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
|
|
|
+ {
|
|
|
+ labelArray[i] = "<a href=\""+valueArray[i]+"\" url=\""+valueArray[i]+"\" target=\"_blank\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>"
|
|
|
+ }else{
|
|
|
+ labelArray[i] = '<img onclick="jp.showPic(\''+valueArray[i]+'\')"'+' height="50px" src="'+valueArray[i]+'">';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return labelArray.join(" ");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field: 'powerFailure',
|
|
|
+ title: '不停电审批单/停电审批单',
|
|
|
+ formatter:function(value, row , index){
|
|
|
+ console.log(value);
|
|
|
+ if (value){
|
|
|
+ var valueArray = value.split("|");
|
|
|
+ var labelArray = [];
|
|
|
+ for(var i =0 ; i<valueArray.length; i++){
|
|
|
+ if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
|
|
|
+ {
|
|
|
+ labelArray[i] = "<a href=\""+valueArray[i]+"\" url=\""+valueArray[i]+"\" target=\"_blank\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>"
|
|
|
+ }else{
|
|
|
+ labelArray[i] = '<img onclick="jp.showPic(\''+valueArray[i]+'\')"'+' height="50px" src="'+valueArray[i]+'">';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return labelArray.join(" ");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
});
|
|
@@ -350,7 +407,286 @@ function refresh(){
|
|
|
$('#testPicTable').bootstrapTable('refresh');
|
|
|
}
|
|
|
|
|
|
+var preferedValue = ''
|
|
|
+var transferValue = ''
|
|
|
+var budgetValue = ''
|
|
|
+var quotaValue = ''
|
|
|
+var workLoadValue = ''
|
|
|
+var checkValue = ''
|
|
|
+var supplyValue = ''
|
|
|
+var materialValue = ''
|
|
|
+var liveWorkValue = ''
|
|
|
+var demolitionValue = ''
|
|
|
+var otherValue = ''
|
|
|
|
|
|
+function hidePlaceholder(inputElement,type) {
|
|
|
+ if (type === 'prefered') {
|
|
|
+ var preferedCase = $("#preferedCase").val();
|
|
|
+ if (inputElement.value === preferedCase & preferedValue === preferedCase) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'transfer') {
|
|
|
+ var transferSituation = $("#transferSituation").val();
|
|
|
+ if (inputElement.value === transferSituation & transferValue === transferSituation) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'budget') {
|
|
|
+ var budgetTemplateCheck = $("#budgetTemplateCheck").val();
|
|
|
+ if (inputElement.value === budgetTemplateCheck & budgetValue === budgetTemplateCheck) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'quota') {
|
|
|
+ var quotaApplicationCheck = $("#quotaApplicationCheck").val();
|
|
|
+ if (inputElement.value === quotaApplicationCheck & quotaValue === quotaApplicationCheck) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'workLoad') {
|
|
|
+ var workLoadCheck = $("#workLoadCheck").val();
|
|
|
+ if (inputElement.value === workLoadCheck & workLoadValue === workLoadCheck) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'check') {
|
|
|
+ var checkTheFee = $("#checkTheFee").val();
|
|
|
+ if (inputElement.value === checkTheFee & checkValue === checkTheFee) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'supply') {
|
|
|
+ var supplyCheck = $("#supplyCheck").val();
|
|
|
+ if (inputElement.value === supplyCheck & supplyValue === supplyCheck) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'material') {
|
|
|
+ var materialCheck = $("#materialCheck").val();
|
|
|
+ if (inputElement.value === materialCheck & materialValue === materialCheck) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'liveWork') {
|
|
|
+ var liveWorkFeeCheck = $("#liveWorkFeeCheck").val();
|
|
|
+ if (inputElement.value === liveWorkFeeCheck & liveWorkValue === liveWorkFeeCheck) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'demolition') {
|
|
|
+ var demolitionEngineeringProblems = $("#demolitionEngineeringProblems").val();
|
|
|
+ if (inputElement.value === demolitionEngineeringProblems & demolitionValue === demolitionEngineeringProblems) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'other') {
|
|
|
+ var otherProblem = $("#otherProblem").val();
|
|
|
+ if (inputElement.value === otherProblem & otherValue === otherProblem) {
|
|
|
+ inputElement.value = "";
|
|
|
+ inputElement.style.backgroundColor = "white";
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function showPlaceholder(inputElement,type) {
|
|
|
+
|
|
|
+ if (type === 'prefered') {
|
|
|
+ if (isNotEmpty(preferedValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = preferedValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'transfer') {
|
|
|
+ if (isNotEmpty(transferValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = transferValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'budget') {
|
|
|
+ if (isNotEmpty(budgetValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = budgetValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'quota') {
|
|
|
+ if (isNotEmpty(quotaValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = quotaValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ if (type === 'workLoad') {
|
|
|
+ if (isNotEmpty(workLoadValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = workLoadValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ if (type === 'check') {
|
|
|
+ if (isNotEmpty(checkValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = checkValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'supply') {
|
|
|
+ if (isNotEmpty(supplyValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = supplyValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'material') {
|
|
|
+ if (isNotEmpty(materialValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = materialValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'liveWork') {
|
|
|
+ if (isNotEmpty(liveWorkValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = liveWorkValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'demolition') {
|
|
|
+ if (isNotEmpty(demolitionValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = demolitionValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type === 'other') {
|
|
|
+ if (isNotEmpty(otherValue)){
|
|
|
+ if (inputElement.value === "") {
|
|
|
+ inputElement.value = otherValue;
|
|
|
+ inputElement.style.backgroundColor = '#f0f0f0';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 在页面加载完成后显示灰色提示文本
|
|
|
+window.addEventListener('load', function() {
|
|
|
+ var preferedInput = document.getElementById('preferedCase');
|
|
|
+ if (isNotEmpty(preferedInput.value)){
|
|
|
+ preferedValue = preferedInput.value
|
|
|
+ preferedInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(preferedInput,'prefered');
|
|
|
+ }
|
|
|
+ var transferInput = document.getElementById('transferSituation');
|
|
|
+ if (isNotEmpty(transferInput.value)){
|
|
|
+ transferValue = transferInput.value
|
|
|
+ transferInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(transferInput,'transfer');
|
|
|
+ }
|
|
|
+ var budgetInput = document.getElementById('budgetTemplateCheck');
|
|
|
+ if (isNotEmpty(budgetInput.value)){
|
|
|
+ budgetValue = budgetInput.value
|
|
|
+ budgetInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(budgetInput,'budget');
|
|
|
+ }
|
|
|
+ var quotaInput = document.getElementById('quotaApplicationCheck');
|
|
|
+ if (isNotEmpty(quotaInput.value)){
|
|
|
+ quotaValue = quotaInput.value
|
|
|
+ quotaInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(quotaInput,'quota');
|
|
|
+ }
|
|
|
+ var workLoadInput = document.getElementById('workLoadCheck');
|
|
|
+ if (isNotEmpty(workLoadInput.value)){
|
|
|
+ workLoadValue = workLoadInput.value
|
|
|
+ workLoadInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(workLoadInput,'workLoad');
|
|
|
+ }
|
|
|
+ var checkInput = document.getElementById('checkTheFee');
|
|
|
+ if (isNotEmpty(checkInput.value)){
|
|
|
+ checkValue = checkInput.value
|
|
|
+ checkInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(checkInput,'check');
|
|
|
+ }
|
|
|
+ var supplyInput = document.getElementById('supplyCheck');
|
|
|
+ if (isNotEmpty(supplyInput.value)){
|
|
|
+ supplyValue = supplyInput.value
|
|
|
+ supplyInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(supplyInput,'supply');
|
|
|
+ }
|
|
|
+ var materialInput = document.getElementById('materialCheck');
|
|
|
+ if (isNotEmpty(materialInput.value)){
|
|
|
+ materialValue = materialInput.value
|
|
|
+ materialInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(materialInput,'material');
|
|
|
+ }
|
|
|
+ var liveWorkInput = document.getElementById('liveWorkFeeCheck');
|
|
|
+ if (isNotEmpty(liveWorkInput.value)){
|
|
|
+ liveWorkValue = liveWorkInput.value
|
|
|
+ liveWorkInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(liveWorkInput,'liveWork');
|
|
|
+ }
|
|
|
+ var demolitionInput = document.getElementById('demolitionEngineeringProblems');
|
|
|
+ if (isNotEmpty(demolitionInput.value)){
|
|
|
+ demolitionValue = demolitionInput.value
|
|
|
+ demolitionInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(demolitionInput,'demolition');
|
|
|
+ }
|
|
|
+ var otherInput = document.getElementById('otherProblem');
|
|
|
+ if (isNotEmpty(otherInput.value)){
|
|
|
+ otherValue = otherInput.value
|
|
|
+ otherInput.style.backgroundColor = '#f0f0f0';
|
|
|
+ showPlaceholder(otherInput,'other');
|
|
|
+ }
|
|
|
+
|
|
|
+});
|
|
|
+
|
|
|
+function isEmpty(value) {
|
|
|
+ let result = false;
|
|
|
+ if (value == null || value == undefined) {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ if (typeof value == 'string' && (value.replace(/\s+/g, "") == "" || value == "")) {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ if (typeof value == "object" && value instanceof Array && value.length === 0) {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+};
|
|
|
+function isNotEmpty (value) {
|
|
|
+ return !isEmpty(value)
|
|
|
+}
|
|
|
</script>
|