按新要求修改
This commit is contained in:
parent
f32b2aaed0
commit
662bed71ee
@ -20,7 +20,9 @@ export const getProcessDesignPage = async (params) => {
|
||||
export const getProcessDesign = async (id: number) => {
|
||||
return await request.get({ url: `/heli/process-design/get?id=` + id })
|
||||
}
|
||||
|
||||
export const over = async (id: number) => {
|
||||
return await request.get({ url: `/heli/process-design/over?id=` + id })
|
||||
}
|
||||
// 新增工艺设计
|
||||
export const createProcessDesign = async (data: ProcessDesignVO) => {
|
||||
return await request.post({ url: `/heli/process-design/create`, data })
|
||||
|
@ -123,7 +123,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="最新进度" align="center" prop="progress" min-width="120">
|
||||
<template #default="scope">
|
||||
{{scope.row.isOver ? '已完成':'实施中'}}
|
||||
{{scope.row.isOverProcess == 1 ? '已完成':'实施中'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" min-width="160">
|
||||
@ -235,53 +235,29 @@ const openDetail = (type: string, id?: number) => {
|
||||
})
|
||||
}
|
||||
const getDetailMsg = (row) =>{
|
||||
if(row.isDelay == true){
|
||||
//
|
||||
if(row.threeDimDate != null ){
|
||||
//
|
||||
if(row.lastDate != null){
|
||||
if(row.lastDate > row.threeDimDate){
|
||||
const start = new Date(row.threeDimDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '延期' + day +'天';
|
||||
if(row.isOverProcess){
|
||||
//完结的,按计划完成了还是没按计划完成
|
||||
if(row.threeDimDate != null && row.lastDate != null ){
|
||||
const start = new Date(row.threeDimDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
if(row.lastDate > row.threeDimDate){
|
||||
return '延后' + day +'天';
|
||||
}else if (row.lastDate < row.threeDimDate){
|
||||
return '提前' + day +'天';
|
||||
}else{
|
||||
return '延期'
|
||||
return '按时完成'
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
return '延期';
|
||||
}
|
||||
|
||||
}else{
|
||||
return '已延期';
|
||||
}
|
||||
}else{
|
||||
if(row.threeDimDate != null){
|
||||
if(row.lastDate != null){
|
||||
const start = new Date(row.threeDimDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
if(row.threeDimDate > row.lastDate){
|
||||
const diffTime = Math.abs(start - end);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '提前'+day +'天完成';
|
||||
} else if ( Math.floor((start) / (1000 * 60 * 60 * 24)) == Math.floor(end / (1000 * 60 * 60 * 24))){
|
||||
return '按计划时间完成'
|
||||
}else{
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '滞后'+day +'完成';
|
||||
}
|
||||
}else{
|
||||
return '按计划实施中';
|
||||
}
|
||||
}else{
|
||||
return '按计划实施中';
|
||||
return '实施中';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
|
@ -435,7 +435,7 @@ const subFormRef = ref()
|
||||
//20250601新增
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open(formData.value.bomCode)
|
||||
importFormRef.value.open(formData.value.id)
|
||||
}
|
||||
|
||||
//上传附件
|
||||
@ -790,7 +790,9 @@ const fetchStorageOkQty = async (row)=>{
|
||||
console.error('获取库存出错:', error);
|
||||
}
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
queryData(currentId.value)
|
||||
}
|
||||
onMounted(() => {
|
||||
dialogTitle.value = t('action.' + active.value)
|
||||
if ('detail' == active.value) {
|
||||
|
@ -43,6 +43,7 @@ const importUrl =
|
||||
const uploadHeaders = ref() // 上传 Header 头
|
||||
const fileList = ref([]) // 文件列表
|
||||
const bomCode = ref('')
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = (bomcode :string) => {
|
||||
bomCode.value = bomcode;
|
||||
|
@ -199,8 +199,8 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" >
|
||||
<el-button style="margin-left: 10%;" type="danger" @click="openDelay">延期</el-button>
|
||||
|
||||
<el-button v-if="formData.isOverProcess == null || formData.isOverProcess == 0" style="margin-left: 10%;" type="warning" @click="openDelay">延期</el-button>
|
||||
<el-button v-if="formData.isOverProcess == null || formData.isOverProcess == 0" style="margin-left: 10%;" type="danger" @click="overProcess">{{ overbuttonName }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="formData.isDelay == 1">
|
||||
<el-form-item label="延期原因" prop="delayReason">
|
||||
@ -245,8 +245,8 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col v-if="active != 'detail'">
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">开始</el-button>
|
||||
<el-button style="margin-left: 30px;" type="warning" size="large" @click="sendItem()">推送</el-button>
|
||||
<el-button v-if="formData.isOverProcess == null || formData.isOverProcess == 0" class="hl-addbutton" type="primary" size="large" @click="onAddItem">开始</el-button>
|
||||
<el-button v-if="formData.isOverProcess == null || formData.isOverProcess == 0" style="margin-left: 30px;" type="warning" size="large" @click="sendItem()">推送</el-button>
|
||||
|
||||
<!-- <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem">新增</el-button> -->
|
||||
</el-col>
|
||||
@ -261,7 +261,7 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.endTime`" class="mb-0px!">
|
||||
<!-- <el-input-number min="0" max="100" class="!w-240px" :disabled="detailDisabled || row.id" v-model="row.progress" placeholder="请输入进度百分比" @change="verify1($index)"/>-->
|
||||
<el-date-picker :disabled-date="(date) => disabledDate(date, row)" :disabled="row.hasNext" :formatter="dateFormatter" v-model="row.endTime" type="datetime" placeholder="选择结束日期"/>
|
||||
<el-date-picker :disabled-date="(date) => disabledDate(date, row)" @change="(e) => endTimeChange(e,row)" :disabled="row.isOver || formData.isOverProcess == 1" :formatter="dateFormatter" v-model="row.endTime" type="datetime" placeholder="选择结束日期"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -269,7 +269,7 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict
|
||||
<template #header>已做时间(小时)</template>
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.workTime`" class="mb-0px!">
|
||||
<el-input-number :max="row.maxTime" :precision="2" class="!w-240px" :disabled="row.hasNext" v-model="row.workTime" placeholder="请输入已做时间"/>
|
||||
<el-input-number :max="row.maxTime" :precision="2" class="!w-240px" :disabled="row.isOver || formData.isOverProcess == 1" v-model="row.workTime" placeholder="请输入已做时间"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -296,7 +296,7 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict
|
||||
<el-table-column label="备注" prop="remark" min-width="280">
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.remark`" class="mb-0px!">
|
||||
<el-input :disabled="row.hasNext" v-model="row.remark" placeholder="请输入备注" />
|
||||
<el-input :disabled="row.hasNext || row.isOver || formData.isOverProcess == 1" v-model="row.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -335,7 +335,7 @@ import { inject } from 'vue'
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {useCommonStore} from "@/store/modules/common";
|
||||
import {verify} from "node:crypto";
|
||||
import { delay, now } from 'lodash-es';
|
||||
import { delay, fromPairs, now } from 'lodash-es';
|
||||
import { FolderOpened } from '@element-plus/icons-vue/dist/types';
|
||||
|
||||
defineOptions({ name: 'ProcessDesignDetail' })
|
||||
@ -369,7 +369,7 @@ const formData = ref({
|
||||
|
||||
const formRef = ref() // 表单 Ref
|
||||
const processDesignProgressFormRef = ref()
|
||||
|
||||
const overbuttonName = ref('')
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
@ -419,6 +419,20 @@ const getWorkTime = (type) =>{
|
||||
}else{return ''
|
||||
}
|
||||
}
|
||||
const endTimeChange = (e , row) =>{
|
||||
if(e == null ){
|
||||
row.workTime = null
|
||||
row.maxTime = row.workTime;
|
||||
}else{
|
||||
var endTime = new Date(e);
|
||||
var timeDiff = endTime.getTime() -row.beginTime;
|
||||
|
||||
// 将毫秒转换为小时
|
||||
row.workTime = timeDiff / (1000 * 60 * 60);
|
||||
row.maxTime = row.workTime;
|
||||
}
|
||||
|
||||
}
|
||||
const delaySubmit = async() =>{
|
||||
if(formData.value.delayReason == null || formData.value.delayReason.replaceAll(' ','') == ''){
|
||||
message.error("延期原因不得为空,请确认!")
|
||||
@ -481,7 +495,7 @@ const openDelay = () =>{
|
||||
|
||||
}
|
||||
const overRow = async( row :any) =>{
|
||||
if(row.endTime == null || row.endTime == ''){
|
||||
if(row.endTime == null ){
|
||||
row.endTime = new Date().getTime()
|
||||
var timeDiff = row.endTime -row.beginTime;
|
||||
|
||||
@ -490,11 +504,11 @@ const overRow = async( row :any) =>{
|
||||
row.maxTime = row.workTime;
|
||||
// row.workTime = row.endTime - row.
|
||||
}
|
||||
if(row.endTime == null || row.endTime == ''){
|
||||
if(row.endTime == null ){
|
||||
message.error("结束时间不能为空!请确认!")
|
||||
return
|
||||
}
|
||||
if(row.workTime == null || row.workTime == ''
|
||||
if(row.workTime == null
|
||||
){
|
||||
message.error("已做时间不能为空!请确认")
|
||||
return
|
||||
@ -503,6 +517,37 @@ const overRow = async( row :any) =>{
|
||||
await submitForm('SAVE');
|
||||
//更新一下这条数据的状态
|
||||
}
|
||||
const overProcess = () =>{
|
||||
if(formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length > 0){
|
||||
for (let index = 0; index < formData.value.processDesignProgressList.length; index++) {
|
||||
var item = formData.value.processDesignProgressList[index];
|
||||
if(!item.hasNext){
|
||||
if(item.endTime == null ){
|
||||
message.error("结束时间不能为空!请确认!")
|
||||
return
|
||||
}
|
||||
if(item.workTime == null){
|
||||
message.error("已做时间不能为空!请确认")
|
||||
return
|
||||
}
|
||||
}
|
||||
item.isOver = 1;
|
||||
}
|
||||
}else{
|
||||
message.error("至少进行一次进度汇报!")
|
||||
return
|
||||
}
|
||||
ElMessageBox.confirm('是否结束该项目?')
|
||||
.then( async () => {
|
||||
await submitForm('SAVE');
|
||||
await ProcessDesignApi.over(formData.value.id)
|
||||
await queryData(formData.value.id)
|
||||
message.success("修改成功!")
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
}
|
||||
const sendItem = async() =>{
|
||||
//推送最新的一条,如果备注为空提示备注为空不能推送
|
||||
if(formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length > 0){
|
||||
@ -518,11 +563,11 @@ const sendItem = async() =>{
|
||||
var item = formData.value.processDesignProgressList[index];
|
||||
if(!item.hasNext){
|
||||
senIndex = index;
|
||||
if(item.endTime == null || item.endTime == ''){
|
||||
if(item.endTime == null){
|
||||
message.error("结束时间不能为空!请确认!")
|
||||
return
|
||||
}
|
||||
if(item.workTime == null || item.workTime == ''){
|
||||
if(item.workTime == null){
|
||||
message.error("已做时间不能为空!请确认")
|
||||
return
|
||||
}
|
||||
@ -530,7 +575,8 @@ const sendItem = async() =>{
|
||||
message.error("推送备注不能为空!请确认")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
item.isOver = 1
|
||||
}
|
||||
//先保存
|
||||
await submitForm('SAVE');
|
||||
@ -626,6 +672,7 @@ const submitForm = async (operate) => {
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const onAddItem = async() => {
|
||||
//条件修改:没有时间就不填
|
||||
var date = new Date();
|
||||
if(processDesignType.value == 'BLUEPRINT_WORKBLANK'){
|
||||
if(formData.value.blankDate != null ){
|
||||
@ -636,8 +683,8 @@ const onAddItem = async() => {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
message.error("毛坯结束时间为空!请确认!")
|
||||
return
|
||||
// message.error("毛坯结束时间为空!请确认!")
|
||||
// return
|
||||
}
|
||||
}
|
||||
if(processDesignType.value == 'BLUEPRINT_2D'){
|
||||
@ -650,8 +697,8 @@ const onAddItem = async() => {
|
||||
|
||||
}
|
||||
}else{
|
||||
message.error("2D结束时间为空!请确认!")
|
||||
return
|
||||
// message.error("2D结束时间为空!请确认!")
|
||||
// return
|
||||
}
|
||||
}
|
||||
if(processDesignType.value == 'BLUEPRINT_3D'){
|
||||
@ -663,8 +710,8 @@ const onAddItem = async() => {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
message.error("3D结束时间为空!请确认!")
|
||||
return
|
||||
// message.error("3D结束时间为空!请确认!")
|
||||
// return
|
||||
}
|
||||
}
|
||||
if(processDesignType.value == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'){
|
||||
@ -679,24 +726,28 @@ const onAddItem = async() => {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
message.error("工艺结束时间为空!请确认!")
|
||||
return
|
||||
// message.error("工艺结束时间为空!请确认!")
|
||||
// return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (formData.value.processDesignProgressList.length>0){
|
||||
if (formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length>0){
|
||||
for ( var i = 0 ; i < formData.value.processDesignProgressList.length ; i++){
|
||||
var item = formData.value.processDesignProgressList[i];
|
||||
if(item.endTime == null || item.endTime == ''){
|
||||
message.error("结束时间不能为空!请确认!")
|
||||
return
|
||||
}
|
||||
if(item.workTime == null || item.workTime == ''
|
||||
){
|
||||
message.error("已做时间不能为空!请确认")
|
||||
return
|
||||
}
|
||||
if(item.isOver == 0){
|
||||
message.error("上一项进度未结束汇报!请确认!")
|
||||
return;
|
||||
}
|
||||
// if(item.endTime == null ){
|
||||
// message.error("结束时间不能为空!请确认!")
|
||||
// return
|
||||
// }
|
||||
// if(item.workTime == null
|
||||
// ){
|
||||
// message.error("已做时间不能为空!请确认")
|
||||
// return
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -710,7 +761,7 @@ const onAddItem = async() => {
|
||||
remark: '',
|
||||
createTime: date.getTime(),
|
||||
beginTime:date.getTime(),
|
||||
endTime:'',
|
||||
endTime:undefined,
|
||||
isOver:0,
|
||||
workTime:undefined,
|
||||
creatorName: userStore.getUser.nickname,
|
||||
@ -732,6 +783,18 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
queryData(currentId.value)
|
||||
if(processDesignType.value == 'BLUEPRINT_WORKBLANK'){
|
||||
overbuttonName.value = '毛坯项目完结'
|
||||
}
|
||||
if(processDesignType.value == 'BLUEPRINT_2D'){
|
||||
overbuttonName.value = '2D项目完结'
|
||||
}
|
||||
if(processDesignType.value == 'BLUEPRINT_3D'){
|
||||
overbuttonName.value = '3D项目完结'
|
||||
}
|
||||
if(processDesignType.value == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'){
|
||||
overbuttonName.value='铸造项目完结'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style scoped lang="less"></style>
|
||||
|
@ -117,7 +117,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="最新进度" align="center" prop="progress" min-width="120">
|
||||
<template #default="scope">
|
||||
{{scope.row.isOver ? '已完成':'实施中'}}
|
||||
{{scope.row.isOverProcess == 1 ? '已完成':'实施中'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" min-width="160">
|
||||
@ -203,54 +203,29 @@ const handleQuery = () => {
|
||||
getList()
|
||||
}
|
||||
const getDetailMsg = (row) =>{
|
||||
if(row.isDelay == true){
|
||||
//
|
||||
if(row.craftEndDate != null ){
|
||||
//
|
||||
if(row.lastDate != null){
|
||||
if(row.lastDate > row.craftEndDate){
|
||||
const start = new Date(row.craftEndDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '延期' + day +'天';
|
||||
if(row.isOverProcess){
|
||||
//完结的,按计划完成了还是没按计划完成
|
||||
if(row.craftEndDate != null && row.lastDate != null ){
|
||||
const start = new Date(row.craftEndDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
if(row.lastDate > row.craftEndDate){
|
||||
return '延后' + day +'天';
|
||||
}else if (row.lastDate < row.craftEndDate){
|
||||
return '提前' + day +'天';
|
||||
}else{
|
||||
return '延期'
|
||||
return '按时完成'
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
console.log('ss')
|
||||
return '延期';
|
||||
}
|
||||
|
||||
}else{
|
||||
return '已延期';
|
||||
}
|
||||
}else{
|
||||
if(row.craftEndDate != null){
|
||||
if(row.lastDate != null){
|
||||
const start = new Date(row.craftEndDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
if(row.craftEndDate > row.lastDate){
|
||||
const diffTime = Math.abs(start - end);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '提前'+day +'天完成';
|
||||
} else if ( Math.floor((start) / (1000 * 60 * 60 * 24)) == Math.floor(end / (1000 * 60 * 60 * 24))){
|
||||
return '按计划时间完成'
|
||||
}else{
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '滞后'+day +'完成';
|
||||
}
|
||||
}else{
|
||||
return '按计划实施中';
|
||||
}
|
||||
}else{
|
||||
return '按计划实施中';
|
||||
// return '已完成';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
|
@ -85,7 +85,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="最新进度" align="center" prop="progress" min-width="120">
|
||||
<template #default="scope">
|
||||
{{scope.row.isOver ? '已完成':'实施中'}}
|
||||
{{scope.row.isOverProcess == 1 ? '已完成':'实施中'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" min-width="160">
|
||||
@ -184,53 +184,27 @@ const openDetail = (type: string, id?: number) => {
|
||||
})
|
||||
}
|
||||
const getDetailMsg = (row) =>{
|
||||
if(row.isDelay == true){
|
||||
//
|
||||
if(row.blankDate != null ){
|
||||
//
|
||||
if(row.lastDate != null){
|
||||
if(row.lastDate > row.blankDate){
|
||||
const start = new Date(row.blankDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '延期' + day +'天';
|
||||
if(row.isOverProcess){
|
||||
//完结的,按计划完成了还是没按计划完成
|
||||
if(row.blankDate != null && row.lastDate != null ){
|
||||
const start = new Date(row.blankDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
if(row.lastDate > row.blankDate){
|
||||
return '延后' + day +'天';
|
||||
}else if (row.lastDate < row.blankDate){
|
||||
return '提前' + day +'天';
|
||||
}else{
|
||||
return '延期'
|
||||
return '按时完成'
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
return '延期';
|
||||
}
|
||||
|
||||
}else{
|
||||
return '已延期';
|
||||
}
|
||||
}else{
|
||||
if(row.blankDate != null){
|
||||
if(row.lastDate != null){
|
||||
const start = new Date(row.blankDate).getTime();
|
||||
const end = new Date(row.lastDate).getTime();
|
||||
if(row.blankDate > row.lastDate){
|
||||
const diffTime = Math.abs(start - end);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '提前'+day +'天完成';
|
||||
} else if ( Math.floor((start) / (1000 * 60 * 60 * 24)) == Math.floor(end / (1000 * 60 * 60 * 24))){
|
||||
return '按计划时间完成'
|
||||
}else{
|
||||
const diffTime = Math.abs(end - start);
|
||||
var day = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
return '滞后'+day +'完成';
|
||||
}
|
||||
}else{
|
||||
return '按计划实施中';
|
||||
}
|
||||
}else{
|
||||
return '按计划实施中';
|
||||
return '实施中';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
|
@ -181,6 +181,7 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x"
|
||||
<el-checkbox-group v-if="active != 'detail' && formData.dispatchStatus == 1 " v-model="checkList" @change="onAddItem()">
|
||||
<el-checkbox label="下料" size="large" border />
|
||||
<el-checkbox label="电焊" size="large" border />
|
||||
<el-checkbox label="编程" size="large" border />
|
||||
<el-checkbox label="开粗" size="large" border />
|
||||
<el-checkbox label="铣床" size="large" border />
|
||||
<el-checkbox label="车床" size="large" border />
|
||||
@ -778,7 +779,12 @@ const dispatchTypeHasChange = (row) =>{
|
||||
row.postId =''
|
||||
} else{
|
||||
row.owner = ''
|
||||
row.postId = ownerList2.value[0].id;
|
||||
if(row.isOutsourcing == true){
|
||||
row.postId = '2'
|
||||
}else{
|
||||
row.postId = ownerList2.value[0].id;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
watch(
|
||||
@ -1247,7 +1253,11 @@ const queryData = async (id?: number) => {
|
||||
postList.value = await TaskDispatchApi.getOwnerList(formData.value.ownerId,2);
|
||||
ownerList1.value = await getOwnerListThis ();
|
||||
//20250601改 固定为2 ownerList2.value = await getOwnerPostListThis ();
|
||||
ownerList2 .value.push({index:1,id:'2',label:'2'})
|
||||
ownerList2.value = await getOwnerPostListThis ();
|
||||
const exists = ownerList2.value.some(item => item.id === '2');
|
||||
if (!exists) {
|
||||
ownerList2.value.push({ index: 1, id: '2', label: '2' });
|
||||
}
|
||||
}
|
||||
|
||||
formData.value.bomCode = 'BOM-' + formData.value.projectSubCode
|
||||
|
@ -232,22 +232,22 @@
|
||||
const processDesignType = ref('')
|
||||
const updateItem = ref()
|
||||
const handleDetail = async (item) => {
|
||||
updateItem.value = item;
|
||||
processDesignType.value = item.processDesignType;
|
||||
if (props.orderState == 0) {
|
||||
progress.value = 0;
|
||||
imageLink.value = item.blueprintLink;
|
||||
remark.value = item.remark;
|
||||
await queryData(updateItem.value.id)
|
||||
await nextTick(); // 等待数据更新和DOM渲染
|
||||
// showPopup.value = true;
|
||||
// updateItem.value = item;
|
||||
// processDesignType.value = item.processDesignType;
|
||||
// if (props.orderState == 0) {
|
||||
// progress.value = 0;
|
||||
// imageLink.value = item.blueprintLink;
|
||||
// remark.value = item.remark;
|
||||
// await queryData(updateItem.value.id)
|
||||
// await nextTick(); // 等待数据更新和DOM渲染
|
||||
// // showPopup.value = true;
|
||||
|
||||
popup.value?.open()
|
||||
selectedId.value = item.id;
|
||||
} else {
|
||||
// popup.value?.open()
|
||||
// selectedId.value = item.id;
|
||||
// } else {
|
||||
const url = `/pages/moJuSheJiReport/moJuSheJiReport-detail?id=${item.id}&jd=${item.progress}`
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
// }
|
||||
// 为 selectedId 赋值
|
||||
/* */
|
||||
}
|
||||
@ -352,7 +352,7 @@
|
||||
}
|
||||
|
||||
|
||||
if (dataListAdd.value.length > 0) {
|
||||
if (dataListAdd.value != null && dataList.value.length > 0) {
|
||||
var indexs = -1;
|
||||
for (var i = 0; i < dataListAdd.value.length; i++) {
|
||||
|
||||
@ -403,7 +403,7 @@
|
||||
}
|
||||
const overRow = async () => {
|
||||
var indexs = -1;
|
||||
if (dataListAdd.value.length > 0) {
|
||||
if (dataListAdd.value != null && dataListAdd.value.length > 0) {
|
||||
for (var i = 0; i < dataListAdd.value.length; i++) {
|
||||
var item = dataListAdd.value[i];
|
||||
if (item.isOver == 0) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -146,15 +146,15 @@ const onRefresherrefresh = async () => {
|
||||
<view class="product-item">项目名称:{{ item.projectName }}</view>
|
||||
<view class="product-item">子项目:{{ item.projectSubCode || '' }} {{' ' + item.projectSubName }}</view>
|
||||
<view class="product-item">零件名称:{{ item.materialName }}</view>
|
||||
<view class="product-item">图号:{{ item.blueprintNo }}</view>
|
||||
<!-- <view class="product-row">
|
||||
<!-- <view class="product-item">图号:{{ item.blueprintNo }}</view> -->
|
||||
<view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">模型名称: {{ item.mouldName }}</view>
|
||||
<view class="label">图号:{{ item.blueprintNo }}</view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="label">派工工序: {{ item.procedureName }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">派工数量</view>
|
||||
|
@ -18,6 +18,7 @@
|
||||
}>()
|
||||
const noticeMsg = ref('')
|
||||
const isOverBeforeProcedure = async (id : number) => {
|
||||
//console.log(props.orderState)
|
||||
const params = {
|
||||
id,
|
||||
}
|
||||
@ -27,9 +28,6 @@
|
||||
//如果上一道工序没结束
|
||||
noticeMsg.value = '上一道工序尚未完成报工!';
|
||||
return true;
|
||||
}else if(data.testYn != 'Y'){
|
||||
noticeMsg.value = '上道工序过程检没有完成,请确认!';
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
@ -185,7 +183,7 @@
|
||||
<view class="val high-color">{{ item.totalWorkTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-item" :style=" item.endTime < todayStr ? 'color:red':null">预计生产日期:{{ item.startTime }} ~ {{ item.endTime }}</view>
|
||||
<view class="product-item" :style=" (item.endTime < todayStr)&&props.orderState != '2' ? 'color:red':null">预计生产日期:{{ item.startTime }} ~ {{ item.endTime }}</view>
|
||||
</view>
|
||||
<view class="statusText">{{ statusText }}</view>
|
||||
</view>
|
||||
|
@ -96,8 +96,6 @@
|
||||
} else {
|
||||
isShowEnd.value = false
|
||||
}
|
||||
console.log(isShowEnd.value);
|
||||
console.log(isShowStart.value)
|
||||
if (historyList.value != null && historyList.value.length > 0) {
|
||||
var totalAmount = detailInfo.value.amount;
|
||||
var beforeAmount = detailInfo.value.totalReportAmount
|
||||
|
Loading…
Reference in New Issue
Block a user