You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AEG_Development/添加检移票/SxCentral/js/getProcessingTechnologyInfo.js

46 lines
1.7 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

function insertProcessingTechnology(departmentSelect, AttributelinkProcessingTechnology)
{
console.log("11111111");
console.log(AttributelinkProcessingTechnology);
console.log(departmentSelect.value);
var ProcessingTechnologySelect = document.getElementById(AttributelinkProcessingTechnology);
ProcessingTechnologySelect.innerHTML = '';
var owner = [];
if(departmentSelect.value == "FrontSection")
{
owner = ["zhangsan","lisi","wangwu"]
}else if(departmentSelect.value == "Logistics")
{
owner = ["H1123123123","H2222222","H3"]
}else if(departmentSelect.value == "Quality")
{
owner = ["1231231","2123123","1231233"]
}
$.ajax({
type : "GET",
url : "https://r2023x.mydomain.com/3dspace/CommonTools/DSGetProcessDepartmentInfo?department=" + departmentSelect.value,
dataType : "json",
success: function(response){
console.log("8888");
console.log('成功', response);
var jsonObject = JSON.parse(response.data);
console.log(jsonObject); // 输出:{ Organization: 'emxFramework.Label.Organization', PreliminaryInvestigation: 'emxFramework.Label.PreliminaryInvestigation' }
// var jsonObject1 = JSON.parse(jsonObject);
console.log(jsonObject.CustomerService); // 输出emxFramework.Label.Organization
console.log(jsonObject.LogisticsOperations);
Object.keys(jsonObject).forEach(function(key){
var option = document.createElement('option');
option.value = key;
option.text = jsonObject[key];
ProcessingTechnologySelect.appendChild(option);
})
}
})
}