# `Sp_salsaleschance_applyQuo` (procedure)

> @author:zhucx 
		     @date: 
				 @describe:


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sProInParam` | `varchar(10000)` |
| 2 | IN | `sMakePerson` | `varchar(100)` |
| 3 | IN | `sBrId` | `varchar(100)` |
| 4 | IN | `sSuId` | `varchar(100)` |
| 5 | OUT | `sReturn` | `varchar(1000)` |
| 6 | OUT | `sCode` | `int` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_salsaleschance_applyQuo`'`._

## Narrative

**Business context:** 销售管理 → 销售机会 → 销售机会产品 (`salsaleschanceproduct`) — 申请报价 toolbar that flags one or more chance-product rows as "已提交报价申请" by flipping `bQuotation=1`, signalling that the line is now in the quotation pipeline. Typical follow-up: the 报价单 module picks up rows with `bQuotation=1` to generate the actual 报价单单据.

**What it does:** Validates `sProInParam`, parses `$.params[*].value[*].sSlaveId`, and for each line runs `UPDATE salsaleschanceproduct SET bQuotation=1 WHERE sId=p_sId AND sBrandsId=sBrId AND sSubsidiaryId=sSuId`. No reverse / cancel companion observed in this batch.

**Invocation:** Generic-dispatch button signature `(sProInParam, sMakePerson, sBrId, sSuId, OUT sReturn, OUT sCode)` — dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` from the 销售机会产品 grid's 申请报价 line-toolbar button. Install script: `script/标版/30100101/Sp_salsaleschance_applyQuo.sql`. No xly-src Java caller, no gdsmodule row — binding lives in the grid-button metadata.
