Some Script(Set A Submit Button)

        //2006.9.10  Set A Submit Button
        public static void SetSubmitButton(System.Web.UI.Page page, Control control)
        {
            StringBuilder builder = new StringBuilder();
            builder.Append("<script language='javascript'>");
            builder.Append("function document.onkeydown()");
            builder.Append("{");
            builder.Append("if(event.keyCode==13)");
            builder.Append("{");
            builder.Append("var btn=document.getElementById('" + control.ClientID + "');");
            builder.Append("if(btn!=event.srcElement)");
            builder.Append("{");
            builder.Append("btn.click();");
            builder.Append("return false;");
            builder.Append("}");
            builder.Append("}");
            builder.Append("}");
            builder.Append("</script>");
            page.Response.Write(builder.ToString());
        } 
提交当前step之后为什么无法点击addruncard按钮继续添加? <a-card style="margin-top: 20px"> <!-- <a-row> <a-col :span="24" style="text-align: right"> <a-button icon="edit" @click="addRunCard" :disabled="StepForms.length >= 10 || !canAddStep">Add RunCard Step </a-button> </a-col> </a-row> --> <template #title> <div style="display: flex; justify-content: space-between; width: 100%; align-items: center;">{{canAddStep}} <span style="font-weight: 600;">RunCard Step Information</span> <a-button icon="plus" type="primary" size="small" @click.stop="addRunCard" :disabled="!canAddStep || StepForms.length >= 10"> Add RunCard Step </a-button> </div> </template> <!-- 动态渲染 Run Card 表单块 --> <div v-if="StepForms.length"> <div v-for="(step, index) in this.StepForms" :key="index"> <!-- ✅ 在每个步骤外包裹 <a-form-model> --> <a-form-model :model="step"> <a-card style="margin-top: 10px">{{step}} <!-- 自定义标题栏:包含标题和折叠按钮 --> <template #title> <div style="display: flex; justify-content: space-between; width: 100%; align-items: center;"> <span>Run Card Step {{ index + 1 }}</span> <a-button size="small" type="text" @click.stop="toggleCollapse(index)" :icon="step.isCollapsed ? 'plus' : 'minus'"> {{ step.isCollapsed ? 'Expand' : 'Collapse' }} </a-button> </div> </template> <div v-show="!step.isCollapsed"> <a-row> <a-col :span="12"> <a-form-model-item :prop="'StepForms.' + index + '.fabName'" label="Fab Area:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12, offset: 2 }" :required='required'> <a-select placeholder="请选择" v-model="step.fabName" style="width: 100%" :disabled="step.isSubmitted" @change="(value) => handleFabNameChange(value, step)"> <a-select-option v-for="item in StepFabAreaList" :key="item">{{ item }}</a-select-option> </a-select> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.area'" label="Area:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12, offset: 2 }" :required='required'> <a-select placeholder="请选择" v-model="step.area" style="width: 100%" :disabled="step.isSubmitted"> <a-select-option v-for="item in StepAreaList" :key="item">{{ item }}</a-select-option> </a-select> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="16"> <a-form-model-item prop="'StepForms.' + index + '.stepNo'" label="Reference Step No" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12 }" :required='required'> <div style="display: flex; align-items: center; gap: 8px; white-space: nowrap;"> <a-checkbox :checked="step.noStepNo === 'on'" @change="(e) => handleNoStepNoChange(e, step)" :disabled="step.isSubmitted || step.isstepNoupdate">NA </a-checkbox> <a-input v-model="step.stepNo" placeholder="Enter Step No" :disabled="step.isreadonlyStepNo || step.isSubmitted || step.isstepNoupdate" style="flex: 1; height: 32px;" /> <a-button @click="getStepLotInfo(index)" style="height: 32px;" :disabled="step.isSubmitted || step.isstepNoupdate">Go </a-button> <a-button @click="getfuturestepinfo(index)" style="height: 32px;" :disabled="step.isSubmitted || step.isstepNoupdate"> ViewFutureStep</a-button> </div> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item label="Check With RCP" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12, offset: 2 }"> <a-checkbox :checked="step.rcp === 'on'" @change="(e) => handleRcpChange(e, step)" :disabled="step.isSubmitted"> </a-checkbox> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.eqpMode'" label="Equipment:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 6, offset: 2 }" :required='required'> <a-select placeholder="请选择" v-model="step.eqpMode" style="width: 100%" :disabled="step.isSubmitted"> <a-select-option v-for="item in StepEqpModeList" :key="item">{{ item }}</a-select-option> </a-select> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.eqpModeName'" label="" :labelCol="{ span: 6 }" :wrapperCol="{ span: 20, offset: 2 }" :required='required'> <div style="display: flex; align-items: center; gap: 8px; Height: 40px;"> <a-input v-model="step.eqpModeName" :disabled="step.isSubmitted" @blur="handleEqpNameBlur(step)" /> <div style="color: red; white-space: nowrap;"> EqpGroup区分大小写,输入的EqpID最大长度7位!!! </div> </div> </a-form-model-item> </a-col> </a-row> <!-- Recipe 字段(根据条件显示) --> <a-row> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.recipe'" label="Recipe:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12, offset: 2 }" :required='required'> <div style="display: flex; align-items: center; gap: 8px; Height: 40px;"> <a-input v-model="step.recipe" :disabled="step.isSubmitted" /> <div style="color: red; white-space: nowrap;"> 区分大小写!!! </div> </div> </a-form-model-item> </a-col> <a-col :span="12" v-if="step.showPhotoFields"> <a-form-model-item prop="'StepForms.' + index + '.reticleId'" label="Reticle ID:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12, offset: 2 }" :required='required'> <a-input v-model="step.reticleId" :disabled="step.isSubmitted" /> </a-form-model-item> </a-col> </a-row> <a-row> <!-- WaferID 显示和弹窗按钮 --> <a-col :span="18"> <a-form-model-item prop="'StepForms.' + index + '.waferId'" label="WaferID" :labelCol="{ span: 3 }" :wrapperCol="{ span: 15 }" :required='required'> <a-input :value="step.waferId" placeholder="请选择 WaferID" @click="() => openWaferModal(index)" read-only style="cursor: pointer" :disabled="step.isSubmitted" /> </a-form-model-item> </a-col> <!-- QTY 数量显示 --> <a-col :span="6"> <a-form-model-item prop="'StepForms.' + index + '.waferIdQty'" label="QTY" :labelCol="{ span: 3 }" :wrapperCol="{ span: 3 }"> <a-input :value="step.waferIdQty.toString()" read-only :disabled="step.isSubmitted" /> </a-form-model-item> </a-col> </a-row> <a-row> <!-- MeasWaferID 显示和弹窗按钮 --> <a-col :span="18"> <a-form-model-item prop="'StepForms.' + index + '.slotId'" label="MeasSlotId" :labelCol="{ span: 3 }" :wrapperCol="{ span: 15 }"> <a-input :value="step.slotId" placeholder="请选择量测 WaferID" @click="() => openMeasWaferModal(index)" read-only style="cursor: pointer" :disabled="step.isSubmitted" /> </a-form-model-item> </a-col> <!-- MeasWaferIDQTY 数量显示 --> <a-col :span="6"> <a-form-model-item prop="'StepForms.' + index + '.slotIdQty'" label="QTY" :labelCol="{ span: 3 }" :wrapperCol="{ span: 3 }"> <a-input :value="step.slotIdQty.toString()" read-only :disabled="step.isSubmitted" /> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.contaminationFlag'" label="ContaminationFlag:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12, offset: 2 }" :required='required'> <a-select placeholder="请选择" v-model="step.contaminationFlag" style="width: 100%" :disabled="step.isSubmitted"> <a-select-option v-for="item in contaminationFlagList" :key="item">{{ item }} </a-select-option> </a-select> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.ecdPlanName'" label="EDC Plan Name:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 16 }"> <div style="display: flex; align-items: center; gap: 8px; height: 40px;"> <a-input v-model="step.ecdPlanName" placeholder="Enter EDC PlanName" :disabled="step.isSubmitted" /> <a-button @click="getEdcPlanSpecInfomation(index)" :disabled="step.isSubmitted">Go</a-button> </div> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.remark'" label="Remark:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 16 }" :required='required'> <template #help> <span style="color: red;">如果输入中文,Runcard只能Manual Run!!!</span> </template> <a-textarea v-model="step.remark" placeholder="150字符内..." :rows="3" :disabled="step.isSubmitted" /> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item prop="'StepForms.' + index + '.spec'" label="量测规格SPEC:" :labelCol="{ span: 6 }" :wrapperCol="{ span: 16 }"> <a-textarea v-model="step.spec" read-only style="overflow: auto; white-space: nowrap;" :row="4" /> </a-form-model-item> </a-col> </a-row> <!-- Qtime 展示区域 --> <div v-if="step.stepQtimeEnds && step.stepQtimeEnds.length > 0"> <a-card style="margin-top: 20px" title="StepEnd Qtime Information">{{step.stepQtimeEnds}} <a-table :dataSource="step.stepQtimeEnds" :columns="StepQtimeStrEndColumns" :pagination="false" :rowKey="record => record.id || Math.random()" bordered> <!-- 注意这里使用 { record, index } 解构 --> <template #handleMode="record, index"> <a-select :value="index.handleMode" @change="(value) => onStepHandleModeChange(index, value, step)" style="width: 120px"> <a-select-option value="NULL">NULL</a-select-option> <a-select-option value="Mapping">Mapping</a-select-option> </a-select> </template> </a-table> </a-card> </div> <!-- Qtime 展示区域 --> <div v-if="step.stepQtimes && step.stepQtimes.length > 0"> <a-card style="margin-top: 20px" title="StepStr Qtime Information">{{step.stepQtimes}} <a-table :dataSource="StepForms[index].stepQtimes" :columns="StepQtimeStrColumns" :pagination="false" :rowKey="record => record.id || Math.random()" bordered> </a-table> </a-card> </div> <a-row> <a-col :span="24"> <a-form-model-item label="" :labelCol="{ span: 6 }" :wrapperCol="{ span: 12, offset: 10 }"> <a-button @click="updatestepinfo(index)">Update</a-button> <a-button @click="deletestepinfo(index)">Delete</a-button> <a-button @click="submitstepinfo(index)" :disabled="step.isSubmitted">Submit</a-button> </a-form-model-item> </a-col> </a-row> </div> </a-card> </a-form-model> </div> </div> </a-card>
最新发布
12-20
<template> <!-- 编辑流量计 --> <div class="edit-flow-meter"> <myModal :params="{ title: '编辑流量计' }" :visible="visible" @submit="submit" @cancel="handleCancel"> <template v-slot:header> <span></span> </template> <template v-slot:body> <div class="edit-flow-meter-box"> <a-form-model ref="baseInfoForm" :model="formData" :rules="rules" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" > <h4 style="margin: 16px 0; text-align: left">{{ $t('基础信息') }}</h4> <a-row> <a-col :span="12"> <a-form-model-item :label="$t('探测器名称')" prop="detectorName"> <a-input v-model="formData.detectorName" disabled /> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item :label="$t('探测器编号')" prop="uniqueCode"> <a-input v-model="formData.uniqueCode" disabled /> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item :label="$t('流量计编号')" prop="meterCode"> <a-input v-model="formData.meterCode" disabled /> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item :label="$t('接入时间')" prop="rate"> <a-date-picker v-model="formData.rate" show-time format="YYYY-MM-DD HH:mm:ss" :placeholder="$t('请选择接入时间')" /> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item :label="$t('归属')" prop="belonging"> <a-input v-model="formData.belonging" disabled /> </a-form-model-item> </a-col> </a-row> <div class="table-title-box"> <h4 style="margin: 0">{{ $t('子流量计列表') }}</h4> <div style="display: flex"> <a-button class="mgr10" type="primary" @click="onAdd">{{ $t('新增') }}</a-button> <a-popconfirm :title="$t('是否确认删除?')" :ok-text="$t('确定')" :cancel-text="$t('取消')" :visible="popconfirmVisible" @visibleChange="popconfirmVisibleChange" @confirm="onDeleteAll" > <a-button>{{ $t('删除') }}</a-button> </a-popconfirm> </div> </div> <div class="table-main-box"> <a-table :dataSource="tableData" :rowSelection="rowSelection" rowKey="id" :columns="columns" :pagination="false" size="small" > <template slot="meterCode" slot-scope="text, record, index"> <template v-if="text">{{ text }}</template> <template v-else> <a-select v-model="tableData[index].meterCode" :filterOption="filterOption" @change="value => changeMemterCode(value, index)" :placeholder="$t('请选择')" showSearch :allowClear="false" > <a-select-option v-for="item in disabledOptions" :key="item.id" :value="item.meterCode" :title="item.meterCode" :disabled="item.disabled" > {{ item.meterCode }} </a-select-option> </a-select> </template> </template> <template slot="action" slot-scope="text, record"> <a-popconfirm placement="topRight" :title="$t('是否确认删除?')" :ok-text="$t('确定')" :cancel-text="$t('取消')" @confirm="onDelete(record)" > <i class="ico-delete myIcon" :title="$t('删除')"></i> </a-popconfirm> </template> </a-table> </div> </a-form-model> </div> </template> </myModal> </div> </template> <script> import factory from '../factory'; import myModal from '@/components/scfComponents/modalComponents/modal.vue'; export default { components: { myModal }, data() { return { visible: false, formData: {}, rules: { taskName: [ { required: true, message: '请输入任务名称', trigger: 'blur' }, // { pattern: reg.name, message: this.$t('仅允许输入汉字、字母、数字与_-.@字符') }, ], }, columns: [ { title: this.$t('序号'), key: 'index', dataIndex: 'index', customRender: (text, record, index) => `${index + 1}`, }, { title: this.$t('子电表编号'), dataIndex: 'meterCode', key: 'meterCode', scopedSlots: { customRender: 'meterCode' }, }, { title: this.$t('操作'), key: 'action', width: 150, dataIndex: 'action', scopedSlots: { customRender: 'action' }, }, ], popconfirmVisible: false, meterOptions: [], selectedRowKeys: [], selectedRows: [], tableData: [], }; }, computed: { disabledOptions() { const usedCodes = this.tableData.map(item => item.meterCode).filter(code => code); return this.meterOptions.map(option => ({ ...option, disabled: usedCodes.includes(option.meterCode), })); }, rowSelection() { return { selectedRowKeys: this.selectedRowKeys, onChange: (selectedRowKeys, selectedRows) => { this.selectedRowKeys = selectedRowKeys; this.selectedRows = selectedRows; }, }; }, }, methods: { // 获取子电表列表 getChildMeterList(detectorCode) { let params = { detectorCodes: [detectorCode], page: 1, pageSize: 99999, }; factory.getChildMeterList(params).then(res => { if (res.success) { this.meterOptions = res.data.pageData || []; } }); }, showModal(record) { this.getChildMeterList(record.detectorCode); this.visible = true; }, filterOption(input, option) { return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; }, changeMemterCode(value, index) { const selectedOption = this.meterOptions.find(el => el.meterCode === value); if (selectedOption) { this.$set(this.tableData, index, { ...this.tableData[index], detectorCode: selectedOption.detectorCode, meterCode: value, }); } // let checkOption = this.meterOptions.find(el => el.meterCode === value); // this.tableData.forEach(item => { // if (item.meterCode === checkOption.meterCode) { // item.detectorCode = checkOption.detectorCode; // } // }); // let selectedItems = this.tableData.map(item => item.meterCode).filter(el => el !== null && el !== ''); // this.meterOptions.forEach(el => { // if (selectedItems.includes(el.meterCode)) { // el.disabled = true; // } // }); }, // 批量删除提示框 popconfirmVisibleChange(visible) { if (visible && !this.selectedRowKeys.length) { this.popconfirmVisible = false; this.$message.destroy(); this.$message.warning(this.$t('请选择要删除的信息')); } else { this.popconfirmVisible = visible; } }, // 新增 onAdd() { let isNull = this.tableData.filter(e => e.meterCode === null || e.meterCode === ''); if (isNull.length) { this.$message.destroy(); return this.$message.warning(this.$t('请选择子电表编号')); } this.tableData.push({ id: Math.random().toString().split('.')[1], meterCode: null }); }, onDeleteAll() { if (this.selectedRows.length === 0) { this.$message.destroy(); return this.$message.warning(this.$t('请选择子电表')); } this.tableData = this.tableData.filter(item => !this.selectedRowKeys.includes(item.id)); // 清空选中状态 this.selectedRowKeys = []; this.selectedRows = []; // let codes = this.selectedRows.map(item => item.id); // this.tableData = this.tableData.filter(el => !codes.includes(el.id)); // let selectedItems = this.selectedRows.map(item => item.meterCode).filter(el => el !== null && el !== ''); // this.meterOptions.forEach(el => { // if (selectedItems.includes(el.meterCode)) { // el.disabled = false; // } // }); }, // 单个删除 onDelete(record) { this.tableData = this.tableData.filter(item => item.id !== record.id); // this.tableData = this.tableData.filter(item => item.id !== record.id); // if (record.meterCode) { // this.meterOptions.forEach(el => { // if (record.meterCode.indexOf(el.meterCode) !== -1) { // el.disabled = false; // } // }); // } }, submit() { this.visible = false; }, handleCancel() { this.visible = false; }, }, }; </script> <style lang="less" scoped> .edit-flow-meter-box { width: 100%; height: 100%; .table-title-box { width: 100%; display: flex; margin-bottom: 10px; align-items: center; justify-content: space-between; } } </style> 代码评审
07-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值