|
@@ -70,6 +70,31 @@
|
|
|
.top-button-group button {
|
|
|
margin-bottom: 12px;
|
|
|
}
|
|
|
+ .el-radio-button--mini.info .el-radio-button__inner {
|
|
|
+ color: #909399 !important;
|
|
|
+ background: #f4f4f5 !important;
|
|
|
+ border-color: #d3d4d6 !important;
|
|
|
+ }
|
|
|
+ .default .el-radio-button__orig-radio+.el-radio-button__inner{
|
|
|
+ color: #409eff;
|
|
|
+ background: #ecf5ff;
|
|
|
+ border-color: #b3d8ff;
|
|
|
+ }
|
|
|
+ .success .el-radio-button__orig-radio+.el-radio-button__inner {
|
|
|
+ color: #67c23a;
|
|
|
+ background: #f0f9eb;
|
|
|
+ border-color: #c2e7b0;
|
|
|
+ }
|
|
|
+ .success .el-radio-button__orig-radio:checked+.el-radio-button__inner,
|
|
|
+ .default .el-radio-button__orig-radio:checked+.el-radio-button__inner {
|
|
|
+ color: #FFF;
|
|
|
+ background-color: #409EFF;
|
|
|
+ border-color: #409EFF;
|
|
|
+ -webkit-box-shadow: -1px 0 0 0 #409EFF;
|
|
|
+ box-shadow: -1px 0 0 0 #409EFF
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
</style>
|
|
|
<script>
|
|
|
function prettyPrint(obj) {
|
|
@@ -83,7 +108,6 @@
|
|
|
|
|
|
return (function innerPrettyPrint(obj, spaces) {
|
|
|
var type = typeof obj;
|
|
|
- //console.log(obj,type)
|
|
|
if (type == "number" || type == "boolean") {
|
|
|
return obj.toString();
|
|
|
} else if (type == "string") {
|
|
@@ -96,18 +120,15 @@
|
|
|
var thisIndent = ' '.repeat(spaces);
|
|
|
var subIndent = thisIndent + ' '.repeat(INDNET_SPACES);
|
|
|
var subSpaces = spaces + INDNET_SPACES;
|
|
|
-
|
|
|
if (Object.prototype.toString.call(obj) == '[object Object]') {
|
|
|
for(var k in obj) {
|
|
|
entries.push('"' + k + '": ' + innerPrettyPrint(obj[k], subSpaces));
|
|
|
}
|
|
|
-
|
|
|
return OBJ_BEGIN + ENDLINE + subIndent + entries.join(COMMA_ENDLINE + subIndent) + ENDLINE + thisIndent + OBJ_END;
|
|
|
} else if (Object.prototype.toString.call(obj) == '[object Array]') {
|
|
|
obj.forEach(function(a) {
|
|
|
entries.push(innerPrettyPrint(a, subSpaces));
|
|
|
});
|
|
|
-
|
|
|
return ARR_BEGIN + ENDLINE + subIndent + entries.join(COMMA_ENDLINE + subIndent) + ENDLINE + thisIndent + ARR_END;
|
|
|
} else if (obj === null) {
|
|
|
return "null";
|
|
@@ -125,17 +146,19 @@
|
|
|
<!--文章区-->
|
|
|
<div class="article" >
|
|
|
<div class="top-button-group">
|
|
|
- <el-button-group>
|
|
|
- <el-button type="primary" plain size="mini" @click="activeLabel = '原文'">原文</el-button>
|
|
|
+ <el-radio-group v-model="activeLabel" size="mini">
|
|
|
+ <el-radio-button class="default" label="原文"></el-radio-button>
|
|
|
{{if .T.info.filetext}}
|
|
|
- <el-button type="primary" plain size="mini" @click="activeLabel = '附件'">附件</el-button>
|
|
|
+ <el-radio-button class="default" label="附件"></el-radio-button>
|
|
|
{{end}}
|
|
|
- </el-button-group>
|
|
|
- <el-button-group v-for="(item, index) in otherInfo">
|
|
|
- <el-button type="success" plain size="mini" @click="activeLabel = item.subtype">[[item.subtype]]</el-button>
|
|
|
- <el-button type="success" plain size="mini" v-if="item.filetext" @click="activeLabel = item.subtype + '-附件'">附件</el-button>
|
|
|
- </el-button-group>
|
|
|
- <el-button-group v-if="moreInfo&&moreInfo.length > 0">
|
|
|
+ </el-radio-group>
|
|
|
+
|
|
|
+ <el-radio-group v-model="activeLabel" v-for="(item, index) in otherInfo" size="mini">
|
|
|
+ <el-radio-button class="success" :label="item.subtype">[[item.subtype]]</el-radio-button>
|
|
|
+ <el-radio-button class="success" :label="item.subtype + '-附件'">附件</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+
|
|
|
+ <el-radio-group v-if="moreInfo&&moreInfo.length > 0" size="mini">
|
|
|
<el-popover
|
|
|
placement="right-end"
|
|
|
trigger="hover">
|
|
@@ -148,11 +171,11 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-button slot="reference" style="border-color: #d3d4d6;" size="mini" type="info" plain>更多</el-button>
|
|
|
+ <el-radio-button class="info" slot="reference" style="border-color: #d3d4d6;">更多</el-radio-button>
|
|
|
</el-popover>
|
|
|
- </el-button-group>
|
|
|
+ </el-radio-group>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<hr style="border:1 double;" width="100%">
|
|
|
<br><a v-if="getPageInfo.href.length > 0" :href="getPageInfo.href" target="_blank">查看原文</a>
|
|
|
<!--<a href="{{.T.jyhref}}" target="_blank">剑鱼链接</a>-->
|
|
@@ -170,14 +193,20 @@
|
|
|
<div class="edit-title" @click="one.show = !one.show">
|
|
|
<span>[[one.title]]</span>
|
|
|
<div class="button-group">
|
|
|
+ <div v-if="one.showCheck">
|
|
|
+ <input :id="one.title" v-show="one.title == '标的信息'" @click.stop type="checkbox" v-model="one.checkAllTag">
|
|
|
+ <label @click.stop v-show="one.title == '标的信息'" :for="one.title">全部标注</label>
|
|
|
+ </div>
|
|
|
+ <!--
|
|
|
<div v-if="one.showCheck">
|
|
|
<input :id="one.title" @click.stop type="checkbox" v-model="one.checkType">
|
|
|
<label @click.stop :for="one.title">是否抽取</label>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
<div class="button-box">
|
|
|
<!--v-show="one.title == '基本字段'"-->
|
|
|
<button class="pass success" @click.stop="saveDataOne(one,'1')" style="font-size: 14px;width: auto;float:left;">通过</button>
|
|
|
<button class="pass default" @click.stop="saveDataOne(one,'-1')" style="font-size: 14px;width: auto;float:left">取消</button>
|
|
|
+ <!-- <button class="pass" @click.stop="open(one, true)" style="font-size: 14px;width: auto;float:left">保存</button>-->
|
|
|
</div>
|
|
|
<!--<button class="add" v-show="one.title != '基本'" @click.stop="one.content.push(getTemp(2));goMark2(500)">+</button>-->
|
|
|
<!--<button class="add" v-show="one.title == '基本'" @click.stop="one.content[0].content.push(getTemp(3));goMark2(60)">+</button>-->
|
|
@@ -204,7 +233,7 @@
|
|
|
<div class="edit-title" v-if="two.title" @click="two.show = !two.show">
|
|
|
<span>[[two.title]]</span>
|
|
|
<div class="button-box" :style="one.title == '多包信息' ? 'margin-right: 193px' : ''">
|
|
|
- <button v-if="one.title == '多包信息'" class="pass a-button" @click.stop="addThreeChild(two,'2',one)" style="font-size: 14px;margin: 0;width: auto;float:left;">新增中标信息</button>
|
|
|
+ <button v-if="one.title == '多包信息'" class="pass a-button" @click.stop="addThreeChild(two,'2',one)" style="font-size: 14px;margin: 0;width: auto;float:left;">新增子包中标信息</button>
|
|
|
<button class="pass success" @click.stop="saveDataTwo(two,'1',one)" style="font-size: 14px;width: auto;float:left;">通过</button>
|
|
|
<button class="pass default" @click.stop="saveDataTwo(two,'-1',one)" style="font-size: 14px;width: auto;float:left">取消</button>
|
|
|
</div>
|
|
@@ -299,17 +328,32 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="save-box">
|
|
|
-<!-- <button class="code" @click.stop="open(1)" style="width:100px">全部验证</button> -->
|
|
|
-<!-- <button class="code" @click.stop="open(2)" style="width:100px">字段验证</button> -->
|
|
|
- <button class="code" @click.stop="open('')" style="width:100px">保存</button>
|
|
|
- <button class="code" @click.stop="openHref" style="width:100px">下一条</button>
|
|
|
+ <button class="code" @click.stop="open('', false)" style="width:100px">保存</button>
|
|
|
+ <button class="code" @click.stop="openHref" style="width:100px;margin-left:50px">下一条</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!--弹出层-->
|
|
|
+ <dialog class="dialog" v-if="showPop">
|
|
|
+ <span class="close" @click="showPop = false;changeText()">x</span>
|
|
|
+ <div class="pop">
|
|
|
+ <div class="title">源码</div>
|
|
|
+ <div class="con" ref="text" contentEditable="true">
|
|
|
+ <pre v-html="addStyle(editData)"></pre>
|
|
|
+ </div>
|
|
|
+ <button @click="showPop = false;changeText();upChange()">保 存</button>
|
|
|
+ </div>
|
|
|
+ </dialog>
|
|
|
+ <dialog id="com-alert" class="dialog" style="background: rgba(124, 124, 125, 0.1);z-index:9999;display: none;">
|
|
|
+ <div class="pop" style="background: rgba(124, 124, 125, 0.1);">
|
|
|
+ <div id="com-alert-val" class="title" style="color:red">保存成功</div>
|
|
|
+ </div>
|
|
|
+ </dialog>
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
|
<script>
|
|
|
+ var allCheckFields = {{.T.fields}};//本次需标注的所有字段
|
|
|
// 页面数据
|
|
|
var pageDataMap = {
|
|
|
'原文': {
|
|
@@ -325,10 +369,8 @@
|
|
|
}
|
|
|
// 更多关联信息
|
|
|
var moreInfo = {{.T.moreInfo}}
|
|
|
- console.log(moreInfo)
|
|
|
//公告关联信息
|
|
|
var otherInfo = {{.T.otherInfo}};
|
|
|
- console.log(otherInfo)
|
|
|
//快捷键
|
|
|
$(document).keydown(function(event){
|
|
|
if(!event.shiftKey) {
|
|
@@ -367,25 +409,25 @@
|
|
|
}else{
|
|
|
app.changeBaseValue(5, text, 2)//填充
|
|
|
}
|
|
|
- }else if(event.keyCode == 90){//预算快捷键z
|
|
|
+ }else if(event.keyCode == 65){//预算快捷键a
|
|
|
if(event.shiftKey){
|
|
|
app.changeBaseValue(6, '', 2) //删除对应文本
|
|
|
}else{
|
|
|
app.changeBaseValue(6, text, 2)//填充
|
|
|
}
|
|
|
- }else if(event.keyCode == 88){//中标金额快捷键x
|
|
|
+ }else if(event.keyCode == 90){//中标金额快捷键z
|
|
|
if(event.shiftKey){
|
|
|
app.changeBaseValue(7, '', 2) //删除对应文本
|
|
|
}else{
|
|
|
app.changeBaseValue(7, text, 2)//填充
|
|
|
}
|
|
|
- }else if(event.keyCode == 65){//采购单位快捷键a
|
|
|
+ }else if(event.keyCode == 83){//采购单位快捷键s
|
|
|
if(event.shiftKey){
|
|
|
app.changeBaseValue(8, '', 2) //删除对应文本
|
|
|
}else{
|
|
|
app.changeBaseValue(8, text, 2)//填充
|
|
|
}
|
|
|
- }else if(event.keyCode == 83){//代理机构快捷键s
|
|
|
+ }else if(event.keyCode == 88){//代理机构快捷键x
|
|
|
if(event.shiftKey){
|
|
|
app.changeBaseValue(9, '', 2) //删除对应文本
|
|
|
}else{
|
|
@@ -421,15 +463,14 @@
|
|
|
//return document.selection.createRange().htmlText;
|
|
|
//return document.selection.createRange().text; //只复制文本
|
|
|
}
|
|
|
- text = text.replace(/(\r|\n|\s+| |\<br\>|\<br\/\>)/g, "")
|
|
|
+ text = text.replace(/(\r|\n|\s+| |<[^>]*>|<\/[^>]*)/g, "")
|
|
|
return text;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//记录是否点击保存
|
|
|
var issave = false;
|
|
|
var _id = {{.T.info._id}};
|
|
|
var nextid = {{.T.nextid}};
|
|
|
- //console.log(nextid)
|
|
|
//基本信息
|
|
|
var common={{.T.common}};
|
|
|
var uInput=[];
|
|
@@ -455,6 +496,11 @@
|
|
|
tmp.selectArr=['是','否']
|
|
|
}
|
|
|
tmp.status=common[k].status
|
|
|
+ if(common[k].key== "bidamounttype"){
|
|
|
+ tmp.select = common[k].value ? common[k].value : '金额'
|
|
|
+ tmp.selectArr=['金额','折扣率','单价']
|
|
|
+ tmp.status = -1
|
|
|
+ }
|
|
|
uInput[k]=tmp
|
|
|
}
|
|
|
//时间地点
|
|
@@ -502,9 +548,9 @@
|
|
|
var content={};
|
|
|
content.title="候选人"
|
|
|
content.show=true
|
|
|
- content.status=-1
|
|
|
+ content.status=worder_new[k]["status"]
|
|
|
content.uInput=c_uInput
|
|
|
- content.ck_isnew=worder_new[k] || false
|
|
|
+ content.ck_isnew=worder_new[k]["isnew"] || false
|
|
|
content.content=[]
|
|
|
c_content[k]=content
|
|
|
}
|
|
@@ -521,19 +567,19 @@
|
|
|
tmp.input=purchasinglist[k][i].value
|
|
|
tmp.key=purchasinglist[k][i].key
|
|
|
tmp.status=purchasinglist[k][i].status
|
|
|
- if(purchasinglist[k][i].key== "pclisover"){
|
|
|
- tmp.select = purchasinglist[k][i].value ? purchasinglist[k][i].value : '是'
|
|
|
- //tmp.select=purchasinglist[k][i].value
|
|
|
- tmp.selectArr=['是','否']
|
|
|
- }
|
|
|
+ //if(purchasinglist[k][i].key== "pclisover"){
|
|
|
+ // tmp.select = purchasinglist[k][i].value ? purchasinglist[k][i].value : '是'
|
|
|
+ // //tmp.select=purchasinglist[k][i].value
|
|
|
+ // tmp.selectArr=['是','否']
|
|
|
+ //}
|
|
|
c_uInput[i]=tmp
|
|
|
}
|
|
|
var content={};
|
|
|
content.title="标的物"
|
|
|
content.show=true
|
|
|
- content.status=-1
|
|
|
+ content.status=pcl_new[k]["status"]
|
|
|
content.uInput=c_uInput
|
|
|
- content.ck_isnew=pcl_new[k] || false
|
|
|
+ content.ck_isnew=pcl_new[k]["isnew"] || false
|
|
|
content.content=[]
|
|
|
pcl_content[k]=content
|
|
|
}
|
|
@@ -559,10 +605,15 @@
|
|
|
tmp.input=pack[i].value
|
|
|
tmp.key=pack[i].key
|
|
|
tmp.status=pack[i].status
|
|
|
+ if(pack[i].key== "bidamounttype"){
|
|
|
+ tmp.select = pack[i].value ? pack[i].value : '金额'
|
|
|
+ tmp.selectArr=['金额','折扣率','单价']
|
|
|
+ tmp.status = 1
|
|
|
+ }
|
|
|
uInputs[i]=tmp
|
|
|
}
|
|
|
-
|
|
|
- //子包候选人
|
|
|
+
|
|
|
+ //中标人信息
|
|
|
var winnerall = packs[k]["winnerall"]
|
|
|
for(i in winnerall){
|
|
|
var tmp={}
|
|
@@ -575,12 +626,12 @@
|
|
|
var content={};
|
|
|
content.title="子包";
|
|
|
content.show=true;
|
|
|
- content.status=-1
|
|
|
+ content.status=packs[k]["packstatus"];
|
|
|
content.uInput=uInputs;
|
|
|
content.ck_isnew=pkg_new[k] || false
|
|
|
content.num = packskey[k];
|
|
|
p_content[k]=content;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
var pclf = {{.T.PurchasinglistField}};
|
|
@@ -593,14 +644,14 @@
|
|
|
status:"2",
|
|
|
title:pclf[i][key]
|
|
|
}
|
|
|
- if(key== "pclisover"){
|
|
|
- tempNode.select= '是'
|
|
|
- tempNode.selectArr=['是','否']
|
|
|
- }
|
|
|
+ //if(key== "pclisover"){
|
|
|
+ // tempNode.select= '是'
|
|
|
+ // tempNode.selectArr=['是','否']
|
|
|
+ //}
|
|
|
pclfInput.push(tempNode)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
var wodf = {{.T.WinnerorderField}};
|
|
|
var wodfInput = []
|
|
@@ -618,12 +669,17 @@
|
|
|
var pfInput = []
|
|
|
for(i in pf){
|
|
|
for(key in pf[i]){
|
|
|
- pfInput.push({
|
|
|
- input:"",
|
|
|
- key:key,
|
|
|
- status:"2",
|
|
|
- title:pf[i][key]
|
|
|
- })
|
|
|
+ var tempNode = {
|
|
|
+ input:"",
|
|
|
+ key:key,
|
|
|
+ status:"2",
|
|
|
+ title:pf[i][key]
|
|
|
+ }
|
|
|
+ if(key== "bidamounttype"){
|
|
|
+ tempNode.select= '金额'
|
|
|
+ tempNode.selectArr=['金额','折扣率','单价']
|
|
|
+ }
|
|
|
+ pfInput.push(tempNode)
|
|
|
}
|
|
|
}
|
|
|
var app = new Vue({
|
|
@@ -631,6 +687,7 @@
|
|
|
delimiters:["[[","]]"],
|
|
|
data: {
|
|
|
activeLabel: '原文',
|
|
|
+ nowLabel: ['原文'],
|
|
|
otherInfo: otherInfo,
|
|
|
moreInfo: moreInfo,
|
|
|
scrollCache: {
|
|
@@ -674,7 +731,8 @@
|
|
|
title: '标的信息',
|
|
|
show: false,
|
|
|
showCheck: true,
|
|
|
- checkType: {{.T.ck_pclisext}},
|
|
|
+ //checkType: {{.T.ck_pclisext}},
|
|
|
+ checkAllTag: {{.T.ck_pclistag}},
|
|
|
status: {{.T.ck_purchasinglist}},
|
|
|
content: pcl_content
|
|
|
},
|
|
@@ -682,7 +740,7 @@
|
|
|
title: '多包信息',
|
|
|
show: false,
|
|
|
showCheck: true,
|
|
|
- checkType: {{.T.ck_pkgisext}},
|
|
|
+ //checkType: {{.T.ck_pkgisext}},
|
|
|
status: {{.T.ck_package}},
|
|
|
content: p_content
|
|
|
},
|
|
@@ -690,7 +748,7 @@
|
|
|
title: '中标候选人信息',
|
|
|
show: false,
|
|
|
showCheck: true,
|
|
|
- checkType: {{.T.ck_wodrisext}},
|
|
|
+ //checkType: {{.T.ck_wodrisext}},
|
|
|
status: {{.T.ck_winnerorder}},
|
|
|
content: c_content
|
|
|
},
|
|
@@ -755,7 +813,6 @@
|
|
|
methods: {
|
|
|
// 当前输入框数据与原始数据比较
|
|
|
focusFn (uin, oIndex, tIndex, uIndex, two, one) {
|
|
|
- //console.log(uin,uin.input, this.originData[oIndex].content[tIndex].uInput[uIndex].input, 'item')
|
|
|
if(uin.key=="bidendtime"||uin.key=="bidopentime"||uin.key=="project_startdate"||uin.key=="project_completedate"||uin.key=="publishtime"||uin.key=="signaturedate"){
|
|
|
var val = uin.input
|
|
|
if(val != ""){
|
|
@@ -765,16 +822,22 @@
|
|
|
this.$message({
|
|
|
message: uin.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
type: 'warning',
|
|
|
- duration: 3000,
|
|
|
+ duration: 2000,
|
|
|
offset: 300
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log(22222222222)
|
|
|
- var oNode = this.originData[oIndex].content[tIndex].uInput[uIndex]
|
|
|
- var changeStatus = uin.input == oNode.input
|
|
|
+ var newNode = this.originData[oIndex].content[tIndex]
|
|
|
+ if(newNode== null){//新增子模块处理
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var oNode =newNode.uInput[uIndex]
|
|
|
+ if(oNode == null){//新增中标人信息处理
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var changeStatus = uin.input == oNode.input//多包中新增的中标信息报错
|
|
|
if (uin.select) {
|
|
|
changeStatus = uin.select == oNode.select
|
|
|
}
|
|
@@ -791,7 +854,7 @@
|
|
|
this.editData[0].content[0].uInput[index].status = status
|
|
|
}
|
|
|
},
|
|
|
- selectchange(uni,status,two,one){//状态更新
|
|
|
+ selectchange(uni,status,two,one){
|
|
|
if (uni.status == '-1' || uni.status == '2') {
|
|
|
status = 2
|
|
|
}
|
|
@@ -802,27 +865,19 @@
|
|
|
alert("请先保存数据!")
|
|
|
return
|
|
|
}else{
|
|
|
- if(nextid==""){
|
|
|
- window.location.href = '/center/finishcheck';
|
|
|
- }else{
|
|
|
- $.ajax({
|
|
|
- url: "/center/checkid",
|
|
|
- type: "post",
|
|
|
- data: {"id":nextid},
|
|
|
- async: false,
|
|
|
- success: function (r) {
|
|
|
- if(r && r.msg == ""){
|
|
|
- if(r.exists){//标注完成
|
|
|
- window.location.href = "/center/finishcheck";
|
|
|
- }else if (!r.exists){
|
|
|
- window.location.href = "/center/detail/"+r.id+".html"
|
|
|
- }
|
|
|
- }else{
|
|
|
- alert("标注出错!"+r.msg)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ $.ajax({
|
|
|
+ url: "/center/review/next",
|
|
|
+ type: "post",
|
|
|
+ data: {"id": _id},
|
|
|
+ async: false,
|
|
|
+ success: function (r) {
|
|
|
+ if(r.exists){
|
|
|
+ window.location.href = "/center/reviewdetail/"+r.id+".html"
|
|
|
+ }else {
|
|
|
+ alert("没有更新数据了!")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// 检查一级是否需要改变状态
|
|
@@ -845,7 +900,6 @@
|
|
|
}
|
|
|
statusList[tempIndex] = Number(statusList[tempIndex]) + 1
|
|
|
}
|
|
|
-
|
|
|
if (statusList[1] > 0) {
|
|
|
tempObj.obj.status = 1
|
|
|
}
|
|
@@ -853,7 +907,10 @@
|
|
|
tempObj.obj.status = 2
|
|
|
}
|
|
|
if (statusList[4] === tempObj.list.length) {
|
|
|
- tempObj.obj.status = 2
|
|
|
+ tempObj.obj.status = 4
|
|
|
+ if(tempObj.obj.title == "标的信息"||tempObj.obj.title == "多包信息"||tempObj.obj.title == "中标候选人信息"){
|
|
|
+ tempObj.obj.status = 2
|
|
|
+ }
|
|
|
}
|
|
|
if (statusList[3] === tempObj.list.length) {
|
|
|
tempObj.obj.status = 2
|
|
@@ -885,7 +942,7 @@
|
|
|
this.$message({
|
|
|
message: witch.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
type: 'warning',
|
|
|
- duration: 3000,
|
|
|
+ duration: 2000,
|
|
|
offset: 300
|
|
|
});
|
|
|
//alert(witch.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
@@ -893,6 +950,9 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (s == '2' && !one && !two && witch.content.length == 0) {
|
|
|
+ return
|
|
|
+ }
|
|
|
witch.status = s;
|
|
|
if (two) {
|
|
|
this.checkOneStatus({
|
|
@@ -904,11 +964,14 @@
|
|
|
},
|
|
|
//二级删除
|
|
|
delNewTwo: function (one, index, two) {
|
|
|
+ //two.ck_isnew = false //目前点删除按钮页面直接不显示,但是集合索引位置不变,所以加了此代码
|
|
|
+ //two.show = false
|
|
|
if (two.ck_isnew) {
|
|
|
one.content.splice(index, 1)
|
|
|
} else {
|
|
|
- two.status = 2
|
|
|
- this.saveDataTwo(two, 2, one)
|
|
|
+ two.show = false
|
|
|
+ two.status = 4
|
|
|
+ this.saveDataTwo(two, 4, one)
|
|
|
}
|
|
|
this.checkOneStatus({
|
|
|
one: one,
|
|
@@ -918,8 +981,7 @@
|
|
|
},
|
|
|
/*add style*/
|
|
|
addStyle: function (data) {
|
|
|
- //console.dir(data)
|
|
|
- return prettyPrint(data).replace(/(checkType|showCheck|wstatus|status|key|title|input|content|uInput|selectArr|select|show|true)/g, "<mark>$1</mark>")
|
|
|
+ return prettyPrint(data).replace(/(checkAllTag|checkType|showCheck|wstatus|status|key|title|input|content|uInput|selectArr|select|show|true)/g, "<mark>$1</mark>")
|
|
|
},
|
|
|
/*同步修改源码*/
|
|
|
changeText: function (boolean) {
|
|
@@ -968,21 +1030,6 @@
|
|
|
$(temp).addClass('focus')
|
|
|
document.querySelector('.article').scrollTop = offset(temp).top - window.screen.height / 2
|
|
|
},
|
|
|
- //markTag:function(n){
|
|
|
- // $.ajax({
|
|
|
- // url:"/markTag",
|
|
|
- // method:"post",
|
|
|
- // data: {tag:n,_id:_id},
|
|
|
- // success:function(res){
|
|
|
- // if(res){
|
|
|
- // document.getElementById("com-alert-val").innerHtml="标记成功";
|
|
|
- // var label1 = document.getElementById("com-alert");
|
|
|
- // label1.style.display="block";
|
|
|
- // setTimeout(function(){label1.style.display="none";},1000)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- //},
|
|
|
addChild: function (one, oindex) {
|
|
|
var tempNode = {}
|
|
|
switch (one.title) {
|
|
@@ -997,7 +1044,7 @@
|
|
|
}
|
|
|
break
|
|
|
}
|
|
|
- case "多包信息": {pfInput
|
|
|
+ case "多包信息": {
|
|
|
tempNode = {
|
|
|
//content: [],
|
|
|
show:true,
|
|
@@ -1020,9 +1067,6 @@
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- // if (one.status >= 2) {
|
|
|
- // one.status = '2'
|
|
|
- // }
|
|
|
one.content.push(tempNode)
|
|
|
this.checkOneStatus({
|
|
|
one: one,
|
|
@@ -1032,7 +1076,7 @@
|
|
|
var tempN = $(".edit.one").eq(oindex).find(".edit-title")
|
|
|
var goTop = tempN.eq(tempN.length - 1).offset().top
|
|
|
setTimeout(() => {
|
|
|
- $(".operation").scrollTop(goTop)
|
|
|
+ $(".operation").scrollTop($(".operation").scrollTop() + goTop)
|
|
|
}, 150)
|
|
|
})
|
|
|
},
|
|
@@ -1048,7 +1092,7 @@
|
|
|
input:"",
|
|
|
key: 'bidamount',
|
|
|
status:"2",
|
|
|
- title: '标段(包)中金额'
|
|
|
+ title: '标段(包)中标金额'
|
|
|
})
|
|
|
two.status = 2
|
|
|
this.checkOneStatus({
|
|
@@ -1070,7 +1114,7 @@
|
|
|
this.$message({
|
|
|
message: v.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
type: 'warning',
|
|
|
- duration: 3000,
|
|
|
+ duration: 2000,
|
|
|
offset: 300
|
|
|
});
|
|
|
//alert(v.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
@@ -1084,6 +1128,8 @@
|
|
|
v.status = n
|
|
|
} else if (n=="2"){
|
|
|
v.status = n
|
|
|
+ }else if (n=="4"){
|
|
|
+ v.status = n
|
|
|
}
|
|
|
});
|
|
|
two.status = n
|
|
@@ -1092,15 +1138,6 @@
|
|
|
two: two,
|
|
|
type: false
|
|
|
})
|
|
|
- /**
|
|
|
- two.content.forEach(function(v) {
|
|
|
- v.uInput.forEach(function(value) {
|
|
|
- if (value.input && value.input != '') {
|
|
|
- value.status = n
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- */
|
|
|
},
|
|
|
saveDataOne:function(one,n){
|
|
|
//保存后的样式
|
|
@@ -1118,7 +1155,7 @@
|
|
|
this.$message({
|
|
|
message: value.title+",日期格式错误!正确格式:2006-01-02 15:04:05",
|
|
|
type: 'warning',
|
|
|
- duration: 3000,
|
|
|
+ duration: 2000,
|
|
|
offset: 300
|
|
|
});
|
|
|
//alert(value.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
|
|
@@ -1149,25 +1186,140 @@
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- this.saveData(stype)
|
|
|
+ this.upChange(stype)
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
//保存事件
|
|
|
- saveData: function() {
|
|
|
- $.ajax({
|
|
|
+ upChange: function (stype) {
|
|
|
+ console.log(this.editData, stype)
|
|
|
+ var noTagKey = [];
|
|
|
+ this.editData.filter(function (one) {
|
|
|
+<!-- console.log("title---",one.title,one.status) -->
|
|
|
+ if(one.title == "标的信息"||one.title == "多包信息"||one.title == "中标候选人信息"){
|
|
|
+ if(allCheckFields[one.title] && one.status == -1){
|
|
|
+ noTagKey.push(one.title);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ one.content.filter(function(v) {
|
|
|
+ v.uInput.filter(function (u) {
|
|
|
+ if(allCheckFields[u.key] && u.status == -1){
|
|
|
+ noTagKey.push(u.title);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (noTagKey.length >0){
|
|
|
+ var fieldText = noTagKey.join(",");
|
|
|
+ fieldText = fieldText.replace(/\([^\)]*\)/g, "");
|
|
|
+ this.$alert("未标注信息:"+fieldText);
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var resultStatus = false
|
|
|
+ if (stype == 1) {//全部字段验证
|
|
|
+ var checkAllKey = this.editData.filter(function (one) {
|
|
|
+ var otherOne = one.content.filter(function(v) {
|
|
|
+ return v.uInput.filter(function (u) {
|
|
|
+ return u.status == '-1'
|
|
|
+ }).length
|
|
|
+ })
|
|
|
+ if ((one.title=="标的信息"||one.title=="多包信息"||one.title=="中标候选人信息") && (one.status == "-1")) {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return otherOne.length
|
|
|
+ }
|
|
|
+ })
|
|
|
+ resultStatus = !Boolean(checkAllKey.length)
|
|
|
+ } else {//部分字段验证
|
|
|
+ var otherTag = 0 //标注状态 0:没标 1:标注成功 2:标注失败
|
|
|
+ var baseTag = 0
|
|
|
+ this.editData.filter(function (one) {
|
|
|
+ //多包信息、中标候选人信息在为标注失败的前提下检测标注状态,一个失败不能保存
|
|
|
+ if(otherTag < 2){
|
|
|
+ if (one.title=="标的信息"||one.title=="多包信息"||one.title=="中标候选人信息") {
|
|
|
+ if (one.status == "-1") {//没标
|
|
|
+ if(otherTag != 1){//前一个标注成功不用记录后一个是否未标
|
|
|
+ otherTag = 0
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (one.content.length === 0) {//不含子包
|
|
|
+ if (one.status == '2') {
|
|
|
+ otherTag = 2 //失败
|
|
|
+ }else{
|
|
|
+ otherTag = 1 //成功
|
|
|
+ }
|
|
|
+ }else{//含子包
|
|
|
+ if(one.title == "标的信息"){
|
|
|
+ var otherOne = one.content.filter(function(v) {
|
|
|
+ if(v.status >= 1){//子信息标注
|
|
|
+ var twoLength = v.uInput.filter(function (u) {
|
|
|
+ return u.status == '-1'
|
|
|
+ })
|
|
|
+ if(twoLength.length > 0){
|
|
|
+ otherTag = 2
|
|
|
+ }
|
|
|
+ return true //返回此条信息被标注
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(otherTag != 2){
|
|
|
+ if(otherOne.length > 0){//
|
|
|
+ otherTag = 1
|
|
|
+ }else{
|
|
|
+ otherTag = 2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ var otherOne = one.content.filter(function(v) {
|
|
|
+ return v.uInput.filter(function (u) {
|
|
|
+ return u.status == '-1'
|
|
|
+ }).length
|
|
|
+ })
|
|
|
+ if(otherOne.length > 0){//
|
|
|
+ otherTag = 2
|
|
|
+ }else{
|
|
|
+ otherTag = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ var baseOne = one.content.filter(function(v) {
|
|
|
+ return v.uInput.filter(function (u) {
|
|
|
+ return u.status != '-1'
|
|
|
+ }).length
|
|
|
+ })
|
|
|
+ if (baseOne.length >0){//基本字段
|
|
|
+ baseTag = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(otherTag == 0 && baseTag == 1){
|
|
|
+ resultStatus = true
|
|
|
+ }else if (otherTag == 1){
|
|
|
+ resultStatus = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!resultStatus) {
|
|
|
+ this.$alert("未标注完成");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var d= JSON.stringify(this.editData);
|
|
|
+ var _this = this
|
|
|
+ $.ajax({
|
|
|
url:"/center/reviewsave",
|
|
|
method:"post",
|
|
|
- data: {_id:_id},
|
|
|
+ data: {key:d,_id:_id,stype:stype},
|
|
|
success:function(res){
|
|
|
if(res){
|
|
|
- document.getElementById("com-alert-val").innerHtml="保存成功";
|
|
|
- var label1 = document.getElementById("com-alert");
|
|
|
- label1.style.display="block";
|
|
|
- setTimeout(function(){
|
|
|
- label1.style.display="none";
|
|
|
- },
|
|
|
- 1000)
|
|
|
+ _this.$message({
|
|
|
+ message: '保存成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1000,
|
|
|
+ offset: 300
|
|
|
+ });
|
|
|
+ issave = true//保存成功
|
|
|
}
|
|
|
},
|
|
|
error:function(err){
|