|
@@ -43,7 +43,8 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="text" @click="onSetProjectPrice(row, props.row.status)"> 设价 </el-button>
|
|
|
+ <el-button type="text" @click="onSetProjectPrice(row, props.row.status)"> 设价 </el-button>
|
|
|
+ <el-button v-if="(row?.isExistNextInfo?? 0) > 0" type="text" @click="onDrawInfo(row.id)"> 待生效信息 </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</template>
|
|
@@ -88,6 +89,7 @@ import { onMounted, reactive, onBeforeMount, defineAsyncComponent, ref, getCurre
|
|
|
import { CompanyDrawOutput,pageInputProjectPriceSetPageInput, PriceGetPageOutput, PriceGetPageOutput_Price } from '/@/api/admin/data-contracts'
|
|
|
import { ProjectPriceApi } from '/@/api/admin/ProjectPrice'
|
|
|
import eventBus from '/@/utils/mitt'
|
|
|
+import { formatDate } from '/@/utils/formatTime'
|
|
|
const { proxy } = getCurrentInstance() as any
|
|
|
|
|
|
// 引入组件
|
|
@@ -173,8 +175,9 @@ const onSetProjectPrice = async (row: PriceGetPageOutput_Price,status:number) =>
|
|
|
proxy.$modal.alertError(`请输入生效日期!`)
|
|
|
return;
|
|
|
}
|
|
|
- let res = {} as any
|
|
|
- res = await new ProjectPriceApi().updateProjectPrice(row, { showSuccessMessage: true }).catch(() => {
|
|
|
+ const effectDate = formatDate(row.effectDate, "YYYY-mm-dd")
|
|
|
+ row.effectDate = effectDate;
|
|
|
+ let res = await new ProjectPriceApi().updateProjectPrice(row, { showSuccessMessage: true }).catch(() => {
|
|
|
// state.sureLoading = false
|
|
|
})
|
|
|
|
|
@@ -185,6 +188,32 @@ const onSetProjectPrice = async (row: PriceGetPageOutput_Price,status:number) =>
|
|
|
// state.showDialog = false
|
|
|
}
|
|
|
}
|
|
|
+//待生效日期
|
|
|
+const onDrawInfo = async (ProjectPriceId: number) => {
|
|
|
+ // state.sureLoading = true
|
|
|
+
|
|
|
+ let res = await new ProjectPriceApi().GetDrawInfo({
|
|
|
+ ProjectPriceId: ProjectPriceId,
|
|
|
+ DrawType:2
|
|
|
+ }).catch(() => {
|
|
|
+ // state.sureLoading = false
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log(res);
|
|
|
+ // state.sureLoading = false
|
|
|
+
|
|
|
+ if (res?.success && res?.data != null) {
|
|
|
+ const data = res.data;
|
|
|
+ let info = `修改抽成比例为 ${ data.drawRatio }% 于${ data.effectDate }生效`
|
|
|
+ if (res.data.drawWay == 2) {
|
|
|
+ info = `修改抽成金额为${ data.drawRatio }元 于${ data.effectDate }生效`
|
|
|
+ }
|
|
|
+ proxy.$modal.alert(`${info}`)
|
|
|
+ // state.showDialog = false
|
|
|
+ } else {
|
|
|
+ proxy.$modal.alert(`无待生效信息,请刷新后重试`)
|
|
|
+ }
|
|
|
+}
|
|
|
//查询公司抽成
|
|
|
const onCompanyQuery = async () => {
|
|
|
// state.loading = true
|