Commit b618b6db authored by lenovo's avatar lenovo

修改物料领用时间功能

parent 23c18194
...@@ -112,20 +112,6 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat ...@@ -112,20 +112,6 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
ActSuppliesHistorydata actSuppliesHistorydata1 = new ActSuppliesHistorydata(); ActSuppliesHistorydata actSuppliesHistorydata1 = new ActSuppliesHistorydata();
for (int i=0;i<actSuppliesHistorydata.size();i++){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
Date parse = simpleDateFormat.parse(actSuppliesHistorydata.get(i).getDate());
String format = simpleDateFormat.format(parse);
actSuppliesHistorydata.get(i).setDate(format);
} catch (ParseException e) {
e.printStackTrace();
}
}
Long s = actSuppliesHistorydataMapper.selectActSuppliesHistorydatauuid(actSuppliesHistorydata.get(0).getImportUuid()); Long s = actSuppliesHistorydataMapper.selectActSuppliesHistorydatauuid(actSuppliesHistorydata.get(0).getImportUuid());
if (s>0){ if (s>0){
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</el-form-item> </el-form-item>
<el-form-item label="时间" prop="date"> <el-form-item label="时间" prop="date">
<el-date-picker <el-date-picker
v-model="from.date" v-model="date"
type="month" type="month"
placeholder="选择月"> placeholder="选择月">
</el-date-picker> </el-date-picker>
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
depss:[], depss:[],
// 表单参数 // 表单参数
from: {}, from: {},
date: '',
froms: { froms: {
hId : "", hId : "",
projectId : "", projectId : "",
...@@ -140,7 +141,7 @@ export default { ...@@ -140,7 +141,7 @@ export default {
/** 判断是否选择时间*/ /** 判断是否选择时间*/
rulesdate(){ rulesdate(){
if (this.from.date==''||this.from.date==null){ if (this.date==''||this.date==null){
this.$message.error('请选择时间日期!'); this.$message.error('请选择时间日期!');
} }
...@@ -1186,19 +1187,18 @@ export default { ...@@ -1186,19 +1187,18 @@ export default {
this.dfrom.historyContent=str; this.dfrom.historyContent=str;
this.dfrom.identifyingCode=0; this.dfrom.identifyingCode=0;
let date = new Date(this.from.date); let date = new Date(this.date);
let fullYear = date.getFullYear(); let fullYear = date.getFullYear();
let month = ("0" + (date.getMonth() + 1)).slice(-2); let month = ("0" + (date.getMonth() + 1)).slice(-2);
let datastr = fullYear +"-"+ month; let datastr = fullYear + month;
let date1 = new Date(datastr); this.dfrom.date = datastr
this.dfrom.date = date1
this.from.status=this.dfrom.status=0; this.from.status=this.dfrom.status=0;
list.push(this.dfrom); list.push(this.dfrom);
this.from.historyName=fileName+'(生成文件)'; this.from.historyName=fileName+'(生成文件)';
this.from.historyContent=strsheet; this.from.historyContent=strsheet;
this.from.identifyingCode=1; this.from.identifyingCode=1;
this.from.date = date1; this.from.date = datastr;
list.push(this.from); list.push(this.from);
addInsert(list).then(response=>{ addInsert(list).then(response=>{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment