Commit b618b6db authored by lenovo's avatar lenovo

修改物料领用时间功能

parent 23c18194
......@@ -112,20 +112,6 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
SysUser user = SecurityUtils.getLoginUser().getUser();
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());
if (s>0){
......
......@@ -18,7 +18,7 @@
</el-form-item>
<el-form-item label="时间" prop="date">
<el-date-picker
v-model="from.date"
v-model="date"
type="month"
placeholder="选择月">
</el-date-picker>
......@@ -106,6 +106,7 @@ export default {
depss:[],
// 表单参数
from: {},
date: '',
froms: {
hId : "",
projectId : "",
......@@ -140,7 +141,7 @@ export default {
/** 判断是否选择时间*/
rulesdate(){
if (this.from.date==''||this.from.date==null){
if (this.date==''||this.date==null){
this.$message.error('请选择时间日期!');
}
......@@ -1186,19 +1187,18 @@ export default {
this.dfrom.historyContent=str;
this.dfrom.identifyingCode=0;
let date = new Date(this.from.date);
let date = new Date(this.date);
let fullYear = date.getFullYear();
let month = ("0" + (date.getMonth() + 1)).slice(-2);
let datastr = fullYear +"-"+ month;
let date1 = new Date(datastr);
this.dfrom.date = date1
let datastr = fullYear + month;
this.dfrom.date = datastr
this.from.status=this.dfrom.status=0;
list.push(this.dfrom);
this.from.historyName=fileName+'(生成文件)';
this.from.historyContent=strsheet;
this.from.identifyingCode=1;
this.from.date = date1;
this.from.date = datastr;
list.push(this.from);
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