| | |
| | | <template> |
| | | <view> |
| | | <!-- 页签区域 --> |
| | | <view class="tabs" id="tabs"> |
| | | <view class="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">其他信息</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">制单信息</view> |
| | | </view> |
| | | </view> |
| | | <!-- 基本信息 --> |
| | | <template v-if="tabs == 0"> |
| | | <view class="form" :style="{height: containerHeight + 'px',overflow: 'auto' }"> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input name="HBillNo" disabled v-model="hform.HBillNo" placeholder="请输入单据号" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据日期:</view> |
| | | <view class="righton"> |
| | | <input name="HDate" disabled v-model="hform.HDate" placeholder="请选择" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">主题:</view> |
| | | <view class="right"> |
| | | <input name="HContext" v-model="hform.HContext" placeholder="请输入主题" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" style="align-items: flex-start;"> |
| | | <view class="title"><text>*</text>详细内容:</view> |
| | | <view class="right" style="min-height: 150rpx;"> |
| | | <textarea name="HDescription" v-model="hform.HDescription" auto-height maxlength="-1" |
| | | placeholder="请输入详细内容"></textarea> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">异常类型:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHErrMsgBackTypeName" placeholder="请选择" |
| | | v-model="hform.HErrMsgBackTypeName" @input="HErrMsgBackTypeNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送部门:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName" |
| | | @input="HDeptNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择发送人" v-model="hform.HSendMan" |
| | | @input="HSendManChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <!-- 页签区域 --> |
| | | <view class="tabs" id="tabs"> |
| | | <view class="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">其他信息</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">制单信息</view> |
| | | </view> |
| | | </view> |
| | | <!-- 基本信息 --> |
| | | <template v-if="tabs == 0"> |
| | | <view class="form" :style="{height: containerHeight + 'px',overflow: 'auto' }"> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input name="HBillNo" disabled v-model="hform.HBillNo" placeholder="请输入单据号" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据日期:</view> |
| | | <view class="righton"> |
| | | <input name="HDate" disabled v-model="hform.HDate" placeholder="请选择" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">主题:</view> |
| | | <view class="right"> |
| | | <input name="HContext" v-model="hform.HContext" placeholder="请输入主题" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" style="align-items: flex-start;"> |
| | | <view class="title"><text>*</text>详细内容:</view> |
| | | <view class="right" style="min-height: 150rpx;"> |
| | | <textarea disabled name="HDescription" v-model="dynamicDesc" auto-height maxlength="-1" |
| | | placeholder="请输入详细内容"></textarea> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">异常类型:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHErrMsgBackTypeName" placeholder="请选择" |
| | | v-model="hform.HErrMsgBackTypeName" @input="HErrMsgBackTypeNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送部门:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName" |
| | | @input="HDeptNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择发送人" v-model="hform.HSendMan" |
| | | @input="HSendManChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title"><text>*</text>接收人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择接收人" v-model="hform.HReceiveMan" |
| | | @input="HReceiveManChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">处理人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择处理人" v-model="hform.HHandleEmpName" |
| | | @input="HHandleEmpNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">责任人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择责任人" v-model="hform.HBadProcManName" |
| | | @input="HBadProcManNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">问题来源:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHForm" placeholder="请选择问题来源" v-model="hform.HForm" |
| | | @input="HFormChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产资源:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHSourceName" placeholder="请选择" v-model="hform.HSourceName" |
| | | @input="HSourceNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">车间:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHCenterName" placeholder="请选择" v-model="hform.HCenterName" |
| | | @input="HCenterNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">产品编码:</view> |
| | | <view class="right"> |
| | | <input name="HMaterNumber" v-model="hform.HMaterNumber" placeholder="请输入产品编码" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">产品名称:</view> |
| | | <view class="right"> |
| | | <input name="HMaterName" v-model="hform.HMaterName" placeholder="请输入产品名称" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">规格型号:</view> |
| | | <view class="right"> |
| | | <input name="HMaterModel" v-model="hform.HMaterModel" placeholder="请输入规格型号" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">涉及数量:</view> |
| | | <view class="right"> |
| | | <input name="HQty" type="number" v-model="hform.HQty" placeholder="请输入数量" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产班次:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHShiftsName" placeholder="请选择" v-model="hform.HShiftsName" |
| | | @input="HShiftsNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">影响面程度:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEffect" placeholder="请选择影响面程度" v-model="hform.HErrLev" |
| | | @input="HEffectChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right" style="min-height: 150rpx;"> |
| | | <input name="HRemark" v-model="hform.HRemark" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">接收部门:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HRecDeptName" |
| | | @input="HRecDeptChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">抄送人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择抄送人" v-model="hform.HCopyMan" |
| | | @input="HCopyManChange" multiple></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">QE责任人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择QE责任人" v-model="hform.HQEManName" |
| | | @input="HQEManNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">紧急程度:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHLevel" placeholder="请选择紧急程度" v-model="hform.HLevel" |
| | | @input="HLevelChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送类型:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHSendType" placeholder="请选择发送类型" v-model="hform.HSendType" |
| | | @input="HSendTypeChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">催促次数:</view> |
| | | <view class="right"> |
| | | <input name="HHasten" type="number" v-model="hform.HHasten" placeholder="请输入催促次数" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">变化点:</view> |
| | | <view class="right"> |
| | | <input name="HChangeNote" v-model="hform.HChangeNote" placeholder="请输入变化点" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title"><text>*</text>接收人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择接收人" v-model="hform.HReceiveMan" |
| | | @input="HReceiveManChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">处理人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择处理人" v-model="hform.HHandleEmpName" |
| | | @input="HHandleEmpNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">责任人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择责任人" v-model="hform.HBadProcManName" |
| | | @input="HBadProcManNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">问题来源:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHForm" placeholder="请选择问题来源" v-model="hform.HForm" |
| | | @input="HFormChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产资源:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHSourceName" placeholder="请选择" v-model="hform.HSourceName" |
| | | @input="HSourceNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">车间:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHCenterName" placeholder="请选择" v-model="hform.HCenterName" |
| | | @input="HCenterNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">产品编码:</view> |
| | | <view class="right"> |
| | | <input name="HMaterNumber" v-model="hform.HMaterNumber" placeholder="请输入产品编码" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">产品名称:</view> |
| | | <view class="right"> |
| | | <input name="HMaterName" v-model="hform.HMaterName" placeholder="请输入产品名称" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">规格型号:</view> |
| | | <view class="right"> |
| | | <input name="HMaterModel" v-model="hform.HMaterModel" placeholder="请输入规格型号" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">涉及数量:</view> |
| | | <view class="right"> |
| | | <input name="HQty" type="number" v-model="hform.HQty" placeholder="请输入数量" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">生产班次:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHShiftsName" placeholder="请选择" v-model="hform.HShiftsName" |
| | | @input="HShiftsNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">影响面程度:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEffect" placeholder="请选择影响面程度" v-model="hform.HErrLev" |
| | | @input="HEffectChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right" style="min-height: 150rpx;"> |
| | | <input name="HRemark" v-model="hform.HRemark" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">接收部门:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HRecDeptName" |
| | | @input="HRecDeptChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">抄送人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择抄送人" v-model="hform.HCopyMan" |
| | | @input="HCopyManChange" multiple></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">QE责任人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择QE责任人" v-model="hform.HQEManName" |
| | | @input="HQEManNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">紧急程度:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHLevel" placeholder="请选择紧急程度" v-model="hform.HLevel" |
| | | @input="HLevelChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送类型:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHSendType" placeholder="请选择发送类型" v-model="hform.HSendType" |
| | | @input="HSendTypeChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">催促次数:</view> |
| | | <view class="right"> |
| | | <input name="HHasten" type="number" v-model="hform.HHasten" placeholder="请输入催促次数" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">变化点:</view> |
| | | <view class="right"> |
| | | <input name="HChangeNote" v-model="hform.HChangeNote" placeholder="请输入变化点" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">单据类型:</view> |
| | | <view class="righton"> |
| | | <input name="HBillTypeName" disabled v-model="hform.HBillTypeName" placeholder="请输入单据类型" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据号码:</view> |
| | | <view class="righton"> |
| | | <input name="HPlanBillNo" disabled v-model="hform.HPlanBillNo" placeholder="请输入单据号码" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 制单信息 --> |
| | | <template v-if="tabs == 2"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">制单人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMaker" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">制单日期:</view> |
| | | <view class="righton"> |
| | | <input name="HMakeDate" disabled v-model="hform.HMakeDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDater" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改日期:</view> |
| | | <view class="righton"> |
| | | <input name="HUpDateDate" disabled v-model="hform.HUpDateDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HChecker" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核日期:</view> |
| | | <view class="righton"> |
| | | <input name="HCheckDate" disabled v-model="hform.HCheckDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteMan" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废日期:</view> |
| | | <view class="righton"> |
| | | <input name="HDeleteDate" disabled v-model="hform.HDeleteDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <view style="flex: 1;"></view> |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据类型:</view> |
| | | <view class="righton"> |
| | | <input name="HBillTypeName" disabled v-model="hform.HBillTypeName" placeholder="请输入单据类型" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据号码:</view> |
| | | <view class="righton"> |
| | | <input name="HPlanBillNo" disabled v-model="hform.HPlanBillNo" placeholder="请输入单据号码" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 制单信息 --> |
| | | <template v-if="tabs == 2"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">制单人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMaker" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">制单日期:</view> |
| | | <view class="righton"> |
| | | <input name="HMakeDate" disabled v-model="hform.HMakeDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDater" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改日期:</view> |
| | | <view class="righton"> |
| | | <input name="HUpDateDate" disabled v-model="hform.HUpDateDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HChecker" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核日期:</view> |
| | | <view class="righton"> |
| | | <input name="HCheckDate" disabled v-model="hform.HCheckDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteMan" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废日期:</view> |
| | | <view class="righton"> |
| | | <input name="HDeleteDate" disabled v-model="hform.HDeleteDate" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <view style="flex: 1;"></view> |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | | import { |
| | | getUserInfo |
| | | } from "../../utils/auth"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | tabsBottom: 0, |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | OperationType: 1, |
| | | refSav: "", |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | | import { |
| | | getUserInfo |
| | | } from "../../utils/auth"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | tabsBottom: 0, |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | OperationType: 1, |
| | | refSav: "", |
| | | |
| | | arrayHLevel: ['普通', '紧急'], |
| | | arrayHForm: ['人', '机', '料', '法', '环', '测'], |
| | | arrayHEffect: ['停线', '批量不良', '偶发不良', '无法判断'], |
| | | arrayHSendType: ['公共', '个人'], |
| | | arrayHLevel: ['普通', '紧急'], |
| | | arrayHForm: ['人', '机', '料', '法', '环', '测'], |
| | | arrayHEffect: ['停线', '批量不良', '偶发不良', '无法判断'], |
| | | arrayHSendType: ['公共', '个人'], |
| | | |
| | | // 人员相关数组 |
| | | arrayHEmpName: [], // 接收人 发送人 处理人 责任人 抄送人 QE责任人 |
| | | HEmpNameList: [], |
| | | // 人员相关数组 |
| | | arrayHEmpName: [], // 接收人 发送人 处理人 责任人 抄送人 QE责任人 |
| | | HEmpNameList: [], |
| | | |
| | | |
| | | // 其他数组 |
| | | arrayHDeptName: [], // 接收、发送部门 |
| | | HDeptNameList: [], |
| | | arrayHErrMsgBackTypeName: [], // 异常反馈类型 |
| | | HErrMsgBackTypeNameList: [], |
| | | arrayHSourceName: [], //生产资源 |
| | | HSourceNameList: [], |
| | | arrayHCenterName: [], //工作中心 |
| | | HCenterNameList: [], |
| | | arrayHShiftsName: [], //生产班次 |
| | | HShiftsNameList: [], |
| | | // 其他数组 |
| | | arrayHDeptName: [], // 接收、发送部门 |
| | | HDeptNameList: [], |
| | | arrayHErrMsgBackTypeName: [], // 异常反馈类型 |
| | | HErrMsgBackTypeNameList: [], |
| | | arrayHSourceName: [], //生产资源 |
| | | HSourceNameList: [], |
| | | arrayHCenterName: [], //工作中心 |
| | | HCenterNameList: [], |
| | | arrayHShiftsName: [], //生产班次 |
| | | HShiftsNameList: [], |
| | | |
| | | isEdit: false, |
| | | eData: { |
| | | HICMOBillNo: '', |
| | | HSourceName: '', |
| | | HSourceBillNo: '', |
| | | HType: '', |
| | | OperationType: '', |
| | | linterid: '', |
| | | HSouceBillType: '', |
| | | }, |
| | | isEdit: false, |
| | | eData: { |
| | | HICMOBillNo: '', |
| | | HSourceName: '', |
| | | HSourceBillNo: '', |
| | | HType: '', |
| | | OperationType: '', |
| | | linterid: '', |
| | | HSouceBillType: '', |
| | | }, |
| | | |
| | | hform: { |
| | | HBillNo: '', |
| | | HInterID: '', |
| | | HDate: getDateTime.dateTimeStr('y-m-d h:i:s'), |
| | | HContext: '', |
| | | HDescription: '', |
| | | HRemark: '', |
| | | hform: { |
| | | HBillNo: '', |
| | | HInterID: '', |
| | | HDate: getDateTime.dateTimeStr('y-m-d h:i:s'), |
| | | HContext: '', |
| | | HDescription: '', |
| | | HRemark: '', |
| | | |
| | | HErrMsgBackTypeName: '', |
| | | HErrMsgBackTypeID: '0', |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HSendMan: getUserInfo().Czymc, |
| | | HReceiveMan: '', |
| | | HHandleEmpName: '', |
| | | HHandleEmpID: '0', |
| | | HCopyMan: '', |
| | | HBadProcManName: '', |
| | | HBadProcMan: '0', |
| | | HQEManName: '', |
| | | HQEMan: '0', |
| | | HRecDeptName: getUserInfo().HDeptName, |
| | | HRecDeptID: getUserInfo().HDeptID, |
| | | HErrMsgBackTypeName: '', |
| | | HErrMsgBackTypeID: '0', |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HSendMan: getUserInfo().Czymc, |
| | | HReceiveMan: '', |
| | | HHandleEmpName: '', |
| | | HHandleEmpID: '0', |
| | | HCopyMan: '', |
| | | HBadProcManName: '', |
| | | HBadProcMan: '0', |
| | | HQEManName: '', |
| | | HQEMan: '0', |
| | | HRecDeptName: getUserInfo().HDeptName, |
| | | HRecDeptID: getUserInfo().HDeptID, |
| | | |
| | | HLevel: '普通', |
| | | HBillTypeName: '', |
| | | HPlanBillNo: '', |
| | | HMaterNumber: '', |
| | | HMaterName: '', |
| | | HMaterModel: '', |
| | | HLevel: '普通', |
| | | HBillTypeName: '', |
| | | HPlanBillNo: '', |
| | | HMaterNumber: '', |
| | | HMaterName: '', |
| | | HMaterModel: '', |
| | | |
| | | // 新添加的字段 |
| | | HHasten: 0, // 催促次数 |
| | | HChangeNote: '', // 变化点 |
| | | HShiftsName: '', // 生产班次 |
| | | HShiftsID: '0', // 生产班次ID |
| | | HErrLev: '', // 影响面程度 |
| | | HForm: '人', // 问题来源 |
| | | HSendType: '公共', // 发送类型 |
| | | HReTransmitMan: '', // 转发至 |
| | | HSourceName: '', // 生产资源 |
| | | HSourceID: '0', // 生产资源ID |
| | | HCenterName: getUserInfo().HWorkCenterName, // 车间 |
| | | HCenterID: getUserInfo().HWorkCenterID, // 车间ID |
| | | HQty: 0, // 数量 |
| | | HDeleteMan: '', // 作废人 |
| | | HDeleteDate: '', // 作废日期 |
| | | // 新添加的字段 |
| | | HHasten: 0, // 催促次数 |
| | | HChangeNote: '', // 变化点 |
| | | HShiftsName: '', // 生产班次 |
| | | HShiftsID: '0', // 生产班次ID |
| | | HErrLev: '', // 影响面程度 |
| | | HForm: '人', // 问题来源 |
| | | HSendType: '公共', // 发送类型 |
| | | HReTransmitMan: '', // 转发至 |
| | | HSourceName: '', // 生产资源 |
| | | HSourceID: '0', // 生产资源ID |
| | | HCenterName: getUserInfo().HWorkCenterName, // 车间 |
| | | HCenterID: getUserInfo().HWorkCenterID, // 车间ID |
| | | HQty: 0, // 数量 |
| | | HDeleteMan: '', // 作废人 |
| | | HDeleteDate: '', // 作废日期 |
| | | |
| | | HMainSourceBillNo: '', |
| | | HMainSourceInterID: '0', |
| | | HMainSourceEntryID: '0', |
| | | HMainSourceBillType: '', |
| | | HMainSourceBillNo: '', |
| | | HMainSourceInterID: '0', |
| | | HMainSourceEntryID: '0', |
| | | HMainSourceBillType: '', |
| | | |
| | | HMaker: getUserInfo().Czymc, |
| | | HMakeDate: getDateTime.dateTimeStr('y-m-d h:i:s'), |
| | | HUpDater: '', |
| | | HUpDateDate: '', |
| | | HChecker: '', |
| | | HCheckDate: '', |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | this.getListData() |
| | | if (!e.OperationType) { |
| | | this.OperationType = 1 |
| | | } else { |
| | | this.OperationType = e.OperationType |
| | | } |
| | | HMaker: getUserInfo().Czymc, |
| | | HMakeDate: getDateTime.dateTimeStr('y-m-d h:i:s'), |
| | | HUpDater: '', |
| | | HUpDateDate: '', |
| | | HChecker: '', |
| | | HCheckDate: '', |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | this.getListData() |
| | | if (!e.OperationType) { |
| | | this.OperationType = 1 |
| | | } else { |
| | | this.OperationType = e.OperationType |
| | | } |
| | | |
| | | if (this.OperationType == 1) { |
| | | // 新增 |
| | | this.getMaxNum() |
| | | } else if (this.OperationType == 2) { |
| | | // 有源单 |
| | | this.getMaxNum() |
| | | } else if (this.OperationType == 3) { |
| | | // 编辑 |
| | | this.getEditData(e.hmainid) |
| | | } else if (this.OperationType == 4) { |
| | | // 报工台跳转 |
| | | this.getMaxNum() |
| | | this.set_Sc_ICMOBillStatus(e.HSourceBillNo, e.HType, e.HSourceName); //回填信息 |
| | | this.hform.HContext = e.HType |
| | | } |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | } |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query.select("#buttons") |
| | | .boundingClientRect() |
| | | .select("#tabs") |
| | | .boundingClientRect() |
| | | .exec(res => { |
| | | this.btnTop = Math.floor(res[0].top) |
| | | this.tabsBottom = Math.ceil(res[1].bottom) |
| | | }) |
| | | }, |
| | | methods: { |
| | | //选择发送部门 |
| | | HDeptNameChange(e) { |
| | | for (var i = 0; i < this.HDeptNameList.length; i++) { |
| | | if (this.HDeptNameList[i].部门名称 == e) { |
| | | this.hform.HDeptID = this.HDeptNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择接收部门 |
| | | HRecDeptNameChange(e) { |
| | | for (var i = 0; i < this.HDeptNameList.length; i++) { |
| | | if (this.HDeptNameList[i].部门名称 == e) { |
| | | this.hform.HRecDeptID = this.HDeptNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择异常反馈类型 |
| | | HErrMsgBackTypeNameChange(e) { |
| | | for (var i = 0; i < this.HErrMsgBackTypeNameList.length; i++) { |
| | | if (this.HErrMsgBackTypeNameList[i].异常反馈类型名称 == e) { |
| | | this.hform.HErrMsgBackTypeName = this.HErrMsgBackTypeNameList[i].异常反馈类型名称; |
| | | this.hform.HErrMsgBackTypeID = this.HErrMsgBackTypeNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择发送人 |
| | | HSendManChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | if (this.OperationType == 1) { |
| | | // 新增 |
| | | this.getMaxNum() |
| | | } else if (this.OperationType == 2) { |
| | | // 有源单 |
| | | this.getMaxNum() |
| | | } else if (this.OperationType == 3) { |
| | | // 编辑 |
| | | this.getEditData(e.hmainid) |
| | | } else if (this.OperationType == 4) { |
| | | // 报工台跳转 |
| | | console.log('e: ', e); |
| | | this.getMaxNum() |
| | | this.set_Sc_ICMOBillStatus(e.HSourceBillNo, e.HType, e.HSourceName); //回填信息 |
| | | this.hform.HContext = e.HType |
| | | this.eData = e |
| | | } |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | }, |
| | | dynamicDesc: { |
| | | get() { |
| | | return '异常反馈单号:' + this.hform.HBillNo + ',异常类型:' + this.eData.HType + ',订单号:' + this |
| | | .eData.HICMOBillNo + ',流转卡号:' + this.eData.HICMOBillNo + |
| | | ', 产品编码:' + this.hform.HMaterNumber + ',产品名称:' + this.hform.HMaterName + ',规格型号:' + this |
| | | .hform.HMaterModel + |
| | | ',发送人:' + this.hform.HMaker + ',发生时间:' + this.hform.HDate + ',生产资源:' + this.hform |
| | | .HSourceName + ',设备编码:' + this.hform.EquipNumber + ',对应处理人:' + this.hform.HHandleEmpName |
| | | } |
| | | } |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query.select("#buttons") |
| | | .boundingClientRect() |
| | | .select("#tabs") |
| | | .boundingClientRect() |
| | | .exec(res => { |
| | | this.btnTop = Math.floor(res[0].top) |
| | | this.tabsBottom = Math.ceil(res[1].bottom) |
| | | }) |
| | | }, |
| | | methods: { |
| | | //选择发送部门 |
| | | HDeptNameChange(e) { |
| | | for (var i = 0; i < this.HDeptNameList.length; i++) { |
| | | if (this.HDeptNameList[i].部门名称 == e) { |
| | | this.hform.HDeptID = this.HDeptNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择接收部门 |
| | | HRecDeptNameChange(e) { |
| | | for (var i = 0; i < this.HDeptNameList.length; i++) { |
| | | if (this.HDeptNameList[i].部门名称 == e) { |
| | | this.hform.HRecDeptID = this.HDeptNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择异常反馈类型 |
| | | HErrMsgBackTypeNameChange(e) { |
| | | for (var i = 0; i < this.HErrMsgBackTypeNameList.length; i++) { |
| | | if (this.HErrMsgBackTypeNameList[i].异常反馈类型名称 == e) { |
| | | this.hform.HErrMsgBackTypeName = this.HErrMsgBackTypeNameList[i].异常反馈类型名称; |
| | | this.hform.HErrMsgBackTypeID = this.HErrMsgBackTypeNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择发送人 |
| | | HSendManChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | |
| | | } |
| | | } |
| | | }, |
| | | //选择接收人 |
| | | HReceiveManChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | } |
| | | } |
| | | }, |
| | | //选择接收人 |
| | | HReceiveManChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HReceiveMan = e |
| | | } |
| | | } |
| | | }, |
| | | //选择处理人 |
| | | HHandleEmpNameChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HHandleEmpName = e |
| | | this.hform.HHandleEmpID = this.HEmpNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | | //选择抄送人 |
| | | HCopyManChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | |
| | | } |
| | | } |
| | | }, |
| | | //选择处理人 |
| | | HHandleEmpNameChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HHandleEmpID = this.HEmpNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | | //选择抄送人 |
| | | HCopyManChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | } |
| | | } |
| | | }, |
| | | //选择抄送人 |
| | | HBadProcManNameChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HBadProcManName = e |
| | | this.hform.HBadProcMan = this.HEmpNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | | //选择QE责任人 |
| | | HQEManNameChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HQEMan = this.HEmpNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | | //选择生产资源 |
| | | HSourceNameChange(e) { |
| | | for (var i = 0; i < this.HSourceNameList.length; i++) { |
| | | if (this.HSourceNameList[i].生产资源 == e) { |
| | | this.hform.HSourceName = this.HSourceNameList[i].生产资源; |
| | | this.hform.HSourceID = this.HSourceNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择车间 |
| | | HCenterNameChange(e) { |
| | | for (var i = 0; i < this.HCenterNameList.length; i++) { |
| | | if (this.HCenterNameList[i].工作中心 == e) { |
| | | this.hform.HCenterName = this.HCenterNameList[i].工作中心; |
| | | this.hform.HCenterID = this.HCenterNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择生产班次 |
| | | HShiftsNameChange(e) { |
| | | for (var i = 0; i < this.HShiftsNameList.length; i++) { |
| | | if (this.HShiftsNameList[i].班次名称 == e) { |
| | | this.hform.HShiftsName = this.HShiftsNameList[i].班次名称; |
| | | this.hform.HShiftsID = this.HShiftsNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | // 静态下拉框选择方法 |
| | | HLevelChange(e) { |
| | | this.hform.HLevel = e; |
| | | }, |
| | | HFormChange(e) { |
| | | this.hform.HForm = e; |
| | | }, |
| | | HEffectChange(e) { |
| | | this.hform.HErrLev = e; |
| | | }, |
| | | HSendTypeChange(e) { |
| | | this.hform.HSendType = e; |
| | | }, |
| | | //新增按钮事件 |
| | | addNew() { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '新增后页面数据将消失,确定要新增吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1' |
| | | }) |
| | | // 重新获取最大单据号 |
| | | this.getMaxNum(); |
| | | // 切换到基本信息页签 |
| | | this.tabs = 0; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 获取所有列表数据 |
| | | async getListData() { |
| | | // 获取部门列表 |
| | | await this.getDepartmentList(); |
| | | // 获取异常反馈类型列表 |
| | | await this.getHErrMesTypeList(); |
| | | // 获取人员列表(接收人、处理人、抄送人、责任人、QE责任人) |
| | | await this.getPersonList(); |
| | | // 获取生产资源列表 |
| | | await this.getSourceList(); |
| | | // 获取车间列表 |
| | | await this.getCenterList(); |
| | | // 获取生产班次列表 |
| | | await this.getShiftsList(); |
| | | }, |
| | | |
| | | } |
| | | } |
| | | }, |
| | | //选择抄送人 |
| | | HBadProcManNameChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HBadProcMan = this.HEmpNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | | //选择QE责任人 |
| | | HQEManNameChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HQEMan = this.HEmpNameList[i].HItemID |
| | | } |
| | | } |
| | | }, |
| | | //选择生产资源 |
| | | HSourceNameChange(e) { |
| | | for (var i = 0; i < this.HSourceNameList.length; i++) { |
| | | if (this.HSourceNameList[i].生产资源 == e) { |
| | | this.hform.HSourceName = this.HSourceNameList[i].生产资源; |
| | | this.hform.HSourceID = this.HSourceNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择车间 |
| | | HCenterNameChange(e) { |
| | | for (var i = 0; i < this.HCenterNameList.length; i++) { |
| | | if (this.HCenterNameList[i].工作中心 == e) { |
| | | this.hform.HCenterName = this.HCenterNameList[i].工作中心; |
| | | this.hform.HCenterID = this.HCenterNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | //选择生产班次 |
| | | HShiftsNameChange(e) { |
| | | for (var i = 0; i < this.HShiftsNameList.length; i++) { |
| | | if (this.HShiftsNameList[i].班次名称 == e) { |
| | | this.hform.HShiftsName = this.HShiftsNameList[i].班次名称; |
| | | this.hform.HShiftsID = this.HShiftsNameList[i].HItemID; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | // 静态下拉框选择方法 |
| | | HLevelChange(e) { |
| | | this.hform.HLevel = e; |
| | | }, |
| | | HFormChange(e) { |
| | | this.hform.HForm = e; |
| | | }, |
| | | HEffectChange(e) { |
| | | this.hform.HErrLev = e; |
| | | }, |
| | | HSendTypeChange(e) { |
| | | this.hform.HSendType = e; |
| | | }, |
| | | //新增按钮事件 |
| | | addNew() { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '新增后页面数据将消失,确定要新增吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1' |
| | | }) |
| | | // 重新获取最大单据号 |
| | | this.getMaxNum(); |
| | | // 切换到基本信息页签 |
| | | this.tabs = 0; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 获取所有列表数据 |
| | | async getListData() { |
| | | // 获取部门列表 |
| | | await this.getDepartmentList(); |
| | | // 获取异常反馈类型列表 |
| | | await this.getHErrMesTypeList(); |
| | | // 获取人员列表(接收人、处理人、抄送人、责任人、QE责任人) |
| | | await this.getPersonList(); |
| | | // 获取生产资源列表 |
| | | await this.getSourceList(); |
| | | // 获取车间列表 |
| | | await this.getCenterList(); |
| | | // 获取生产班次列表 |
| | | await this.getShiftsList(); |
| | | }, |
| | | // 获取部门列表 |
| | | getDepartmentList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HDeptNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHDeptName[i] = res.data.data[i].部门名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取部门信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取部门信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 获取部门列表 |
| | | getDepartmentList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HDeptNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHDeptName[i] = res.data.data[i].部门名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取部门信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取部门信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | // 获取异常反馈类型列表 |
| | | getHErrMesTypeList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetGy_ErrMsgBackTypeList_Json', |
| | | data: { |
| | | ErrMsg: "", |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HErrMsgBackTypeNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHErrMsgBackTypeName[i] = res.data.data[i].异常反馈类型名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取异常反馈类型信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取异常反馈类型信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 获取异常反馈类型列表 |
| | | getHErrMesTypeList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetGy_ErrMsgBackTypeList_Json', |
| | | data: { |
| | | ErrMsg: "", |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HErrMsgBackTypeNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHErrMsgBackTypeName[i] = res.data.data[i].异常反馈类型名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取异常反馈类型信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取异常反馈类型信息失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 获取人员列表(通用方法) |
| | | getPersonList() { |
| | | console.log('uni.getStorageSync("HDeptID"): ',uni.getStorageSync("HDeptID")); |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetEmployeeList_Json', |
| | | data: { |
| | | Employee: '', |
| | | HGroupID: 0, |
| | | // 获取人员列表(通用方法) |
| | | getPersonList() { |
| | | console.log('uni.getStorageSync("HDeptID"): ', uni.getStorageSync("HDeptID")); |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetEmployeeList_Json', |
| | | data: { |
| | | Employee: '', |
| | | HGroupID: 0, |
| | | HDeptID: uni.getStorageSync("HDeptID") |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HEmpNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHEmpName[i] = res.data.data[i].HName |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); // 成功时resolve |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | reject(res.data.Message); // 失败时reject |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(res); // 失败时reject |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HEmpNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHEmpName[i] = res.data.data[i].HName |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); // 成功时resolve |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | reject(res.data.Message); // 失败时reject |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(res); // 失败时reject |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 获取生产资源列表 |
| | | getSourceList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/api/newBill/getSourceList', |
| | | data: { |
| | | sWhere: "" |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.code == 1) { |
| | | this.HSourceNameList = res.data.data.Gy_Source |
| | | for (var i = 0; i < res.data.data.Gy_Source.length; i++) { |
| | | this.arrayHSourceName[i] = res.data.data.Gy_Source[i].生产资源 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | // 获取生产资源列表 |
| | | getSourceList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/api/newBill/getSourceList', |
| | | data: { |
| | | sWhere: "" |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.code == 1) { |
| | | this.HSourceNameList = res.data.data.Gy_Source |
| | | for (var i = 0; i < res.data.data.Gy_Source.length; i++) { |
| | | this.arrayHSourceName[i] = res.data.data.Gy_Source[i].生产资源 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取生产资源列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 获取工作中心列表 |
| | | getCenterList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/api/newBill/getWorkCenterList', |
| | | data: { |
| | | sWhere: "" |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.code == 1) { |
| | | this.HCenterNameList = res.data.data.Gy_WorkCenter |
| | | for (var i = 0; i < res.data.data.Gy_WorkCenter.length; i++) { |
| | | this.arrayHCenterName[i] = res.data.data.Gy_WorkCenter[i].工作中心 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取车间列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取车间列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | // 获取工作中心列表 |
| | | getCenterList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/api/newBill/getWorkCenterList', |
| | | data: { |
| | | sWhere: "" |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.code == 1) { |
| | | this.HCenterNameList = res.data.data.Gy_WorkCenter |
| | | for (var i = 0; i < res.data.data.Gy_WorkCenter.length; i++) { |
| | | this.arrayHCenterName[i] = res.data.data.Gy_WorkCenter[i].工作中心 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取车间列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取车间列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 获取生产班次列表 |
| | | getShiftsList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HShiftsNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHShiftsName[i] = res.data.data[i].班次名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取生产班次列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取生产班次列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | //新增 |
| | | getMaxNum() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetMAXNum', |
| | | data: { |
| | | HBillType: '4502' |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.hform.HInterID = res.data.data[0].HInterID |
| | | this.hform.HBillNo = res.data.data[0].HBillNo |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //报工台跳转 |
| | | set_Sc_ICMOBillStatus(HSourceBill, HType, HSourceName) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_Sc_ICMOBillStatus', |
| | | type: "GET", |
| | | data: { |
| | | "HSourceBill": HSourceBill |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.hform.HMaterNumber = res.data.data[0].物料代码 //产品名称 |
| | | this.hform.HMaterName = res.data.data[0].物料名称 //产品名称 |
| | | this.hform.HMaterModel = res.data.data[0].规格型号 //产品规格 |
| | | this.hform.HMainSourceBillNo = res.data.data[0].流转卡号 //源单单号 |
| | | this.hform.HMainSourceInterID = res.data.data[0].流转卡主内码 //源单主内码 |
| | | this.hform.HMainSourceEntryID = res.data.data[0].流转卡子内码 //源单子内码 |
| | | this.hform.HMainSourceBillType = 3772 //源单类型 |
| | | this.hform.HQty = res.data.data[0].计划数量 //计划数量 |
| | | this.hform.HSourceID = res.data.data[0].HSourceID //生产资源id |
| | | this.hform.HSourceName = res.data.data[0].生产资源 //生产资源 |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_ErrMsgBackType', |
| | | type: "GET", |
| | | data: { |
| | | "TypeName": HType |
| | | }, |
| | | success: (res) => { |
| | | var data = res.data.data[0] |
| | | if (res.data.count == 1) { |
| | | this.hform.HErrMsgBackTypeID = data.HItemID |
| | | this.hform.HErrMsgBackTypeName = data.HName |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取异常类型数据失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取异常类型失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/set_EquipFile', |
| | | type: "GET", |
| | | data: { |
| | | "HSourceName": HSourceName |
| | | }, |
| | | success: (res) => { |
| | | var data = res.data.data[0] |
| | | console.log(res.data) |
| | | if (res.data.count == 1) { |
| | | this.hform.EquipNumber = data.设备编码 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取设备编码失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取设备编码失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | // 获取生产班次列表 |
| | | getShiftsList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HShiftsNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHShiftsName[i] = res.data.data[i].班次名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | resolve(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取生产班次列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取生产班次列表失败', |
| | | icon: 'none' |
| | | }) |
| | | reject(); |
| | | }, |
| | | }); |
| | | }); |
| | | }, |
| | | //新增 |
| | | getMaxNum() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetMAXNum', |
| | | data: { |
| | | HBillType: '4502' |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.hform.HInterID = res.data.data[0].HInterID |
| | | this.hform.HBillNo = res.data.data[0].HBillNo |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //报工台跳转 |
| | | set_Sc_ICMOBillStatus(HSourceBill, HType, HSourceName) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_Sc_ICMOBillStatus', |
| | | type: "GET", |
| | | data: { |
| | | "HSourceBill": HSourceBill |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.hform.HMaterNumber = res.data.data[0].物料代码 //产品名称 |
| | | this.hform.HMaterName = res.data.data[0].物料名称 //产品名称 |
| | | this.hform.HMaterModel = res.data.data[0].规格型号 //产品规格 |
| | | this.hform.HMainSourceBillNo = res.data.data[0].流转卡号 //源单单号 |
| | | this.hform.HMainSourceInterID = res.data.data[0].流转卡主内码 //源单主内码 |
| | | this.hform.HMainSourceEntryID = res.data.data[0].流转卡子内码 //源单子内码 |
| | | this.hform.HMainSourceBillType = 3772 //源单类型 |
| | | this.hform.HQty = res.data.data[0].计划数量 //计划数量 |
| | | this.hform.HSourceID = res.data.data[0].HSourceID //生产资源id |
| | | this.hform.HSourceName = res.data.data[0].生产资源 //生产资源 |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_ErrMsgBackType', |
| | | type: "GET", |
| | | data: { |
| | | "TypeName": HType |
| | | }, |
| | | success: (res) => { |
| | | var data = res.data.data[0] |
| | | if (res.data.count == 1) { |
| | | this.hform.HErrMsgBackTypeID = data.HItemID |
| | | this.hform.HErrMsgBackTypeName = data.HName |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取异常类型数据失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取异常类型失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/set_EquipFile', |
| | | type: "GET", |
| | | data: { |
| | | "HSourceName": HSourceName |
| | | }, |
| | | success: (res) => { |
| | | var data = res.data.data[0] |
| | | console.log(res.data) |
| | | if (res.data.count == 1) { |
| | | this.hform.EquipNumber = data.设备编码 |
| | | |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | this.hform.HDescription = '异常反馈单号:' + this.hform.HBillNo + ',异常类型:' + HType + ',订单号:' + this |
| | | .eData.HICMOBillNo + ',流转卡号:' + this.eData.HICMOBillNo + |
| | | ', 产品编码:' + this.hform.HMaterNumber + ',产品名称:' + this.hform.HMaterName + ',规格型号:' + this |
| | | .hform.HMaterModel + |
| | | ',发送人:' + this.hform.HMaker + ',发生时间:' + this.hform.HDate + ',生产资源:' + this.hform |
| | | .HSourceName + ',设备编码:' + this.hform.EquipNumber + ',对应处理人:' + this.hform.HHandleEmpName |
| | | }, 1000) |
| | | }, |
| | | //编辑 |
| | | getEditData(HInterID) { |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | }); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_TransFerBillListCheckDetaiL_APP', |
| | | data: { |
| | | "HID": HInterID |
| | | }, |
| | | success: (res) => { |
| | | uni.hideLoading(); |
| | | console.log('编辑数据:', res); |
| | | if (res.data.code == 1) { |
| | | const data = res.data.data.OA_ErrMsgBackBillMain[0]; |
| | | this.getEquipBindingEmpInfo() |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取设备编码失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取设备编码失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | |
| | | // 映射字段到 Vue 中的 hform |
| | | this.hform = { |
| | | ...this.hform, // 保留原有的默认值 |
| | | HInterID: data.HInterID, |
| | | HEntryID: data.HEntryID || '', |
| | | HBillNo: data.HBillNo || '', |
| | | HDate: data.HDate ? data.HDate.substr(0, 10) : dayjs(new Date()).format( |
| | | "YYYY-MM-DD"), |
| | | HErrMsgBackTypeName: data.HErrMsgBackTypeName || '', |
| | | HErrMsgBackTypeID: data.HErrMsgBackTypeID || '0', |
| | | HContext: data.HContext || '', |
| | | HSendMan: data.HSendMan || '', |
| | | HDeptID: data.HDeptID || '0', |
| | | HDeptName: data.HDeptName || '', |
| | | HRecDeptID: data.HRecDeptID || '0', |
| | | HRecDeptName: data.HRecDeptName || '', |
| | | HCenterID: data.HCenterID || '0', |
| | | HCenterName: data.HCenterName || '', |
| | | HReceiveMan: data.HReceiveMan || '', |
| | | HCopyMan: data.HCopyMan || '', |
| | | HMainSourceInterID: data.HSourceInterID || '0', |
| | | HMainSourceEntryID: data.HSourceEntryID || '0', |
| | | HMainSourceBillNo: data.HSourceBillNo || '', |
| | | HMainSourceBillType: data.HSourceBillType || '', |
| | | HHasten: data.HHasten || 0, |
| | | HMaterNumber: data.HMaterNumber || '', |
| | | HMaterName: data.HMaterName || '', |
| | | HHandleEmpID: data.HHandleEmpID || '0', |
| | | HHandleEmpName: data.HHandleEmpName || '', |
| | | HMaterModel: data.HMaterModel || '', |
| | | HQty: data.HQty || 0, |
| | | HForm: data.HForm || '人', |
| | | HChangeNote: data.HChangeNote || '', |
| | | HNote: data.HNote || '', |
| | | HBadProcMan: data.HBadProcMan || '0', |
| | | HBadProcManName: data.HBadProcManName || '', |
| | | HQEMan: data.HQEMan || '0', |
| | | HQEManName: data.HQEManName || '', |
| | | HSourceID: data.HSourceID || '0', |
| | | HSourceName: data.HSourceName || '', |
| | | HShiftsID: data.HShiftsID || '0', |
| | | HShiftsName: data.HShiftsName || '', |
| | | HDescription: data.HDescription || '', |
| | | HRemark: data.HRemark || '', |
| | | HLevel: data.HLevel || '普通', |
| | | HSendType: data.HSendType || '公共', |
| | | HErrLev: data.HErrLev || '', |
| | | HMaker: data.HMaker || userInfo.Czymc || '', |
| | | HMakeDate: data.HMakeDate ? data.HMakeDate.substr(0, 10) : dayjs( |
| | | new Date()).format("YYYY-MM-DD"), |
| | | HUpDater: uni.getStorageSync('HUserName') || userInfo.Czymc || '', |
| | | HUpDateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HChecker: data.HChecker || '', |
| | | HCheckDate: data.HCheckDate ? data.HCheckDate.substr(0, 10) : '', |
| | | HCloseMan: data.HCloseMan || '', |
| | | HCloseDate: data.HCloseDate ? data.HCloseDate.substr(0, 10) : '', |
| | | HDeleteMan: data.HDeleteMan || '', |
| | | HDeleteDate: data.HDeleteDate ? data.HDeleteDate.substr(0, 10) : '', |
| | | }; |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | }, 1000) |
| | | }, |
| | | async getEquipBindingEmpInfo() { |
| | | // 获取设备绑定职员信息 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/getEquipBindingEmp", |
| | | data: { |
| | | HEquipNumber: this.hform.EquipNumber |
| | | } |
| | | }) |
| | | |
| | | // 设置制单人信息(如果为空则使用当前用户) |
| | | if (!this.hform.HMaker) { |
| | | this.hform.HMaker = getUserInfo().Czymc; |
| | | } |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | let data0 = data[0] |
| | | this.HReceiveManChange(data0["HMouldEmpName"]) |
| | | this.HHandleEmpNameChange(data0["HMouldManagerName"]) |
| | | this.HBadProcManNameChange(data0["HEquipUseEmpName"]) |
| | | this.hform.HReceiveMan = data0["HMouldEmpName"] |
| | | this.hform.HHandleEmpName = data0["HMouldManagerName"] |
| | | this.hform.HHandleEmpID = data0["HMouldManagerID"] |
| | | this.hform.HBadProcMan = data0["HEquipUseEmpID"] |
| | | this.hform.HBadProcManName = data0["HEquipUseEmpName"] |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取设备绑定职员信息异常: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取设备绑定职员信息异常: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | //编辑 |
| | | getEditData(HInterID) { |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | }); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_TransFerBillListCheckDetaiL_APP', |
| | | data: { |
| | | "HID": HInterID |
| | | }, |
| | | success: (res) => { |
| | | uni.hideLoading(); |
| | | console.log('编辑数据:', res); |
| | | if (res.data.code == 1) { |
| | | const data = res.data.data.OA_ErrMsgBackBillMain[0]; |
| | | |
| | | // 设置修改人信息 |
| | | if (!this.hform.HUpDater) { |
| | | this.hform.HUpDater = uni.getStorageSync('HUserName') || ''; |
| | | } |
| | | // 映射字段到 Vue 中的 hform |
| | | this.hform = { |
| | | ...this.hform, // 保留原有的默认值 |
| | | HInterID: data.HInterID, |
| | | HEntryID: data.HEntryID || '', |
| | | HBillNo: data.HBillNo || '', |
| | | HDate: data.HDate ? data.HDate.substr(0, 10) : dayjs(new Date()).format( |
| | | "YYYY-MM-DD"), |
| | | HErrMsgBackTypeName: data.HErrMsgBackTypeName || '', |
| | | HErrMsgBackTypeID: data.HErrMsgBackTypeID || '0', |
| | | HContext: data.HContext || '', |
| | | HSendMan: data.HSendMan || '', |
| | | HDeptID: data.HDeptID || '0', |
| | | HDeptName: data.HDeptName || '', |
| | | HRecDeptID: data.HRecDeptID || '0', |
| | | HRecDeptName: data.HRecDeptName || '', |
| | | HCenterID: data.HCenterID || '0', |
| | | HCenterName: data.HCenterName || '', |
| | | HReceiveMan: data.HReceiveMan || '', |
| | | HCopyMan: data.HCopyMan || '', |
| | | HMainSourceInterID: data.HSourceInterID || '0', |
| | | HMainSourceEntryID: data.HSourceEntryID || '0', |
| | | HMainSourceBillNo: data.HSourceBillNo || '', |
| | | HMainSourceBillType: data.HSourceBillType || '', |
| | | HHasten: data.HHasten || 0, |
| | | HMaterNumber: data.HMaterNumber || '', |
| | | HMaterName: data.HMaterName || '', |
| | | HHandleEmpID: data.HHandleEmpID || '0', |
| | | HHandleEmpName: data.HHandleEmpName || '', |
| | | HMaterModel: data.HMaterModel || '', |
| | | HQty: data.HQty || 0, |
| | | HForm: data.HForm || '人', |
| | | HChangeNote: data.HChangeNote || '', |
| | | HNote: data.HNote || '', |
| | | HBadProcMan: data.HBadProcMan || '0', |
| | | HBadProcManName: data.HBadProcManName || '', |
| | | HQEMan: data.HQEMan || '0', |
| | | HQEManName: data.HQEManName || '', |
| | | HSourceID: data.HSourceID || '0', |
| | | HSourceName: data.HSourceName || '', |
| | | HShiftsID: data.HShiftsID || '0', |
| | | HShiftsName: data.HShiftsName || '', |
| | | HDescription: data.HDescription || '', |
| | | HRemark: data.HRemark || '', |
| | | HLevel: data.HLevel || '普通', |
| | | HSendType: data.HSendType || '公共', |
| | | HErrLev: data.HErrLev || '', |
| | | HMaker: data.HMaker || userInfo.Czymc || '', |
| | | HMakeDate: data.HMakeDate ? data.HMakeDate.substr(0, 10) : dayjs( |
| | | new Date()).format("YYYY-MM-DD"), |
| | | HUpDater: uni.getStorageSync('HUserName') || userInfo.Czymc || '', |
| | | HUpDateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HChecker: data.HChecker || '', |
| | | HCheckDate: data.HCheckDate ? data.HCheckDate.substr(0, 10) : '', |
| | | HCloseMan: data.HCloseMan || '', |
| | | HCloseDate: data.HCloseDate ? data.HCloseDate.substr(0, 10) : '', |
| | | HDeleteMan: data.HDeleteMan || '', |
| | | HDeleteDate: data.HDeleteDate ? data.HDeleteDate.substr(0, 10) : '', |
| | | }; |
| | | |
| | | // 设置其他字段(如果需要在界面上显示) |
| | | if (this.hform.HMainSourceBillNo) { |
| | | this.hform.HPlanBillNo = this.hform.HMainSourceBillNo; |
| | | this.hform.HBillTypeName = this.hform.HMainSourceBillType; |
| | | } |
| | | // 设置制单人信息(如果为空则使用当前用户) |
| | | if (!this.hform.HMaker) { |
| | | this.hform.HMaker = getUserInfo().Czymc; |
| | | } |
| | | |
| | | this.isEdit = true; |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.msg || '获取编辑数据失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | uni.hideLoading(); |
| | | console.log('编辑数据请求失败:', res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | //保存 |
| | | submit() { |
| | | if (!this.hform.HReceiveMan) { |
| | | uni.showToast({ |
| | | title: '请选择接收人', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | uni.showLoading({ |
| | | title: '请稍候' |
| | | }) |
| | | if (this.OperationType == 1 || this.OperationType == 2 || this.OperationType == 4) { |
| | | this.refSav = "Add"; |
| | | } |
| | | //若为编辑-保存,则更新修改人和修改时间 |
| | | if (this.OperationType == 3) { |
| | | this.refSav = "Update"; |
| | | this.hform.HUpdater = getUserInfo().Czymc; |
| | | this.hform.HUpdaterDate = dayjs(new Date()).format("YYYY-MM-DD"); |
| | | } |
| | | var sMainStr = JSON.stringify(this.hform); |
| | | var sMainSub = sMainStr + ';' + uni.getStorageSync('HUserName') + ';' + this.refSav |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/SaveGetMESTransFerWorkFrom_APP', |
| | | method: 'POST', |
| | | dataType: "json", |
| | | data: { |
| | | "msg": sMainSub |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | uni.hideLoading() |
| | | if (res.data.count == 1) { |
| | | if (res.data.Verify == "Y") { //自动审核 |
| | | this.SaveVerify(res.data.HInterID) //审核 |
| | | } else { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | }, |
| | | // 设置修改人信息 |
| | | if (!this.hform.HUpDater) { |
| | | this.hform.HUpDater = uni.getStorageSync('HUserName') || ''; |
| | | } |
| | | |
| | | SaveVerify(HInterID) { |
| | | var datas = { |
| | | HInterID: HInterID, |
| | | IsAudit: 0, |
| | | CurUserName: getUserInfo().Czymc |
| | | } |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/AuditTransFerReportList', |
| | | method: 'GET', |
| | | dataType: "json", |
| | | async: true, |
| | | data: datas, |
| | | success: (res) => { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | // 设置其他字段(如果需要在界面上显示) |
| | | if (this.hform.HMainSourceBillNo) { |
| | | this.hform.HPlanBillNo = this.hform.HMainSourceBillNo; |
| | | this.hform.HBillTypeName = this.hform.HMainSourceBillType; |
| | | } |
| | | |
| | | goBack() { |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | } |
| | | this.isEdit = true; |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.msg || '获取编辑数据失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | uni.hideLoading(); |
| | | console.log('编辑数据请求失败:', res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | //保存 |
| | | submit() { |
| | | if (!this.hform.HReceiveMan) { |
| | | uni.showToast({ |
| | | title: '请选择接收人', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | this.hform.HDescription = this.dynamicDesc |
| | | uni.showLoading({ |
| | | title: '请稍候' |
| | | }) |
| | | if (this.OperationType == 1 || this.OperationType == 2 || this.OperationType == 4) { |
| | | this.refSav = "Add"; |
| | | } |
| | | //若为编辑-保存,则更新修改人和修改时间 |
| | | if (this.OperationType == 3) { |
| | | this.refSav = "Update"; |
| | | this.hform.HUpdater = getUserInfo().Czymc; |
| | | this.hform.HUpdaterDate = dayjs(new Date()).format("YYYY-MM-DD"); |
| | | } |
| | | var sMainStr = JSON.stringify(this.hform); |
| | | var sMainSub = sMainStr + ';' + uni.getStorageSync('HUserName') + ';' + this.refSav |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/SaveGetMESTransFerWorkFrom_APP', |
| | | method: 'POST', |
| | | dataType: "json", |
| | | data: { |
| | | "msg": sMainSub |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | uni.hideLoading() |
| | | if (res.data.count == 1) { |
| | | if (res.data.Verify == "Y") { //自动审核 |
| | | this.SaveVerify(res.data.HInterID) //审核 |
| | | } else { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | SaveVerify(HInterID) { |
| | | var datas = { |
| | | HInterID: HInterID, |
| | | IsAudit: 0, |
| | | CurUserName: getUserInfo().Czymc |
| | | } |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/AuditTransFerReportList', |
| | | method: 'GET', |
| | | dataType: "json", |
| | | async: true, |
| | | data: datas, |
| | | success: (res) => { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | | goBack() { |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |