dev2 #1

Open
panjunjie wants to merge 174 commits from dev2 into main
5 changed files with 74 additions and 38 deletions
Showing only changes of commit b186811571 - Show all commits

View File

@ -24,3 +24,15 @@ export function doDelete(data) {
data,
})
}
//发起签署合同
export function createByFile(data) {
return request({
url: URL.shop.esign.signFlow.createByFile,
method: 'post',
data,
headers: {
'Content-Type': 'application/json' // 明确指定JSON格式
}
})
}

View File

@ -77,7 +77,7 @@
if(res.status==200){
this.$message.success('空白模板创建成功!')
this.visible = false
this.$emit('copySuccess')//
this.$emit('createBlankSuccess')//
}
},
//

View File

@ -78,9 +78,9 @@
</li>
</ul>
<copyTemplate ref="copyTemplateRef"></copyTemplate>
<copyTemplate ref="copyTemplateRef" @copySuccess="handleCopySuccess"></copyTemplate>
<previewTemplate ref="previewTemplateRef"></previewTemplate>
<createBlank ref="blankTemplateRef"></createBlank>
<createBlank ref="blankTemplateRef" @createBlankSuccess="handleCreateSuccess"></createBlank>
</div>
</el-dialog>
</template>
@ -163,37 +163,6 @@ export default {
this.templateList = { records: [] }
}
},
showEditApp(page) {
if (page.tpl_id === 107) {
this.$router.push({
path: '/appTemplate',
query: {
app_id: page.app_id,
tpl_id: page.tpl_id,
app_type: 0,
},
})
} else {
this.$router.push({
path: '/setupshop',
})
}
},
async setThemes(tpl_id, tpl_label, app_id) {
this.$baseConfirm(this.__('确定启用此模板风格?'), null, async () => {
const { msg, status } = await setThemes({
tpl_id: tpl_id,
store_template: tpl_label,
app_id: app_id,
})
if (200 == status) {
this.$baseMessage(msg, 'success')
} else {
this.$baseMessage(msg, 'error')
}
this.getAppPages()
})
},
openCopy(page) {
this.$refs.copyTemplateRef?.open(page)
},
@ -203,6 +172,14 @@ export default {
openPreview(page) {
this.$refs.previewTemplateRef?.open(page)
},
handleCreateSuccess() {
this.$emit('refreshList')
this.visible=false
},
handleCopySuccess() {
this.$emit('refreshList')
this.visible=false
},
}
}
</script>

View File

@ -201,10 +201,10 @@
@size-change="handleSizeChange"
/>
</el-row>
<templateMenu ref="templateMenuRef"></templateMenu>
<templateMenu ref="templateMenuRef" @refreshList="refreshAllData"></templateMenu>
<decoarationDetail ref="decoarationDetailRef" @editSuccess="refreshAllData"></decoarationDetail>
<copyTemplate ref="copyTemplateRef" @copySuccess="refreshAllData"></copyTemplate>
<createBlank ref="blankTemplateRef" @copySuccess="refreshAllData"></createBlank>
<createBlank ref="blankTemplateRef" @createBlankSuccess="refreshAllData"></createBlank>
<previewTemplate ref="previewTemplateRef"></previewTemplate>
</div>
</template>

View File

@ -56,7 +56,7 @@
:show-all-levels="false"
@change="handleChangeBizCategory"
clearable
:disabled="isReadonly"
:disabled="isReadOnly"
/>
</el-form-item>
<el-form-item :label="__('分账比例')" prop="split_ratio">
@ -112,6 +112,21 @@
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="E签宝合同" prop="esign_contract_file_url">
<template v-if="form.esign_contract_file_url">
<el-button type="primary" size="small" @click="downloadContract" style="margin-right: 10px;">
点击下载
</el-button>
<el-button type="warning" size="small" @click="resignContract">
重新签署合同
</el-button>
</template>
<template v-else>
<el-button type="primary" size="small" @click="signContract">
签署合同
</el-button>
</template>
</el-form-item>
<el-form-item
v-if="false"
@ -140,7 +155,7 @@
import { translateTitle as __ } from '@/utils/i18n'
import { doEdit, FindStoreLevel, storeSetUp } from '@/api/store/base'
import { GetStoreClassify } from '@/api/base/store/category'
import { getList as getSubsite } from '@/api/plantform/subsite'
import { getList as getSubsite,createByFile} from '@/api/plantform/subsite'
import {
getStoreCategories
} from '@/api/shopAudit/shopAudit'
@ -161,6 +176,8 @@ export default {
store_o2o_flag: 0,
subsite_id: 0,
split_ratio:0,
esign_contract_file_url: '', //
store_id:''
},
rules: {
user_password: [
@ -334,6 +351,36 @@ export default {
}
this.dialogFormVisible = true;
},
downloadContract() {
if (!this.form.esign_contract_file_url) return;
//
window.open(this.form.esign_contract_file_url, '_blank');
},
//
async signContract() {
if (!this.form.store_id) {
this.$message.warning('请先保存店铺基本信息,再签署合同');
return;
}
try {
const res = await createByFile({ store_id: this.form.store_id });
if (res.status === 200 && res.data) {
window.open(res.data.url, '_blank');
// this.$emit('fetch-data');
} else {
this.$message.error(res.msg || '签署失败');
}
} catch (e) {
this.$message.error('签署接口异常');
}
},
//
async resignContract() {
//
await this.signContract();
},
close() {
this.form = {
store_is_selfsupport: 1,