import "../../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                             */
/* empty css                                                                    */
/* empty css                                                                         */
/* empty css                                                                */
/* empty css                                                                     */
/* empty css                                                                  */
/* empty css                                                               */
/* empty css                                                                  */
/* empty css                                                                        */
/* empty css                                                                  */
/* empty css                                                                 */
/* empty css                                                                       */
/* empty css                                                                        */
/* empty css                                                                     */
/* empty css                                                                 */
import { getCurrentInstance, computed, ref, createBlock, openBlock, withCtx, createVNode, createTextVNode, createElementBlock, Fragment, renderList } from "vue";
import { getCurrentItem } from "../../utils/common.mjs";
import "../../utils/eventBus.mjs";
import ValueSelector from "../../../components/ValueSelector.vue.mjs";
import api from "../../../api/index.mjs";
import ParamsConfig from "../../../components/ParamsConfig.vue2.mjs";
/* empty css               */
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElCollapse, ElCollapseItem } from "../../../../../node_modules/element-plus/es/components/collapse/index.mjs";
import { ElForm, ElFormItem } from "../../../../../node_modules/element-plus/es/components/form/index.mjs";
import { ElInput } from "../../../../../node_modules/element-plus/es/components/input/index.mjs";
import { ElRadioGroup, ElRadioButton } from "../../../../../node_modules/element-plus/es/components/radio/index.mjs";
import { ElSelect, ElOption } from "../../../../../node_modules/element-plus/es/components/select/index.mjs";
const _sfc_main = {
  __name: "contract",
  setup(__props) {
    const currentInstance = getCurrentInstance();
    const ctx = currentInstance.proxy;
    const currentItem = computed(() => {
      return getCurrentItem();
    });
    const activeName = ref(["common"]);
    const scenarioOptions = ref([]);
    api.getModeNoList4Cont(ctx.$http).then((data) => {
      scenarioOptions.value = data.map((item) => ({
        label: item.modeName,
        value: item.modeNo
      }));
    });
    return (_ctx, _cache) => {
      const _component_el_input = ElInput;
      const _component_el_form_item = ElFormItem;
      const _component_el_radio_button = ElRadioButton;
      const _component_el_radio_group = ElRadioGroup;
      const _component_el_option = ElOption;
      const _component_el_select = ElSelect;
      const _component_el_form = ElForm;
      const _component_el_collapse_item = ElCollapseItem;
      const _component_el_collapse = ElCollapse;
      return openBlock(), createBlock(_component_el_collapse, {
        class: "setting",
        modelValue: activeName.value,
        "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => activeName.value = $event)
      }, {
        default: withCtx(() => [
          createVNode(_component_el_collapse_item, {
            name: "common",
            title: "基本属性"
          }, {
            default: withCtx(() => [
              createVNode(_component_el_form, {
                "label-position": "top",
                "label-width": "auto",
                model: currentItem.value
              }, {
                default: withCtx(() => [
                  createVNode(_component_el_form_item, {
                    label: "标题",
                    required: ""
                  }, {
                    default: withCtx(() => [
                      createVNode(_component_el_input, {
                        modelValue: currentItem.value.label,
                        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentItem.value.label = $event)
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  createVNode(_component_el_form_item, { label: "合同模式" }, {
                    default: withCtx(() => [
                      createVNode(_component_el_radio_group, {
                        modelValue: currentItem.value.mode,
                        "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => currentItem.value.mode = $event),
                        size: "small"
                      }, {
                        default: withCtx(() => [
                          createVNode(_component_el_radio_button, { value: "view" }, {
                            default: withCtx(() => _cache[8] || (_cache[8] = [
                              createTextVNode("合同查看")
                            ])),
                            _: 1
                          }),
                          createVNode(_component_el_radio_button, { value: "make" }, {
                            default: withCtx(() => _cache[9] || (_cache[9] = [
                              createTextVNode("合同制作")
                            ])),
                            _: 1
                          }),
                          createVNode(_component_el_radio_button, { value: "sign" }, {
                            default: withCtx(() => _cache[10] || (_cache[10] = [
                              createTextVNode("合同签署")
                            ])),
                            _: 1
                          })
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  createVNode(_component_el_form_item, {
                    label: "业务主键",
                    required: ""
                  }, {
                    default: withCtx(() => [
                      createVNode(ValueSelector, {
                        modelValue: currentItem.value.busNo,
                        "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => currentItem.value.busNo = $event),
                        multiple: false,
                        size: "default",
                        placeholder: "选择业务主键"
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  createVNode(_component_el_form_item, {
                    label: "合同编号(contNo)",
                    required: ""
                  }, {
                    default: withCtx(() => [
                      createVNode(ValueSelector, {
                        modelValue: currentItem.value.contNo,
                        "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => currentItem.value.contNo = $event),
                        multiple: false,
                        size: "default",
                        placeholder: "选择合同编号"
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  createVNode(_component_el_form_item, { label: "业务场景" }, {
                    default: withCtx(() => [
                      createVNode(_component_el_select, {
                        modelValue: currentItem.value.busSubject,
                        "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => currentItem.value.busSubject = $event),
                        placeholder: "选择业务场景",
                        style: { "width": "100%" },
                        clearable: ""
                      }, {
                        default: withCtx(() => [
                          (openBlock(true), createElementBlock(Fragment, null, renderList(scenarioOptions.value, (scene) => {
                            return openBlock(), createBlock(_component_el_option, {
                              key: scene.value,
                              label: scene.label,
                              value: scene.value
                            }, null, 8, ["label", "value"]);
                          }), 128))
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  createVNode(_component_el_form_item, { label: "合同模板生成方式" }, {
                    default: withCtx(() => [
                      createVNode(_component_el_radio_group, {
                        modelValue: currentItem.value.genType,
                        "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => currentItem.value.genType = $event),
                        size: "small"
                      }, {
                        default: withCtx(() => [
                          createVNode(_component_el_radio_button, { value: "1" }, {
                            default: withCtx(() => _cache[11] || (_cache[11] = [
                              createTextVNode("系统生成")
                            ])),
                            _: 1
                          }),
                          createVNode(_component_el_radio_button, { value: "2" }, {
                            default: withCtx(() => _cache[12] || (_cache[12] = [
                              createTextVNode("手动选择")
                            ])),
                            _: 1
                          })
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  createVNode(_component_el_form_item, { label: "业务参数" }, {
                    default: withCtx(() => [
                      createVNode(ParamsConfig, {
                        modelValue: currentItem.value.params,
                        "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => currentItem.value.params = $event)
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["model"])
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["modelValue"]);
    };
  }
};
const contract = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7ebeb42d"]]);
export {
  contract as default
};
