Commit fc472f15 by 张立顺

fix 线上保存bug修复

1 parent 0566cf46
......@@ -3,30 +3,37 @@
<div class="info">
<div class="global-title">{{ routeInfo.type == 1 ? '新增' : routeInfo.type == 2 ? '查看' : '编辑' }}延保项目</div>
<div class="main-wrap">
<glsx-combi-form ref="serviceForm" labelWidth="154px" defaultWidth="432px" :isInline="false" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
<glsx-combi-form ref="serviceForm" labelWidth="154px" defaultWidth="432px" :isInline="false"
:formObj.sync="formObj" :formData="formData" :formRules="myRule">
<div slot="powerType">
<el-radio-group :disabled="routeInfo.type == 2" v-model="formObj.powerType">
<el-radio v-for="(item, index) in powerTypeList" :label="index" :key="index">{{ item }}</el-radio>
</el-radio-group>
<el-form-item prop="powerTypeOther" style="margin-bottom: 0px" v-if="formObj.powerType == powerTypeList.length - 1">
<el-input class="wid_432" v-model.trim="formObj.powerTypeOther" :disabled="routeInfo.type == 2" placeholder="请输入自定义动力类型" maxlength="50"></el-input>
<el-form-item prop="powerTypeOther" style="margin-bottom: 0px"
v-if="formObj.powerType == powerTypeList.length - 1">
<el-input class="wid_432" v-model.trim="formObj.powerTypeOther" :disabled="routeInfo.type == 2"
placeholder="请输入自定义动力类型" maxlength="50"></el-input>
</el-form-item>
</div>
<div slot="supportPosition">
<el-radio-group :disabled="routeInfo.type == 2" v-model="formObj.supportPosition">
<el-radio v-for="(item, index) in supportPositionList" :label="index" :key="index">{{ item }}</el-radio>
</el-radio-group>
<el-form-item prop="supportPositionOther" style="margin-bottom: 0px" v-if="formObj.supportPosition == supportPositionList.length - 1">
<el-input class="wid_432" v-model="formObj.supportPositionOther" :disabled="routeInfo.type == 2" placeholder="请输入自定义保障部件" maxlength="50"></el-input>
<el-form-item prop="supportPositionOther" style="margin-bottom: 0px"
v-if="formObj.supportPosition == supportPositionList.length - 1">
<el-input class="wid_432" v-model="formObj.supportPositionOther" :disabled="routeInfo.type == 2"
placeholder="请输入自定义保障部件" maxlength="50"></el-input>
</el-form-item>
</div>
<div slot="contractList">
<el-button icon="el-icon-plus" :disabled="routeInfo.type == 2" @click="addContract">选中合同</el-button>
<div class="table-wrap">
<GLTable :hasPage="false" :hasNum="false" :tableData="formObj.contractList" :tableParams="contractTableParams">
<GLTable :hasPage="false" :hasNum="false" :tableData="formObj.contractList"
:tableParams="contractTableParams">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button type="text" size="small" @click="handlePreview(scope.scope)">预览</el-button>
<el-button type="text" size="small" :disabled="routeInfo.type == 2" @click="handleDelete(scope.scope, scope.index)">删除</el-button>
<el-button type="text" size="small" :disabled="routeInfo.type == 2"
@click="handleDelete(scope.scope, scope.index)">删除</el-button>
</div>
</GLTable>
</div>
......@@ -37,7 +44,8 @@
<el-button v-if="routeInfo.type != 2" type="text" @click="handleSKuEdit">规格组合管理</el-button>
</div>
<div class="speci-box" id="specificationDetailList">
<multipleSpecificationForm ref="multipleSpecificationFormRef" :route-info="routeInfo"></multipleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" :route-info="routeInfo">
</multipleSpecificationForm>
</div>
</div>
</glsx-combi-form>
......@@ -47,7 +55,8 @@
<el-button @click="jumpListPage">取消</el-button>
<el-button v-if="routeInfo.type != 2" type="primary" @click="commit">提交</el-button>
</div>
<contract-dialog v-if="contractObj.visible" @closeDialog="closeContractDialog" @confirm="confirmContractDialog" :contractObj="contractObj"></contract-dialog>
<contract-dialog v-if="contractObj.visible" @closeDialog="closeContractDialog" @confirm="confirmContractDialog"
:contractObj="contractObj"></contract-dialog>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
</div>
</template>
......@@ -469,7 +478,7 @@ export default {
goodsSpecificationList: goodsSpecificationList
}
console.log(params, 'params')
if (params?.goodsSpecificationList?.length > 75) {
if (params?.goodsSpecificationList?.length > 200) {
return this.$message({
type: 'warning',
message: '商品数量过多,无法操作,请确认后重新保存'
......@@ -501,6 +510,7 @@ export default {
}
// return
let skuData = this.handleAddConfirm(this.goodsInfoData, 2)
if (!skuData) return false // 校验不通过
params = {
...params,
specificationConfigList: skuData.goodsSpecificationList,
......@@ -530,48 +540,61 @@ export default {
<style lang="scss" scoped>
.info {
background: #ffffff;
.main-wrap {
padding: 32px 20px;
.wid_432 {
width: 432px;
display: block;
}
.services-table {
margin-top: 20px;
&:first-child {
margin-top: 0;
}
}
.add-btn {
display: inline-block;
color: #5850ff;
cursor: pointer;
i {
font-size: 20px;
vertical-align: middle;
}
}
.table-wrap {
width: 591px;
margin-top: 10px;
.table-btns {
display: flex;
/deep/ .el-button {
padding: 0;
}
/deep/ .el-button + .el-button {
/deep/ .el-button+.el-button {
margin-left: 10px;
}
}
}
/deep/ .el-radio-group {
line-height: 32px;
.el-radio {
vertical-align: middle;
}
}
}
}
.skuContent {
.add-btns {
display: flex;
......@@ -615,10 +638,12 @@ export default {
}
}
}
.footer-btn {
text-align: center;
margin-top: 16px;
}
/deep/ .el-radio__original {
display: none !important;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!