|
|
@@ -39,7 +39,7 @@
|
|
|
type="datetime"
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="请选择"
|
|
|
- :disabled="formData.dateType==2"
|
|
|
+ :disabled="formData.dateType == 2"
|
|
|
></el-date-picker
|
|
|
></el-form-item>
|
|
|
</div>
|
|
|
@@ -129,20 +129,20 @@
|
|
|
type: Object,
|
|
|
default: () => ({})
|
|
|
},
|
|
|
- formData: {
|
|
|
- type: Object,
|
|
|
- default: () => ({})
|
|
|
- },
|
|
|
- firstInfo:{
|
|
|
- type: Object,
|
|
|
- default: () => ({})
|
|
|
- },
|
|
|
- currentInfo:{
|
|
|
- type: Object,
|
|
|
- default: () => ({})
|
|
|
- }
|
|
|
+ formData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
+ },
|
|
|
+ firstInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
+ },
|
|
|
+ currentInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
+ }
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
workReport: {
|
|
|
executorId: '',
|
|
|
@@ -174,27 +174,31 @@
|
|
|
watch: {
|
|
|
taskInfo: {
|
|
|
immediate: true,
|
|
|
- handler () {
|
|
|
+ handler() {
|
|
|
if (this.taskInfo.code) {
|
|
|
this.getReportCount();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- formData: {
|
|
|
- immediate: true,
|
|
|
- handler () {
|
|
|
- if (this.formData.dateType==2) {
|
|
|
- this.$set(this.workReport,'executeTime',this.formData.appointTime);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ formData: {
|
|
|
+ immediate: true,
|
|
|
+ handler() {
|
|
|
+ if (this.formData.dateType == 2) {
|
|
|
+ this.$set(
|
|
|
+ this.workReport,
|
|
|
+ 'executeTime',
|
|
|
+ this.formData.appointTime
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
this.workReport.executorId = this.$store.state.user.info?.userId;
|
|
|
this.workReport.executorJobNum = this.$store.state.user.info?.jobNumber;
|
|
|
},
|
|
|
methods: {
|
|
|
- async getReportCount () {
|
|
|
+ async getReportCount() {
|
|
|
const res = await reportCount({
|
|
|
taskCode: this.taskInfo.code,
|
|
|
lastTaskCode: this.taskInfo.lastTaskCode,
|
|
|
@@ -203,7 +207,7 @@
|
|
|
|
|
|
this.countMsg = res;
|
|
|
},
|
|
|
- report (fun) {
|
|
|
+ report(fun) {
|
|
|
this.$refs.formRef.validate((value) => {
|
|
|
if (value) {
|
|
|
this.$confirm('是否确定要报工?', '提示').then(() => {
|
|
|
@@ -217,6 +221,7 @@
|
|
|
this.workReport.productInfo.standardNum = this.categoryMsg.number;
|
|
|
fun({
|
|
|
checkState: 3,
|
|
|
+ isSapReportState: 3,
|
|
|
workReport: this.workReport,
|
|
|
workReportCategoryList: [this.categoryMsg]
|
|
|
}).then((res) => {
|