當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ts.default.api.updateContract方法代碼示例

本文整理匯總了TypeScript中ts/opg.ts.default.api.updateContract方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ts.default.api.updateContract方法的具體用法?TypeScript ts.default.api.updateContract怎麽用?TypeScript ts.default.api.updateContract使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ts/opg.ts.default.api的用法示例。


在下文中一共展示了ts.default.api.updateContract方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: function

window['doSave'] = function (pop: PopUp, tb: Table, nextStep ?: Function) {
	let param = $('#tbForm').fieldsToJson({
		copyrightBeginDate: {
			name: '版權開始日',
			type: 'date',
			require: true,
		},
		copyrightEndDate: {
			name: '版權到期日',
			type: 'date',
			require: true,
		},
	});

	if (param) {

		let programId = $('#programId').val();
		if (!programId) {
			$('#programName').iptError('請選擇節目');
		}
		else if (!param.authorizedPlatform) {
			$('#tdPlatform').iptError('請選擇授權平台');
		}
		else {
			param.programId = programId;

			delete param.id;
			delete param.name;
			delete param.enName;
			delete param.mainCategoryDesc;
			delete param.minorCategoryDesc;
			delete param.produceYear;
			delete param.nation;
			delete param.episodes;
			delete param.lengthOfEpisode;

			delete param.contractNumber;
			delete param.authorizedRegionCNDesc;


			param.contractId = contractId;

			if (param.authorizedPlatform)
				param.authorizedPlatform = param.authorizedPlatform.join(',');

			if (param.authorizedCorp)
				param.authorizedCorp = param.authorizedCorp.join(',');

			if (param.transmitMode)
				param.transmitMode = param.transmitMode.join(',');

			if (param.authorizedRegionId)
				param.authorizedRegion = param.authorizedRegionId;
			delete param.authorizedRegionId;


			if(param.copyrightBeginDate)
				param.copyrightBeginDate += ' 00:00:00';
			if(param.copyrightEndDate)
				param.copyrightEndDate += ' 00:00:00';
			if(param.shareMoneyBeginDate)
				param.shareMoneyBeginDate += ' 00:00:00';
			if(param.shareMoneyEndDate)
				param.shareMoneyEndDate += ' 00:00:00';


			if (isEdit) {
				param.relContractProgramId = relCopyrightProgramId;

				param.copyrightType = contractFullMeta.copyrightType;
				param.copyrightRealBeginDate = contractFullMeta.copyrightRealBeginDate;
				param.copyrightRealEndDate = contractFullMeta.copyrightRealEndDate;

				console.log(param, contractFullMeta);
			}
			else {

				if (!param.copyrightType) {
					$('#selCopyrightType').iptError('請選擇版權類型');
				}


				console.log(param);
			}

			//return;

			opg.api.updateContract(param, function () {
				if (!isEdit) {
					opg.ok(`合同"${contractNumber}"節目新增成功`);
				}
				tb.update();
				pop.close();

				if (nextStep)
					nextStep(contractId, tb);
				else {
				}
			});
		}
//.........這裏部分代碼省略.........
開發者ID:rpdg,項目名稱:fy.js,代碼行數:101,代碼來源:detail.ts


注:本文中的ts/opg.ts.default.api.updateContract方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。