优化1.6 拆分费用bug

This commit is contained in:
wuxw 2024-01-10 01:56:44 +08:00
parent da2160d6ea
commit f1c5810fb2
2 changed files with 70 additions and 30 deletions

View File

@ -3,7 +3,7 @@
<div class="ibox"> <div class="ibox">
<div class="ibox-title"> <div class="ibox-title">
<h5> <h5>
<span><vc:i18n name="流程设置" namespace="workflowSettingManage"></vc:i18n></span> <vc:i18n name="流程设置" namespace="workflowSettingManage"></vc:i18n>
</h5> </h5>
<div class="ibox-tools" style="top:10px;"> <div class="ibox-tools" style="top:10px;">
@ -11,91 +11,122 @@
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="流程名称" namespace="workflowSettingManage"></vc:i18n></span></label> <label class="col-sm-2 col-form-label">
<vc:i18n name="流程名称" namespace="workflowSettingManage"></vc:i18n>
</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input v-model="workflowSettingInfo.flowName" type="text" disabled="disabled" :placeholder="vc.i18n('必填,请填写标题','workflowSettingManage')" class="form-control"> <input v-model="workflowSettingInfo.flowName" type="text" disabled="disabled"
:placeholder="vc.i18n('必填,请填写标题','workflowSettingManage')" class="form-control">
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="流程说明" namespace="workflowSettingManage"></vc:i18n></span></label> <label class="col-sm-2 col-form-label">
<vc:i18n name="流程说明" namespace="workflowSettingManage"></vc:i18n>
</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea v-model="workflowSettingInfo.describle" class="form-control" :placeholder="vc.i18n('选填,请填写流程说明','workflowSettingManage')"></textarea> <textarea v-model="workflowSettingInfo.describle" class="form-control"
:placeholder="vc.i18n('选填,请填写流程说明','workflowSettingManage')"></textarea>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="提交者结束" namespace="workflowSettingManage"></vc:i18n></span></label> <label class="col-sm-2 col-form-label">
<vc:i18n name="提交者结束" namespace="workflowSettingManage"></vc:i18n>
</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="custom-select" v-model="workflowSettingInfo.startNodeFinish"> <select class="custom-select" v-model="workflowSettingInfo.startNodeFinish">
<option selected disabled value="">{{vc.i18n('必填,请选择最后环节是否提交者确认','workflowSettingManage')}}</option> <option selected disabled value="">{{vc.i18n('必填,请选择最后环节是否提交者确认','workflowSettingManage')}}
</option>
<option value="Y">{{vc.i18n('是','workflowSettingManage')}}</option> <option value="Y">{{vc.i18n('是','workflowSettingManage')}}</option>
<option value="N">{{vc.i18n('否','workflowSettingManage')}}</option> <option value="N">{{vc.i18n('否','workflowSettingManage')}}</option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name="流程步骤" namespace="workflowSettingManage"></vc:i18n></span></label> <label class="col-sm-2 col-form-label">
<vc:i18n name="流程步骤" namespace="workflowSettingManage"></vc:i18n>
</label>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="row " style="margin-left: 0px;"> <div class="row " style="margin-left: 0px;">
<button type="button" class="btn btn-primary" @click="addWorkflowStep()"><span><vc:i18n name="添加步骤" namespace="workflowSettingManage"></vc:i18n></span></button> <button type="button" class="btn btn-primary" @click="addWorkflowStep()">
<vc:i18n name="添加步骤" namespace="workflowSettingManage"></vc:i18n>
</button>
</div> </div>
<div v-for="(item,index) in workflowSettingInfo.steps"> <div v-for="(item,index) in workflowSettingInfo.steps">
<div class="row margin-0 margin-top"> <div class="row margin-0 margin-top">
<div class="col-sm-1 text-center"> <div class="col-sm-1 text-center">
<label class="col-form-label"><span><vc:i18n name="第" namespace="workflowSettingManage"></vc:i18n></span>{{index+1}}<span><vc:i18n name="步" namespace="workflowSettingManage"></vc:i18n></span></label> <label class="col-form-label"><span>
<vc:i18n name="第" namespace="workflowSettingManage"></vc:i18n>
</span>{{index+1}}<span>
<vc:i18n name="步" namespace="workflowSettingManage"></vc:i18n>
</span></label>
</div> </div>
<div> <div>
<a id="dLabel" role="button" class="btn btn-white" data-target="#" href="javascript:;" @click="chooseStaff(item)"> <a id="dLabel" role="button" class="btn btn-white" data-target="#"
<span id="select-title">{{item.staffId == '' ? '选择员工':item.staffName}}</span> <span class="caret"></span> href="javascript:;" @click="chooseStaff(item)">
<span id="select-title">{{item.staffId == '' ? '选择员工':item.staffName}}</span>
<span class="caret"></span>
</a> </a>
</div> </div>
<div class="margin-left" @click="chooseType(item)"> <div class="margin-left" @click="chooseType(item)">
<div class="form-check form-check-inline col-form-label"> <div class="form-check form-check-inline col-form-label">
<input class="form-check-input" type="radio" v-bind:name="index+'-radio'" v-bind:id="index+'-radio1'" value="2" v-model="item.type" checked> <input class="form-check-input" type="radio" v-bind:name="index+'-radio'"
v-bind:id="index+'-radio1'" value="2" v-model="item.type" checked>
<label class="form-check-label" v-bind:for="index+'-radio1'"> <label class="form-check-label" v-bind:for="index+'-radio1'">
普通流程 普通流程
</label> </label>
</div> </div>
<div class="form-check form-check-inline col-form-label" v-show="index!=0"> <div class="form-check form-check-inline col-form-label" v-show="index!=0">
<input class="form-check-input" type="radio" v-bind:name="index+'-radio'" v-bind:id="index+'-radio2'" value="1" v-model="item.type"> <input class="form-check-input" type="radio" v-bind:name="index+'-radio'"
v-bind:id="index+'-radio2'" value="1" v-model="item.type">
<label class="form-check-label" v-bind:for="index+'-radio2'"> <label class="form-check-label" v-bind:for="index+'-radio2'">
会签 会签
</label> </label>
</div> </div>
</div> </div>
<div class="margin-left" @click="chooseStaffRole(item)" v-if="workflowSettingInfo.flowType == '30003'"> <div class="margin-left" @click="chooseStaffRole(item)"
v-if="workflowSettingInfo.flowType == '30003'">
<div class="form-check form-check-inline col-form-label"> <div class="form-check form-check-inline col-form-label">
<input class="form-check-input" type="radio" v-bind:name="index+'-radio1'" v-bind:id="index+'-radio3'" value="2002" v-model="item.staffRole" checked> <input class="form-check-input" type="radio" v-bind:name="index+'-radio1'"
v-bind:id="index+'-radio3'" value="2002" v-model="item.staffRole" checked>
<label class="form-check-label" v-bind:for="index+'-radio3'"> <label class="form-check-label" v-bind:for="index+'-radio3'">
仓库管理员 仓库管理员
</label> </label>
</div> </div>
<div class="form-check form-check-inline col-form-label"> <div class="form-check form-check-inline col-form-label">
<input class="form-check-input" type="radio" v-bind:name="index+'-radio1'" v-bind:id="index+'-radio4'" value="1001" v-model="item.staffRole"> <input class="form-check-input" type="radio" v-bind:name="index+'-radio1'"
v-bind:id="index+'-radio4'" value="1001" v-model="item.staffRole">
<label class="form-check-label" v-bind:for="index+'-radio4'"> <label class="form-check-label" v-bind:for="index+'-radio4'">
普通人员 普通人员
</label> </label>
</div> </div>
</div> </div>
<div class="margin-left" @click="chooseStaffRole(item)" v-if="workflowSettingInfo.flowType == '40004' || workflowSettingInfo.flowType == '70007' || workflowSettingInfo.flowType == '80008'"> <div class="margin-left" @click="chooseStaffRole(item)"
v-if="workflowSettingInfo.flowType == '40004' || workflowSettingInfo.flowType == '70007' || workflowSettingInfo.flowType == '80008'">
<div class="form-check form-check-inline col-form-label"> <div class="form-check form-check-inline col-form-label">
<input class="form-check-input" type="radio" v-bind:name="index+'-radio2'" v-bind:id="index+'-radio5'" value="3003" v-model="item.staffRole" checked> <input class="form-check-input" type="radio" v-bind:name="index+'-radio2'"
v-bind:id="index+'-radio5'" value="3003" v-model="item.staffRole" checked>
<label class="form-check-label" v-bind:for="index+'-radio5'"> <label class="form-check-label" v-bind:for="index+'-radio5'">
仓库管理员 仓库管理员
</label> </label>
</div> </div>
<div class="form-check form-check-inline col-form-label"> <div class="form-check form-check-inline col-form-label">
<input class="form-check-input" type="radio" v-bind:name="index+'-radio2'" v-bind:id="index+'-radio6'" value="1001" v-model="item.staffRole"> <input class="form-check-input" type="radio" v-bind:name="index+'-radio2'"
v-bind:id="index+'-radio6'" value="1001" v-model="item.staffRole">
<label class="form-check-label" v-bind:for="index+'-radio6'"> <label class="form-check-label" v-bind:for="index+'-radio6'">
普通人员 普通人员
</label> </label>
</div> </div>
</div> </div>
<div> <div>
<button type="button" class="btn btn-link" @click="deleteStep(item)"><span><vc:i18n name="删除步骤" namespace="workflowSettingManage"></vc:i18n></span></button> <button type="button" class="btn btn-link" @click="deleteStep(item)">
<vc:i18n name="删除步骤" namespace="workflowSettingManage"></vc:i18n>
</button>
</div> </div>
<div v-if="item.type == '1'"> <div v-if="item.type == '1'">
<button type="button" class="btn btn-link" @click="addStaff(item)"><span><vc:i18n name="添加员工" namespace="workflowSettingManage"></vc:i18n></span></button> <button type="button" class="btn btn-link" @click="addStaff(item)"><span>
<vc:i18n name="添加员工" namespace="workflowSettingManage"></vc:i18n>
</span></button>
</div> </div>
</div> </div>
<div class="row margin-0 margin-top" v-for="(subItem,index) in item.subStaff"> <div class="row margin-0 margin-top" v-for="(subItem,index) in item.subStaff">
@ -103,12 +134,16 @@
<label class="col-form-label"></label> <label class="col-form-label"></label>
</div> </div>
<div> <div>
<a id="dLabel" role="button" class="btn btn-white" data-target="#" href="javascript:;" @click="chooseStaff(subItem)"> <a id="dLabel" role="button" class="btn btn-white" data-target="#"
<span id="select-title">{{subItem.staffId == '' ? '选择员工':subItem.staffName}}</span> <span class="caret"></span> href="javascript:;" @click="chooseStaff(subItem)">
<span id="select-title">{{subItem.staffId == '' ?
'选择员工':subItem.staffName}}</span> <span class="caret"></span>
</a> </a>
</div> </div>
<div> <div>
<button type="button" class="btn btn-link" @click="deleteStaff(item,subItem)"><span><vc:i18n name="删除员工" namespace="workflowSettingManage"></vc:i18n></span></button> <button type="button" class="btn btn-link" @click="deleteStaff(item,subItem)"><span>
<vc:i18n name="删除员工" namespace="workflowSettingManage"></vc:i18n>
</span></button>
</div> </div>
</div> </div>
</div> </div>
@ -118,7 +153,10 @@
<button class="btn btn-primary float-right" type="button" v-on:click="saveWorkflowSettingInfo()"><i <button class="btn btn-primary float-right" type="button" v-on:click="saveWorkflowSettingInfo()"><i
class="fa fa-check"></i>&nbsp;提交 class="fa fa-check"></i>&nbsp;提交
</button> </button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" v-on:click="_goBack()"><span><vc:i18n name="返回" namespace="workflowSettingManage"></vc:i18n></span> <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
v-on:click="_goBack()"><span>
<vc:i18n name="返回" namespace="workflowSettingManage"></vc:i18n>
</span>
</button> </button>
</div> </div>
@ -134,7 +172,9 @@
<div class="ibox"> <div class="ibox">
<div class="ibox-title"> <div class="ibox-title">
<h5> <h5>
<span><vc:i18n name="说明" namespace="workflowSettingManage"></vc:i18n></span> <span>
<vc:i18n name="说明" namespace="workflowSettingManage"></vc:i18n>
</span>
</h5> </h5>
<div class="ibox-tools" style="top:10px;"> <div class="ibox-tools" style="top:10px;">

View File

@ -7,7 +7,7 @@
flowName: '', flowName: '',
flowType: '', flowType: '',
describle: '', describle: '',
startNodeFinish: '', startNodeFinish: 'Y',
steps: [] steps: []
} }
}, },
@ -20,11 +20,11 @@
methods: { methods: {
saveWorkflowSettingInfo: function() { saveWorkflowSettingInfo: function() {
vc.component.workflowSettingInfo.communityId = vc.getCurrentCommunity().communityId; $that.workflowSettingInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.apiPost( vc.http.apiPost(
'workflow.updateWorkflow', 'workflow.updateWorkflow',
JSON.stringify(vc.component.workflowSettingInfo), { JSON.stringify($that.workflowSettingInfo), {
emulateJSON: true emulateJSON: true
}, },
function(json, res) { function(json, res) {