|
@@ -317,8 +317,8 @@ export default {
|
|
/* 更改日期 */
|
|
/* 更改日期 */
|
|
async handleTimeChange(index, e) {
|
|
async handleTimeChange(index, e) {
|
|
// 判断选择的日期是否重复
|
|
// 判断选择的日期是否重复
|
|
- let flag = this.dataList.some((item) => item.Dt === e.Dt);
|
|
|
|
- if (flag) {
|
|
|
|
|
|
+ let arr = this.dataList.filter((item) => item.Dt&&(item.Dt===e.Dt));
|
|
|
|
+ if (arr.length>1) {
|
|
if (!this.tempTime) {
|
|
if (!this.tempTime) {
|
|
// 如果是新增行的
|
|
// 如果是新增行的
|
|
e.Dt = "";
|
|
e.Dt = "";
|
|
@@ -327,17 +327,19 @@ export default {
|
|
}
|
|
}
|
|
this.$message.warning(/* "该日期已存在" */this.$t('Edb.MsgPrompt.date_haved_msg'));
|
|
this.$message.warning(/* "该日期已存在" */this.$t('Edb.MsgPrompt.date_haved_msg'));
|
|
} else {
|
|
} else {
|
|
-
|
|
|
|
- // // 修改日期
|
|
|
|
- // let params = {
|
|
|
|
- // CreateDate: e.Dt, //新录入日期
|
|
|
|
- // OldCreateDate: this.tempTime, //之前日期
|
|
|
|
- // List: this.dataList,
|
|
|
|
- // };
|
|
|
|
- // const res = await dataInterence.modifyTargetDate(params);
|
|
|
|
- // if (res.Ret === 200) {
|
|
|
|
- // this.$message.success("修改成功");
|
|
|
|
- // }
|
|
|
|
|
|
+ if(!this.tempTime) return
|
|
|
|
+
|
|
|
|
+ // 修改日期
|
|
|
|
+ let params = {
|
|
|
|
+ TradeCode: e.TradeCode,
|
|
|
|
+ CreateDate: e.Dt, //新录入日期
|
|
|
|
+ OldCreateDate: this.tempTime, //之前日期
|
|
|
|
+ Close: e.Close,
|
|
|
|
+ };
|
|
|
|
+ const res = await dataInterence.editData(params);
|
|
|
|
+ if (res.Ret === 200) {
|
|
|
|
+ this.$message.success("修改成功");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -345,7 +347,7 @@ export default {
|
|
handleTimeFocus(index, e) {
|
|
handleTimeFocus(index, e) {
|
|
if(!this.hasEditAuth) return
|
|
if(!this.hasEditAuth) return
|
|
|
|
|
|
- this.tempTime = e.timeVal;
|
|
|
|
|
|
+ this.tempTime = e.Dt;
|
|
this.rightMouseMenu.rindex = index;
|
|
this.rightMouseMenu.rindex = index;
|
|
this.rightMouseMenu.cindex = 0;
|
|
this.rightMouseMenu.cindex = 0;
|
|
},
|
|
},
|